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>
<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>
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;
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,
};
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 {
/* 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.
{"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},
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;
}
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,
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;
{
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)
#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,
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;
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;