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

Naga-oil broke the ui-pipeline for WebGPU #9171

Closed
ameknite opened this issue Jul 16, 2023 · 1 comment
Closed

Naga-oil broke the ui-pipeline for WebGPU #9171

ameknite opened this issue Jul 16, 2023 · 1 comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled

Comments

@ameknite
Copy link
Contributor

Bevy version

main ede5848

Relevant system information

cargo 1.73.0-nightly (694a57956 2023-07-11)

SystemInfo { os: "MacOS 13.4.1 ", kernel: "22.5.0", cpu: "Apple M1", core_count: "8", memory: "8.0 GiB" }

AdapterInfo { name: "", vendor: 0, device: 0, device_type: Other, driver: "", driver_info: "", backend: BrowserWebGpu }

What went wrong

WebGPU is broken when I tried to run an example with UI, it only shows a black screen.

It works fine before #5703 so I think it has to do with naga-oil or naga don't detecting the interpolate(flat) attribute

Additional information

Errors

1 error(s) generated while compiling the shader:
:25:18 error: integral user-defined vertex outputs must have a flat interpolation attribute
    @location(3) mode: u32,
                 ^^^^

:39:1 note: while analyzing entry point 'vertex'
fn vertex(@location(0) vertex_position: vec3<f32>, @location(1) vertex_uv: vec2<f32>, @location(2) vertex_color: vec4<f32>, @location(3) mode: u32) -> VertexOutput {
^^
[Invalid ShaderModule] is invalid.
 - While validating vertex stage ([Invalid ShaderModule], entryPoint: vertex).
 - While validating vertex state.
 - While calling [Device].CreateRenderPipeline([RenderPipelineDescriptor "ui_pipeline"]).
@ameknite ameknite added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jul 16, 2023
@ameknite
Copy link
Contributor Author

Don't worry, I checked again in a new repository and it works fine.

It was a problem with my Cargo.lock keeping an old version of naga.
I forgot that cargo clean only removes the target directory and not Cargo.lock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled
Projects
None yet
Development

No branches or pull requests

1 participant