Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in input attachment validation #2243

Closed
ShabbyX opened this issue Oct 19, 2020 · 6 comments
Closed

Bug in input attachment validation #2243

ShabbyX opened this issue Oct 19, 2020 · 6 comments
Assignees

Comments

@ShabbyX
Copy link
Contributor

ShabbyX commented Oct 19, 2020

A recent roll into ANGLE is exposing a VVL bug that says:

[ VUID-vkCmdDraw-None-02686 ] Validation Error: [ VUID-vkCmdDraw-None-02686 ] Object 0: handle = 0x555ebb092460, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x6a000000006a, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x242cb6b8 | vkCmdDraw(): Fragment Shader's input attachment index #0 doesn't exist or VK_ATTACHMENT_UNUSED in VkRenderPass 0x6a000000006a[], subpass #0. The Vulkan spec states: Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdDraw-None-02686)

To repro, apply this change to ANGLE, build and run:

$ ./angle_end2end_tests --gtest_filter=MultisampledRenderToTextureTest.2DColorAttachmentMultisampleDrawTest/ES3_Vulkan

In the above test, there's a single color attachment / resolve attachment pair. In the second render pass, there are two subpasses. The first of the two subpasses uses the resolve attachment as input attachment and renders into the color attachment. Subpass' pInputAttachments is not VK_ATTACHMENT_UNUSED, and the draw call binds the input attachment at set 0 binding 0 correctly. I verified these with RenderDoc.

@snowman791
Copy link

I have a similar problem:

Validation Error: [ VUID-vkCmdDraw-None-02686 ] Object 0: handle = 0x26956baba10, name = CommandBuffer: 0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x9c93ec00000001c2, name = Render Pass: result, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x242cb6b8 | vkCmdDraw(): VkRenderPass 0x9c93ec00000001c2[Render Pass: result], subpass #0, input attachment #1 is not used in fragment shader. Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set

in the fragment shader the input is defined as array if subpassInputs, and not separated:

layout (input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput inputColor[3];

@jonahryandavis
Copy link
Contributor

This issue is still happening even with the above fix.
Examples documented here: https://bugs.chromium.org/p/angleproject/issues/detail?id=5228

@ShabbyX
Copy link
Contributor Author

ShabbyX commented Oct 26, 2020

Wrong bug Jonah! This comment should have been on #2148.

@locke-lunarg
Copy link
Contributor

@jonahryandavis @ShabbyX

I'm confused. Why is the error message is VkNonDispatchableHandle? It should have been VkPipelineLayout.

@ShabbyX
Copy link
Contributor Author

ShabbyX commented Oct 26, 2020

@locke-lunarg it may be a false alarm. I had a change that fixes a pipeline-binding bug which was probably the cause of this validation error.

@ShabbyX
Copy link
Contributor Author

ShabbyX commented Oct 27, 2020

@locke-lunarg Confirmed that the warning was actually due to an ANGLE bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants