From: "\"Ian Romanick\"" <i...@freedesktop.org> From: Ian Romanick <ian.d.roman...@intel.com>
Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> --- src/compiler/glsl/ast_to_hir.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 5f751a4..e8bfef7 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -6773,8 +6773,7 @@ ast_case_label::hir(exec_list *instructions, } body.emit(assign(fallthru_var, - body.constant(true), - equal(label, deref_test_var))); + logic_or(fallthru_var, equal(label, deref_test_var)))); } else { /* default case */ if (state->switch_state.previous_default) { YYLTYPE loc = this->get_location(); @@ -6787,8 +6786,9 @@ ast_case_label::hir(exec_list *instructions, state->switch_state.previous_default = this; /* Set fallthru condition on 'run_default' bool. */ - body.emit(assign(fallthru_var, body.constant(true), - state->switch_state.run_default)); + body.emit(assign(fallthru_var, + logic_or(fallthru_var, + state->switch_state.run_default))); } /* Case statements do not have r-values. */ -- 2.9.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev