summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2023-02-10 00:28:06 -0600
committeriwubcode <iwubcode@users.noreply.github.com>2023-02-10 00:46:11 -0600
commitaf313f84198d2eb52690b406164eebcb1866d251 (patch)
tree416ef17d361fa48b7f2c9ce35b23448186f2a357 /Source/Core/VideoBackends/Vulkan/StateTracker.cpp
parenta88e5ef3907e79ed20ab67e4df45c36e6ab2b909 (diff)
VideoCommon: add constant value to set the allowed maximum number of pixel samplers
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/StateTracker.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/StateTracker.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
index 8cee69cfa9..edf57ae3b1 100644
--- a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
+++ b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
@@ -13,6 +13,7 @@
#include "VideoBackends/Vulkan/VKTexture.h"
#include "VideoBackends/Vulkan/VKVertexFormat.h"
#include "VideoBackends/Vulkan/VulkanContext.h"
+#include "VideoCommon/Constants.h"
namespace Vulkan
{
@@ -65,7 +66,7 @@ bool StateTracker::Initialize()
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
// Initialize all samplers to point by default
- for (size_t i = 0; i < NUM_PIXEL_SHADER_SAMPLERS; i++)
+ for (size_t i = 0; i < VideoCommon::MAX_PIXEL_SHADER_SAMPLERS; i++)
{
m_bindings.samplers[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
m_bindings.samplers[i].imageView = m_dummy_texture->GetView();
@@ -498,7 +499,7 @@ void StateTracker::UpdateGXDescriptorSet()
m_gx_descriptor_sets[1],
0,
0,
- static_cast<u32>(NUM_PIXEL_SHADER_SAMPLERS),
+ static_cast<u32>(VideoCommon::MAX_PIXEL_SHADER_SAMPLERS),
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
m_bindings.samplers.data(),
nullptr,
@@ -602,7 +603,7 @@ void StateTracker::UpdateUtilityDescriptorSet()
m_utility_descriptor_sets[1],
0,
0,
- NUM_PIXEL_SHADER_SAMPLERS,
+ NUM_UTILITY_PIXEL_SAMPLERS,
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
m_bindings.samplers.data(),
nullptr,