Graphics processing systems for determining blending operations
AssigneeArm Limited
InventorSean Tristram LeGuay Ellis
Life of this patent
Estimating the term…
Abstract
A sequence of instructions is included in a graphics processing shader program for controlling the way in which blending is implemented. The sequence of instructions includes a blend instruction which determines whether blending for a processing item is to be performed by fixed-function blending hardware or by executing a blend shader routine. If blend shading is to be performed, a sequence of instructions for setting up and performing blend shading is executed. If fixed-function blending is to be performed, an execution thread initiates fixed-function blending in response to the blend instruction, and skips over the sequence of instructions for setting up and performing blend shading.
Claims18
A method of operating a graphics processing system that comprises a graphics processor comprising a programmable execution unit operable to execute programs to perform processing operations, and in which, following operations to generate output data for processing items, blending may be performed for the processing items, wherein blending may be performed either using fixed-function blending hardware of the graphics processor or by the programmable execution unit executing a set of program instructions to implement the blending, the method comprising:
- including in a program to be executed by the programmable execution unit of the graphics processor a sequence of blending instructions which, when executed, will cause a blending operation to be performed for a processing item, and a set of one or more further instructions, the sequence of blending instructions including:
- a set of one or more blend operation determining instructions that, when executed, cause a determination of whether a blending operation is to be performed by fixed-function blending hardware or by the programmable execution unit executing a set of program instructions to implement the blending operation and trigger a performance of the blending operation either by fixed-function blending hardware or by the programmable execution unit executing a set of program instructions to implement the blending operation based on the determination;
- and a set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation;
- wherein the set of one or more blend operation determining instructions comprises a skip operation that, when executed by the programmable execution unit when it is determined that the blending operation is to be performed using the fixed-function blending hardware and the fixed-function blending hardware is caused to perform the blending operation, causes the programmable execution unit to skip over the set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation, and to perform a jump to a remainder of the program to then execute the set of one or more further instructions;
- the method further comprising, when an execution thread of the programmable execution unit is executing the program:
- determining, in response to the set of one or more blend operation determining instructions, whether the blending operation is to be performed using the fixed-function blending hardware or by the programmable execution unit executing a set of program instructions;
- and, when it is determined that the blending operation is to be performed using the fixed-function blending hardware, causing the fixed-function blending hardware of the graphics processor to perform the blending operation for the processing item and the execution thread then skipping over the set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation, to perform a jump to a remainder of the program to then execute the set of one or more further instructions;
- and, when it is determined that the blending operation is to be performed by the programmable execution unit, the execution thread executing the set of one or more instructions to cause the programmable execution unit to perform the blending operation and then executing the set of one or more further instructions.
A graphics processing system, the system comprising:
- a graphics processor, the graphics processor comprising:
- a programmable execution unit operable to execute programs to perform processing operations;
- and fixed-function blending hardware operable to perform blending for processing items following operations to generate output data for the processing items;
- the graphics processing system further comprising processing circuitry operable to include in a program to be executed by the programmable execution unit a sequence of blending instructions which, when executed, will cause a blending operation to be performed for a processing item, and a set of one or more further instructions, the sequence of blending instructions including:
- a set of one or more blend operation determining instructions that, when executed, cause a determination of whether a blending operation is to be performed by the fixed-function blending hardware of the graphics processor or by the programmable execution unit executing a set of program instructions to implement the blending operation and trigger a performance of the blending operation either by the fixed-function blending hardware of the graphics processor or by the programmable execution unit executing a set of program instructions to implement the blending operation based on the determination;
- and a set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation;
- wherein the set of one or more blend operation determining instructions comprises a skip operation that, when executed by the programmable execution unit when it is determined that the blending operation is to be performed using the fixed-function blending hardware and the fixed-function blending hardware is caused to perform the blending operation, causes the programmable execution unit to skip over the set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation, and to perform a jump to a remainder of the program to then execute the set of one or more further instructions;
- and
- wherein the programmable execution unit of the graphics processor is configured to, in response to the sequence of blending instructions in a program being executed by an execution thread of the programmable execution unit:
- determine, in response to the set of one or more blend operation determining instructions, whether the blending operation is to be performed using the fixed-function blending hardware of the graphics processor or by the programmable execution unit executing a set of program instructions;
- and, when it is determined that the blending operation is to be performed using the fixed-function blending hardware, cause the fixed-function blending hardware of the graphics processor to perform the blending operation for the processing item and the execution thread to then skip over the set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation, to perform a jump to a remainder of the program to then execute the set of one or more further instructions;
- and, when it is determined that the blending operation is to be performed by the programmable execution unit, cause the execution thread to execute the set of one or more instructions to cause the programmable execution unit to perform the blending operation and then executing the set of one or more further instructions.
A non-transitory computer readable storage medium storing computer software code which when executed on a data processor performs a method of compiling a program to be executed by a programmable execution unit of a graphics processor, the method comprising:
- including in a program to be executed by the programmable execution unit of the graphics processor a sequence of blending instructions which, when executed, will cause a blending operation to be performed for a processing item, and a set of one or more further instructions, the sequence of blending instructions including:
- a set of one or more blend operation determining instructions that, when executed, cause a determination of whether a blending operation is to be performed by fixed-function blending hardware of the graphics processor or by the programmable execution unit executing a set of program instructions to implement the blending operation and trigger a performance of the blending operation either by the fixed-function blending hardware or by the programmable execution unit executing a set of program instructions to implement the blending operation based on the determination;
- and a set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation;
- wherein the set of one or more blend operation determining instructions comprises a skip operation that, when executed by the programmable execution unit when it is determined that the blending operation is to be performed using the fixed-function blending hardware and the fixed-function blending hardware is caused to perform the blending operation, causes the programmable execution unit to skip over the set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation, and to perform a jump to a remainder of the program to then execute the set of one or more further instructions;
- and
- wherein, in response to the sequence of instructions being executed by an execution thread of the programmable execution unit, the programmable execution unit will:
- determine, in response to the set of one or more blend operation determining instructions, whether the blending operation is to be performed using the fixed-function blending hardware of the graphics processor or by the programmable execution unit executing a set of program instructions;
- and, when it is determined that the blending operation is to be performed using the fixed-function blending hardware, cause the fixed-function blending hardware of the graphics processor to perform the blending operation for the processing item and then cause the execution thread to skip over the set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation, to perform a jump to a remainder of the program to then execute the set of one or more further instructions;
- and, when it is determined that the blending operation is to be performed by the programmable execution unit, cause the execution thread to execute the set of one or more instructions to cause the programmable execution unit to perform the blending operation and then executing the set of one or more further instructions.
A graphics processor comprising:
- a programmable execution unit operable to execute programs to perform processing operations;
- and fixed-function blending hardware operable to perform blending for processing items following operations to generate output data for the processing items;
- the programmable execution unit being operable to, in response to a sequence of blending instructions in a program being executed by an execution thread of the programmable execution unit:
- determine, in response to a set of one or more blend operation determining instructions in the sequence of blending instructions, whether a blending operation is to be performed using the fixed-function blending hardware of the graphics processor or by the programmable execution unit executing a set of program instructions, wherein the set of one or more blend operation determining instructions comprises a skip operation that, when executed by the programmable execution unit when it is determined that the blending operation is to be performed using the fixed-function blending hardware and the fixed-function blending hardware is caused to perform the blending operation, causes the programmable execution unit to skip over the set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation, and to perform a jump to a remainder of the program to then execute the set of one or more further instructions;
- and, when it is determined that the blending operation is to be performed using the fixed-function blending hardware, cause the fixed-function blending hardware of the graphics processor to perform the blending operation for the processing item and the execution thread to then skip over a set of one or more instructions that, when executed, cause the programmable execution unit to perform a blending operation, to perform a jump to a remainder of the program to then execute a set of one or more further instructions in the program being executed;
- and, when it is determined that the blending operation is to be performed by the programmable execution unit, cause the execution thread to execute a set of one or more instructions to cause the programmable execution unit to perform the blending operation in the sequence of blending instructions and then executing the set of one or more further instructions in the program being executed.
Dependencies are inferred from the claim text.