Mesa (master): gallivm: prefer blendvb for integer arguments

Keith Whitwell keithw at kemper.freedesktop.org
Sat Oct 9 10:46:37 UTC 2010


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

Author: Keith Whitwell <keithw at vmware.com>
Date:   Wed Oct  6 19:10:30 2010 +0100

gallivm: prefer blendvb for integer arguments

---

 src/gallium/auxiliary/gallivm/lp_bld_logic.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
index ce5d021..026b60a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
@@ -462,10 +462,12 @@ lp_build_select(struct lp_build_context *bld,
       LLVMTypeRef arg_type;
       LLVMValueRef args[3];
 
-      if (type.width == 64) {
+      if (type.floating &&
+          type.width == 64) {
          intrinsic = "llvm.x86.sse41.blendvpd";
          arg_type = LLVMVectorType(LLVMDoubleType(), 2);
-      } else if (type.width == 32) {
+      } else if (type.floating &&
+                 type.width == 32) {
          intrinsic = "llvm.x86.sse41.blendvps";
          arg_type = LLVMVectorType(LLVMFloatType(), 4);
       } else {




More information about the mesa-commit mailing list