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

Reject @location in non-entry-point function argments #2037

Closed
nical opened this issue Aug 31, 2022 · 0 comments · Fixed by #2050
Closed

Reject @location in non-entry-point function argments #2037

nical opened this issue Aug 31, 2022 · 0 comments · Fixed by #2050

Comments

@nical
Copy link
Contributor

nical commented Aug 31, 2022

Naga currently accepts:

// Not an entry point, but takes an argument with a location.
fn foo(@location(1) bar: vec3<u32>) -> vec3<u32> {
    return bar;
}

@vertex
fn vs_main(
    @location(0) position: vec2<i32>,
) -> @builtin(position) vec4<f32> {
    var v = foo();

    // ...
}

However https://gpuweb.github.io/gpuweb/wgsl/#attribute-location says: "Must only be applied to an entry point function parameter, entry point return type, or member of a structure type."

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 a pull request may close this issue.

1 participant