Distributed Geometry
Distributed geometry processing in GPUs enables parallel task distribution among chiplets, reducing latency and enhancing performance by eliminating the need for a central distributor.
Patent Information
- Application Number
- JP2024518308
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-09-29
- Filing Date
- 2022-09-09
- Publication Date
- 2024-10-23
- Estimated Expiration
- 2042-09-09
AI Technical Summary
The serial processing of graphics primitives in a graphics processing unit (GPU) increases latency and reduces performance in rendering 3D graphics.
Implementing a distributed geometry processing scheme where each chiplet in a GPU determines its own work portions from an index buffer independently and in parallel, eliminating the need for a central distributor.
This approach reduces latency and enhances performance by allowing parallel processing of graphics tasks without synchronization delays, improving the efficiency of graphics rendering.
Smart Images

Figure 2024538544000001_ABST
Abstract
Description
[Background technology]
[0001] Description of Related Art A Graphics Processing Unit (GPU) processes three-dimensional (3D) graphics using a graphics pipeline formed of a sequence of programmable shaders and fixed-function hardware blocks. For example, a 3D model of an object visible in a frame may be represented by a set of triangles, other polygons, or patches that are processed in the graphics pipeline to generate pixel values for display to the user. The triangles, other polygons, or patches are collectively referred to as primitives. Graphics processing of primitives typically involves many steps that are performed in a serial manner in the GPU. However, this serial processing increases the latency of rendering graphics and reduces performance.
[0002] Advantages of the methods and mechanisms described herein may be better understood by referring to the following description in conjunction with the accompanying drawings. [Brief description of the drawings]
[0003] [Figure 1] FIG. 1 is a block diagram of one embodiment of a computing system. [Diagram 2] 1 is a block diagram of a processing system employing GPU chiplets, according to some embodiments. [Diagram 3] FIG. 2 is a block diagram of one embodiment of a GPU. [Figure 4] FIG. 2 is a block diagram of one embodiment of a message passing scheme for a chiplet GPU. [Diagram 5] FIG. 1 is a block diagram of one embodiment of a chiplet GPU. [Figure 6] FIG. 2 is a block diagram of another embodiment of a chiplet GPU. [Figure 7]FIG. 13 illustrates one embodiment of how the winding order changes in a triangle strip after hitting a reset index. [Figure 8] FIG. 2 is a diagram of one embodiment of a tessellator to patch mapping table. [Figure 9] FIG. 2 is a generalized flow diagram illustrating one embodiment of a method for performing distributed geometry operations without a central distributor. [Figure 10] FIG. 2 is a generalized flow diagram illustrating one embodiment of a method for calculating which discontinuous portions of an index buffer should be processed by a geometry engine. [Figure 11] FIG. 2 is a generalized flow diagram illustrating one embodiment of a method for a tessellator to perform distributed processing without a centralized controller. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0004] In the following description, numerous specific details are described to provide a thorough understanding of the methods and mechanisms presented herein. However, those skilled in the art should appreciate that various embodiments may be practiced without these specific details. In some instances, well-known structures, components, signals, computer program instructions and techniques are not shown in detail to avoid obscuring the approach described herein. It will be understood that for simplicity and clarity of illustration, elements shown in the figures are not necessarily drawn to scale. For example, the dimensions of some elements may be exaggerated relative to other elements.
[0005] Various systems, apparatus, and methods are disclosed herein for performing geometry work in parallel on multiple chiplets. In one embodiment, a system includes a chiplet processor having multiple chiplets for performing graphics work in parallel. Instead of having a central distributor to distribute work to individual chiplets, each chiplet determines for itself what work to perform. For example, during a draw call, each chiplet calculates what portion of one or more index buffers to fetch and process that correspond to one or more graphics objects of the draw call. Once that portion is calculated, each chiplet fetches the corresponding index and processes the index. The chiplets perform these tasks in parallel and independently of one another. When the index buffers are processed, one or more subsequent steps in the graphics rendering process are performed in parallel by the chiplets.
[0006] 1, a block diagram of one embodiment of a computing system 100 is shown. In one embodiment, computing system 100 includes at least processors 105A-105N, input / output (I / O) interface 120, bus 125, memory controller 130, network interface 135, memory device 140, display controller 150, and display 155. In other embodiments, computing system 100 includes other components and / or is arranged differently. Processors 105A-105N represent any number of processors that may be included in system 100.
[0007] In one embodiment, processor 105A is a general-purpose processor such as a central processing unit (CPU). In this embodiment, processor 105A executes drivers 110 (e.g., graphics drivers) for communicating with and / or controlling the operation of one or more of the other processors in system 100. It should be noted that, depending on the embodiment, driver 110 may be implemented using any suitable combination of hardware, software, and / or firmware. In one embodiment, processor 105N is a data-parallel processor with a highly parallel architecture, such as a chiplet graphics processing unit (GPU), that processes data, performs parallel processing workloads, renders pixels for display controller 150 to drive display 155, and / or performs other workloads.
[0008] Chiplet GPUs are complex integrated circuits that perform graphics processing tasks across multiple semiconductor dies. GPUs may perform graphics processing tasks required by end-user applications, such as video game applications. GPUs are also increasingly being used to perform other tasks not related to graphics. Other data parallel processors that may be included in system 100 include digital signal processors (DSPs), field programmable gate arrays (FPGAs), and application specific integrated circuits (ASICs). In some embodiments, processors 105A-105N include multiple data parallel processors.
[0009] Memory controller 130 represents any number and type of memory controller accessible by processors 105A-105N. Although memory controller 130 is shown as separate from processors 105A-105N, it should be understood that this represents just one possible embodiment. In other embodiments, memory controller 130 may be embedded within one or more of processors 105A-105N and / or memory controller 130 may be located on the same semiconductor die as one or more of processors 105A-105N. Memory controller 130 is coupled to any number and type of memory devices 140.
[0010] Memory device 140 represents any number and type of device that includes memory and / or storage elements. For example, types of memory in memory device 140 include Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), NAND flash memory, NOR flash memory, Ferroelectric Random Access Memory (FeRAM), etc. Memory device 140 stores program instructions 145, which may include a first set of program instructions for an application, a second set of program instructions for a driver component, etc. Alternatively, program instructions 145, or portions thereof, may be stored in a memory or cache device local to processor 105A and / or processor 105N.
[0011] I / O interface 120 represents any number and type of I / O interface (e.g., a peripheral component interconnect (PCI) bus, a PCI-Extended (PCI-X), a PCI Express (PCIE) bus, a gigabit Ethernet (GBE) bus, a universal serial bus (USB)). Various types of peripheral devices (not shown) are coupled to I / O interface 120. Such peripheral devices include, but are not limited to, displays, keyboards, mice, printers, scanners, joysticks, other types of game controllers, media recording devices, external storage devices, and the like. Network interface 135 can receive and transmit network messages over a network.
[0012] In various embodiments, computing system 100 is a computer, a laptop, a mobile device, a game console, a server, a streaming device, a wearable device, or any of a variety of other types of computing systems or devices. It should be noted that the number of components of computing system 100 varies from embodiment to embodiment. For example, in other embodiments, there are more or fewer components than those shown in FIG. 1. It should also be noted that in other embodiments, computing system 100 includes other components not shown in FIG. 1. Additionally, in other embodiments, computing system 100 is constructed in other ways than those shown in FIG. 1.
[0013] Turning to Figure 2, a block diagram illustrating a processing system 200 employing GPU chiplets is shown, according to some embodiments. Processing system 200 can be any of the devices or systems listed above, such as a computer, laptop, server, supercomputer, mobile device, etc. Processing system 200 can also be a subsystem incorporated into another device or system. Any of a variety of other types of devices, systems, or subsystems are possible and contemplated.
[0014] In the illustrated example, system 200 includes a central processing unit (CPU) 205 for executing instructions and an array of one or more GPU chiplets, such as GPU chiplets 250A, 250B-250N (collectively GPU chiplets 250). Note that system 200 may include any number of other components (e.g., voltage regulators, memory devices, network interfaces, peripheral devices) that are not shown to avoid obscuring the figure. In various embodiments, as used herein, the term "chiplet" refers to any device that includes, but is not limited to, the following characteristics: 1) the chiplet includes an active silicon die that includes a portion of the computational logic used to solve the complete problem (i.e., the computational workload is distributed across multiple of these active silicon dies), 2) the chiplets are packaged together as a monolithic unit on the same substrate, and 3) the programming model maintains the notion that these separate computational dies are a single monolithic unit (i.e., each chiplet is not exposed as a separate device to the application that uses the chiplet to process the computational workload).
[0015] In various embodiments, CPU 205 is connected to system memory 230, such as dynamic random access memory (DRAM), via bus 240. In various embodiments, system memory 230 may be implemented using other types of memory including static random access memory (SRAM), non-volatile RAM, etc. In the illustrated embodiment, CPU 205 communicates with system memory 230 and also with GPU chiplets 250 via bus 240, which may be implemented as a peripheral component interconnect (PCI) bus, PCI-E bus, or other type of bus. However, some embodiments of system 200 include GPU chiplets 250 that communicate with CPU 205 through a direct connection or via other buses, bridges, switches, routers, etc.
[0016] As shown, CPU 205 includes several processes, such as one or more applications 210 to generate graphics commands and user mode drivers 220 (or other drivers, such as kernel mode drivers). In various embodiments, one or more applications 210 include applications that utilize the capabilities of GPU chiplet 250, such as applications that generate work in system 200 or operating system (OS) 215. Application 210 may include one or more graphics instructions that instruct GPU chiplet 250 to render a graphical user interface (GUI) and / or a graphics scene. For example, the graphics instructions may include instructions that define a set of one or more graphics primitives to be rendered by GPU chiplet 250.
[0017] In some embodiments, application 210 utilizes a graphics application programming interface (API) to invoke user mode driver 220 (or a similar GPU driver). In one embodiment, user mode driver 220 issues one or more commands to an array of one or more GPU chiplets to render one or more graphics primitives into a displayable graphics image. Based on the graphics instructions issued by application 210 to user mode driver 220, user mode driver 220 formulates one or more graphics commands that specify one or more operations of the GPU chiplets to perform the rendering of the graphics. In some embodiments, user mode driver 220 is part of application 210 running on CPU 205. For example, user mode driver 220 may be part of a gaming application running on CPU 205. Similarly, a kernel mode driver (not shown) may be part of OS 215 running on CPU 205.
[0018] 2, communication links 260 (e.g., crosslinks 260) connect GPU chiplets 250 (i.e., GPU chiplets 250A-250N) to one another. Note that the number of GPU chiplets in a chiplet array is a matter of design choice and may vary from embodiment to embodiment. In various embodiments, crosslinks 260 are buses, interconnect chips such as high density crosslink (HDCL) die interposers, or other inter-chiplet communication mechanisms.
[0019] 3, a block diagram of one embodiment of a GPU 300 is shown. Depending on the embodiment, the GPU 300 may be included in any of a variety of types of devices or systems, such as a computer, a laptop, a server, a supercomputer, a mobile device, a tablet, etc. The computing system 300 may also be a subsystem that is incorporated into another device or system. Any of a variety of other types of devices, systems, or subsystems are possible and contemplated.
[0020] As shown, GPU 300 is a chiplet GPU having multiple chiplets 320A-320N. The number of chiplets 320A-320N in GPU 300 varies depending on the embodiment. For example, in a first embodiment, GPU 300 includes four chiplets 320A-320N, in a second embodiment, GPU 300 includes eight chiplets 320A-320N, in a third embodiment, GPU 300 includes twelve chiplets 320A-320N, etc. Chiplets 320A-320N are coupled to each other via communication link 310, which may include any combination of a bus, communication fabric, or other type of interface. In one embodiment, chiplets 320A-320N are coupled to an index buffer 360 stored in memory 350 via communication link 310. It should be noted that chiplets 320A-320N may be coupled to any number and types of other components via communications links 310.
[0021] Each chiplet 320A-320N includes any number (i.e., 1-N, where N is a positive integer) of corresponding geometry engines 330A-330N and corresponding shader engines 340A-340N implemented on the chiplet's underlying circuitry (e.g., single-instruction, multiple-data (SIMD) units), with the number of geometry engines and shader engines varying depending on the embodiment. In one embodiment, each chiplet 320A-320N includes a pair of corresponding geometry engines 330A-330N and corresponding shader engines 340A-340N. For example, chiplet 320A includes geometry engines 330A-330B and shader engines 340A-340B, and chiplet 320N includes geometry engines 330M-330N and shader engines 340M-340N. Chiplet 320A-320N may also include any number and types of other components not shown to avoid obscuring the figure. In another embodiment, each chiplet 320A-320N includes a single geometry engine 330 coupled to a single shader engine 340. In other embodiments, each chiplet 320A-320N includes other numbers of geometry shader engine pairs.
[0022] In one embodiment, each of the geometry engines 330A-330N is a geometry front end having at least a vertex shader and a hull shader that operates on higher-order primitives, such as patches that represent a three-dimensional (3D) model of a scene. In this embodiment, the geometry front end provides higher-order primitives to a corresponding shader engine 340A-340N, which generates lower-order primitives from the higher-order primitives. The lower-order primitives are then replicated, shaded, and / or subdivided before being processed by a pixel engine. The pixel engine performs culling, rasterization, depth testing, color blending, etc. on the primitives to generate fragments or pixels for display. Although the chiplets 320A-320N are illustrated as including geometry engines 330A-330N and shader engines 340A-340N, respectively, it should be understood that this represents but one arrangement for partitioning graphics rendering functionality. Other arrangements of engines, modules, shaders, circuitry and / or processing elements for performing graphics rendering tasks are possible and contemplated.
[0023] In one embodiment, when a draw call is initiated on GPU 300, chiplets 320A-320N are notified of the draw call and the location and size of index buffer 360, which contains indexes corresponding to one or more graphics objects of the draw call. Index buffer 360 may be stored in any number and type of memory devices accessible by chiplets 320A-320N. In one embodiment, index buffer 360 contains a list of pointers to vertices of graphics primitives that make up the graphics object. Graphics primitives may be, but are not limited to, points, lines, triangles, rectangles, patches, etc.
[0024] In response to receiving notification of the start of a draw call, each chiplet 320A-320N calculates which index to process from index buffer 360. Each chiplet 320A-320N then fetches and processes the index independently and in parallel with the other chiplets 320A-320N fetching and processing their corresponding portions of index buffer 360. In one embodiment, chiplets 320A-320N fetch a group of index primitives at a time in a round-robin manner, resulting in an interleaving of the portions of indexes in index buffer 360 mapped to chiplets 320A-320N. This allows chiplets 320A-320N to process different portions of a draw call independently and in parallel with each other. This distributed geometry processing scheme relies on each chiplet 320A-320N determining what portion of a draw call to process without relying on a central distributor of work to distribute work to the chiplets 320A-320N. In other words, each chiplet knows where in index buffer 360 the previous chiplet left off and where the next chiplet will pick up again.
[0025] In one embodiment, based on a distributed geometry processing scheme, each geometry engine 330A-330N determines which portion of index buffer 360 to process. This determination step is performed independently by each geometry engine 330A-330N. For example, geometry engine 330A starts with portion 365A of index buffer 360 and any number of other portions, and calculates which different portion of index buffer 360 to process. Similarly, geometry engine 330B starts with portion 365B of index buffer 360 and any number of other portions, and calculates which different portion of index buffer 360 to process, and geometry engines 330M-330N process portions 365M-365N and any other portions, respectively, until the entire index buffer 360 has been processed.
[0026] In one embodiment, the different portions are specified by the geometry engines 330A-330N using offsets (i.e., pointers) and ranges (i.e., number of indexes) in the entries in the tables 335A-335N. Table 335A is expanded to show an example of a table for specifying offsets and ranges of portions of the index buffer 360 calculated by the geometry engine 330A that are processed locally by the geometry engine 330A. Alternatively, in another embodiment, the portions processed by the geometry engine 330A are indicated using an initial offset, stride, and range. For example, for the entries shown in table 335A, the initial offset is 0, the stride is 400, and the range is 100. Other manners of encoding and / or storing the information used by the geometry engines 330A-330N to fetch indexes from the index buffer 360 are possible and contemplated.
[0027] In one embodiment, each geometry engine 330A-330N has a separate logical ID that determines how to calculate the different portions of index buffer 360 that are processed. For example, if there are four geometry engines 330A-330N and the number of indices processed per portion is 100, geometry engine 330A processes indices 0-99, geometry engine 330B processes indices 100-199, geometry engine 330C processes indices 200-299, geometry engine 330D processes indices 300-399, geometry engine 330A processes indices 400-499, geometry engine 330B processes indices 500-599, etc. until the end of index buffer 360 is reached. In one embodiment, the number of indices per portion is determined based on the size of the primitive group. The size of the primitive group depends on the primitive type. Because each geometry engine 330A-330N calculates its own index for processing independent of the other geometry engines, each geometry engine 330A-330N can perform its own processing independent of the other geometry engines. This allows the geometry engines 330A-330N to work in parallel with each geometry engine performing work without waiting for messages, barriers, or other synchronization events.
[0028] Depending on the embodiment and primitive type, index buffer 360 may be preprocessed before being processed by geometry engines 330A-330N. In one embodiment, if the primitive type is a triangle list, index buffer 360 is not preprocessed. In another embodiment, if the primitive type is a strip primitive, index buffer 360 is preprocessed to locate reset indices and convert strip primitives to triangle lists. In a further embodiment, strip primitives are processed in parallel by having all of geometry engines 330A-330N fetch the entire index buffer 360. In yet a further embodiment, conversion of strip primitives to triangle lists is not performed if it is determined that winding order is not important or if the reset index is known not to exist. In one embodiment, a compute shader preprocesses strip primitives into triangle lists, which are then processed by geometry engines 330A-330N. Other types of preprocessing steps and / or conversions of indexes in index buffer 360 are possible and contemplated.
[0029] Turning to Figure 4, a block diagram of one embodiment of a message passing scheme for a chiplet GPU 400 is shown. As shown in Figure 4, chiplet GPU 400 includes four chiplets 410, 420, 430, 440. It should be understood that the example of chiplet GPU 400 having four chiplets represents only one embodiment. In other embodiments, chiplet GPU 400 can have other numbers of chiplets while still using a similar message passing scheme.
[0030] In one embodiment, chiplets 410, 420, 430, 440 process draw calls, which include primitive types that provide message passing between chiplets. For example, when a strip primitive is processed, chiplets 410-440 communicate the location of a reset index in one embodiment. When chiplet 410 processes a first portion of an index buffer (e.g., index buffer 360 of FIG. 3), chiplet 410 sends an indication of whether a reset index was found in the first portion to chiplet 420. Similarly, when chiplet 420 processes a second portion of the index buffer, chiplet 420 sends an indication of the presence of a reset index in the second portion to chiplet 430. Also, chiplet 430 sends an indication of the reset index in its index buffer portion to chiplet 440, and chiplet 440 sends an indication of the reset index in the index buffer portion processed by chiplet 440 to chiplet 410.
[0031] Referring to FIG. 5, a block diagram of another embodiment of a chiplet GPU 500 is shown. As shown in FIG. 5, the chiplet GPU 500 includes chiplets 510A-510N, which represent any number of chiplets. In one embodiment, to keep the chiplets 510A-510N in sync when processing a draw call, the chiplets 510A-510N utilize a state management scheme. For example, in this embodiment, for a given draw call, each command processor 520A-520N generates a state ID 560A-560P for each corresponding pipeline, respectively. A pipeline refers to the various graphics processing stages implemented by each chiplet 510A-510N. It should be noted that the terms "state ID" and "context ID" may be used interchangeably herein.
[0032] In one embodiment, each command processor 520A-520N is coupled to two pipelines. For example, command processor 520A is coupled to a first pipeline having geometry engine 530A, shader engine 540A, and rasterizer 550A, and command processor 520A is coupled to a second pipeline having geometry engine 530B, shader engine 540B, and rasterizer 550B. In this embodiment, rasterizer 550A stores state ID 560A, and rasterizer 550B stores state ID 560B. Note that this represents just one particular embodiment. In other embodiments, each command processor 520A-520N is coupled to other numbers of pipelines.
[0033] Similar to command processor 520A, command processors 520B and 520N are coupled to two pipelines. For example, command processor 520C is coupled to a first pipeline having geometry engine 530C, shader engine 540C, and rasterizer 550C, and command processor 520D is coupled to a second pipeline having geometry engine 530D, shader engine 540D, and rasterizer 550D. In this embodiment, rasterizer 550C stores state ID 560C, and rasterizer 550D stores state ID 560D. Similarly, command processor 520N is coupled to a first pipeline having geometry engine 530N, shader engine 540N, and rasterizer 550N, and command processor 520N is coupled to a second pipeline having geometry engine 530P, shader engine 540P, and rasterizer 550P. In this embodiment, rasterizer 550N stores state ID 560N, and rasterizer 550P stores state ID 560P.
[0034] Each command processor 520A-520N generates a state ID for the pipeline that executes a given draw call, independent of the other command processors and other pipelines. What this means is that for a particular draw call, the chiplets 510A-510N can have different state IDs 560A-560P for the same draw call. The state IDs 560A-560P pass through the pipeline and are stored by the rasterizers 550A-550P. Rather than tagging each primitive with a state ID as it passes through the pipeline, the primitive is associated with a state ID 560A-560P stored by the corresponding rasterizer 550A-550P.
[0035] In one embodiment, the rasterizers 550A-550P perform shading operations and other operations such as clipping, perspective division, cutting, and viewport selection. In various embodiments, the rasterizers 550A-550P convert scene geometry into screen space and a set of discrete picture elements. Virtual space geometry is converted to screen space geometry through an operation of computing a projection of objects and vertices from world space onto a viewing window (i.e., viewport) of the scene that is composed of a number of discrete screen space pixels sampled by the rasterizers 550A-550P. In one embodiment, the rendering parameters applied by the rasterizers 550A-550P are associated with corresponding state IDs 560A-560P and may be changed on a per-draw-call basis.
[0036] It should be noted that chiplets 510A-510N may be implemented as separate semiconductor dies in one embodiment. In another embodiment, chiplets 510A-510N represent different graphics processing pipelines implemented using one or more semiconductor dies. In other words, in this particular embodiment, multiple pipelines may be located on the same semiconductor die. In this embodiment, each chiplet 510A-510N represents a circuit configuration capable of performing a set of graphics rendering tasks. Similarly, the chiplets shown in other figures of this disclosure may represent any type of circuitry and / or processing elements capable of performing the graphics rendering tasks described herein in parallel with other collections of circuit configurations and processing elements.
[0037] Turning to FIG. 6, a block diagram of another embodiment of a chiplet GPU 600 is shown. As shown in FIG. 6, the chiplet GPU 600 includes chiplets 620A-620N, which represent any number of chiplets. In one embodiment, rather than having a central distributor of tessellation work, the chiplet GPU 600 uses a distributed scheme to perform tessellation work on the chiplet GPU 600. For example, in this embodiment, the hull shaders 630A-630N calculate average tessellation factors and send the average tessellation factors to the tessellators 640A-640N, respectively. The tessellators 640A-640N then use the average tessellation factors to determine how many patches to process. It should also be noted that the tessellators 640A-640N or tessellation modules 640A-640N may also be referred to as tessellation shaders.
[0038] The hull shaders 630A-630N operate on input high-order patches or control points that are used to define input patches, where a patch is a geometric shape (e.g., a rectangle, triangle, line). The hull shaders 630A-630N output tessellation coefficients and other patch data. The primitives produced by the hull shaders 630A-630N may be provided to tessellators 640A-640N that are tessellated based on the tessellation coefficients provided by the hull shaders 630A-630N. Tessellation subdivides input high-order primitives, such as patches, into a set of lower-order output primitives that represent finer levels of detail. The tessellation coefficients specify the precision of the primitives produced by the tessellation process. Thus, a model of a scene can be represented by a smaller number of high-order primitives (to save memory or bandwidth) and additional detail can be added by tessellating the high-order primitives.
[0039] In one embodiment, the hull shaders 630A-630N determine a tessellation factor value for each patch. For example, the hull shaders 630A-630N determine the screen space required to display the patch. Patches closer to the viewer require more tessellation than patches farther from the viewer. Furthermore, the value of the tessellation factor is proportional to the number of primitives generated for each patch. For example, the higher the value of the tessellation factor, the more primitives are generated for the patch. In one embodiment, the number of tessellation factors depends on the type of patch. For example, for a quad patch, the hull shader calculates six tessellation factors. The tessellation factors are used to determine how the quad patch may be divided into multiple triangles that form a mesh.
[0040] In one embodiment, the input to the tessellators 640A-640N includes a patch, and the tessellators 640A-640N are programmed to tessellate the patch into a number of points. During subsequent stages of the graphics pipeline, the points may undergo further processing. For example, the points may be connected to primitives (e.g., triangles). Each tessellator 640A-640N tessellates the patch based on a tessellation factor for the patch. There may be any number of tessellation factors per patch. Based on these factors, each tessellator 640A-640N divides the patch into a number of points, lines, or triangles based on the tessellation topology.
[0041] In one embodiment, each tessellator 640A-640N is responsible for determining the amount of work it will consume and how to fetch the appropriate number of tessellation coefficients from memory 660. Depending on the embodiment, the tessellators 640A-640N may use different techniques to make the determination of the amount of work to consume. In one embodiment, the hull shaders 630A-630N generate messages with the average tessellation coefficients and then send these messages to all of the tessellators 640A-640N on all chiplets 620A-620N. For example, when a given hull shader 630A-630N generates a done signal, the given hull shader 630A-630N sends a message with the average tessellation coefficients to all of the tessellators 640A-640N. Based on the message with the average tessellation factor, tessellators 640A-640N fetch the tessellation factor and process several patches. In another embodiment, rather than basing how many patches to process based on the average tessellation factor received in the message from hull shaders 630A-630N, each tessellator 640A-640N fetches all of the tessellation factor and then processes the patches based on application settings. For example, if the application settings specify 10 patches, tessellator 640A processes the first 10 patches, tessellator 640B processes the second 10 patches, and so on.
[0042] Referring to FIG. 7, a diagram of how the winding order changes in a triangle strip after hitting a reset index is shown according to one embodiment. As shown in FIG. 7, an example diagram with triangle strips for a system with three geometry engines is shown. In one embodiment, strip 705 is processed by a first geometry engine, strip 710 is processed by a second geometry engine, and strip 715 is processed by a third geometry engine. Shaded primitives are dropped for the reset index, and the shaded numbers (in the index numbers above and below strips 705, 710, 715) indicate the location of the reset index. The dotted arcs in each primitive indicate the winding order of the primitive. After hitting the reset index in strip 705 and strip 715, there is a change in the direction of the winding order. For example, at index 1 of strip 705, the winding order changes from counterclockwise to clockwise. Also, at index 34 of strip 715, the winding order changes from clockwise to counterclockwise.
[0043] In another embodiment, each geometry engine assumes that reset indexes are disabled for lists by default. If reset indexes are enabled for lists, the driver (e.g., driver 110 in FIG. 1) sends the entire draw to a single geometry engine. In the case of strips, as each geometry engine processes all primitives in the strip, the geometry engine adjusts primitive IDs and winding order for all primitives remaining after a detected reset index. In a further embodiment, the driver sends the entire draw to all geometry engines instead of a single geometry engine. In this case, the entire index buffer is fetched by each geometry engine, and the geometry engine drops primitives it does not own.
[0044] Turning to FIG. 8, a diagram of one embodiment of a tessellator to patch mapping table 800 is shown. The tessellator to patch mapping table 800 is an example of a mapping table for an embodiment having four physical tessellators on four parallel processing units (i.e., one tessellator per parallel processing unit). In other embodiments, the parallel processing units can have other numbers of tessellators. A physical tessellator ID field 810 indicates the physical ID of each tessellator, with the four tessellators having physical IDs of 0, 1, 2, and 3. The tessellator to which a patch is initially assigned for processing is considered the parent tessellator with a logical tessellator ID of 0, as shown in column 815 of table 800, relative to the tessellator with a physical ID of 1. This results in a reordering of the logical tessellator IDs relative to the other tessellators based on their order in the sequence from the parent tessellator. For the purposes of this description, assume that the number of patches per tessellator has been calculated as 6. In other embodiments, the number of patches per tessellator can take other values (eg, 4, 8, 10, 15).
[0045] The parent tessellator corresponding to the second row of table 800 calculates for itself that it should process patches 0-5. The next tessellator with a logical ID of 1 determines that it should process the next batch of patches 6-11. Similarly, tessellators with logical IDs of 2 and 3 process patches 12-17 and 18-23, respectively. For the purposes of this description, assume that there are 32 patches per thread group. However, this is merely an example of one embodiment. In other embodiments, there may be other numbers of patches per thread group. For table 800, assuming 32 patches per thread group, the last two groupings of patches 24-29 and 30-31 are processed by tessellators with logical IDs of 0 and 1, respectively. This is generated based on a wraparound mapping of tessellators to patches because there are more patches per thread group than can be processed in a single pass through four tessellators. Note that table 800 provides a mapping for a single thread group. It should be appreciated that each thread group can have a different mapping of tessellators to patches.
[0046] Referring to FIG. 9, one embodiment of a method 900 for performing distributed geometry operations without a central distributor is shown. For purposes of illustration, the steps in this embodiment and in FIGS. 10-11 are shown in sequence. However, it should be noted that in various embodiments of the described method, one or more of the described elements are performed simultaneously, in a different order than shown, or omitted entirely. Other additional elements are also performed as desired. Any of the various systems or devices described herein may be configured to perform method 900 (and methods 1000-1100).
[0047] A first geometry engine of the plurality of geometry engines receives an indication of a draw call being initiated along with an address and size of an index buffer corresponding to the graphics object of the draw call (block 905). The first geometry engine calculates which portion of the index buffer to fetch based on one or more parameters (block 910). For example, the one or more parameters may include a total number of geometry engines processing the draw call, a logical geometry engine ID of the first geometry engine, a number of indexes to fetch for each portion, and / or other parameters. Note that the first geometry engine performs the calculation step of block 910 locally on the first graphic engine. In other words, the calculation step in block 910 is performed independently of and in parallel with other geometry engines in at least one embodiment. In one embodiment, the portion that the first geometry engine determines to fetch is a non-contiguous portion of the index buffer. In one embodiment, the identification of the portion calculated in block 910 is stored in a table (e.g., table 335A of FIG. 3).
[0048] The first geometry engine then fetches the identified portion of the index buffer (block 915). The first geometry engine then processes the portions of the index buffer until the last identified portion is processed (block 920). After block 920, the method 900 ends. It should be noted that multiple instances of the method 900 may be executed in parallel with one another by any number of geometry engines.
[0049] Turning to FIG. 10, one embodiment of a method 1000 for calculating which non-contiguous portions of an index buffer should be processed by a geometry engine is shown. A first geometry engine of the plurality of geometry engines calculates, based on one or more parameters, at least a first portion of the index buffer to be fetched and processed as part of a first draw call, where the location of the first portion is calculated relative to the locations of other portions of the index buffer processed by other geometry engines of the plurality of geometry engines (block 1005). Depending on the embodiment, the one or more parameters may include a total number of geometry engines processing the draw call, a logical geometry engine ID of the first geometry engine, a number of indexes to fetch for each portion, and / or other parameters. The first geometry engine also calculates, based on the one or more parameters, at least a second portion of the index buffer to be processed as part of the first draw call, where the second portion is non-contiguous with the first portion in the index buffer (block 1010).
[0050] The first geometry engine then fetches and processes at least the first and second portions of the index buffer (block 1015). The first geometry engine then generates pixel data to be displayed as a result of processing at least the first and second portions of the index buffer (block 1020). After block 1020, method 1000 ends. It should be noted that multiple instances of method 1000 may be performed in parallel with one another by any number of geometry engines.
[0051] 11, one embodiment of a method 1100 for a tessellator to perform distributed processing without a centralized controller is shown. Each tessellator receives a completion signal and average tessellation coefficients from hull shaders from all graphics pipes in each graphics pipe of a plurality of graphics pipes (block 1105). For example, if there are four graphics pipes, the tessellator in the first graphics pipe receives a completion signal and average tessellation coefficients from the hull shader in the first graphics pipe, from the hull shader in the second graphics pipe, from the hull shader in the third graphics pipe, and from the hull shader in the fourth graphics pipe. Other tessellators in other graphics pipes similarly receive completion signals and average tessellation coefficients from hull shaders in all four pipes.
[0052] In response to receiving a done signal and the average tessellation factor from a given hull shader, each tessellator calculates the number of patches to process based on the average tessellation factor (block 1110). Each tessellator also calculates the number of patches to be calculated from where to start processing in the corresponding thread group based on the logical ID of the tessellator (block 1115). For example, if a given tessellator has a logical ID of 1 out of 4 tessellators, the given tessellator will start at the point in the thread group where the tessellator with a logical ID of 0 ends. In other words, the given tessellator skips the patches that are intended to be processed by the tessellator with a logical ID of 0. For example, if each tessellator calculates that it should process six patches, then the parent tessellator (i.e., the tessellator with a logical ID of 0) processes patches 0 through 5, the tessellator with a logical ID of 1 processes patches 6 through 11, the tessellator with a logical ID of 2 processes patches 12 through 17, and the tessellator with a logical ID of 3 processes patches 18 through 23. Note that the logical ID of a tessellator may be different from the physical ID of the tessellator. The logical ID of a tessellator refers to its location relative to the parent tessellator for a given thread group. The parent tessellator refers to where this particular thread group originated. In one embodiment, the parent tessellator for a given thread group follows the tessellator where the previous thread group finished. The mapping from logical IDs to physical IDs for tessellators can vary from thread group to thread group.
[0053] Each tessellator then processes the calculated number of patches at the calculated position in the corresponding thread group (block 1120). After block 1120, method 1100 ends. Note that method 1100 may be performed by each of the tessellators in response to receiving a done signal and an average tessellation factor from any hull shader.
[0054] In various embodiments, program instructions of a software application are used to implement the methods and / or mechanisms described herein. For example, program instructions executable by a general purpose or special purpose processor are contemplated. In various embodiments, such program instructions are expressed by a high level programming language. In other embodiments, the program instructions are compiled from the high level programming language into a binary, intermediate or other form. Alternatively, program instructions are written that describe the behavior or design of hardware. Such program instructions are expressed by a high level programming language such as C. Alternatively, a hardware design language (HDL) such as Verilog is used. In various embodiments, the program instructions are stored in any of a variety of non-transitory computer readable storage media. The storage media are accessible by the computing system during use to provide the program instructions to the computing system for program execution. Generally speaking, such a computing system includes at least one or more memories and one or more processors configured to execute the program instructions.
[0055] It should be emphasized that the above-described embodiments are merely non-limiting examples of embodiments. Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to include all such variations and modifications.
Claims
1. 1. An apparatus comprising: Memory, a plurality of geometry engines; A first geometry engine of the plurality of geometry engines comprises: calculating at least a first location of a first portion of an index buffer in the memory for fetching and processing as part of a first draw call based on one or more parameters, the first location of the first portion being calculated relative to other portions processed by other ones of the plurality of geometry engines; calculating at least a second location of a second portion of the index buffer for processing as part of the first draw call based on the one or more parameters, the second portion being discontinuous within the index buffer with respect to the first portion; fetching and processing at least the first and second portions of the index buffer; generating pixel data to be displayed as a result of processing at least the first and second portions of the index buffer; [0023] Device.
2. A second geometry engine of the plurality of geometry engines includes: calculating at least a third location of a third portion of the index buffer for fetching and processing as part of the first draw call based on one or more parameters, the third location of the third portion being calculated relative to other portions processed by other ones of the plurality of geometry engines; calculating at least a fourth location of a fourth portion of the index buffer for processing as part of the first draw call based on the one or more parameters, the fourth portion being discontinuous within the index buffer with respect to the third portion; fetching and processing at least the third and fourth portions of the index buffer; [0023] 2. The apparatus of claim 1.
3. The one or more parameters include a total number of geometry engines processing the first draw call, a logical geometry engine identifier (ID) of the first geometry engine, and a number of indexes to fetch for each portion.
2. The apparatus of claim 1.
4. the number of indexes to fetch for each portion is equal to the size of the primitive group; 4. The apparatus of claim 3.
5. Equipped with multiple tessellators, A first tessellator of the plurality of tessellators comprises: in response to receiving a completion signal corresponding to a first thread group, calculating a first logical identifier (ID) for use by the first tessellator for the first thread group; calculating how many patches to process based on at least the average tessellation factor; Identifying a location of a patch for processing within the first thread group based on the first logical ID; processing the calculated number of patches in parallel with other tessellators of the plurality of tessellators; [0023] 2. The apparatus of claim 1.
6. the first tessellator is configured to, in response to receiving a completion signal corresponding to a second thread group, calculate a second logical ID for use by the first tessellator for the second thread group, the second logical ID being different from the first logical ID; 6. The apparatus of claim 5.
7. A plurality of command processors are provided, each of the plurality of command processors is configured to generate a local state identifier (ID) for the first draw call, a first command processor generating a first state ID for the first draw call and a second command processor generating a second state ID for the first draw call that is different from the first state ID; 2. The apparatus of claim 1.
8. 1. A method comprising: calculating, by a first geometry engine of the plurality of geometry engines based on one or more parameters, at least a first location of a first portion of an index buffer for fetching and processing as part of a first draw call, the first location of the first portion being calculated relative to other portions processed by other geometry engines of the plurality of geometry engines; calculating at least a second location of a second portion of the index buffer for processing as part of the first draw call based on the one or more parameters, the second portion being discontinuous within the index buffer with respect to the first portion; fetching and processing at least the first and second portions of the index buffer; generating pixel data to be displayed as a result of processing at least the first and second portions of the index buffer; method.
9. a second geometry engine of the plurality of geometry engines calculating, based on one or more parameters, at least a third location of a third portion of the index buffer for fetching and processing as part of the first draw call, the third location of the third portion being calculated relative to other portions processed by other geometry engines of the plurality of geometry engines; calculating at least a fourth location of a fourth portion of the index buffer for processing as part of the first draw call based on the one or more parameters, the fourth portion being discontinuous within the index buffer with respect to the third portion; fetching and processing at least the third and fourth portions of the index buffer.
9. The method of claim 8.
10. The one or more parameters include a total number of geometry engines processing the first draw call, a logical geometry engine identifier (ID) of the first geometry engine, and a number of indexes to fetch for each portion.
9. The method of claim 8.
11. the number of indexes to fetch for each portion is equal to the size of the primitive group; 9. The method of claim 8.
12. In response to a first tessellator of the plurality of tessellators receiving a completion signal corresponding to a first thread group, calculating a first logical identifier (ID) for use by the first tessellator for the first thread group; calculating how many patches to process based on at least the average tessellation factor; Identifying a location of a patch for processing within the first thread group based on the first logical ID; and processing the calculated number of patches in parallel with other tessellators of the plurality of tessellators.
9. The method of claim 8.
13. and computing a second logical ID for use by the first tessellator for the second thread group in response to the first tessellator receiving a completion signal corresponding to the second thread group, the second logical ID being different from the first logical ID.
13. The method of claim 12.
14. each of a plurality of command processors generating a local state identifier (ID) for the first draw call, a first command processor generating a first state ID for the first draw call and a second command processor generating a second state ID for the first draw call that is different from the first state ID; 9. The method of claim 8.
15. 1. A system comprising: An index buffer; a processor having a plurality of geometry engines; A first geometry engine of the plurality of geometry engines comprises: calculating at least a first location of a first portion of the index buffer for fetching and processing as part of a first draw call based on one or more parameters, the first location of the first portion being calculated relative to other portions processed by other ones of the plurality of geometry engines; calculating at least a second location of a second portion of the index buffer for processing as part of the first draw call based on the one or more parameters, the second portion being discontinuous within the index buffer with respect to the first portion; fetching and processing at least the first and second portions of the index buffer; generating pixel data to be displayed as a result of processing at least the first and second portions of the index buffer; [0023] system.
16. A second geometry engine of the plurality of geometry engines includes: calculating at least a third location of a third portion of the index buffer for fetching and processing as part of the first draw call based on one or more parameters, the third location of the third portion being calculated relative to other portions processed by other ones of the plurality of geometry engines; calculating at least a fourth location of a fourth portion of the index buffer for processing as part of the first draw call based on the one or more parameters, the fourth portion being discontinuous within the index buffer with respect to the third portion; fetching and processing at least the third and fourth portions of the index buffer; [0023] 16. The system of claim 15.
17. The one or more parameters include a total number of geometry engines processing the first draw call, a logical geometry engine identifier (ID) of the first geometry engine, and a number of indexes to fetch for each portion.
16. The system of claim 15.
18. the number of indexes to fetch for each portion is equal to the size of the primitive group; 20. The system of claim 17.
19. the processor comprises a plurality of tessellators; A first tessellator of the plurality of tessellators comprises: in response to receiving a completion signal corresponding to a first thread group, calculating a first logical identifier (ID) for use by the first tessellator for the first thread group; calculating how many patches to process based on at least the average tessellation factor; Identifying a location of a patch for processing within the first thread group based on the first logical ID; processing the calculated number of patches in parallel with other tessellators of the plurality of tessellators; [0023] 16. The system of claim 15.
20. the first tessellator is configured to, in response to receiving a completion signal corresponding to a second thread group, calculate a second logical ID for use by the first tessellator for the second thread group, the second logical ID being different from the first logical ID; 16. The system of claim 15.
Citation Information
Patent Citations
Method for developing picture element
JP1989224886A
Method and device for graphic parallel processing
JP1993266201A
Geometry engine and parallel plotting processor having the same
JP2000215321A
Function distribution and load distribution processing multiprocessor system
JP2001167075A
Parallel Micropolygon Rasterizer
JP2019530069A
