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

[spirv-out] Fix adding illegal decorators on fragment outputs. #2286

Merged
merged 4 commits into from
Mar 20, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Mar 19, 2023

Furthermore, fix allowing to add Centroid and Sample decorator to vertex inputs.
Fixes #2270

Testing:

Verified this against the scenario in #2270 on a Windows machine and ran existing tests. I expected interpolate.wgsl to produce a different spirv because of my change on Centroid and Sample, but it seems those are already suppressed elsewhere as well (?).
Added test to verify how fragment outputs are passed out depending on type.

Furthermore, fix allowing to add `Centroid` and `Sample` decorator to vertex inputs.
Fixes gfx-rs#2270
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2023

Codecov Report

Merging #2286 (2d97151) into master (6db8da7) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #2286      +/-   ##
==========================================
- Coverage   81.96%   81.96%   -0.01%     
==========================================
  Files          80       80              
  Lines       43305    43302       -3     
==========================================
- Hits        35496    35493       -3     
  Misses       7809     7809              
Impacted Files Coverage Δ
src/back/spv/writer.rs 96.69% <100.00%> (-0.01%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@teoxoy
Copy link
Member

teoxoy commented Mar 20, 2023

I expected interpolate.wgsl to produce a different spirv because of my change on Centroid and Sample, but it seems those are already suppressed elsewhere as well (?).

The struct in the file is only used as an output for the vertex stage and input for the fragment stage; this PR should have no effect on the SPIR-V output.

@teoxoy teoxoy merged commit 67c081b into gfx-rs:master Mar 20, 2023
@Wumpf Wumpf deleted the spirv-fix-decorator-on-fragment-output branch March 20, 2023 12:43
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.

Outputting integral type from fragment shader causes Vulkan validation error
3 participants