11080927

Method and Apparatus of Cross Shader Compilation

PublishedAugust 3, 2021
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
22 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method, by a computing device, of compiling a plurality of shaders, each shader having a plurality of computer-readable statements, into a plurality of computer-executable instructions, comprising: receiving, using the computing device, the plurality of shaders used in a process pipeline for performing at least one shading function; determining, using the computing device, a shader type of each of the plurality of shaders to be compiled based on the at least one shading function, the plurality of shader types including one or more of: a vertex shader, a fetch shader, a shader compiled for a merged shader, a geometry shader, a hull shader and a compute shader; determining combinable shaders of different types among the plurality of shaders that are combinable at runtime; generating a shader descriptor object based on the determined combinable shaders of different types, the shader descriptor object configured to provide data comprising a unique identification number of a shader descriptor, a convention type indicating a call type, return values to a calling shader and a return address of the calling shader; and compiling, using the computing device, the plurality of shaders of different types by generating as part of a compiling operation, data including the shader descriptor object in response to determining the shader type of each of the plurality of shaders and generating the computer-executable instructions using the shader descriptor object, resulting in the shading functions of the plurality of shaders combined together.

2

2. The method of claim 1 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises determining whether to use the shader descriptor object by identifying, for each received shader, at least one combinable shader that is compatible with the received shader based on the shader type of each of the plurality of shaders.

3

3. The method of claim 2 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises combining, when the shader type is a fetch shader, the fetch shader with a vertex shader at runtime.

4

4. The method of claim 2 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises combining, when the shader type is a shader compiled for a merged shader, a vertex shader with a hull shader.

5

5. The method of claim 2 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises combining, when the shader type is a shader compiled for a merged shader, a vertex or domain shader with a geometry shader.

6

6. The method of claim 2 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises combining, when the shader type is a dispatch draw compute shader, the compute shader with a fetch shader and a transform shader.

7

7. The method of claim 1 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises combining the plurality of shaders having at least two different shader types.

8

8. The method of claim 1 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises preserving at least a portion of the data used by at least one of the plurality of shaders.

9

9. The method of claim 1 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises preventing the data used by at least one of the plurality of shaders from being overwritten.

10

10. The method of claim 1 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises implementing a generalized call pattern in the plurality of shaders to prevent generating unnecessary data move instructions for the plurality of shaders.

11

11. The method of claim 1 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor object comprises combining at least two of the plurality of shaders together to be executed as a single stage in the process pipeline.

12

12. The method of claim 1 comprising generating the data descriptor to include subroutine descriptors for one or more of the selected shaders.

13

13. The method of claim 1 wherein generating the shader descriptor object comprises data representing a unique identification number for the object and convention type indicating a call type.

14

14. A computing device having a processor operative to compile a plurality of shaders, each shader having a plurality of computer-readable statements, into a plurality of computer-executable instructions, the processor being configured to: receive, using the computing device, the plurality of shaders used in a process pipeline for performing at least one shading function; determine, using the computing device, a shader type of each of the plurality of shaders to be compiled based on the at least one shading function, the plurality of shader types including one or more of: a vertex shader, a fetch shader, a shader compiled for a merged shader, a geometry shader, a hull shader and a compute shader; determine combinable shaders of different types among the plurality of shaders that are combinable at runtime; generate a shader descriptor object based on the determined combinable shaders of different types, the shader descriptor object configured to provide data comprising a unique identification number of a shader descriptor, a convention type indicating a call type, return values to a calling shader and a return address of the calling shader; and compile, using the computing device, the plurality of shaders of different types by generating as part of a compiling operation, data including the shader descriptor object in response to determining the shader type of each of the plurality of shaders and generating the computer-executable instructions using the shader descriptor object, resulting in the shading functions of the plurality of shaders combined together.

15

15. The computing device of claim 14 , wherein the processor is further configured to determine whether to use the shader descriptor object by identifying, for each received shader, at least one combinable shader that is compatible with the received shader based on the shader type of each of the plurality of shaders.

16

16. The computing device of claim 15 , wherein the processor is further configured to: combine, when the shader type is a fetch shader, the fetch shader with a vertex shader at run time; combine, when the shader type is a shader compiled for a merged shader, either a vertex shader with a hull shader, or a vertex or domain shader with a geometry shader; and combine, when the shader type is a dispatch draw compute shader, the compute shader with a fetch shader and a transform shader.

17

17. The computing device of claim 14 , wherein the processor is further configured to combine the plurality of shaders having at least two different shader types.

18

18. The computing device of claim 17 , wherein the processor is further configured to: preserve at least a portion of the data used by at least one of the plurality of shaders; and prevent the data used by at least one of the plurality of shaders from being overwritten.

19

19. The computing device of claim 17 , wherein the processor is further configured to implement a generalized call pattern in the plurality of shaders to prevent generating unnecessary data move instructions for the plurality of shaders.

20

20. The method of claim 14 , wherein the processor is further configured to combine at least two of the plurality of shaders together to be executed as a single stage in the process pipeline.

21

21. A non-transitory computer readable storage medium comprising executable instructions that when executed by one or more processors cause the one or more processors to: receive, using a computing device, a plurality of shaders used in a process pipeline for performing at least one shading function; determine, using the computing device, a shader type of each of the plurality of shaders to be compiled based on the at least one shading function, the plurality of shader types including one or more of: a vertex shader, a fetch shader, a shader compiled for a merged shader, a geometry shader, a hull shader and a compute shader; determine combinable shaders of different types among the plurality of shaders that are combinable at runtime; generate a shader descriptor object based on the determined combinable shaders of different types, the shader descriptor object configured to provide data comprising a unique identification number of a shader descriptor, a convention type indicating a call type, return values to a calling shader and a return address of the calling shader; and compile, using the computing device, the plurality of shaders of different types by generating as part of a compiling operation, data including the shader descriptor object in response to determining the shader type of each of the plurality of shaders and generating the computer-executable instructions using the shader descriptor object, resulting in the shading functions of the plurality of shaders combined together.

22

22. The non-transitory computer readable storage medium of claim 21 , further comprising executable instructions that when executed by one or more processors cause the one or more processors to: determine whether to use the shader descriptor object by identifying, for each received shader, at least one combinable shader that is compatible with the received shader based on the shader type of each of the plurality of shaders; combine the plurality of shaders having at least two different shader types; preserve at least a portion of the data used by at least one of the plurality of shaders; prevent the data used by at least one of the plurality of shaders from being overwritten; implement a generalized call pattern in the plurality of shaders to prevent generating unnecessary data move instructions for the plurality of shaders; and combine at least two of the plurality of shaders together to be executed as a single stage in the process pipeline.

Patent Metadata

Filing Date

Unknown

Publication Date

August 3, 2021

Inventors

Guohua Jin
Michael John Bedy

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “METHOD AND APPARATUS OF CROSS SHADER COMPILATION” (11080927). https://patentable.app/patents/11080927

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.