diff options
author | Timur Kristóf <[email protected]> | 2019-02-14 00:45:47 +0200 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-03-05 19:13:27 +0000 |
commit | fa076acbc097b9251044f7419760b1d4be56992c (patch) | |
tree | 5ed46f1de77331d128e232be9d8b7b047efdd623 /src/gallium | |
parent | 28be7b33b959da0eccf8a24b72a441471b7df5f7 (diff) |
tgsi_to_nir: Fix TGSI LIT translation by using flt.
TGSI spec says LIT needs a "greater than" comparison. NIR doesn't have that,
so let's use "less than" and swap the arguments. Previously "greater than or equal"
was used by tgsi_to_nir which is incorrect.
Signed-off-by: Timur Kristóf <[email protected]>
Tested-by: Andre Heider <[email protected]>
Tested-by: Rob Clark <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/nir/tgsi_to_nir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index b35950289b9..545051e84ff 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -858,9 +858,9 @@ ttn_lit(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src) ttn_move_dest_masked(b, dest, nir_bcsel(b, - nir_fge(b, - nir_imm_float(b, 0.0), - ttn_channel(b, src[0], X)), + nir_flt(b, + ttn_channel(b, src[0], X), + nir_imm_float(b, 0.0)), nir_imm_float(b, 0.0), pow), TGSI_WRITEMASK_Z); |