[Mesa-dev] [PATCH] gen6-gen7: disable dithering for GL_RGB10_A2 render buffers
Eric Anholt
eric at anholt.net
Sat Mar 15 13:10:30 PDT 2014
Jordan Justen <jordan.l.justen at intel.com> writes:
> With only 2 bits available, dithering causes undesirable results
> for RGB10_A2 render targets.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74700
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> Tested on Haswell.
>
> We likely need a change for gen8 too. I'll work with Ken on this.
>
> src/mesa/drivers/dri/i965/gen6_cc.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
> index 45c926c..c99ee12 100644
> --- a/src/mesa/drivers/dri/i965/gen6_cc.c
> +++ b/src/mesa/drivers/dri/i965/gen6_cc.c
> @@ -63,13 +63,17 @@ gen6_upload_blend_state(struct brw_context *brw)
> for (b = 0; b < nr_draw_buffers; b++) {
> /* _NEW_BUFFERS */
> struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[b];
> + GLenum rb_internal_format;
> GLenum rb_type;
> bool integer;
>
> - if (rb)
> + if (rb) {
> rb_type = _mesa_get_format_datatype(rb->Format);
> - else
> + rb_internal_format = rb->InternalFormat;
> + } else {
> rb_type = GL_UNSIGNED_NORMALIZED;
> + rb_internal_format = GL_NONE;
> + }
I'm not sure if this change really makes sense to do, but it seems like
you should probably use rb->Format comparisons instead of
rb->InternalFormat, since more than one InternalFormat could lead to the
same actual format.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140315/e52e7cab/attachment.sig>
More information about the mesa-dev
mailing list