Skip to content
GitLab
  • Menu
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 2,780
    • Issues 2,780
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 935
    • Merge requests 935
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & 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
  • !18167

ail: Introduce image layout module

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Alyssa Rosenzweig requested to merge asahi/mesa:asahi/image-layout into main Aug 21, 2022
  • Overview 0
  • Commits 14
  • Pipelines 10
  • Changes 17

Introduce ail, a small library for working with the image (and buffer) layouts encountered with AGX hardware. Its design is inspired by isl. In particular, ail strives to use isl unit suffixes and to represent quantities in a canonical, API-agnostic fashion [1].

ail replaces the old miptree code (based on some ad hoc heuristics that passed a few dEQP tests). It is based on a thorough reverse-engineering of AGX's twiddled format, courtesy of Asahi Lina, Dougall Johnson, and me. This corrects our handling of many common cases that were totally wrong in the old code, leading to GPU faults.

Unlike the code, ail differentiates between pixels and elements consistently, allowing block-compressed formats like ETC2 to be supported correctly. These formats will be enabled later in the series.

This commit fixes Inochi2D, glmark2 -brefract and -bterrain, and who knows what else.

ail stands for { Asahi, AGX } Image { Layout, Library } at your convenience. ail is best served warm.

Liberal use of ail is recommended. Yum!

[1] https://docs.mesa3d.org/isl/units.html

Cc @asahilina. Your model renders upstream + this MR. (The "Lina renders Lina" demo used an early version of this branch.)

Added some docs on the image layouts supported here: https://mesa.pages.freedesktop.org/-/mesa/-/jobs/27093858/artifacts/public/drivers/asahi.html#image-layouts

Edited Aug 21, 2022 by Alyssa Rosenzweig
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: asahi/image-layout