llvmpipe: remove misleading debug string
[mesa.git] / src / gallium / drivers / llvmpipe / lp_bld_alpha.c
index a3faa22b9978608091edf8c7a8c254c234f42a6f..e50643790c8aa4c3f6eef0a48e31ada6c118deab 100644 (file)
 
 #include "pipe/p_state.h"
 
-#include "lp_bld_type.h"
-#include "lp_bld_const.h"
-#include "lp_bld_arit.h"
-#include "lp_bld_logic.h"
-#include "lp_bld_debug.h"
+#include "gallivm/lp_bld_type.h"
+#include "gallivm/lp_bld_const.h"
+#include "gallivm/lp_bld_logic.h"
+#include "gallivm/lp_bld_flow.h"
+#include "gallivm/lp_bld_debug.h"
+
 #include "lp_bld_alpha.h"
 
 
-LLVMValueRef
+void
 lp_build_alpha_test(LLVMBuilderRef builder,
-                    const struct pipe_alpha_state *state,
-                    union lp_type type,
+                    unsigned func,
+                    struct lp_type type,
+                    struct lp_build_mask_context *mask,
                     LLVMValueRef alpha,
-                    LLVMValueRef mask)
+                    LLVMValueRef ref,
+                    boolean do_branch)
 {
    struct lp_build_context bld;
+   LLVMValueRef test;
 
    lp_build_context_init(&bld, builder, type);
 
-   if(state->enabled) {
-      LLVMValueRef ref = lp_build_const_uni(type, state->ref_value);
-      LLVMValueRef test = lp_build_cmp(&bld, state->func, alpha, ref);
+   test = lp_build_cmp(&bld, func, alpha, ref);
 
-      lp_build_name(test, "alpha_mask");
+   lp_build_name(test, "alpha_mask");
 
-      if(mask)
-         mask = LLVMBuildAnd(builder, mask, test, "");
-      else
-         mask = test;
-   }
+   lp_build_mask_update(mask, test);
 
-   return mask;
+   if (do_branch)
+      lp_build_mask_check(mask);
 }