radv: add an option for disabling NGG on GFX10
Will be useful for testing the legacy path. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
@@ -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 {
|
||||
|
@@ -476,6 +476,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}
|
||||
};
|
||||
|
||||
|
@@ -173,6 +173,8 @@ static uint32_t get_hash_flags(struct radv_device *device)
|
||||
|
||||
if (device->instance->debug_flags & RADV_DEBUG_UNSAFE_MATH)
|
||||
hash_flags |= RADV_HASH_SHADER_UNSAFE_MATH;
|
||||
if (device->instance->debug_flags & RADV_DEBUG_NO_NGG)
|
||||
hash_flags |= RADV_HASH_SHADER_NO_NGG;
|
||||
if (device->instance->perftest_flags & RADV_PERFTEST_SISCHED)
|
||||
hash_flags |= RADV_HASH_SHADER_SISCHED;
|
||||
return hash_flags;
|
||||
@@ -2300,7 +2302,8 @@ radv_fill_shader_keys(struct radv_device *device,
|
||||
keys[MESA_SHADER_VERTEX].vs_common_out.as_es = true;
|
||||
}
|
||||
|
||||
if (device->physical_device->rad_info.chip_class >= GFX10) {
|
||||
if (device->physical_device->rad_info.chip_class >= GFX10 &&
|
||||
!(device->instance->debug_flags & RADV_DEBUG_NO_NGG)) {
|
||||
if (nir[MESA_SHADER_TESS_CTRL]) {
|
||||
keys[MESA_SHADER_TESS_EVAL].vs_common_out.as_ngg = true;
|
||||
} else {
|
||||
|
@@ -1391,6 +1391,8 @@ struct radv_shader_module;
|
||||
#define RADV_HASH_SHADER_IS_GEOM_COPY_SHADER (1 << 0)
|
||||
#define RADV_HASH_SHADER_SISCHED (1 << 1)
|
||||
#define RADV_HASH_SHADER_UNSAFE_MATH (1 << 2)
|
||||
#define RADV_HASH_SHADER_NO_NGG (1 << 3)
|
||||
|
||||
void
|
||||
radv_hash_shaders(unsigned char *hash,
|
||||
const VkPipelineShaderStageCreateInfo **stages,
|
||||
|
Reference in New Issue
Block a user