KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
727 stars 396 forks source link

sync: Update allocation scheme of HandleRecord objects #8201

Closed artem-lunarg closed 1 week ago

artem-lunarg commented 1 week ago

This gets rid of allocations when we need to store many resource handles. Instead of allocating per API command, now it's an allocation per command buffer.

As a bonus recording structures occupy less space: NamedHandle (new name HandleRecord): 64 bytes -> 16 bytes ResourceCmdUsageRecord: 128 bytes -> 40 bytes

Due to structure size reduction we can add few handles per API call (next PR) in order to have them in the error messages (handle structure takes 16 bytes) and it still will use less memory than the previous implementation that does not store the handles, so it should be more or less free. On the other hand it's not the biggest memory user in syncval.

Performance/memory testing did not show measurable changes in any direction.

This change adds resource handles only to a single API call to be able to run the test. Separate PR will add a bunch of those.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build queued with queue ID 207410.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16941 running.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build queued with queue ID 207435.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16942 running.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16942 failed.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build queued with queue ID 207456.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16943 running.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16943 failed.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build queued with queue ID 207604.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16944 running.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16944 passed.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build queued with queue ID 207708.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16945 running.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16945 passed.