Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layers: Refactor and improve acceleration structure state tracking #3782

Merged

Conversation

jeremyg-lunarg
Copy link
Contributor

Remove unneeded data members and make many others const.

The KHR state object shouldn't inherit from BINDABLE, because memory is never bound to it.

Add tracking for buffers used in the build acceleration structure commands, including those that are passed by VkDeviceAddress.

Fixes #3664

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 17756.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6249 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6249 failed.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 17826.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6250 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6250 failed.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 17905.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6252 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6252 passed.

@jeremyg-lunarg
Copy link
Contributor Author

I can break this up into a few other PRs if people prefer...

layers/core_validation.cpp Show resolved Hide resolved
layers/state_tracker.cpp Outdated Show resolved Hide resolved
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 19430.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6273 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6273 failed.

Remove unneeded data members and make many others const.

The NV and KHR state objects cannot be combined because the NV version
has a VkDeviceMemory bound to by vkBindAccelerationStructureMemoryNV(),
but the KHR version gets its memory from a VkBuffer included in
the VkAccelerationStructureCreateInfoKHR struct.
Add tracking for vkCmdCopyMemoryToAccelerationStructureKHR() and
vkCmdCopyMemoryToAccelerationStructureKHR().
Make sure the state tracker can detect if buffers used by this
command are freed prematurely.
Because the buffers are passed by a VkDeviceAddress that might not
be the start of the VkBuffer, the entire buffer address range
needs to be tracked.
This tests makes sure the buffers used are tracked even if
a device address after the start of the buffer is used.
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 19459.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6276 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 6276 passed.

@jeremyg-lunarg jeremyg-lunarg merged commit 22e0d05 into KhronosGroup:master Feb 28, 2022
@jeremyg-lunarg jeremyg-lunarg deleted the jeremyg-accel-struct branch February 28, 2022 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants