From a07705def6d080de3faf3cac83dbf7a313d5e093 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 10 Nov 2023 10:48:20 -0800 Subject: [PATCH] freedreno/a6xx: Don't set patch_vertices if no tess Don't pollute the cache key with unused fields to avoid potentially generating pointless shader variants. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_draw.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc b/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc index c8d6deb3abd..83992d949be 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc @@ -224,7 +224,7 @@ get_program_state(struct fd_context *ctx, const struct pipe_draw_info *info) .gs = (struct ir3_shader_state *)ctx->prog.gs, .fs = (struct ir3_shader_state *)ctx->prog.fs, .clip_plane_enable = ctx->rasterizer->clip_plane_enable, - .patch_vertices = ctx->patch_vertices, + .patch_vertices = HAS_TESS_GS ? ctx->patch_vertices : 0, }; /* Some gcc versions get confused about designated order, so workaround