Skip to content

glsl: stop cascading errors if process_parameters() fails

Timothy Arceri requested to merge tarceri/mesa:less_errors into master

Generally we do not completely stop compilation as soon as we see an error, instead we continue on to attemp to find any futher errors.

This means we shouldn't be checking state->error to see if any error has happened during the compilation process, doing so was causing process_parameters() to fail on completely valid functions if there was any error found in the shader previously. This then caused the valid functions not to be found because the paramlist was considered empty, resulting in the compiler spewing out misleading error messages.

Here we simply add the IR error value to the param list when we have an issue with processing a parameter, this leads to much better error messaging.

Fixes: 53e4159e ("glsl: stop processing function parameters if error happened")

Merge request reports