summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2019-05-03 01:54:16 +0000
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>2019-05-04 19:08:51 +0000
commit3d7874c6999967104dab66b181d8ba956cc46e7d (patch)
treee2c9c6dd2e436feb86b258f6c7ec346bad2daf59 /src
parent31f5a43bf0d01ea0cab54a05eadf6e6778fc570f (diff)
panfrost/midgard: Fix integer selection
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/ci/expected-failures.txt32
-rw-r--r--src/gallium/drivers/panfrost/midgard/midgard_compile.c11
2 files changed, 10 insertions, 33 deletions
diff --git a/src/gallium/drivers/panfrost/ci/expected-failures.txt b/src/gallium/drivers/panfrost/ci/expected-failures.txt
index 837b4d2ff1c..08dbe3c9233 100644
--- a/src/gallium/drivers/panfrost/ci/expected-failures.txt
+++ b/src/gallium/drivers/panfrost/ci/expected-failures.txt
@@ -1928,38 +1928,6 @@ dEQP-GLES2.functional.shaders.operator.binary_operator.div_assign_result.mediump
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.operator.selection.bool_fragment
-dEQP-GLES2.functional.shaders.operator.selection.bool_vertex
-dEQP-GLES2.functional.shaders.operator.selection.bvec2_fragment
-dEQP-GLES2.functional.shaders.operator.selection.bvec2_vertex
-dEQP-GLES2.functional.shaders.operator.selection.bvec3_fragment
-dEQP-GLES2.functional.shaders.operator.selection.bvec3_vertex
-dEQP-GLES2.functional.shaders.operator.selection.bvec4_fragment
-dEQP-GLES2.functional.shaders.operator.selection.bvec4_vertex
-dEQP-GLES2.functional.shaders.operator.selection.highp_int_fragment
-dEQP-GLES2.functional.shaders.operator.selection.highp_int_vertex
-dEQP-GLES2.functional.shaders.operator.selection.highp_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.selection.highp_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.selection.highp_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.selection.highp_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.selection.highp_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.selection.highp_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.selection.lowp_int_fragment
-dEQP-GLES2.functional.shaders.operator.selection.lowp_int_vertex
-dEQP-GLES2.functional.shaders.operator.selection.lowp_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.selection.lowp_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.selection.lowp_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.selection.lowp_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.selection.lowp_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.selection.lowp_ivec4_vertex
-dEQP-GLES2.functional.shaders.operator.selection.mediump_int_fragment
-dEQP-GLES2.functional.shaders.operator.selection.mediump_int_vertex
-dEQP-GLES2.functional.shaders.operator.selection.mediump_ivec2_fragment
-dEQP-GLES2.functional.shaders.operator.selection.mediump_ivec2_vertex
-dEQP-GLES2.functional.shaders.operator.selection.mediump_ivec3_fragment
-dEQP-GLES2.functional.shaders.operator.selection.mediump_ivec3_vertex
-dEQP-GLES2.functional.shaders.operator.selection.mediump_ivec4_fragment
-dEQP-GLES2.functional.shaders.operator.selection.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.10
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index aa3070839fb..6dffd7290d2 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -1239,7 +1239,16 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
instr->src[1] = instr->src[0];
instr->src[0] = instr->src[2];
} else {
- op = midgard_alu_op_fcsel;
+ /* Midgard features both fcsel and icsel, depending on
+ * the type of the arguments/output. However, as long
+ * as we're careful we can _always_ use icsel and
+ * _never_ need fcsel, since the latter does additional
+ * floating-point-specific processing whereas the
+ * former just moves bits on the wire. It's not obvious
+ * why these are separate opcodes, save for the ability
+ * to do things like sat/pos/abs/neg for free */
+
+ op = midgard_alu_op_icsel;
/* csel works as a two-arg in Midgard, since the condition is hardcoded in r31.w */
nr_inputs = 2;