Efficient use of user-defined shaders to implement graphics operations
AssigneeAechelon Technology, Inc.
InventorsDavid L. Morgan III, Ignacio Sanz-Pastor
Life of this patent
Estimating the term…
Abstract
User-defined shaders are constructed from fragments. The shaders are identified by tags. At run-time, the tag is used to determine whether the user-defined shader has been previously compiled. If it has, the compiled version is executed. If it has not, the fragments are assembled to form the shader and the shader is run-time compiled. The compiled shader can be stored for subsequent reuse, with the tag serving as an index to the compiled version.
Claims34
A method for compiling shaders for implementing graphics operations, at least one shader comprising two or more fragments, the method comprising:
- determining, based on a tag that specifies one or more functions of the at least one shader, whether the shader has been previously compiled;
- responsive to a determination that the shader has been previously compiled, retrieving the previously compiled shader;
- responsive to a determination that the shader has not been previously compiled:
- based on the tag, assembling the fragments included in the shader, the fragments implementing graphics operations that are part of the shader's function, and
- run-time compiling the assembled fragments, and
- providing the compiled shader for real-time execution on a graphics system.
A system for compiling shaders for implementing graphics operations, at least one shader comprising two or more fragments, the system comprising:
- control logic for determining, based on a tag that specifies one or more functions of the at least one shader, whether the shader has been previously compiled;
- a library of fragments;
- and
- a fragment assembler coupled to the control logic and capable of accessing the library of fragments for, responsive to a determination that the shader has not been previously compiled, based on the tag, assembling the fragments included in the shader, the fragments implementing graphics operations that are part of the shader's function.
A method for executing graphics operations on a graphics system having a programmable mode and a fixed function mode, wherein the fixed function mode is for performing graphics operations selected from a predefined set of standard operations and the programmable mode is capable of executing shaders, the method comprising:
- determining whether a set of graphics operations is to be executed in programmable mode or in fixed function mode;
- responsive to a determination that the set of graphics operations is to be executed in fixed function mode, performing one or more standard operations that implement the set of graphics operations;
- and
- responsive to a determination that the set of graphics operations is to be executed in programmable mode:
- determining, based on a tag that specifies a function of a shader that implements the set of graphics operations, whether the shader has been previously compiled;
- responsive to a determination that the shader has been previously compiled, retrieving and executing the previously compiled shader in real time;
- and
- responsive to a determination that the shader has not been previously compiled:
- based on the tag, assembling fragments included in the shader, wherein the shader comprises two or more fragments, the fragments implementing graphics operations that are part of the shader's function,
- run-time compiling the assembled fragments, and executing the run-time compiled shader in real time.
Dependencies are inferred from the claim text.