Implement color-to-depth for Vulkan, start implementing for D3D11

This commit is contained in:
Henrik Rydgård committed 2022-08-01 11:30:36 +02:00
1 parent 93321f2d5e
commit 90a44579bf
11 files changed
+94 -10

No files matched your search

+8 -1
View File
@@ -250,7 +250,14 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
GenericStencilFuncState stencilState;
ConvertStencilFuncState(stencilState);
if (gstate.isModeClear()) {
if (gstate_c.renderMode == FB_MODE_COLOR_TO_DEPTH) {
// Enforce plain depth writing.
key.depthTestEnable = true;
key.depthWriteEnable = true;
key.stencilTestEnable = false;
key.depthCompareOp = VK_COMPARE_OP_ALWAYS;
key.depthClampEnable = false;
} else if (gstate.isModeClear()) {
key.depthTestEnable = true;
key.depthCompareOp = VK_COMPARE_OP_ALWAYS;
key.depthWriteEnable = gstate.isClearModeDepthMask();