Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.
This repository was archived by the owner on May 13, 2026. It is now read-only.

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

Description

@ktaeleman

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?


🐞 Issue is synchronized with Bugzilla Bug 1624042

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions