mesa: don't flag _NEW_SCISSOR for st/mesa

Not needed and we get to bypass _mesa_update_state_locked that would be
a no-op.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Marek Olšák
2017-06-10 00:30:18 +02:00
parent 124df5d71a
commit be15028ede
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -670,7 +670,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) {
FLUSH_VERTICES(ctx, _NEW_SCISSOR);
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewScissorTest ? 0 :
_NEW_SCISSOR);
ctx->NewDriverState |= ctx->DriverFlags.NewScissorTest;
ctx->Scissor.EnableFlags = newEnabled;
}
@@ -1115,7 +1116,8 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap,
return;
}
if (((ctx->Scissor.EnableFlags >> index) & 1) != state) {
FLUSH_VERTICES(ctx, _NEW_SCISSOR);
FLUSH_VERTICES(ctx,
ctx->DriverFlags.NewScissorTest ? 0 : _NEW_SCISSOR);
ctx->NewDriverState |= ctx->DriverFlags.NewScissorTest;
if (state)
ctx->Scissor.EnableFlags |= (1 << index);
+1 -1
View File
@@ -48,7 +48,7 @@ set_scissor_no_notify(struct gl_context *ctx, unsigned idx,
height == ctx->Scissor.ScissorArray[idx].Height)
return;
FLUSH_VERTICES(ctx, _NEW_SCISSOR);
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewScissorRect ? 0 : _NEW_SCISSOR);
ctx->NewDriverState |= ctx->DriverFlags.NewScissorRect;
ctx->Scissor.ScissorArray[idx].X = x;