X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fbuffers.c;h=3cbd671baba794e9b9fe7c7814a3b82dadcf2edd;hb=102f2ef4fc2d45c51926add6bdf51ef6fcb43b35;hp=bb019b5998ad9ab779569ec24a193416a956a826;hpb=fb206809ba2a131fd9034e10a00592f2d0d81fce;p=mesa.git diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index bb019b5998a..3cbd671baba 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -38,8 +38,6 @@ #include "fbobject.h" #include "state.h" -#include "state_tracker/st_draw.h" - #define BAD_MASK ~0u @@ -120,6 +118,8 @@ _mesa_Clear( GLbitfield mask ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + FLUSH_CURRENT(ctx, 0); + if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glClear 0x%x\n", mask); @@ -178,15 +178,7 @@ _mesa_Clear( GLbitfield mask ) } ASSERT(ctx->Driver.Clear); -#if 0 ctx->Driver.Clear(ctx, bufferMask); -#else - st_clear(ctx->st, - (mask & GL_COLOR_BUFFER_BIT) ? GL_TRUE : GL_FALSE, - (bufferMask & BUFFER_BIT_DEPTH) ? GL_TRUE : GL_FALSE, - (bufferMask & BUFFER_BIT_STENCIL) ? GL_TRUE : GL_FALSE, - (bufferMask & BUFFER_BIT_ACCUM) ? GL_TRUE : GL_FALSE); -#endif } } @@ -535,7 +527,7 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers, set_color_output(ctx, output, GL_NONE, 0x0); } - ctx->NewState |= _NEW_COLOR; + ctx->NewState |= _NEW_BUFFERS; } @@ -596,7 +588,7 @@ _mesa_ReadBuffer(GLenum buffer) if (!_mesa_readbuffer_update_fields(ctx, buffer)) return; - ctx->NewState |= _NEW_PIXEL; + ctx->NewState |= _NEW_BUFFERS; /* * Call device driver function.