IP Library Granted Patent US 12670661
Granted Patent B2
US 12670661 · App. 18/465,103 · Granted Jun 30, 2026

Z-clipping for primitive samples

Inventors: Tao Wang (Sunnyvale, CA); Xiayang Zhao (San Diego, CA); Huaibing Zhu (San Diego, CA); Ruohong Zhou (Sunnyvale, CA); Jian Liang (San Diego, CA); Junmei Shao (San Diego, CA); Qinyu Chen (San Diego, CA)
Assignee: QUALCOMM Incorporated
G06T15/30G06T7/62
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 12670661
App. No.
18/465,103
Granted
Jun 30, 2026
Kind
B2
Abstract

Aspects presented herein relate to methods and devices for graphics processing including an apparatus, e.g., GPU. The apparatus may obtain an indication of a set of primitives for a draw call operation. The apparatus may also identify a subset of primitives in the set of primitives, each of the subset of primitives including a primitive portion that is outside of a viewing frustum for the draw call operation, and the primitive portion corresponding to less than all of each of the subset of primitives. Further, the apparatus may calculate an area of each of the subset of primitives including the primitive portion that is outside of the viewing frustum. The apparatus may also perform, or refrain from performing, a clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being less than or greater than an area threshold.

Claims (73)

1 . An apparatus for graphics processing, comprising:

at least one memory; and

at least one processor coupled to the at least one memory and, based at least in part on information stored in the at least one memory, the at least one processor is configured to:

obtain an indication of a set of primitives for a draw call operation;

identify a subset of primitives in the set of primitives, wherein each of the subset of primitives include a primitive portion that is outside of a viewing frustum for the draw call operation, and wherein the primitive portion corresponds to less than all of each of the subset of primitives;

calculate an area of each of the subset of primitives including the primitive portion that is outside of the viewing frustum; and

perform, or refrain from performing, a clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being less than, equal to, or greater than an area threshold, wherein performance or refrainment from performance of the clipping operation is based on a per-draw call basis, and wherein the performance of the clipping operation for each of the subset of primitives is based on the area of each of the subset of primitives being greater than the area threshold on the per-draw call basis.

2 . The apparatus of claim 1 , wherein the at least one processor is further configured to:

output an indication of the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives.

3 . The apparatus of claim 2 , wherein to output the indication of the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives, the at least one processor is configured to:

transmit the indication of the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives; or

store the indication of the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives.

4 . The apparatus of claim 1 , wherein to perform the clipping operation for each of the subset of primitives, the at least one processor is configured to: perform the clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being greater than the area threshold.

5 . The apparatus of claim 1 , wherein to refrain from performing the clipping operation for each of the subset of primitives, the at least one processor is configured to: refrain from performing the clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being less than or equal to the area threshold.

6 . The apparatus of claim 1 , wherein the at least one processor is further configured to:

detect whether the area of each of the subset of primitives is less than, equal to, or greater than the area threshold, wherein the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives is based on the detection.

7 . The apparatus of claim 1 , wherein the at least one processor is further configured to:

calculate, for each of the subset of primitives including the area of the primitive that is less than the area threshold, a Z-value for each pixel in the primitive.

8 . The apparatus of claim 7 , wherein the at least one processor is further configured to:

discard, based on the calculation of the Z-value, each pixel in the primitive including the Z-value that is outside of a Z-value range.

9 . The apparatus of claim 7 , wherein the at least one processor is further configured to:

perform, based on the calculation of the Z-value, a shading operation for each pixel in the primitive including the Z-value that is within a Z-value range.

10 . The apparatus of claim 9 , wherein the at least one processor is further configured to:

output an indication of the performance of the shading operation for each pixel in the primitive including the Z-value that is within the Z-value range.

11 . The apparatus of claim 10 , wherein to output the indication of the performance of the shading operation for each pixel in the primitive including the Z-value that is within the Z-value range, the at least one processor is configured to:

transmit the indication of the performance of the shading operation for each pixel in the primitive including the Z-value that is within the Z-value range; or

store the indication of the performance of the shading operation for each pixel in the primitive including the Z-value that is within the Z-value range.

12 . The apparatus of claim 7 , wherein to calculate the Z-value for each pixel in the primitive, the at least one processor is configured to: perform a Z-test for each pixel in the primitive.

13 . The apparatus of claim 1 , wherein the at least one processor is further configured to:

perform at least one of a primitive assembly operation or a vertex transformation operation on the set of primitives for the draw call operation, wherein the identification of the subset of primitives is based on the performance of at least one of the primitive assembly operation or the vertex transformation operation.

14 . The apparatus of claim 1 , wherein the at least one processor is further configured to:

perform, based on the performance of the clipping operation, at least one of a viewport transform operation, a triangle setup operation, or a rasterization operation for each of the subset of primitives based on the area of each of the subset of primitives being greater than the area threshold.

15 . The apparatus of claim 1 , wherein each of the subset of primitives includes the primitive portion that is outside of the viewing frustum in a Z-direction.

16 . The apparatus of claim 1 , wherein the viewing frustum intersects each of the subset of primitives, and wherein a portion of each of the subset of primitives is within the viewing frustum.

17 . The apparatus of claim 1 , further comprising at least one of an antenna or a transceiver coupled to the at least one processor, wherein to obtain the indication of the set of primitives for the draw call operation, the at least one processor is configured to: obtain, via at least one of the antenna or the transceiver, the indication of the set of primitives for the draw call operation.

18 . A method of graphics processing, comprising:

obtaining an indication of a set of primitives for a draw call operation;

identifying a subset of primitives in the set of primitives, wherein each of the subset of primitives include a primitive portion that is outside of a viewing frustum for the draw call operation, and wherein the primitive portion corresponds to less than all of each of the subset of primitives;

calculating an area of each of the subset of primitives including the primitive portion that is outside of the viewing frustum; and

performing, or refraining from performing, a clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being less than, equal to, or greater than an area threshold, wherein performance or refrainment from performance of the clipping operation is based on a per-draw call basis, and wherein the performance of the clipping operation for each of the subset of primitives is based on the area of each of the subset of primitives being greater than the area threshold on the per-draw call basis.

19 . The method of claim 18 , further comprising:

outputting an indication of the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives.

20 . The method of claim 19 , wherein outputting the indication of the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives comprises:

transmitting the indication of the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives; or

storing the indication of the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives.

21 . The method of claim 18 , wherein performing the clipping operation for each of the subset of primitives comprises: performing the clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being greater than the area threshold.

22 . The method of claim 18 , wherein refraining from performing the clipping operation for each of the subset of primitives comprises: refraining from performing the clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being less than or equal to the area threshold.

23 . The method of claim 18 , further comprising:

detecting whether the area of each of the subset of primitives is less than, equal to, or greater than the area threshold, wherein the performance, or the refrainment from performance, of the clipping operation for each of the subset of primitives is based on the detection.

24 . The method of claim 18 , further comprising:

calculating, for each of the subset of primitives including the area of the primitive that is less than the area threshold, a Z-value for each pixel in the primitive.

25 . The method of claim 24 , further comprising:

discarding, based on the calculation of the Z-value, each pixel in the primitive including the Z-value that is outside of a Z-value range; or

performing, based on the calculation of the Z-value, a shading operation for each pixel in the primitive including the Z-value that is within the Z-value range.

26 . The method of claim 25 , further comprising:

outputting an indication of the performance of the shading operation for each pixel in the primitive including the Z-value that is within the Z-value range;

wherein outputting the indication of the performance of the shading operation for each pixel in the primitive including the Z-value that is within the Z-value range comprises:

transmitting the indication of the performance of the shading operation for each pixel in the primitive including the Z-value that is within the Z-value range; or

storing the indication of the performance of the shading operation for each pixel in the primitive including the Z-value that is within the Z-value range; and

wherein calculating the Z-value for each pixel in the primitive comprises: performing a Z-test for each pixel in the primitive.

27 . The method of claim 18 , further comprising:

performing at least one of a primitive assembly operation or a vertex transformation operation on the set of primitives for the draw call operation, wherein the identification of the subset of primitives is based on the performance of at least one of the primitive assembly operation or the vertex transformation operation; and

performing, based on the performance of the clipping operation, at least one of a viewport transform operation, a triangle setup operation, or a rasterization operation for each of the subset of primitives based on the area of each of the subset of primitives being greater than the area threshold.

28 . An apparatus for graphics processing, comprising:

means for obtaining an indication of a set of primitives for a draw call operation;

means for identifying a subset of primitives in the set of primitives, wherein each of the subset of primitives include a primitive portion that is outside of a viewing frustum for the draw call operation, and wherein the primitive portion corresponds to less than all of each of the subset of primitives;

means for calculating an area of each of the subset of primitives including the primitive portion that is outside of the viewing frustum; and

means for performing, or refraining from performing, a clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being less than, equal to, or greater than an area threshold, wherein performance or refrainment from performance of the clipping operation is based on a per-draw call basis, and wherein the performance of the clipping operation for each of the subset of primitives is based on the area of each of the subset of primitives being greater than the area threshold on the per-draw call basis.

29 . A non-transitory computer-readable medium storing computer executable code for graphics processing, the code when executed by at least one processor causes the at least one processor to:

obtain an indication of a set of primitives for a draw call operation;

identify a subset of primitives in the set of primitives, wherein each of the subset of primitives include a primitive portion that is outside of a viewing frustum for the draw call operation, and wherein the primitive portion corresponds to less than all of each of the subset of primitives;

calculate an area of each of the subset of primitives including the primitive portion that is outside of the viewing frustum; and

perform, or refrain from performing, a clipping operation for each of the subset of primitives based on the area of each of the subset of primitives being less than, equal to, or greater than an area threshold, wherein performance or refrainment from performance of the clipping operation is based on a per-draw call basis, and wherein the performance of the clipping operation for each of the subset of primitives is based on the area of each of the subset of primitives being greater than the area threshold on the per-draw call basis.