Using programmable constant buffers for multi-threaded processing
First Claim
1. A method of using multiple memory buffers for storing constant values utilized by shader programs during multi-threaded processing, comprising:
- storing a first set of constant values in a first memory buffer;
loading a first entry corresponding to the first set of constant values in a constant buffer table with a base address of the first memory buffer, wherein each loaded entry in the constant buffer table is identifiable by an index value and comprises an address corresponding to one of the multiple memory buffers;
loading a first slot entry in a slot table with the index value associated with the loaded first entry in the constant buffer table, wherein each loaded slot entry in the slot table comprises an index value associated with one of the entries in the constant buffer table;
determining that a transition from configuration commands to data processing commands has occurred;
incrementing an inflight count indicating that the first set of constant values is a new version of the constant values; and
outputting an instruction associated with a first shader program to a data processing command path of a multiprocessor pipeline, wherein the instruction comprises an identifier for the first slot entry and an offset value and accesses a first value for a programmable constant in the first set of constant values that corresponds to the base address of the first memory buffer offset by the offset value.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods for using multiple versions of programmable constants within a multi-threaded processor allow a programmable constant to be changed before a program using the constants has completed execution. Processing performance may be improved since programs using different values for a programmable constant may execute simultaneously. The programmable constants are stored in a constant buffer and an entry of a constant buffer table is bound to the constant buffer. When a programmable constant is changed it is copied to an entry in a page pool and address translation for the page pool is updated to correspond to the old version (copy) of the programmable constant. An advantage is that the constant buffer stores the newest version of the programmable constant.
-
Citations
20 Claims
-
1. A method of using multiple memory buffers for storing constant values utilized by shader programs during multi-threaded processing, comprising:
-
storing a first set of constant values in a first memory buffer; loading a first entry corresponding to the first set of constant values in a constant buffer table with a base address of the first memory buffer, wherein each loaded entry in the constant buffer table is identifiable by an index value and comprises an address corresponding to one of the multiple memory buffers; loading a first slot entry in a slot table with the index value associated with the loaded first entry in the constant buffer table, wherein each loaded slot entry in the slot table comprises an index value associated with one of the entries in the constant buffer table; determining that a transition from configuration commands to data processing commands has occurred; incrementing an inflight count indicating that the first set of constant values is a new version of the constant values; and outputting an instruction associated with a first shader program to a data processing command path of a multiprocessor pipeline, wherein the instruction comprises an identifier for the first slot entry and an offset value and accesses a first value for a programmable constant in the first set of constant values that corresponds to the base address of the first memory buffer offset by the offset value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 19)
-
-
9. A system for storing multiple versions of multiple memory buffers for use during multi-threaded processing, comprising:
-
a multiprocessor pipeline configured to simultaneously execute data processing commands of a first shader program using a first set of constant values, wherein the first set of constant values is read using a first slot entry in slot table, wherein each filled slot entry in the slot table comprises a value corresponding to one of the multiple memory buffers; a memory comprising a first memory buffer for storing the first set of constant values, wherein a first value for a programmable constant in the first set of constant values is stored in a first entry of the first memory buffer that corresponds to the base address of the first memory buffer offset by the offset value; and a scalar processor array cache collector that is coupled between the memory and the multiprocessor pipeline and configured to determine when a transition from configuration commands to data processing commands has occurred and increment an inflight count indicating that the first set of constant values is a new version of the constant values when the transition from configuration commands to data processing commands has occurred. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17, 18, 20)
-
Specification