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/broadcom | |
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/broadcom')
-rw-r--r-- | src/broadcom/compiler/nir_to_vir.c | 6 | ||||
-rw-r--r-- | src/broadcom/compiler/v3d40_tex.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index a8fb0335bfa..91e95f9ee5a 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -1980,8 +1980,10 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr) case nir_intrinsic_image_deref_load: case nir_intrinsic_image_deref_store: case nir_intrinsic_image_deref_atomic_add: - case nir_intrinsic_image_deref_atomic_min: - case nir_intrinsic_image_deref_atomic_max: + case nir_intrinsic_image_deref_atomic_imin: + case nir_intrinsic_image_deref_atomic_umin: + case nir_intrinsic_image_deref_atomic_imax: + case nir_intrinsic_image_deref_atomic_umax: case nir_intrinsic_image_deref_atomic_and: case nir_intrinsic_image_deref_atomic_or: case nir_intrinsic_image_deref_atomic_xor: diff --git a/src/broadcom/compiler/v3d40_tex.c b/src/broadcom/compiler/v3d40_tex.c index 30f1293c85c..9ee1692a77c 100644 --- a/src/broadcom/compiler/v3d40_tex.c +++ b/src/broadcom/compiler/v3d40_tex.c @@ -252,9 +252,11 @@ v3d40_image_load_store_tmu_op(nir_intrinsic_instr *instr) return V3D_TMU_OP_REGULAR; case nir_intrinsic_image_deref_atomic_add: return v3d_get_op_for_atomic_add(instr, 3); - case nir_intrinsic_image_deref_atomic_min: + case nir_intrinsic_image_deref_atomic_imin: + case nir_intrinsic_image_deref_atomic_umin: return V3D_TMU_OP_WRITE_UMIN_FULL_L1_CLEAR; - case nir_intrinsic_image_deref_atomic_max: + case nir_intrinsic_image_deref_atomic_imax: + case nir_intrinsic_image_deref_atomic_umax: return V3D_TMU_OP_WRITE_UMAX; case nir_intrinsic_image_deref_atomic_and: return V3D_TMU_OP_WRITE_AND_READ_INC; |