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,062
    • Issues 3,062
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 993
    • Merge requests 993
  • 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
  • !5966

nir: Use a single list for all global variables

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Faith Ekstrand requested to merge gfxstrand/mesa:review/nir-global-var-list into master Jul 18, 2020
  • Overview 29
  • Commits 37
  • Pipelines 42
  • Changes 103

This MR implements the change suggested in #3145 (closed) in which we switch NIR to use a single list for all shader-level variables. See the issue for more discussion of why.

I've attempted to break any major driver or optimization pass changes out into separate commits for easier review. However, in the end, most of the bugs I had to fix bisected to the mega-commit which actually changes data structures. 😦 Once this lands, there will likely be some clean-up that can be done in various passes and drivers. That's left as an exercise to the reader.

I've run this MR through CI and it seems to pass on all the Intel platforms as well as everyone that's in CI. However, there are other drivers such as radeonsi, RADV, r600, and lima which I can't test in CI. Please test this MR with your driver as soon as convenient.

To provide a sanity check, I ran shader-db across the entire MR and there were no changes on on ICL:

total instructions in shared programs: 19723821 -> 19723821 (0.00%)
instructions in affected programs: 0 -> 0
helped: 0
HURT: 0

total loops in shared programs: 5973 -> 5973 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total cycles in shared programs: 489407727 -> 489407727 (0.00%)
cycles in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 12487 -> 12487 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0

total fills in shared programs: 12809 -> 12809 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0

total sends in shared programs: 1010053 -> 1010053 (0.00%)
sends in affected programs: 0 -> 0
helped: 0
HURT: 0

LOST:   0
GAINED: 0

Total CPU time (seconds): 2657.58 -> 2640.10 (-0.66%)

As you can see, compile time also did not increase measurably which was one of the concerns raised in #3145 (closed). However, this is only one set of runs on a laptop. I've not done multiple runs on a machine with super-awesome thermals so there may still be a small change.

Closes: #3145 (closed)

Edited Jul 29, 2020 by Faith Ekstrand
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: review/nir-global-var-list