You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Large memory usage for variable-count descriptor sets #13667
I have a test VK_Descriptor_Variable_Count that creates many descriptor sets with a descriptor layout that is potentially huge (descriptor with bindingCount=100000) but every descriptor set allocated from it is tiny (bindingCount=2 with one having bindingCount=100 just so they're not all identical). I use this specifically to test RenderDoc to ensure I don't allocate things based on the max declared size but on the real size, since the delta can be large for some applications.
When running this with GPU-AV enabled I see a large amount of memory used, I think because GPU-AV is allocating things based on the larger size.
Test (Reproduce)
For me this reproduces with RenderDoc's demo project when gpu validation is enabled. The project lives on github either demos.sln on windows or demos/CMakeLists.txt for linux (I haven't tested on linux but I have no strong reason to expect that this is platform specific).
Attached is a binary build of the exe for convenience: demo_binary.zip
In either case it needs glslang or glslc in the path. Then run with demos_x64 VK_Descriptor_Variable_Count --debug --gpuva and it will enable the validation layers.
Extra Info
I believe the allocation is coming from DescriptorSetSubState::CreateDescriptorEncodingBuffer(), it sizes the buffer based on base.GetNonInlineDescriptorCount() which looks directly at the descriptor set layout's declared size and that doesn't have the variable-alloc information.
Activity