Commit 818afcb
committed
Metal: Compile
This changes the default shader loading strategy, implemented in the
Metal driver, to compile the `MTLLibrary` on demand when the pipeline
is created, which reduces cold startup time on IPHONE target OSs.
Normally, the `MTLLibrary` is compiled from Metal source asynchronously
when Godot calls
`RenderingDeviceDriverMetal::shader_create_from_bytecode`; however, this
changes this behaviour on mobile platforms to do it on demand when the
pipeline is created, as noted in godotengine#96052, Godot will ask to create
many more shaders from bytecode than are initially required. Mobile
OSs like iOS are limited to compiling to shader libraries concurrently,
which results in a significant bottleneck.
This is not the default for macOS, as it can concurrently compile many
shaders at once, resulting in faster startup times for the Godot editor.MTLLibrary on demand when pipeline is created1 parent 394508d commit 818afcb
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4082 | 4082 | | |
4083 | 4083 | | |
4084 | 4084 | | |
| 4085 | + | |
4085 | 4086 | | |
4086 | 4087 | | |
4087 | 4088 | | |
| 4089 | + | |
| 4090 | + | |
| 4091 | + | |
| 4092 | + | |
4088 | 4093 | | |
4089 | 4094 | | |
4090 | 4095 | | |
| |||
0 commit comments