Search

US-12626324-B2 - Graphics processing systems

US12626324B2US 12626324 B2US12626324 B2US 12626324B2US-12626324-B2

Abstract

When generating a graphics processing output by assembling a sequence of one or more of primitives to be processed from a set of vertex indices provided for the output based on primitive configuration information provided for the output, one or more vertex packets are generated using the vertex indices for the assembled primitives, each vertex packet comprising a plurality of vertices of the assembled primitives. After a threshold number of vertices have been allocated to a vertex packet, vertex attribute processing for the vertices of the vertex packet is triggered, to thereby generate a vertex packet comprising processed vertex attributes for the vertices of the vertex packet. The assembled primitives and the generated vertex packets are then provided to later stages of the graphics processing pipeline for processing.

Inventors

  • Frank Klaeboe Langtind
  • Andreas Due Engh-Halstvedt

Assignees

  • ARM LIMITED

Dates

Publication Date
20260512
Application Date
20231031
Priority Date
20221117

Claims (18)

  1. 1 . A method of operating a graphics processor that executes a graphics processing pipeline to generate an output, in which a set of vertices to be used for primitives to be processed when generating the output, each vertex having associated with it a set of one or more vertex attributes, together with a set of vertex indices referencing vertices in the set of vertices and primitive configuration information indicating how the vertex indices are to be assembled into primitives for processing when generating the output, are provided; the method comprising: performing a first primitive assembly process to assemble a sequence of one or more of primitives to be processed when generating the output from the set of vertex indices provided for the output based on the primitive configuration information provided for the output, each assembled primitive of the sequence of assembled primitives comprising an identifier for the primitive and a set of one or more vertex indices for the primitive; generating one or more vertex packets using the vertex indices for the assembled primitives, each vertex packet comprising a plurality of vertices of the assembled primitives; wherein the generating one or more vertex packets using the vertex indices for the assembled primitives comprises: allocating vertices for assembled primitives to a vertex packet until a threshold number of vertices have been allocated to the vertex packet; and triggering vertex attribute processing for the vertices of the vertex packet, to thereby generate a vertex packet comprising processed vertex attributes for the vertices of the vertex packet; and thereafter: performing a second primitive assembly process to assemble the same sequence of one or more of primitives to be processed when generating the output from the set of vertex indices provided for the output based on the primitive configuration information provided for the output; generating one or more vertex packets using the vertex indices for the assembled primitives from the second primitive assembly process, each vertex packet comprising a plurality of vertices of the assembled primitives; wherein the generating one or more vertex packets using the vertex indices for the assembled primitives from the second primitive assembly process comprises: allocating vertices for assembled primitives to a vertex packet until a threshold number of vertices have been allocated to the vertex packet; and providing the assembled primitives from the second primitive assembly process and the generated vertex packets comprising the processed vertex attributes generated by the first primitive assembly process to later stages of the graphics processing pipeline that is being executed by the graphics processor for processing.
  2. 2 . The method of claim 1 , further comprising: for each of a plurality of vertex packets, tracking which vertices have been allocated to the vertex packet; and using that tracking information to determine whether a new vertex has already been allocated to one of those existing vertex packets or not.
  3. 3 . The method of claim 1 , comprising: triggering the vertex attribute processing for the vertices of a vertex packet in response to a particular number of vertices being added to the vertex packet.
  4. 4 . The method of claim 1 , wherein the vertex attribute processing that is triggered for the vertices of a vertex packet comprises processing only the positions of the vertices of the vertex packet.
  5. 5 . The method of claim 1 , further comprising providing for an assembled primitive, an identifier for the primitive and a set of one or more vertex indices for the primitive, where each vertex index for the primitive comprises a vertex packet identifier and an identifier for the vertex in the vertex packet.
  6. 6 . The method of claim 1 , further comprising storing the vertex packets in a vertex buffer for use by later stages of the graphics processing pipeline, and wherein the generated vertex packets are fetched into the vertex buffer for use, and evicted from the vertex buffer, on a vertex packet-by-vertex packet basis.
  7. 7 . The method of claim 6 , further comprising: tracking the use of vertex packets in the vertex buffer for assembled primitives, and after it is determined from that tracking that processed vertices in a vertex packet will no longer be required from the vertex buffer for any assembled primitives, evicting the vertex packet from the vertex buffer.
  8. 8 . The method of claim 6 , comprising: once it has been determined that all the assembled primitives that will use a vertex packet have been assembled and included in the sequence of assembled primitives, associating an indication of that with the sequence of assembled primitives; and a later stage of the graphics processing pipeline when it sees the indication for a vertex packet, signalling to a vertex packet eviction process that the vertex packet can be evicted from the vertex buffer.
  9. 9 . The method of claim 8 , wherein the graphics processor performs tile-based processing and performs a culling process as part of the tiling process, and the signalling to the vertex packet eviction process to evict a vertex packet from the vertex buffer is performed after that culling process.
  10. 10 . A graphics processor configured to execute a graphics processing pipeline to generate an output; the graphics processor comprising: a primitive assembly circuit configured to perform a first primitive assembly process to assemble a sequence of one or more of primitives to be processed when generating an output from a set of vertex indices provided for the output, the set of vertex indices referencing vertices in a set of vertices provided for the output, each vertex having associated with it a set of one or more vertex attributes, based on primitive configuration information provided for the output, the primitive configuration information indicating how the vertex indices are to be assembled into primitives for processing when generating the output, each assembled primitive of the sequence of assembled primitives comprising an identifier for the primitive and a set of one or more vertex indices for the primitive; a vertex packet generating circuit configured to generate one or more vertex packets using the vertex indices for the assembled primitives, each vertex packet comprising a plurality of vertices of the assembled primitives; wherein the vertex packet generating circuit is configured to generate the one or more vertex packets using the vertex indices for the assembled primitives by: allocating vertices for assembled primitives to a vertex packet until a threshold number of vertices have been allocated to the vertex packet; and triggering vertex attribute processing for the vertices of the vertex packet, to thereby generate a vertex packet comprising processed vertex attributes for the vertices of the vertex packet; wherein the graphics processor is configured to thereafter: perform a second primitive assembly process to assemble the same sequence of one or more of primitives to be processed when generating the output from the set of vertex indices provided for the output based on the primitive configuration information provided for the output; generate one or more vertex packets using the vertex indices for the assembled primitives from the second primitive assembly process, each vertex packet comprising a plurality of vertices of the assembled primitives; wherein the generating one or more vertex packets using the vertex indices for the assembled primitives from the second primitive assembly process comprises: allocating vertices for assembled primitives to a vertex packet until a threshold number of vertices have been allocated to the vertex packet; and provide the assembled primitives from the second primitive assembly process and the generated vertex packets comprising the processed vertex attributes generated by the first primitive assembly process to later stages of the graphics processing pipeline that is being executed by the graphics processor for processing.
  11. 11 . The graphics processor of claim 10 , wherein the vertex packet generating circuit is configured to: for each of a plurality of vertex packets, track which vertices have been allocated to the vertex packet; and use that tracking information to determine whether a new vertex has already been allocated to one of those existing vertex packets or not.
  12. 12 . The graphics processor of claim 10 , wherein the vertex packet generating circuit is configured to: trigger the vertex attribute processing for the vertices of a vertex packet in response to a particular number of vertices being added to the vertex packet.
  13. 13 . The graphics processor of claim 10 , wherein the vertex attribute processing that is triggered for the vertices of a vertex packet comprises processing only the positions of the vertices of the vertex packet.
  14. 14 . The graphics processor of claim 10 , wherein an identifier for the primitive and a set of one or more vertex indices for the primitive, where each vertex index for the primitive comprises a vertex packet identifier and an identifier for the vertex in the vertex packet, are provided for an assembled primitive.
  15. 15 . The graphics processor of claim 10 , further comprising: a vertex buffer for storing generated vertex packets for use by later stages of the graphics processing pipeline; and a vertex packet fetching circuit configured to fetch vertex packets into the vertex buffer for use, and evict vertex packets from the vertex buffer, on a vertex packet-by-vertex packet basis.
  16. 16 . The graphics processor of claim 15 , configured to: track the use of vertex packets in the vertex buffer for assembled primitives, and after it is determined from that tracking that processed vertices in a vertex packet will no longer be required from the vertex buffer for any assembled primitives, evict the vertex packet from the vertex buffer.
  17. 17 . The graphics processor of claim 15 , wherein: the vertex packet generating circuit is configured to, once it has been determined that all the assembled primitives that will use a vertex packet have been assembled and included in the sequence of assembled primitives, associate an indication of that with the sequence of assembled primitives; and a later stage of the graphics processing pipeline is configured to, when it sees the indication for a vertex packet, signal to the vertex packet fetching circuit that the vertex packet can be evicted from the vertex buffer.
  18. 18 . A non-transitory computer readable storage medium storing computer software code which when executing on a processor performs a method of operating a graphics processor that executes a graphics processing pipeline to generate an output, in which a set of vertices to be used for primitives to be processed when generating the output, each vertex having associated with it a set of one or more vertex attributes, together with a set of vertex indices referencing vertices in the set of vertices and primitive configuration information indicating how the vertex indices are to be assembled into primitives for processing when generating the output, are provided; the method comprising: performing a first primitive assembly process to assemble a sequence of one or more of primitives to be processed when generating the output from the set of vertex indices provided for the output based on the primitive configuration information provided for the output, each assembled primitive of the sequence of assembled primitives comprising an identifier for the primitive and a set of one or more vertex indices for the primitive; generating one or more vertex packets using the vertex indices for the assembled primitives, each vertex packet comprising a plurality of vertices of the assembled primitives; wherein the generating one or more vertex packets using the vertex indices for the assembled primitives comprises: allocating vertices for assembled primitives to a vertex packet until a threshold number of vertices have been allocated to the vertex packet; and triggering vertex attribute processing for the vertices of the vertex packet, to thereby generate a vertex packet comprising processed vertex attributes for the vertices of the vertex packet; and thereafter: performing a second primitive assembly process to assemble the same sequence of one or more of primitives to be processed when generating the output from the set of vertex indices provided for the output based on the primitive configuration information provided for the output; generating one or more vertex packets using the vertex indices for the assembled primitives from the second primitive assembly process, each vertex packet comprising a plurality of vertices of the assembled primitives; wherein the generating one or more vertex packets using the vertex indices for the assembled primitives from the second primitive assembly process comprises: allocating vertices for assembled primitives to a vertex packet until a threshold number of vertices have been allocated to the vertex packet; and providing the assembled primitives from the second primitive assembly process and the generated vertex packets comprising the processed vertex attributes generated by the first primitive assembly process to later stages of the graphics processing pipeline that is being executed by the graphics processor for processing.

Description

BACKGROUND The technology described herein relates to graphics processing systems and in particular to methods of and apparatus for preparing primitives to be processed when rendering an output in a graphics processing system. Computer graphics systems typically produce their output, such as frames for display, by processing so-called primitives, which are usually simple polygons such as triangles. Each primitive is normally defined by a set of vertices (e.g. three vertices in the case of triangular primitive). Typically the set of vertices to be used for a given graphics processing output (e.g. frame for display) will be stored as a set of vertex data defining the vertices (e.g. the relevant attributes for each of the vertices). While it would be possible simply to store the vertices to be used for each primitive to be generated in turn (such that, in effect, the set of vertices will correspondingly define the primitives to be processed), it is also known to define the primitives separately in terms of a set of indices that reference the vertices in the set of vertex data. This can then avoid, for example, the need to duplicate vertices in the set of vertex data, as a single vertex entry (vertex) in the set of vertices can be referred to multiple times by reusing the relevant index in the set of indices. Accordingly, in the case of a typical graphics processing pipeline, the initially provided data for an output to be generated will, inter alia, comprise a set of vertices to be used and processed for generating the output, and a set (sequence) of indices referencing the set of vertices (to, in effect, define how the vertices will be used to form a set of primitives to be processed when generating the output). Each vertex will have associated with it a set of data (such as position, colour, texture and other attributes) representing the vertex. This “vertex” data is then used when processing a primitive that includes the vertex in order to generate the desired output of the graphics processing system. Once the vertices and sets of vertex indices for an output have been generated, they can be processed by a graphics processor to generate the desired graphics processing output (render target), such as a frame for display. This will comprise, inter alia, “assembling” primitives using the vertices based on the set (sequence) of vertex indices, and then processing the so-assembled primitives. The primitive processing may involve, for example, determining which sampling points of an array of sampling points associated with the output area to be processed are covered by a primitive, and then determining the appearance each sampling point should have (e.g. in terms of its colour, etc.) to represent the primitive at that sampling point. These processes are commonly referred to as rasterising and rendering, respectively. The rasterising and rendering processes use the vertex attributes associated with the vertices of the primitive that is being processed. To facilitate this operation at least some of the attributes of the vertices defined for the given graphics processing output are usually subjected to an initial so-called “vertex shading” (vertex processing) operation, before the primitives are, e.g. rasterised and rendered. This “vertex shading” operation operates to transform the attributes for a vertex into a desired form for the subsequent graphics processing operation(s). This may comprise, for example, transforming vertex position attributes from the model or user space that they are initially defined in, to the screen space that the output of the graphics processing is to be displayed in. A graphics processing pipeline executed by a graphics processor will typically therefore include a vertex processing stage (a vertex shader) that executes vertex processing (shading) computations on initial vertex attribute values defined for the vertices so as to generate a desired set of output vertex attributes (i.e. appropriately “shaded” attributes) for use in the subsequent processing stages of the graphics processing pipeline. There will then be an appropriate “primitive assembly” operation that “assembles” the primitives that are to be processed by the graphics processing pipeline from the provided indices and vertices, e.g. in accordance with a defined primitive type or types that are to be assembled using the provided indices and vertices. The so-assembled primitives will then be processed, e.g. rasterised and rendered. FIG. 1 illustrates this graphics processing sequence when generating an output. As shown in FIG. 1, for an output to be generated, a set of scene data 11, including, inter alia, a set of vertices, and a set of indices defining primitives to be processed for the output and referencing the set of vertices, is provided. The vertices then undergo appropriate vertex processing (shading) 12, e.g. to transform the positions for the vertices from “model” space to “screen” space. There is then a primitive a