protonscr

Vulkan Validation errors with test_vbv_stride_edge_cases

vkd3dclosed
HansKristian-Work/vkd3d-proton#2372 · opened 2025-03-05 by hakzsam · updated 2025-03-10 · 1 comments · github
Hhakzsam 2025-03-05 github
d3d12: ======== test_vbv_stride_edge_cases begin ========
VUID-vkCmdBindVertexBuffers2-pStrides-06209(ERROR / SPEC): msgNum: -1638026333 - Validation Error: [ VUID-vkCmdBindVertexBuffers2-pStrides-06209 ] Objects: VkCommandBuffer 0x6086ed77a210, VkPipeline 0xfef35a00000000a0 | MessageID = 0x9e5db3a3
vkCmdDraw(): (attribute binding 0, attribute location 0) The pStrides value (4) parameter in the last call to vkCmdDraw is not 0 and less than the extent of the binding for the attribute (32).
The Vulkan spec states: If pStrides is not NULL each element of pStrides must be either 0 or greater than or equal to the maximum extent of all vertex input attributes fetched from the corresponding binding, where the extent is calculated as the VkVertexInputAttributeDescription::offset plus VkVertexInputAttributeDescription::format size (https://docs.vulkan.org/spec/latest/chapters/fxvertex.html#VUID-vkCmdBindVertexBuffers2-pStrides-06209)
    Objects: 2
        [0] 0x6086ed77a210, type: 6, name: NULL
        [1] 0xfef35a00000000a0, type: 19, name: NULL
VUID-vkCmdBindVertexBuffers2-pStrides-06209(ERROR / SPEC): msgNum: -1638026333 - Validation Error: [ VUID-vkCmdBindVertexBuffers2-pStrides-06209 ] Objects: VkCommandBuffer 0x6086ed77a210, VkPipeline 0xfef35a00000000a0 | MessageID = 0x9e5db3a3
vkCmdDraw(): (attribute binding 0, attribute location 0) The pStrides value (4) parameter in the last call to vkCmdDraw is not 0 and less than the extent of the binding for the attribute (32).
The Vulkan spec states: If pStrides is not NULL each element of pStrides must be either 0 or greater than or equal to the maximum extent of all vertex input attributes fetched from the corresponding binding, where the extent is calculated as the VkVertexInputAttributeDescription::offset plus VkVertexInputAttributeDescription::format size (https://docs.vulkan.org/spec/latest/chapters/fxvertex.html#VUID-vkCmdBindVertexBuffers2-pStrides-06209)
    Objects: 2
        [0] 0x6086ed77a210, type: 6, name: NULL
        [1] 0xfef35a00000000a0, type: 19, name: NULL
VUID-vkCmdBindVertexBuffers2-pStrides-06209(ERROR / SPEC): msgNum: -1638026333 - Validation Error: [ VUID-vkCmdBindVertexBuffers2-pStrides-06209 ] Objects: VkCommandBuffer 0x6086ed77a210, VkPipeline 0xfef35a00000000a0 | MessageID = 0x9e5db3a3
vkCmdDraw(): (attribute binding 0, attribute location 0) The pStrides value (8) parameter in the last call to vkCmdDraw is not 0 and less than the extent of the binding for the attribute (32).
The Vulkan spec states: If pStrides is not NULL each element of pStrides must be either 0 or greater than or equal to the maximum extent of all vertex input attributes fetched from the corresponding binding, where the extent is calculated as the VkVertexInputAttributeDescription::offset plus VkVertexInputAttributeDescription::format size (https://docs.vulkan.org/spec/latest/chapters/fxvertex.html#VUID-vkCmdBindVertexBuffers2-pStrides-06209)
    Objects: 2
        [0] 0x6086ed77a210, type: 6, name: NULL
        [1] 0xfef35a00000000a0, type: 19, name: NULL
VUID-vkCmdBindVertexBuffers2-pStrides-06209(ERROR / SPEC): msgNum: -1638026333 - Validation Error: [ VUID-vkCmdBindVertexBuffers2-pStrides-06209 ] Objects: VkCommandBuffer 0x6086ed77a210, VkPipeline 0xfef35a00000000a0 | MessageID = 0x9e5db3a3
vkCmdDraw(): (attribute binding 0, attribute location 0) The pStrides value (8) parameter in the last call to vkCmdDraw is not 0 and less than the extent of the binding for the attribute (32).
The Vulkan spec states: If pStrides is not NULL each element of pStrides must be either 0 or greater than or equal to the maximum extent of all vertex input attributes fetched from the corresponding binding, where the extent is calculated as the VkVertexInputAttributeDescription::offset plus VkVertexInputAttributeDescription::format size (https://docs.vulkan.org/spec/latest/chapters/fxvertex.html#VUID-vkCmdBindVertexBuffers2-pStrides-06209)
    Objects: 2
        [0] 0x6086ed77a210, type: 6, name: NULL
        [1] 0xfef35a00000000a0, type: 19, name: NULL
VUID-vkCmdBindVertexBuffers2-pStrides-06209(ERROR / SPEC): msgNum: -1638026333 - Validation Error: [ VUID-vkCmdBindVertexBuffers2-pStrides-06209 ] Objects: VkCommandBuffer 0x6086ed77a210, VkPipeline 0xfef35a00000000a0 | MessageID = 0x9e5db3a3
vkCmdDraw(): (attribute binding 0, attribute location 0) The pStrides value (12) parameter in the last call to vkCmdDraw is not 0 and less than the extent of the binding for the attribute (32).
The Vulkan spec states: If pStrides is not NULL each element of pStrides must be either 0 or greater than or equal to the maximum extent of all vertex input attributes fetched from the corresponding binding, where the extent is calculated as the VkVertexInputAttributeDescription::offset plus VkVertexInputAttributeDescription::format size (https://docs.vulkan.org/spec/latest/chapters/fxvertex.html#VUID-vkCmdBindVertexBuffers2-pStrides-06209)
    Objects: 2
        [0] 0x6086ed77a210, type: 6, name: NULL
        [1] 0xfef35a00000000a0, type: 19, name: NULL
VUID-vkCmdBindVertexBuffers2-pStrides-06209(ERROR / SPEC): msgNum: -1638026333 - Validation Error: [ VUID-vkCmdBindVertexBuffers2-pStrides-06209 ] Objects: VkCommandBuffer 0x6086ed77a210, VkPipeline 0xfef35a00000000a0 | MessageID = 0x9e5db3a3
vkCmdDraw(): (attribute binding 0, attribute location 0) The pStrides value (12) parameter in the last call to vkCmdDraw is not 0 and less than the extent of the binding for the attribute (32).
The Vulkan spec states: If pStrides is not NULL each element of pStrides must be either 0 or greater than or equal to the maximum extent of all vertex input attributes fetched from the corresponding binding, where the extent is calculated as the VkVertexInputAttributeDescription::offset plus VkVertexInputAttributeDescription::format size (https://docs.vulkan.org/spec/latest/chapters/fxvertex.html#VUID-vkCmdBindVertexBuffers2-pStrides-06209)
    Objects: 2
        [0] 0x6086ed77a210, type: 6, name: NULL
        [1] 0xfef35a00000000a0, type: 19, name: NULL
HHansKristian-Work maintainer 2025-03-05 github

Known case where we're testing UB. Native d3d12 allows this, but has weird striding behavior as expected on AMD, and it's possible to break robustness this way. D3D12 validation warns about this case, and says it should work (but it doesn't really). Only reasonable way to get rid of this is to go full dynamic vertex input everywhere, but that's not acceptable.

Nothing extracted yet.