From 46d222c2abcf1bc447f473abfb210fd2f78505c5 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 16 Jun 2021 15:58:28 -0700 Subject: [PATCH] anv: Fix dynamic primitive topology for tess on Gfx7.x too Commit 24342e499bc58348b257716f629dccca3c1b0833 changed how primitive topology is handled on Gfx8+ but missed updating the Gfx7.x code. As a result, tests which previously used topologies like PATCHLIST_3 instead started using bogus ones like LINESTRIP_ADJ. This caused a GPU hangs in a bunch of Vulkan conformance tests involving tessellation. This fixes those hangs. Fixes: 24342e499bc ("anv: fix dynamic primitive topology for tess") Reviewed-by: Mike Blumenkrantz Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit 0510a947ba287f8b416601fcbc64512164b2918e) --- .pick_status.json | 2 +- src/intel/vulkan/gfx7_cmd_buffer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index eab1664306d..0aaf1450e09 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -706,7 +706,7 @@ "description": "anv: Fix dynamic primitive topology for tess on Gfx7.x too", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "24342e499bc58348b257716f629dccca3c1b0833" }, diff --git a/src/intel/vulkan/gfx7_cmd_buffer.c b/src/intel/vulkan/gfx7_cmd_buffer.c index e5ecfb671f9..b08bcf34b18 100644 --- a/src/intel/vulkan/gfx7_cmd_buffer.c +++ b/src/intel/vulkan/gfx7_cmd_buffer.c @@ -338,7 +338,7 @@ genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer) ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY)) { uint32_t topology; if (anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL)) - topology = d->primitive_topology; + topology = pipeline->topology; else topology = genX(vk_to_gen_primitive_type)[d->primitive_topology];