Skip to content

gpuav: Support desc heaps in buffer validation - #13153

Open
arno-lunarg wants to merge 1 commit into
KhronosGroup:mainfrom
arno-lunarg:arno-gpuav-bda-in-buffer-validation
Open

arno-lunarg wants to merge 1 commit into
KhronosGroup:mainfrom
arno-lunarg:arno-gpuav-bda-in-buffer-validation

Conversation

@arno-lunarg

@arno-lunarg arno-lunarg commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Closes #12657

  • Pick a descriptor heap or descriptor set validation compute pipeline, based on command buffer's last used descriptor mode
  • Stop skipping validation commands in heap mode, only skip descriptor buffer mode
  • Force device address usage on all buffers and allocations, adding a manual chassis vkAllocateMemory so GPU-AV can modify VkMemoryAllocateInfo
  • Store the error buffer dword size in the buffer itself instead of querying the runtime array length, and move its offsets into gpuav_shaders_constants.h Done because buffer descriptors are now managed through buffer addresses in push data, so cannot access their metadata anymore
  • Tidy ComputePipeline: hide handles behind Valid()/Bind* methods, make SharedResourcesCache re-entrant
  • Add descriptor heap tests for index buffer OOB, invalid BLAS reference and vertex attribute fetch OOB

@arno-lunarg
arno-lunarg requested a review from a team as a code owner September 18, 2026 16:41
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 124338.

@arno-lunarg
arno-lunarg force-pushed the arno-gpuav-bda-in-buffer-validation branch from 02f8b3e to e2ead62 Compare September 18, 2026 16:43
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 124350.

- Create a descriptor heap variant of every
validation compute pipeline, picked from the command buffer's last used
descriptor mode, binding resources, push constants and
error logging buffers as push data addresses instead of descriptor sets
- Stop skipping validation commands in heap mode,
only skip descriptor buffer mode
- Force device address usage on all buffers and allocations,
adding a manual chassis vkAllocateMemory so GPU-AV can modify VkMemoryAllocateInfo
- Store the error buffer dword size in the buffer itself
instead of querying the runtime array length, and move its offsets into gpuav_shaders_constants.h
Done because buffer descriptors are now managed through buffer
addresses in push data, so cannot access their metadata anymore
- Tidy ComputePipeline: hide handles behind Valid()/Bind* methods,
make SharedResourcesCache re-entrant
- Add descriptor heap tests for index buffer OOB,
invalid BLAS reference and vertex attribute fetch OOB
@arno-lunarg
arno-lunarg force-pushed the arno-gpuav-bda-in-buffer-validation branch from e2ead62 to fbd3350 Compare September 18, 2026 16:44
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 124362.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24562 running.

bool operator()(TypeInfoRef lhs, TypeInfoRef rhs) const { return lhs.get() == rhs.get(); }
};
mutable std::mutex mtx;
mutable std::recursive_mutex mtx;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick scanning, what is a recursive_mutex needed for here? A comment on why a normal mutex is not good enough would be nice

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used so that you can lock the same mutex multiple times within the same thread - happens now given how objects are constructed in the object cache.

Not sure about a comment since I would just describe what a recursive_mutex is

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24562 failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Descriptor Heap/Buffer with Buffer Validation

3 participants