mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-30 11:00:40 +00:00
radv: remove useless RADV_DEBUG=unsafemath debug option
This option is useless and shouldn't be used at all. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
9a80b7fd8f
commit
519d9b30de
@ -603,8 +603,6 @@ Mesa EGL supports different sets of environment variables. See the
|
||||
<dd>display info at startup</dd>
|
||||
<dt><code>syncshaders</code></dt>
|
||||
<dd>synchronize shaders after all draws/dispatches</dd>
|
||||
<dt><code>unsafemath</code></dt>
|
||||
<dd>enable unsafe math operations</dd>
|
||||
<dt><code>vmfaults</code></dt>
|
||||
<dd>check for VM memory faults via dmesg</dd>
|
||||
<dt><code>zerovram</code></dt>
|
||||
|
@ -88,10 +88,6 @@ LLVMBuilderRef ac_create_builder(LLVMContextRef ctx,
|
||||
flags.setNoSignedZeros();
|
||||
llvm::unwrap(builder)->setFastMathFlags(flags);
|
||||
break;
|
||||
case AC_FLOAT_MODE_UNSAFE_FP_MATH:
|
||||
flags.setFast();
|
||||
llvm::unwrap(builder)->setFastMathFlags(flags);
|
||||
break;
|
||||
}
|
||||
|
||||
return builder;
|
||||
|
@ -72,7 +72,6 @@ enum ac_target_machine_options {
|
||||
enum ac_float_mode {
|
||||
AC_FLOAT_MODE_DEFAULT,
|
||||
AC_FLOAT_MODE_NO_SIGNED_ZEROS_FP_MATH,
|
||||
AC_FLOAT_MODE_UNSAFE_FP_MATH,
|
||||
AC_FLOAT_MODE_DENORM_FLUSH_TO_ZERO,
|
||||
};
|
||||
|
||||
|
@ -35,29 +35,28 @@ enum {
|
||||
RADV_DEBUG_DUMP_SHADER_STATS = 0x10,
|
||||
RADV_DEBUG_NO_HIZ = 0x20,
|
||||
RADV_DEBUG_NO_COMPUTE_QUEUE = 0x40,
|
||||
RADV_DEBUG_UNSAFE_MATH = 0x80,
|
||||
RADV_DEBUG_ALL_BOS = 0x100,
|
||||
RADV_DEBUG_NO_IBS = 0x200,
|
||||
RADV_DEBUG_DUMP_SPIRV = 0x400,
|
||||
RADV_DEBUG_VM_FAULTS = 0x800,
|
||||
RADV_DEBUG_ZERO_VRAM = 0x1000,
|
||||
RADV_DEBUG_SYNC_SHADERS = 0x2000,
|
||||
RADV_DEBUG_NO_SISCHED = 0x4000,
|
||||
RADV_DEBUG_PREOPTIR = 0x8000,
|
||||
RADV_DEBUG_NO_DYNAMIC_BOUNDS = 0x10000,
|
||||
RADV_DEBUG_NO_OUT_OF_ORDER = 0x20000,
|
||||
RADV_DEBUG_INFO = 0x40000,
|
||||
RADV_DEBUG_ERRORS = 0x80000,
|
||||
RADV_DEBUG_STARTUP = 0x100000,
|
||||
RADV_DEBUG_CHECKIR = 0x200000,
|
||||
RADV_DEBUG_NOTHREADLLVM = 0x400000,
|
||||
RADV_DEBUG_NOBINNING = 0x800000,
|
||||
RADV_DEBUG_NO_LOAD_STORE_OPT = 0x1000000,
|
||||
RADV_DEBUG_NO_NGG = 0x2000000,
|
||||
RADV_DEBUG_NO_SHADER_BALLOT = 0x4000000,
|
||||
RADV_DEBUG_ALL_ENTRYPOINTS = 0x8000000,
|
||||
RADV_DEBUG_DUMP_META_SHADERS = 0x10000000,
|
||||
RADV_DEBUG_NO_MEMORY_CACHE = 0x20000000,
|
||||
RADV_DEBUG_ALL_BOS = 0x80,
|
||||
RADV_DEBUG_NO_IBS = 0x100,
|
||||
RADV_DEBUG_DUMP_SPIRV = 0x200,
|
||||
RADV_DEBUG_VM_FAULTS = 0x400,
|
||||
RADV_DEBUG_ZERO_VRAM = 0x800,
|
||||
RADV_DEBUG_SYNC_SHADERS = 0x1000,
|
||||
RADV_DEBUG_NO_SISCHED = 0x2000,
|
||||
RADV_DEBUG_PREOPTIR = 0x4000,
|
||||
RADV_DEBUG_NO_DYNAMIC_BOUNDS = 0x8000,
|
||||
RADV_DEBUG_NO_OUT_OF_ORDER = 0x10000,
|
||||
RADV_DEBUG_INFO = 0x20000,
|
||||
RADV_DEBUG_ERRORS = 0x40000,
|
||||
RADV_DEBUG_STARTUP = 0x80000,
|
||||
RADV_DEBUG_CHECKIR = 0x100000,
|
||||
RADV_DEBUG_NOTHREADLLVM = 0x200000,
|
||||
RADV_DEBUG_NOBINNING = 0x400000,
|
||||
RADV_DEBUG_NO_LOAD_STORE_OPT = 0x800000,
|
||||
RADV_DEBUG_NO_NGG = 0x1000000,
|
||||
RADV_DEBUG_NO_SHADER_BALLOT = 0x2000000,
|
||||
RADV_DEBUG_ALL_ENTRYPOINTS = 0x4000000,
|
||||
RADV_DEBUG_DUMP_META_SHADERS = 0x8000000,
|
||||
RADV_DEBUG_NO_MEMORY_CACHE = 0x10000000,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -341,8 +341,7 @@ radv_physical_device_init(struct radv_physical_device *device,
|
||||
/* These flags affect shader compilation. */
|
||||
uint64_t shader_env_flags =
|
||||
(device->instance->perftest_flags & RADV_PERFTEST_SISCHED ? 0x1 : 0) |
|
||||
(device->instance->debug_flags & RADV_DEBUG_UNSAFE_MATH ? 0x2 : 0) |
|
||||
(device->use_aco ? 0x4 : 0);
|
||||
(device->use_aco ? 0x2 : 0);
|
||||
|
||||
/* The gpu id is already embedded in the uuid so we just pass "radv"
|
||||
* when creating the cache.
|
||||
@ -468,7 +467,6 @@ static const struct debug_control radv_debug_options[] = {
|
||||
{"shaderstats", RADV_DEBUG_DUMP_SHADER_STATS},
|
||||
{"nohiz", RADV_DEBUG_NO_HIZ},
|
||||
{"nocompute", RADV_DEBUG_NO_COMPUTE_QUEUE},
|
||||
{"unsafemath", RADV_DEBUG_UNSAFE_MATH},
|
||||
{"allbos", RADV_DEBUG_ALL_BOS},
|
||||
{"noibs", RADV_DEBUG_NO_IBS},
|
||||
{"spirv", RADV_DEBUG_DUMP_SPIRV},
|
||||
|
@ -435,24 +435,6 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module,
|
||||
|
||||
ac_llvm_set_workgroup_size(main_function, max_workgroup_size);
|
||||
|
||||
if (options->unsafe_math) {
|
||||
/* These were copied from some LLVM test. */
|
||||
LLVMAddTargetDependentFunctionAttr(main_function,
|
||||
"less-precise-fpmad",
|
||||
"true");
|
||||
LLVMAddTargetDependentFunctionAttr(main_function,
|
||||
"no-infs-fp-math",
|
||||
"true");
|
||||
LLVMAddTargetDependentFunctionAttr(main_function,
|
||||
"no-nans-fp-math",
|
||||
"true");
|
||||
LLVMAddTargetDependentFunctionAttr(main_function,
|
||||
"unsafe-fp-math",
|
||||
"true");
|
||||
LLVMAddTargetDependentFunctionAttr(main_function,
|
||||
"no-signed-zeros-fp-math",
|
||||
"true");
|
||||
}
|
||||
return main_function;
|
||||
}
|
||||
|
||||
@ -4814,8 +4796,6 @@ LLVMModuleRef ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm,
|
||||
|
||||
if (shader_info->float_controls_mode & FLOAT_CONTROLS_DENORM_FLUSH_TO_ZERO_FP32) {
|
||||
float_mode = AC_FLOAT_MODE_DENORM_FLUSH_TO_ZERO;
|
||||
} else if (options->unsafe_math) {
|
||||
float_mode = AC_FLOAT_MODE_UNSAFE_FP_MATH;
|
||||
}
|
||||
|
||||
ac_llvm_context_init(&ctx.ac, ac_llvm, options->chip_class,
|
||||
@ -5275,12 +5255,8 @@ radv_compile_gs_copy_shader(struct ac_llvm_compiler *ac_llvm,
|
||||
ctx.options = options;
|
||||
ctx.shader_info = shader_info;
|
||||
|
||||
enum ac_float_mode float_mode =
|
||||
options->unsafe_math ? AC_FLOAT_MODE_UNSAFE_FP_MATH :
|
||||
AC_FLOAT_MODE_DEFAULT;
|
||||
|
||||
ac_llvm_context_init(&ctx.ac, ac_llvm, options->chip_class,
|
||||
options->family, float_mode, 64, 64);
|
||||
options->family, AC_FLOAT_MODE_DEFAULT, 64, 64);
|
||||
ctx.context = ctx.ac.context;
|
||||
|
||||
ctx.is_gs_copy_shader = true;
|
||||
|
@ -156,8 +156,6 @@ static uint32_t get_hash_flags(struct radv_device *device)
|
||||
{
|
||||
uint32_t hash_flags = 0;
|
||||
|
||||
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)
|
||||
|
@ -1500,12 +1500,11 @@ 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)
|
||||
#define RADV_HASH_SHADER_CS_WAVE32 (1 << 4)
|
||||
#define RADV_HASH_SHADER_PS_WAVE32 (1 << 5)
|
||||
#define RADV_HASH_SHADER_GE_WAVE32 (1 << 6)
|
||||
#define RADV_HASH_SHADER_ACO (1 << 7)
|
||||
#define RADV_HASH_SHADER_NO_NGG (1 << 2)
|
||||
#define RADV_HASH_SHADER_CS_WAVE32 (1 << 3)
|
||||
#define RADV_HASH_SHADER_PS_WAVE32 (1 << 4)
|
||||
#define RADV_HASH_SHADER_GE_WAVE32 (1 << 5)
|
||||
#define RADV_HASH_SHADER_ACO (1 << 6)
|
||||
|
||||
void
|
||||
radv_hash_shaders(unsigned char *hash,
|
||||
|
@ -1188,7 +1188,6 @@ radv_shader_variant_compile(struct radv_device *device,
|
||||
if (key)
|
||||
options.key = *key;
|
||||
|
||||
options.unsafe_math = !!(device->instance->debug_flags & RADV_DEBUG_UNSAFE_MATH);
|
||||
options.supports_spill = true;
|
||||
options.robust_buffer_access = device->robust_buffer_access;
|
||||
|
||||
|
@ -125,7 +125,6 @@ struct radv_shader_variant_key {
|
||||
struct radv_nir_compiler_options {
|
||||
struct radv_pipeline_layout *layout;
|
||||
struct radv_shader_variant_key key;
|
||||
bool unsafe_math;
|
||||
bool supports_spill;
|
||||
bool clamp_shadow_reference;
|
||||
bool robust_buffer_access;
|
||||
|
Loading…
Reference in New Issue
Block a user