radeonsi: Bitcast result of packf16 intrinsic to float for export intrinsic.
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 27 Nov 2012 18:53:58 +0000 (19:53 +0100)
committerMichel Dänzer <michel@daenzer.net>
Thu, 29 Nov 2012 09:08:53 +0000 (10:08 +0100)
Fixes 7 piglit tests, and prevents many more from crashing.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-and-Tested-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeonsi/radeonsi_shader.c

index d6e37ac..d5d56c4 100644 (file)
@@ -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 */