Mesa (master): llvmpipe: (trivial) fix more fallout from the setup cleanup.

Roland Scheidegger sroland at kemper.freedesktop.org
Thu Nov 14 16:00:55 UTC 2013


Module: Mesa
Branch: master
Commit: 473cb3fe4a1bd2e6a271392e41ab121b60889a87
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=473cb3fe4a1bd2e6a271392e41ab121b60889a87

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Thu Nov 14 15:48:30 2013 +0000

llvmpipe: (trivial) fix more fallout from the setup cleanup.

Oops... Should have done some more testing.

---

 src/gallium/drivers/llvmpipe/lp_state_setup.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
index a9d1753..59ab467 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
@@ -131,20 +131,22 @@ emit_facing_coef(struct gallivm_state *gallivm,
    LLVMTypeRef float_type = LLVMFloatTypeInContext(gallivm->context);
    LLVMValueRef a0_0 = args->facing;
    LLVMValueRef a0_0f = LLVMBuildSIToFP(builder, a0_0, float_type, "");
+   LLVMValueRef a0, face_val;
    const unsigned char swizzles[4] = { PIPE_SWIZZLE_RED, PIPE_SWIZZLE_ZERO,
                                        PIPE_SWIZZLE_ZERO, PIPE_SWIZZLE_ZERO };
    /* Our face val is either 1 or 0 so we do
     * face = (val * 2) - 1
     * to make it 1 or -1
     */
-   LLVMValueRef face_val =
+   face_val =
       LLVMBuildFAdd(builder,
                     LLVMBuildFMul(builder, a0_0f,
                                   lp_build_const_float(gallivm, 2.0),
                                   ""),
                     lp_build_const_float(gallivm, -1.0),
                     "facing");
-   LLVMValueRef a0 = lp_build_swizzle_aos(&args->bld, face_val, swizzles);
+   face_val = lp_build_broadcast_scalar(&args->bld, face_val);
+   a0 = lp_build_swizzle_aos(&args->bld, face_val, swizzles);
 
    store_coef(gallivm, args, slot, a0, args->bld.zero, args->bld.zero);
 }




More information about the mesa-commit mailing list