summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-10-15 00:21:56 +0200
committerGitHub <noreply@github.com>2023-10-15 00:21:56 +0200
commit2677fd9a8e8d7118521838e3ecad4737ef11a6c3 (patch)
treeb528dc12648b6ff9679811d758635a3a5359eaca /Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
parent5195446ddbf1f2f8ec7407e315e1ed17ce7a2ce7 (diff)
parent713454b7d7143ef4d89e66476748b5b02dd03e8c (diff)
Merge pull request #12185 from iwubcode/custom_shader_uniform_backend_support
VideoBackends / VideoCommon: add support for custom shader uniforms to D3D, Vulkan, OGL
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/ObjectCache.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/ObjectCache.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
index d899191614..3a226b7177 100644
--- a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
+++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
@@ -110,11 +110,13 @@ bool ObjectCache::CreateDescriptorSetLayouts()
{
// The geometry shader buffer must be last in this binding set, as we don't include it
// if geometry shaders are not supported by the device. See the decrement below.
- static const std::array<VkDescriptorSetLayoutBinding, 3> standard_ubo_bindings{{
+ static const std::array<VkDescriptorSetLayoutBinding, 4> standard_ubo_bindings{{
{UBO_DESCRIPTOR_SET_BINDING_PS, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1,
VK_SHADER_STAGE_FRAGMENT_BIT},
{UBO_DESCRIPTOR_SET_BINDING_VS, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1,
VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT},
+ {UBO_DESCRIPTOR_SET_BINDING_PS_CUST, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1,
+ VK_SHADER_STAGE_FRAGMENT_BIT},
{UBO_DESCRIPTOR_SET_BINDING_GS, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1,
VK_SHADER_STAGE_GEOMETRY_BIT},
}};
@@ -170,7 +172,7 @@ bool ObjectCache::CreateDescriptorSetLayouts()
{18, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1, VK_SHADER_STAGE_COMPUTE_BIT},
}};
- std::array<VkDescriptorSetLayoutBinding, 3> ubo_bindings = standard_ubo_bindings;
+ std::array<VkDescriptorSetLayoutBinding, 4> ubo_bindings = standard_ubo_bindings;
std::array<VkDescriptorSetLayoutCreateInfo, NUM_DESCRIPTOR_SET_LAYOUTS> create_infos{{
{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0,