Skip to content
Snippets Groups Projects

lima/ppir: Fix sin/cos lowering

Closed Andreas Baierl requested to merge rellla/mesa:fix_sin into master
1 unresolved thread

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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:

    1. mul_alu->dest.ssa.num_components is in-correct if alu->src[0].ssa->num_components != alu->dest.reg->num_component
    2. although not used, some component of mul_alu->dest.ssa is not set if mask is like 0b0101

    1 & 2 will also affect register allocation.

    Better parse the alu->src[0].swizzle and mask to construct a fully used ssa and modify the alu->src[0].swizzle.

  • Author Developer

    I will look into it, how to solve it better. I have a strong feeling, we have some more swizzle/write_mask issues flying around ....

  • It would be better if you can just move sin/cos lowering to lima nir after !1572 (merged)

    Edited by Qiang Yu
  • Please register or sign in to reply
  • Vasily Khoruzhick mentioned in merge request !1586 (merged)

    mentioned in merge request !1586 (merged)

  • Author Developer

    Due to !1586 (merged) this can be closed.

  • Please register or sign in to reply
    Loading