[Mesa-dev] [PATCH 3/3] mesa: make use of NewScissorTest driver flags
Nicolai Hähnle
nhaehnle at gmail.com
Wed Jun 7 13:42:12 UTC 2017
For the series:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 06.06.2017 21:59, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/mesa/main/enable.c | 2 ++
> src/mesa/state_tracker/st_context.c | 4 +---
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
> index ef278a318a..394c9e13c4 100644
> --- a/src/mesa/main/enable.c
> +++ b/src/mesa/main/enable.c
> @@ -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
> diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
> index d8ec45f118..8d348e28b2 100644
> --- a/src/mesa/state_tracker/st_context.c
> +++ b/src/mesa/state_tracker/st_context.c
> @@ -191,9 +191,6 @@ void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
> 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;
>
> @@ -514,6 +511,7 @@ static void st_init_driver_flags(struct gl_driver_flags *f)
> f->NewImageUnits = ST_NEW_IMAGE_UNITS;
> f->NewWindowRectangles = ST_NEW_WINDOW_RECTANGLES;
> 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,
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list