[Mesa-dev] [PATCH] radv: add an option for disabling NGG on GFX10
Samuel Pitoiset
samuel.pitoiset at gmail.com
Sun Jul 7 17:35:02 UTC 2019
Will be useful for testing the legacy path.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_debug.h | 1 +
src/amd/vulkan/radv_device.c | 1 +
src/amd/vulkan/radv_pipeline.c | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h
index 75e28000e14..723fabda57f 100644
--- a/src/amd/vulkan/radv_debug.h
+++ b/src/amd/vulkan/radv_debug.h
@@ -52,6 +52,7 @@ enum {
RADV_DEBUG_NOTHREADLLVM = 0x400000,
RADV_DEBUG_NOBINNING = 0x800000,
RADV_DEBUG_NO_LOAD_STORE_OPT = 0x1000000,
+ RADV_DEBUG_NO_NGG = 0x2000000,
};
enum {
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 4a1078a1b52..5a92e5276d9 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -474,6 +474,7 @@ static const struct debug_control radv_debug_options[] = {
{"nothreadllvm", RADV_DEBUG_NOTHREADLLVM},
{"nobinning", RADV_DEBUG_NOBINNING},
{"noloadstoreopt", RADV_DEBUG_NO_LOAD_STORE_OPT},
+ {"nongg", RADV_DEBUG_NO_NGG},
{NULL, 0}
};
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 69acfdaec7d..db0fb50bbe7 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2253,7 +2253,8 @@ radv_fill_shader_keys(struct radv_device *device,
keys[MESA_SHADER_VERTEX].vs.out.as_es = true;
}
- if (device->physical_device->rad_info.chip_class >= GFX10) {
+ if (!(device->instance->debug_flags & RADV_DEBUG_NO_NGG) &&
+ device->physical_device->rad_info.chip_class >= GFX10) {
keys[MESA_SHADER_VERTEX].vs.out.as_ngg = true;
}
--
2.22.0
More information about the mesa-dev
mailing list