From fd6e44236c07583b3b838b2c7ed01fea27002ef9 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 16 Apr 2020 16:15:45 +0200 Subject: [PATCH] radv: fix geometry shader primitives query with ACO on GFX10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes dEQP-VK.query_pool.statistics_query.*.geometry_shader_primitives.*. Fixes: c24d9522dae ("radv: Enable ACO for NGG VS/TES, but disable NGG for ACO GS.") Signed-off-by: Samuel Pitoiset Reviewed-by: Timur Kristóf Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_device.c | 2 ++ src/amd/vulkan/radv_pipeline.c | 6 +----- src/amd/vulkan/radv_private.h | 3 +++ src/amd/vulkan/radv_query.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 09b19ed0007..8e4fc861722 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -412,6 +412,8 @@ radv_physical_device_init(struct radv_physical_device *device, device->rad_info.family != CHIP_NAVI14 && !(device->instance->debug_flags & RADV_DEBUG_NO_NGG); + /* TODO: Implement NGG GS with ACO. */ + device->use_ngg_gs = device->use_ngg && !device->use_aco; device->use_ngg_streamout = false; /* Determine the number of threads per wave for all stages. */ diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index f0b93878f3b..b10ee86ac7c 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2461,17 +2461,13 @@ radv_fill_shader_keys(struct radv_device *device, keys[MESA_SHADER_TESS_EVAL].vs_common_out.as_ngg = false; } - if (device->physical_device->use_aco) { - /* Disable NGG GS when ACO is used */ + if (!device->physical_device->use_ngg_gs) { if (nir[MESA_SHADER_GEOMETRY]) { if (nir[MESA_SHADER_TESS_CTRL]) keys[MESA_SHADER_TESS_EVAL].vs_common_out.as_ngg = false; else keys[MESA_SHADER_VERTEX].vs_common_out.as_ngg = false; } - - /* NGG streamout not yet supported by ACO */ - assert(!device->physical_device->use_ngg_streamout); } gl_shader_stage last_xfb_stage = MESA_SHADER_VERTEX; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 24a04c4e6a5..b56772e6edb 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -327,6 +327,9 @@ struct radv_physical_device { /* Whether to enable NGG. */ bool use_ngg; + /* Whether to enable NGG GS. */ + bool use_ngg_gs; + /* Whether to enable NGG streamout. */ bool use_ngg_streamout; diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index a0387c785fa..07a1c387187 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -1265,7 +1265,7 @@ radv_query_pool_needs_gds(struct radv_device *device, * TODO: fix use of NGG GS and non-NGG GS inside the same begin/end * query. */ - return device->physical_device->use_ngg && + return device->physical_device->use_ngg_gs && (pool->pipeline_stats_mask & VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT); } -- 2.30.2