Mesa (main): panfrost: Don't set CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 5 21:42:39 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Mon Sep 27 17:32:57 2021 -0400

panfrost: Don't set CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER

We already set HALF_INTEGER, which is what the compiler actually does.
If we also set PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER, we get
incorrect lowering. Only set the CAP we respect.

On Bifrost, this convention is arbitrary. We should consider moving the
Bifrost lowering into NIR to optimize this better...

Fixes Piglit glsl-arb-fragment-coord-conventions.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070>

---

 src/gallium/drivers/panfrost/pan_screen.c     |  4 ++--
 src/panfrost/ci/piglit-panfrost-g52-fails.txt | 15 ---------------
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index c4c4b22585d..19024118f02 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -224,12 +224,12 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
                 return MAX_MIP_LEVELS;
 
         case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
-                /* Hardware is natively upper left */
+        case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
+                /* Hardware is upper left. Pixel center at (0.5, 0.5) */
                 return 0;
 
         case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
         case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
-        case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
         case PIPE_CAP_TGSI_TEXCOORD:
                 return 1;
 
diff --git a/src/panfrost/ci/piglit-panfrost-g52-fails.txt b/src/panfrost/ci/piglit-panfrost-g52-fails.txt
index 7f5440e79fc..4cd624949a8 100644
--- a/src/panfrost/ci/piglit-panfrost-g52-fails.txt
+++ b/src/panfrost/ci/piglit-panfrost-g52-fails.txt
@@ -18,7 +18,6 @@ glx at glx-query-drawable-glx_fbconfig_id-window,Fail
 glx at glx-swap-pixmap-bad,Fail
 glx at glx-visuals-depth -pixmap,Crash
 glx at glx-visuals-stencil -pixmap,Crash
-shaders at glsl-arb-fragment-coord-conventions,Fail
 shaders at glsl-bug-110796,Fail
 shaders at glsl-fs-pointcoord,Fail
 shaders at glsl-uniform-interstage-limits@subdivide 5,Crash
@@ -367,20 +366,6 @@ spec at arb_texture_multisample@arb_texture_multisample-dsa-texelfetch at Texture type
 spec at arb_texture_multisample@arb_texture_multisample-dsa-texelfetch at Texture type: GL_RGBA8,Fail
 spec at arb_texture_multisample@arb_texture_multisample-dsa-texelfetch at Texture type: GL_RGBA8I,Fail
 spec at arb_texture_multisample@arb_texture_multisample-dsa-texelfetch at Texture type: GL_SRGB8_ALPHA8,Fail
-spec at arb_texture_multisample@texelfetch at 2-fs-sampler2dmsarray,Fail
-spec at arb_texture_multisample@texelfetch at 2-fs-sampler2dms,Fail
-spec at arb_texture_multisample@texelfetch at 2-vs-sampler2dmsarray,Fail
-spec at arb_texture_multisample@texelfetch at 2-vs-sampler2dms,Fail
-spec at arb_texture_multisample@texelfetch at 4-fs-sampler2dmsarray,Fail
-spec at arb_texture_multisample@texelfetch at 4-fs-sampler2dms,Fail
-spec at arb_texture_multisample@texelfetch at 4-vs-sampler2dmsarray,Fail
-spec at arb_texture_multisample@texelfetch at 4-vs-sampler2dms,Fail
-spec at arb_texture_multisample@texelfetch fs sampler2dms 4 1x130-501x130,Fail
-spec at arb_texture_multisample@texelfetch fs sampler2dms 4 1x71-501x71,Fail
-spec at arb_texture_multisample@texelfetch fs sampler2dms 4 281x1-281x130,Fail
-spec at arb_texture_multisample@texelfetch fs sampler2dms 4 71x1-71x130,Fail
-spec at arb_texture_multisample@texelfetch fs sampler2dmsarray 4 1x129x9-98x129x9,Fail
-spec at arb_texture_multisample@texelfetch fs sampler2dmsarray 4 98x1x9-98x129x9,Fail
 spec at arb_texture_rectangle@1-1-linear-texture,Fail
 spec at arb_texture_rectangle@tex-miplevel-selection gl2:texture() 2drect,Crash
 spec at arb_texture_rectangle@tex-miplevel-selection gl2:texture() 2drectshadow,Crash



More information about the mesa-commit mailing list