-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wgpu: Cache Program3D bind group layout
The bind group layout only depends on the texture registers (and 2D/cubemap type) accessed by the fragment shader, not on the runtime texture bound with Context3D. This means that we can build and cache it when we compile the AGAL program to a Naga module. Since the bind group layout is used for the overall pipeline, I've refactored the shader caching code into `ShaderPairAgal`, which holds both the vertex and fragment shader bytecode, and compiles both in the `compile` function.
- Loading branch information
Showing
6 changed files
with
310 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.