mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Check descriptor indexing test doesn't overflow physical device limits
This commit is contained in:
@@ -225,6 +225,20 @@ void main()
|
||||
|
||||
VulkanGraphicsTest::Prepare(argc, argv);
|
||||
|
||||
if(!Avail.empty())
|
||||
return;
|
||||
|
||||
VkPhysicalDeviceProperties props;
|
||||
vkGetPhysicalDeviceProperties(phys, &props);
|
||||
|
||||
// lazy - we could reduce this limit to a couple by not using combined image samplers
|
||||
if(props.limits.maxDescriptorSetSamplers < DESC_ARRAY1_SIZE + DESC_ARRAY2_SIZE)
|
||||
Avail = "maxDescriptorSetSamplers " + std::to_string(props.limits.maxDescriptorSetSamplers) +
|
||||
" is insufficient";
|
||||
else if(props.limits.maxDescriptorSetSampledImages < DESC_ARRAY1_SIZE + DESC_ARRAY2_SIZE)
|
||||
Avail = "maxDescriptorSetSampledImages " +
|
||||
std::to_string(props.limits.maxDescriptorSetSampledImages) + " is insufficient";
|
||||
|
||||
if(!Avail.empty())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user