diff options
author | Erico Nunes <[email protected]> | 2019-08-10 22:44:22 +0200 |
---|---|---|
committer | Erico Nunes <[email protected]> | 2019-08-25 18:29:12 +0000 |
commit | 2a8a81d10982b98868ef6cfab69693d0b70f091e (patch) | |
tree | 86870d667c061edd483e9353fb30390d75affa9c | |
parent | 27e7603c344a31d5b2f0ef45ac54ee4c643910fc (diff) |
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 <[email protected]>
Reviewed-by: Qiang Yu <[email protected]>
-rw-r--r-- | src/gallium/drivers/lima/lima_program.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index 845d9535aac..cb05c6f379f 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); |