diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-02-13 16:05:51 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-13 16:05:51 +1300 |
| commit | f37113204fe8e930c4e33e5e0149fbe0309fe425 (patch) | |
| tree | 9974c89131a5e1092f6551034926d9de0c32413e /Source/Core/VideoBackends/Vulkan/StateTracker.cpp | |
| parent | 2c24d07837b9ab94219de592adf34a35a2dc897e (diff) | |
| parent | af313f84198d2eb52690b406164eebcb1866d251 (diff) | |
Merge pull request #11550 from iwubcode/set_common_samplers_count
VideoCommon: add constant value for maximum number of pixel samplers
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/StateTracker.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/StateTracker.cpp | 7 |
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, |
