From e7b12e500910d8ce5431e1c690ea843af190c38c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 13 Mar 2026 12:49:00 -0400 Subject: [PATCH] zink: work around drivers with broken mesh shader properties some properties require setting MAX+1, but there are drivers which mistakenly set 0 cc: mesa-stable (cherry picked from commit c09d0018a320c7734185ec7c8cd1738329b38928) Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_screen.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d2bfe7c2187..d748ae69f2b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -714,7 +714,7 @@ "description": "zink: work around drivers with broken mesh shader properties", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 96ab56a2140..db27521600d 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1206,8 +1206,8 @@ zink_init_screen_caps(struct zink_screen *screen) caps->mesh.max_mesh_output_vertices = screen->info.mesh_props.maxMeshOutputVertices; caps->mesh.max_mesh_output_primitives = screen->info.mesh_props.maxMeshOutputPrimitives; caps->mesh.max_mesh_output_components = screen->info.mesh_props.maxMeshOutputComponents; - caps->mesh.max_mesh_output_layers = screen->info.mesh_props.maxMeshOutputLayers; - caps->mesh.max_mesh_multiview_view_count = screen->info.mesh_props.maxMeshMultiviewViewCount; + caps->mesh.max_mesh_output_layers = MAX2(screen->info.mesh_props.maxMeshOutputLayers, 1); + caps->mesh.max_mesh_multiview_view_count = MAX2(screen->info.mesh_props.maxMeshMultiviewViewCount, 1); caps->mesh.mesh_output_per_vertex_granularity = screen->info.mesh_props.meshOutputPerVertexGranularity; caps->mesh.mesh_output_per_primitive_granularity = screen->info.mesh_props.meshOutputPerPrimitiveGranularity;