From 02ce3abd8aa7880ef668e09c3a6acaa73d31bcc7 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Thu, 21 Jul 2022 18:42:02 +0200 Subject: [PATCH] frontend/nine: Fix missing clamping of pointsize for ff Seen while working on this code. It seems to be a sane thing to do. Signed-off-by: Axel Davy Part-of: --- src/gallium/frontends/nine/nine_ff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/nine/nine_ff.c b/src/gallium/frontends/nine/nine_ff.c index 6705fc2208c..861092a8ba7 100644 --- a/src/gallium/frontends/nine/nine_ff.c +++ b/src/gallium/frontends/nine/nine_ff.c @@ -1956,7 +1956,9 @@ nine_ff_load_point_and_fog_params(struct NineDevice9 *device) return; dst[26].x = asfloat(context->rs[D3DRS_POINTSIZE_MIN]); dst[26].y = asfloat(context->rs[D3DRS_POINTSIZE_MAX]); - dst[26].z = asfloat(context->rs[D3DRS_POINTSIZE]); + dst[26].z = CLAMP(asfloat(context->rs[D3DRS_POINTSIZE]), + asfloat(context->rs[D3DRS_POINTSIZE_MIN]), + asfloat(context->rs[D3DRS_POINTSIZE_MAX])); dst[26].w = asfloat(context->rs[D3DRS_POINTSCALE_A]); dst[27].x = asfloat(context->rs[D3DRS_POINTSCALE_B]); dst[27].y = asfloat(context->rs[D3DRS_POINTSCALE_C]);