nir/lower_images: handle dec and inc
authorKarol Herbst <kherbst@redhat.com>
Mon, 15 Jun 2020 16:30:12 +0000 (18:30 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 15:15:17 +0000 (15:15 +0000)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>

src/compiler/glsl/gl_nir_lower_images.c
src/compiler/nir/nir.c

index 265206a012a32f587f54bfa3eb5d2573dcbf6440..632af71f329d146b7df7808a80a2e4aab29823cc 100644 (file)
@@ -73,6 +73,8 @@ lower_impl(nir_builder *b, nir_instr *instr, bool bindless_only)
    case nir_intrinsic_image_deref_atomic_exchange:
    case nir_intrinsic_image_deref_atomic_comp_swap:
    case nir_intrinsic_image_deref_atomic_fadd:
+   case nir_intrinsic_image_deref_atomic_inc_wrap:
+   case nir_intrinsic_image_deref_atomic_dec_wrap:
    case nir_intrinsic_image_deref_load:
    case nir_intrinsic_image_deref_samples:
    case nir_intrinsic_image_deref_size:
index b8c7f8c5eff3e4ee3c1c1114701759b97d20a3d7..8d2e1098301dda7a0ea6ac351700dac3b888784e 100644 (file)
@@ -2258,6 +2258,8 @@ nir_rewrite_image_intrinsic(nir_intrinsic_instr *intrin, nir_ssa_def *src,
    CASE(atomic_exchange)
    CASE(atomic_comp_swap)
    CASE(atomic_fadd)
+   CASE(atomic_inc_wrap)
+   CASE(atomic_dec_wrap)
    CASE(size)
    CASE(samples)
    CASE(load_raw_intel)