Patent ID: 7750913

Claim:
A computer-implemented method, comprising: defining a plurality of shader snippets, wherein each snippet comprises a plurality of sub-snippets, wherein each sub-snippet comprises a plurality of instructions implementing a particular shader task and one or more parameters for executing the particular shader task on a particular one of a plurality of processing units of a graphics processing unit (GPU), and wherein each sub-snippet of a particular shader snippet is configured to execute on a different one of the processing units; defining one or more snippet assemblies, wherein each snippet assembly specifies a combination of multiple ones of the plurality of shader snippets and an order in which to execute the combination of shader snippets on the GPU; defining a plurality of target platform application programming interfaces (APIs) according to which the shader snippets should be executed on the GPU; and for each of the one or more snippet assemblies, generating a set of shader program code according to each of the plurality of target platform APIs for each of the plurality of processing units of the GPU for which a corresponding sub-snippet is included in one of the snippets of the respective assembly.