Z clipping against primitive samples
By introducing a clipping component into the GPU, selective processing of primitives/triangles of specific sizes solves the problems of long processing time and high power consumption in existing technologies, improves GPU performance and saves processing power, and achieves frame-level performance improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QUALCOMM INC
- Filing Date
- 2024-08-13
- Publication Date
- 2026-06-16
AI Technical Summary
In the prior art, when the graphics processing unit (GPU) performs pruning operations, especially Z-pruning operations, there are problems such as long processing cycles, high performance and power consumption, especially for primitives/triangles smaller than the threshold size, which leads to the limitation of the overall graphics pipeline performance.
By introducing a clipping component in the GPU, primitives/triangles of specific sizes, including primitive portions outside the view frustum, are selectively processed. Their areas are calculated and clipping operations are performed, clipping only primitives whose areas exceed a threshold, reducing unnecessary clipping workload.
It improves GPU performance and saves processing power, achieving a 1%-10% frame-level performance improvement while reducing pruning workload.
Smart Images

Figure CN122228527A_ABST
Abstract
Description
Cross-references to related applications
[0001] This application claims the benefit of U.S. non-provisional patent application No. 18 / 465,103, filed on September 11, 2023, entitled “Z-CLIPPING FOR PRIMITIVESAMPLES”, the entire contents of which are expressly incorporated herein by reference. Technical Field
[0002] This disclosure relates generally to processing systems, and more specifically to one or more techniques for graphics processing applications. Background Technology
[0003] Computing devices typically perform graphics and / or display processing (e.g., utilizing a graphics processing unit (GPU), a central processing unit (CPU), a display processor, etc.) to render and display visual content. Such computing devices can include, for example, computer workstations, mobile phones (such as smartphones), embedded systems, personal computers, tablet computers, and video game consoles. A GPU is configured to execute a graphics processing pipeline that includes one or more processing stages that operate together to execute graphics processing commands and output frames. A CPU controls the operation of a GPU by issuing one or more graphics processing commands to it. Modern CPUs are typically capable of executing multiple applications concurrently, each of which may require the GPU during execution. A display processor is configured to convert digital information received from the CPU into analog values and can issue commands to a display panel to display visual content. Devices that provide content for visual presentation on a display may utilize a GPU and / or a display processor.
[0004] The device's GPU can be configured to execute processes within the graphics processing pipeline. Additionally, a display processor or display processing unit (DPU) can be configured to perform display processing. However, with the advent of wireless communication and smaller handheld devices, the demand for improved graphics or display processing continues to increase. Summary of the Invention
[0005] The following is a simplified summary of one or more aspects to provide a basic understanding of these aspects. This summary is not a comprehensive overview of all anticipated aspects, nor is it intended to identify key elements of all aspects, nor to depict the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that follows.
[0006] In one aspect of this disclosure, a method, computer-readable medium, and apparatus are provided. The apparatus may be a graphics processing unit (GPU), a central processing unit (CPU), or any apparatus capable of performing graphics processing. The apparatus may obtain an indication of a set of primitives for a draw invocation operation. The apparatus may also perform at least one of a primitive assembly operation or a vertex transformation operation on the set of primitives for the draw invocation operation, wherein the identification of a subset of primitives is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation. The apparatus may also identify a subset of primitives in the primitive set, wherein each primitive in the subset includes a primitive portion outside the view frustum for the draw invocation operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the subset. Additionally, the apparatus may calculate the area of each primitive in the subset, the area including the primitive portion outside the view frustum. The apparatus may also detect whether the area of each primitive in the subset is less than, equal to, or greater than an area threshold, wherein the execution or avoidance of a clipping operation for each primitive in the subset is based on the detection. The device can also perform or avoid performing a clipping operation for each pixel in the subset of pixels based on whether the area of each pixel in the subset of pixels is less than, equal to, or greater than the area threshold. Furthermore, the device can output an instruction for performing or avoiding the clipping operation for each pixel in the subset of pixels. The device can also perform at least one of a viewport transformation operation, a triangulation operation, or a rasterization operation for each pixel in the subset of pixels based on the execution of the clipping operation, provided that the area of each pixel in the subset of pixels is greater than the area threshold. The device can also calculate the Z-value of each pixel in the subset of pixels that includes pixels with areas smaller than the area threshold. Furthermore, based on the calculation of the Z-value, the device can discard each pixel in the subset of pixels whose Z-value is outside the Z-value range. The device can also perform a shading operation for each pixel in the subset of pixels whose Z-value is within the Z-value range, based on the calculation of the Z-value. The device can also output an instruction for the execution of the coloring operation for each pixel in the primitive that has a Z value within the Z value range.
[0007] Details of one or more examples of this disclosure are set forth in the accompanying drawings and the following description. Other features, objects, and advantages of this disclosure will become apparent from the description, the drawings, and the claims. Attached Figure Description
[0008] Figure 1 This is a block diagram illustrating the example content generation system.
[0009] Figure 2 This is a diagram illustrating an example graphics processing unit (GPU).
[0010] Figure 3 This is a diagram illustrating an example image or surface used for graphics processing.
[0011] Figure 4 This is a diagram illustrating an example culling process used in graphics processing.
[0012] Figure 5 This is an illustration of an example cropping process used in graphics processing.
[0013] Figure 6 This is an illustration of the example element clipping operation.
[0014] Figure 7 This is a diagram illustrating an example flowchart used for a trimming operation.
[0015] Figure 8 This is a diagram illustrating an example of a view frustum.
[0016] Figure 9 This is a diagram illustrating an example of a view frustum.
[0017] Figure 10 This is a communication flowchart illustrating example communication between a GPU, CPU, or GPU component and memory.
[0018] Figure 11 This is a flowchart of an example method for graphics processing.
[0019] Figure 12 This is a flowchart of an example method for graphics processing. Detailed Implementation
[0020] In various aspects of graphics processing, primitives and triangles may require a significant number of processing cycles to complete a clipping operation on a primitive / triangle. For example, to process a clipping operation (e.g., a Z-clipping operation), each primitive / triangle may require a certain number of cycles (e.g., more than 20 cycles). Additionally, clipping operations (e.g., Z-clipping operations) may consume significant performance and power to complete (e.g., performance and power at the GPU). Furthermore, certain types of clipping operations (e.g., Z-clipping operations) may involve a large number of primitives / triangles. For example, certain types of clipping operations (e.g., Z-clipping operations) may be associated with primitives / triangles of a specific size (e.g., small primitives / triangles smaller than a size threshold), which may require processing a large number of primitives / triangles to perform that type of clipping operation. Accordingly, processing a large number of primitives / triangles may consume significant performance and power (e.g., performance and power at the GPU) to perform the clipping operation (e.g., Z-clipping operation). Therefore, performance and power (e.g., performance and power at the GPU) may be limited by a certain throughput (e.g., Z-clipping throughput). Additionally, some types of applications (e.g., games) may have a large number of specific clipping operations (e.g., a large number of Z-clipping operations). Furthermore, these types of applications may perform clipping operations (e.g., Z-clipping operations) on triangles of a specific size (e.g., small primitives / triangles smaller than a size threshold). As noted herein, clipping operations consume significant performance and power (e.g., performance and power at the GPU pipeline), involving numerous sequential computational steps. Therefore, handling a large number of such clipping workloads (e.g., Z-clipping workloads) can slow down performance (e.g., performance at the GPU). Aspects of this disclosure can improve power and / or performance issues across the entire graphics pipeline (e.g., the graphics pipeline at the GPU). For example, aspects presented herein can reduce (e.g., the amount of clipping workload at the GPU). For example, aspects of this disclosure can reduce (e.g., the amount of Z-clipping workload at the GPU). To this end, aspects of this disclosure can selectively handle clipping operations for primitives / triangles of a specific size.
[0021] The aspects of this disclosure may include several benefits or advantages. For example, the aspects of this disclosure may improve power and / or performance issues across the entire graphics pipeline (e.g., the graphics pipeline at the GPU). The aspects presented herein may also reduce the amount of clipping workload (e.g., at the GPU). That is, the aspects of this disclosure may reduce the amount of Z-clipping workload (e.g., at the GPU). Additionally, the aspects of this disclosure may selectively process clipping operations for primitives / triangles of a specific size. For example, the aspects presented herein may compute and determine the size of the primitives / triangles in order to perform the clipping operation. The aspects presented herein may also improve performance (e.g., performance at the GPU) due to the clipping operation. In fact, the aspects presented herein may improve GPU performance by performing clipping operations (e.g., Z-clipping operations) for primitives / triangles of a specific size (e.g., primitives / triangles smaller than a threshold size). Furthermore, the aspects presented herein may save a significant amount of processing power at the GPU by performing clipping operations (e.g., Z-clipping operations) for primitives / triangles of a specific size (e.g., primitives / triangles smaller than a threshold size). The aspects presented in this article can also yield some frame-level performance improvements at the GPU level (e.g., 1%-10% frame-level performance improvement).
[0022] Various aspects of the systems, apparatuses, computer program products, and methods will be described more fully below with reference to the accompanying drawings. However, this disclosure may be embodied in many different forms and should not be construed as limited to any particular structure or function presented throughout this disclosure. Rather, these aspects are provided to make this disclosure comprehensive and complete, and to fully convey the scope of this disclosure to those skilled in the art. Based on the teachings herein, those skilled in the art will understand that the scope of this disclosure is intended to cover any aspect of the systems, apparatuses, computer program products, and methods disclosed herein, whether implemented independently of or in combination with other aspects of this disclosure. For example, any number of aspects set forth herein may be used to implement an apparatus or practice. Furthermore, the scope of this disclosure is intended to cover such apparatuses or methods practiced using structures, functionalities, or structures and functionalities other than or different from the various aspects of the disclosure set forth herein. Any aspect disclosed herein may be embodied by one or more elements of the claims.
[0023] Although various aspects are described herein, many variations and substitutions of these aspects fall within the scope of this disclosure. While some potential benefits and advantages of the aspects of this disclosure are mentioned, the scope of this disclosure is not intended to be limited to a particular benefit, use, or objective. Rather, the aspects of this disclosure are intended to be broadly applicable to different wireless technologies, system configurations, networks, and transmission protocols, some of which are illustrated by way of example in the accompanying drawings and the description below. The detailed description and drawings are merely illustrative and not limiting of this disclosure, and the scope of this disclosure is defined by the appended claims and their equivalents.
[0024] Several aspects are presented with reference to various apparatuses and methods. These apparatuses and methods are described in detail and illustrated in the accompanying drawings by various blocks, components, circuits, processes, algorithms, etc. (collectively referred to as "elements"). These elements can be implemented using electronic hardware, computer software, or any combination thereof. Whether these elements are implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system.
[0025] For example, an element, any part of an element, or any combination of elements can be implemented as a “processing system” including one or more processors (which may also be referred to as processing units). Examples of processors include microprocessors, microcontrollers, graphics processing units (GPUs), general-purpose GPUs (GPGPUs), central processing units (CPUs), application processors, digital signal processors (DSPs), reduced instruction set computing (RISC) processors, system-on-a-chip (SoCs), baseband processors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic units, discrete hardware circuits, and other suitable hardware configured to perform the various functionalities described in this disclosure. One or more processors in a processing system can execute software. Software can be broadly interpreted as instructions, instruction sets, code, code segments, program code, programs, subroutines, software components, applications, software applications, software packages, routines, subroutines, objects, executable files, threads of execution, procedures, functions, etc., whether expressed in terms of software, firmware, middleware, microcode, hardware description languages, or other terms. The term “application” can refer to software. As described herein, one or more technologies can refer to an application, i.e., software, configured to perform one or more functions. In such examples, the application may be stored on memory (e.g., on-chip memory of a processor, system memory, or any other memory). Hardware described herein, such as a processor, may be configured to execute the application. For example, an application may be described as including code that, when executed by the hardware, causes the hardware to perform one or more technologies described herein. As an example, the hardware may access and execute code accessed from memory to perform one or more technologies described herein. In some examples, components are identified in this disclosure. In such examples, a component may be hardware, software, or a combination thereof. Each component may be a separate component or a subcomponent of a single component.
[0026] Therefore, in one or more examples described herein, the described functionality can be implemented in hardware, software, or any combination thereof. If implemented in software, the functionality can be stored or encoded as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media. Storage media can be any available medium accessible to a computer. By way of example and not limitation, such computer-readable media may include random access memory (RAM), read-only memory (ROM), electrically erasable programmable ROM (EEPROM), optical disc storage devices, magnetic disk storage devices, other magnetic storage devices, combinations of computer-readable media of the types described above, or any other medium capable of being used to store computer-executable code in the form of instructions or data structures accessible to a computer.
[0027] In summary, this disclosure describes techniques for having a graphics processing pipeline in a single device or multiple devices, thereby improving the rendering of graphics content and / or reducing the load on processing units (i.e., any processing unit, such as a GPU, configured to perform one or more of the techniques described herein). For example, this disclosure describes techniques for performing graphics processing in any device that utilizes graphics processing. Other example benefits are described throughout this disclosure.
[0028] As used herein, instances of the term "content" can refer to "graphic content," "image," or vice versa. This is true regardless of whether these terms are used as adjectives, nouns, or other parts of speech. In some examples, as used herein, the term "graphic content" can refer to content produced by one or more processes in a graphics processing pipeline. In some examples, as used herein, the term "graphic content" can refer to content produced by a processing unit configured to perform graphics processing. In some examples, as used herein, the term "graphic content" can refer to content produced by a graphics processing unit.
[0029] In some examples, as used herein, the term "display content" can refer to content generated by a processing unit configured to perform display processing. Graphical content can be processed to become display content. For example, a graphics processing unit can output graphical content (such as frames) to a buffer (which may be referred to as a frame buffer). A display processing unit can read graphical content (such as one or more frames) from the buffer and perform one or more display processing techniques on that display processing unit to generate display content. For example, a display processing unit can be configured to perform compositing on one or more rendering layers to generate frames. As another example, a display processing unit can be configured to composite, blend, or otherwise combine two or more layers into a single frame. A display processing unit can be configured to perform scaling on frames, such as zooming in or out. In some examples, a frame can refer to a layer. In other examples, a frame can refer to two or more layers that have been blended together to form the frame, i.e., the frame comprises two or more layers, and the frame comprising two or more layers can be subsequently blended.
[0030] Figure 1This is a block diagram illustrating an example content generation system 100 configured to implement one or more technologies of this disclosure. The content generation system 100 includes a device 104. Device 104 may include one or more components or circuitry for performing the various functions described herein. In some examples, one or more components of device 104 may be components of a System-on-a-Chip (SOC). Device 104 may include one or more components configured to perform one or more technologies of this disclosure. In the illustrated example, device 104 may include a processing unit 120, a content encoder / decoder 122, and a system memory 124. In some aspects, device 104 may include several components, such as a communication interface 126, a transceiver 132, a receiver 128, a transmitter 130, a display processor 127, and one or more displays 131. A reference to display 131 may refer to one or more displays 131. For example, display 131 may include a single display or multiple displays. Display 131 may include a first display and a second display. The first display may be a left-eye display, and the second display may be a right-eye display. In some examples, the first and second displays may receive different frames for presentation on the first and second displays. In other examples, the first and second displays may receive the same frames used for rendering on both displays. In further examples, the results of graphics processing may not be displayed on the devices; for example, the first and second displays may not receive any frames used for rendering on them. Instead, the frames or graphics processing results may be transferred to another device. In some respects, this can be referred to as split rendering.
[0031] Processing unit 120 may include internal memory 121. Processing unit 120 may be configured to perform graphics processing, such as in a graphics processing pipeline 107. Content encoder / decoder 122 may include internal memory 123. In some examples, device 104 may include a display processor (such as display processor 127) to perform one or more display processing techniques on one or more frames generated by processing unit 120 prior to presentation by one or more displays 131. Display processor 127 may be configured to perform display processing. For example, display processor 127 may be configured to perform one or more display processing techniques on one or more frames generated by processing unit 120. One or more displays 131 may be configured to display or otherwise present the frames processed by display processor 127. In some examples, the one or more displays 131 may include one or more of the following: liquid crystal display (LCD), plasma display, organic light-emitting diode (OLED) display, projection display device, augmented reality display device, virtual reality display device, head-mounted display, or any other type of display device.
[0032] Memory (such as system memory 124) external to processing unit 120 and content encoder / decoder 122 may be accessible to processing unit 120 and content encoder / decoder 122. For example, processing unit 120 and content encoder / decoder 122 may be configured to read from and / or write to external memory (such as system memory 124). Processing unit 120 and content encoder / decoder 122 may be communicatively coupled to system memory 124 via a bus. In some examples, processing unit 120 and content encoder / decoder 122 may be communicatively coupled to each other via the bus or a different connection.
[0033] Content encoder / decoder 122 can be configured to receive graphic content from any source, such as system memory 124 and / or communication interface 126. System memory 124 can be configured to store received encoded or decoded graphic content. Content encoder / decoder 122 can be configured to receive encoded or decoded graphic content from system memory 124 and / or communication interface 126, for example, in the form of encoded pixel data. Content encoder / decoder 122 can be configured to encode or decode any graphic content.
[0034] Internal memory 121 or system memory 124 may include one or more volatile or non-volatile memories or storage devices. In some examples, internal memory 121 or system memory 124 may include RAM, SRAM, DRAM, erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic data media or optical storage media or any other type of memory.
[0035] According to some examples, internal memory 121 or system memory 124 may be a non-transitory storage medium. The term "non-transitory" may indicate that the storage medium is not embodied in a carrier wave or propagating signal. However, the term "non-transitory" should not be construed as meaning that internal memory 121 or system memory 124 is immovable or that its contents are static. For example, system memory 124 may be removed from device 104 and moved to another device. Alternatively, system memory 124 may not be removable from device 104.
[0036] Processing unit 120 may be a central processing unit (CPU), a graphics processing unit (GPU), a general-purpose GPU (GPGPU), or any other processing unit configured to perform graphics processing. In some examples, processing unit 120 may be integrated into the motherboard of device 104. In some examples, processing unit 120 may reside on a graphics card mounted in a port on the motherboard of device 104, or may otherwise be incorporated into a peripheral device configured to interoperate with device 104. Processing unit 120 may include one or more processors, such as one or more microprocessors, GPUs, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), arithmetic logic units (ALUs), digital signal processors (DSPs), discrete logic components, software, hardware, firmware, other equivalent integrated or discrete logic circuits, or any combination thereof. If the technology is partially implemented in software, processing unit 120 may store instructions for software in a suitable non-transitory computer-readable storage medium (e.g., internal memory 121) and may use one or more processors to execute instructions in hardware to perform the technology of this disclosure. Any of the above (including hardware, software, and combinations of hardware and software) can be considered as one or more processors.
[0037] The content encoder / decoder 122 can be any processing unit configured to perform content decoding. In some examples, the content encoder / decoder 122 may be integrated into the motherboard of device 104. The content encoder / decoder 122 may include one or more processors, such as one or more microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), arithmetic logic units (ALUs), digital signal processors (DSPs), video processors, discrete logic components, software, hardware, firmware, other equivalent integrated or discrete logic circuits, or any combination thereof. If the technology is partially implemented in software, the content encoder / decoder 122 may store instructions for software in a suitable non-transitory computer-readable storage medium (e.g., internal memory 123) and may use one or more processors to execute instructions in hardware to perform the technology of this disclosure. Any of the foregoing (including hardware, software, combinations of hardware and software, etc.) can be considered as one or more processors.
[0038] In some aspects, the content generation system 100 may include a communication interface 126. The communication interface 126 may include a receiver 128 and a transmitter 130. The receiver 128 may be configured to perform any of the receiving functions described herein with respect to device 104. Additionally, the receiver 128 may be configured to receive information from another device, such as eye or head positioning information, rendering commands, or location information. The transmitter 130 may be configured to perform any of the transmitting functions described herein with respect to device 104. For example, the transmitter 130 may be configured to transmit information to another device, which may include a request for content. The receiver 128 and the transmitter 130 may be combined to form a transceiver 132. In such an example, the transceiver 132 may be configured to perform any of the receiving and / or transmitting functions described herein with respect to device 104.
[0039] Refer again Figure 1In some aspects, processing unit 120 may include a clipping component 198 configured to obtain an indication of a set of primitives for a draw invocation operation. Clipping component 198 may also be configured to perform at least one of a primitive assembly operation or a vertex transformation operation on the set of primitives for the draw invocation operation, wherein the identification of a subset of primitives is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation. Clipping component 198 may also be configured to identify a subset of primitives in the primitive set, wherein each primitive in the subset includes a primitive portion outside the view frustum for the draw invocation operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the subset. Clipping component 198 may also be configured to calculate the area of each primitive in the subset, the area including the primitive portion outside the view frustum. The clipping component 198 can also be configured to detect whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold, wherein the execution or avoidance of a clipping operation for each primitive in the primitive subset is based on this detection. The clipping component 198 can also be configured to execute or avoid a clipping operation for each primitive in the primitive subset based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than the area threshold. The clipping component 198 can also be configured to output an indication of whether the clipping operation for each primitive in the primitive subset should be executed or avoided. The clipping component 198 can also be configured to perform at least one of a viewport transformation operation, a triangulation operation, or a rasterization operation for each primitive in the primitive subset based on the execution of the clipping operation if the area of each primitive in the primitive subset is greater than the area threshold. The cropping component 198 can also be configured to calculate the Z-value of each pixel in the primitive for each primitive in the primitive subset that includes the area of the primitive that is smaller than the area threshold. The cropping component 198 can also be configured to discard each pixel in the primitive that has a Z-value outside the Z-value range based on the calculation of the Z-value. The cropping component 198 can also be configured to perform a shading operation for each pixel in the primitive that has a Z-value within the Z-value range based on the calculation of the Z-value. The cropping component 198 can also be configured to output an indication of the execution of the shading operation for each pixel in the primitive that has a Z-value within the Z-value range. Although the following description may focus on display processing, the concepts described herein are applicable to other similar processing techniques.
[0040] As described herein, a device such as device 104 can refer to any device, apparatus, or system configured to perform one or more of the technologies described herein. For example, a device can be a server, base station, user equipment, client device, station, access point, computer (e.g., personal computer, desktop computer, laptop computer, tablet computer, computer workstation, or mainframe computer), end product, apparatus, telephone, smartphone, server, video game platform or console, handheld device (e.g., portable video game device or personal digital assistant (PDA)), wearable computing device (e.g., smartwatch, augmented reality device, or virtual reality device), non-wearable device, display or display device, television, set-top box, intermediate network device, digital media player, video streaming device, content streaming device, in-vehicle computer, any mobile device, any device configured to generate graphical content, or any device configured to perform one or more of the technologies described herein. The processes described herein may be described as being performed by a specific component (e.g., GPU), but in further embodiments, other components consistent with the disclosed embodiments (e.g., CPU) may be used to perform them.
[0041] A GPU can process various types of data or data packets within its pipeline. For example, in some aspects, a GPU can process two types of data or data packets, such as context register packets and draw call data. Context register packets can be a collection of global state information, such as information about global registers, shaders, or constant data, which can regulate how the graphics context will be handled. For example, a context register packet may include information about the color format. In some aspects of a context register packet, there may be bits indicating which workload belongs to the context register. Furthermore, there may be multiple functions or programs running simultaneously and / or in parallel. For example, a function or program may describe an operation, such as a color mode or color format. Therefore, context registers can define multiple states of the GPU.
[0042] Context states can be used to determine how individual processing units (e.g., vertex extractors (VFDs), vertex shaders (VSs), shader processors, or geometry processors) operate and / or in which mode a processing unit operates. For this purpose, the GPU can use context registers and programming data. In some aspects, the GPU can generate workloads (e.g., vertex or pixel workloads) in the pipeline based on the context register definitions of modes or states. Certain processing units (e.g., VFDs) can use these states to determine certain functions, such as how to assemble vertices. Because these modes or states can change, the GPU may need to modify the corresponding context. Additionally, the workload corresponding to a mode or state may follow the changed mode or state.
[0043] Figure 2 Example GPU 200 is illustrated according to one or more technologies according to this disclosure. For example... Figure 2 As shown, GPU 200 includes a command processor (CP) 210, a draw call group 212, a VFD 220, a VS 222, a vertex cache (VPC) 224, a triangle setup engine (TSE) 226, a rasterizer (RAS) 228, a Z-process engine (ZPE) 230, a pixel interpolator (PI) 232, a fragment shader (FS) 234, a rendering backend (RB) 236, a level 2 (L2) cache (UCHE) 238, and system memory 240. Although Figure 2 The GPU 200 shown includes processing units 220 to 238, but the GPU 200 may include multiple additional processing units. Additionally, processing units 220 to 238 are merely examples, and any combination or order of processing units may be used in the GPU according to this disclosure. The GPU 200 also includes a command buffer 250, a context register group 260, and a context state 261.
[0044] like Figure 2 As shown, the GPU can use a CP (e.g., CP 210) or a hardware accelerator to resolve the command buffer into context register groups (e.g., context register group 260) and / or draw call data groups (e.g., draw call group 212). Subsequently, CP 210 can transfer the context register group 260 or the draw call group 212 to a processing unit or block in the GPU via a separate path. Furthermore, the command buffer 250 can alternate between different states of the context registers and draw calls. For example, the command buffer can be structured as follows: context register of context N, draw call of context N, context register of context N+1, and draw call of context N+1.
[0045] GPUs can render images in several different ways. In some cases, GPUs can use rendering and / or tiled rendering to render images. In a tiled rendering GPU, an image can be divided or segmented into different sections or tiles. After the image is divided, each section or tile can be rendered individually. A tiled rendering GPU can divide a computer graphics image into a grid format so that each part of the grid (i.e., a tile) is rendered individually. In some aspects, during a binning pass, the image can be divided into different bins or tiles. In some aspects, during a binning pass, a visibility stream can be constructed, where visible primitives or draw calls can be identified. In contrast to tiled rendering, direct rendering does not divide the frame into smaller bins or tiles. Instead, in direct rendering, the entire frame is rendered at once. Additionally, some types of GPUs allow both tiled rendering and direct rendering.
[0046] In some aspects of tile rendering, multiple processing stages or passes may exist. For example, rendering may be performed in two passes, such as a visibility or box visibility pass and a rendering or box rendering pass. During a visibility pass, the GPU may input a rendering workload, record the positioning of primitives or triangles, and then determine which primitives or triangles fall into which box or region. In some aspects of a visibility pass, the GPU may also identify or mark the visibility of each primitive or triangle in the visibility stream. During a rendering pass, the GPU may input a visibility stream and process one box or region at a time. In some aspects, the visibility stream may be analyzed to determine which primitives or primitive vertices are visible or invisible. Thus, visible primitives or primitive vertices may be processed. In this way, the GPU can reduce the unnecessary workload of processing or rendering invisible primitives or triangles. In some aspects, certain types of primitive geometry, such as positioning-only geometry, may be processed during a visibility pass. Additionally, primitives may be classified into different boxes or regions based on their positioning or location. In some instances, classifying primitives or triangles into different bins can be performed by determining visibility information for those primitives or triangles. For example, the GPU can determine the visibility information for each primitive in each bin or region or write it to, for example, system memory. This visibility information can be used to determine or generate a visibility stream. In a rendering pass, the primitives in each bin can be rendered individually. In these instances, the visibility stream can be retrieved from memory used to discard primitives that are not visible to that bin.
[0047] Some aspects of the GPU or GPU architecture offer multiple different options for rendering (e.g., software rendering and hardware rendering). In software rendering, the driver or CPU can process each view... Figure 1 The entire frame geometry is copied each time. Additionally, some different states can change depending on the viewpoint. Therefore, in software rendering, the software can copy the entire workload by changing some states that can be used for rendering for each viewpoint in the image. In some respects, this can lead to increased overhead because the GPU may submit the same workload multiple times for each viewpoint in the image. In hardware rendering, the hardware or GPU may be responsible for copying or processing the geometry for each viewpoint in the image. Therefore, the hardware can manage the copying or processing of primitives or triangles for each viewpoint in the image.
[0048] Figure 3 Example image or surface 300, which includes multiple primitives divided into multiple bins. For example... Figure 3As shown, the image or surface 300 includes a region 302, which includes primitives 321, 322, 323, and 324. Primitives 321, 322, 323, and 324 are divided or placed into different bins, such as bins 310, 311, 312, 313, 314, and 315. Figure 3 This example illustrates tile rendering using multiple viewpoints for primitives 321-324. For instance, primitives 321-324 are in a first viewpoint 350 and a second viewpoint 351. Therefore, GPU processing or rendering of an image or surface 300 including region 302 can utilize multi-view or multi-view rendering.
[0049] As indicated herein, GPUs or graphics processing units can use a tiled rendering architecture to reduce power consumption or save memory bandwidth. As further stated above, this rendering method divides the scene into multiple bins and includes visibility iterations that identify the visible triangles within each bin. Therefore, in tiled rendering, the entire screen can be divided into multiple bins or tiles. The scene can then be rendered multiple times, for example, once or multiple times for each bin. In various aspects of graphics rendering, some graphics applications may render a single target (i.e., the rendering target) once or multiple times. For example, in graphics rendering, a frame buffer on system memory can be updated multiple times. The frame buffer can be part of memory or random access memory (RAM) (e.g., containing bitmaps or storage devices) to facilitate storing display data for the GPU. The frame buffer can also be a memory buffer containing complete data frames. Additionally, the frame buffer can be a logical buffer. In some aspects, updating the frame buffer can be performed in bin or tile rendering, where, as discussed above, the surface is divided into multiple bins or tiles, and each bin or tile can then be rendered individually. In addition, in tile rendering, the frame buffer can be divided into multiple bins or tiles.
[0050] In some aspects of graphics processing, rendering can be performed at multiple locations and / or on multiple devices, for example, to divide the rendering workload among different devices. For instance, rendering can be split between server and client devices; this can be called “split rendering.” In some instances, split rendering can be a method for bringing content to a user device or head-mounted display (HMD), where a portion of the graphics processing can be performed outside the device or HMD (e.g., at a server). Split rendering can be performed for several different types of applications (e.g., virtual reality (VR) applications, augmented reality (AR) applications, and / or extended reality (XR) applications). In VR applications, the content displayed at the user device can correspond to artificial or animated content, for example, content rendered at the server or user device. In AR or XR content, a portion of the content displayed at the user device can correspond to real-world content (e.g., real-world objects), and a portion of the content can be artificial or animated content. Moreover, artificial or animated content and real-world content can be displayed in an optical or video perspective device, allowing the user to view real-world objects and artificial or animated content simultaneously. In some aspects, artificial or animated content can be called augmented content, and vice versa.
[0051] In certain types of graphics processing (e.g., augmented reality (AR) applications, virtual reality (VR) applications, or 3D games), objects may occlude (i.e., obscure, cover, block, or impede) other objects from the user's vantage point. Different types of occlusion may also exist within AR / VR applications or 3D games. For example, augmented content may occlude real-world content; for instance, a rendered object may partially occlude a real-world object. Furthermore, real-world content may occlude augmented content; for example, a real-world object may partially occlude a rendered object. This overlap between real-world and augmented content that causes such occlusion is one reason why augmented and real-world content can blend seamlessly within AR. This can also lead to difficulties in resolving occlusion between augmented and real-world content, causing the edges of augmented and real-world content to overlap incorrectly.
[0052] In some respects, augmented content or effects can be rendered over real-world or perspective content. Therefore, from the user's vantage point, an augmentation can occlude any object behind it. For example, pixels without occlusion material—pixels whose red (R), green (G), and blue (B) (RGB) values are not equal to (0,0,0)—can occlude real-world objects. Thus, an augmentation with a certain value (e.g., a non-zero value) can occlude a real-world object behind it. In video perspective systems, the same effect can be achieved by compositing an augmentation layer onto the foreground. Thus, an augmentation can occlude rendered content or real-world content, and vice versa. As indicated above, accurately capturing occlusion can be challenging when utilizing VR / AR systems or 3D games. This is especially true for VR / AR systems or 3D games with latency issues. In some respects, accurately capturing augmented content that occludes other augmented content or accurately capturing real-world objects that occlude augmented content can be particularly difficult. Accurate occlusion of augmented or real-world content, and the occlusion of augmented content, can help users achieve a more realistic and immersive VR / AR or 3D gaming experience.
[0053] Several aspects of graphics processing can leverage occlusion culling, a feature that deactivates object rendering when an object is not currently seen by the camera due to being occluded by other objects (i.e., obscured). For example, if objects in a scene are completely occluded by objects closer to the camera, occlusion culling can remove these objects from the camera rendering workload. In some aspects, the occlusion culling process can use a virtual camera to traverse the scene to construct a hierarchical structure of potentially visible object groups. Each camera in a graphics processing application can use this data to identify which objects are visible or invisible. Occlusion culling can improve rendering performance (e.g., GPU rendering performance) simply by not rendering objects outside the camera's view area or objects occluded by other objects closer to the camera. In one instance, the occlusion culling process can be defined as follows: for a camera view in a scene, given a set of occluders (i.e., objects that occlude other objects) and a set of occluded objects (i.e., objects occluded by other objects), the visibility of the occluded objects can be derived or determined based on the relative positions of the occluders. For example, if a wall in the scene is closer to the camera than a set of buckets behind that wall, and that wall has a hole, the occlusion culling process can determine which buckets are visible through the hole in the wall.
[0054] Some types of occlusion culling in graphics processing (e.g., CPU or GPU occlusion culling) can include software occlusion culling. For example, in software occlusion culling, for each occluder and each primitive / triangle in the scene, the primitive / triangle can be rasterized to generate an occlusion depth map. Furthermore, for each occluder in the scene, the projected axis-aligned bounding box (AABB) region and the nearest depth value of the occluded object can be determined in the occlusion depth map. Additionally, the nearest depth value of the occluded object within the projected AABB region can be determined on the occlusion depth map. If the nearest depth value of the occluded object is greater than all depth values within the AABB region, the occluded object can be determined as visible. Otherwise, if the nearest depth value of the occluded object is not greater than all depth values within the AABB region, the occluded object can be determined as invisible.
[0055] Additionally, other types of occlusion culling (e.g., occlusion culling in CPUs or GPUs) are also utilized in graphics processing. For example, there are several types of software occlusion culling that utilize the CPU's Single Instruction Multiple Data (SIMD) components. This SIMD-optimized occlusion culling may correspond to optimized versions of open-source projects. Compared to other types of occlusion culling, this type of occlusion culling can render depth maps (e.g., occlusion depth maps) more accurately and quickly (e.g., 2x-16x faster). SIMD-optimized occlusion culling may also be more accurate than GPU Hardware Occlusion Cultivation (HWOC). For example, mobile chip occlusion culling can achieve zero frame latency throughout the rendering process, while GPU hardware occlusion culling can cause at least one frame of latency issues throughout the rendering process. Additionally, SIMD-optimized occlusion culling may result in fewer draw calls compared to other types of occlusion culling.
[0056] Figure 4 Figure 400 illustrates an example aspect of the culling process. The back face of a solid opaque object can be hidden from the viewer's direct viewing distance. Therefore, when rendering a scene on a display, the viewer may not be able to see the back face of a solid opaque object. A device (e.g., a GPU) can cull (i.e., remove) primitives (e.g., triangles) associated with the back face of a solid opaque object in order to reduce the amount of rendered scene geometry. This culling may be referred to as "culling" or "backface culling." Reducing the amount of rendered scene geometry reduces the amount of computation performed by the device.
[0057] like Figure 4As shown, in the first example 402, the lens of camera 404 may be facing object 406. Object 406 may be solid and opaque. The portion of object 406 visible to camera 404 may be referred to as the front face of object 406 (now referred to as "first front face 408"). The portion of object 406 not visible to camera 404 may be referred to as the back face of object 406 (now referred to as "first back face 410"). In the first example 402, camera 404 may be located relatively far from object 406, and therefore the first back face 410 may be approximately 50% of the surface of object 406. The apparatus may perform backface culling on primitives associated with the first back face 410 to reduce the amount of rendered scene geometry.
[0058] like Figure 4 As further shown, in the second example 412, the lens of camera 404 may face object 406 as in the first example 402. However, in the second example 412, object 406 may be located relatively closer to camera 404 compared to the positions of object 406 and camera 404 in the first example 402. Object 406 may have a second front face 414 and a second back face 416. Since object 406 is located closer to the lens of camera 404 compared to the positions of object 406 and camera 404 in the first example 402, the second back face 416 may be relatively large. For example, the second back face 416 may be 50% larger than the surface of object 406. The apparatus may perform backface culling on primitives associated with the second back face 416 to reduce the amount of rendered scene geometry.
[0059] Figure 5 Figure 500 illustrates an example aspect of clipping (such as guard band clipping). "Guard band clipping" can refer to a technique used by a device (e.g., a GPU) to reduce the amount of clipping performed. In guard band clipping, a primitive is clipped if it extends beyond a guard band, wherein the guard band is associated with a first region that is larger than a second region associated with and encompassing the viewport. In one example, the first region associated with the guard band may be several orders of magnitude larger than the second region associated with the viewport. In non-guard band clipping, a primitive is clipped if it extends beyond the viewport. As used herein, the term "clipping" or "clipping operation" can refer to removing a portion of a primitive (e.g., a triangle) from the rendering process. Guard band clipping allows a device to accept primitives that are partially or completely off-screen.
[0060] like Figure 5As shown, Figure 500 depicts a viewport 502 and a protective strip 504. In one example, the viewport 502 may be associated with a first region, and the protective strip 504 may be associated with a second region, wherein the first region is smaller than the second region. The viewport 502 may be located within the protective strip 504. In one example, the viewport 502 may be associated with a resolution of 1920 pixels by 1080 pixels. In one example, a first triangle 506 may include a first portion located within the viewport 502, a second portion located outside the viewport 502 and within the protective strip 504, and a third portion located outside the protective strip 504. In one example, the first triangle 506 may be defined by floating-point coordinates (described in more detail below). Because the first triangle 506 extends beyond the protective strip 504, a device (e.g., a GPU) may clip the second and third portions. Alternatively, the device may clip the third portion. After clipping, the first triangle 506 may be represented by fixed-point coordinates (described in more detail below).
[0061] like Figure 5 As depicted, in another example, the second triangle 508 may include a first portion within the protective band 504 and a second portion outside the protective band 504. Since the second triangle 508 does not intersect the viewport 502, the apparatus can remove the second triangle 508 from the rendering process. When removed from the rendering process, the second triangle 508 does not need to be clipped, thus reducing computational costs. Alternatively, the apparatus may clip the second portion of the second triangle 508. In yet another example, the third triangle 510 may include a first portion within the viewport 502 and a second portion within the protective band 504. Since the third triangle 510 does not extend beyond the protective band 504, the apparatus can accept the third triangle 510, and the apparatus can avoid performing clipping on the third triangle 510. In another example, the fourth triangle 512 may be within the protective band 504, and the fourth triangle 512 may not intersect the viewport 502. Since the fourth triangle 512 does not intersect the viewport 502, the apparatus can remove the fourth triangle 512 from the rendering process. If the fourth triangle 512 is removed from the rendering process, it does not need to be clipped, thus reducing computational costs.
[0062] In some respects, prior to the clipping operation, the graphics processor or GPU may perform primitive assembly, a process of grouping vertices into lines and triangles. After constructing primitives from their individual vertices, the primitives can be clipped according to a displayable area (i.e., a window or screen), which can also be a smaller area called the viewport. The portions of the primitives determined to be potentially visible can be passed to a rasterizer or rasterization block. The rasterization block determines which pixels are covered by the primitives (e.g., points, lines, or triangles) and then passes the list of pixels to the next stage in the pipeline (e.g., fragment shading).
[0063] In some aspects of graphics processing, clipping can be performed to selectively enable or disable rendering operations within a region of interest (e.g., a view frustum). A "view frustum" can be a spatial region in the modeling world that might appear on the screen; such as the field of view of a perspective virtual camera system. For example, the view plane and the bounding box surrounding the virtual space can represent a view frustum. For instance, rendering can be performed on pixels at the intersection of the defined clipping region and the scene, while pixels / regions outside the visible region (e.g., the view frustum) can be removed from rendering computations. Because clipping reduces the amount of rendering performed (e.g., rendering at the GPU), it can help improve rendering performance (e.g., at the GPU). Furthermore, a well-defined clipping process can allow rendering components (e.g., the GPU) to skip rendering computations falling outside the visible region (e.g., the view frustum), thereby reducing processing time and energy. In some cases, clipping can occur in Cartesian space (i.e., using Cartesian coordinates).
[0064] Additionally, in some aspects of graphics processing (e.g., three-dimensional (3D) graphics), clipping and culling can be used to describe many related features. For example, “clipping” can refer to an operation that works on certain shapes (e.g., rectangular shapes) in a plane, while “culling” can refer to a more general approach of selectively processing elements within a scene model. In some cases, elements of a scene model may include certain geometric primitives (e.g., points / intersections, line segments / edges, polygons / faces). “Primitives” can refer to graphical objects used to create or construct complex images, such as shapes (e.g., triangles). In some types of scene models, individual elements may be deactivated (truncated) for visibility reasons within the viewport or viewing portion (e.g., backface culling, occlusion culling, depth clipping, or Z-clipping, etc.). Different types of algorithms can be executed at the GPU to detect and perform such clipping operations. Furthermore, in some aspects, clipping can be performed by determining which side of each plane (e.g., a plane in a view frustum) the vertices of each primitive lie on. For example, if all vertices of a primitive are “outside” any plane (e.g., a plane within the view frustum), the entire primitive can be discarded. If all vertices of a primitive are “inside” all planes (and therefore entirely within the view frustum or view volume), the primitive can be passed without modification. Partially visible primitives (i.e., those primitives that traverse one of the planes within the view frustum) can be processed separately depending on the GPU’s functionality.
[0065] In depth clipping or Z-clipping, the "Z" direction can refer to the depth axis in a coordinate system centered at the viewport origin within the view frustum. For example, the "Z" direction can be used interchangeably with "depth" and can correspond to the distance "into the virtual screen" from the viewport origin. Additionally, in this coordinate system, "X" and "Y" can refer to a standard Cartesian coordinate system located on the user's screen or viewport. In some cases, the viewport can also be defined by the geometry of the field of view (FoV). Furthermore, Z-clipping or depth clipping can refer to a technique used to selectively render scene objects based on their depth (or Z-axis) relative to the screen. Moreover, near clipping depth and far clipping depth can be specified relative to the screen, allowing the portion of an object between these two specified depths to be displayed.
[0066] Figure 6 This is illustration 600 illustrating an example primitive clipping operation. More specifically, illustration 600 depicts a clipping operation performed on a primitive in the Z direction (i.e., Z-clipping). Figure 6 As shown, Figure 600 includes a Z-plane 610 and a primitive 620, which includes an inner portion 622 and an outer portion 624. Figure 6 Primitive 620 is depicted as being divided in the Z-direction by the Z-far plane 610, resulting in an inner portion 622 (i.e., the portion of primitive 620 within the view frustum) and an outer portion 624 (i.e., the portion of primitive 620 outside the view frustum). For example, the inner portion 622 depicts the primitive portion and vertices of primitive 620 within the Z-far plane 610 (e.g., a plane in the Z-direction within the view frustum). Similarly, the outer portion 624 depicts the primitive portion and vertices of primitive 620 outside the Z-far plane 610 (e.g., a plane in the Z-direction within the view frustum). As noted herein, if all vertices of a primitive (e.g., the vertices of primitive 620) are outside any plane (e.g., the Z-far plane 610), the entire primitive can be discarded. Furthermore, if all vertices of a primitive (e.g., the vertices of primitive 620) are within all planes (e.g., within the Z-far plane 610, and therefore entirely within the view frustum or view volume), the primitive can be passed without modification. Figure 6 As shown, partially visible primitives such as primitive 620 (i.e., those primitives that are bisected by the Z-far plane) can be processed individually. For example, vertices or pixels corresponding to the inner portion 622 of primitive 620 can be preserved, while vertices or pixels corresponding to the outer portion 624 of primitive 620 can be discarded.
[0067] In various aspects of graphics processing, primitives and triangles may require a significant number of processing cycles to complete a clipping operation on a primitive / triangle. For example, to process a clipping operation (e.g., a Z-clipping operation), each primitive / triangle may require a certain number of cycles (e.g., more than 20 cycles). Additionally, clipping operations (e.g., Z-clipping operations) may consume significant performance and power to complete (e.g., performance and power at the GPU). Furthermore, certain types of clipping operations (e.g., Z-clipping operations) may involve a large number of primitives / triangles. For example, certain types of clipping operations (e.g., Z-clipping operations) may be associated with primitives / triangles of a specific size (e.g., small primitives / triangles smaller than a size threshold), which may require processing a large number of primitives / triangles to perform that type of clipping operation. Accordingly, processing a large number of primitives / triangles may consume significant performance and power (e.g., performance and power at the GPU) to perform the clipping operation (e.g., Z-clipping operation). Therefore, performance and power (e.g., performance and power at the GPU) may be limited by a certain throughput (e.g., Z-clipping throughput).
[0068] Additionally, some types of applications (e.g., games) may have a large number of specific clipping operations (e.g., a large number of Z-clipping operations). Furthermore, these types of applications may perform clipping operations (e.g., Z-clipping operations) on triangles of a specific size (e.g., small primitives / triangles smaller than a size threshold). As noted herein, clipping operations consume significant performance and power (e.g., performance and power at the GPU pipeline), involving numerous sequential computational steps. Therefore, handling a large number of such clipping workloads (e.g., Z-clipping workloads) can degrade performance (e.g., performance at the GPU). Based on the foregoing, reducing (e.g., the amount of clipping workload at the GPU) may be beneficial. For example, reducing (e.g., the amount of Z-clipping workload at the GPU) may be beneficial. Additionally, improving performance (e.g., performance at the GPU) due to clipping operations may be beneficial.
[0069] The aspects of this disclosure can improve power and / or performance issues across the entire graphics pipeline (e.g., the graphics pipeline at the GPU). For example, the aspects presented herein can reduce the amount of pruning workload (e.g., at the GPU). For example, the aspects of this disclosure can reduce the amount of Z-pruning workload (e.g., at the GPU). To this end, the aspects of this disclosure can selectively process pruning operations for primitives / triangles of a specific size. That is, the aspects presented herein can compute and determine the size of the primitives / triangles in order to perform the pruning operation. Thus, the aspects presented herein can improve performance (e.g., performance at the GPU) due to the pruning operation. For example, the aspects presented herein can improve GPU performance by performing pruning operations (e.g., Z-pruning operations) for primitives / triangles of a specific size (e.g., primitives / triangles larger than a threshold size). For example, when the primitive size is smaller than a threshold, the aspects presented herein may not perform primitive pruning. This is because small primitives (e.g., primitives smaller than a threshold size) have a reduced number of pixels, making pixel-level clipping (i.e., operating on each pixel) faster than primitive-level clipping. Furthermore, the aspects presented in this paper can save processing power at the GPU by performing clipping operations (e.g., Z-clipping) on primitives / triangles of a specific size (e.g., primitives / triangles larger than a threshold size). Thus, the aspects presented in this paper can achieve a certain frame-level performance improvement at the GPU (e.g., 1%–10% frame-level performance improvement).
[0070] In some cases, aspects of this disclosure can determine whether a pixel in a primitive is within or outside a certain range (e.g., a Z-value range). For example, aspects presented herein can compute a certain value for each pixel in a primitive (e.g., compute the Z-value for each primitive including an area greater than an area threshold). If a pixel in a primitive is within a certain range (e.g., a Z-value range), that pixel can be retained. Similarly, if a pixel in a primitive is outside a certain range (e.g., a Z-value range), that pixel can be discarded. In some aspects, if print level is disabled, the clipping operation can send the entire triangle to the GPU pipeline, and the pixel value can be computed. Additionally, if the Z-value is greater than a certain value (e.g., a Z-far value), that pixel can be discarded. "Z-value" can refer to a value in the Z direction. "Z-value range" can refer to a range of Z-values. Therefore, aspects presented herein can perform clipping operations (e.g., Z-clipping operations) at the pixel level, rather than at the primitive / triangle level. For example, the aspects presented herein can adapt primitive-level clipping (e.g., removing a portion of a primitive via a clipping operation) to pixel-level clipping (e.g., calculating a Z-value and then removing pixels whose Z-values are out of range). This reduces the amount of performance required for the clipping operation. Additionally, the aspects presented herein can perform clipping on triangles of a specific size (e.g., primitives / triangles larger than a threshold size). Therefore, the aspects presented herein can determine the size of the primitive / triangle, and subsequently, for primitives / triangles of a specific size (e.g., primitives / triangles smaller than a threshold size), the aspects presented herein can perform pixel-level clipping on primitives / triangles of the appropriate size.
[0071] Additionally, in some cases, the aspects presented in this paper involve GPU Z-clipping. As noted above, clipping can be costly in a GPU pipeline and involves multiple sequential computational steps, so a large Z-clipping workload can slow down performance at the GPU. The aspects presented in this paper propose replacing primitive / triangle-level Z-clipping with pixel / sample-level Z-clipping for primitives / triangles smaller than a certain size threshold (e.g., small triangles). Before performing Z-clipping on primitives / triangles, the aspects presented in this paper can compute the determinant (area) of the triangle. If the primitives / triangles are smaller than a certain size threshold (e.g., small primitives / triangles), the aspects presented in this paper may not perform Z-clipping on these primitives / triangles. Similarly, if the primitives / triangles are larger than a certain size threshold (e.g., large primitives / triangles), the aspects presented in this paper may perform Z-clipping on these primitives / triangles. After computing the per-sample Z-value for samples in these primitives / triangles, if the Z-value is outside the Z-clipping range, the aspects presented in this paper may discard these samples. Thus, the aspects presented in this article can achieve a certain frame-level performance improvement at the GPU (e.g., 1%-10% frame-level performance improvement).
[0072] Additionally, for certain types of clipping operations (e.g., Z-clipping), the aspects presented herein can perform a viewport transformation before the clipping operation. Afterward, the aspects presented herein can calculate the area of the triangle in screen space or view frustum. If the primitive / triangle size is larger than a certain threshold, the aspects presented herein can perform a clipping operation (e.g., Z-clipping). This reduces the rasterization workload and / or Z-interpolation workload. If the primitive / triangle size is smaller than a certain threshold, the aspects presented herein can disable clipping (e.g., Z-clipping or Z-clipping of the primitive / triangle). Furthermore, after rasterization and Z-interpolation, if the Z-value of a sample exceeds a certain range (e.g., the range [0,1]), the aspects presented herein can discard some samples (e.g., Z-clipping the samples).
[0073] Additionally, the aspects presented herein avoid clipping for each primitive / triangle to save processing power and reduce the overall clipping workload. The aspects presented herein determine whether a primitive / triangle is within a certain size threshold and then perform a clipping operation at the pixel level for that primitive / triangle. For example, the aspects presented herein may determine whether a primitive / triangle is smaller than a certain size threshold and then perform a clipping operation at the pixel level for primitives / triangles smaller than that size threshold (i.e., pixel-level clipping). In some cases, the aspects presented herein may identify a subset of primitives in a primitive set, where each primitive in the primitive subset includes a primitive portion outside the view frustum used for the draw call operation, and where this primitive portion corresponds to a part rather than all of each primitive in the primitive subset. A “draw call” or “draw call operation” may refer to calling a graphics application programming interface (API) to draw an object (e.g., draw a primitive / triangle). The aspects presented herein then calculate the area of each primitive in the primitive subset, which includes the primitive portion outside the view frustum. Next, this paper presents various aspects that can be used to perform or avoid clipping operations for each primitive in a primitive subset, based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold.
[0074] In some aspects, if the area of each primitive in a subset of primitives is greater than an area threshold, the aspects presented herein may perform a clipping operation for each primitive in the subset of primitives. If the area of each primitive in a subset of primitives is less than or equal to the area threshold, the aspects presented herein may avoid performing a clipping operation for each primitive in the subset of primitives. Additionally, for each primitive in a subset of primitives whose area is less than the area threshold, the aspects presented herein may calculate the Z-value of each pixel in the primitive. The calculation of the Z-value may correspond to performing a Z-test for each pixel in the primitive. Based on the calculation of the Z-value, the aspects presented herein may discard each pixel in the primitive whose Z-value is outside the Z-value range. Furthermore, based on the calculation of the Z-value, the aspects presented herein may perform a shading operation for each pixel in the primitive whose Z-value is within the Z-value range. "Shading" or "shading operation" can refer to the process of changing the color of objects / surfaces / polygons in a graphics scene to create a realistic effect. In some aspects, shading may be performed during the rendering process by a program called a shader.
[0075] Furthermore, in some cases, before identifying a subset of primitives, the aspects presented herein can obtain an indication of the set of primitives used for the draw call operation. That is, performing or avoiding a clipping operation can be done on a per-draw call basis. After obtaining this indication, the aspects presented herein can perform at least one of a primitive assembly operation or a vertex transformation operation on the set of primitives used for the draw call operation, wherein the identification of the primitive subset is based on the execution of at least one of the primitive assembly operation or vertex transformation operation. Furthermore, after performing or avoiding a clipping operation, the aspects presented herein can output an indication of whether to perform or avoid a clipping operation for each primitive in the primitive subset. Moreover, after outputting this indication and based on the execution of the clipping operation, the aspects presented herein can perform at least one of a viewport transformation operation, a triangle setting operation, or a rasterization operation for each primitive in the primitive subset, based on the fact that the area of each primitive in the primitive subset is greater than an area threshold.
[0076] Figure 7 Figure 700 is an example flowchart illustrating a clipping operation. More specifically, Figure 700 depicts an example flowchart for a Z-clip operation on a primitive / triangle in a drawing call operation. Figure 7As shown, Figure 700 includes several different steps (e.g., steps 710, 712, 714, 716, 718, 720, 722, 724, and 726) to perform a Z-clipping operation on primitives / triangles during a draw call operation. At step 710, the aspects presented herein can perform a primitive assembler operation. For example, at step 710, primitives and triangles can be assembled. At step 712, the aspects presented herein can perform a vertex shader operation for transformation. For example, at step 712, vertices can be shaded for a transformation operation. At step 714, the aspects presented herein can perform a clipping operation (e.g., a Z-clipping operation). For example, at step 714, primitives / triangles can be clipped (e.g., via a Z-clipping operation). At step 716, the aspects presented herein can perform a viewport transformation operation. For example, at step 716, a viewport transformation can be performed on the clipped primitives / triangles.
[0077] Additionally, such as Figure 7 As described, at step 718, the aspects presented herein can perform primitive setup. For example, at step 718, each of the primitives / triangles can be set. At step 720, the aspects presented herein can perform a rasterization process. For example, at step 720, each of the primitives / triangles can be rasterized. At step 722, the aspects presented herein can perform Z-test pre-pixel shader operations. For example, at step 722, Z-testing can be performed before pixel shading. At step 724, the aspects presented herein can perform pixel shading operations. For example, at step 724, each pixel in the pixel array can be shading. At step 726, the aspects presented herein can perform Z-test post-pixel shader operations. For example, at step 726, Z-testing can be performed after pixel shading.
[0078] Figure 8 Figure 800 is an example illustrating a view frustum. More specifically, Figure 800 depicts a view frustum intersecting a portion of a primitive. Figure 8 As shown, Figure 800 includes a view frustum 810 and a primitive 820. Figure 8 It also depicts a portion of the viewing cone 810 intersecting with a part of the primitive 820, such that a part of the primitive 820 is inside the viewing cone 810 and a part of the primitive 820 is outside the viewing cone 810. For example, the white portion of the primitive 820 is inside the viewing cone 810, and the dashed portion of the primitive 820 is outside the viewing cone 810.
[0079] like Figure 8 As shown, refer to the cropping operation (for example, Figure 7In step 714), the aspects presented herein can check whether a primitive / triangle (e.g., primitive 820) crosses a view frustum (e.g., view frustum 810) at a plane (e.g., left plane, right plane, top plane, bottom plane, near plane, and / or far plane). If the primitive / triangle (e.g., primitive 820) crosses one or more planes of the view frustum (e.g., view frustum 810), the aspects presented herein can clip the triangle based on that plane. Furthermore, the aspects presented herein can preserve the portion of the primitive / triangle (e.g., primitive 820) within the view frustum (e.g., view frustum 810). Because clipping is a complex operation in the GPU, clipping a primitive / triangle (e.g., primitive 820) based on a plane within the view frustum (e.g., view frustum 810) may require multiple cycles. Additionally, when a primitive / triangle (e.g., primitive 820) crosses a far plane in a view frustum (e.g., view frustum 810), the aspects presented herein can clip the primitive / triangle (e.g., primitive 820) and obtain the portion of the primitive / triangle within the view frustum (e.g., view frustum 810). For example, the clipped primitive / triangle can be transformed into a quadrilateral after clipping. Moreover, all pixels within the quadrilateral (e.g., after clipping the primitive / triangle) can have a Z value less than or equal to that of the Z far plane (e.g., Z far plane 610).
[0080] Figure 9 Figure 900 is an example illustrating a view frustum. More specifically, Figure 900 depicts a view frustum intersecting a portion of a primitive. Figure 9 As shown, Figure 900 includes a view frustum 910, a primitive 920, and a primitive 922. Figure 9 The image also depicts a portion of the viewing cone 910 intersecting with primitives 920 and 922, such that portions of primitives 920 and 922 are within the viewing cone 910, and portions of primitives 920 and 922 are outside the viewing cone 910. For example, the white portions of primitives 920 and 922 are within the viewing cone 910, and the dashed portions of primitives 920 and 922 are outside the viewing cone 910.
[0081] like Figure 9 As shown, refer to the cropping operation (for example, Figure 7In step 714), the aspects presented herein can check whether a primitive / triangle (e.g., primitive 920 and / or primitive 922) crosses a view frustum (e.g., view frustum 910) at a plane (e.g., left plane, right plane, top plane, bottom plane, near plane, and / or far plane). If the primitive / triangle (e.g., primitive 920 and / or primitive 922) crosses one or more planes (e.g., near plane and / or far plane) of the view frustum (e.g., view frustum 910), the aspects presented herein can perform a viewport transformation (e.g., view frustum space to screen space) on the primitive / triangle. Furthermore, the aspects presented herein can calculate the area of the primitive / triangle (e.g., primitive 920 and / or primitive 922) in screen space. If the area of a primitive / triangle (e.g., primitive 920 and / or primitive 922) is less than a certain threshold, aspects of this disclosure can avoid pruning of primitives / triangles (e.g., avoid pruning of primitives / triangles based on the near and / or far planes of the view frustum).
[0082] Additionally, when a primitive / triangle (e.g., primitive 922) crosses a far plane in a view frustum (e.g., view frustum 910) and has a small screen area, the aspects presented herein avoid clipping the primitive / triangle (e.g., primitive 922). For example, in the Z-test phase before the pixel shader (e.g., Figure 7 In step 722), the aspects presented herein can calculate the per-pixel Z-value for all pixels of the primitive / triangle (e.g., primitive 922). If a pixel's Z-value is greater than the far plane, the aspects presented herein can discard that pixel. After this, pixels with Z-values less than or equal to the far plane can undergo Z-testing. Additionally, because small primitives / triangles (e.g., primitive 922) are used in rasterization (e.g., Figure 7 After step 720 in the process, there may not be many pixels left, and the GPU can process these pixels quickly. Therefore, this is comparable to processing them during the cropping stage (e.g., ...). Figure 7 Step 714) in the process of cropping primitives / triangles (e.g., primitive 922) is faster.
[0083] Furthermore, when a primitive / triangle (e.g., primitive 920) crosses the far plane in the view frustum (e.g., view frustum 910) and has a large screen area, the aspects presented herein can crop the primitive / triangle (e.g., primitive 920). After the cropping operation, the aspects presented herein can retain the portion of the primitive / triangle (e.g., primitive 920) within the view frustum (e.g., the white portion of primitive 920). For example, the cropped primitive / triangle can be transformed into a quadrilateral after cropping. Moreover, all pixels within the quadrilateral (e.g., after cropping the primitive / triangle) can have a Z value less than or equal to the Z far plane (e.g., Z far plane 610) value. Additionally, cropping of large primitives / triangles (e.g., primitive 920) can be performed because they may be affected by rasterization (e.g., Figure 7 In step 720, multiple pixels are generated. The GPU may also need to spend multiple cycles checking whether the Z value of these pixels is less than or equal to the Z far plane (e.g., Z far plane 610) value, which may slow down the GPU operation.
[0084] The aspects of this disclosure may include several benefits or advantages. For example, the aspects of this disclosure may improve power and / or performance issues across the entire graphics pipeline (e.g., the graphics pipeline at the GPU). The aspects presented herein may also reduce the amount of clipping workload (e.g., at the GPU). That is, the aspects of this disclosure may reduce the amount of Z-clipping workload (e.g., at the GPU). Additionally, the aspects of this disclosure may selectively process clipping operations for primitives / triangles of a specific size. For example, the aspects presented herein may compute and determine the size of the primitives / triangles in order to perform the clipping operation. The aspects presented herein may also improve performance (e.g., performance at the GPU) due to the clipping operation. In fact, the aspects presented herein may improve GPU performance by performing clipping operations (e.g., Z-clipping operations) for primitives / triangles of a specific size (e.g., primitives / triangles smaller than a threshold size). Furthermore, the aspects presented herein may save a significant amount of processing power at the GPU by performing clipping operations (e.g., Z-clipping operations) for primitives / triangles of a specific size (e.g., primitives / triangles smaller than a threshold size). The aspects presented in this article can also yield some frame-level performance improvements at the GPU level (e.g., 1%-10% frame-level performance improvement).
[0085] Figure 10 This is a communication flowchart 1000 for frame processing according to one or more techniques of this disclosure. For example... Figure 10As shown, according to one or more techniques of this disclosure, Figure 1000 includes example communication between a GPU 1002 (e.g., a GPU, graphics processor, CPU, central processing unit, or any device capable of performing graphics processing), a CPU / GPU component 1004 (e.g., a GPU, graphics processor, CPU, central processing unit, or any device capable of performing graphics processing), and a memory 1006 (e.g., memory or cache in the GPU or CPU).
[0086] At 1010, GPU 1002 may obtain an indication of the set of primitives used for the draw invocation operation. For example, GPU 1002 may obtain indication 1012 from CPU / GPU component 1004.
[0087] At 1020, GPU 1002 may perform at least one of a primitive assembly operation or a vertex transformation operation on the primitive set used for the draw call operation, wherein the identification of the primitive subset is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation.
[0088] At 1030, GPU 1002 may identify a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a primitive portion outside the view frustum used for the draw call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset. In some aspects, each primitive in the primitive subset may include the primitive portion outside the view frustum in the Z direction (e.g., the depth direction). Moreover, the view frustum may intersect with each primitive in the primitive subset. Furthermore, a portion of each primitive in the primitive subset may be within the view frustum.
[0089] At 1040, GPU 1002 can calculate the area of each primitive in the primitive subset, including the portion of the primitive outside the view frustum.
[0090] At 1050, GPU 1002 can detect whether the area of each primitive in the primitive subset is less than, equal to or greater than an area threshold, and the execution or avoidance of a clipping operation for each primitive in the primitive subset is based on this detection.
[0091] At 1060, GPU 1002 may perform or avoid performing a clipping operation for each primitive in the primitive subset based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold. In some aspects, performing the clipping operation for each primitive in the primitive subset may include performing the clipping operation for each primitive in the primitive subset based on whether the area of each primitive in the primitive subset is greater than the area threshold. Alternatively, performing the clipping operation for each primitive in the primitive subset may include performing the clipping operation for each primitive in the primitive subset on a per-draw call basis based on whether the area of each primitive in the primitive subset is greater than the area threshold. Furthermore, avoiding performing the clipping operation for each primitive in the primitive subset may include avoiding performing the clipping operation for each primitive in the primitive subset based on whether the area of each primitive in the primitive subset is less than or equal to the area threshold.
[0092] At 1070, GPU 1002 may output an instruction for the execution or avoidance of the pruning operation for each primitive in the subset of primitives. In some aspects, outputting the instruction for the execution or avoidance of the pruning operation for each primitive in the subset of primitives may include sending the instruction for the execution or avoidance of the pruning operation for each primitive in the subset of primitives (e.g., GPU 1002 may send instruction 1072 to CPU / GPU component 1004). Additionally, outputting the instruction for the execution or avoidance of the pruning operation for each primitive in the subset of primitives may include storing the instruction for the execution or avoidance of the pruning operation for each primitive in the subset of primitives (e.g., GPU 1002 may store instruction 1074 in memory 1006).
[0093] At 1080, GPU 1002 may perform at least one of a viewport transformation operation, a triangle setting operation, or a rasterization operation on each primitive in the primitive subset based on the fact that the area of each primitive in the primitive subset is greater than the area threshold, and based on the execution of the clipping operation.
[0094] At 1082, GPU 1002 may compute the Z value of each pixel in the primitive for each primitive in the subset of primitives that includes the area of the primitives smaller than the area threshold. In some aspects, computing the Z value of each pixel in the primitive may include performing a Z test for each pixel in the primitive.
[0095] At 1090, GPU 1002 can discard each pixel in the primitive that has a Z value outside the Z value range, based on this calculation of the Z value.
[0096] Additionally, at 1090, GPU 1002 can perform a shading operation for each pixel in the primitive that includes the Z value within the Z value range, based on this calculation of the Z value.
[0097] As shown at 1090, GPU 1002 may output an instruction for the execution of the shading operation for each pixel in the primitive whose Z value is included within the Z value range. In some aspects, outputting the instruction for the execution of the shading operation for each pixel in the primitive whose Z value is included within the Z value range may include: sending the instruction for the execution of the shading operation for each pixel in the primitive whose Z value is included within the Z value range (e.g., GPU 1002 may send instruction 1092 to CPU / GPU component 1004). Additionally, outputting the instruction for the execution of the shading operation for each pixel in the primitive whose Z value is included within the Z value range may include: storing the instruction for the execution of the shading operation for each pixel in the primitive whose Z value is included within the Z value range (e.g., GPU 1002 may store instruction 1094 in memory 1006).
[0098] Figure 11 This is a flowchart 1100 of an example method for graphics processing according to one or more techniques of this disclosure. The method may be performed by a GPU (or other graphics processor), a CPU (or other central processing unit), a GPU driver, a DDIC, a means for graphics processing, a wireless communication device, and / or as combined with... Figures 1 to 10 The example uses any device capable of performing graphics processing.
[0099] At 1102, the GPU can obtain an indication of the set of primitives used for the draw call operation, such as in conjunction with Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1010, GPU 1002 can obtain an indication of the set of primitives used for the drawing invocation operation. Furthermore, step 1102 can be performed by... Figure 1 The processing unit 120 in the middle executes.
[0100] At 1106, the GPU can identify a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a primitive portion outside the view frustum used for the draw call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset, as combined with Figures 1 to 10 The examples described in the document. For example, as... Figure 10As described in 1030, GPU 1002 can identify a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a primitive portion outside the view frustum used for the draw call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset. Furthermore, step 1106 can be performed by... Figure 1 The processing unit 120 performs this operation. In some aspects, each primitive in the primitive subset may include a portion of the primitive outside the view frustum in the Z direction (e.g., the depth direction). Furthermore, the view frustum may intersect with each primitive in the primitive subset. Additionally, a portion of each primitive in the primitive subset may be within the view frustum.
[0101] At 1108, the GPU can calculate the area of each primitive in the primitive subset, including the portion of the primitive outside the view frustum, as combined with... Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1040, GPU 1002 can calculate the area of each primitive in the primitive subset, the area including the portion of the primitive outside the view frustum. Furthermore, step 1108 can be performed by... Figure 1 The processing unit 120 in the middle executes.
[0102] At 1112, the GPU can perform or avoid performing a pruning operation for each primitive in the primitive subset based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold, such as in combination with Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1060, GPU 1002 can perform or avoid performing a pruning operation for each primitive in the primitive subset based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold. Furthermore, step 1112 can be performed by... Figure 1 The processing unit 120 executes the operation. In some aspects, performing the clipping operation for each primitive in the primitive subset may include: performing the clipping operation for each primitive in the primitive subset based on the area of each primitive in the primitive subset being greater than the area threshold. Alternatively, performing the clipping operation for each primitive in the primitive subset may include: performing the clipping operation for each primitive in the primitive subset on a per-draw call basis based on the area of each primitive in the primitive subset being greater than the area threshold. Furthermore, avoiding performing the clipping operation for each primitive in the primitive subset may include: avoiding performing the clipping operation for each primitive in the primitive subset based on the area of each primitive in the primitive subset being less than or equal to the area threshold.
[0103] Figure 12This is a flowchart 1200 of an example method for graphics processing according to one or more techniques of this disclosure. The method may be performed by a GPU (or other graphics processor), a CPU (or other central processing unit), a GPU driver, a DDIC, a means for graphics processing, a wireless communication device, and / or as combined with... Figures 1 to 10 The example uses any device capable of performing graphics processing.
[0104] At position 1202, the GPU can obtain an indication of the set of primitives used for the draw call operation, such as in conjunction with Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1010, GPU 1002 can obtain an indication of the set of primitives used for the drawing invocation operation. Furthermore, step 1202 can be performed by... Figure 1 The processing unit 120 in the middle executes.
[0105] At 1204, the GPU can perform at least one of a primitive assembly operation or a vertex transformation operation on the primitive set used for the draw call operation, wherein the identification of the primitive subset is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation, such as in combination with Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1020, GPU 1002 can perform at least one of a primitive assembly operation or a vertex transformation operation on the primitive set used for the draw call operation, wherein the identification of the primitive subset is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation. Furthermore, step 1204 can be performed by… Figure 1 The processing unit 120 in the middle executes.
[0106] At 1206, the GPU can identify a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a primitive portion outside the view frustum used for the draw call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset, as combined with Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1030, GPU 1002 can identify a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a primitive portion outside the view frustum used for the draw call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset. Furthermore, step 1206 can be performed by... Figure 1 The processing unit 120 performs this operation. In some aspects, each primitive in the primitive subset may include a portion of the primitive outside the view frustum in the Z direction (e.g., the depth direction). Furthermore, the view frustum may intersect with each primitive in the primitive subset. Additionally, a portion of each primitive in the primitive subset may be within the view frustum.
[0107] At 1208, the GPU can calculate the area of each primitive in the primitive subset, including the portion of the primitive outside the view frustum, as combined with... Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1040, GPU 1002 can calculate the area of each primitive in the primitive subset, the area including the portion of the primitive outside the view frustum. Furthermore, step 1208 can be performed by... Figure 1 The processing unit 120 in the middle executes.
[0108] At 1210, the GPU can detect whether the area of each primitive in the primitive subset is less than, equal to, or greater than a certain area threshold, wherein the execution or avoidance of a clipping operation for each primitive in the primitive subset is based on this detection, such as in combination with... Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1050, GPU 1002 can detect whether the area of each primitive in the primitive subset is less than, equal to, or greater than the area threshold, wherein the execution or avoidance of a pruning operation for each primitive in the primitive subset is based on this detection. Furthermore, step 1210 can be performed by... Figure 1 The processing unit 120 in the middle executes.
[0109] At position 1212, the GPU can perform or avoid pruning operations for each primitive in the primitive subset based on whether its area is less than, equal to, or greater than an area threshold, such as in combination with... Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1060, GPU 1002 can perform or avoid performing a pruning operation for each primitive in the primitive subset based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold. Furthermore, step 1212 can be performed by... Figure 1 The processing unit 120 executes the operation. In some aspects, performing the clipping operation for each primitive in the primitive subset may include: performing the clipping operation for each primitive in the primitive subset based on the area of each primitive in the primitive subset being greater than the area threshold. Alternatively, performing the clipping operation for each primitive in the primitive subset may include: performing the clipping operation for each primitive in the primitive subset on a per-draw call basis based on the area of each primitive in the primitive subset being greater than the area threshold. Furthermore, avoiding performing the clipping operation for each primitive in the primitive subset may include: avoiding performing the clipping operation for each primitive in the primitive subset based on the area of each primitive in the primitive subset being less than or equal to the area threshold.
[0110] At 1214, the GPU can output an instruction for the execution or avoidance of the pruning operation for each primitive in the primitive subset, as combined with... Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1070, GPU 1002 can output an instruction for the execution or avoidance of the pruning operation for each primitive in the primitive subset. Furthermore, step 1214 can be performed by... Figure 1 The processing unit 120 executes the instruction. In some aspects, outputting the instruction for the execution or avoidance of the pruning operation for each primitive in the primitive subset may include: sending the instruction for the execution or avoidance of the pruning operation for each primitive in the primitive subset (e.g., GPU 1002 may send instruction 1072 to CPU / GPU component 1004). Alternatively, outputting the instruction for the execution or avoidance of the pruning operation for each primitive in the primitive subset may include: storing the instruction for the execution or avoidance of the pruning operation for each primitive in the primitive subset (e.g., GPU 1002 may store instruction 1074 in memory 1006).
[0111] At 1216, the GPU can perform at least one of a viewport transformation operation, a triangle setting operation, or a rasterization operation on each primitive in the primitive subset based on the fact that the area of each primitive in the primitive subset is greater than the area threshold, and based on the execution of the clipping operation, such as in combination with Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1080, GPU 1002 may perform at least one of a viewport transformation operation, a triangle setting operation, or a rasterization operation on each primitive in the primitive subset based on the execution of the clipping operation, provided that the area of each primitive in the primitive subset is greater than the area threshold. Furthermore, step 1216 may be performed by... Figure 1 The processing unit 120 in the middle executes.
[0112] At 1218, the GPU can compute the Z value of each pixel in the primitive for each primitive in the primitive subset that includes primitives with areas smaller than the area threshold, such as in combination with... Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1082, GPU 1002 can compute the Z value of each pixel in the primitive for each primitive in the primitive subset that includes the area of the primitive that is smaller than the area threshold. Furthermore, step 1218 can be performed by... Figure 1 The processing unit 120 performs this operation. In some aspects, calculating the Z value for each pixel in the primitive may include performing a Z-test for each pixel in the primitive.
[0113] At 1220, the GPU can, based on this calculation of the Z value, discard each pixel in the primitive that has a Z value outside the Z value range, such as in combination with... Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1090, GPU 1002 can discard each pixel in the primitive whose Z value is outside the Z value range based on this calculation of the Z value. Furthermore, step 1220 can be performed by... Figure 1 The processing unit 120 in the middle executes.
[0114] Additionally, at 1220, the GPU can perform a shading operation for each pixel in the primitive whose Z value falls within the Z value range, based on this calculation of the Z value, such as in combination with... Figures 1 to 10 The examples described in the document. For example, as... Figure 10 As described in 1090, GPU 1002 can perform a shading operation for each pixel in the primitive whose Z value falls within the Z value range, based on this calculation of the Z value. Furthermore, step 1220 can be performed by… Figure 1 The processing unit 120 in the middle executes.
[0115] Additionally, the GPU may output an instruction for the execution of the shading operation for each pixel in the primitive whose Z-values are within the Z-value range. In some aspects, outputting the instruction for the execution of the shading operation for each pixel in the primitive whose Z-values are within the Z-value range may include: sending the instruction for the execution of the shading operation for each pixel in the primitive whose Z-values are within the Z-value range (e.g., GPU 1002 may send instruction 1092 to CPU / GPU component 1004). Furthermore, outputting the instruction for the execution of the shading operation for each pixel in the primitive whose Z-values are within the Z-value range may include: storing the instruction for the execution of the shading operation for each pixel in the primitive whose Z-values are within the Z-value range (e.g., GPU 1002 may store instruction 1094 in memory 1006).
[0116] In various configurations, methods or apparatus for display processing are provided. This apparatus may be a GPU (or other graphics processing unit), a CPU (or other central processing unit), a GPU driver, a DDIC, a device for graphics processing, a wireless communication device, and / or some other processor capable of performing display processing. In various aspects, the apparatus may be a processing unit 120 within device 104, or may be some other hardware within device 104 or another device. The apparatus (e.g., processing unit 120) may include components for obtaining an indication of a set of primitives for a draw invocation operation. The apparatus (e.g., processing unit 120) may also include components for identifying a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a primitive portion outside the view frustum for the draw invocation operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset. The apparatus (e.g., processing unit 120) may also include components for calculating the area of each primitive in the primitive subset, the area including the primitive portion outside the view frustum. The apparatus (e.g., processing unit 120) may further include means for performing or avoiding a clipping operation for each pixel in the subset of pixels based on whether the area of each pixel in the subset of pixels is less than, equal to, or greater than an area threshold. The apparatus (e.g., processing unit 120) may further include means for outputting an indication of the execution or avoidance of the clipping operation for each pixel in the subset of pixels. The apparatus (e.g., processing unit 120) may further include means for detecting whether the area of each pixel in the subset of pixels is less than, equal to, or greater than an area threshold, wherein the execution or avoidance of the clipping operation for each pixel in the subset of pixels is based on the detection. The apparatus (e.g., processing unit 120) may further include means for calculating the Z value of each pixel in the subset of pixels that includes an area of pixels with an area less than the area threshold. The apparatus (e.g., processing unit 120) may further include components for discarding each pixel in the primitive whose Z value is outside the Z value range, based on the calculation of the Z value. The apparatus (e.g., processing unit 120) may further include components for performing a shading operation on each pixel in the primitive whose Z value is within the Z value range, based on the calculation of the Z value. The apparatus (e.g., processing unit 120) may further include components for outputting an indication of the execution of the shading operation on each pixel in the primitive whose Z value is within the Z value range. The apparatus (e.g., processing unit 120) may further include components for performing at least one of a primitive assembly operation or a vertex transformation operation on the primitive set for the draw call operation, wherein the identification of the primitive subset is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation.The device (e.g., processing unit 120) may also include components for performing at least one of a viewport transformation operation, a triangle setting operation, or a rasterization operation on each of the primitive subsets based on the fact that the area of each primitive in the primitive subset is greater than the area threshold, and based on the execution of the clipping operation.
[0117] The subjects described herein can be implemented to achieve one or more benefits or advantages. For example, the described display processing techniques can be implemented using a GPU (or other graphics processing unit), a CPU (or other central processing unit), a GPU driver, a DDIC, a device for graphics processing, a wireless communication device, or some other processor capable of performing display processing. This can also be implemented at a lower cost compared to other display processing techniques. Furthermore, the graphics processing techniques described herein can improve or accelerate data processing or execution. Additionally, the graphics processing techniques described herein can improve resource or data utilization and / or resource efficiency. Furthermore, aspects of this disclosure can utilize primitive clipping techniques to improve memory bandwidth efficiency and / or increase processing speed at the GPU and / or CPU.
[0118] It should be understood that the specific order or hierarchy of the boxes in the disclosed process / flowcharts is merely an example of the exemplary method. It should be understood that the specific order or hierarchy of the boxes in the process / flowcharts may be rearranged based on design preferences. Furthermore, some boxes may be combined or omitted. The appended method claims present the elements of various boxes in a sample order, but this does not imply limitation to the given specific order or hierarchy.
[0119] The foregoing description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects. Therefore, the claims are not intended to be limited to the aspects shown herein, but should be given the full scope consistent with the language of the claims, wherein references to elements in the singular form, unless specifically stated otherwise, are not intended to mean “one and only one,” but rather “one or more.” The word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.
[0120] Unless otherwise specified, the term "some" refers to one or more, and unless otherwise specified in the context, the term "or" may be interpreted as "and / or". Combinations such as "at least one of A, B, or C", "one or more of A, B, or C", "at least one of A, B, and C", "one or more of A, B, and C", and "A, B, C, or any combination thereof" include any combination of A, B, and / or C, and may include multiple A, multiple B, or multiple C. Specifically, combinations such as "at least one of A, B, or C", "one or more of A, B, or C", "at least one of A, B, and C", "one or more of A, B, and C", and "A, B, C, or any combination thereof" may be only A, only B, only C, A and B, A and C, B and C, or A and B and C, wherein any such combination may include one or more members of A, B, or C. All elements of the various aspects described herein, and all structural and functional equivalents known now or hereafter to those skilled in the art, are expressly incorporated herein by reference and are intended to be covered by the claims. Furthermore, nothing disclosed herein is intended to be offered to the public, whether or not such disclosure is explicitly recited in the claims. Terms such as “module,” “mechanism,” “element,” and “device” cannot replace the word “component.” Therefore, no claim element will be construed as a functional component unless the element is explicitly described using the phrase “component for…”.
[0121] In one or more examples, the functionality described herein may be implemented in hardware, software, firmware, or any combination thereof. For example, although the term "processing unit" is used throughout this disclosure, such a processing unit may be implemented in hardware, software, firmware, or any combination thereof. If any functionality, processing unit, technique, or other module described herein is implemented in software, then such functionality, processing unit, technique, or other module may be stored on or transmitted on a computer-readable medium as one or more instructions or code.
[0122] According to this disclosure, unless otherwise specified in the context, the term "or" may be understood as "and / or". Additionally, while phrases such as "one or more" or "at least one" may be used for some features disclosed herein but not others, features not using such language may be understood to have such implied meaning unless otherwise specified in the context.
[0123] In one or more examples, the functionality described herein may be implemented in hardware, software, firmware, or any combination thereof. For example, although the term “processing unit” is used throughout this disclosure, such a processing unit may be implemented in hardware, software, firmware, or any combination thereof. If any functionality, processing unit, technique, or other module described herein is implemented in software, then the functionality, processing unit, technique, or other module described herein may be stored on or transmitted on a computer-readable medium as one or more instructions or code. A computer-readable medium may include computer data storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. In this way, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described herein. By way of example and not limitation, such computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices, or other magnetic storage devices. As used herein, disks and optical discs include: compact optical discs (CDs), laser optical discs, optical discs, digital multifunction optical discs (DVDs), floppy disks, and Blu-ray discs, wherein disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media. Computer program products may include computer-readable media.
[0124] The code can be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), arithmetic logic units (ALUs), field-programmable arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the term "processor" as used herein can refer to any of the above-described structures or any other structure suitable for implementing the techniques described herein. Furthermore, these techniques can be fully implemented in one or more circuit or logic elements.
[0125] The techniques disclosed herein can be implemented in a wide variety of devices or apparatuses, including wireless mobile phones, integrated circuits (ICs), or IC sets (e.g., chipsets). Various components, modules, or units are described in this disclosure to emphasize functional aspects of a device configured to perform the disclosed techniques, but they do not necessarily need to be implemented by different hardware units. Rather, as described above, various units can be combined in any hardware unit or provided by a collection of interoperable hardware units (including one or more processors as described above) combined with suitable software and / or firmware. Therefore, the term "processor" as used herein can refer to any of the above-described structures or any other structure suitable for implementing the techniques described herein. Furthermore, these techniques can be fully implemented in one or more circuit or logic elements.
[0126] The following aspects are merely illustrative and may be combined with other aspects or teachings described herein without limitation.
[0127] Aspect 1 is an apparatus for graphics processing, the apparatus comprising: at least one memory; and at least one processor coupled to the at least one memory and configured, at least in part, based on information stored in the at least one memory, wherein the at least one processor is configured individually or in any combination to: obtain an indication of a set of primitives for a draw invocation operation; identify a subset of primitives in the set of primitives, wherein each primitive in the subset of primitives includes a portion of a primitive outside a view frustum for the draw invocation operation, and wherein the portion of a primitive corresponds to a part rather than all of each primitive in the subset of primitives; calculate an area of each primitive in the subset of primitives, the area including the portion of the primitive outside the view frustum; and perform or avoid performing a clipping operation for each primitive in the subset of primitives based on whether the area of each primitive in the subset of primitives is less than, equal to, or greater than an area threshold.
[0128] Aspect 2 is the apparatus according to aspect 1, wherein the at least one processor is further configured, individually or in any combination, to output an instruction for the execution or avoidance of the clipping operation for each primitive in the subset of primitives.
[0129] Aspect 3 is the apparatus according to aspect 2, wherein, in order to output the instruction for the execution or avoidance of the clipping operation for each element in the subset of elements, the at least one processor is configured individually or in any combination to: send the instruction for the execution or avoidance of the clipping operation for each element in the subset of elements; or store the instruction for the execution or avoidance of the clipping operation for each element in the subset of elements.
[0130] Aspect 4 is an apparatus according to any one of Aspects 1 to 3, wherein, in order to perform the clipping operation for each primitive in the primitive subset, the at least one processor is configured individually or in any combination to perform the clipping operation for each primitive in the primitive subset based on the fact that the area of each primitive in the primitive subset is greater than the area threshold.
[0131] Aspect 5 is the apparatus according to aspect 4, wherein, in order to perform the clipping operation for each primitive in the primitive subset, the at least one processor is configured individually or in any combination to perform the clipping operation for each primitive in the primitive subset on a per-draw call basis, based on the fact that the area of each primitive in the primitive subset is greater than the area threshold.
[0132] Aspect 6 is an apparatus according to any one of Aspects 1 to 5, wherein, in order to avoid performing the clipping operation for each primitive in the primitive subset, the at least one processor is configured individually or in any combination to avoid performing the clipping operation for each primitive in the primitive subset based on the fact that the area of each primitive in the primitive subset is less than or equal to the area threshold.
[0133] Aspect 7 is an apparatus according to any one of Aspects 1 to 6, wherein the at least one processor is further configured individually or in any combination to: detect whether the area of each primitive in the primitive subset is less than, equal to or greater than the area threshold, wherein the execution or avoidance of the clipping operation for each primitive in the primitive subset is based on the detection.
[0134] Aspect 8 is an apparatus according to any one of aspects 1 to 7, wherein the at least one processor is further configured individually or in any combination to: calculate the Z value of each pixel in the primitive for each primitive in the primitive subset that includes the area of the primitives that is less than the area threshold.
[0135] Aspect 9 is the apparatus according to aspect 8, wherein the at least one processor is further configured, individually or in any combination, to discard each pixel in the primitive that includes a Z value outside the Z value range, based on the calculation of the Z value.
[0136] Aspect 10 is the apparatus according to aspect 8, wherein the at least one processor is further configured, individually or in any combination, to perform a shading operation for each pixel in the primitive that includes the Z value within the Z value range, based on the calculation of the Z value.
[0137] Aspect 11 is the apparatus according to aspect 10, wherein the at least one processor is further configured, individually or in any combination, to output an instruction for the execution of the shading operation for each pixel in the primitive that includes the Z value within the range of the Z value.
[0138] Aspect 12 is an apparatus according to aspect 11, wherein, in order to output the instruction for the execution of the coloring operation for each pixel in the primitive including the Z value within the Z value range, the at least one processor is configured individually or in any combination to: send the instruction for the execution of the coloring operation for each pixel in the primitive including the Z value within the Z value range; or store the instruction for the execution of the coloring operation for each pixel in the primitive including the Z value within the Z value range.
[0139] Aspect 13 is an apparatus according to any one of aspects 8 to 12, wherein, in order to calculate the Z value of each pixel in the primitive, the at least one processor is configured individually or in any combination to perform a Z test for each pixel in the primitive.
[0140] Aspect 14 is an apparatus according to any one of aspects 1 to 13, wherein the at least one processor is further configured, individually or in any combination, to perform at least one of a primitive assembly operation or a vertex transformation operation on the primitive set for the drawing call operation, wherein the identification of the primitive subset is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation.
[0141] Aspect 15 is an apparatus according to any one of aspects 1 to 14, wherein the at least one processor is further configured individually or in any combination to perform at least one of a viewport transformation operation, a triangle setting operation, or a rasterization operation for each primitive in the primitive subset based on the execution of the clipping operation, since the area of each primitive in the primitive subset is greater than the area threshold.
[0142] Aspect 16 is an apparatus according to any one of aspects 1 to 15, wherein each element in the subset of elements includes the element portion outside the view frustum in the Z direction.
[0143] Aspect 17 is an apparatus according to any one of aspects 1 to 16, wherein the view cone intersects with each primitive in the primitive subset, and wherein a portion of each primitive in the primitive subset is in the view cone.
[0144] Aspect 18 is an apparatus according to any one of aspects 1 to 17, the apparatus further comprising at least one of an antenna or a transceiver coupled to the at least one processor, wherein, in order to obtain the indication of the set of primitives for the draw call operation, the at least one processor is configured individually or in any combination to obtain the indication of the set of primitives for the draw call operation via the antenna or the transceiver.
[0145] Aspect 19 is a method for implementing the graphics processing of any one of Aspects 1 to 18.
[0146] Aspect 20 is a device for graphics processing, the device including components for implementing any one of aspects 1 to 18.
[0147] Aspect 21 is a computer-readable medium (e.g., a non-transitory computer-readable medium) storing computer-executable code that, when executed by at least one processor, causes the at least one processor to implement any one of aspects 1 to 18.
Claims
1. An apparatus for graphics processing, the apparatus comprising: At least one memory; and At least one processor, coupled to the at least one memory, and configured individually or in any combination, based at least in part on information stored in the at least one memory, to: Obtain an indication of the set of primitives used for the drawing call operation; Identify a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a portion of a primitive outside the view frustum used for the drawing call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset; Calculate the area of each primitive in the primitive subset, the area including the portion of the primitive outside the view frustum; as well as Based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold, a clipping operation is performed or avoided for each primitive in the primitive subset.
2. The apparatus of claim 1, wherein the at least one processor is further configured, alone or in any combination, to: Output an instruction for the execution or avoidance of the clipping operation for each primitive in the subset of primitives.
3. The apparatus of claim 2, wherein, in order to output the instruction for the execution or avoidance of the clipping operation for each primitive in the subset of primitives, the at least one processor is configured individually or in any combination to: Send the instruction to execute or avoid execution of the clipping operation for each primitive in the subset of primitives; or Store the instructions for executing or avoiding the clipping operation for each primitive in the subset of primitives.
4. The apparatus of claim 1, wherein, in order to perform the clipping operation for each primitive in the primitive subset, the at least one processor is configured individually or in any combination to perform the clipping operation for each primitive in the primitive subset based on the fact that the area of each primitive in the primitive subset is greater than the area threshold.
5. The apparatus of claim 4, wherein, in order to perform the clipping operation for each primitive in the primitive subset, the at least one processor is configured individually or in any combination to perform the clipping operation for each primitive in the primitive subset on a per-draw call basis, based on the fact that the area of each primitive in the primitive subset is greater than the area threshold.
6. The apparatus of claim 1, wherein, in order to avoid performing the clipping operation for each primitive in the primitive subset, the at least one processor is configured individually or in any combination to avoid performing the clipping operation for each primitive in the primitive subset based on the fact that the area of each primitive in the primitive subset is less than or equal to the area threshold.
7. The apparatus of claim 1, wherein the at least one processor is further configured, alone or in any combination, to: The area of each primitive in the primitive subset is detected to be less than, equal to, or greater than the area threshold, wherein the execution or avoidance of the clipping operation for each primitive in the primitive subset is based on the detection.
8. The apparatus of claim 1, wherein the at least one processor is further configured, alone or in any combination, to: For each primitive in the primitive subset whose area is less than the area threshold, calculate the Z value of each pixel in the primitive.
9. The apparatus of claim 8, wherein the at least one processor is further configured, alone or in any combination, to: Based on the calculation of the Z value, each pixel in the primitive that has a Z value outside the Z value range is discarded.
10. The apparatus of claim 8, wherein the at least one processor is further configured, alone or in any combination, to: Based on the calculation of the Z value, a coloring operation is performed on each pixel in the primitive that has a Z value within the Z value range.
11. The apparatus of claim 10, wherein the at least one processor is further configured, individually or in any combination, to: Output an instruction for the execution of the shading operation for each pixel in the primitive that includes the Z value within the Z value range.
12. The apparatus of claim 11, wherein, in order to output the instruction for the execution of the shading operation for each pixel in the primitive that includes the Z value within the Z value range, the at least one processor is configured individually or in any combination to: Send the instruction for the execution of the shading operation for each pixel in the primitive, including the Z value within the Z value range; or The storage of the instruction for the execution of the shading operation for each pixel in the primitive, including the Z value within the Z value range.
13. The apparatus of claim 8, wherein, in order to calculate the Z value of each pixel in the primitive, the at least one processor is configured individually or in any combination to perform a Z test for each pixel in the primitive.
14. The apparatus of claim 1, wherein the at least one processor is further configured, alone or in any combination, to: At least one of a primitive assembly operation or a vertex transformation operation is performed on the primitive set used for the drawing call operation, wherein the identifier of the primitive subset is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation.
15. The apparatus of claim 1, wherein the at least one processor is further configured, alone or in any combination, to: Based on the fact that the area of each primitive in the primitive subset is greater than the area threshold, at least one of a viewport transformation operation, a triangle setting operation, or a rasterization operation is performed on each primitive in the primitive subset based on the execution of the clipping operation.
16. The apparatus of claim 1, wherein each primitive in the primitive subset includes a portion of the primitive outside the view frustum in the Z direction.
17. The apparatus of claim 1, wherein the view frustum intersects with each primitive in the subset of primitives, and wherein a portion of each primitive in the subset of primitives is within the view frustum.
18. The apparatus of claim 1, further comprising at least one of an antenna or a transceiver coupled to the at least one processor, wherein, in order to obtain the indication of the set of primitives for the draw invocation operation, the at least one processor is configured individually or in any combination to obtain the indication of the set of primitives for the draw invocation operation via the antenna or the transceiver.
19. A method for image processing, the method comprising: Obtain an indication of the set of primitives used for the drawing call operation; Identify a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a portion of a primitive outside the view frustum used for the drawing call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset; Calculate the area of each primitive in the primitive subset, the area including the portion of the primitive outside the view frustum; as well as Based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold, a clipping operation is performed or avoided for each primitive in the primitive subset.
20. The method of claim 19, further comprising: Output an instruction for the execution or avoidance of the clipping operation for each primitive in the subset of primitives.
21. The method of claim 20, wherein outputting the instruction for the execution or avoidance of the clipping operation for each primitive in the subset of primitives comprises: Send the instruction to execute or avoid execution of the clipping operation for each primitive in the subset of primitives; or Store the instructions for executing or avoiding the clipping operation for each primitive in the subset of primitives.
22. The method of claim 19, wherein performing the clipping operation for each primitive in the subset of primitives comprises: The clipping operation is performed on each primitive in the primitive subset based on the fact that the area of each primitive in the primitive subset is greater than the area threshold, and wherein performing the clipping operation on each primitive in the primitive subset includes: performing the clipping operation on each primitive in the primitive subset based on the fact that the area of each primitive in the primitive subset is greater than the area threshold, on a per-draw call basis.
23. The method of claim 19, wherein avoiding the clipping operation for each primitive in the subset of primitives comprises: Based on the fact that the area of each primitive in the primitive subset is less than or equal to the area threshold, the clipping operation is avoided for each primitive in the primitive subset.
24. The method of claim 19, further comprising: The area of each primitive in the primitive subset is detected to be less than, equal to, or greater than the area threshold, wherein the execution or avoidance of the clipping operation for each primitive in the primitive subset is based on the detection.
25. The method of claim 19, further comprising: For each primitive in the primitive subset whose area is less than the area threshold, calculate the Z value of each pixel in the primitive.
26. The method of claim 25, further comprising: Based on the calculation of the Z value, discard each pixel in the primitive that has a Z value outside the Z value range; or Based on the calculation of the Z value, a coloring operation is performed for each pixel in the primitive whose Z value falls within the range of the Z value.
27. The method of claim 26, further comprising: Output an instruction for the execution of the shading operation for each pixel in the primitive, including the Z value within the Z value range; The output of the instruction for the execution of the shading operation for each pixel in the primitive, including the Z value within the Z value range, includes: Send the instruction for the execution of the shading operation for each pixel in the primitive, including the Z value within the Z value range; or Store the instruction for the execution of the shading operation for each pixel in the primitive, including the Z-value within the Z-value range; and Calculating the Z value of each pixel in the primitive includes performing a Z test for each pixel in the primitive.
28. The method of claim 19, further comprising: At least one of a primitive assembly operation or a vertex transformation operation is performed on the primitive set used for the drawing call operation, wherein the identifier of the primitive subset is based on the execution of at least one of the primitive assembly operation or the vertex transformation operation; as well as Based on the fact that the area of each primitive in the primitive subset is greater than the area threshold, at least one of a viewport transformation operation, a triangle setting operation, or a rasterization operation is performed on each primitive in the primitive subset based on the execution of the clipping operation.
29. An apparatus for graphics processing, the apparatus comprising: A component used to obtain an indication of the set of primitives used for drawing invocation operations; A component for identifying a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a primitive portion outside the view frustum used for the drawing call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset; A component for calculating the area of each primitive in the subset of primitives, the area including the portion of the primitive outside the view frustum; and A component for performing or avoiding a clipping operation for each primitive in the primitive subset based on whether the area of each primitive in the primitive subset is less than, equal to or greater than an area threshold.
30. A computer-readable medium storing computer-executable code for graphics processing, said code, when executed by at least one processor, causing said at least one processor to: Obtain an indication of the set of primitives used for the drawing call operation; Identify a subset of primitives in the primitive set, wherein each primitive in the primitive subset includes a portion of a primitive outside the view frustum used for the drawing call operation, and wherein the primitive portion corresponds to a part rather than all of each primitive in the primitive subset; Calculate the area of each primitive in the primitive subset, the area including the portion of the primitive outside the view frustum; as well as Based on whether the area of each primitive in the primitive subset is less than, equal to, or greater than an area threshold, a clipping operation is performed or avoided for each primitive in the primitive subset.