ogre
ogre copied to clipboard
Replace StateCaches by explicit PSO
Pipeline state
- [ ] Dynamic state
- [ ] Shaders
- [x] Blend State
- [ ] Pipeline layout
- [ ] Rasterizer state
- [ ] Vertex input
- [ ] Depth/stencil state
- [ ] Input assembly
- [ ] Render pass
references
- https://www.khronos.org/assets/uploads/developers/library/2016-vulkan-devday-uk/10-Porting-to-Vulkan.pdf
- https://software.intel.com/en-us/blogs/2014/07/23/direct3d-12-overview-part-2-pipeline-state-object
- https://docs.microsoft.com/en-us/windows/desktop/direct3d12/managing-graphics-pipeline-state-in-direct3d-12
PSOs still need caching: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreatePipelineCache.html
also they are required for Metal (citing Matias):
D3D11 & GL drivers implement this for you internally, and usually they offload the cache to a secondary thread to hide the latency. They implement the caches inside DrawPrimitive calls. So Ogre that means the right place to place the PSO cache is in MetalRenderSystem::_render(const RenderOperation& op)
maybe resurrect this for D3D11: https://bitbucket.org/sinbad/ogre/pull-requests/701/direct3d11-caching-of-render-state-objects/diff