diff --git a/src/asahi/vulkan/hk_cmd_draw.c b/src/asahi/vulkan/hk_cmd_draw.c index 881bd6daeea..b5e35905fd6 100644 --- a/src/asahi/vulkan/hk_cmd_draw.c +++ b/src/asahi/vulkan/hk_cmd_draw.c @@ -3213,6 +3213,9 @@ hk_handle_passthrough_gs(struct hk_cmd_buffer *cmd, struct agx_draw draw) struct hk_graphics_state *gfx = &cmd->state.gfx; struct hk_api_shader *gs = gfx->shaders[MESA_SHADER_GEOMETRY]; + if (!IS_SHADER_DIRTY(VERTEX) && !IS_SHADER_DIRTY(GEOMETRY)) + return; + /* If there's an application geometry shader, there's nothing to un/bind */ if (gs && !gs->is_passthrough) return; @@ -3222,12 +3225,8 @@ hk_handle_passthrough_gs(struct hk_cmd_buffer *cmd, struct agx_draw draw) uint32_t xfb_outputs = last_sw->info.xfb_info.output_count; bool needs_gs = xfb_outputs; - /* If we already have a matching GS configuration, we're done */ - if ((gs != NULL) == needs_gs) - return; - /* If we don't need a GS but we do have a passthrough, unbind it */ - if (gs) { + if (!needs_gs && gs != NULL) { assert(!needs_gs && gs->is_passthrough); hk_cmd_bind_graphics_shader(cmd, MESA_SHADER_GEOMETRY, NULL); return;