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

[glsl-in] UnknownType when using sampler as function parameter #5256

Open
Vipitis opened this issue Feb 15, 2024 · 0 comments
Open

[glsl-in] UnknownType when using sampler as function parameter #5256

Vipitis opened this issue Feb 15, 2024 · 0 comments
Labels
area: naga front-end help required We need community help to make this happen. lang: GLSL OpenGL Shading Language naga Shader Translator type: enhancement New feature or request

Comments

@Vipitis
Copy link

Vipitis commented Feb 15, 2024

Description
According to the spec, samplers can be function parameters.

Repro steps
The minimal example can be found directly in the documentation:

void Function(in sampler2D myTexture);

Gives you error: Unknown type: sampler2D

If you omit the in qualifier you get a more confusing error.

void Function2(sampler2D myTexture);

error: Expected RightParen, found Identifier("sampler2D")

Platform
wgpu 0.19.1 via wgpu-native 0.19.1.1 via wgpu-py 0.14.1 via wgpu-shadertoy
Couldn't find any related issues...

@teoxoy teoxoy added type: enhancement New feature or request naga Shader Translator area: naga front-end lang: GLSL OpenGL Shading Language labels Feb 27, 2024
@cwfitzgerald cwfitzgerald added the help required We need community help to make this happen. label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga front-end help required We need community help to make this happen. lang: GLSL OpenGL Shading Language naga Shader Translator type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants