Dynamic states
While pipeline state objects (PSOs) include immutable states, such as shader programs and vertex input bindings, some properties of a pipeline state can be changed dynamically at draw time using dynamic state objects. This feature provides greater flexibility and can minimize the necessity to recreate pipelines. Dynamic state objects can be used to change properties such as viewport and scissor rectangles, line width, blend constants, and stencil reference values. However, not all properties of a pipeline can be changed dynamically, and the use of dynamic states can have a small performance overhead.
Without using dynamic states, the application has a few alternatives available:
- Create pipelines during the application startup. If you are aware of which pipelines will be required, they can be created beforehand at the expense of a higher startup cost.
- Utilize pipeline caches. The graphics driver features a built-in mechanism for pipeline caching that can...