-
Notifications
You must be signed in to change notification settings - Fork 410
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
Could validate stageFlags for INPUT_ATTACHMENT? #54
Comments
Comment by tobine (MIGRATED) This is missing check VALIDATION_ERROR_04e00bcc. @toten note from spec that stageFlags can be 0 or *FRAGMENT_BIT:
Not sure what your stageFlags was, but if it was 0, the new validation check won't catch that case. |
Comment by chrisforbes (MIGRATED) @tobine can we justify emitting a warning for stageFlags=0? We already have the option of descriptorCount=0 for making unusable placeholder bindings. |
Comment by tobine (MIGRATED) Well, if @toten had stageFlags=0, then I'd say the fact that the warning would have been a help in that case justifies it. At least until/unless someone else complains about the warning with a reasonable use case that requires stageFlags=0. I can't think of a good case offhand as the descriptorCount=0 option is already there as you said for unusable bindings. |
Comment by toten (MIGRATED) I used the api-dump layer (also debug) and could confirm the stageFlags was 0. The input-attachment loading returns black color when stageFlags was 0. When I explicitly set to VK_SHADER_STAGE_FRAGMENT_BIT, input-attachment loading works as expected. BTW, the api-dump layer returns: Thanks all the help! |
Triage notes: This can't be done at bindtime, but could be added to the validation of the subpass attachments at CmdBeginRenderPass time. |
Moving this warning issue to best practices tracking issue, #24. |
Issue by toten (MIGRATED)
Friday Nov 03, 2017 at 07:03 GMT
Originally opened as KhronosGroup/Vulkan-LoaderAndValidationLayers#2178
My case is:
When creating VkDescriptorSetLayoutBinding structure, the descriptorType is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; from the spec, the stageFlags must be VK_SHADER_STAGE_FRAGMENT_BIT. However I forgot setting the stageFlags (partially due to the code is originally copied from others), so the input_attachment reading in fragment shader returns black. It took me one or two hours to finally figure out where the problem is.
Just curious if the core-validation layer or parameter-validation layer could check this, and help to locate the problem quickly.
Thanks a lot.
The text was updated successfully, but these errors were encountered: