Packing multiple shader programs onto a graphics processor
First Claim
Patent Images
1. A method comprising:
- causing a plurality of shader programs of a common shader program type to be loaded into an on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time, wherein causing the plurality of shader programs of the common shader program type to be loaded comprises;
loading a first shader program of the common shader program type into the on-chip shader program instruction memory;
determining one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory;
loading a second shader program of the common shader program type into one of the one or more ranges of available memory space;
determining whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; and
in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program;
determining a least frequently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory; and
evicting the least frequently used shader program from the on-chip shader program instruction memory,wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs.
1 Assignment
0 Petitions
Accused Products
Abstract
This disclosure describes techniques for packing multiple shader programs of a common shader program type onto a graphics processing unit (GPU). The techniques may include, for example, causing a plurality of shader programs of a common shader program type to be loaded into an on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time. In addition, various techniques for evicting shader programs from an on-chip shader program instruction memory are described.
21 Citations
42 Claims
-
1. A method comprising:
-
causing a plurality of shader programs of a common shader program type to be loaded into an on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time, wherein causing the plurality of shader programs of the common shader program type to be loaded comprises; loading a first shader program of the common shader program type into the on-chip shader program instruction memory; determining one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; loading a second shader program of the common shader program type into one of the one or more ranges of available memory space; determining whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; and in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; determining a least frequently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory; and evicting the least frequently used shader program from the on-chip shader program instruction memory, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A device comprising:
-
an on-chip shader program instruction memory comprising an instruction cache from which a shader unit fetches instructions during execution of at least one of a plurality of shader programs; a processor configured to; cause the plurality of shader programs of a common shader program type to be loaded into the on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; load a first shader program of the common shader program type into the on-chip shader program instruction memory; determine one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; load a second shader program of the common shader program type into one of the one or more ranges of available memory space; determine whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; determine a least frequently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory; and evict the least frequently used shader program from the on-chip shader program instruction memory in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program. - View Dependent Claims (7, 8, 9, 10, 11, 12)
-
-
13. An apparatus comprising:
-
means for loading a shader program into an on-chip shader program instruction memory of a graphics processor; means for causing a plurality of shader programs of a common shader program type to be loaded into the on-chip shader program instruction memory of the graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; means for loading a first shader program of the common shader program type into the on-chip shader program instruction memory; means for determining one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; means for loading a second shader program of the common shader program type into one of the one or more ranges of available memory space; means for determining whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; means for determining a least frequently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; and means for evicting the least frequently used shader program from the on-chip shader program instruction memory in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (14, 15, 16, 17)
-
-
18. A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors to:
-
cause a plurality of shader programs of a common shader program type to be loaded into an on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; load a first shader program of the common shader program type into the on-chip shader program instruction memory; determine one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; load a second shader program of the common shader program type into one of the one or more ranges of available memory space; determine whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; and in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; determine a least frequently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory; and evict the least frequently used shader program from the on-chip shader program instruction memory, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (19, 20, 21, 22)
-
-
23. A method comprising:
-
causing a plurality of shader programs of a common shader program type to be loaded into an on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time, wherein causing the plurality of shader programs of the common shader program type to be loaded comprises; loading a first shader program of the common shader program type into the on-chip shader program instruction memory; determining one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; loading a second shader program of the common shader program type into one of the one or more ranges of available memory space; determining whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; and in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program, determining a least recently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory; and evicting the least recently used shader program from the on-chip shader program instruction memory, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (24, 25)
-
-
26. A method comprising:
-
causing a plurality of shader programs of a common shader program type to be loaded into an on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time, wherein causing the plurality of shader programs of the common shader program type to be loaded comprises; loading a first shader program of the common shader program type into the on-chip shader program instruction memory; determining one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; loading a second shader program of the common shader program type into one of the one or more ranges of available memory space; determining whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; and in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; determining a set of N least frequently used shader programs from a set of one or more shader programs stored within the on-chip shader program instruction memory, where N is an integer greater than or equal to one; determining a least recently used shader program from the set of N least frequently used shader programs; and evicting the least recently used shader program from the on-chip shader program instruction memory, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (27, 28)
-
-
29. A device comprising:
-
an on-chip shader program instruction memory comprising an instruction cache from which a shader unit fetches instructions during execution of at least one of a plurality of shader programs; a processor configured to; cause the plurality of shader programs of a common shader program type to be loaded into the on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; load a first shader program of the common shader program type into the on-chip shader program instruction memory; determine one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; load a second shader program of the common shader program type into one of the one or more ranges of available memory space; determine whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; determine a least recently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory; and evict the least recently used shader program from the on-chip shader program instruction memory in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program. - View Dependent Claims (30, 31)
-
-
32. A device comprising:
-
an on-chip shader program instruction memory comprising an instruction cache from which a shader unit fetches instructions during execution of at least one of a plurality of shader programs; a processor configured to; cause the plurality of shader programs of a common shader program type to be loaded into the on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; load a first shader program of the common shader program type into the on-chip shader program instruction memory; determine one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; load a second shader program of the common shader program type into one of the one or more ranges of available memory space; determine whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; determine a set of N least frequently used shader programs from a set of one or more shader programs stored within the on-chip shader program instruction memory; determine a least recently used shader program from the set of N least frequently used shader programs; and evict the least recently used shader program from the on-chip shader program instruction memory, where N is an integer greater than or equal to one in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program. - View Dependent Claims (33, 34)
-
-
35. An apparatus comprising:
-
means for loading a shader program into an on-chip shader program instruction memory of a graphics processor; means for causing a plurality of shader programs of a common shader program type to be loaded into the on-chip shader program instruction memory of the graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; means for loading a first shader program of the common shader program type into the on-chip shader program instruction memory; means for determining one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; means for loading a second shader program of the common shader program type into one of the one or more ranges of available memory space; means for determining whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; means for determining a least recently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; and means for evicting the least recently used shader program from the on-chip shader program instruction memory in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (36)
-
-
37. An apparatus comprising:
-
means for loading a shader program into an on-chip shader program instruction memory of a graphics processor; means for causing a plurality of shader programs of a common shader program type to be loaded into the on-chip shader program instruction memory of the graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; means for loading a first shader program of the common shader program type into the on-chip shader program instruction memory; means for determining one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; means for loading a second shader program of the common shader program type into one of the one or more ranges of available memory space; means for determining whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; means for determining a set of N least frequently used shader programs from a set of one or more shader programs stored within the on-chip shader program instruction memory, where N is an integer greater than or equal to one in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; means for determining a least recently used shader program from the set of N least frequently used shader programs in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; and means for evicting the least recently used shader program from the on-chip shader program instruction memory in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (38)
-
-
39. A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors to:
-
cause a plurality of shader programs of a common shader program type to be loaded into an on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; load a first shader program of the common shader program type into the on-chip shader program instruction memory; determine one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; load a second shader program of the common shader program type into one of the one or more ranges of available memory space; determine whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; and in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; determine a least recently used shader program from a set of one or more shader programs stored within the on-chip shader program instruction memory; and evict the least recently used shader program from the on-chip shader program instruction memory, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (40)
-
-
41. A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors to:
-
cause a plurality of shader programs of a common shader program type to be loaded into an on-chip shader program instruction memory of a graphics processor such that each shader program in the plurality of shader programs resides in the on-chip shader program instruction memory at a common point in time; load a first shader program of the common shader program type into the on-chip shader program instruction memory; determine one or more ranges of available memory space in the on-chip shader program instruction memory after the first shader program has been loaded into the on-chip shader program instruction memory; load a second shader program of the common shader program type into one of the one or more ranges of available memory space; determine whether the on-chip shader program instruction memory has a sufficient amount of available memory space to store a shader program to be loaded into the on-chip shader program instruction memory; and in response to determining that the on-chip shader program instruction memory does not have the sufficient amount of available memory space to store the shader program; determine a set of N least frequently used shader programs from a set of one or more shader programs stored within the on-chip shader program instruction memory, where N is an integer greater than or equal to one; determine a least recently used shader program from the set of N least frequently used shader programs; and evict the least recently used shader program from the on-chip shader program instruction memory, wherein the on-chip shader program instruction memory comprises an instruction cache from which a shader unit fetches instructions during execution of at least one of the plurality of shader programs. - View Dependent Claims (42)
-
Specification