Mesa (main): mesa: rename PointSizeIsOne -> PointSizeIsSet
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 22 13:53:25 UTC 2022
Module: Mesa
Branch: main
Commit: de732cf61b5e09970de7702ecf2faac0faf1910d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=de732cf61b5e09970de7702ecf2faac0faf1910d
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Jun 20 14:36:21 2022 -0400
mesa: rename PointSizeIsOne -> PointSizeIsSet
this will better convey the meaning of the value
Acked-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17145>
---
src/mesa/main/context.c | 2 +-
src/mesa/main/mtypes.h | 2 +-
src/mesa/main/points.c | 6 +++---
src/mesa/state_tracker/st_atom.c | 2 +-
src/mesa/state_tracker/st_atom_shader.c | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 8a8193c521d..21f53d489ed 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1077,7 +1077,7 @@ _mesa_initialize_context(struct gl_context *ctx,
break;
}
ctx->VertexProgram.PointSizeEnabled = ctx->API == API_OPENGLES2;
- ctx->PointSizeIsOne = GL_TRUE;
+ ctx->PointSizeIsSet = GL_TRUE;
ctx->FirstTimeCurrent = GL_TRUE;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 670a40ee545..82fdcace95b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3569,7 +3569,7 @@ struct gl_context
GLuint TextureStateTimestamp; /**< detect changes to shared state */
GLboolean LastVertexStageDirty; /**< the last vertex stage has changed */
- GLboolean PointSizeIsOne; /**< the glPointSize value is 1.0 */
+ GLboolean PointSizeIsSet; /**< the glPointSize value in the shader is set */
/** \name For debugging/development only */
/*@{*/
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 7e115eb9b13..3c446ff4b32 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -37,9 +37,9 @@
static void
-is_point_size_one(struct gl_context *ctx)
+update_point_size_set(struct gl_context *ctx)
{
- ctx->PointSizeIsOne = ctx->Point.Size == 1.0;
+ ctx->PointSizeIsSet = ctx->Point.Size == 1.0;
}
/**
@@ -60,7 +60,7 @@ point_size(struct gl_context *ctx, GLfloat size, bool no_error)
FLUSH_VERTICES(ctx, _NEW_POINT, GL_POINT_BIT);
ctx->Point.Size = size;
- is_point_size_one(ctx);
+ update_point_size_set(ctx);
}
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index cc23b054390..be2da237da2 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -149,7 +149,7 @@ static void check_program_state( struct st_context *st )
}
if (st->lower_point_size && st->ctx->LastVertexStageDirty &&
- !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsOne) {
+ !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsSet) {
if (new_gp) {
st->dirty |= ST_NEW_GS_CONSTANTS;
} else if (new_tep) {
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 678673537b0..da0473b9184 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -236,7 +236,7 @@ st_update_vp( struct st_context *st )
!st->ctx->TessEvalProgram._Current) {
/* _NEW_POINT */
if (st->lower_point_size)
- key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsOne;
+ key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsSet;
/* _NEW_TRANSFORM */
if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx))
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
@@ -293,7 +293,7 @@ st_update_common_program(struct st_context *st, struct gl_program *prog,
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
if (st->lower_point_size)
- key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsOne;
+ key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsSet;
}
update_gl_clamp(st, prog, key.gl_clamp);
More information about the mesa-commit
mailing list