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

SPV: Do not decorate struct members with location or nested members with interpolation qualifiers #269

Merged
merged 1 commit into from May 17, 2016

Conversation

ghost
Copy link

@ghost ghost commented May 6, 2016

This fixes some vulkanCTS tests that use struct arrays as a member of in/out interface blocks.

From Vulkan spec:

If it is a not a Block, then the structure type must have a Location decoration. Its members are assigned consecutive locations in their declaration order, with the first member assigned to the location specified for the structure type. The members, and their nested types, must not themselves have Location decorations

From SPIR-V spec:

When applied to structure-type members, the Decorations Noperspective, Flat, Patch, Centroid, and Sample can only be applied to the top-level members of the structure type. (Nested objects' types cannot be structures whose members are decorated with these decorations.)

…op level members with interp.

This fixes some vulkanCTS tests that use struct arrays as a member of in/out interface blocks.

From Vulkan spec:
"If it is a not a Block, then the structure type must have a Location decoration. Its members are assigned consecutive locations in their declaration order, with the first member assigned to the location specified for the structure type. >>>>> The members, and their nested types, must not themselves have Location decorations <<<<"

From SPIR-V spec:
"When applied to structure-type members, the Decorations Noperspective, Flat, Patch, Centroid, and Sample can only be applied to the top-level members of the structure type. (Nested objects' types cannot be structures whose members are decorated with these decorations.)"
@johnkslang
Copy link
Member

This has the potential of impacting any drivers that are accidentally relying on complete location information.

Please investigate. Will leave pending for a couple days for this reason.

@johnkslang johnkslang changed the title SPIR-V do not decorate: members of plain structs with location; non-top level members with interp. SPV: Do not decorate struct members with location or nested members with interpolation qualifiers May 6, 2016
@yavn
Copy link

yavn commented May 9, 2016

Hi, this change looks good to me. Testing on my system I saw no difference in behavior (i.e. no driver problem surfaced). This also solves the problem with Location on arrayed members, as locations are now implicit.

I do have other concern though, but maybe let's discuss it in original issue.

@johnkslang johnkslang merged commit 8add151 into KhronosGroup:master May 17, 2016
qingyuanzNV pushed a commit to qingyuanzNV/glslang that referenced this pull request Oct 18, 2022
…nstructions

Implement SPV_KHR_uniform_group_instructions extension
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

Successfully merging this pull request may close these issues.

None yet

3 participants