v3d,v3dv: lower texel buffer aligment requirements
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 29 Aug 2022 08:10:26 +0000 (10:10 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Mon, 29 Aug 2022 09:32:25 +0000 (11:32 +0200)
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18291>

src/broadcom/common/v3d_limits.h
src/broadcom/vulkan/v3dv_device.c
src/gallium/drivers/v3d/v3d_screen.c

index eba8942..c47f533 100644 (file)
@@ -53,6 +53,9 @@
 /* Size of a cache line */
 #define V3D_NON_COHERENT_ATOM_SIZE 256
 
+/* Minimum alignment for texel buffers */
+#define V3D_TMU_TEXEL_ALIGN 64
+
 #define V3D_MAX_IMAGE_DIMENSION 4096
 
 /* The HW can do 16384 (15), but we run into hangs when we expose that. Also,
index 6b73fdf..61c5a36 100644 (file)
@@ -1485,7 +1485,7 @@ v3dv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
                                                     2.0 * max_fb_size - 1 },
       .viewportSubPixelBits                     = 0,
       .minMemoryMapAlignment                    = page_size,
-      .minTexelBufferOffsetAlignment            = V3D_UIFBLOCK_SIZE,
+      .minTexelBufferOffsetAlignment            = V3D_TMU_TEXEL_ALIGN,
       .minUniformBufferOffsetAlignment          = 32,
       .minStorageBufferOffsetAlignment          = 32,
       .minTexelOffset                           = -8,
index 83fe69b..2ab601a 100644 (file)
@@ -298,7 +298,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                 return true;
 
         case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
-                return 256;
+                return V3D_TMU_TEXEL_ALIGN;
 
         case PIPE_CAP_IMAGE_STORE_FORMATTED:
                 return false;