From 096c5aa34a835d66b0cb5d83cc513980113a8e74 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 20 Jun 2022 14:38:06 -0400 Subject: [PATCH] mesa: enforce pointsize exports if pointsize is being clamped MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit min/max pointsize clamping affects the value that must be used, meaning that it may not be 1.0 in the case where clamping changes the value from 1.0, ensure the shader export path is used if attenuation isn't enabled Acked-by: Marek Olšák Part-of: --- src/mesa/main/points.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index ec0be2f25c1..367ee3a6317 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -39,7 +39,8 @@ static void update_point_size_set(struct gl_context *ctx) { - ctx->PointSizeIsSet = ctx->Point.Size == 1.0 || ctx->Point._Attenuated; + float size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize); + ctx->PointSizeIsSet = (size == 1.0 && ctx->Point.Size == 1.0) || ctx->Point._Attenuated; } /**