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

compile fragment shader fail. #2

Open
yukunxie opened this issue Dec 2, 2019 · 1 comment
Open

compile fragment shader fail. #2

yukunxie opened this issue Dec 2, 2019 · 1 comment

Comments

@yukunxie
Copy link

yukunxie commented Dec 2, 2019

The following code snippet comes from //github.com/austinEng/webgpu-samples.git, but when I compile it with glslang, it's failed with the error "Glslang.JS: Could not compile shader"

#version 450
layout(set = 0, binding = 1) uniform sampler mySampler;
layout(set = 0, binding = 2) uniform texture2D myTexture;

layout(location = 0) in vec2 fragUV;
layout(location = 1) in vec4 fragPosition;
layout(location = 0) out vec4 outColor;

void main() {
    outColor =  texture(sampler2D(myTexture, mySampler), fragUV) * fragPosition;
}
@AlexAltea
Copy link
Owner

AlexAltea commented Dec 2, 2019

Can you check if you can replicate that issue with the pinned Glslang version?
https://github.com/KhronosGroup/glslang/tree/c57b2a97fa808970a4809c53de605bbf103fce12

That is, checkout commit c57b2a97, build and test that snippet.

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

No branches or pull requests

2 participants