Shader pipelines and hierarchical shader resources
AssigneesAdvanced Micro Devices, Inc., ATI Technologies ULC
InventorsGuennadi Riguer, Brian K. Bennett
Life of this patent
Estimating the term…
Abstract
Shader resources may be specified for input to a shader using a hierarchical data structure which may be referred to as a descriptor set. The descriptor set may be bound to a bind point of the shader and may contain slots with pointers to memory containing shader resources. The shader may reference a particular slot of the descriptor set using an offset, and may change shader resources by referencing a different slot of the descriptor set or by binding or rebinding a new descriptor set. A graphics pipeline may be specified by creating a pipeline object which specifies a shader and a rendering context object, and linking the pipeline object. Part or all of the pipeline may be validated, cross-validated, or optimized during linking.
Claims22
A computer processor configured to input a shader resource to a shader or a pipeline, the computer processor comprising:
- circuitry configured to:
- store, in a computer memory, a data structure having at least one slot which contains a pointer to a shader resource stored in a graphics processing unit (GPU) memory;
- bind the data structure to a GPU register;
- reference the at least one slot by an offset to input the shader resource to the shader or pipeline;
- determine a GPU overhead associated with inputting a different shader resource to the shader or pipeline by referencing a different slot of the data structure;
- determine a CPU overhead associated with inputting the different shader resource to the shader or pipeline by binding a different data structure to the GPU register;
- and
- input a different shader resource to the shader or pipeline by conditionally, based on the GPU overhead and the CPU overhead, either referencing a different slot of the data structure or binding a different data structure to the GPU register.
A computer processor configured to input a graphics pipeline resource to a pipeline, the computer processor comprising:
- circuitry configured to:
- store, in a computer memory, a data structure having at least one slot which contains a pointer to a pipeline resource;
- bind the data structure to a GPU register;
- reference the at least one slot by an offset to input the graphics pipeline resource to the pipeline;
- determine a GPU overhead associated with inputting a different shader resource to the pipeline by referencing a different slot of the data structure;
- determine a CPU overhead associated with inputting the different shader resource to the pipeline by binding a different data structure to the GPU register;
- and
- input a different pipeline resource to the pipeline by conditionally, based on the GPU overhead and the CPU overhead, either referencing a different slot of the data structure or binding a different data structure to the GPU register.
A computer processing device configured to implement a graphics pipeline, the computer processing device comprising:
- circuitry configured to:
- store, in a computer memory, a pipeline object and a descriptor set having at least one slot which contains a pointer to a shader resource;
- attach at least one shader object to the pipeline object, which specifies at least one shader;
- attach at least one rendering context object to the pipeline object which specifies at least part of a rendering context;
- bind the descriptor set to a GPU register;
- determine a GPU overhead associated with replacing the shader resource by referencing a different slot of the descriptor set;
- determine a CPU overhead associated with replacing the shader resource by binding a different descriptor set to the GPU register;
- and
- replace the shader resource by conditionally, based on the GPU overhead and the CPU overhead, either referencing a different slot of the descriptor set or binding a different descriptor set to the GPU register.
Dependencies are inferred from the claim text.