summaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_a4xx.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-08-20 22:32:50 -0500
committerJason Ekstrand <[email protected]>2019-08-21 17:19:55 +0000
commit951cf94521a710fa2fa70329ff77934ada45bb70 (patch)
tree74d0fcacd97622c07e01cde688451438344f2b78 /src/freedreno/ir3/ir3_a4xx.c
parentfc69a5cf73cf3285bcc41a8a6b2a0950ea2e96d1 (diff)
nir: Add explicit signs to image min/max intrinsics
This better matches all the other atomic intrinsics such as those for SSBOs and shared variables where the sign is part of the intrinsic opcode. Both generators (GLSL and SPIR-V) know the sign from the type of the image variable or handle. In SPIR-V, signed min/max are separate opcodes from unsigned. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_a4xx.c')
-rw-r--r--src/freedreno/ir3/ir3_a4xx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_a4xx.c b/src/freedreno/ir3/ir3_a4xx.c
index 30e452540bf..e1d188652b8 100644
--- a/src/freedreno/ir3/ir3_a4xx.c
+++ b/src/freedreno/ir3/ir3_a4xx.c
@@ -317,10 +317,12 @@ emit_intrinsic_atomic_image(struct ir3_context *ctx, nir_intrinsic_instr *intr)
case nir_intrinsic_image_deref_atomic_add:
atomic = ir3_ATOMIC_ADD_G(b, image, 0, src0, 0, src1, 0, src2, 0);
break;
- case nir_intrinsic_image_deref_atomic_min:
+ case nir_intrinsic_image_deref_atomic_imin:
+ case nir_intrinsic_image_deref_atomic_umin:
atomic = ir3_ATOMIC_MIN_G(b, image, 0, src0, 0, src1, 0, src2, 0);
break;
- case nir_intrinsic_image_deref_atomic_max:
+ case nir_intrinsic_image_deref_atomic_imax:
+ case nir_intrinsic_image_deref_atomic_umax:
atomic = ir3_ATOMIC_MAX_G(b, image, 0, src0, 0, src1, 0, src2, 0);
break;
case nir_intrinsic_image_deref_atomic_and: