From a1e97828c89278770cb249039ec92d959440c640 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 9 Jan 2012 16:34:28 +0100 Subject: xwininfo libX11 mesa mkfontscale xkeyboard-config git update 9 jan 2011 --- mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp') diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 73d956ea1..3b8e2fe37 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1402,8 +1402,7 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) } break; case ir_unop_neg: - assert(result_dst.type == GLSL_TYPE_FLOAT || result_dst.type == GLSL_TYPE_INT); - if (result_dst.type == GLSL_TYPE_INT) + if (result_dst.type == GLSL_TYPE_INT || result_dst.type == GLSL_TYPE_UINT) emit(ir, TGSI_OPCODE_INEG, result_dst, op[0]); else { op[0].negate = ~op[0].negate; @@ -1411,8 +1410,10 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) } break; case ir_unop_abs: - assert(result_dst.type == GLSL_TYPE_FLOAT); - emit(ir, TGSI_OPCODE_ABS, result_dst, op[0]); + if (result_dst.type == GLSL_TYPE_INT || result_dst.type == GLSL_TYPE_UINT) + emit(ir, TGSI_OPCODE_IABS, result_dst, op[0]); + else + emit(ir, TGSI_OPCODE_ABS, result_dst, op[0]); break; case ir_unop_sign: emit(ir, TGSI_OPCODE_SSG, result_dst, op[0]); @@ -2375,7 +2376,7 @@ glsl_to_tgsi_visitor::visit(ir_constant *ir) gl_type = native_integers ? GL_BOOL : GL_FLOAT; for (i = 0; i < ir->type->vector_elements; i++) { if (native_integers) - values[i].b = ir->value.b[i]; + values[i].u = ir->value.b[i] ? ~0 : 0; else values[i].f = ir->value.b[i]; } -- cgit v1.2.3