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

Tom Stellard tom at stellard.net
Tue Jan 6 15:51:02 PST 2015


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


More information about the mesa-dev mailing list