freedreno/ir3: image atomics use image-store path
authorRob Clark <robdclark@gmail.com>
Thu, 31 May 2018 23:17:30 +0000 (19:17 -0400)
committerRob Clark <robdclark@gmail.com>
Mon, 11 Jun 2018 13:06:03 +0000 (09:06 -0400)
image reads are handled via tex state, whereas image writes and atomics
are handled via SSBO state block.  Previously we were only considering
image write, and not image atomics which also uses the SSBO state block.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_nir.c

index cd1f9c526f2212de0f572e01fadd7fff4673fd52..a3896a3071f16ce3801f14b0e80d9eba774145e6 100644 (file)
@@ -242,6 +242,14 @@ ir3_nir_scan_driver_consts(nir_shader *shader,
                                                layout->ssbo_size.count;
                                        layout->ssbo_size.count += 1; /* one const per */
                                        break;
+                               case nir_intrinsic_image_var_atomic_add:
+                               case nir_intrinsic_image_var_atomic_min:
+                               case nir_intrinsic_image_var_atomic_max:
+                               case nir_intrinsic_image_var_atomic_and:
+                               case nir_intrinsic_image_var_atomic_or:
+                               case nir_intrinsic_image_var_atomic_xor:
+                               case nir_intrinsic_image_var_atomic_exchange:
+                               case nir_intrinsic_image_var_atomic_comp_swap:
                                case nir_intrinsic_image_var_store:
                                        idx = intr->variables[0]->var->data.driver_location;
                                        if (layout->image_dims.mask & (1 << idx))