[Mesa-dev] [PATCH] radv: set no-signed-zeros-fp-math

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Jan 11 09:43:53 UTC 2018


Apparently we are not quite sure if this is compatible with Vulkan or not.

On 01/11/2018 12:30 AM, Marek Olšák wrote:
> I also recommend porting lp_create_builder, which might also improve things.
> 
> Marek
> 
> On Wed, Jan 10, 2018 at 10:31 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>> This is an optimisation that is recommended by Matt Arsenault,
>> and used by RadeonSI.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>>   src/amd/common/ac_nir_to_llvm.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
>> index 1520342d05..b474c29244 100644
>> --- a/src/amd/common/ac_nir_to_llvm.c
>> +++ b/src/amd/common/ac_nir_to_llvm.c
>> @@ -338,6 +338,11 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module,
>>                                                       "amdgpu-max-work-group-size",
>>                                                       max_workgroup_size);
>>          }
>> +
>> +       LLVMAddTargetDependentFunctionAttr(main_function,
>> +                                          "no-signed-zeros-fp-math",
>> +                                          "true");
>> +
>>          if (unsafe_math) {
>>                  /* These were copied from some LLVM test. */
>>                  LLVMAddTargetDependentFunctionAttr(main_function,
>> --
>> 2.15.1
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list