Mesa (main): mesa: add a bool indicating when pointsize == 1.0
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 02:28:11 UTC 2022
Module: Mesa
Branch: main
Commit: 02b573e03e45b21a1018dc6766406a962af2e63e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=02b573e03e45b21a1018dc6766406a962af2e63e
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Wed Mar 30 09:19:50 2022 -0400
mesa: add a bool indicating when pointsize == 1.0
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15699>
---
src/mesa/main/mtypes.h | 1 +
src/mesa/main/points.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 83fb59ecbef..cd2af9f7225 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3540,6 +3540,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 */
/** \name For debugging/development only */
/*@{*/
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 3734bf01ad9..ff19d1f6758 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -54,6 +54,7 @@ point_size(struct gl_context *ctx, GLfloat size, bool no_error)
FLUSH_VERTICES(ctx, _NEW_POINT, GL_POINT_BIT);
ctx->Point.Size = size;
+ ctx->PointSizeIsOne = ctx->Point.Size == 1.0;
}
More information about the mesa-commit
mailing list