Previously, we set _NEW_PIXEL and _NEW_COLOR in these functions, respectively.
That correponds to the GL attribute groups, but doesn't make much sense
otherwise. This could improve validation efficiency in a few places too.
It looks like all the drivers are already checking for _NEW_BUFFERS in the
right places (since that's the bit for FBO state) so we can trim out
_NEW_PIXEL and _NEW_COLOR at any time.
* GL_DITHER, GL_READ/DRAW_BUFFER, buffer binding state, etc. effect
* renderbuffer span/clear funcs.
*/
- if (new_state & (_NEW_COLOR | _NEW_PIXEL | _NEW_BUFFERS)) {
+ if (new_state & (_NEW_COLOR | _NEW_BUFFERS)) {
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
struct xmesa_renderbuffer *front_xrb, *back_xrb;
set_color_output(ctx, output, GL_NONE, 0x0);
}
- ctx->NewState |= _NEW_COLOR;
+ ctx->NewState |= _NEW_BUFFERS;
}
if (!_mesa_readbuffer_update_fields(ctx, buffer))
return;
- ctx->NewState |= _NEW_PIXEL;
+ ctx->NewState |= _NEW_BUFFERS;
/*
* Call device driver function.
if (new_state & (_NEW_PROGRAM|_NEW_TEXTURE|_NEW_TEXTURE_MATRIX))
_mesa_update_texture( ctx, new_state );
- if (new_state & (_NEW_BUFFERS | _NEW_COLOR | _NEW_PIXEL))
+ if (new_state & _NEW_BUFFERS)
_mesa_update_framebuffer(ctx);
if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT))
}
-/**
- * Note that glDrawBuffer() sets _NEW_COLOR, not _NEW_BUFFER.
- */
-
const struct st_tracked_state st_update_framebuffer = {
.name = "st_update_framebuffer",
.dirty = {
- .mesa = (_NEW_BUFFERS | _NEW_COLOR),
+ .mesa = _NEW_BUFFERS,
.st = 0,
},
.update = update_framebuffer_state