summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-06-17 11:49:44 -0700
committerAlyssa Rosenzweig <[email protected]>2019-06-17 12:52:50 -0700
commit2c9e124f8119728aaebab493cdaf9f15d4ec7f84 (patch)
tree1c71167dfe04e77bc90705e8d812600365e68266 /src/gallium/drivers/panfrost
parenteba932ea43a702e097218d2d4b1df56e0d1e3940 (diff)
panfrost/midgard: Apply writemask to LUTs
Fixes LUT instructions with NIR registers. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r--src/gallium/drivers/panfrost/ci/expected-failures.txt2
-rw-r--r--src/gallium/drivers/panfrost/midgard/midgard_compile.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/panfrost/ci/expected-failures.txt b/src/gallium/drivers/panfrost/ci/expected-failures.txt
index 66ca0507cc3..98632faaac7 100644
--- a/src/gallium/drivers/panfrost/ci/expected-failures.txt
+++ b/src/gallium/drivers/panfrost/ci/expected-failures.txt
@@ -307,8 +307,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.exponential.fragment.46
-dEQP-GLES2.functional.shaders.random.exponential.vertex.46
dEQP-GLES2.functional.shaders.random.texture.vertex.10
dEQP-GLES2.functional.shaders.random.texture.vertex.11
dEQP-GLES2.functional.shaders.random.texture.vertex.12
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index cfb17572b35..47742a5a7a9 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -985,7 +985,14 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
memcpy(original_swizzle, nirmods[0]->swizzle, sizeof(nirmods[0]->swizzle));
for (int i = 0; i < nr_components; ++i) {
- ins.alu.mask = (0x3) << (2 * i); /* Mask the associated component */
+ /* Mask the associated component, dropping the
+ * instruction if needed */
+
+ ins.alu.mask = (0x3) << (2 * i);
+ ins.alu.mask &= alu.mask;
+
+ if (!ins.alu.mask)
+ continue;
for (int j = 0; j < 4; ++j)
nirmods[0]->swizzle[j] = original_swizzle[i]; /* Pull from the correct component */