Reviewed-by: Marek Olšák <marek.ol...@amd.com> Marek
On Mon, Feb 12, 2018 at 11:43 PM, Timothy Arceri <tarc...@itsqueeze.com> wrote: > Fixes cts test: > KHR-GL44.shader_image_size.advanced-changeSize > --- > src/amd/common/ac_nir_to_llvm.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c > index 15402694fc..c0a0da1656 100644 > --- a/src/amd/common/ac_nir_to_llvm.c > +++ b/src/amd/common/ac_nir_to_llvm.c > @@ -3801,12 +3801,10 @@ static LLVMValueRef visit_image_size(struct > ac_nir_context *ctx, > { > LLVMValueRef res; > const nir_variable *var = instr->variables[0]->var; > - const struct glsl_type *type = instr->variables[0]->var->type; > - bool da = glsl_sampler_type_is_array(var->type) || > - glsl_get_sampler_dim(var->type) == GLSL_SAMPLER_DIM_CUBE || > - glsl_get_sampler_dim(var->type) == GLSL_SAMPLER_DIM_3D; > - if(instr->variables[0]->deref.child) > - type = instr->variables[0]->deref.child->type; > + const struct glsl_type *type = glsl_without_array(var->type); > + 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_3D; > > if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_BUF) > return get_buffer_size(ctx, > -- > 2.14.3 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev