summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-12-20 13:11:52 +1000
committerMarge Bot <emma+marge@anholt.net>2021-12-23 19:06:57 +0000
commit86a7a36164d8cc42a89d20a0dfd745dde43b4aae (patch)
tree05a7b5b24fbf1c27f76c4997310da73ae24ee924
parentddade693d00528e7b0765738e29bae8508222087 (diff)
mesa/st: drop multisample mask/locations state drivers 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>
-rw-r--r--src/mesa/main/enable.c16
-rw-r--r--src/mesa/main/fbobject.c7
-rw-r--r--src/mesa/main/mtypes.h6
-rw-r--r--src/mesa/main/multisample.c9
-rw-r--r--src/mesa/state_tracker/st_context.c2
5 files changed, 14 insertions, 26 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 6d5bc9501ce..059288c36f7 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1027,10 +1027,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
case GL_SAMPLE_COVERAGE_ARB:
if (ctx->Multisample.SampleCoverage == state)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 :
- _NEW_MULTISAMPLE,
+ FLUSH_VERTICES(ctx, 0,
GL_MULTISAMPLE_BIT | GL_ENABLE_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
+ ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
ctx->Multisample.SampleCoverage = state;
break;
case GL_SAMPLE_COVERAGE_INVERT_ARB:
@@ -1038,10 +1037,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
goto invalid_enum_error;
if (ctx->Multisample.SampleCoverageInvert == state)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 :
- _NEW_MULTISAMPLE,
- GL_MULTISAMPLE_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
+ FLUSH_VERTICES(ctx, 0, GL_MULTISAMPLE_BIT);
+ ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
ctx->Multisample.SampleCoverageInvert = state;
break;
@@ -1298,9 +1295,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
goto invalid_enum_error;
if (ctx->Multisample.SampleMask == state)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 :
- _NEW_MULTISAMPLE, 0);
- ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
+ FLUSH_VERTICES(ctx, 0, 0);
+ ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
ctx->Multisample.SampleMask = state;
break;
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 9999ff0ba56..3db75974f2c 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -54,6 +54,7 @@
#include "state_tracker/st_cb_fbo.h"
#include "state_tracker/st_cb_eglimage.h"
+#include "state_tracker/st_context.h"
/**
* Notes:
@@ -1730,7 +1731,7 @@ framebuffer_parameteri(struct gl_context *ctx, struct gl_framebuffer *fb,
case GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB:
case GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB:
if (fb == ctx->DrawBuffer)
- ctx->NewDriverState |= ctx->DriverFlags.NewSampleLocations;
+ ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
break;
default:
invalidate_framebuffer(fb);
@@ -3149,7 +3150,7 @@ _mesa_bind_framebuffers(struct gl_context *ctx,
if (bindDrawBuf) {
FLUSH_VERTICES(ctx, _NEW_BUFFERS, 0);
- ctx->NewDriverState |= ctx->DriverFlags.NewSampleLocations;
+ ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
/* check if old framebuffer had any texture attachments */
if (oldDrawFb)
@@ -5454,7 +5455,7 @@ sample_locations(struct gl_context *ctx, struct gl_framebuffer *fb,
}
if (fb == ctx->DrawBuffer)
- ctx->NewDriverState |= ctx->DriverFlags.NewSampleLocations;
+ ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
}
void GLAPIENTRY
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index aa7a54ec682..57c7da204bb 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4779,9 +4779,6 @@ struct gl_driver_flags
/** gl_context::Multisample::Enabled */
uint64_t NewMultisampleEnable;
- /** gl_context::Multisample::SampleCoverage/SampleMaskValue */
- uint64_t NewSampleMask;
-
/** gl_context::Multisample::(Min)SampleShading */
uint64_t NewSampleShading;
@@ -4794,9 +4791,6 @@ struct gl_driver_flags
/** Shader constants (uniforms, program parameters, state constants) */
uint64_t NewShaderConstants[MESA_SHADER_STAGES];
- /** Programmable sample location state for gl_context::DrawBuffer */
- uint64_t NewSampleLocations;
-
/** For GL_CLAMP emulation */
uint64_t NewSamplersWithClamp;
};
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
index c428ac3327d..a955a105a40 100644
--- a/src/mesa/main/multisample.c
+++ b/src/mesa/main/multisample.c
@@ -52,9 +52,8 @@ _mesa_SampleCoverage(GLclampf value, GLboolean invert)
ctx->Multisample.SampleCoverageValue == value)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 : _NEW_MULTISAMPLE,
- GL_MULTISAMPLE_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
+ FLUSH_VERTICES(ctx, 0, GL_MULTISAMPLE_BIT);
+ ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
ctx->Multisample.SampleCoverageValue = value;
ctx->Multisample.SampleCoverageInvert = invert;
}
@@ -155,8 +154,8 @@ sample_maski(struct gl_context *ctx, GLuint index, GLbitfield mask)
if (ctx->Multisample.SampleMaskValue == mask)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 : _NEW_MULTISAMPLE, 0);
- ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
+ FLUSH_VERTICES(ctx, 0, 0);
+ ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
ctx->Multisample.SampleMaskValue = mask;
}
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index fd2606946f4..0a113bbdca8 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -467,8 +467,6 @@ st_init_driver_flags(struct st_context *st)
f->NewMultisampleEnable = ST_NEW_BLEND | ST_NEW_RASTERIZER |
ST_NEW_SAMPLE_STATE | ST_NEW_SAMPLE_SHADING;
- f->NewSampleMask = ST_NEW_SAMPLE_STATE;
- f->NewSampleLocations = ST_NEW_SAMPLE_STATE;
f->NewSampleShading = ST_NEW_SAMPLE_SHADING;
/* This depends on what the gallium driver wants. */