mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
vkmemory: fix allocation of sizes less than the alignment
Avoids allocating a 0-sized device memory which is invalid vulkan usage
This commit is contained in:
parent
0efd559950
commit
ae13e66639
1 changed files with 1 additions and 2 deletions
|
@ -99,8 +99,7 @@ _vk_mem_init (GstVulkanMemory * mem, GstAllocator * allocator,
|
|||
align |= params->align;
|
||||
offset = params->prefix;
|
||||
maxsize += params->prefix + params->padding;
|
||||
if ((maxsize & align) != 0)
|
||||
maxsize += ~(maxsize & align) + 1;
|
||||
maxsize += align;
|
||||
}
|
||||
|
||||
gst_memory_init (GST_MEMORY_CAST (mem), flags, allocator, parent, maxsize,
|
||||
|
|
Loading…
Reference in a new issue