IP Library › Granted Patent US 9,214,008
Granted Patent B2
US 9,214,008 · App. 13/745,707 · Granted Dec 15, 2015

Shader program attribute storage

Inventors: Ziyad Sami Hakura (Gilroy, CA); Emmett M. Kilgariff (Santa Clara, CA)
Assignee: NVIDIA Corporation
G06T1/60G06F12/023
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,214,008
App. No.
13/745,707
Granted
Dec 15, 2015
Kind
B2
Abstract

A system, method, and computer program product are provided for determining a size of an attribute storage buffer. Input attributes read by a shader program to generate output attributes are identified. A portion of the output attributes to be consumed by a destination shader program is identified. The size of the attribute storage buffer that is allocated for execution of the shader program is computed based on the input attributes and the portion of the output attributes.

Claims (39)

1. A method comprising:

identifying input attributes read by a shader program to generate output attributes;

identifying a portion of the output attributes to be consumed by a destination shader program or a fixed-function hardware engine;

computing a size of an attribute storage buffer to be allocated for execution of the shader program based on the input attributes and the portion of the output attributes; and

enabling attribute buffer combining for the shader program when all reads of the e input attributes occur before any writes of the output attributes.

2. The method of claim 1 , further comprising providing a single base address corresponding to the attribute storage buffer to the shader program for reading the input attributes and writing the output attributes.

3. The method of claim 1 , wherein the identifying of the portion of the output attributes to be consumed by the destination shader program or the fixed-function hardware engine comprises combining a first mask indicating the output attributes generated by the shader program with a second mask indicating the input attributes that are consumed by the destination shader program or the fixed-function hardware engine.

4. The method of claim 1 , wherein the computing of the size of the attribute storage buffer to be allocated comprises selecting a maximum of a first amount of storage needed for the input attributes read by the shader program and a second amount of storage needed for the portion of the output attributes to be consumed by the destination shader program or the fixed-function hardware engine.

5. The method of claim 1 , wherein the computing of the size of the attribute storage buffer to be allocated comprises selecting a maximum of a first amount of storage needed for the input attributes read by the shader program, a second amount of storage needed for the portion of the output attributes to be consumed by the destination shader program or the fixed-function hardware engine, and a third amount of storage needed for output attributes generated by the destination shader program and consumed as input attributes by either an additional shader program or an additional fixed-function hardware engine.

6. The method of claim 1 , wherein the shader program is a pixel shader program and the input attributes are fragment data.

7. The method of claim 1 , wherein the shader program is a vertex shader program and the input attributes are vertex data.

8. The method of claim 1 , wherein an additional input attribute that is set to a default value is consumed by the shader program or the fixed-function hardware engine to generate the output attributes.

9. The method of claim 1 , wherein the shader program is a geometry shader program and the input attributes are geometry data.

10. A method comprising;

identifying input attributes read by a shader program to generate output attributes;

identifying a portion of the output attributes that are input attributes for the destination shader program or a fixed-function hardware engine;

computing a size of an attribute storage buffer to be allocated for execution of the shader program based on the input attributes and the portion of the output attributes;

and

disabling attribute buffer combining for the destination shader program when at least one write of an output attribute generated by the destination shader program occurs before at least one read of an input attribute for die destination shader program.

11. The method of claim 10 , wherein the shader program is a pixel shader program and the input attributes are fragment data.

12. The method of claim 10 , wherein the shader program is a vertex shader program and the input attributes are vertex data.

13. The method of claim 10 , wherein the shader program is a geometry shader program and the input attributes are geometry data.

14. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform steps comprising:

identifying input attributes read by a shader program to generate output attributes;

identifying a portion of the output attributes to be consumed by a destination. shader program or a fixed-function hardware engine;

computing a size of an attribute storage buffer to be allocated for execution of the shader program based on the input attributes and the portion of the output attributes; and

enabling attribute buffer combining for the shader program when all reads of the attributes occur before an writes of the output attributes.

15. The non-transitory computer-readable storage medium of claim 14 , wherein the identifying of the portion of the output attributes to be consumed by the destination shader program or the fixed-function hardware engine comprises combining a first mask indicating the output attributes generated by the shader program with a second. mask indicating the input attributes of the destination shader program or the fixed-function hardware engine.

16. The non-transitory computer-readable storage medium of claim 14 , wherein the computing of the size of the attribute storage buffer to be allocated comprises selecting a maximum of a first amount of storage needed for the input attributes consumed by the shader program and a second amount of storage needed for the portion of the output attributes to be consumed by the destination shader program or the fixed-function hardware engine.

17. The non-transitory computer-readable storage medium of claim 14 , wherein the shader program is a vertex shader program and the input attributes are vertex data.

18. A system comprising:

a memory storing a shader program and a destination shader program; and

one or more processing units coupled to the memory and configured to:

identify input attributes read by the shader program to generate output attributes;

identify a portion of the output attributes to be consumed by the destination shader program;

compute a size of an attribute storage buffer to be allocated for execution of the shader program based on the input attributes and the portion of the output attributes; and

enable attribute buffer combining for the shader program when all reads of the input attributes occur before any writes of the output attributes.

19. The system of claim 18 , wherein the one or more processing units reside within a graphics processing unit.

20. The system of claim 18 , further comprising a cache, and wherein the one or more processing units are further configured to allocate the attribute storage buffer within the cache.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 9, 2013
From: HAKURA, ZIYAD SAMI; KILGARIFF, EMMETT M.
To: NVIDIA CORPORATION
Reel/Frame 031376/0647 →
Continuity (1)
Related Publication 20140204106A1 · Jul 24, 2014