radeonsi: fix TEX writemask
authorChristian König <deathsimple@vodafone.de>
Wed, 1 Aug 2012 21:18:14 +0000 (23:18 +0200)
committerChristian König <deathsimple@vodafone.de>
Thu, 2 Aug 2012 10:05:33 +0000 (12:05 +0200)
Using the writemask in the sampler results in packet
VGPRS. For now just sample all components and let
llvm chose the right one.

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

index 522016e411ff693575fff73961c324a6121d9a25..c19a4c2d2362634a0819157332284d9618b1a141 100644 (file)
@@ -519,8 +519,8 @@ static void tex_fetch_args(
        LLVMValueRef offset;
 
        /* WriteMask */
-       emit_data->args[0] = lp_build_const_int32(bld_base->base.gallivm,
-                               emit_data->inst->Dst[0].Register.WriteMask);
+       /* XXX: should be optimized using emit_data->inst->Dst[0].Register.WriteMask*/
+       emit_data->args[0] = lp_build_const_int32(bld_base->base.gallivm, 0xf);
 
        /* Coordinates */
        /* XXX: Not all sample instructions need 4 address arguments. */