From: Erico Nunes Date: Sat, 10 Aug 2019 20:44:22 +0000 (+0200) Subject: lima/ppir: lower selects to scalars X-Git-Tag: upstream/19.3.0~2514 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a8a81d10982b98868ef6cfab69693d0b70f091e;p=platform%2Fupstream%2Fmesa.git lima/ppir: lower selects to scalars nir vec4 fcsel assumes that each component of the condition will be used to select the same component from the options, but pp can't implement that since it only has 1 component for the condition. Signed-off-by: Erico Nunes Reviewed-by: Qiang Yu --- diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index 845d953..cb05c6f 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -158,6 +158,11 @@ lima_program_optimize_fs_nir(struct nir_shader *s) BITSET_SET(alu_lower, nir_op_fsqrt); BITSET_SET(alu_lower, nir_op_fsin); BITSET_SET(alu_lower, nir_op_fcos); + /* nir vec4 fcsel assumes that each component of the condition will be + * used to select the same component from the two options, but lima + * can't implement that since we only have 1 component condition */ + BITSET_SET(alu_lower, nir_op_fcsel); + BITSET_SET(alu_lower, nir_op_bcsel); NIR_PASS_V(s, nir_lower_fragcoord_wtrans); NIR_PASS_V(s, nir_lower_io, nir_var_all, type_size, 0);