summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2012-02-07 09:52:00 +0000
committerDave Airlie <[email protected]>2012-02-17 17:39:01 +0000
commitf667a6f3cefbfb33478de87c166f7a52ed388fb4 (patch)
tree46946ca9b1b028ec31474119f617667f6174daac /src
parent639fbe2e75bb23a72262a7bc60d69d026b649609 (diff)
gallivm: fix build gather to take a bld context
Then pass the correct build context to it. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 62a938eeefd..5578546089a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -394,19 +394,19 @@ lp_get_output_ptr(struct lp_build_tgsi_soa_context *bld,
* with a little work.
*/
static LLVMValueRef
-build_gather(struct lp_build_tgsi_soa_context *bld,
+build_gather(struct lp_build_context *bld,
LLVMValueRef base_ptr,
LLVMValueRef indexes)
{
- LLVMBuilderRef builder = bld->bld_base.base.gallivm->builder;
- LLVMValueRef res = bld->bld_base.base.undef;
+ LLVMBuilderRef builder = bld->gallivm->builder;
+ LLVMValueRef res = bld->undef;
unsigned i;
/*
* Loop over elements of index_vec, load scalar value, insert it into 'res'.
*/
- for (i = 0; i < bld->bld_base.base.type.length; i++) {
- LLVMValueRef ii = lp_build_const_int32(bld->bld_base.base.gallivm, i);
+ for (i = 0; i < bld->type.length; i++) {
+ LLVMValueRef ii = lp_build_const_int32(bld->gallivm, i);
LLVMValueRef index = LLVMBuildExtractElement(builder,
indexes, ii, "");
LLVMValueRef scalar_ptr = LLVMBuildGEP(builder, base_ptr,
@@ -551,7 +551,7 @@ emit_fetch_constant(
index_vec = lp_build_add(uint_bld, index_vec, swizzle_vec);
/* Gather values from the constant buffer */
- return build_gather(bld, bld->consts_ptr, index_vec);
+ return build_gather(&bld_base->base, bld->consts_ptr, index_vec);
}
else {
LLVMValueRef index; /* index into the const buffer */
@@ -619,7 +619,7 @@ emit_fetch_input(
float4_ptr_type, "");
/* Gather values from the temporary register array */
- res = build_gather(bld, inputs_array, index_vec);
+ res = build_gather(&bld_base->base, inputs_array, index_vec);
} else {
if (bld->indirect_files & (1 << TGSI_FILE_INPUT)) {
LLVMValueRef lindex = lp_build_const_int32(gallivm,
@@ -677,7 +677,7 @@ emit_fetch_temporary(
float4_ptr_type, "");
/* Gather values from the temporary register array */
- res = build_gather(bld, temps_array, index_vec);
+ res = build_gather(&bld_base->base, temps_array, index_vec);
}
else {
LLVMValueRef temp_ptr;