llvmpipe/setup: move line stats collection earlier.
[mesa.git] / src / gallium / drivers / llvmpipe / lp_test_blend.c
index 9139b83f05a238b1a6acdc4a1910c13461808c2d..98d6bbe50d4ecffe8fedb84436be2e4669fe8d2d 100644 (file)
@@ -95,12 +95,12 @@ write_tsv_row(FILE *fp,
 
    fprintf(fp,
            "%s\t%s\t%s\t%s\t%s\t%s\n",
-           util_dump_blend_func(blend->rt[0].rgb_func, TRUE),
-           util_dump_blend_factor(blend->rt[0].rgb_src_factor, TRUE),
-           util_dump_blend_factor(blend->rt[0].rgb_dst_factor, TRUE),
-           util_dump_blend_func(blend->rt[0].alpha_func, TRUE),
-           util_dump_blend_factor(blend->rt[0].alpha_src_factor, TRUE),
-           util_dump_blend_factor(blend->rt[0].alpha_dst_factor, TRUE));
+           util_str_blend_func(blend->rt[0].rgb_func, TRUE),
+           util_str_blend_factor(blend->rt[0].rgb_src_factor, TRUE),
+           util_str_blend_factor(blend->rt[0].rgb_dst_factor, TRUE),
+           util_str_blend_func(blend->rt[0].alpha_func, TRUE),
+           util_str_blend_factor(blend->rt[0].alpha_src_factor, TRUE),
+           util_str_blend_factor(blend->rt[0].alpha_dst_factor, TRUE));
 
    fflush(fp);
 }
@@ -119,12 +119,12 @@ dump_blend_type(FILE *fp,
 
    fprintf(fp,
            " %s=%s %s=%s %s=%s %s=%s %s=%s %s=%s",
-           "rgb_func",         util_dump_blend_func(blend->rt[0].rgb_func, TRUE),
-           "rgb_src_factor",   util_dump_blend_factor(blend->rt[0].rgb_src_factor, TRUE),
-           "rgb_dst_factor",   util_dump_blend_factor(blend->rt[0].rgb_dst_factor, TRUE),
-           "alpha_func",       util_dump_blend_func(blend->rt[0].alpha_func, TRUE),
-           "alpha_src_factor", util_dump_blend_factor(blend->rt[0].alpha_src_factor, TRUE),
-           "alpha_dst_factor", util_dump_blend_factor(blend->rt[0].alpha_dst_factor, TRUE));
+           "rgb_func",         util_str_blend_func(blend->rt[0].rgb_func, TRUE),
+           "rgb_src_factor",   util_str_blend_factor(blend->rt[0].rgb_src_factor, TRUE),
+           "rgb_dst_factor",   util_str_blend_factor(blend->rt[0].rgb_dst_factor, TRUE),
+           "alpha_func",       util_str_blend_func(blend->rt[0].alpha_func, TRUE),
+           "alpha_src_factor", util_str_blend_factor(blend->rt[0].alpha_src_factor, TRUE),
+           "alpha_dst_factor", util_str_blend_factor(blend->rt[0].alpha_dst_factor, TRUE));
 
    fprintf(fp, " ...\n");
    fflush(fp);
@@ -437,6 +437,7 @@ test_one(unsigned verbose,
          const struct pipe_blend_state *blend,
          struct lp_type type)
 {
+   LLVMContextRef context;
    struct gallivm_state *gallivm;
    LLVMValueRef func = NULL;
    blend_test_ptr_t blend_test_ptr;
@@ -450,7 +451,8 @@ test_one(unsigned verbose,
    if(verbose >= 1)
       dump_blend_type(stdout, blend, type);
 
-   gallivm = gallivm_create("test_module", LLVMGetGlobalContext());
+   context = LLVMContextCreate();
+   gallivm = gallivm_create("test_module", context);
 
    func = add_blend_test(gallivm, blend, type);
 
@@ -579,6 +581,7 @@ test_one(unsigned verbose,
       write_tsv_row(fp, blend, type, cycles_avg, success);
 
    gallivm_destroy(gallivm);
+   LLVMContextDispose(context);
 
    return success;
 }