[Mesa-dev] [PATCH 1/2] ac/nir: set the DA field when performing atomics on 3D images
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Feb 20 20:29:07 UTC 2018
On VI, 3D images are considered as 2D arrays. RadeonSI sets DA for
loads/stores/atomics and RADV only for loads/stores, so I guess there is
a reason for that?
Anyway, there is a potential issue on the RADV side I think.
On 02/20/2018 04:43 PM, Nicolai Hähnle wrote:
> Why? 3D images are not arrays.
>
> On 20.02.2018 11:11, Samuel Pitoiset wrote:
>> This doesn't fix anything known but it should definitely be set.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>> src/amd/common/ac_nir_to_llvm.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/amd/common/ac_nir_to_llvm.c
>> b/src/amd/common/ac_nir_to_llvm.c
>> index dc471de977..9244f8bc7b 100644
>> --- a/src/amd/common/ac_nir_to_llvm.c
>> +++ b/src/amd/common/ac_nir_to_llvm.c
>> @@ -3764,7 +3764,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,
>>
>
>
More information about the mesa-dev
mailing list