freedreno/ir3: avoid applying (sat) on bary.f
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 17 May 2020 03:59:40 +0000 (23:59 -0400)
committerMarge Bot <eric+marge@anholt.net>
Sun, 17 May 2020 21:17:57 +0000 (21:17 +0000)
This causes failures on a3xx resulting in the non-sensical dEQP failures
on packUnorm2x16. The same test uses ldlv on a4xx+, so just disallow
(sat) on bary.f on all generations.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5074>

.gitlab-ci/deqp-freedreno-a307-fails.txt
src/freedreno/ir3/ir3_compiler_nir.c

index 557ff1a1745818c88145584769448959901a5862..3f50ba3118690cccace71a6ad7af52016431a3e6 100644 (file)
@@ -235,9 +235,6 @@ dEQP-GLES3.functional.rasterizer_discard.scissor.write_stencil_points
 dEQP-GLES3.functional.rasterizer_discard.scissor.write_stencil_triangle_fan
 dEQP-GLES3.functional.rasterizer_discard.scissor.write_stencil_triangles
 dEQP-GLES3.functional.rasterizer_discard.scissor.write_stencil_triangle_strip
-dEQP-GLES3.functional.shaders.builtin_functions.pack_unpack.packunorm2x16_highp_fragment
-dEQP-GLES3.functional.shaders.builtin_functions.pack_unpack.packunorm2x16_lowp_fragment
-dEQP-GLES3.functional.shaders.builtin_functions.pack_unpack.packunorm2x16_mediump_fragment
 dEQP-GLES3.functional.shaders.derivate.dfdx.fastest.fbo_msaa4.float_highp
 dEQP-GLES3.functional.shaders.derivate.dfdx.fastest.fbo_msaa4.float_mediump
 dEQP-GLES3.functional.shaders.derivate.dfdx.fastest.fbo_msaa4.vec2_highp
index 7ba65e1498e0375d96a0a10b0128819ab42b9904..0bfdb7adf386f66a3c7e604074f2753c3536d7b8 100644 (file)
@@ -430,9 +430,14 @@ emit_alu(struct ir3_context *ctx, nir_alu_instr *alu)
                 * src instruction and create a mov.  This is easier for cp
                 * to eliminate.
                 *
+                * NOTE: a3xx definitely seen not working with flat bary.f. Same test
+                * uses ldlv on a4xx+, so not definitive. Seems rare enough to apply
+                * everywhere.
+                *
                 * TODO probably opc_cat==4 is ok too
                 */
                if (alu->src[0].src.is_ssa &&
+                               src[0]->opc != OPC_BARY_F &&
                                (list_length(&alu->src[0].src.ssa->uses) == 1) &&
                                ((opc_cat(src[0]->opc) == 2) || (opc_cat(src[0]->opc) == 3))) {
                        src[0]->flags |= IR3_INSTR_SAT;