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,047
    • Issues 3,047
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 990
    • Merge requests 990
  • 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
  • !20100

ir3: Reduce the maximum allowed imm offset for shared var load/store

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Danylo Piliaiev requested to merge Danil/mesa:ir3/fix/shared-load-store-offset-limit into main Dec 01, 2022
  • Overview 3
  • Commits 1
  • Pipelines 4
  • Changes 1

STL/LDL have 13 bits to store imm offset. However the most significant bit in the offset is a sign bit, so the positive offset is limited by 12 bits.

nir_opt_offsets only has the upper limit and doesn't deal with negative offsets, so shared_max should be changed to (1 << 12) - 1.

The issue was found in "Monster Hunter: World".

Fixes: 0b2da9d7 ("ir3: Limit the maximum imm offset in nir_opt_offset for shared vars")


With addition of !20099 (merged) - "Monster Hunter: World" now renders correctly:

image

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ir3/fix/shared-load-store-offset-limit