From 4fa9c7d2415731ff3be6ced271b8adeae4fc9b9a Mon Sep 17 00:00:00 2001 From: "duncan.hopkins" Date: Wed, 22 Jan 2025 11:01:00 +0000 Subject: [PATCH] zink: stop zink_set_primitive_emulation_keys producing geometry shaders on platforms that do not support them. If line smooth, stipple, quad_prims and a collection of other things are needed, zink produces a geometry shader to create them. This code is disabling that from happening when there is no geometry shader support. This removes a constant barrage of validation issues when trying to draw basic triangles. Some of this missing functionality will be added back in later. Part-of: --- src/gallium/drivers/zink/zink_program.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index 7dd29c6284e..229e9d0ccbe 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -2501,6 +2501,9 @@ void zink_set_primitive_emulation_keys(struct zink_context *ctx) { struct zink_screen *screen = zink_screen(ctx->base.screen); + if (!screen->info.feats.features.geometryShader) + return; + bool lower_line_stipple = false, lower_line_smooth = false; unsigned lower_pv_mode = 0; if (!screen->optimal_keys) {