mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 10:00:14 +01:00
mesa/st: remove the viewport driver state flags
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261>
This commit is contained in:
parent
c5af853cb9
commit
4f0316613f
4 changed files with 6 additions and 10 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue