[vulkan] Calculate matrix offset correctly

When I changed the matrices from an array of floats to an array of
vec4f_t, I forgot to update the flush offsets. Yay for having a
Vulkan-capable Intel device with its different alignment requirements.
This commit is contained in:
Bill Currie 2021-11-30 21:51:21 +09:00
parent 25559243ae
commit 5b1052087a

View file

@ -135,7 +135,7 @@ Vulkan_CalcProjectionMatrices (vulkan_ctx_t *ctx)
VkMappedMemoryRange ranges[] = {
{ VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, 0, mat->memory, 0, MAT_SIZE },
{ VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, 0, mat->memory,
(mat->projection_3d - mat->projection_2d) * sizeof (float),
(mat->projection_3d - mat->projection_2d) * sizeof (mat->projection_2d[0]),
MAT_SIZE},
};
dfunc->vkFlushMappedMemoryRanges (device->dev, 2, ranges);