Module: Mesa Branch: main Commit: e61fae6eb8ae1ae1228d6f89329324310db808ae URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e61fae6eb8ae1ae1228d6f89329324310db808ae
Author: Roland Scheidegger <[email protected]> Date: Sat Dec 16 15:40:55 2023 +0100 lavapipe: bump image alignment up to 64 bytes We can't query the actually required alignment from llvmpipe, but 16 bytes is insufficient. In particular, llvmpipe's pixel backend code for depth/stencil will load/store 4 values at a time, which crashes with d32s8x24 format if alignment is only 16 bytes (the color backend does similar things but will use unaligned loads if alignment exceeds 16 bytes at least for now). 32 bytes would be enough, however the "ordinary" llvmpipe resource layout code currently always aligns to at least 64 bytes, so use this value as well. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26724> --- src/gallium/frontends/lavapipe/lvp_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/lavapipe/lvp_image.c b/src/gallium/frontends/lavapipe/lvp_image.c index 31faf18a1cc..aa60524c382 100644 --- a/src/gallium/frontends/lavapipe/lvp_image.c +++ b/src/gallium/frontends/lavapipe/lvp_image.c @@ -42,7 +42,7 @@ lvp_image_create(VkDevice _device, if (image == NULL) return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY); - image->alignment = 16; + image->alignment = 64; image->plane_count = vk_format_get_plane_count(pCreateInfo->format); image->disjoint = image->plane_count > 1 && (pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT);
