Open Bug 1624042 Opened 4 years ago Updated 2 months ago

Add a way to warm-up shaders that includes offscreen draw calls

Categories

(Core :: Graphics: WebRender, enhancement, P3)

All
macOS
enhancement

Tracking

()

Tracking Status
firefox76 --- affected

People

(Reporter: mstange, Unassigned)

References

(Blocks 3 open bugs)

Details

(Whiteboard: wr-planning)

Attachments

(1 file)

On macOS, shader compilation happens in two steps:

  1. During glLinkProgram, a GPU-independent compilation is performed in ShCompile by libGLProgrammability.dylib: https://perfht.ml/35xW0gT
  2. During draw calls such as glDrawElementsInstanced, the GPU-specific part of compilation is performed by the driver. For example by USC::IM_Shader::Compile in AppleIntelSKLGraphicsGLDriver: https://perfht.ml/2WvtVoB

If the OpenGL context is moved to a different GPU, compilation 2 happens again with the other driver, once a given shader is used for the first time on the new GPU.

For shader warm-up, e.g. the one needed in bug 1624030, we should engage the entire compilation pipeline. That means we have to execute some draw calls that use the given shaders. Maybe we can draw to a 1x1 offscreen FBO?

Blocks: 1624051
Priority: -- → P3
Assignee: nobody → dlu
Whiteboard: wr-planning

The bug assignee didn't login in Bugzilla in the last 7 months.
:bhood, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: dlu → nobody
Flags: needinfo?(bhood)
Flags: needinfo?(bhood)
Severity: normal → S3
Blocks: wr-todos
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: