# US 8,786,618 B2 · Shader program headers

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,786,618 B2
- Document ID: US8786618B2
- Status: Granted
- Kind: B2
- Application number: 12/899,431
- Filed: 2010-10-06
- Published: 2011-04-14
- Granted: 2014-07-22
- Earliest claimed: 2009-10-08
- Assignees: NVIDIA Corporation
- Applicants: Jerome F. Duluk, Jr.; Jesse David Hall; Patrick R. Brown; Gernot Schaufler; Mark D. Stadler
- Inventors: Jerome F. Duluk, Jr.; Jesse David Hall; Patrick R. Brown; Gernot Schaufler; Mark D. Stadler
- Web page: https://patentgrep.com/patent/US8786618B2

## CPC

- G06T 15/005: {General purpose rendering architectures}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

One embodiment of the present invention sets forth a technique for configuring a graphics processing pipeline (GPP) to process data according to one or more shader programs. The method includes receiving a plurality of pointers, where each pointer references a different shader program header (SPH) included in a plurality of SPHs, and each SPH is associated with a different shader program that executes within the GPP. For each SPH included in the plurality of SPHs, one or more GPP configuration parameters included in the SPH are identified, and the GPP is adjusted based on the one or more GPP configuration parameters.

## Claims

### Claim 1

A computer-implemented method for configuring a graphics processing pipeline (GPP) to process data according to one or more shader programs, the method comprising:
receiving a plurality of pointers, wherein each pointer references a different shader program header (SPH) included in a plurality of SPHs, and each SPH is stored with a different associated shader program that executes within the GPP; and
for each SPH included in the plurality of SPHs:
identifying one or more GPP configuration parameters included in the SPH; and
adjusting the GPP based on the one or more GPP configuration parameters.

### Claim 2 (depends on 1)

The method of claim 1, further comprising the steps of aggregating each of the one or more GPP configuration parameters to generate one or more global GPP configuration parameters, and adjusting the GPP based on the one or more global GPP configuration parameters.

### Claim 3 (depends on 1)

The method of claim 1, wherein each SPH indicates an offset that locates a set of instructions that comprise the shader program associated with the SPH.

### Claim 4 (depends on 1)

The method of claim 1, wherein each SPH indicates an amount of local memory that is required to execute the shader program associated with the SPH.

### Claim 5 (depends on 1)

The method of claim 1, wherein each SPH indicates whether the shader program associated with the SPH is able to execute load and store operations to a global memory that is accessible by all of the shader programs that execute within the GPP.

### Claim 6 (depends on 5)

The method of claim 5, wherein, if an SPH indicates that the shader program associated with the SPH is able to execute load and store operations to the global memory, then the GPP does not perform an early depth-based discard of pixels before the pixel shader is executed.

### Claim 7 (depends on 1)

The method of claim 1, wherein, if an SPH is associated with a pixel shader program, then the SPH indicates whether the pixel shader program is able to discard pixels.

### Claim 8 (depends on 1)

The method of claim 1, wherein, if an SPH is associated with a pixel shader program, then the SPH indicates for each of a plurality of possible shader inputs:
whether the input is needed by the pixel shader; and
how the input should be interpolated when pixel shader input values are constructed by the GPP.

### Claim 9 (depends on 1)

The method of claim 1, wherein a plurality of SPH formats is supported, and each SPH provides version information indicating how the one or more configuration parameters included in the SPH are identified.

### Claim 10 (depends on 1)

The method of claim 1, wherein each SPH is stored in a first portion of a block of memory in which an associated shader program also is stored.

### Claim 11 (depends on 1)

The method of claim 1, wherein each SPH is stored in a memory location that is contiguous with a memory location at which an associated shader program is stored.

### Claim 12

A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause a computing device to configure a graphics processing pipeline (GPP) to process data according to one or more shader programs, by performing the steps of:
receiving a plurality of pointers, wherein each pointer references a different shader program header (SPH) included in a plurality of SPHs, and each SPH is stored with a different associated shader program that executes within the GPP; and
for each SPH included in the plurality of SPHs:
identifying one or more GPP configuration parameters included in the SPH; and
adjusting the GPP based on the one or more GPP configuration parameters.

### Claim 13 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, further comprising the steps of aggregating each of the one or more GPP configuration parameters to generate one or more global GPP configuration parameters, and adjusting the GPP based on the one or more global GPP configuration parameters.

### Claim 14 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein each SPH indicates an offset that locates a set of instructions that comprise the shader program associated with the SPH.

### Claim 15 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein each SPH indicates an amount of local memory that is required to execute the shader program associated with the SPH.

### Claim 16 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein each SPH indicates whether the shader program associated with the SPH is able to execute load and store operations to a global memory that is accessible by all of the shader programs that execute within the GPP.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein, if an SPH indicates that the shader program associated with the SPH is able to execute load and store operations to the global memory, then the GPP does not perform an early depth-based discard of pixels before the pixel shader is executed.

### Claim 18 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein, if an SPH is associated with a pixel shader program, then the SPH indicates whether the pixel shader program is able to discard pixels.

### Claim 19 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein, if an SPH is associated with a pixel shader program, then the SPH indicates for each of a plurality of possible shader inputs:
whether the input is needed by the pixel shader; and
how the input should be interpolated when pixel shader input values are constructed by the GPP.

### Claim 20 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein a plurality of SPH formats is supported, and each SPH provides version information indicating how the one or more configuration parameters included in the SPH are identified.

### Claim 21

A computing device that configures a graphics processing pipeline (GPP) to process data according to one or more shader programs, the computing device comprising:
a host processor coupled to a main memory; and
a graphics adapter having management unit, wherein the management unit is configured to:
receive a plurality of pointers, wherein each pointer references a different shader program header (SPH) included in a plurality of SPHs, and each SPH is stored with a different associated shader program that executes within the GPP; and
for each SPH included in the plurality of SPHs:
identify one or more GPP configuration parameters included in the SPH; and
adjust the GPP based on the one or more GPP configuration parameters.

### Claim 22 (depends on 21)

The computing device of claim 21, wherein the management unit is further configured to aggregate each of the one or more GPP configuration parameters to generate one or more global GPP configuration parameters, and adjust the GPP based on the one or more global GPP configuration parameters.
