v3dv: only require texel-size alignment for linear images
Originally, copies between buffers and images required a buffer offset that was a multiple of 4 bytes, however, the spec was later fixed to relax this rule and only require offsets that had texel alignment. Our implementation of image to buffer copies using the blit path needs to bind the destination buffer as a linear image and be able to bind the requested buffer memory at the required offset, so for that to work we need to chnage the alignment requirements for linear images to match the relaxed texel alignment requirement. Fixes new tests in Vulkan CTS 1.2.4: dEQP-VK.api.copy_and_blit.core.image_to_buffer.buffer_offset_relaxed dEQP-VK.api.copy_and_blit.dedicated_allocation.image_to_buffer.buffer_offset_relaxed Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
committed by
Marge Bot
parent
57a337f26e
commit
0d046516f3
@@ -211,7 +211,8 @@ v3d_setup_slices(struct v3dv_image *image)
|
||||
*
|
||||
* We additionally align to 4k, which improves UIF XOR performance.
|
||||
*/
|
||||
image->alignment = image->tiling == VK_IMAGE_TILING_LINEAR ? 4 : 4096;
|
||||
image->alignment =
|
||||
image->tiling == VK_IMAGE_TILING_LINEAR ? image->cpp : 4096;
|
||||
uint32_t align_offset =
|
||||
align(image->slices[0].offset, image->alignment) - image->slices[0].offset;
|
||||
if (align_offset) {
|
||||
|
||||
Reference in New Issue
Block a user