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,773
    • Issues 2,773
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 927
    • Merge requests 927
  • 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
  • Mesa
  • mesamesa
  • Merge requests
  • !14929

radv: Implement task shader support (compiler-related commits only)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Timur Kristóf requested to merge Venemo/mesa:radv-task-shader into main Feb 08, 2022
  • Overview 70
  • Commits 15
  • Pipelines 70
  • Changes 16

Implement task shader support (but not yet the task/mesh draw commands) for the NV_mesh_shader extension.

What is a Task Shader?

Task shader is an optional stage that can run before a Mesh shader in a graphics pipeline. It's a compute-like stage whose primary output is the number of launched mesh shader workgroups (1 task shader workgroup can launch up to 2^22 mesh shader workgroups), and also has an optional payload output which is up to 16K bytes.

Implementations details

Task shaders on RDNA2 work by submitting two queues in parallel: a compute queue which executes the actual task shader (compiled into a compute shader), and a graphics queue which executes the mesh shader and everything else. It is required that the compute submission is added as a scheduled dependency to the graphics submission.

  • NIR, SPIR-V: a new NIR variable mode nir_var_mem_task_payload is added which can represent the task shader output payload. This is necessary because nir_var_shader_out is limited to 32x vec4 generic outputs, so can't fit the 16K.
  • AC: a few new I/O lowering passes are added:
    • Task shader outputs
    • Mesh shader inputs
    • Emulation of firstTask in Task shaders (not supported natively by the hardware)
  • RADV:
    • Add ability to do the compute submission as a dependency of the graphics submission
    • Compile and execute task shaders

Future work, planned as follow-up

  • Task + Mesh shader draw calls
Edited May 11, 2022 by Timur Kristóf
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: radv-task-shader