aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_llvm_emit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-07-25 12:01:07 +0200
committerMarek Olšák <[email protected]>2015-07-31 16:49:16 +0200
commit8559f6ce62a9d5b52fa8189ba2352cd48bdabccf (patch)
tree972c873c9a0e65299d746c7a2f8402ad282550c2 /src/gallium/drivers/radeon/radeon_llvm_emit.c
parent12a197b2d58125e4dbe2942204df1bbe3258e54b (diff)
gallium/radeon: re-enable unsafe math for graphics shaders
This reverts commit 4db985a5fa9ea985616a726b1770727309502d81. The grass no longer disappears, which was the reason the commit was reverted. This might affect tessellation. We'll see. Totals from affected shaders: SGPRS: 151672 -> 150232 (-0.95 %) VGPRS: 90620 -> 89776 (-0.93 %) Code Size: 3980472 -> 3920836 (-1.50 %) bytes LDS: 67 -> 67 (0.00 %) blocks Scratch: 1357824 -> 1202176 (-11.46 %) bytes per wave Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_llvm_emit.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_llvm_emit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c
index 973d6edff8a..c442c6566dc 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.c
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c
@@ -82,6 +82,10 @@ void radeon_llvm_shader_type(LLVMValueRef F, unsigned type)
sprintf(Str, "%1d", llvm_type);
LLVMAddTargetDependentFunctionAttr(F, "ShaderType", Str);
+
+ if (type != TGSI_PROCESSOR_COMPUTE) {
+ LLVMAddTargetDependentFunctionAttr(F, "unsafe-fp-math", "true");
+ }
}
static void init_r600_target()