Mesa (main): mesa: skip pointsize exports if pointsize attenuation is enabled

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 22 13:53:25 UTC 2022


Module: Mesa
Branch: main
Commit: 3e2c132eb81b83bba932a6f60ec070ede5863b57
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e2c132eb81b83bba932a6f60ec070ede5863b57

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon Jun 20 14:37:04 2022 -0400

mesa: skip pointsize exports if pointsize attenuation is enabled

attenuation has its own method of exporting pointsize in fixedfunc shaders,
so ensure the attenuated size isn't overwritten

Acked-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17145>

---

 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 3c446ff4b32..ec0be2f25c1 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -39,7 +39,7 @@
 static void
 update_point_size_set(struct gl_context *ctx)
 {
-   ctx->PointSizeIsSet = ctx->Point.Size == 1.0;
+   ctx->PointSizeIsSet = ctx->Point.Size == 1.0 || ctx->Point._Attenuated;
 }
 
 /**
@@ -128,6 +128,7 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
          ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0F ||
                                    ctx->Point.Params[1] != 0.0F ||
                                    ctx->Point.Params[2] != 0.0F);
+         update_point_size_set(ctx);
          break;
       case GL_POINT_SIZE_MIN_EXT:
          if (params[0] < 0.0F) {



More information about the mesa-commit mailing list