Method and apparatus of cross shader compilation

US2019164337A1 · US · A1

Patent metadata
FieldValue
Publication numberUS-2019164337-A1
Application numberUS-201715827909-A
CountryUS
Kind codeA1
Filing dateNov 30, 2017
Priority dateNov 30, 2017
Publication dateMay 30, 2019
Grant date

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.

A method and apparatus provides for compiling a plurality of shaders, each shader having a plurality of computer-readable statements, into a plurality of computer-executable instructions. In one example, the method and apparatus, using a computing device, receives the plurality of shaders used in a process pipeline for performing at least one shading function, determines a shader type of each of the plurality of shaders based on the at least one shading function, and compiles the plurality of shaders by generating the computer-executable instructions using data including a shader descriptor for each of the plurality of shaders, resulting in the shading functions of the plurality of shaders combined together.

First claim

Opening claim text (preview).

What is claimed is: 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 based on the at least one shading function; and compiling, using the computing device, the plurality of shaders by generating the computer-executable instructions using data including a shader descriptor for each of the plurality of shaders, resulting in the shading functions of the plurality of shaders combined together. 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 comprises determining whether to use the shader descriptor 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 . The method of claim 2 , wherein the compiling the plurality of shaders by generating the computer-executable instructions using data including the shader descriptor comprises combining, when the shader type is a fetch shader, the fetch shader with a vertex shader at runtime. 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 comprises combining, when the shader type is a shader compiled for a merged shader, a vertex shader with a hull shader. 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 comprises combining, when the shader type is a shader compiled for a merged shader, a vertex or domain shader with a geometry shader. 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 comprises combining, when the shader type is a dispatch draw compute shader, the compute shader with a fetch shader and a transform shader. 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 comprises combining the plurality of shaders having at least two different shader types. 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 comprises preserving at least a portion of the data used by at least one of the plurality of shaders. 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 comprises preventing the data used by at least one of the plurality of shaders from being overwritten. 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 comprises implementing a generalized call pattern in the plurality of shaders to prevent generating unnecessary data move instructions for the plurality of shaders. 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 comprises combining at least two of the plurality of shaders together to be executed as a single stage in the process pipeline. 12 . 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 based on the at least one shading function; and compile, using the computing device, the plurality of shaders by generating the computer-executable instructions using data including a shader descriptor for each of the plurality of shaders, resulting in the shading functions of the plurality of shaders combined together. 13 . The computing device of claim 12 , wherein the processor is further configured to determine whether to use the shader descriptor 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. 14 . The computing device of claim 13 , 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. 15 . The computing device of claim 12 , wherein the processor is further configured to combine the plurality of shaders having at least two different shader types. 16 . The computing device of claim 15 , 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. 17 . The computing device of claim 15 , 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. 18 . The method of claim 12 , 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. 19 . 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 based on the at least one shading function; and compile, using the computing device, the plurality of shaders by generating the computer-executable instructions using data including a shader descriptor for each of the plurality of shaders, resulting in the shading functions of the plurality of shaders combined together. 20 . The non-transitory computer readable storage medium of claim 19 , 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 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

Assignees

Inventors

Classifications

  • Image acquisition · CPC title

  • Geometric effects · CPC title

  • Processor architectures; Processor configuration, e.g. pipelining · CPC title

  • General purpose rendering architectures · CPC title

  • Compilation · 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 US2019164337A1 cover?
A method and apparatus provides for compiling a plurality of shaders, each shader having a plurality of computer-readable statements, into a plurality of computer-executable instructions. In one example, the method and apparatus, using a computing device, receives the plurality of shaders used in a process pipeline for performing at least one shading function, determines a shader type of each o…
Who is the assignee on this patent?
Advanced Micro Devices Inc
What technology area does this patent fall under?
Primary CPC classification G06T15/80. Mapped technology areas include Physics.
When was this patent published?
Publication date Thu May 30 2019 00:00:00 GMT+0000 (Coordinated Universal Time) (A1). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 4 related publications on this page (citations in our corpus or others sharing the same primary CPC).