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

Fix validation of SPIR-V contains OpUndef #1851

Merged
merged 2 commits into from
Feb 27, 2022
Merged

Fix validation of SPIR-V contains OpUndef #1851

merged 2 commits into from
Feb 27, 2022

Conversation

White-Green
Copy link
Contributor

This PR makes OpUndef the same group as OpTypeXXX and OpConstantXXX while validation of SPIR-V.

The basis for the change is the following text from the SPIR-V specification.

  1. All type declarations (OpTypeXXX instructions), all constant instructions, and all global variable declarations (all OpVariable instructions whose Storage Class is not Function). This is the preferred location for OpUndef instructions, though they can also appear in function bodies.

This PR will allow the following SPIR-V to pass validation.

%67 = OpConstant %34 0.333333343
%68 = OpConstantTrue %46
%69 = OpUndef %27
%70 = OpUndef %34
%71 = OpConstantComposite %35 %55 %55
%72 = OpConstantComposite %35 %54 %55

(disassembled by spirv-dis)

changelog:

- validate SPIR-V code containing OpUndef correctly.

@Rua
Copy link
Contributor

Rua commented Feb 27, 2022

Thanks for spotting that one!

@Rua Rua merged commit ed2de40 into vulkano-rs:master Feb 27, 2022
Rua added a commit that referenced this pull request Feb 27, 2022
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.

2 participants