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

Support Flat decoration on shader Input/Outputs #314

Closed
fu5ha opened this issue Dec 4, 2020 · 1 comment · Fixed by #317
Closed

Support Flat decoration on shader Input/Outputs #314

fu5ha opened this issue Dec 4, 2020 · 1 comment · Fixed by #317
Labels
c: rustc_codegen_spirv Issues specific to the rustc_codegen_spirv crate. t: enhancement A new feature or improvement to an existing one.

Comments

@fu5ha
Copy link
Member

fu5ha commented Dec 4, 2020

Ideally, we want to be able to do something like

fn main_vs(
    #[spirv(flat) mut some_output: Output<Blah>
)

fn main_fs(
    #[spirv(flat) some_input: Input<Blah>
)

which would apply the Flat decoration and therefore disable interpolation.

@fu5ha fu5ha added t: enhancement A new feature or improvement to an existing one. c: rustc_codegen_spirv Issues specific to the rustc_codegen_spirv crate. labels Dec 4, 2020
@fu5ha fu5ha mentioned this issue Dec 4, 2020
4 tasks
@khyperia
Copy link
Contributor

khyperia commented Dec 4, 2020

While I'm implementing this, is there any other decorations that we want to support?

The spir-v spec list is here https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#Decoration

Decorations that can be applied to input/outputs are: NoPerspective, Flat, Patch, Centroid, Sample, Component. Those don't look toooo useful/relevant right now, and can probably wait until the binding RFC to be implemented - only NoPerspective seems like something we might potentially use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: rustc_codegen_spirv Issues specific to the rustc_codegen_spirv crate. t: enhancement A new feature or improvement to an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants