Refactor DepthStencilState. TODO: add validation tests

- defaults to depth and stencil tests off
- whether or not depth and stencil tests are enabled is inferred from the comparison functions and stencil operations
- only one stencil reference. D3D12 does not support separate references
- change SetDepthWriteMode to SetDepthWriteEnabled and use a bool instead of enum
- Create PersistentPipelineState class for OpenGL backend with simple state tracking
- Add validation so DepthStencilState properties are only set once
- Update API usage in HelloDepthStencil
- refactor tracking of the DepthStencilState in the Metal backend
- validate that compute pipeline does not have a depth stencil state
This commit is contained in:
Austin Eng
2017-06-01 11:30:03 -04:00
committed by Corentin Wallez
parent f51be34864
commit 1063439d5d
20 changed files with 451 additions and 257 deletions

View File

@@ -14,6 +14,7 @@
#include "OpenGLBackend.h"
#include "CommandBufferGL.h"
#include "PersistentPipelineStateGL.h"
#include "PipelineGL.h"
#include "PipelineLayoutGL.h"
#include "SamplerGL.h"