Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • V virglrenderer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 73
    • Issues 73
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 45
    • Merge requests 45
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • virgl
  • virglrenderer
  • Merge requests
  • !811

shader: Handle the created input array like an overlapping array

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Gert Wollny requested to merge gerddie/virglrenderer:fix-layout-rework into master May 18, 2022
  • Overview 8
  • Commits 1
  • Pipelines 38
  • Changes 3

shader: Handle the forced input array like an overlapping array

With NTT the guest no longer sends array info, so if we have indirect access to IO variables, then we create an array replacing the normal generic and patch IO variables, and in order to match shader interfaces, we also sometimes have to declare an input array because the previous shader stage requires an output array.

Sometimes a TES will not read all inputs of a TCS, and in the guest NIR will not emit declarations for the inputs that are not read, so that we may end up with declaring an input array that uses more elements than what we see from the TGSI, and if the first element that is actually read is not at generic or patch location zero, we were not reading the right input.

With the new layout handling, that allows redirecting a declared input to another declared or array we must handle these force- created arrays the same way, and redirect the access to all inputs to this array, taking the offsets into the arrays into account.

Fixes: c89badf6 shader: merge overlapping arrays and always emit vec4 generics

Related: mesa/mesa#6481

Edited May 18, 2022 by Gert Wollny
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix-layout-rework