summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-10-09 21:14:05 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-10-09 21:14:05 +0100
commitd0ea4641597d23df2198fd76ed7430c06cef8c5d (patch)
tree54b19f7d2938bb3b5b5fa6fe162f4726f6cd66ba /src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
parent1949f8c31507ed4a8774c380e6b604c328f4ec98 (diff)
gallivm: Simplify if/then/else implementation.
No need for for a flow stack anymore.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 3b63ac6f62..75130e1c54 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -881,19 +881,16 @@ lp_build_sample_mipmap(struct lp_build_sample_context *bld,
}
if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) {
- struct lp_build_flow_context *flow_ctx;
struct lp_build_if_state if_ctx;
LLVMValueRef need_lerp;
- flow_ctx = lp_build_flow_create(builder);
-
/* need_lerp = lod_fpart > 0 */
need_lerp = LLVMBuildFCmp(builder, LLVMRealUGT,
lod_fpart,
bld->float_bld.zero,
"need_lerp");
- lp_build_if(&if_ctx, flow_ctx, builder, need_lerp);
+ lp_build_if(&if_ctx, builder, need_lerp);
{
/* sample the second mipmap level */
lp_build_mipmap_level_sizes(bld, ilevel1,
@@ -926,8 +923,6 @@ lp_build_sample_mipmap(struct lp_build_sample_context *bld,
}
}
lp_build_endif(&if_ctx);
-
- lp_build_flow_destroy(flow_ctx);
}
}
@@ -1063,17 +1058,14 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
/* Emit conditional to choose min image filter or mag image filter
* depending on the lod being > 0 or <= 0, respectively.
*/
- struct lp_build_flow_context *flow_ctx;
struct lp_build_if_state if_ctx;
LLVMValueRef minify;
- flow_ctx = lp_build_flow_create(builder);
-
/* minify = lod >= 0.0 */
minify = LLVMBuildICmp(builder, LLVMIntSGE,
lod_ipart, int_bld->zero, "");
- lp_build_if(&if_ctx, flow_ctx, builder, minify);
+ lp_build_if(&if_ctx, builder, minify);
{
/* Use the minification filter */
lp_build_sample_mipmap(bld, unit,
@@ -1092,8 +1084,6 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
texels);
}
lp_build_endif(&if_ctx);
-
- lp_build_flow_destroy(flow_ctx);
}
for (chan = 0; chan < 4; ++chan) {