Overview
There are three key phases in a shader’s lifetime (shown in context below):
flowchart LR
sc[Shader creation time]
pc[Pipeline creation time]
rt[Shader execution time]
style sc fill:#fff5ad
style pc fill:#fff5ad
style rt fill:#fff5ad
sc --> pc --> rt
Each phase finalizes the value for expressions in a certain category, as follows:
Evaluation Phase
Shader creation
- Finalizes values for
const-expressions
- Sub-expressions can be:
- literals,
@const
function calls,- const-declared values
Pipeline creation
- Finalizes values for
override-expressions
- Sub-expressions can be anything in a
const-expression
, plus
Shader execution
- Finalizes values for
runtime-expressions
- Sub-expressions can be anything in a
override-expression
, plus- let-declared values
- any function call,
- variable contents
- reference or pointer to a variable
In Context