summaryrefslogtreecommitdiff
path: root/video.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video.cpp')
-rw-r--r--video.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/video.cpp b/video.cpp
index 5d88d0c..d0720f5 100644
--- a/video.cpp
+++ b/video.cpp
@@ -2760,8 +2760,8 @@ void Descriptor_Set_Vk::init(
Buffer_Vk& b = *(Buffer_Vk*)&dev->get_buffer(cd->buffer);
assert(cd->buffer);
buf.buffer = b.buf;
- buf.offset = 0;
- buf.range = b.size;
+ buf.offset = cd->offset;
+ buf.range = cd->size? cd->size: b.size;
wd.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
wd.pBufferInfo = &buf;
} break;