aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-03-22 00:30:40 -0400
committerMarge Bot <[email protected]>2020-04-30 22:01:55 +0000
commit21ff963c3a1738b44b4e0fb0b9df193103e4d255 (patch)
tree6ad7402d8de2597ce0b0440e17424e784bfabe9f
parentf1538002b81493b5e4754746745db565cf6fe810 (diff)
mesa: don't call _mesa_update_state for _mesa_get_clamp_fragment_color
It's not needed. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4314>
-rw-r--r--src/mesa/main/get.c10
-rw-r--r--src/mesa/main/get_hash_params.py8
-rw-r--r--src/mesa/main/texenv.c2
-rw-r--r--src/mesa/main/texparam.c2
4 files changed, 4 insertions, 18 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index f03685f33ac..6bd583473ec 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -192,7 +192,6 @@ enum value_extra {
EXTRA_API_ES31,
EXTRA_API_ES32,
EXTRA_NEW_BUFFERS,
- EXTRA_NEW_FRAG_CLAMP,
EXTRA_VALID_DRAW_BUFFER,
EXTRA_VALID_TEXTURE_UNIT,
EXTRA_VALID_CLIP_DISTANCE,
@@ -317,11 +316,6 @@ static const int extra_new_buffers[] = {
EXTRA_END
};
-static const int extra_new_frag_clamp[] = {
- EXTRA_NEW_FRAG_CLAMP,
- EXTRA_END
-};
-
static const int extra_valid_draw_buffer[] = {
EXTRA_VALID_DRAW_BUFFER,
EXTRA_END
@@ -1394,10 +1388,6 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
if (_mesa_is_desktop_gl(ctx) && version >= 43)
api_found = GL_TRUE;
break;
- case EXTRA_NEW_FRAG_CLAMP:
- if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP))
- _mesa_update_state(ctx);
- break;
case EXTRA_API_ES2:
api_check = GL_TRUE;
if (ctx->API == API_OPENGLES2)
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 1e09c48aca0..657a22f147a 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -4,7 +4,7 @@ descriptor=[
[ "BLEND", "CONTEXT_BIT0(Color.BlendEnabled), NO_EXTRA" ],
[ "BLEND_SRC", "CONTEXT_ENUM16(Color.Blend[0].SrcRGB), NO_EXTRA" ],
[ "BLUE_BITS", "BUFFER_INT(Visual.blueBits), extra_new_buffers" ],
- [ "COLOR_CLEAR_VALUE", "LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp" ],
+ [ "COLOR_CLEAR_VALUE", "LOC_CUSTOM, TYPE_FLOATN_4, 0, NO_EXTRA" ],
[ "COLOR_WRITEMASK", "LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA" ],
[ "CULL_FACE", "CONTEXT_BOOL(Polygon.CullFlag), NO_EXTRA" ],
[ "CULL_FACE_MODE", "CONTEXT_ENUM16(Polygon.CullFaceMode), NO_EXTRA" ],
@@ -161,7 +161,7 @@ descriptor=[
[ "LIGHT_MODEL_TWO_SIDE", "CONTEXT_BOOL(Light.Model.TwoSide), NO_EXTRA" ],
[ "ALPHA_TEST", "CONTEXT_BOOL(Color.AlphaEnabled), NO_EXTRA" ],
[ "ALPHA_TEST_FUNC", "CONTEXT_ENUM16(Color.AlphaFunc), NO_EXTRA" ],
- [ "ALPHA_TEST_REF", "LOC_CUSTOM, TYPE_FLOATN, 0, extra_new_frag_clamp" ],
+ [ "ALPHA_TEST_REF", "LOC_CUSTOM, TYPE_FLOATN, 0, NO_EXTRA" ],
[ "BLEND_DST", "CONTEXT_ENUM16(Color.Blend[0].DstRGB), NO_EXTRA" ],
[ "CLIP_DISTANCE0", "CONTEXT_BIT0(Transform.ClipPlanesEnabled), extra_valid_clip_distance" ],
[ "CLIP_DISTANCE1", "CONTEXT_BIT1(Transform.ClipPlanesEnabled), extra_valid_clip_distance" ],
@@ -177,7 +177,7 @@ descriptor=[
[ "CURRENT_TEXTURE_COORDS", "LOC_CUSTOM, TYPE_FLOAT_4, 0, extra_flush_current_valid_texture_unit" ],
[ "POINT_DISTANCE_ATTENUATION", "CONTEXT_FLOAT3(Point.Params[0]), NO_EXTRA" ],
[ "FOG", "CONTEXT_BOOL(Fog.Enabled), NO_EXTRA" ],
- [ "FOG_COLOR", "LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp" ],
+ [ "FOG_COLOR", "LOC_CUSTOM, TYPE_FLOATN_4, 0, NO_EXTRA" ],
[ "FOG_DENSITY", "CONTEXT_FLOAT(Fog.Density), NO_EXTRA" ],
[ "FOG_END", "CONTEXT_FLOAT(Fog.End), NO_EXTRA" ],
[ "FOG_HINT", "CONTEXT_ENUM16(Hint.Fog), NO_EXTRA" ],
@@ -299,7 +299,7 @@ descriptor=[
[ "DRAW_BUFFER5_ARB", "BUFFER_ENUM16(ColorDrawBuffer[5]), extra_valid_draw_buffer" ],
[ "DRAW_BUFFER6_ARB", "BUFFER_ENUM16(ColorDrawBuffer[6]), extra_valid_draw_buffer" ],
[ "DRAW_BUFFER7_ARB", "BUFFER_ENUM16(ColorDrawBuffer[7]), extra_valid_draw_buffer" ],
- [ "BLEND_COLOR_EXT", "LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp" ],
+ [ "BLEND_COLOR_EXT", "LOC_CUSTOM, TYPE_FLOATN_4, 0, NO_EXTRA" ],
# GL_ARB_fragment_program
# == GL_MAX_TEXTURE_IMAGE_UNITS_NV
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 5d0dc6cc4e9..0825e220a21 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -741,8 +741,6 @@ _mesa_gettexenvfv_indexed( GLuint texunit, GLenum target, GLenum pname, GLfloat
return;
if (pname == GL_TEXTURE_ENV_COLOR) {
- if(ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP))
- _mesa_update_state(ctx);
if (_mesa_get_clamp_fragment_color(ctx, ctx->DrawBuffer))
COPY_4FV( params, texUnit->EnvColor );
else
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index ae3fa825a4f..e0dbdbbb1a2 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -2155,8 +2155,6 @@ get_tex_parameterfv(struct gl_context *ctx,
!ctx->Extensions.ARB_texture_border_clamp)
goto invalid_pname;
- if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP))
- _mesa_update_state_locked(ctx);
if (_mesa_get_clamp_fragment_color(ctx, ctx->DrawBuffer)) {
params[0] = CLAMP(obj->Sampler.BorderColor.f[0], 0.0F, 1.0F);
params[1] = CLAMP(obj->Sampler.BorderColor.f[1], 0.0F, 1.0F);