Created attachment 95847 [details] 0001-glsl-Fix-segfault-on-void-rightmost-sequence-express.patch I have some autogenerated geometry shader with sequence like ((dbgIter0 == 0 && (dbgResult = float(1.0), true)), EmitVertex()) It is wrong code generation on my side, but I found that glsl-compiler segfaults on this line. Problem in ast_to_hir.cpp (:1737 for current git) in ast_sequence expression type processing. Result of last operand is NULL due to void return type of EmitVertex. From the GLSL spec (p.107 of pdf of 4.40) sequence must return type and value of rightmost expression, so void-typed expressions must emit some error. I've attached patch with fix. I'm not sure about the way I chose, maybe compiler must do something different in that case.
We need a piglit test for this. I'll see if I can find someone to write it. I don't recall seeing this patch on the mesa-dev list, so it completely escaped my notice.
Good to hear it is not lost. Not sure why I did not sent it to mesa-dev. I can add test, but it will take some time. I'll do so if you have not done it before.
I tried to reproduce the segfault but failed would be good if you could provide an example or piglit test.
Could not reproduce this last time I tried and OP has not provided an example. There were a bunch of void fixes a while back so its possible this was fixed. Closing.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.