Rendering optimisation by recompiling shader instructions
AssigneeImagination Technologies Limited
InventorJames Glanville
Life of this patent
Estimating the term…
Abstract
A rendering optimisation identifies a draw call within a current render (which may be the first draw call in the render or a subsequent draw call in the render) and analyses a last shader in the series of shaders used by the draw call to determine whether the last shader samples from the one or more buffers at coordinates matching a current fragment location. If this determination is positive, the method further recompiles the last shader to replace an instruction that reads data from one of the one or more buffers at coordinates matching a current fragment location with an instruction that reads from the one or more buffers at coordinates stored in on-chip registers.
Claims12
A method of rendering a scene in a graphics system, the method comprising:
- identifying a draw call within a current render, wherein the current render samples from one or more buffers;
- analysing a shader used by the draw call to determine whether the shader samples from the one or more buffers at coordinates matching a current fragment location;
- and
- in response to determining that the shader used by the draw call does sample from the one or more buffers at coordinates matching a current fragment location, recompiling the shader to replace an instruction that reads data from one of the one or more buffers at coordinates matching a current fragment location with an instruction that reads from the one or more buffers at coordinates stored in registers.
A graphics system comprising a general purpose processor and a graphics processor, wherein the general purpose processor comprises a driver and a compiler, wherein the driver is configured to:
- identify a draw call within a current render, wherein the current render samples from one or more buffers;
- analyse a shader used by the draw call to determine whether the shader samples from the one or more buffers at coordinates matching a current fragment location;
- and
- in response to determining that the shader used by the draw call does sample from the one or more buffers at coordinates matching a current fragment location, trigger recompilation of the shader by the compiler to replace an instruction that reads data from one of the one or more buffers at coordinates matching a current fragment location with an instruction that reads from the one or more buffers at coordinates stored in registers.
Dependencies are inferred from the claim text.