summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-06-26 15:49:16 +1000
committerDave Airlie <[email protected]>2019-07-07 16:24:01 +1000
commita845baff169d503386f6eaa22adecc3fa67071db (patch)
tree8d5e5a93bbc209f75c37818e4782816b4c33c193 /src/gallium
parentab807859ea518eb3e1c0f365ed3ffe27025bb471 (diff)
gallivm: move mask_vec function up higher so it can be reused.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index edc66c4a37e..c8002c232d5 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -133,6 +133,21 @@ mask_has_loop(struct lp_exec_mask *mask)
return FALSE;
}
+static LLVMValueRef
+mask_vec(struct lp_build_tgsi_context *bld_base)
+{
+ struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
+ LLVMBuilderRef builder = bld->bld_base.base.gallivm->builder;
+ struct lp_exec_mask *exec_mask = &bld->exec_mask;
+
+ if (!exec_mask->has_mask) {
+ return lp_build_mask_value(bld->mask);
+ }
+ return LLVMBuildAnd(builder, lp_build_mask_value(bld->mask),
+ exec_mask->exec_mask, "");
+}
+
+
/*
* Returns true if we're inside a switch statement.
* It's global, meaning that it returns true even if there's
@@ -3356,20 +3371,6 @@ lod_emit(
FALSE, LP_SAMPLER_OP_LODQ, emit_data->output);
}
-static LLVMValueRef
-mask_vec(struct lp_build_tgsi_context *bld_base)
-{
- struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
- LLVMBuilderRef builder = bld->bld_base.base.gallivm->builder;
- struct lp_exec_mask *exec_mask = &bld->exec_mask;
-
- if (!exec_mask->has_mask) {
- return lp_build_mask_value(bld->mask);
- }
- return LLVMBuildAnd(builder, lp_build_mask_value(bld->mask),
- exec_mask->exec_mask, "");
-}
-
static void
increment_vec_ptr_by_mask(struct lp_build_tgsi_context * bld_base,
LLVMValueRef ptr,