Use of workgroups in pixel shader
AssigneeAdvanced Micro Devices, Inc.
InventorSkyler Jonathon Saleh
Life of this patent
Estimating the term…
Abstract
A technique for executing pixel shader programs is provided. The pixel shader programs are executed in workgroups, which allows access by work-items to a local data store and also allows program synchronization at barrier points. Utilizing workgroups allows for more flexible and efficient execution than previous implementations in the pixel shader stage. Several techniques for assigning fragments to wavefronts and workgroups are also provided. The techniques differ in the degree of geometric locality of fragments within wavefronts and/or workgroups. In some techniques, a greater degree of locality is enforced, which reduces processing unit occupancy but also reduces program complexity. In other techniques, a lower degree of locality is enforced, which increases processing unit occupancy.
Claims20
A method for executing a pixel shader program, the method comprising:
- grouping fragments together for execution of the pixel shader program as two or more wavefronts in a workgroup, wherein wavefronts include one or more work-items, each of which is assigned to a different fragment, and wherein fragments from different triangles are prevented from being grouped together in a single workgroup;
- accessing a local data store as specified by the pixel shader program;
- synchronizing the wavefronts as specified by one or more barrier instructions of the pixel shader program;
- and
- completing execution of the workgroup and outputting results for further processing in a graphics processing pipeline.
An accelerated processing device (“APD”) for executing a pixel shader program, the APD comprising:
- a scheduler configured to:
- group fragments together for execution of the pixel shader program as two or more wavefronts in a workgroup, wherein fragments from different triangles are prevented from being grouped together in a single workgroup;
- a compute unit configured to:
- access a local data store as specified by the pixel shader program,
- synchronize the wavefronts as specified by one or more barrier instructions of the pixel shader program, and
- complete execution of the workgroup and output results for further processing in a graphics processing pipeline.
A computing device comprising:
- a processor;
- and
- an accelerated processing device (“APD”) for executing a pixel shader program received from the processor, the APD comprising:
- a scheduler configured to:
- group fragments together for execution of the pixel shader program as two or more wavefronts in a workgroup, wherein fragments from different triangles are prevented from being grouped together in a single workgroup;
- a compute unit configured to:
- access a local data store as specified by the pixel shader program,
- synchronize the wavefronts as specified by one or more barrier instructions of the pixel shader program, and
- complete execution of the workgroup and output results for further processing in a graphics processing pipeline.
Dependencies are inferred from the claim text.