IP Library Granted Patent US 12,079,917
Granted Patent B2
US 12,079,917 · App. 18/213,609 · Granted Sep 3, 2024

Rendering optimisation by recompiling shader instructions

Inventor: James Glanville (Hemel Hempstead, GB)
Assignee: Imagination Technologies Limited
G06T15/005G06F8/41G06F9/30101G06T1/60G06T15/80G09G5/363
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,079,917
App. No.
18/213,609
Granted
Sep 3, 2024
Kind
B2
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.

Claims (23)

1. A method of rendering a scene in a graphics system, the method comprising:

analysing a shader used by a draw call within a current render to determine whether the shader samples from a buffer at coordinates matching a current fragment location; and

in response to determining that the shader used by the draw call does sample from the buffer at coordinates matching a current fragment location, recompiling the shader to replace an instruction that reads data from the buffer at coordinates matching a current fragment location with an instruction that reads from the buffer at coordinates stored in registers.

2. The method according to claim 1 , wherein recompiling the shader further comprises:

removing any instructions that calculate the coordinates matching a current fragment location.

3. The method according to claim 2 , further comprising recompiling one or more other shaders used by the draw call to omit any instructions that calculate or output parameters used only by instructions that have been removed in the recompilation of the shader.

4. The method according to claim 1 , wherein analysing a shader used by the draw call within the current render to determine whether the shader samples from the buffer at coordinates matching a current fragment location comprises:

analysing a shader used by the draw call within the current render to determine whether the shader samples from the buffer using screen space coordinates that correspond to the current fragment location.

5. The method according to claim 1 , wherein analysing a shader used by the draw call within the current render to determine whether the shader samples from the buffer at coordinates matching a current fragment location comprises:

inspecting code in the shader to determine whether one of a predefined set of patterns is present within the code.

6. The method according to claim 1 , wherein analysing a shader used by the draw call within the current render to determine whether the shader samples from the buffer at coordinates matching a current fragment location comprises:

inspecting code in the shader to determine whether a sample position used to sample from the identified buffers is calculated in the shader using a screen-space transformation.

7. The method according to claim 1 , wherein the draw call within the current render is an initial draw call in the current render.

8. A non-transitory computer readable storage medium having stored thereon computer readable code configured to cause the method of claim 1 to be performed when the code is executed.

9. 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:

analyse a shader used by a draw call within a current render to determine whether the shader samples from a buffer at coordinates matching a current fragment location; and

in response to determining that the shader used by the draw call does sample from the buffer at coordinates matching a current fragment location, trigger recompilation of the shader by the compiler to replace an instruction that reads data from the buffer at coordinates matching a current fragment location with an instruction that reads from the buffer at coordinates stored in registers.

10. The graphics system according to claim 9 , wherein the compiler is configured, in response to receiving a trigger signal from the driver, to:

recompile the shader to replace an instruction that reads data from the buffer at coordinates matching a current fragment location with an instruction that reads from the buffer at coordinates stored in registers.

11. The graphics system according to claim 10 , wherein the compiler is further configured, in response to receiving a trigger signal from the driver, to:

recompile the shader to remove any instructions that calculate the coordinates matching a current fragment location.

12. The graphics system according to claim 11 , wherein the compiler is further configured, in response to receiving a trigger signal from the driver, to:

recompile the shader to omit any instructions that calculate or output parameters used only by instructions that have been removed in the recompilation of the shader.

Assignments (1)
SECURITY INTEREST Recorded Jul 31, 2024
From: IMAGINATION TECHNOLOGIES LIMITED
To: FORTRESS INVESTMENT GROUP (UK) LTD
Reel/Frame 068221/0001 →