On 03/21/2014 04:47 AM, Kenneth Graunke wrote: > WebGL Aquarium in Chrome 24 actually hits this. > > Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> > Cc: Dylan Baker <baker.dyla...@gmail.com> > Cc: Keith Packard <kei...@keithp.com> > Cc: Eric Anholt <e...@anholt.net> > --- > src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp > b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp > index 76f8299..45b9fa0 100644 > --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp > +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp > @@ -502,6 +502,11 @@ do_single_blorp_clear(struct brw_context *brw, struct > gl_framebuffer *fb, > struct gl_context *ctx = &brw->ctx; > struct intel_renderbuffer *irb = intel_renderbuffer(rb); > > + /* If color writes are entirely disabled, there's nothing to do. */ > + GLubyte *color_mask = ctx->Color.ColorMask[buf]; > + if ((color_mask[0] | color_mask[1] | color_mask[2] | color_mask[3]) == 0) > + return true; > +
It seems like this check should be at a higher level. Either in brw_clear or in core Mesa code. I think there's already a similar check in core Mesa that removes GL_COLOR_BUFFER_BIT if there is no color buffer. > brw_blorp_clear_params params(brw, fb, rb, ctx->Color.ColorMask[buf], > partial_clear, layer); > > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev