Multi-version shaders

US11243752B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11243752-B2
Application numberUS-201916509165-A
CountryUS
Kind codeB2
Filing dateJul 11, 2019
Priority dateJul 11, 2019
Publication dateFeb 8, 2022
Grant dateFeb 8, 2022

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Described herein are techniques for generating a stitched shader program. The techniques include identifying a set of shader programs to include in the stitched shader program, wherein the set includes at least one multiversion shader program that includes a first version of instructions and a second version of instructions, wherein the first version of instructions uses a first number of resources that is different than a second number of resources used by the second version of instructions. The techniques also include combining the set of shader programs to form the stitched shader program. The techniques further include determining a number of resources for the stitched shader program. The techniques also include based on the determined number of resources, modifying the instructions corresponding to the multiversion shader program to, when executed, execute either the first version of instructions, or the second version of instructions.

First claim

Opening claim text (preview).

What is claimed is: 1. A method for generating a stitched shader program, the method comprising: identifying a set of shader programs to include in the stitched shader program, wherein the set of shader programs includes at least one multiversion shader program that includes a first version of instructions and a second version of instructions, wherein the first version of instructions uses a first number of resources that is different than a second number of resources used by the second version of instructions, and wherein the set of shader programs also includes a second shader program different from the multiversion shader program; combining the set of shader programs to form the stitched shader program, wherein the stitched shader program includes instructions corresponding to the at least one multiversion shader program and instructions corresponding to the second shader program; determining a number of resources for the stitched shader program based on resource usage of the second shader program; and based on the determined number of resources, modifying the instructions within the stitched shader program, the instructions being from the at least one multiversion shader program, to execute either the first version of instructions or the second version of instructions, when the at least one multiversion shader is executed. 2. The method of claim 1 , wherein determining the number of resources for the stitched shader program comprises: identifying, as the number of resources, a lowest number of resources that all shader programs of the set of shader programs are capable of executing with. 3. The method of claim 1 , wherein determining the number of resources for the stitched shader program comprises: selecting the number of resources based on performance characteristics of the set of shader programs. 4. The method of claim 1 , wherein modifying the instructions corresponding to the multiversion shader program comprises: modifying version selection instruction placeholders. 5. The method of claim 1 , wherein modifying the instructions corresponding to the multiversion shader program comprises: modifying glue instruction placeholders. 6. The method of claim 1 , further comprising: compiling a first shader program to generate the at least one multiversion shader program. 7. The method of claim 6 , further comprising: analyzing resource utilization of initial compiled shaders for shader programs specified by an application to determine a threshold; and in response to determining that an initial compiled shader corresponding to the at least one multiversion shader program utilizes a number of resources above the threshold, generating the at least one multiversion shader program. 8. The method of claim 1 , wherein the identifying the set of shader programs to include in the stitched shader program is performed at runtime based on assets specified to be included in a scene for an application. 9. The method of claim 1 , wherein: the first version of instructions and the second version of instructions perform the same operations on the same input to generate the same output but utilize a different number of resources. 10. A computing device configured to generate a stitched shader program, the computing device comprising: a memory; and a processor configured to execute a linker, the linker configured to: identify a set of shader programs to include in the stitched shader program, wherein the set of shader programs includes at least one multiversion shader program that includes a first version of instructions and a second version of instructions, wherein the first version of instructions uses a first number of resources that is different than a second number of resources used by the second version of instructions, and wherein the set of shader programs also includes a second shader program different from the multiversion shader program; combine the set of shader programs to form the stitched shader program, wherein the stitched shader program includes instructions corresponding to the multiversion shader program and instructions corresponding to the second shader program; determine a number of resources for the stitched shader program based on resource usage of the second shader program; and based on the determined number of resources, modify the instructions corresponding to the at least one multiversion shader program to execute either the first version of instructions, or the second version of instructions, when the at least one multiversion shader is executed. 11. The computing device of claim 10 , wherein determining the number of resources for the stitched shader program comprises: identifying, as the number of resources, a lowest number of resources that all shader programs of the set of shader programs are capable of executing with. 12. The computing device of claim 10 , wherein determining the number of resources for the stitched shader program comprises: selecting the number of resources based on performance characteristics of the set of shader programs. 13. The computing device of claim 10 , wherein modifying the instructions corresponding to the multiversion shader program comprises: modifying version selection instruction placeholders. 14. The computing device of claim 10 , wherein modifying the instructions corresponding to the multiversion shader program comprises: modifying glue instruction placeholders. 15. The computing device of claim 10 , further comprising a compiler configured to: compile a first shader program to generate the at least one multiversion shader program. 16. The computing device of claim 15 , wherein the compiler is further configured to: analyze resource utilization of initial compiled shaders for shader programs specified by an application to determine a threshold; and in response to determining that an initial compiled shader corresponding to the at least one multiversion shader program utilizes a number of resources above the threshold, generate the at least one multiversion shader program. 17. The computing device of claim 10 , wherein the identifying the set of shader programs to include in the stitched shader program is performed at runtime based on assets specified to be included in a scene for an application. 18. The computing device of claim 10 , wherein: the first version of instructions and the second version of instructions perform the same operations on the same input to generate the same output but utilize a different number of resources. 19. A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to generate a stitched shader program, by: identifying a set of shader programs to include in the stitched shader program, wherein the set of shader programs includes at least one multiversion shader program that includes a first version of instructions and a second version of instructions, wherein the first version of instructions uses a first number of resources that is different than a second number of resources used by the second version of instructions, and wherein the set of shader programs also includes a second shader program different from the multiversion shader program; combining the set of shader programs to form the stitched shader program, wherein the stitched shader program includes instructions corresponding to the multiversion shader program and instructions corresponding to the second shader program; determining a number of resources for the stitched shader program based on res

Assignees

Inventors

Classifications

  • Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions · CPC title

  • Version control (security arrangements therefor G06F21/57); Configuration management · CPC title

  • Register allocation; Assignment of physical memory space to logical memory space · CPC title

  • G06F8/49Primary

    Partial evaluation · CPC title

  • Ray-tracing · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11243752B2 cover?
Described herein are techniques for generating a stitched shader program. The techniques include identifying a set of shader programs to include in the stitched shader program, wherein the set includes at least one multiversion shader program that includes a first version of instructions and a second version of instructions, wherein the first version of instructions uses a first number of resou…
Who is the assignee on this patent?
Advanced Micro Devices Inc
What technology area does this patent fall under?
Primary CPC classification G06F8/49. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Feb 08 2022 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 2 related publications on this page (citations in our corpus or others sharing the same primary CPC).