diff --git a/.pick_status.json b/.pick_status.json index dd455a995e1..5f2b882dbdf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -337,7 +337,7 @@ "description": "glsl: fix variable scope for instructions inside case statements", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "665d75cc5a23f8024034d0c4176fb281f94a30e9" }, diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 370f6934bd4..cb9dd0dbd99 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -6830,8 +6830,11 @@ ir_rvalue * ast_switch_body::hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) { - if (stmts != NULL) + if (stmts != NULL) { + state->symbols->push_scope(); stmts->hir(instructions, state); + state->symbols->pop_scope(); + } /* Switch bodies do not have r-values. */ return NULL;