[Mesa-dev] [PATCH] ac: fix image load store for GLSL_SAMPLER_DIM_3D

Kai Wasserbäch kai at dev.carbon-project.org
Mon Jan 22 13:27:01 UTC 2018


Hey,
Nicolai Hähnle wrote on 22.01.2018 14:18:
> On 20.01.2018 04:11, Timothy Arceri wrote:
>> Fixes the following piglit tests:
>>
>> arb_shader_image_load_store/layer/image3d/layered binding test
>> arb_shader_image_load_store/max-size/image3d max size test/2048x8x8x1
>> arb_shader_image_load_store/max-size/image3d max size test/8x2048x8x1
>> arb_shader_image_load_store/max-size/image3d max size test/8x8x2048x1
>> arb_shader_image_load_store/semantics/imageload/vertex shader/rgba32f/image3d
>> test
> 
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> 
>> ---
>>   src/amd/common/ac_nir_to_llvm.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
>> index 781e4a905b..ac3a949bd3 100644
>> --- a/src/amd/common/ac_nir_to_llvm.c
>> +++ b/src/amd/common/ac_nir_to_llvm.c
>> @@ -3634,6 +3634,7 @@ static LLVMValueRef visit_image_load(struct
>> ac_nir_context *ctx,
>>       } else {
>>           bool is_da = glsl_sampler_type_is_array(type) ||
>>                    glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_CUBE ||
>> +                 glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_3D ||
>>                    glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_SUBPASS ||
>>                    glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_SUBPASS_MS;
>>           LLVMValueRef da = is_da ? ctx->ac.i1true : ctx->ac.i1false;
>> @@ -3692,7 +3693,8 @@ static void visit_image_store(struct ac_nir_context *ctx,
>>                      params, 6, 0);
>>       } else {
>>           bool is_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 da = is_da ? ctx->ac.i1true : ctx->ac.i1false;
>>           LLVMValueRef slc = ctx->ac.i1false;

just a note: if this patch goes in before my patch
(<https://patchwork.freedesktop.org/patch/199521/>), assuming it'll be accepted,
I'd need to do a v2 patch, which applies cleanly on top of this change. The same
applies the other way around.

Cheers,
Kai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180122/bda4a7a3/attachment.sig>


More information about the mesa-dev mailing list