[Mesa-dev] [PATCH v3 32/32] glsl: skip tree grafting for sampler and image types

Timothy Arceri tarceri at itsqueeze.com
Fri May 5 00:54:14 UTC 2017


Nice work :)

Everything but patch 4, which I'd like a response on is:

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

On 03/05/17 06:53, Samuel Pitoiset wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> v2: - use is_sampler()/is_image() instead (Samuel Pitoiset)
> 
> Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>   src/compiler/glsl/opt_tree_grafting.cpp | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/src/compiler/glsl/opt_tree_grafting.cpp b/src/compiler/glsl/opt_tree_grafting.cpp
> index 28b6e1856e..b0a1604191 100644
> --- a/src/compiler/glsl/opt_tree_grafting.cpp
> +++ b/src/compiler/glsl/opt_tree_grafting.cpp
> @@ -371,6 +371,17 @@ tree_grafting_basic_block(ir_instruction *bb_first,
>         if (lhs_var->data.precise)
>            continue;
>   
> +      /* Do not graft sampler and image variables. This is a workaround to
> +       * st/glsl_to_tgsi being unable to handle expression parameters to image
> +       * intrinsics.
> +       *
> +       * Note that if this is ever fixed, we still need to skip grafting when
> +       * any image layout qualifiers (including the image format) are set,
> +       * since we must not lose those.
> +       */
> +      if (lhs_var->type->is_sampler() || lhs_var->type->is_image())
> +         continue;
> +
>         ir_variable_refcount_entry *entry = info->refs->get_variable_entry(lhs_var);
>   
>         if (!entry->declaration ||
> 


More information about the mesa-dev mailing list