[Mesa-dev] [PATCH] nir/lower_tex: fix number of components in replace_gradient_with_lod()

Kenneth Graunke kenneth at whitecape.org
Wed Dec 14 09:31:42 UTC 2016


On Wednesday, December 14, 2016 10:05:44 AM PST Iago Toral Quiroga wrote:
> We should make the dest in the textureLod() operation have the same number
> of components as the destination in the original textureGrad()
> 
> Fixes regression in ES3-CTS.gtf.GL3Tests.shadow
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99072
> ---
>  src/compiler/nir/nir_lower_tex.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
> index c67a8ed..3e3ac8c 100644
> --- a/src/compiler/nir/nir_lower_tex.c
> +++ b/src/compiler/nir/nir_lower_tex.c
> @@ -349,7 +349,8 @@ replace_gradient_with_lod(nir_builder *b, nir_ssa_def *lod, nir_tex_instr *tex)
>  
>     assert(src_num == num_srcs);
>  
> -   nir_ssa_dest_init(&txl->instr, &txl->dest, 4, 32, NULL);
> +   nir_ssa_dest_init(&txl->instr, &txl->dest,
> +                     tex->dest.ssa.num_components, 32, NULL);
>     nir_builder_instr_insert(b, &txl->instr);
>  
>     nir_ssa_def_rewrite_uses(&tex->dest.ssa, nir_src_for_ssa(&txl->dest.ssa));
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161214/acbf6117/attachment.sig>


More information about the mesa-dev mailing list