summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_to_nir.c
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-05-08 16:22:45 -0400
committerJonathan Marek <[email protected]>2019-05-31 21:35:26 +0000
commit6016df211fdd6f1846255ea55d272e1f36881357 (patch)
tree1086ed217fb417828b6770e0900d0af108e7de41 /src/mesa/program/prog_to_nir.c
parent32131a95680b5cb990e59b2512894a46bc7b0431 (diff)
nir: improvements to native_integers removal
Improvements related to the patch that removed native_integers: * In glsl_to_nir, special cases for i2f,u2f,etc are no longer needed * In prog_to_nir, use sge/slt and let lower_scmp lower it if needed Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/program/prog_to_nir.c')
-rw-r--r--src/mesa/program/prog_to_nir.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 269724e13b4..a5ac37af908 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -388,22 +388,16 @@ ptn_scs(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
ptn_move_dest_masked(b, dest, nir_imm_float(b, 1.0), WRITEMASK_W);
}
-/**
- * Emit SLT. For platforms with integers, prefer b2f(flt(...)).
- */
static void
ptn_slt(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- ptn_move_dest(b, dest, nir_b2f32(b, nir_flt(b, src[0], src[1])));
+ ptn_move_dest(b, dest, nir_slt(b, src[0], src[1]));
}
-/**
- * Emit SGE. For platforms with integers, prefer b2f(fge(...)).
- */
static void
ptn_sge(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- ptn_move_dest(b, dest, nir_b2f32(b, nir_fge(b, src[0], src[1])));
+ ptn_move_dest(b, dest, nir_sge(b, src[0], src[1]));
}
static void