diff options
author | Ilia Mirkin <[email protected]> | 2015-05-06 23:29:33 -0400 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-05-20 22:05:58 +0100 |
commit | 1353ba53977e9a531fcadf3c04ad4c69c32c22c0 (patch) | |
tree | 03975921b5c4f328ae65ececa7af8c86c467a9bc /src | |
parent | 097e70202b6ae5b07303274c1d5087f94bd3cf06 (diff) |
st/mesa: make sure to create a "clean" bool when doing i2b
i2b has to work for all integers, not just 1. INEG would not necessarily
result with all bits set, which is something that other operations can
rely on by e.g. using AND (or INEG for b2i).
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Cc: [email protected]
(cherry picked from commit 2b5355c8ab383d86bb6332dd29c417a6a1bc52bd)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 |
1 files changed, 1 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 0d7145e457d..3a8639fafc4 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1832,7 +1832,7 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) break; case ir_unop_i2b: if (native_integers) - emit(ir, TGSI_OPCODE_INEG, result_dst, op[0]); + emit(ir, TGSI_OPCODE_USNE, result_dst, op[0], st_src_reg_for_int(0)); else emit(ir, TGSI_OPCODE_SNE, result_dst, op[0], st_src_reg_for_float(0.0)); break; |