It seems expected that both lhs and rhs could be of type error_type
in this code however the TCS case wasn't expecting it.
Fixes segfault in an enhanced layouts GL CTS test.
Reviewed-by: Dave Airlie <airlied@redhat.com>
* if the expression indicating the vertex number is not the identifier
* `gl_InvocationID`.
*/
- if (state->stage == MESA_SHADER_TESS_CTRL) {
+ if (state->stage == MESA_SHADER_TESS_CTRL && !lhs->type->is_error()) {
ir_variable *var = lhs->variable_referenced();
if (var->data.mode == ir_var_shader_out && !var->data.patch) {
ir_rvalue *index = find_innermost_array_index(lhs);