mesa: break out PointSizeIsOne setting to util function

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17145>
This commit is contained in:
Mike Blumenkrantz 2022-06-20 14:35:35 -04:00 committed by Marge Bot
parent 4830cc77cb
commit b2155a044d
1 changed files with 7 additions and 1 deletions

View File

@ -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);
}