[Mesa-dev] [PATCH] Revert "radeon/llvm: enable unsafe math for graphics shaders"
Michel Dänzer
michel at daenzer.net
Wed Feb 18 00:13:17 PST 2015
On 18.02.2015 16:52, Grigori Goronzy wrote:
> Hi,
>
> AFAIR not enabling this makes LLVM generate really slow code in some
> common cases. Maybe this is just a bug in LLVM/R600 triggered by unsafe
> FP math optimization or some optimization is too eager. Other drivers do
> fine with these types of optimization.
It can be enabled again after fixing the problem exposed by The Talos
Principle.
> What's the impact on performance with unsafe FP math disabled at this time?
I don't know. Correctness trumps performance.
> On 17.02.2015 09:15, Michel Dänzer wrote:
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> This reverts commit 0e9cdedd2e3943bdb7f3543a3508b883b167e427.
>>
>> It caused the grass to disappear in The Talos Principle.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89069
>> Signed-off-by: Michel Dänzer <michel at daenzer.net>
>> ---
>> src/gallium/drivers/radeon/radeon_llvm_emit.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c
>> index 0f9dbab..624077c 100644
>> --- a/src/gallium/drivers/radeon/radeon_llvm_emit.c
>> +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c
>> @@ -80,10 +80,6 @@ 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()
>>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150218/7e462ab7/attachment.sig>
More information about the mesa-dev
mailing list