[Mesa-dev] [PATCH] anv: fix writemask on blit fragment shader.

Kenneth Graunke kenneth at whitecape.org
Tue Aug 16 05:45:08 UTC 2016


On Tuesday, August 16, 2016 10:01:47 AM PDT Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> I'm not sure if anything even uses this, but I found this on radv, so
> just fix it on anv for consistency.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/intel/vulkan/anv_meta_blit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c
> index e8b244b..d2e375a 100644
> --- a/src/intel/vulkan/anv_meta_blit.c
> +++ b/src/intel/vulkan/anv_meta_blit.c
> @@ -106,7 +106,7 @@ build_nir_copy_fragment_shader(enum glsl_sampler_dim tex_dim)
>     nir_variable *color_out = nir_variable_create(b.shader, nir_var_shader_out,
>                                                   vec4, "f_color");
>     color_out->data.location = FRAG_RESULT_DATA0;
> -   nir_store_var(&b, color_out, &tex->dest.ssa, 4);
> +   nir_store_var(&b, color_out, &tex->dest.ssa, 0xf);
>  
>     return b.shader;
>  }
> 

Yep, this has always been wrong - I pointed out this bug before we even
shipped the code, while it was still being frequently rewritten.  Looks
like it never got fixed though. :(  Thanks for finally doing it!

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

We don't use the writemask for fragment shader outputs, so it won't
have any effect.  Still, much less confusing now :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160815/62aa705a/attachment.sig>


More information about the mesa-dev mailing list