Mesa (main): mesa: break out PointSizeIsOne setting to util function
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 22 13:53:25 UTC 2022
Module: Mesa
Branch: main
Commit: b2155a044d1ab1d511bb87da8534ad576a3f06b6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b2155a044d1ab1d511bb87da8534ad576a3f06b6
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Jun 20 14:35:35 2022 -0400
mesa: break out PointSizeIsOne setting to util function
Acked-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17145>
---
src/mesa/main/points.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index ff19d1f6758..7e115eb9b13 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -36,6 +36,12 @@
#include "api_exec_decl.h"
+static void
+is_point_size_one(struct gl_context *ctx)
+{
+ ctx->PointSizeIsOne = ctx->Point.Size == 1.0;
+}
+
/**
* Set current point size.
* \param size point diameter in pixels
@@ -54,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;
- ctx->PointSizeIsOne = ctx->Point.Size == 1.0;
+ is_point_size_one(ctx);
}
More information about the mesa-commit
mailing list