From: Dave Airlie <airl...@redhat.com> Signed-off-by: Dave Airlie <airl...@redhat.com> --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 3b8e2fe..460bc04 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1416,7 +1416,10 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) emit(ir, TGSI_OPCODE_ABS, result_dst, op[0]); break; case ir_unop_sign: - emit(ir, TGSI_OPCODE_SSG, result_dst, op[0]); + if (result_dst.type == GLSL_TYPE_INT || result_dst.type == GLSL_TYPE_UINT) + emit(ir, TGSI_OPCODE_ISSG, result_dst, op[0]); + else + emit(ir, TGSI_OPCODE_SSG, result_dst, op[0]); break; case ir_unop_rcp: emit_scalar(ir, TGSI_OPCODE_RCP, result_dst, op[0]); -- 1.7.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev