Open kryptoid256 opened 1 week ago
Could you attach a shader file that reproduces this issue?
On Sun, Sep 15, 2024, 07:22 kryptoid256 @.***> wrote:
— Reply to this email directly, view it on GitHub https://github.com/KhronosGroup/glslang/issues/3728, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5I72B5OADZ55TLJN5WCR2DZWWCYTAVCNFSM6AAAAABOH2GRKWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZDMOJRGI3DANA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I think I fixed it. The shader I had had conflicting set binding layouts.
#version 450 layout(location=0) out vec4 FragColor; layout(location=0) in vec3 dir; layout(set=0,binding=0) uniform sampler cubeSampler; layout(set=0,binding=0)uniform textureCube skybox; void main(){ FragColor=texture(samplerCube(skybox,cubeSampler),dir); }
I think it was something like this.
It still shouldn't crash and should print some kind of useful message if that is the case.
Yeah, well it crashed right at that line. No next op found. Oddly it had no problem parsing the shader or compiling the program. Only it crashed when translating to SPIRV.
I forgot to mention. TBuiltInResource was all zeroes. I didn't know how to initialize it back then.
So is this library supposed to be used by an OpenGL implementation?
IT CRASHED AGAIN. I will test it when I have the time.
Hey I have to say I have high school studies and stuff. Maybe I should just post the code for someone else to test? Maybe a docker? I don't know how to use that yet. It was mostly for playing around, but I did not expect to encounter a crash. Maybe if my code is bad.
Yes, you should post your code, ideally at least the shader that you are trying to compile that causes glslang to crash and if you're using glslang as a library by calling it from your program, then you should share the code you are using to call glslang. If you're using glslang from the command line, just post the command line.
I'm compressing it. You can change whatever code to fit your machine.
Nevermind. Get I'll have to post it on github
Forget it. I can't do that either.
https://github.com/KhronosGroup/glslang/blame/02bc074ac4ad5f6927f75712476b0cd7d9bbd3f7/SPIRV/GlslangToSpv.cpp#L2887