thin3d: Remove dual sided stencil, not supported by all backends anyway

This commit is contained in:
Henrik Rydgård committed 2022-07-30 10:47:18 +02:00
1 parent 7d4d925a32
commit 4a18629e63
6 files changed
+34 -41

No files matched your search

+14 -20
View File
@@ -329,13 +329,12 @@ void GPUDriverTestScreen::DiscardTest() {
dsDesc.depthWriteEnabled = true;
dsDesc.depthCompare = Comparison::ALWAYS;
dsDesc.stencilEnabled = true;
dsDesc.front.compareMask = 0xFF;
dsDesc.front.compareOp = Comparison::ALWAYS;
dsDesc.front.passOp = StencilOp::REPLACE;
dsDesc.front.failOp = StencilOp::REPLACE; // These two shouldn't matter, because the test that fails is discard, not stencil.
dsDesc.front.depthFailOp = StencilOp::REPLACE;
dsDesc.front.writeMask = 0xFF;
dsDesc.back = dsDesc.front;
dsDesc.stencil.compareMask = 0xFF;
dsDesc.stencil.compareOp = Comparison::ALWAYS;
dsDesc.stencil.passOp = StencilOp::REPLACE;
dsDesc.stencil.failOp = StencilOp::REPLACE; // These two shouldn't matter, because the test that fails is discard, not stencil.
dsDesc.stencil.depthFailOp = StencilOp::REPLACE;
dsDesc.stencil.writeMask = 0xFF;
DepthStencilState *depthStencilWrite = draw->CreateDepthStencilState(dsDesc);
// Write only depth.
@@ -353,33 +352,28 @@ void GPUDriverTestScreen::DiscardTest() {
dsDesc.depthTestEnabled = true;
dsDesc.stencilEnabled = true;
dsDesc.depthCompare = Comparison::ALWAYS;
dsDesc.front.compareOp = Comparison::EQUAL;
dsDesc.front.failOp = StencilOp::KEEP;
dsDesc.front.depthFailOp = StencilOp::KEEP;
dsDesc.front.writeMask = 0x0;
dsDesc.back = dsDesc.front;
dsDesc.stencil.compareOp = Comparison::EQUAL;
dsDesc.stencil.failOp = StencilOp::KEEP;
dsDesc.stencil.depthFailOp = StencilOp::KEEP;
dsDesc.stencil.writeMask = 0x0;
DepthStencilState *stencilEqualDepthAlways = draw->CreateDepthStencilState(dsDesc);
dsDesc.depthTestEnabled = false;
dsDesc.front.compareOp = Comparison::EQUAL;
dsDesc.back = dsDesc.front;
dsDesc.stencil.compareOp = Comparison::EQUAL;
DepthStencilState *stencilEqual = draw->CreateDepthStencilState(dsDesc);
dsDesc.depthTestEnabled = true;
dsDesc.depthCompare = Comparison::ALWAYS;
dsDesc.front.compareOp = Comparison::NOT_EQUAL;
dsDesc.back = dsDesc.front;
dsDesc.stencil.compareOp = Comparison::NOT_EQUAL;
DepthStencilState *stenciNotEqualDepthAlways = draw->CreateDepthStencilState(dsDesc);
dsDesc.depthTestEnabled = false;
dsDesc.front.compareOp = Comparison::NOT_EQUAL;
dsDesc.back = dsDesc.front;
dsDesc.stencil.compareOp = Comparison::NOT_EQUAL;
DepthStencilState *stencilNotEqual = draw->CreateDepthStencilState(dsDesc);
dsDesc.stencilEnabled = true;
dsDesc.depthTestEnabled = true;
dsDesc.front.compareOp = Comparison::ALWAYS;
dsDesc.back = dsDesc.front;
dsDesc.stencil.compareOp = Comparison::ALWAYS;
dsDesc.depthCompare = Comparison::LESS_EQUAL;
DepthStencilState *stencilAlwaysDepthTestLessEqual = draw->CreateDepthStencilState(dsDesc);
dsDesc.depthCompare = Comparison::GREATER;