lima/ppir: Fix sin/cos lowering
This fixes the glsl-sin and glsl-cos piglit tests. Though it causes regressions, i think this is some random thing, which is not caused by this code changes: http://imkreisrum.de/piglit/master_fed6aa2fec3_sinfix/index.html
Signed-off-by: Andreas Baierl ichgeh@imkreisrum.de
Merge request reports
Activity
added lima label
249 249 mul_alu->dest.ssa.num_components = num_components; 250 250 mul_alu->dest.ssa.live_in = INT_MAX; 251 251 mul_alu->dest.ssa.live_out = 0; 252 mul_alu->dest.write_mask = u_bit_consecutive(0, num_components); 252 mul_alu->dest.write_mask = alu->dest.write_mask; Nice catch. But I'm afraid this fix is not perfect:
-
mul_alu->dest.ssa.num_components
is in-correct ifalu->src[0].ssa->num_components != alu->dest.reg->num_component
- although not used, some component of
mul_alu->dest.ssa
is not set if mask is like0b0101
1 & 2 will also affect register allocation.
Better parse the
alu->src[0].swizzle
and mask to construct a fully used ssa and modify thealu->src[0].swizzle
.-
It would be better if you can just move sin/cos lowering to lima nir after !1572 (merged)
Edited by Qiang Yu
mentioned in merge request !1586 (merged)
Due to !1586 (merged) this can be closed.