[Mesa-dev] [PATCH 3/3] mesa: make use of NewWindowRectangles driver flags
Marek Olšák
maraeo at gmail.com
Mon Jun 5 21:41:15 UTC 2017
For the series:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Fri, Jun 2, 2017 at 2:31 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Now, st_update_window_rectangles() won't be called when the
> scissor is going to be updated.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/mesa/main/scissor.c | 4 +++-
> src/mesa/state_tracker/st_context.c | 4 ++--
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c
> index 5f2f61f926..5cf02168bd 100644
> --- a/src/mesa/main/scissor.c
> +++ b/src/mesa/main/scissor.c
> @@ -253,7 +253,9 @@ _mesa_WindowRectanglesEXT(GLenum mode, GLsizei count, const GLint *box)
> box += 4;
> }
>
> - FLUSH_VERTICES(ctx, _NEW_SCISSOR);
> + FLUSH_VERTICES(ctx, 0);
> + ctx->NewDriverState |= ctx->DriverFlags.NewWindowRectangles;
> +
> memcpy(ctx->Scissor.WindowRects, newval,
> sizeof(struct gl_scissor_rect) * count);
> ctx->Scissor.NumWindowRects = count;
> diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
> index 4dcc160b50..abdae31585 100644
> --- a/src/mesa/state_tracker/st_context.c
> +++ b/src/mesa/state_tracker/st_context.c
> @@ -193,8 +193,7 @@ void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
>
> if (new_state & _NEW_SCISSOR)
> st->dirty |= ST_NEW_RASTERIZER |
> - ST_NEW_SCISSOR |
> - ST_NEW_WINDOW_RECTANGLES;
> + ST_NEW_SCISSOR;
>
> if (new_state & _NEW_FOG)
> st->dirty |= ST_NEW_FS_STATE;
> @@ -516,6 +515,7 @@ static void st_init_driver_flags(struct gl_driver_flags *f)
> f->NewAtomicBuffer = ST_NEW_ATOMIC_BUFFER;
> f->NewShaderStorageBuffer = ST_NEW_STORAGE_BUFFER;
> f->NewImageUnits = ST_NEW_IMAGE_UNITS;
> + f->NewWindowRectangles = ST_NEW_WINDOW_RECTANGLES;
> }
>
> struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
> --
> 2.13.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list