Mesa (master): panfrost/midgard: Handle non-zero component in store

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 17 19:53:45 UTC 2019


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Mon Jun 17 12:35:57 2019 -0700

panfrost/midgard: Handle non-zero component in store

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/ci/expected-failures.txt  |  3 ---
 src/gallium/drivers/panfrost/midgard/midgard_compile.c | 14 +++++++++-----
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/panfrost/ci/expected-failures.txt b/src/gallium/drivers/panfrost/ci/expected-failures.txt
index 98632faaac7..ded1cc18ab0 100644
--- a/src/gallium/drivers/panfrost/ci/expected-failures.txt
+++ b/src/gallium/drivers/panfrost/ci/expected-failures.txt
@@ -300,11 +300,8 @@ dEQP-GLES2.functional.shaders.preprocessor.predefined_macros.line_2_fragment
 dEQP-GLES2.functional.shaders.preprocessor.predefined_macros.line_2_vertex
 dEQP-GLES2.functional.shaders.random.all_features.fragment.0
 dEQP-GLES2.functional.shaders.random.all_features.fragment.16
-dEQP-GLES2.functional.shaders.random.all_features.fragment.45
 dEQP-GLES2.functional.shaders.random.all_features.fragment.5
 dEQP-GLES2.functional.shaders.random.all_features.fragment.6
-dEQP-GLES2.functional.shaders.random.all_features.fragment.72
-dEQP-GLES2.functional.shaders.random.all_features.fragment.77
 dEQP-GLES2.functional.shaders.random.all_features.vertex.0
 dEQP-GLES2.functional.shaders.random.all_features.vertex.17
 dEQP-GLES2.functional.shaders.random.texture.vertex.10
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index 47742a5a7a9..c213f5f726d 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -1286,14 +1286,18 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
                         midgard_instruction ins = v_mov(reg, blank_alu_src, SSA_FIXED_REGISTER(26));
                         emit_mir_instruction(ctx, ins);
 
-                        /* We should have been vectorized. That also lets us
-                         * ignore the mask. because the mask component on
-                         * st_vary is (as far as I can tell) ignored [the blob
-                         * sets it to zero] */
-                        assert(nir_intrinsic_component(instr) == 0);
+                        /* We should have been vectorized, though we don't
+                         * currently check that st_vary is emitted only once
+                         * per slot (this is relevant, since there's not a mask
+                         * parameter available on the store [set to 0 by the
+                         * blob]). We do respect the component by adjusting the
+                         * swizzle. */
+
+                        unsigned component = nir_intrinsic_component(instr);
 
                         midgard_instruction st = m_st_vary_32(SSA_FIXED_REGISTER(0), offset);
                         st.load_store.unknown = 0x1E9E; /* XXX: What is this? */
+                        st.load_store.swizzle = SWIZZLE_XYZW << (2*component);
                         emit_mir_instruction(ctx, st);
                 } else {
                         DBG("Unknown store\n");




More information about the mesa-commit mailing list