Skip to content

Commit

Permalink
Link to the shader pipeline from the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored and dnfield committed Apr 27, 2022
1 parent 6d520d2 commit a449707
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions impeller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ An overview of the major sub-frameworks, their responsibilities, and, relative s
* The binary blob containing the compiled and optimized high-level shading language is included as a hex dump (see `xxd.py`) into a C source file with a generated GN target. Executable targets that want to include the compiled code in their binaries just need to depend on the generated GN target. This eases any shader packaging concerns.
* In parallel, the SPIRV is processed by a reflector. This produces C++ translation units that allow for the easy creation of pipeline state objects at runtime. The headers for these translation units include any structs (with appropriate padding and alignment) such that uniform data as well as vertex information can be specified to the shader without having to deal with bindings, vertex descriptors, etc.. This also makes iterating on shaders easier as changes to the shader interface lead to compile time errors.
* The C++ translation units generated from reflected shader information are made available to callers as a generated GN target that callers may use if necessary. It is possible for callers to perform reflection at runtime but there are no Impeller components that do this currently.

![Shader Compilation Pipeline](docs/shader_pipeline.png)

0 comments on commit a449707

Please sign in to comment.