[Mesa-dev] [PATCH 04/13] radeonsi: enable LLVM optimizations that assume no NaNs for non-compute shaders

Marek Olšák maraeo at gmail.com
Wed Jan 7 03:58:12 PST 2015


How about the attached patch?

Marek

On Wed, Jan 7, 2015 at 1:23 AM, Tom Stellard <tom at stellard.net> wrote:
> On Wed, Jan 07, 2015 at 01:13:37AM +0100, Marek Olšák wrote:
>> Neither. It's because we use DX10_CLAMP, which converts NaNs to 0.
>>
>
> Ok, could we add a dx10_clamp bit to si_shader and make this attribute
> conditional on that bit.  I'm concerned someone may remove DX10_CLAMP
> and forget to also remove this attribute.
>
> -Tom
>
>> Marek
>>
>> On Wed, Jan 7, 2015 at 12:51 AM, Tom Stellard <tom at stellard.net> wrote:
>> > On Mon, Jan 05, 2015 at 12:18:43AM +0100, Marek Olšák wrote:
>> >> From: Marek Olšák <marek.olsak at amd.com>
>> >>
>> >> ---
>> >>  src/gallium/drivers/radeon/radeon_llvm_emit.c | 1 +
>> >>  1 file changed, 1 insertion(+)
>> >>
>> >> diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c
>> >> index dc871d7..e3be72c 100644
>> >> --- a/src/gallium/drivers/radeon/radeon_llvm_emit.c
>> >> +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c
>> >> @@ -83,6 +83,7 @@ void radeon_llvm_shader_type(LLVMValueRef F, unsigned type)
>> >>
>> >>       if (type != TGSI_PROCESSOR_COMPUTE) {
>> >>               LLVMAddTargetDependentFunctionAttr(F, "unsafe-fp-math", "true");
>> >> +             LLVMAddTargetDependentFunctionAttr(F, "enable-no-nans-fp-math", "true");
>> >
>> > Is this required by the OpenGL spec or is it just to fix broken/old
>> > games?
>> >
>> > -Tom
>> >
>> >>       }
>> >>  }
>> >>
>> >> --
>> >> 2.1.0
>> >>
>> >> _______________________________________________
>> >> mesa-dev mailing list
>> >> mesa-dev at lists.freedesktop.org
>> >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-radeonsi-enable-LLVM-optimizations-that-assume-no-Na.patch
Type: text/x-patch
Size: 4185 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150107/bf121d76/attachment.bin>


More information about the mesa-dev mailing list