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:
Matthew Waters 2019-05-16 19:39:20 +10:00
parent 0efd559950
commit ae13e66639

View file

@ -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,