radv: Set optimal copy alignment to 1.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 5 Jan 2022 23:57:56 +0000 (00:57 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 7 Jan 2022 01:59:13 +0000 (01:59 +0000)
I think we set it to 128 for no reason at all. The app is still
required to align to the texel size.

Note that we prefer 4 bytes for non-formatted buffer->buffer copy,
but that isn't in scope for these properties according to the
Vulkan spec.

It also happens to help hide what looks like an application bug at
this point with Baldurs Gate 3.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5509
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14415>

src/amd/vulkan/radv_device.c

index cae08c7..c62f59b 100644 (file)
@@ -1819,8 +1819,8 @@ radv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
       .lineWidthGranularity = (1.0 / 8.0),
       .strictLines = false, /* FINISHME */
       .standardSampleLocations = true,
-      .optimalBufferCopyOffsetAlignment = 128,
-      .optimalBufferCopyRowPitchAlignment = 128,
+      .optimalBufferCopyOffsetAlignment = 1,
+      .optimalBufferCopyRowPitchAlignment = 1,
       .nonCoherentAtomSize = 64,
    };