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,068
    • Issues 3,068
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 999
    • Merge requests 999
  • 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
  • !12595

fdno/resource: Rewrite layout selection for allocation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Heinrich Fink requested to merge heinrich.fink/mesa:fdno-only-enforce-linear-if-only-modifier into main Aug 27, 2021
  • Overview 24
  • Commits 1
  • Pipelines 20
  • Changes 1

The previous code had a number of errors, the most glaring of which was forcing linear when it was one of the possible layouts requested.

When modifiers are being used, a list of acceptable modifiers is supplied; it's up to the driver to then make a decision as to which it thinks is most optimal.

Normally we would select between linear/tiled/UBWC in ascending order of preference according to what's possible, however we can't use a tiled layout with explicit modifiers as there is no modifier token defined for it.

Rewrite the layout-selection mechanism to always try to do the most optimal thing. If the use flags force us to, or we have a shared resource without explicit modifiers, we use linear. Failing that, we use UBWC wherever possible; if this is not possible, we use tiled for internal resources only or linear for shared resources.

Also do not rely on MOD_INVALID as a valid entry in the modifiers list to propagate use of implicit modifiers. Instead, use a zero-count of modifiers to indicate that.

Edited Aug 30, 2021 by Heinrich Fink
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fdno-only-enforce-linear-if-only-modifier