摘要 |
Techniques are provided for efficiently arranging shader constants into constant buffers to more efficiently set shader constants to a GPU. Techniques are provided for tracking runtime usage patterns of shader constants, and then generating usage pattern data regarding usage patterns of shader constants. This usage pattern data can then be fed into an optimization algorithm to efficiently lay out the data for maximal performance given certain heuristics. Factors considered include, for example, frequency of client update of the values, usage by certain shaders, and size and number of the resulting buffers.
|