Mesa (master): panfrost: Fix ->reads_frag_coord assignment

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 10 14:51:04 UTC 2020


Module: Mesa
Branch: master
Commit: f23574af2c65b9c0342656cb543bcb025cb38d9f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f23574af2c65b9c0342656cb543bcb025cb38d9f

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Tue Nov 10 11:01:50 2020 +0100

panfrost: Fix ->reads_frag_coord assignment

Let's assign ->reads_frag_coord only once to handle the sysval case
(used on Bifrost) correctly.

Fixes: f1de952b695b ("panfrost: Use shader_info harder")
Cc: 20.3 <mesa-stable>
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7527>

---

 .gitlab-ci/deqp-panfrost-g52-fails.txt      | 1 -
 src/gallium/drivers/panfrost/pan_assemble.c | 6 ++----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci/deqp-panfrost-g52-fails.txt b/.gitlab-ci/deqp-panfrost-g52-fails.txt
index 15c26d738e3..ef21b83835b 100644
--- a/.gitlab-ci/deqp-panfrost-g52-fails.txt
+++ b/.gitlab-ci/deqp-panfrost-g52-fails.txt
@@ -15,7 +15,6 @@ dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_
 dEQP-GLES2.functional.fbo.completeness.size.distinct,Fail
 dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
 dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed,Fail
-dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_xyz,Fail
 dEQP-GLES2.functional.shaders.random.all_features.fragment.88,Fail
 dEQP-GLES2.functional.shaders.texture_functions.vertex.texturecubelod,Fail
 dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_linear,Fail
diff --git a/src/gallium/drivers/panfrost/pan_assemble.c b/src/gallium/drivers/panfrost/pan_assemble.c
index 6804a919b9b..b39ebfed2eb 100644
--- a/src/gallium/drivers/panfrost/pan_assemble.c
+++ b/src/gallium/drivers/panfrost/pan_assemble.c
@@ -284,9 +284,6 @@ panfrost_shader_compile(struct panfrost_context *ctx,
         bool vertex_id = s->info.system_values_read & (1 << SYSTEM_VALUE_VERTEX_ID);
         bool instance_id = s->info.system_values_read & (1 << SYSTEM_VALUE_INSTANCE_ID);
 
-        /* On Bifrost it's a sysval, on Midgard it's a varying */
-        state->reads_frag_coord = s->info.system_values_read & (1 << SYSTEM_VALUE_FRAG_COORD);
-
         state->writes_global = s->info.writes_memory;
 
         switch (stage) {
@@ -342,7 +339,8 @@ panfrost_shader_compile(struct panfrost_context *ctx,
         state->helper_invocations = s->info.fs.needs_helper_invocations;
         state->stack_size = program->tls_size;
 
-        state->reads_frag_coord = s->info.inputs_read & (1 << VARYING_SLOT_POS);
+        state->reads_frag_coord = (s->info.inputs_read & (1 << VARYING_SLOT_POS)) ||
+                                  (s->info.system_values_read & (1 << SYSTEM_VALUE_FRAG_COORD));
         state->reads_point_coord = s->info.inputs_read & (1 << VARYING_SLOT_PNTC);
         state->reads_face = (s->info.inputs_read & (1 << VARYING_SLOT_FACE)) ||
                             (s->info.system_values_read & (1 << SYSTEM_VALUE_FRONT_FACE));



More information about the mesa-commit mailing list