summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGPUCode <47210458+GPUCode@users.noreply.github.com>2023-09-10 02:19:45 +0200
committerGitHub <noreply@github.com>2023-09-10 02:19:45 +0200
commit24ab10c2f601afb9c241f6320c5c8bac6a3d3b22 (patch)
tree8ecf584b58da6de85e8cdd774208f5c18d553138
parentMerge pull request #11464 from german77/mama_mii (diff)
downloadyuzu-24ab10c2f601afb9c241f6320c5c8bac6a3d3b22.tar
yuzu-24ab10c2f601afb9c241f6320c5c8bac6a3d3b22.tar.gz
yuzu-24ab10c2f601afb9c241f6320c5c8bac6a3d3b22.tar.bz2
yuzu-24ab10c2f601afb9c241f6320c5c8bac6a3d3b22.tar.lz
yuzu-24ab10c2f601afb9c241f6320c5c8bac6a3d3b22.tar.xz
yuzu-24ab10c2f601afb9c241f6320c5c8bac6a3d3b22.tar.zst
yuzu-24ab10c2f601afb9c241f6320c5c8bac6a3d3b22.zip
-rw-r--r--src/video_core/renderer_vulkan/vk_buffer_cache.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
index 60a6ac651..e15865d16 100644
--- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
@@ -529,17 +529,20 @@ void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bi
buffer_handles.push_back(handle);
}
if (device.IsExtExtendedDynamicStateSupported()) {
- scheduler.Record([bindings_ = std::move(bindings),
+ scheduler.Record([this, bindings_ = std::move(bindings),
buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) {
cmdbuf.BindVertexBuffers2EXT(bindings_.min_index,
- bindings_.max_index - bindings_.min_index,
+ std::min(bindings_.max_index - bindings_.min_index,
+ device.GetMaxVertexInputBindings()),
buffer_handles_.data(), bindings_.offsets.data(),
bindings_.sizes.data(), bindings_.strides.data());
});
} else {
- scheduler.Record([bindings_ = std::move(bindings),
+ scheduler.Record([this, bindings_ = std::move(bindings),
buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) {
- cmdbuf.BindVertexBuffers(bindings_.min_index, bindings_.max_index - bindings_.min_index,
+ cmdbuf.BindVertexBuffers(bindings_.min_index,
+ std::min(bindings_.max_index - bindings_.min_index,
+ device.GetMaxVertexInputBindings()),
buffer_handles_.data(), bindings_.offsets.data());
});
}