[Mesa-dev] [PATCH] ac: image size builtin for GLSL_SAMPLER_DIM_3D

Nicolai Hähnle nhaehnle at gmail.com
Mon Jan 22 13:11:14 UTC 2018


On 18.01.2018 08:17, Timothy Arceri wrote:
> This is what radeonsi does. Fixes remaing piglit subtest in:
> 
> ./bin/arb_shader_image_size-builtin --quick -auto -fbo

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.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 d5b8bea44f..ac6bbe02f1 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3788,7 +3788,8 @@ static LLVMValueRef visit_image_size(struct ac_nir_context *ctx,
>   	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_CUBE ||
> +		  glsl_get_sampler_dim(var->type) == GLSL_SAMPLER_DIM_3D;
>   	if(instr->variables[0]->deref.child)
>   		type = instr->variables[0]->deref.child->type;
>   
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list