Commit Graph

7 Commits

Author SHA1 Message Date
Austin Eng 58c76b3fe4 Simplify PersistentPipelineState and application of stencil states. Fix
stencil mask usage. D3D12 does not support separate front/back masks.
All APIs support separate read/write masks.
2017-06-02 12:13:39 -07:00
Austin Eng 5a67d196be add buffer creation utility function 2017-06-02 12:13:39 -07:00
Austin Eng 1063439d5d 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
2017-06-02 12:13:39 -07:00
Austin Eng 376f1c6a8e fix formatting 2017-06-02 12:13:39 -07:00
Austin Eng 084346bd5f Fix OpenGL stencil clear hack. Improve example stencil reflection 2017-06-02 12:13:39 -07:00
Austin Eng 4f5521e440 Remove StencilReferenceMode. Add SetStencilReference.
This moves the application of the stencil reference from the
DepthStencilState to Command::SetStencilReference
2017-06-02 12:13:39 -07:00
Austin Eng 3efcf2172d Add DepthStencilState
Add depth and stencil tests. This is currently only implemented for the
OpenGL API. HelloDepthStencil is a test using the depth and stencil
buffers to do reflections. Currently clearing / stencil clearing is not
working properly.
2017-06-02 12:13:39 -07:00