Jordan Justen <jordan.l.jus...@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.jus...@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.
pgpP95kgn_GCw.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev