[Mesa-dev] meta: Disable dithering during glBlitFramebuffer

Kenneth Graunke kenneth at whitecape.org
Mon Aug 4 15:54:10 PDT 2014


On Monday, August 04, 2014 09:03:23 PM Neil Roberts wrote:
> According to the GL spec the only fragment operations that should affect
> glBlitFramebuffer are “the pixel ownership test, the scissor test, and sRGB
> conversion”. That implies that dithering should not be performed so we need to
> disable it when implementing the blit with a render.
> 
> Before commit 05b52efbc97731 the dithering state would be left as whatever the
> application picks (the default being GL_TRUE) and after that commit it was
> explicitly enabled. Neither of these were correct.
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=81828
> ---
>  src/mesa/drivers/common/meta_blit.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
> index bbf0c3c..b28b9d0 100644
> --- a/src/mesa/drivers/common/meta_blit.c
> +++ b/src/mesa/drivers/common/meta_blit.c
> @@ -709,6 +709,9 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
>      */
>     _mesa_meta_begin(ctx, MESA_META_ALL & ~MESA_META_DRAW_BUFFERS);
>  
> +   /* Dithering shouldn't be performed for glBlitFramebuffer */
> +   _mesa_set_enable(ctx, GL_DITHER, GL_FALSE);
> +
>     /* If the clipping earlier changed the destination rect at all, then
>      * enable the scissor to clip to it.
>      */
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- 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: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140804/26e46064/attachment-0001.sig>


More information about the mesa-dev mailing list