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
The function PostCallRecordCmdSetVertexInputEXT does not invalidate vertex bindings which were not replaced.
This means that when calling CmdSetVertexInputEXT with 3 bindings, then again with only one binding, the last 2 bindings of the first call are still considered as active by the validation layer.
This causes in turn many false positive when binding vertex buffers and drawing. The following test shows two of them:
This code should output no validation error. However, it outputs the following 2: Validation Error: [ VUID-vkCmdDraw-Input-08734 ] Object 0: handle = 0xcfef35000000000a, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x267f4248 | vkCmdDraw(): vkCmdSetVertexInputEXT set pVertexAttributeDescriptions[1] (binding 1, location 0) with format VK_FORMAT_R32_SINT but the vertex shader input is numeric type float32. The Vulkan spec states: If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either legacyVertexAttributes is not enabled or the SPIR-V Type associated with a given Input variable of the corresponding Location in the Vertex Execution Model OpEntryPoint is 64-bit, then the numeric type associated with all Input variables of the corresponding Location in the Vertex Execution Model OpEntryPoint must be the same as VkVertexInputAttributeDescription2EXT::format (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-Input-08734)
and Validation Error: [ VUID-vkCmdDraw-None-04008 ] Object 0: handle = 0x2193c684f10, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xdcc8fd0000000012, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0x255241c3 | vkCmdDraw(): Vertex binding 1 is VK_NULL_HANDLE. (Most likely you forgot to call vkCmdBindVertexBuffers). The Vulkan spec states: If the nullDescriptor feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must not be VK_NULL_HANDLE (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-None-04008).
Also note that this error started appearing when updating from SDK 1.3.290 to 1.3.296, the test above was not causing any validation error on SDK 1.3.290.
The text was updated successfully, but these errors were encountered:
The function PostCallRecordCmdSetVertexInputEXT does not invalidate vertex bindings which were not replaced.
This means that when calling CmdSetVertexInputEXT with 3 bindings, then again with only one binding, the last 2 bindings of the first call are still considered as active by the validation layer.
This causes in turn many false positive when binding vertex buffers and drawing. The following test shows two of them:
This code should output no validation error. However, it outputs the following 2:
Validation Error: [ VUID-vkCmdDraw-Input-08734 ] Object 0: handle = 0xcfef35000000000a, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x267f4248 | vkCmdDraw(): vkCmdSetVertexInputEXT set pVertexAttributeDescriptions[1] (binding 1, location 0) with format VK_FORMAT_R32_SINT but the vertex shader input is numeric type float32. The Vulkan spec states: If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and either legacyVertexAttributes is not enabled or the SPIR-V Type associated with a given Input variable of the corresponding Location in the Vertex Execution Model OpEntryPoint is 64-bit, then the numeric type associated with all Input variables of the corresponding Location in the Vertex Execution Model OpEntryPoint must be the same as VkVertexInputAttributeDescription2EXT::format (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-Input-08734)
and
Validation Error: [ VUID-vkCmdDraw-None-04008 ] Object 0: handle = 0x2193c684f10, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xdcc8fd0000000012, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0x255241c3 | vkCmdDraw(): Vertex binding 1 is VK_NULL_HANDLE. (Most likely you forgot to call vkCmdBindVertexBuffers). The Vulkan spec states: If the nullDescriptor feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must not be VK_NULL_HANDLE (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-None-04008)
.Also note that this error started appearing when updating from SDK 1.3.290 to 1.3.296, the test above was not causing any validation error on SDK 1.3.290.
The text was updated successfully, but these errors were encountered: