summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-04-27 13:20:12 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-04-27 13:20:51 +0100
commita18c210a95794c79c6f26dbf4c66d4a85e29169d (patch)
treee83ab3b3fc67bc66d6b2e3ec2a9fc2f4dbd537d0 /src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
parent96df6064b57c2313456988882db1950e08536971 (diff)
downloadexternal_mesa3d-a18c210a95794c79c6f26dbf4c66d4a85e29169d.zip
external_mesa3d-a18c210a95794c79c6f26dbf4c66d4a85e29169d.tar.gz
external_mesa3d-a18c210a95794c79c6f26dbf4c66d4a85e29169d.tar.bz2
gallivm: Ensure all allocas are in the first block.
Refactor the code to make this easier.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_format_aos.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_aos.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
index a5a019f..6257e9a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
@@ -40,6 +40,7 @@
#include "lp_bld_init.h"
#include "lp_bld_type.h"
+#include "lp_bld_flow.h"
#include "lp_bld_format.h"
@@ -370,11 +371,7 @@ lp_build_fetch_rgba_aos(LLVMBuilderRef builder,
LLVMAddGlobalMapping(lp_build_engine, function, format_desc->fetch_rgba_float);
}
- /*
- * XXX: this should better go to the first block in the function
- */
-
- tmp = LLVMBuildAlloca(builder, LLVMVectorType(LLVMFloatType(), 4), "");
+ tmp = lp_build_alloca(builder, LLVMVectorType(LLVMFloatType(), 4), "");
/*
* Invoke format_desc->fetch_rgba_float() for each pixel and insert the result