Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,064
    • Issues 3,064
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1,012
    • Merge requests 1,012
  • 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

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

Update #1:

Due to abusive users subverting our CI facilities to mine cryptocurrency, breaking out of the container sandbox in the process, we have been forced to take actions to limit the usage of the public runners to official projects only.

The policy will be enforced on 2023-03-23 (or before if we detect abuses).

Please see this issue for more context and to see if and how you are impacted.

  • MesaMesa
  • mesamesa
  • Merge requests
  • !13817

ir3,turnip: Add gen4 new subgroup instructions and implement GL_KHR_shader_subgroup_quad

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Danylo Piliaiev requested to merge Danil/mesa:ir3/feature/gen4-new-subgroup-ops into main Nov 16, 2021
  • Overview 38
  • Commits 4
  • Pipelines 25
  • Changes 19

Added new instructions:

  • getlast.w8 #4
Perform jump for the first (CLUSTER_SIZE-1) fibers in a subgroup.
All other (SUBGROUP_SIZE-CLUSTER_SIZE+1) fibers do NOT jump.
While there is a separate field for CLUSTER_SIZE its value does
not change the behaviour in any observable way, it behaves as if
CLUSTER_SIZE is always 8.
  • brcst.active.w8
Subgroup could be divided into (subgroup_size / CLUSTER_SIZE)
clusters. For each cluster brcst.active.w would:

Given a cluster of fibers f_0, f_1, ..., f_{CLUSTER_SIZE-1} brcst
would broadcast the SRC value from the fiber f_{CLUSTER_SIZE/2-1}
to fibers f_{CLUSTER_SIZE/2}, ..., f_{CLUSTER_SIZE-1}. The DST reg
in other fibers is unaffected. If fiber f_{CLUSTER_SIZE/2-1} is
inactive the value to broadcast is taken from lower fibers
f_{CLUSTER_SIZE/2-2}, f_{CLUSTER_SIZE/2-3}, ...
If all fibers f_0, f_1, ..., f_{CLUSTER_SIZE-1} are inactive
the DST reg would remain unchanged for all fibers.

It is necessary in order to implement arithmetic subgroup
operations with prefix sum (https://en.wikipedia.org/wiki/Prefix_sum).

    For brcst.active.w8 without inactive fibers:
    	Fiber      | 0  1  2  3  4  5  6  7  | 8  9  10  11  12  13  14  15
    	SRC        | s0 s1 s2 s3 ...      s7 | s8  ...   s11 ...         s15
    	DST_before | d0 d1       ...      d7 | d8  ...                   d15
    	DST_after  | d0 d1 d2 d3 s3 s3 s3 s3 | d8  ...   d11 s11 s11 s11 s11

    If fibers 2 and 3 are inactive:
    	Fiber      | 0  1  X  X  4  5  6  7  | ...
    	SRC        | s0 s1 X  X  ...      s7 | ...
    	DST_before | d0 d1       ...      d7 | ...
    	DST_after  | d0 d1 X  X  s1 s1 s1 s1 | ...
  • quad_shuffle.brcst - subgroupQuadBroadcast
  • quad_shuffle.horiz - subgroupQuadSwapHorizontal
  • quad_shuffle.vert - subgroupQuadSwapVertical
  • quad_shuffle.diag - subgroupQuadSwapDiagonal
  • getfiberid - gl_SubgroupID

Implemented:

  • Enable subgroup ops in fragment shader
  • GL_KHR_shader_subgroup_quad (was the easiest one)
  • Use getfiberid for SubgroupInvocationID

One issue left is:

  • Infinite loop in lower_block of ir3_lower_subgroups:
dEQP-VK.subgroups.basic.graphics.subgroupbarrier

instruction list get corrupted after split_block ???

Edited Nov 22, 2021 by Danylo Piliaiev
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ir3/feature/gen4-new-subgroup-ops