# US 7,746,347 B1 · Methods and systems for processing a geometry shader program developed in a high-level shading language

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

- Number: US 7,746,347 B1
- Document ID: US7746347B1
- Status: Granted
- Kind: B1
- Application number: 11/565,566
- Filed: 2006-11-30
- Granted: 2010-06-29
- Earliest claimed: 2004-07-02
- Assignees: NVIDIA Corporation
- Inventors: Patrick R. Brown; Barthold B. Lichtenbelt; Christopher T. Dodd; Mark J. Kilgard
- Web page: https://patentgrep.com/patent/US7746347B1

## CPC

- G06F 8/41: Compilation
- G06T 15/005: {General purpose rendering architectures}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Methods and systems for processing a geometry shader program developed in a high-level shading language are disclosed. Specifically, in one embodiment, after having received the geometry shader program configured to be executed by a first processing unit in a programmable execution environment, the high-level shading language instructions of the geometry shader program is converted into low-level programming language instructions. The low-level programming language instructions are then linked with the low-level programming language instructions of a domain-specific shader program, which is configured to be executed by a second processing unit also residing in the programmable execution environment. The linked instructions of the geometry shader program are directed to the first processing unit, and the linked instructions of the domain-specific shader program are directed to the second processing unit.

## Claims

### Claim 1

A method for processing a geometry shader program in a programmable execution environment, the method comprising:
receiving the geometry shader program configured to be executed by a first processing unit in the programmable execution environment, wherein the geometry shader program includes instructions written in a high-level shading language;
converting the high-level shading language instructions of the geometry shader program into low-level programming language instructions;
linking the low-level programming language instructions of the geometry shader program with the low-level programming language instructions of a domain-specific shader program configured to be executed by a second processing unit in the programmable execution environment; and
directing the linked instructions of the geometry shader program to the first processing unit and the linked instructions of the domain-specific shader program to the second processing unit.

### Claim 2 (depends on 1)

The method of claim 1, wherein the linked instructions are linked assembly code instructions.

### Claim 3 (depends on 2)

The method of claim 2, further comprising converting the linked assembly code instructions of the geometry shader program and the domain-specific shader program into microcode instructions that can be executed in the programmable execution environment.

### Claim 4 (depends on 1)

The method of claim 1, further comprising specifying an input type of an input geometric primitive and an output type of an output geometric primitive for the geometry shader program prior to the linking step.

### Claim 5 (depends on 4)

The method of claim 4, wherein the input type can be a point, a line, a triangle, a line with adjacent strip vertices, or a triangle with adjacent edge vertices.

### Claim 6 (depends on 4)

The method of claim 4, wherein the output type can be a point, a line strip, or a triangle strip.

### Claim 7 (depends on 1)

The method of claim 1, wherein the linking step further comprising specifying input/output relationship between the geometry shader program and the domain-specific shader program by symbol names.

### Claim 8 (depends on 1)

The method of claim 1, wherein the linking step further comprising specifying input/output relationship between the geometry shader program and the domain-specific shader program by symbol semantics.

### Claim 9 (depends on 1)

The method of claim 1, wherein the programmable execution environment is a graphics processing unit (“GPU”).

### Claim 10 (depends on 1)

The method of claim 1, wherein the high-level shading language is derived from the OpenGL™ Shading Language (“GLSL”) or the OpenGL™ ES Shading Language (“ESSL”).

### Claim 11 (depends on 1)

The method of claim 1, further comprising manipulating the geometry shader program and the domain-specific program through a set of commands defined in a common application program interface (“API”).

### Claim 12 (depends on 11)

The method of claim 11, wherein the common API is derived from the OpenGL™ API.

### Claim 13 (depends on 10)

The method of claim 10, wherein the high-level shading language includes a function capable of emitting a vertex.

### Claim 14 (depends on 13)

The method of claim 13, wherein a first number of output vertices emitted differs from a second number of input vertices.

### Claim 15 (depends on 10)

The method of claim 10, wherein the high-level shading language includes a function capable of restarting a primitive.

### Claim 16 (depends on 10)

The method of claim 10, wherein the high-level shading language includes a built-in variable initialized to identify a primitive.

### Claim 17 (depends on 10)

The method of claim 10, wherein the high-level shading language includes a built-in variable to indicate a framebuffer layer for an output primitive.

### Claim 18 (depends on 10)

The method of claim 10, wherein the high-level shading language includes a built-in variable array initialized to store an array of input vertex attributes indexed by at least one vertex number.

### Claim 19 (depends on 10)

The method of claim 10, wherein the high-level shading language includes a built-in variable to indicate the number of vertices in an input primitive.

### Claim 20 (depends on 12)

The method of claim 12, wherein the common API includes a command designating an input type for an input geometric primitive for the geometry shader program to process.

### Claim 21 (depends on 12)

The method of claim 12, wherein the common API includes a command designating an output type for an output geometric primitive for the geometry shader program to process.

### Claim 22 (depends on 21)

The method of claim 21, wherein the common API further includes a command designating the input type involving adjacent vertices for the geometry shader program to process.

### Claim 23 (depends on 1)

The method of claim 1, wherein the domain-specific shader program is a vertex shader program.

### Claim 24 (depends on 1)

The method of claim 1, wherein the domain-specific shader program is a fragment shader program.

### Claim 25

A computer-readable medium containing a sequence of instructions, which when executed by a processing unit in a system, causes the processing unit to:
convert the high-level shading language instructions of a geometry shader program configured to be executed by a first shader engine in a graphics processing unit into low-level programming language instructions;
link the low-level programming language instructions of the geometry shader program with the low-level programming language instructions of a domain-specific shader program configured to be executed by a second shader engine in the graphics processing unit; and
direct the linked instructions of the geometry shader program to the first shader engine and the linked instructions of the domain-specific shader program to the second shader engine.
