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

WGSL: Assign to swizzle expression not allowed #5603

Open
aleino-nv opened this issue Nov 20, 2024 · 0 comments
Open

WGSL: Assign to swizzle expression not allowed #5603

aleino-nv opened this issue Nov 20, 2024 · 0 comments
Assignees
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case.

Comments

@aleino-nv
Copy link
Collaborator

aleino-nv commented Nov 20, 2024

Currently the WGSL emitter will generate code that assigns to a swizzle expression, which does not seem to be allowed.

Affected tests:

  • tests/language-feature/swizzles/matrix-swizzle-write-swizzle.slang
  • tests/language-feature/swizzles/matrix-swizzle-write-array.slang

Example output:

WGPU error: Error while parsing WGSL: :9:5 error: cannot assign to value of type 'vec2<f32>'
    m_0[i32(0)].xy = vec2<f32>(1.0f, 4.0f);
    ^^^^^^^^^^^^^^


 - While validating [ShaderModuleDescriptor]
 - While calling [Device].CreateShaderModule([ShaderModuleDescriptor]).
@bmillsNV bmillsNV added this to the Q4 2024 (Fall) milestone Nov 21, 2024
@bmillsNV bmillsNV added the goal:forward looking Feature needed at a later date, not connected to a specific use case. label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case.
Projects
None yet
Development

No branches or pull requests

2 participants