gfx-rs / portability

Vulkan Portability Implementation
Mozilla Public License 2.0
382 stars 25 forks source link

Limits missing (D3D12 back-end) #242

Closed null77 closed 3 years ago

null77 commented 3 years ago

I'm experimenting with ANGLE + the Vk -> D3D12 translation from gfx-portability. Right now I ran into a few missing limits that interfere with ANGLE and cause VVL or ANGLE internal errors:

maxFragmentOutputAttachments is always zero which makes ANGLE think the driver supports zero draw buffers maxMemoryAllocationCount is zero makes the VVL print this error:

[ VUID-vkAllocateMemory-maxMemoryAllocationCount-04101 ] Validation Error: [ VUID-vkAllocateMemory-maxMemoryAllocationCount-04101 ] Object 0: handle = 0x2099fe657f0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x4e9256cc | vkAllocateMemory: Number of currently valid memory objects is not less than the maximum allowed (0). The Vulkan spec states: There must be less than VkPhysicalDeviceLimits::maxMemoryAllocationCount device memory allocations currently allocated on the device. (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkAllocateMemory-maxMemoryAllocationCount-04101)
                            Object: 0x2099fe657f0 (type = Device(3))

I'll update this issue as I run into more missing limits.

null77 commented 3 years ago

@kvark next limit requirement:

[ VUID-VkFramebufferCreateInfo-layers-00890 ] Validation Error: [ VUID-VkFramebufferCreateInfo-layers-00890 ] Object 0: handle = 0x1d01f974190, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xa0bf1473 | vkCreateFramebuffer(): Requested VkFramebufferCreateInfo layers exceeds physical device limits. Requested layers: 1, device max: 0
 The Vulkan spec states: layers must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferLayers (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-layers-00890)
                            Object: 0x1d01f974190 (type = Device(3))

maxFramebufferLayers in this case is reporting 0.

null77 commented 3 years ago

And another one:

[ VUID-VkGraphicsPipelineCreateInfo-layout-01688 ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0x442e1dd0 | Invalid Pipeline CreateInfo State: Shader Stage VK_SHADER_STAGE_VERTEX_BIT exceeds component limit VkPhysicalDeviceLimits::maxPerStageResources (0) The Vulkan spec states: The number of resources in layout accessible to each shader stage that is used by the pipeline must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-01688)

Here it is maxPerStageResources.