[Mesa-dev] [PATCH] radeonsi: Bitcast result of packf16 intrinsic to float for export intrinsic.

Christian König deathsimple at vodafone.de
Wed Nov 28 15:34:02 PST 2012


On 27.11.2012 19:55, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Fixes 4 piglit tests and prevents many more from crashing.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed & Tested-by: Christian König <christian.koenig at amd.com>

> ---
>   src/gallium/drivers/radeonsi/radeonsi_shader.c |    6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
> index d6e37ac..d5d56c4 100644
> --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
> +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
> @@ -496,7 +496,11 @@ static void si_llvm_init_export_args(struct lp_build_tgsi_context *bld_base,
>   						LLVMInt32TypeInContext(base->gallivm->context),
>   						args, 2,
>   						LLVMReadNoneAttribute);
> -			args[chan + 7] = args[chan + 5];
> +			args[chan + 7] = args[chan + 5] =
> +				LLVMBuildBitCast(base->gallivm->builder,
> +						 args[chan + 5],
> +						 LLVMFloatTypeInContext(base->gallivm->context),
> +						 "");
>   		}
>   
>   		/* Set COMPR flag */



More information about the mesa-dev mailing list