mesa: break out PointSizeIsOne setting to util function
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 20 Jun 2022 18:35:35 +0000 (14:35 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 22 Jun 2022 13:27:29 +0000 (13:27 +0000)
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17145>

src/mesa/main/points.c

index ff19d1f..7e115eb 100644 (file)
 #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);
 }