summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-11-13 15:24:55 +1000
committerStenzek <stenzek@gmail.com>2016-12-04 20:10:13 +1000
commit4bc0e14995343de05666e33fcd973a7d082403c2 (patch)
tree7e4d4f9aa5eaf6b72b342d864d63ab40da3e4d9b /Source/Core/VideoBackends/Vulkan/StateTracker.cpp
parentcd3481fbc7c82e8a1a44bff7239928a8faabbb42 (diff)
Vulkan: Use an enumeration to index pipeline layouts
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/StateTracker.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/StateTracker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
index ae45ce857f..ef2343564d 100644
--- a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
+++ b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
@@ -75,7 +75,7 @@ bool StateTracker::Initialize()
m_pipeline_state.rasterization_state.depth_clamp = VK_TRUE;
// BBox is disabled by default.
- m_pipeline_state.pipeline_layout = g_object_cache->GetStandardPipelineLayout();
+ m_pipeline_state.pipeline_layout = g_object_cache->GetPipelineLayout(PIPELINE_LAYOUT_STANDARD);
m_num_active_descriptor_sets = NUM_GX_DRAW_DESCRIPTOR_SETS;
m_bbox_enabled = false;
@@ -164,8 +164,8 @@ bool StateTracker::PrecachePipelineUID(const SerializedPipelineUID& uid)
// vertex loader that uses this format, since we need it to create a pipeline.
pinfo.vertex_format = VertexFormat::GetOrCreateMatchingFormat(uid.vertex_decl);
pinfo.pipeline_layout = uid.ps_uid.GetUidData()->bounding_box ?
- g_object_cache->GetBBoxPipelineLayout() :
- g_object_cache->GetStandardPipelineLayout();
+ g_object_cache->GetPipelineLayout(PIPELINE_LAYOUT_BBOX) :
+ g_object_cache->GetPipelineLayout(PIPELINE_LAYOUT_STANDARD);
pinfo.vs = g_object_cache->GetVertexShaderForUid(uid.vs_uid);
if (pinfo.vs == VK_NULL_HANDLE)
{
@@ -544,7 +544,7 @@ void StateTracker::SetBBoxEnable(bool enable)
// Change the number of active descriptor sets, as well as the pipeline layout
if (enable)
{
- m_pipeline_state.pipeline_layout = g_object_cache->GetBBoxPipelineLayout();
+ m_pipeline_state.pipeline_layout = g_object_cache->GetPipelineLayout(PIPELINE_LAYOUT_BBOX);
m_num_active_descriptor_sets = NUM_GX_DRAW_WITH_BBOX_DESCRIPTOR_SETS;
// The bbox buffer never changes, so we defer descriptor updates until it is enabled.
@@ -553,7 +553,7 @@ void StateTracker::SetBBoxEnable(bool enable)
}
else
{
- m_pipeline_state.pipeline_layout = g_object_cache->GetStandardPipelineLayout();
+ m_pipeline_state.pipeline_layout = g_object_cache->GetPipelineLayout(PIPELINE_LAYOUT_STANDARD);
m_num_active_descriptor_sets = NUM_GX_DRAW_DESCRIPTOR_SETS;
}