Maniphest T104025

Metal offline shader compilation
Confirmed, Normal

Assigned To
Michael Parkin-White (MichaelPW)
Authored By
Michael Parkin-White (MichaelPW)
Fri, Jan 20, 1:12 PM
Tags
  • EEVEE & Viewport
Subscribers
Alaska (Alaska)
Michael Parkin-White (MichaelPW)

Description

Status: ? Initial stages of development


Description

Support offline Metal shader library compilation for static shaders. Any shader using GPUShaderCreateInfo which has do_static_compilation(true) declared should be statically compiled to avoid the expensive first-run compilation cost. There are a number of challenges however, as generated shader source can differ based on the system configuration, and availability of features.

So far, the key distinguishing changes which can alter compilation are the platform GPU device macros, where certain platform-specific optimizations or workarounds are made, under the Macro's GPU_ATI, GPU_APPLE, GPU_INTEL.

First phase of this is is to investigate viability for offline shader compilation.

Tasks
  • Update CMAKE to support offline Metal shader library compilation
  • Update shader_builder to iterate source configurations per vendor (APPLE, AMD, INTEL) t
  • Testing and enablement

Part of the Metal backend T96261 (https://developer.blender.org/T96261)

Related Objects

Event Timeline

Michael Parkin-White (MichaelPW) changed the task status from Needs Triage to Confirmed.Fri, Jan 20, 1:12 PM
Michael Parkin-White (MichaelPW) created this task.
Michael Parkin-White (MichaelPW) mentioned this in T96261: Metal Viewport .
Alaska (Alaska) added a subscriber: Alaska (Alaska).Fri, Jan 20, 11:01 PM