[Mesa-dev] [PATCH] st_glsl_to_tgsi: only do mov copy propagation on temps (v2)

Ilia Mirkin imirkin at alum.mit.edu
Wed Mar 25 18:19:15 PDT 2015


On Wed, Mar 25, 2015 at 7:53 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Don't propagate ARRAYs
>
> This should fix:
> https://bugs.freedesktop.org/show_bug.cgi?id=89759
>
> v2: just specify arrays so we get input propagation
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> Cc: mesa-stable at lists.freedesktop.org

It is unclear to me whether this is the correct fix. However this
seems very clearly to be an *improvement* over the current situation,
so probably makes sense for this to go in.

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Would be nice if someone who understands what this algo is actually
doing to take a look. Or add some comments as to how it functions.

> ---
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index db69a08..b5e6c62 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -3938,6 +3938,7 @@ glsl_to_tgsi_visitor::copy_propagate(void)
>               inst->dst[0].index == inst->src[0].index) &&
>            !inst->dst[0].reladdr &&
>            !inst->saturate &&
> +          inst->src[0].file != PROGRAM_ARRAY &&
>            !inst->src[0].reladdr &&
>            !inst->src[0].reladdr2 &&
>            !inst->src[0].negate) {
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list