summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_bld_type.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-09-17 12:44:24 +0200
committerMichal Krol <michal@vmware.com>2009-09-17 12:44:24 +0200
commit2a661c383fee65bc4413541e706925fa3e9b9cf5 (patch)
treedbea0c9d65d17b81720fe2f161604dfc91eb0546 /src/gallium/drivers/llvmpipe/lp_bld_type.c
parent90daefd1c474a6e0502df5053b581987c12b8673 (diff)
parent21caa29fbd332a2ee05a58df91e1664fbbc4e61f (diff)
Merge commit 'origin/master' into glsl-pp-rework-2
Conflicts: src/gallium/winsys/gdi/SConscript
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_type.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_type.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_type.c b/src/gallium/drivers/llvmpipe/lp_bld_type.c
index 577644b7ab..606243d6c5 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_type.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_type.c
@@ -33,7 +33,7 @@
LLVMTypeRef
-lp_build_elem_type(union lp_type type)
+lp_build_elem_type(struct lp_type type)
{
if (type.floating) {
switch(type.width) {
@@ -55,7 +55,7 @@ lp_build_elem_type(union lp_type type)
LLVMTypeRef
-lp_build_vec_type(union lp_type type)
+lp_build_vec_type(struct lp_type type)
{
LLVMTypeRef elem_type = lp_build_elem_type(type);
return LLVMVectorType(elem_type, type.length);
@@ -69,7 +69,7 @@ lp_build_vec_type(union lp_type type)
* type and check for identity.
*/
boolean
-lp_check_elem_type(union lp_type type, LLVMTypeRef elem_type)
+lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type)
{
LLVMTypeKind elem_kind;
@@ -107,7 +107,7 @@ lp_check_elem_type(union lp_type type, LLVMTypeRef elem_type)
boolean
-lp_check_vec_type(union lp_type type, LLVMTypeRef vec_type)
+lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type)
{
LLVMTypeRef elem_type;
@@ -128,7 +128,7 @@ lp_check_vec_type(union lp_type type, LLVMTypeRef vec_type)
boolean
-lp_check_value(union lp_type type, LLVMValueRef val)
+lp_check_value(struct lp_type type, LLVMValueRef val)
{
LLVMTypeRef vec_type;
@@ -143,25 +143,26 @@ lp_check_value(union lp_type type, LLVMValueRef val)
LLVMTypeRef
-lp_build_int_elem_type(union lp_type type)
+lp_build_int_elem_type(struct lp_type type)
{
return LLVMIntType(type.width);
}
LLVMTypeRef
-lp_build_int_vec_type(union lp_type type)
+lp_build_int_vec_type(struct lp_type type)
{
LLVMTypeRef elem_type = lp_build_int_elem_type(type);
return LLVMVectorType(elem_type, type.length);
}
-union lp_type
-lp_int_type(union lp_type type)
+struct lp_type
+lp_int_type(struct lp_type type)
{
- union lp_type int_type;
- int_type.value = 0;
+ struct lp_type int_type;
+
+ memset(&int_type, 0, sizeof int_type);
int_type.width = type.width;
int_type.length = type.length;
return int_type;
@@ -171,7 +172,7 @@ lp_int_type(union lp_type type)
void
lp_build_context_init(struct lp_build_context *bld,
LLVMBuilderRef builder,
- union lp_type type)
+ struct lp_type type)
{
bld->builder = builder;
bld->type = type;