mesa/st: drop clip plane driver state bits
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:
@@ -1040,7 +1040,7 @@ _mesa_PopAttrib(void)
|
||||
_math_matrix_analyse(ctx->ProjectionMatrixStack.Top);
|
||||
|
||||
ctx->NewState |= _NEW_TRANSFORM;
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewClipPlane;
|
||||
ctx->NewDriverState |= ST_NEW_CLIP_STATE;
|
||||
|
||||
/* restore clip planes */
|
||||
for (i = 0; i < ctx->Const.MaxClipPlanes; i++) {
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "math/m_matrix.h"
|
||||
#include "api_exec_decl.h"
|
||||
|
||||
#include "state_tracker/st_context.h"
|
||||
|
||||
/**
|
||||
* Update derived clip plane state.
|
||||
@@ -87,7 +88,7 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *eq )
|
||||
|
||||
/* EyeUserPlane is used by program state constants. */
|
||||
FLUSH_VERTICES(ctx, _NEW_TRANSFORM, GL_TRANSFORM_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewClipPlane;
|
||||
ctx->NewDriverState |= ST_NEW_CLIP_STATE;
|
||||
COPY_4FV(ctx->Transform.EyeUserPlane[p], equation);
|
||||
|
||||
if (ctx->Transform.ClipPlanesEnabled & (1 << p)) {
|
||||
|
||||
@@ -478,7 +478,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
||||
/* TODO: glEnable might not be the best place to do it. */
|
||||
if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) {
|
||||
_mesa_update_clip_plane(ctx, p);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewClipPlane;
|
||||
ctx->NewDriverState |= ST_NEW_CLIP_STATE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -4788,12 +4788,6 @@ struct gl_driver_flags
|
||||
/** gl_context::Multisample::(Min)SampleShading */
|
||||
uint64_t NewSampleShading;
|
||||
|
||||
/** gl_context::Transform::ClipOrigin/ClipDepthMode */
|
||||
uint64_t NewClipControl;
|
||||
|
||||
/** gl_context::Transform::EyeUserPlane */
|
||||
uint64_t NewClipPlane;
|
||||
|
||||
/** gl_context::Transform::ClipPlanesEnabled */
|
||||
uint64_t NewClipPlaneEnable;
|
||||
|
||||
|
||||
@@ -507,9 +507,8 @@ clip_control(struct gl_context *ctx, GLenum origin, GLenum depth, bool no_error)
|
||||
}
|
||||
|
||||
/* Affects transform state and the viewport transform */
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewClipControl ? 0 :
|
||||
_NEW_TRANSFORM | _NEW_VIEWPORT, GL_TRANSFORM_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewClipControl;
|
||||
FLUSH_VERTICES(ctx, 0, GL_TRANSFORM_BIT);
|
||||
ctx->NewDriverState |= ST_NEW_VIEWPORT | ST_NEW_RASTERIZER;
|
||||
|
||||
if (ctx->Transform.ClipOrigin != origin) {
|
||||
ctx->Transform.ClipOrigin = origin;
|
||||
|
||||
@@ -481,9 +481,6 @@ st_init_driver_flags(struct st_context *st)
|
||||
f->NewSampleShading |= ST_NEW_RASTERIZER;
|
||||
}
|
||||
|
||||
f->NewClipControl = ST_NEW_VIEWPORT | ST_NEW_RASTERIZER;
|
||||
f->NewClipPlane = ST_NEW_CLIP_STATE;
|
||||
|
||||
if (st->clamp_frag_color_in_shader) {
|
||||
f->NewFragClamp = ST_NEW_FS_STATE;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user