IP Library Granted Patent US 10,002,404
Granted Patent B2
US 10,002,404 · App. 14/687,832 · Granted Jun 19, 2018

Optimizing shading process for mixed order-sensitive and order-insensitive shader operations

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,002,404
App. No.
14/687,832
Granted
Jun 19, 2018
Kind
B2
Abstract

A graphics processing unit (GPU) includes programmable shader hardware and grouping hardware. The grouping hardware receives pixels collected from a set of primitives, wherein pixel locations of each primitive have been obtained through rasterization of a set of vertices of the primitive. The grouping hardware also groups the pixels into a set of groups having a sequential order. None of the pixels in each group overlapped with each other in a display and overlapped pixels belong to different groups. The programmable shader hardware performs order-insensitive shader operations on the groups according to a first subset of an instruction set defined for a programmable shader, with two or more of the groups processed in parallel. The programmable shader hardware also performs order-sensitive shader operations on each of the groups in the sequential order according to a second subset of the instruction set defined for the programmable shader.

Claims (42)

1. A method of performing graphics operations using a Graphics Processing Unit (GPU) that includes a programmable shader, comprising:

receiving pixels collected from a set of primitives, wherein pixel locations of each primitive have been obtained through rasterization of a set of vertices of the primitive;

grouping the pixels into a set of groups having a sequential order, wherein each group is formed by the pixels of at least one primitive in a working area of a frame, and

wherein grouping the pixels further comprises: for each primitive within the working area, grouping all pixels of the primitive into a subsequent group if the primitive overlaps with at least one primitive in a prior group and does not overlap with any primitive in the subsequent group;

receiving instructions defined in an instruction set from a graphics application program executed by a system that includes the GPU;

executing the instructions in a first subset of an instruction set by the programmable shader to perform order-insensitive shader operations on each group, with two or more of the groups processed in parallel;

executing an intergroup barrier on each group when the group completes the order-insensitive shader operations, thereby ordering the groups in the sequential order for order-sensitive shader operations; and

for each group that has completed the order-insensitive shader operations, executing the instructions in a second subset of the instruction set by the programmable shader to perform the order-sensitive shader operations on the groups, wherein the groups are processed in the sequential order,

wherein an array of computing units of the programmable shader are operative to execute the instruction set to perform a mix of the order-insensitive shader operations and the order-sensitive shader operations, and are shared on demand between the order-insensitive shader operations and the order-sensitive shader operations,

wherein the order-sensitive operations include fragment shader operations, and the order-sensitive operations include alpha blending,

wherein the group includes a first group and a second group, the method further comprising:

executing the intergroup barrier on each group after the fragment shader operations to order the groups in the sequential order for the alpha blending;

performing the fragment shader operations on the first group and the second group; and

stalling the second group with the intergroup barrier when performing the blending operations on the first group.

2. The method of claim 1 , wherein the pixels of overlapped primitives in the different groups follow the sequential order defined by a graphics application program interface (API) requirement that specifies an API order of sequencing the primitives for rendering.

3. The method of claim 2 , wherein a primitive sequenced after a second group according to the API order is placed in a first group before the second group if the primitive does not overlap with any other primitives in the first group and the second group.

4. The method of claim 1 , further comprising:

executing an instruction that specifies a blending mode register to select a shader code segment for a pre-defined blending mode.

5. The method of claim 1 , wherein performing the order-sensitive operations further comprises:

performing the order-sensitive operations in an arbitrary order on the pixels within each of the groups.

6. The method of claim 1 , wherein the order-sensitive operations include depth testing to resolve visibility of the pixels across different groups.

7. The method of claim 1 , wherein performing the order-sensitive operations further comprises:

performing alpha blending on a set of pixels that include at least one of: transparent pixels, opaque pixels, and a combination of transparent pixels and opaque pixels.

8. A Graphics Processing Unit (GPU) comprising:

grouping hardware to receive pixels collected from a set of primitives, to group the pixels into a set of groups having a sequential order, wherein each group is formed by the pixels of at least one primitive in a working area of a frame, and wherein the grouping hardware is operative to: for each primitive within the working area, group all pixels of the primitive into a subsequent group if the primitive overlaps with at least one primitive in a prior group and does not overlap with any primitive in the subsequent group; and

programmable shader hardware coupled to the grouping hardware and including an array of computing units, wherein the array of computing units is operative to:

receive instructions defined in an instruction set from a graphics application program executed by a system that includes the GPU;

execute the instructions in a first subset of the instruction set to perform order-insensitive shader operations on each group, with two or more of the groups processed in parallel;

execute an intergroup barrier on each group when the group completes the order-insensitive shader operations, thereby ordering the groups in the sequential order for order-sensitive shader operations; and

for each group that has completed the order-insensitive operations, execute the instructions in a second subset of the instruction set to perform the order-sensitive shader operations on the group, wherein the groups are processed in the sequential order,

wherein the array of computing units are operative to execute the instruction set to perform a mix of the order-insensitive shader operations and the order-sensitive shader operations, and are shared on demand between the order-insensitive shader operations and the order-sensitive shader operations,

wherein the order-sensitive operations include fragment shader operations, and the order-sensitive operations include alpha blending,

wherein the group includes a first group and a second group, the programmable shader hardware further operative to:

execute the intergroup barrier on each group after the fragment shader operations to order the groups in the sequential order for the alpha blending;

perform the fragment shader operations on the first group and the second group; and

stall the second group with the intergroup barrier when performing the blending operations on the first group.

9. The GPU of claim 8 , wherein the pixels of overlapped primitives in the different groups follow the sequential order defined by a graphics application program interface (API) requirement that specifies an API order of sequencing the primitives for rendering.

10. The GPU of claim 9 , wherein a primitive sequenced after a second group according to the API order is placed in a first group before the second group if the primitive does not overlap with any other primitives in the first group and the second group.

11. The GPU of claim 8 , wherein the programmable shader hardware is further operative to execute an instruction that specifies a blending mode register to select a shader code segment for a pre-defined blending mode.

12. The GPU of claim 8 , wherein the programmable shader hardware is further operative to perform the order-sensitive operations in an arbitrary order on the pixels within each of the groups.

13. The GPU of claim 8 , wherein the order-sensitive operations include depth testing to resolve visibility of the pixels across different groups.

14. The GPU of claim 8 , wherein the programmable shader hardware is further operative to perform alpha blending on a set of pixels that include at least one of: transparent pixels, opaque pixels, and a combination of transparent pixels and opaque pixels.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 11, 2021
From: MEDIATEK SINGAPORE PTE LTD.
To: XUESHAN TECHNOLOGIES INC.
Reel/Frame 055283/0048 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 16, 2015
From: LIAO, QUN-FENG; KO, CHENG-YING
To: MEDIATEK SINGAPORE PTE. LTD.
Reel/Frame 035425/0865 →