mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-28 08:43:38 +01:00
Reorganize raster state mapping
This commit is contained in:
1 parent
cffb1d7014
commit
73d762f506
4 files changed
+53
-39
No files matched your search
@@ -221,10 +221,18 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
|
||||
}
|
||||
|
||||
{
|
||||
// Set Stencil/Depth
|
||||
if (gstate.isModeClear()) {
|
||||
key.cullMode = VK_CULL_MODE_NONE;
|
||||
} else {
|
||||
// Set cull
|
||||
bool wantCull = !gstate.isModeThrough() && prim != GE_PRIM_RECTANGLES && gstate.isCullEnabled();
|
||||
key.cullMode = wantCull ? (gstate.getCullMode() ? VK_CULL_MODE_FRONT_BIT : VK_CULL_MODE_BACK_BIT) : VK_CULL_MODE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Set Stencil/Depth
|
||||
if (gstate.isModeClear()) {
|
||||
key.depthTestEnable = true;
|
||||
key.depthCompareOp = VK_COMPARE_OP_ALWAYS;
|
||||
key.depthWriteEnable = gstate.isClearModeDepthMask();
|
||||
@@ -261,10 +269,6 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
|
||||
}
|
||||
}
|
||||
|
||||
// Set cull
|
||||
bool wantCull = !gstate.isModeThrough() && prim != GE_PRIM_RECTANGLES && gstate.isCullEnabled();
|
||||
key.cullMode = wantCull ? (gstate.getCullMode() ? VK_CULL_MODE_FRONT_BIT : VK_CULL_MODE_BACK_BIT) : VK_CULL_MODE_NONE;
|
||||
|
||||
// Depth Test
|
||||
if (gstate.isDepthTestEnabled()) {
|
||||
key.depthTestEnable = true;
|
||||
@@ -333,5 +337,6 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
|
||||
gstate_c.Dirty(DIRTY_DEPTHRANGE);
|
||||
}
|
||||
}
|
||||
|
||||
key.topology = primToVulkan[prim];
|
||||
}
|
||||
Reference in new issue
Block a user