mesa: enforce pointsize exports if pointsize is being clamped

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 <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:38:06 -04:00 committed by Marge Bot
parent 3e2c132eb8
commit 096c5aa34a
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
/**