summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-08-12 19:58:45 -0400
committerMarek Olšák <[email protected]>2019-08-19 17:23:38 -0400
commit5d37194d43a13aca19291dc8596417b98b38d3c0 (patch)
tree637d20f29547ce8ba93a909f400402808e93dc2b
parent5586411de481fadd875194273000ba75437fb01e (diff)
radeonsi: remove the unsafemath debug option
unlikely to be used in the future Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h1
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c16
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c9
4 files changed, 3 insertions, 25 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 6d9cce2619b..4a972c43189 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -59,7 +59,6 @@ static const struct debug_named_value debug_options[] = {
{ "preoptir", DBG(PREOPT_IR), "Print the LLVM IR before initial optimizations" },
/* Shader compiler options the shader cache should be aware of: */
- { "unsafemath", DBG(UNSAFE_MATH), "Enable unsafe math shader optimizations" },
{ "sisched", DBG(SI_SCHED), "Enable LLVM SI Machine Instruction Scheduler." },
{ "gisel", DBG(GISEL), "Enable LLVM global instruction selector." },
{ "w32ge", DBG(W32_GE), "Use Wave32 for vertex, tessellation, and geometry shaders." },
@@ -872,7 +871,6 @@ static void si_disk_cache_create(struct si_screen *sscreen)
#define ALL_FLAGS (DBG(FS_CORRECT_DERIVS_AFTER_KILL) | \
DBG(SI_SCHED) | \
DBG(GISEL) | \
- DBG(UNSAFE_MATH) | \
DBG(W32_GE) | \
DBG(W32_PS) | \
DBG(W32_CS) | \
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index ddc1ce0c6de..7fd13cfa9e7 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -145,7 +145,6 @@ enum {
/* Shader compiler options the shader cache should be aware of: */
DBG_FS_CORRECT_DERIVS_AFTER_KILL,
- DBG_UNSAFE_MATH,
DBG_SI_SCHED,
DBG_GISEL,
DBG_W32_GE,
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index f7087c1adca..ea749becdde 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4459,22 +4459,6 @@ void si_create_function(struct si_shader_context *ctx,
LLVMAddTargetDependentFunctionAttr(ctx->main_fn,
"no-signed-zeros-fp-math",
"true");
-
- if (ctx->screen->debug_flags & DBG(UNSAFE_MATH)) {
- /* These were copied from some LLVM test. */
- LLVMAddTargetDependentFunctionAttr(ctx->main_fn,
- "less-precise-fpmad",
- "true");
- LLVMAddTargetDependentFunctionAttr(ctx->main_fn,
- "no-infs-fp-math",
- "true");
- LLVMAddTargetDependentFunctionAttr(ctx->main_fn,
- "no-nans-fp-math",
- "true");
- LLVMAddTargetDependentFunctionAttr(ctx->main_fn,
- "unsafe-fp-math",
- "true");
- }
}
static void declare_streamout_params(struct si_shader_context *ctx,
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
index e51250c2dac..2c1b3ebba77 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -967,13 +967,10 @@ void si_llvm_context_init(struct si_shader_context *ctx,
ctx->screen = sscreen;
ctx->compiler = compiler;
- enum ac_float_mode float_mode =
- sscreen->debug_flags & DBG(UNSAFE_MATH) ?
- AC_FLOAT_MODE_UNSAFE_FP_MATH :
- AC_FLOAT_MODE_NO_SIGNED_ZEROS_FP_MATH;
-
ac_llvm_context_init(&ctx->ac, compiler, sscreen->info.chip_class,
- sscreen->info.family, float_mode, wave_size);
+ sscreen->info.family,
+ AC_FLOAT_MODE_NO_SIGNED_ZEROS_FP_MATH,
+ wave_size);
ctx->gallivm.context = ctx->ac.context;
ctx->gallivm.module = ctx->ac.module;