Mesa (main): panfrost: Disable point size upper limit clamping

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Mar 5 20:39:13 UTC 2022


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

Author: Icecream95 <ixn at disroot.org>
Date:   Tue Jan 18 16:02:12 2022 +1300

panfrost: Disable point size upper limit clamping

The hardware already clamps this, there is no need to do it in the
shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15250>

---

 src/panfrost/bifrost/bifrost_compile.c | 2 +-
 src/panfrost/midgard/midgard_compile.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index d11c41d0bfb..19ffb116530 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -3880,7 +3880,7 @@ bi_finalize_nir(nir_shader *nir, unsigned gpu_id, bool is_blend)
 
         if (nir->info.stage == MESA_SHADER_VERTEX) {
                 NIR_PASS_V(nir, nir_lower_viewport_transform);
-                NIR_PASS_V(nir, nir_lower_point_size, 1.0, 1024.0);
+                NIR_PASS_V(nir, nir_lower_point_size, 1.0, 0.0);
         }
 
         /* Lower large arrays to scratch and small arrays to bcsel (TODO: tune
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 6f2204bb6f2..79ba206ca38 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -3155,7 +3155,7 @@ midgard_compile_shader_nir(nir_shader *nir,
 
         if (ctx->stage == MESA_SHADER_VERTEX) {
                 NIR_PASS_V(nir, nir_lower_viewport_transform);
-                NIR_PASS_V(nir, nir_lower_point_size, 1.0, 1024.0);
+                NIR_PASS_V(nir, nir_lower_point_size, 1.0, 0.0);
         }
 
         NIR_PASS_V(nir, nir_lower_var_copies);



More information about the mesa-commit mailing list