diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index b6b34f90e24..e1c74225fb3 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -45,6 +45,7 @@ #include "varray.h" #include "api_exec_decl.h" +#include "state_tracker/st_cb_bitmap.h" #include "state_tracker/st_context.h" void @@ -865,6 +866,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) GLbitfield newEnabled = state * ((1 << ctx->Const.MaxViewports) - 1); if (newEnabled != ctx->Scissor.EnableFlags) { + st_flush_bitmap_cache(st_context(ctx)); + FLUSH_VERTICES(ctx, 0, GL_SCISSOR_BIT | GL_ENABLE_BIT); ctx->NewDriverState |= ST_NEW_SCISSOR | ST_NEW_RASTERIZER; @@ -1390,6 +1393,8 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap, return; } if (((ctx->Scissor.EnableFlags >> index) & 1) != state) { + st_flush_bitmap_cache(st_context(ctx)); + FLUSH_VERTICES(ctx, 0, GL_SCISSOR_BIT | GL_ENABLE_BIT); ctx->NewDriverState |= ST_NEW_SCISSOR | ST_NEW_RASTERIZER; diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c index 054c5abaccd..90ac5e57676 100644 --- a/src/mesa/main/scissor.c +++ b/src/mesa/main/scissor.c @@ -30,6 +30,7 @@ #include "main/scissor.h" #include "api_exec_decl.h" +#include "state_tracker/st_cb_bitmap.h" #include "state_tracker/st_context.h" /** @@ -50,6 +51,9 @@ set_scissor_no_notify(struct gl_context *ctx, unsigned idx, height == ctx->Scissor.ScissorArray[idx].Height) return; + if (ctx->Scissor.EnableFlags) + st_flush_bitmap_cache(st_context(ctx)); + FLUSH_VERTICES(ctx, 0, GL_SCISSOR_BIT); ctx->NewDriverState |= ST_NEW_SCISSOR; @@ -294,6 +298,8 @@ _mesa_WindowRectanglesEXT(GLenum mode, GLsizei count, const GLint *box) box += 4; } + st_flush_bitmap_cache(st_context(ctx)); + FLUSH_VERTICES(ctx, 0, GL_SCISSOR_BIT); ctx->NewDriverState |= ST_NEW_WINDOW_RECTANGLES;