summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-04-30 15:54:45 +1000
committerStenzek <stenzek@gmail.com>2017-09-11 19:40:26 +1000
commit2869c570f1d0b67d2ee4304ea528bef3ef4b563e (patch)
tree2f10d4f34da42a5e9f81706f853451bd8a59a701 /Source/Core/VideoBackends/Vulkan/StateTracker.cpp
parent4d36f0cc87d2cc2bc40ec1c36a65623dc3822f01 (diff)
Renderer: Move depth state to VideoCommon and seperate from bpmem
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/StateTracker.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/StateTracker.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
index ae583374e8..5e09f6838e 100644
--- a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
+++ b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
@@ -58,9 +58,9 @@ bool StateTracker::Initialize()
m_pipeline_state.rasterization_state.cull_mode = VK_CULL_MODE_NONE;
m_pipeline_state.rasterization_state.per_sample_shading = VK_FALSE;
m_pipeline_state.rasterization_state.depth_clamp = VK_FALSE;
- m_pipeline_state.depth_stencil_state.test_enable = VK_TRUE;
- m_pipeline_state.depth_stencil_state.write_enable = VK_TRUE;
- m_pipeline_state.depth_stencil_state.compare_op = VK_COMPARE_OP_LESS;
+ m_pipeline_state.depth_state.testenable = true;
+ m_pipeline_state.depth_state.updateenable = true;
+ m_pipeline_state.depth_state.func = ZMode::ALWAYS;
m_pipeline_state.blend_state.hex = 0;
m_pipeline_state.blend_state.blendenable = false;
m_pipeline_state.blend_state.srcfactor = BlendMode::ONE;
@@ -167,7 +167,7 @@ void StateTracker::AppendToPipelineUIDCache(const PipelineInfo& info)
SerializedPipelineUID sinfo;
sinfo.blend_state_bits = info.blend_state.hex;
sinfo.rasterizer_state_bits = info.rasterization_state.bits;
- sinfo.depth_stencil_state_bits = info.depth_stencil_state.bits;
+ sinfo.depth_state_bits = info.depth_state.hex;
sinfo.vertex_decl = m_pipeline_state.vertex_format->GetVertexDeclaration();
sinfo.vs_uid = m_vs_uid;
sinfo.gs_uid = m_gs_uid;
@@ -212,7 +212,7 @@ bool StateTracker::PrecachePipelineUID(const SerializedPipelineUID& uid)
}
pinfo.render_pass = m_load_render_pass;
pinfo.rasterization_state.bits = uid.rasterizer_state_bits;
- pinfo.depth_stencil_state.bits = uid.depth_stencil_state_bits;
+ pinfo.depth_state.hex = uid.depth_state_bits;
pinfo.blend_state.hex = uid.blend_state_bits;
pinfo.primitive_topology = uid.primitive_topology;
@@ -316,12 +316,12 @@ void StateTracker::SetRasterizationState(const RasterizationState& state)
m_dirty_flags |= DIRTY_FLAG_PIPELINE;
}
-void StateTracker::SetDepthStencilState(const DepthStencilState& state)
+void StateTracker::SetDepthState(const DepthState& state)
{
- if (m_pipeline_state.depth_stencil_state.bits == state.bits)
+ if (m_pipeline_state.depth_state.hex == state.hex)
return;
- m_pipeline_state.depth_stencil_state.bits = state.bits;
+ m_pipeline_state.depth_state.hex = state.hex;
m_dirty_flags |= DIRTY_FLAG_PIPELINE;
}