ac/nir: set the DA field when performing atomics on 3D images
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 20 Feb 2018 10:11:42 +0000 (11:11 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 21 Feb 2018 08:41:49 +0000 (09:41 +0100)
This doesn't fix anything known but it should definitely be set.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c

index 351e6fa9efc54ca6d024a363378de1d3955c67a4..52ec40fb12796b038e04dc6d18bca44670092bb9 100644 (file)
@@ -3773,7 +3773,8 @@ static LLVMValueRef visit_image_atomic(struct ac_nir_context *ctx,
                char coords_type[8];
 
                bool da = glsl_sampler_type_is_array(type) ||
-                         glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_CUBE;
+                         glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_CUBE ||
+                         glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_3D;
 
                LLVMValueRef coords = params[param_count++] = get_image_coords(ctx, instr);
                params[param_count++] = get_sampler_desc(ctx, instr->variables[0], AC_DESC_IMAGE,