From 4f0316613f065972bda3e4fe3d63a6aa0bc42550 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 20 Dec 2021 12:23:04 +1000 Subject: [PATCH] mesa/st: remove the viewport driver state flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Kenneth Graunke Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/attrib.c | 3 ++- src/mesa/main/mtypes.h | 3 --- src/mesa/main/viewport.c | 9 ++++----- src/mesa/state_tracker/st_context.c | 1 - 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index aa734c3..7b84482 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -62,6 +62,7 @@ #include "state_tracker/st_cb_texture.h" #include "state_tracker/st_cb_viewport.h" +#include "state_tracker/st_context.h" static inline bool copy_texture_attribs(struct gl_texture_object *dst, @@ -1093,7 +1094,7 @@ _mesa_PopAttrib(void) if (memcmp(&ctx->ViewportArray[i].X, &vp->X, sizeof(float) * 6)) { ctx->NewState |= _NEW_VIEWPORT; - ctx->NewDriverState |= ctx->DriverFlags.NewViewport; + ctx->NewDriverState |= ST_NEW_VIEWPORT; memcpy(&ctx->ViewportArray[i].X, &vp->X, sizeof(float) * 6); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index c60657f..29c964c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4866,9 +4866,6 @@ struct gl_driver_flags /** gl_context::PolygonStipple */ uint64_t NewPolygonStipple; - /** gl_context::ViewportArray */ - uint64_t NewViewport; - /** Shader constants (uniforms, program parameters, state constants) */ uint64_t NewShaderConstants[MESA_SHADER_STAGES]; diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c index 12b0736..07e6ab1 100644 --- a/src/mesa/main/viewport.c +++ b/src/mesa/main/viewport.c @@ -75,9 +75,8 @@ set_viewport_no_notify(struct gl_context *ctx, unsigned idx, ctx->ViewportArray[idx].Height == height) return; - FLUSH_VERTICES(ctx, ctx->DriverFlags.NewViewport ? 0 : _NEW_VIEWPORT, - GL_VIEWPORT_BIT); - ctx->NewDriverState |= ctx->DriverFlags.NewViewport; + FLUSH_VERTICES(ctx, 0, GL_VIEWPORT_BIT); + ctx->NewDriverState |= ST_NEW_VIEWPORT; ctx->ViewportArray[idx].X = x; ctx->ViewportArray[idx].Width = width; @@ -295,7 +294,7 @@ set_depth_range_no_notify(struct gl_context *ctx, unsigned idx, /* The depth range is needed by program state constants. */ FLUSH_VERTICES(ctx, _NEW_VIEWPORT, GL_VIEWPORT_BIT); - ctx->NewDriverState |= ctx->DriverFlags.NewViewport; + ctx->NewDriverState |= ST_NEW_VIEWPORT; ctx->ViewportArray[idx].Near = SATURATE(nearval); ctx->ViewportArray[idx].Far = SATURATE(farval); @@ -655,7 +654,7 @@ set_viewport_swizzle(struct gl_context *ctx, GLuint index, return; FLUSH_VERTICES(ctx, _NEW_VIEWPORT, GL_VIEWPORT_BIT); - ctx->NewDriverState |= ctx->DriverFlags.NewViewport; + ctx->NewDriverState |= ST_NEW_VIEWPORT; viewport->SwizzleX = swizzlex; viewport->SwizzleY = swizzley; diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 10c93a3..c9db9b2 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -512,7 +512,6 @@ st_init_driver_flags(struct st_context *st) f->NewClipPlaneEnable = ST_NEW_RASTERIZER; f->NewPolygonStipple = ST_NEW_POLY_STIPPLE; - f->NewViewport = ST_NEW_VIEWPORT; if (st->emulate_gl_clamp) f->NewSamplersWithClamp = ST_NEW_SAMPLERS | -- 2.7.4