Skip to content

Precompiled Shaders Tracking Issue #9052

@inner-daemons

Description

@inner-daemons

Precompiled Shaders Tracking Issue

This is a tracking issue for all things precompiled shaders, as well as making naga an optional dependency.

Current open PRs

Motivation

Precompiled shaders will greatly reduce the startup time for apps, something which linebender/vello for example has expressed interest in. Removing naga as a dependency will also reduce binary size significantly, which is useful for web or mobile applications.

Wgpu already has passthrough shaders, which technically allow using precompiled shaders already, but these have some downsides:

  • Naga is still part of the binary, even though its unused
  • Wgpu's compilation logic is hidden and must be reimplemented
  • No validation can be dond. This means that users may compile shaders that require features not available on all hardware, and wgpu won't be able to catch this.

Prior work

The previous issue for this was #3103. There was lots of discussion there.

I've also been chipping away quietly at parts of this for a while now. Relevant PRs:

Todo list

Below are some tasks, generally in order, that must happen for precompiled shaders to be considered "complete" in my opinion.

Here are some other tasks that should also happen at some point

Metadata

Metadata

Assignees

Labels

area: apiIssues related to API surfacenagaShader Translatortype: trackingNot a bug or an enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions