diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 05082eed719..1245c8a7667 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -2209,7 +2209,9 @@ fs_visitor::visit(ir_constant *ir) emit(MOV(dst_reg, fs_reg(ir->value.i[i]))); break; case GLSL_TYPE_BOOL: - emit(MOV(dst_reg, fs_reg((int)ir->value.b[i]))); + emit(MOV(dst_reg, + fs_reg(ir->value.b[i] != 0 ? ctx->Const.UniformBooleanTrue + : 0))); break; default: unreachable("Non-float/uint/int/bool constant"); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index f22d38d71ee..cb9a1b1b68f 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -2231,7 +2231,9 @@ vec4_visitor::emit_constant_values(dst_reg *dst, ir_constant *ir) emit(MOV(*dst, src_reg(ir->value.u[i]))); break; case GLSL_TYPE_BOOL: - emit(MOV(*dst, src_reg(ir->value.b[i]))); + emit(MOV(*dst, + src_reg(ir->value.b[i] != 0 ? ctx->Const.UniformBooleanTrue + : 0))); break; default: unreachable("Non-float/uint/int/bool constant"); |