From 73ab56fd2e84b5f361c42db8b4c0c0562e6fcd77 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 24 Mar 2026 19:35:57 -0400 Subject: [PATCH] tu: Lower maxMultiviewViewCount to 6 With multiview, the HW has to dispatch at least ViewCount * 6 fibers per primitive, since there are up to 6 VS threads per primitive. The HW can launch multiple GS waves per VS wave but one VS wave must contain the entire primitive. With ViewCount = 16 there are 96 fibers per primitive, which is more than we can launch in one wave. To fix this, lower the maximum view count. Part-of: --- src/freedreno/vulkan/tu_common.h | 2 +- src/freedreno/vulkan/tu_device.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedreno/vulkan/tu_common.h b/src/freedreno/vulkan/tu_common.h index a8d3b53affd..298cdf24e2d 100644 --- a/src/freedreno/vulkan/tu_common.h +++ b/src/freedreno/vulkan/tu_common.h @@ -105,7 +105,7 @@ #define SAMPLE_LOCATION_MAX 0.9375f #define TU_MAX_DRM_DEVICES 8 -#define MAX_VIEWS 16 +#define MAX_VIEWS 6 #define MAX_HW_SCALED_VIEWS 6 #define MAX_BIND_POINTS 2 /* compute + graphics */ /* match the latest Qualcomm driver which is also a hw limit on later gens */ diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index e42af3e4379..188e3dca35e 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -899,7 +899,7 @@ tu_get_physical_device_properties_1_1(struct tu_physical_device *pdevice, p->pointClippingBehavior = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES; p->maxMultiviewViewCount = - tu_has_multiview(pdevice) ? MAX_VIEWPORTS : 1; + tu_has_multiview(pdevice) ? MAX_VIEWS : 1; p->maxMultiviewInstanceIndex = INT_MAX; p->protectedNoFault = false; /* Our largest descriptors are 2 texture descriptors, or a texture and