mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
glsl: dont crash when attempting to assign a value to a builtin define
For example GL_ARB_enhanced_layouts = 3; Fixes: GL44-CTS.enhanced_layouts.glsl_contant_immutablity Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
d98d6e6269
commit
87fb5aa3e7
1 changed files with 1 additions and 1 deletions
|
|
@ -822,7 +822,7 @@ validate_assignment(struct _mesa_glsl_parse_state *state,
|
|||
*/
|
||||
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) {
|
||||
if (var && var->data.mode == ir_var_shader_out && !var->data.patch) {
|
||||
ir_rvalue *index = find_innermost_array_index(lhs);
|
||||
ir_variable *index_var = index ? index->variable_referenced() : NULL;
|
||||
if (!index_var || strcmp(index_var->name, "gl_InvocationID") != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue