[Mesa-dev] [PATCH 2/2] nir: Fix crash in nir_lower_drawpixels.

Rob Clark robdclark at gmail.com
Fri Aug 19 23:44:45 UTC 2016


On Fri, Aug 19, 2016 at 7:12 PM, Eric Anholt <eric at anholt.net> wrote:
> Generally you'd see the gl_Color reference first and get some cursor set.
> However, in piglit draw-pixel-with-texture we're now seeing the TexCoord
> dereferenced first.

yeah, that makes sense, r-b

> ---
>  src/compiler/nir/nir_lower_drawpixels.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/compiler/nir/nir_lower_drawpixels.c b/src/compiler/nir/nir_lower_drawpixels.c
> index a71bccddfb07..54f3ea08aadb 100644
> --- a/src/compiler/nir/nir_lower_drawpixels.c
> +++ b/src/compiler/nir/nir_lower_drawpixels.c
> @@ -194,6 +194,8 @@ lower_color(lower_drawpixels_state *state, nir_intrinsic_instr *intr)
>  static void
>  lower_texcoord(lower_drawpixels_state *state, nir_intrinsic_instr *intr)
>  {
> +   state->b.cursor = nir_before_instr(&intr->instr);
> +
>     nir_ssa_def *texcoord_const = get_texcoord_const(state);
>     nir_ssa_def_rewrite_uses(&intr->dest.ssa, nir_src_for_ssa(texcoord_const));
>  }
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list