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
GL_VERTEX_ATTRIBUTE_NOT_FOUND_IN_SHADER: vertex attribute not found in shader (gl) #940
Comments
That's indeed weird. The info you posted looks good as far as I can see. Also, what GPU and driver version do you have?
This is also crazy... I had some problems in the past with glslangValidator and or SPIRVCross to strip unused attributes, but I haven't seen this sort of behaviour from GL drivers so far. If it turns out that GL drivers are allowed to remove "unused" attributes then I guess the sokol_gfx.h GL backend needs to be a bit more flexible (I'm not sure if it is already enough to just turn the error into a warning, theoretically the vertex attribute should then be disabled, and skipped in _sg_gl_apply_bindings(), might be worth a try though) Lines 8876 to 8923 in 5b6b743
|
I'll just add that despite this attribute being apparently optimised out my code still runs fine. If a whole line of a matrix was gone it would surely produce a bogus transformation matrix. RenderDoc's Mesh View shows the attribute is gone: |
Oh and my driver is
|
I have this shader
which sokol-shdc turns into this
Clearly the attribute 'amodel3_lmao' is used. I create a pipeline for this shader like this:
Desprite that I get this error when this pipeline is created:
EDIT: After some looking around I guess this is not sokol specific issue, but an OpenGL issue. Still if you have any tips for this that would be appreciated. amodel3 is clearly used for creating the mat4 so how can it be optimised ? If i use it for some other random calculation (for example uv *= amodel3.xz) then it stays.
The text was updated successfully, but these errors were encountered: