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

False positive on using multiple references to the same attachment #578

Closed
asuonpaa opened this issue Jan 11, 2019 · 5 comments
Closed

False positive on using multiple references to the same attachment #578

asuonpaa opened this issue Jan 11, 2019 · 5 comments
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@asuonpaa
Copy link
Contributor

While developing a test for descriptor copies I found validation layers giving the following error:

vkCreateRenderPass(): subpass 0 already uses attachment 1 as a input attachment.

I'm having multiple input attachment descriptors and some are copied over in vkUpdateDescriptorSets. The result is that several bindings refer to the same attachment. The input attachment indices are also updated based on the copies, and the result is a list of VkAttachmentReferences where the same attachment is referenced more than once. An that's allowed as long as the layout is the same for all. Here's a quote from the spec:

If any attachment is used by more than one VkAttachmentReference member, then each use must use the same layout

@jzulauf-lunarg jzulauf-lunarg added Bug Something isn't working triaged labels Jan 11, 2019
@jzulauf-lunarg
Copy link
Contributor

Triage notes: This is a bug in AddAttachmentUse ... needs to track the layout of the usage and, if differing, emit VUID-VkSubpassDescription-layout-02519. Care should be taken to assure that this policy is valid for all callers of AddAttachmentUse, and if not controlled for.

Other logic in AddAttachmentUse should be reviewed to assure no additional false positives are embedded.

@asuonpaa
Copy link
Contributor Author

I can try contributing to this task. Is there a way to assign this to me?

@asuonpaa
Copy link
Contributor Author

Is it ok to return a warning instead of an error if there are several references to the same attachment? In most cases, it's not what was intended, and a warning could be useful.

@mark-lunarg
Copy link
Contributor

@asuonpaa -- happily assigned! As to a warning, If it is called out in the specification it is valid. Otherwise, the preferred place to implement warnings is in the Assistant Layer -- items can be added to the to-do list tracked in issue #24.

@jzulauf-lunarg
Copy link
Contributor

Resolved.

@shannon-lunarg shannon-lunarg added this to the sdk-1.1.temp.0 milestone Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants