Iris Shaders

Iris Shaders

36M Downloads

Parse errors thrown by glsl-transformer should include program names

gri573 opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.
Since glsl-transformer is in iris, debugging shaders has become more difficult due to syntax errors being caught by glsl-transformer, which doesn't include program names in its error messages. this is annyoing when working on files that are included by multiple programs.
example error message:
[18:34:14] [Render thread/ERROR]: Failed to create shader rendering pipeline, disabling shaders! org.antlr.v4.runtime.misc.ParseCancellationException: line 1529:0 no viable alternative at input 'sldakfnge\nvec3'

Describe the solution you'd like
error messages thrown my glsl-transformer should contain the name of the program in which they occurred. the example error message shown above could be changed to something like

[18:34:14] [Render thread/ERROR]: Failed to create shader rendering pipeline, disabling shaders! org.antlr.v4.runtime.misc.ParseCancellationException: program "gbuffers_basic.fsh" line 1529:0 no viable alternative at input 'sldakfnge\nvec3'

Describe alternatives you've considered
I considered booting up optifine every time I get an error like that, but that's tedious

commented

Good idea, this would be useful.