Open jellysquid3 opened 2 months ago
Does "shader compilation log" mean that the entire shader source should be printed into the log?
I think so, yes. I'm not sure where else we could put it, and the error diagnostics aren't useful without it. But it might also completely flood the log file...
If you're only concerned about making the gl errors make sense, we could capture those and re-map the source ids to import names with some effort.
We just want the errors to make sense. They don't, currently. If you think re-mapping the source ids would solve the problem, then I'm for it.
Right now, we don't add
#line
directives to the merged shader sources, which makes reading line numbers a lot harder. To make it easier to debug compilation errors, the following changes should be made:#version
and specialization constants) should be given a unique index.#line <line number> <source file index>
declarations should be added, and the original#include
macro should be commented out (for debugging purposes).