[Mesa-dev] [PATCH] nir: Make sure to set the texsrc type in nir drawpixels/bitmap lowering.
Jason Ekstrand
jason at jlekstrand.net
Fri Nov 4 03:53:34 UTC 2016
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Maybe CC stable?
On Thu, Nov 3, 2016 at 4:35 PM, Eric Anholt <eric at anholt.net> wrote:
> We were leaving an undefined value since the ralloc zeroing changes.
> Fixes nir_validate() failures on vc4.
> ---
> src/compiler/nir/nir_lower_bitmap.c | 1 +
> src/compiler/nir/nir_lower_drawpixels.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/src/compiler/nir/nir_lower_bitmap.c
> b/src/compiler/nir/nir_lower_bitmap.c
> index fefe53cbd814..f08fb9b9c346 100644
> --- a/src/compiler/nir/nir_lower_bitmap.c
> +++ b/src/compiler/nir/nir_lower_bitmap.c
> @@ -95,6 +95,7 @@ lower_bitmap(nir_shader *shader, nir_builder *b,
> tex->sampler_index = options->sampler;
> tex->texture_index = options->sampler;
> tex->dest_type = nir_type_float;
> + tex->src[0].src_type = nir_tex_src_coord;
> tex->src[0].src = nir_src_for_ssa(texcoord);
>
> nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
> diff --git a/src/compiler/nir/nir_lower_drawpixels.c
> b/src/compiler/nir/nir_lower_drawpixels.c
> index 54f3ea08aadb..417e27fc1772 100644
> --- a/src/compiler/nir/nir_lower_drawpixels.c
> +++ b/src/compiler/nir/nir_lower_drawpixels.c
> @@ -134,6 +134,7 @@ lower_color(lower_drawpixels_state *state,
> nir_intrinsic_instr *intr)
> tex->sampler_index = state->options->drawpix_sampler;
> tex->texture_index = state->options->drawpix_sampler;
> tex->dest_type = nir_type_float;
> + tex->src[0].src_type = nir_tex_src_coord;
> tex->src[0].src = nir_src_for_ssa(texcoord);
>
> nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
> --
> 2.10.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161103/ee5cfc49/attachment-0001.html>
More information about the mesa-dev
mailing list