panfrost/midgard: Lower integer division
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 5 Jun 2019 15:12:58 +0000 (15:12 +0000)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 5 Jun 2019 17:59:27 +0000 (17:59 +0000)
We use the shared nir_lower_idiv pass to lower integer division, fixing
144 dEQP tests. This pass was not applied in the past due to breakage
from iabs fixed earlier in the series.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-By: Ryan Houdek <Sonicadvance1@gmail.com>
src/gallium/drivers/panfrost/ci/expected-failures.txt
src/gallium/drivers/panfrost/midgard/midgard_compile.c

index 762ceaffd5a382b1cd15340de38fc6f92735308b..0ae11321ff4b00ce27f493dfd209dd1a3ad806ab 100644 (file)
@@ -763,150 +763,6 @@ dEQP-GLES2.functional.shaders.matrix.unary_addition.dynamic_mediump_mat3_fragmen
 dEQP-GLES2.functional.shaders.matrix.unary_addition.dynamic_mediump_mat3_vertex
 dEQP-GLES2.functional.shaders.matrix.unary_addition.dynamic_mediump_mat4_fragment
 dEQP-GLES2.functional.shaders.matrix.unary_addition.dynamic_mediump_mat4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div.mediump_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.highp_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.lowp_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_effect.mediump_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.highp_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.lowp_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec2_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec2_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec3_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec3_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec4_int_fragment
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec4_int_vertex
-dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump_ivec4_vertex
 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
index 99a648788ef0a55e7c5ecbe1557997c56777d316..69e9cdcc14506b1735083cf696f5d6e2392a7b32 100644 (file)
@@ -351,6 +351,7 @@ optimise_nir(nir_shader *nir)
 
         NIR_PASS(progress, nir, nir_lower_regs_to_ssa);
         NIR_PASS(progress, nir, midgard_nir_lower_fdot2);
+        NIR_PASS(progress, nir, nir_lower_idiv);
 
         nir_lower_tex_options lower_tex_options = {
                 .lower_rect = true