Mesa (main): radv: Set optimal copy alignment to 1.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 7 02:20:30 UTC 2022


Module: Mesa
Branch: main
Commit: 63101914f8879c37bd468781de1026e761ba6255
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=63101914f8879c37bd468781de1026e761ba6255

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Thu Jan  6 00:57:56 2022 +0100

radv: Set optimal copy alignment to 1.

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 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14415>

---

 src/amd/vulkan/radv_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index cae08c750f4..c62f59b6b29 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -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,
    };
 



More information about the mesa-commit mailing list