summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoshua Ashton <joshua@froggi.es>2021-04-11 11:34:32 +0200
committerJoshua Ashton <joshua@froggi.es>2021-04-11 11:34:52 +0200
commit0ec6cb942d146723b87a30918c71ba58306b9885 (patch)
tree5240db9ba4f52b21737cfcc99009cbacfcd23adf /src
parentMerge pull request #6180 from Joshua-Ashton/device_loss_fix (diff)
downloadyuzu-0ec6cb942d146723b87a30918c71ba58306b9885.tar
yuzu-0ec6cb942d146723b87a30918c71ba58306b9885.tar.gz
yuzu-0ec6cb942d146723b87a30918c71ba58306b9885.tar.bz2
yuzu-0ec6cb942d146723b87a30918c71ba58306b9885.tar.lz
yuzu-0ec6cb942d146723b87a30918c71ba58306b9885.tar.xz
yuzu-0ec6cb942d146723b87a30918c71ba58306b9885.tar.zst
yuzu-0ec6cb942d146723b87a30918c71ba58306b9885.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_vulkan/vk_buffer_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
index 668633e7b..8cb65e588 100644
--- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
@@ -176,7 +176,7 @@ void BufferCacheRuntime::BindVertexBuffer(u32 index, VkBuffer buffer, u32 offset
u32 stride) {
if (device.IsExtExtendedDynamicStateSupported()) {
scheduler.Record([index, buffer, offset, size, stride](vk::CommandBuffer cmdbuf) {
- const VkDeviceSize vk_offset = offset;
+ const VkDeviceSize vk_offset = buffer != VK_NULL_HANDLE ? offset : 0;
const VkDeviceSize vk_size = buffer != VK_NULL_HANDLE ? size : VK_WHOLE_SIZE;
const VkDeviceSize vk_stride = stride;
cmdbuf.BindVertexBuffers2EXT(index, 1, &buffer, &vk_offset, &vk_size, &vk_stride);