aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Kristóf <[email protected]>2020-03-31 10:41:01 +0200
committerMarge Bot <[email protected]>2020-04-07 11:29:35 +0000
commitc24d9522daefce112b7a9d03a6d1abdf60f02656 (patch)
tree2eb8557af8db462affbe4aba026c47167ca05a5c
parent64225c4f962c2640dd280d3817517b75c7188622 (diff)
radv: Enable ACO for NGG VS/TES, but disable NGG for ACO GS.
Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3576>
-rw-r--r--src/amd/vulkan/radv_device.c4
-rw-r--r--src/amd/vulkan/radv_pipeline.c13
2 files changed, 13 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index f45d86bd3f7..00e3a7ca947 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -411,10 +411,6 @@ radv_physical_device_init(struct radv_physical_device *device,
device->use_ngg = device->rad_info.chip_class >= GFX10 &&
device->rad_info.family != CHIP_NAVI14 &&
!(device->instance->debug_flags & RADV_DEBUG_NO_NGG);
- if (device->use_aco && device->use_ngg) {
- fprintf(stderr, "WARNING: disabling NGG because ACO is used.\n");
- device->use_ngg = false;
- }
device->use_ngg_streamout = false;
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index c62d2a0d977..d1c7abef106 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2461,6 +2461,19 @@ 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 (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;
for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {