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

wgpu: Do not use 'packed' as variable name in WGSL shaders #16805

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented Jun 21, 2024

Fixes #12844, fixes #16642.

Turns out that 'packed' is a keyword in some GLSL shaders, and naga currently preserves it, producing a syntax error.

As a workaround, this patch renames the variable to something else.

@kjarosh kjarosh added the render-wgpu Issues relating to the wgpu renderer label Jun 21, 2024
@Dinnerbone
Copy link
Contributor

This should be something that naga deals with, we should raise an issue there too.
A workaround is good for now though!

@Lord-McSweeney
Copy link
Collaborator

This fixes #12844 for me

@kjarosh
Copy link
Member Author

kjarosh commented Jun 21, 2024

Raised an issue about that: gfx-rs/wgpu#5853

@torokati44 torokati44 force-pushed the wgsl-packed-keyword branch from c8cce84 to 75f2bf1 Compare June 22, 2024 21:59
Turns out that 'packed' is a keyword in some GLSL shaders,
and naga currently preserves it, producing a syntax error.

As a workaround, this patch renames the variable to something else.
@kjarosh kjarosh force-pushed the wgsl-packed-keyword branch from 75f2bf1 to a801bd4 Compare June 23, 2024 07:39
@kjarosh kjarosh enabled auto-merge (rebase) June 23, 2024 07:46
@kjarosh kjarosh merged commit 83ed478 into ruffle-rs:master Jun 23, 2024
17 checks passed
@kjarosh kjarosh deleted the wgsl-packed-keyword branch June 23, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
render-wgpu Issues relating to the wgpu renderer
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Crash on Aquanaut.swf Crash on castaway-2-11261.swf
4 participants