mesa: make use of NewScissorTest driver flags

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Samuel Pitoiset 2017-06-06 15:23:58 +02:00
parent 328191f26c
commit cde963ec35
2 changed files with 3 additions and 3 deletions

View file

@ -671,6 +671,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
state * ((1 << ctx->Const.MaxViewports) - 1);
if (newEnabled != ctx->Scissor.EnableFlags) {
FLUSH_VERTICES(ctx, _NEW_SCISSOR);
ctx->NewDriverState |= ctx->DriverFlags.NewScissorTest;
ctx->Scissor.EnableFlags = newEnabled;
}
}
@ -1113,6 +1114,7 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap,
}
if (((ctx->Scissor.EnableFlags >> index) & 1) != state) {
FLUSH_VERTICES(ctx, _NEW_SCISSOR);
ctx->NewDriverState |= ctx->DriverFlags.NewScissorTest;
if (state)
ctx->Scissor.EnableFlags |= (1 << index);
else

View file

@ -200,9 +200,6 @@ st_invalidate_state(struct gl_context * ctx)
if (new_state & _NEW_PROGRAM)
st->dirty |= ST_NEW_RASTERIZER;
if (new_state & _NEW_SCISSOR)
st->dirty |= ST_NEW_RASTERIZER;
if (new_state & _NEW_FOG)
st->dirty |= ST_NEW_FS_STATE;
@ -523,6 +520,7 @@ static void st_init_driver_flags(struct st_context *st)
f->NewWindowRectangles = ST_NEW_WINDOW_RECTANGLES;
f->NewFramebufferSRGB = ST_NEW_FRAMEBUFFER;
f->NewScissorRect = ST_NEW_SCISSOR;
f->NewScissorTest = ST_NEW_SCISSOR | ST_NEW_RASTERIZER;
}
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,