diff options
author | Jason Ekstrand <[email protected]> | 2019-08-20 22:32:50 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-08-21 17:19:55 +0000 |
commit | 951cf94521a710fa2fa70329ff77934ada45bb70 (patch) | |
tree | 74d0fcacd97622c07e01cde688451438344f2b78 /src/compiler/nir/nir.c | |
parent | fc69a5cf73cf3285bcc41a8a6b2a0950ea2e96d1 (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/compiler/nir/nir.c')
-rw-r--r-- | src/compiler/nir/nir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 6547a295852..1cec8171a7f 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -2185,8 +2185,10 @@ nir_rewrite_image_intrinsic(nir_intrinsic_instr *intrin, nir_ssa_def *src, CASE(load) CASE(store) CASE(atomic_add) - CASE(atomic_min) - CASE(atomic_max) + CASE(atomic_imin) + CASE(atomic_umin) + CASE(atomic_imax) + CASE(atomic_umax) CASE(atomic_and) CASE(atomic_or) CASE(atomic_xor) |