To help debugging shader compilation errors, print the shader source the way it was given to the GLSL compiler and with line numbers that match the compiler error messages. This is necessary because some snippets are added at runtime to the beginning, the source is not only what is in the respective .glsl file. I did look into using #line directives, but you cannot put source file names to it, only "source string numbers" which must be an integer expression. If we used #line, the reader would need to know that string number 0 is the version, string 1 is the config and string number 2 is fragment.glsl. I think that would have been too cumbersome. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>dev
parent
5d64e66e06
commit
5b86f366c7
Loading…
Reference in new issue