Hi,
Il 07/10/21 10:35, Giovanni Mascellani ha scritto:
The patch is huge and I don't know the code very much, but it causes tests/d3d12 to hang on my NVIDIA Quadro P2000 Mobile card.
I noticed that the same commit introduces some Vulkan validation layer errors, which might be related to the crash:
VUID-VkPipelineLayoutCreateInfo-descriptorType-03017(ERROR / SPEC): msgNum: -1565019798 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03017 ] Object 0: handle = 0x562e2b075b88, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xa2b7b16a | vkCreatePipelineLayout(): max per-stage uniform buffer bindings count (1024) exceeds device maxPerStageDescriptorUniformBuffers limit (15). The Vulkan spec states: The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorUniformBuffers (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.htm...) Objects: 1 [0] 0x562e2b075b88, type: 3, name: NULL VUID-VkPipelineLayoutCreateInfo-descriptorType-03029(ERROR / SPEC): msgNum: 1530663082 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03029 ] Object 0: handle = 0x562e2b075b88, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x5b3c10aa | vkCreatePipelineLayout(): sum of uniform buffer bindings among all stages (1024) exceeds device maxDescriptorSetUniformBuffers limit (90). The Vulkan spec states: The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetUniformBuffers (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.htm...) Objects: 1 [0] 0x562e2b075b88, type: 3, name: NULL VUID-VkPipelineLayoutCreateInfo-descriptorType-03023(ERROR / SPEC): msgNum: -227882531 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03023 ] Object 0: handle = 0x562e2b075b88, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf26ac9dd | vkCreatePipelineLayout(): max per-stage uniform buffer bindings count (1024) exceeds device maxPerStageDescriptorUpdateAfterBindUniformBuffers limit (15). The Vulkan spec states: The total number of descriptors with a descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceDescriptorIndexingProperties::maxPerStageDescriptorUpdateAfterBindUniformBuffers (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.htm...) Objects: 1 [0] 0x562e2b075b88, type: 3, name: NULL VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03037(ERROR / SPEC): msgNum: 1234136343 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03037 ] Object 0: handle = 0x562e2b075b88, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x498f6d17 | vkCreatePipelineLayout(): sum of uniform buffer bindings among all stages (1024) exceeds device maxDescriptorSetUpdateAfterBindUniformBuffers limit (90). The Vulkan spec states: The total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceDescriptorIndexingProperties::maxDescriptorSetUpdateAfterBindUniformBuffers (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.htm...) Objects: 1 [0] 0x562e2b075b88, type: 3, name: NULL
I think Conor and Henri might be using AMD video cards, for which apparently these limits are much higher (e.g. [1]). Unfortunately, it seems that it's just AMD which has such high limits. Both Intel and NVIDIA (and others) stay more in the dozens ballpark. I don't know how hard it would be to reduce that 1024 number. Also, while a hint, it's not obvious that these errors are related to the crash (even if it's not, it's probably a bug in itself, isn't it?).
[1] https://vulkan.gpuinfo.org/displaydevicelimit.php?name=maxPerStageDescriptor...
Giovanni.