Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,039
    • Issues 3,039
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 986
    • Merge requests 986
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Merge requests
  • !17560

r300: merge ALU instructions writing different channels of the same destination using the constant swizzles

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Pavel Ondračka requested to merge ondracka/mesa:r300_merge_channels into main Jul 15, 2022
  • Overview 10
  • Commits 8
  • Pipelines 7
  • Changes 3

This series is intended to implement some of the optimizations discussed in #6188 (closed)

It merge instructions writing different channels of the same destination. It can merge two MOVs into ADD, and MOVs with ADD/MUL (into ADD/MULL if they share a source) or into MAD if not. There is still quite a lot of possibilities, specifically: ADD+ADD, MUL+ADD or MOV+MAD (if they share a source) and maybe some others.

total instructions in shared programs: 155488 -> 149176 (-4.06%)
instructions in affected programs: 126672 -> 120360 (-4.98%)
helped: 1530
HURT: 123

total presub in shared programs: 8226 -> 7983 (-2.95%)
presub in affected programs: 970 -> 727 (-25.05%)
helped: 25
HURT: 13

total temps in shared programs: 20841 -> 20617 (-1.07%)
temps in affected programs: 3492 -> 3268 (-6.41%)
helped: 207
HURT: 65

total lits in shared programs: 4328 -> 4196 (-3.05%)
lits in affected programs: 558 -> 426 (-23.66%)
helped: 39
HURT: 30

There is a 0.3 fps increase in Lightsmark (29.9 -> 30.2, N=3) and almost negligible 0.05 fps increase in Unigine Sanctuary (12.07->12.12, N=5). No measurable change in glmark2 or Unigine Tropics.

CC @gawin

Edited Aug 11, 2022 by Pavel Ondračka
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: r300_merge_channels