#include "context.h"
#include "enums.h"
#include "fbobject.h"
-#include "framebuffer.h"
#include "get.h"
#include "macros.h"
#include "mtypes.h"
* \param mask bit-mask indicating the buffers to be cleared.
*
* Flushes the vertices and verifies the parameter.
- * If __struct gl_contextRec::NewState contains _NEW_BUFFERS then calls
- * _mesa_update_framebuffer() to update gl_frame_buffer::_Xmin, etc. If the
- * rasterization mode is set to GL_RENDER then requests the driver to clear
- * the buffers, via the dd_function_table::Clear callback.
+ * If __struct gl_contextRec::NewState is set then calls _mesa_update_state()
+ * to update gl_frame_buffer::_Xmin, etc. If the rasterization mode is set to
+ * GL_RENDER then requests the driver to clear the buffers, via the
+ * dd_function_table::Clear callback.
*/
static ALWAYS_INLINE void
clear(struct gl_context *ctx, GLbitfield mask, bool no_error)
}
}
- if (ctx->NewState & _NEW_BUFFERS) {
- _mesa_update_framebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer); /* update _Xmin, etc */
- ctx->NewState &= ~_NEW_BUFFERS;
+ if (ctx->NewState) {
+ _mesa_update_state( ctx ); /* update _Xmin, etc */
}
if (!no_error && ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
- if (ctx->NewState & _NEW_BUFFERS) {
- _mesa_update_framebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer);
- ctx->NewState &= ~_NEW_BUFFERS;
+ if (ctx->NewState) {
+ _mesa_update_state( ctx );
}
switch (buffer) {
FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
- if (ctx->NewState & _NEW_BUFFERS) {
- _mesa_update_framebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer);
- ctx->NewState &= ~_NEW_BUFFERS;
+ if (ctx->NewState) {
+ _mesa_update_state( ctx );
}
switch (buffer) {
FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
- if (ctx->NewState & _NEW_BUFFERS) {
- _mesa_update_framebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer);
- ctx->NewState &= ~_NEW_BUFFERS;
+ if (ctx->NewState) {
+ _mesa_update_state( ctx );
}
switch (buffer) {
if (ctx->RasterDiscard)
return;
- if (ctx->NewState & _NEW_BUFFERS) {
- _mesa_update_framebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer);
- ctx->NewState &= ~_NEW_BUFFERS;
+ if (ctx->NewState) {
+ _mesa_update_state( ctx );
}
if (ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer)