From e19363a44e7b8b2d4895ed5d5dbd77057a651a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 14 Aug 2022 02:52:34 -0400 Subject: [PATCH] radeonsi: make the primitive type constant with tessellation Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index bacfe3cc6ed..b535d802764 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -2222,7 +2222,6 @@ static void si_draw(struct pipe_context *ctx, } } - enum pipe_prim_type prim = (enum pipe_prim_type)info->mode; unsigned instance_count = info->instance_count; /* GFX6-GFX7 treat instance_count==0 as instance_count==1. There is @@ -2239,11 +2238,13 @@ static void si_draw(struct pipe_context *ctx, if (unlikely(!vs || (!IS_DRAW_VERTEX_STATE && sctx->num_vertex_elements < vs->info.num_vs_inputs) || (IS_DRAW_VERTEX_STATE && vstate->velems.count < vs->info.num_vs_inputs) || - !sctx->shader.ps.cso || (HAS_TESS != (prim == PIPE_PRIM_PATCHES)))) { + !sctx->shader.ps.cso || (HAS_TESS != (info->mode == PIPE_PRIM_PATCHES)))) { assert(0); return; } + enum pipe_prim_type prim = HAS_TESS ? PIPE_PRIM_PATCHES : (enum pipe_prim_type)info->mode; + if (GFX_VERSION <= GFX9 && HAS_GS) { /* Determine whether the GS triangle strip adjacency fix should * be applied. Rotate every other triangle if triangle strips with