struct lp_setup_variant *variant = NULL;
struct gallivm_state *gallivm;
struct lp_setup_args args;
- char func_name[256];
+ char func_name[64];
LLVMTypeRef vec4f_type;
LLVMTypeRef func_type;
LLVMTypeRef arg_types[7];
if (variant == NULL)
goto fail;
- variant->gallivm = gallivm = gallivm_create();
+ variant->no = setup_no++;
+
+ util_snprintf(func_name, sizeof(func_name), "setup_variant_%u",
+ variant->no);
+
+ variant->gallivm = gallivm = gallivm_create(func_name, lp->context);
if (!variant->gallivm) {
goto fail;
}
builder = gallivm->builder;
- variant->no = setup_no++;
if (LP_DEBUG & DEBUG_COUNTERS) {
t0 = os_time_get();
memcpy(&variant->key, key, key->size);
variant->list_item_global.base = variant;
- util_snprintf(func_name, sizeof(func_name), "setup_variant_%u",
- variant->no);
-
/* Currently always deal with full 4-wide vertex attributes from
* the vertices.
*/