mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
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 <imirkin@alum.mit.edu>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 2b5355c8ab)
This commit is contained in:
parent
097e70202b
commit
1353ba5397
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue