summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_test_blend.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-08-02 13:52:40 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:22 +0100
commit272dadbe4ebeaeb4f942c0f3c2fd140285b0457c (patch)
tree23ffe9a1f1675139211a4c2c4f176a6420170f5f /src/gallium/drivers/llvmpipe/lp_test_blend.c
parentf478b6fe76452ee910fa9d13ea4b78637a04e747 (diff)
llvmpipe: Introduce a custom typing system.
Straightforward representation of floating-point/fixed-point/integer, normalized/scaled, signed/unsigned SIMD vector types.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_blend.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_blend.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c
index 1621fa79ab..3becac1871 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_blend.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c
@@ -52,6 +52,7 @@
#include "util/u_math.h"
#include "lp_bld.h"
+#include "lp_bld_arit.h"
unsigned verbose = 0;
@@ -64,6 +65,8 @@ static LLVMValueRef
add_blend_test(LLVMModuleRef module,
const struct pipe_blend_state *blend)
{
+ union lp_type type;
+
LLVMTypeRef args[4];
LLVMValueRef func;
LLVMValueRef src_ptr;
@@ -77,6 +80,13 @@ add_blend_test(LLVMModuleRef module,
LLVMValueRef const_;
LLVMValueRef res;
+ type.value = 0;
+ type.kind = LP_TYPE_FLOAT;
+ type.sign = TRUE;
+ type.norm = TRUE;
+ type.width = 32;
+ type.length = 4;
+
args[0] = LLVMPointerType(LLVMVectorType(LLVMFloatType(), 4), 0);
args[1] = LLVMPointerType(LLVMVectorType(LLVMFloatType(), 4), 0);
args[2] = LLVMPointerType(LLVMVectorType(LLVMFloatType(), 4), 0);
@@ -96,7 +106,7 @@ add_blend_test(LLVMModuleRef module,
dst = LLVMBuildLoad(builder, dst_ptr, "dst");
const_ = LLVMBuildLoad(builder, const_ptr, "const");
- res = lp_build_blend(builder, blend, src, dst, const_, 3);
+ res = lp_build_blend(builder, blend, type, src, dst, const_, 3);
LLVMSetValueName(res, "res");