From 9bf92d4357179c197256dae1e2b02ed4ad1f0fae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Thu, 1 Oct 2020 16:59:18 +0200 Subject: [PATCH] radv/aco: Enable NGG GS by default. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ACO NGG GS now supports everything we need except streamout (aka. transform feedback), but we don't use NGG anyway when streamout is needed. Also add a note to the new features txt. Signed-off-by: Timur Kristóf Reviewed-by: Samuel Pitoiset Part-of: --- docs/relnotes/new_features.txt | 1 + src/amd/vulkan/radv_device.c | 2 -- src/amd/vulkan/radv_pipeline.c | 9 --------- src/amd/vulkan/radv_private.h | 3 --- src/amd/vulkan/radv_query.c | 2 +- 5 files changed, 2 insertions(+), 15 deletions(-) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index e2c9ff1..c845953 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -8,3 +8,4 @@ VK_PRESENT_MODE_FIFO_RELAXED on X11 GLX_EXT_swap_control for DRI2 and DRI3 GLX_EXT_swap_control_tear for DRI3 VK_KHR_copy_commands2 on RADV +NGG GS support in ACO diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 162dbab..55fb83a 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -402,8 +402,6 @@ radv_physical_device_try_create(struct radv_instance *instance, device->rad_info.has_dedicated_vram && !(device->instance->debug_flags & RADV_DEBUG_NO_NGG); - /* TODO: Implement NGG GS with ACO. */ - device->use_ngg_gs = device->use_ngg && device->use_llvm; 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 32b8511..1f02622 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2552,15 +2552,6 @@ radv_fill_shader_keys(struct radv_device *device, keys[MESA_SHADER_TESS_EVAL].vs_common_out.as_ngg = false; } - 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; - } - } - gl_shader_stage last_xfb_stage = MESA_SHADER_VERTEX; for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) { diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 1643650..c8f2578 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -299,9 +299,6 @@ 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 1353141..ccff1f7 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -1133,7 +1133,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_gs && + return device->physical_device->use_ngg && (pool->pipeline_stats_mask & VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT); } -- 2.7.4