diff options
author | Marek Olšák <marek.olsak@amd.com> | 2016-11-12 23:10:23 +0100 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2016-11-15 19:17:56 +0100 |
commit | 358079da2d6705cf4966b8de802e99362c39c38a (patch) | |
tree | 127b8105646f04c16e34ed1ab6ea2f37a1bc14c5 | |
parent | 41d20d492087477fd1f0f03e12598970d95e6e1f (diff) |
radeonsi: set unsafe fpmath on FP instructions when allowed by R600_DEBUG
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index 624a167c7d5..2f38949b88a 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -22,6 +22,7 @@ */ #include "si_shader_internal.h" +#include "si_pipe.h" #include "radeon/radeon_elf_util.h" #include "gallivm/lp_bld_const.h" @@ -1246,7 +1247,10 @@ void si_llvm_context_init(struct si_shader_context *ctx, ctx->gallivm.module = LLVMModuleCreateWithNameInContext("tgsi", ctx->gallivm.context); LLVMSetTarget(ctx->gallivm.module, "amdgcn--"); - ctx->gallivm.builder = LLVMCreateBuilderInContext(ctx->gallivm.context); + + bool unsafe_fpmath = (sscreen->b.debug_flags & DBG_UNSAFE_MATH) != 0; + ctx->gallivm.builder = lp_create_builder(ctx->gallivm.context, + unsafe_fpmath); struct lp_build_tgsi_context *bld_base = &ctx->soa.bld_base; |