summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2014-05-16 01:00:53 +0200
committerRoland Scheidegger <[email protected]>2014-05-16 22:50:14 +0200
commit26cac02c51db0f49f6c67d3cd029ce044a087473 (patch)
tree7b6d73ec23ee447239a30cf5385ff9ae6e0b8b42 /src/gallium/auxiliary/draw
parentef6b6658f91bd5871739bdb71a08042f26abe389 (diff)
gallivm: give more verbose names to modules
When we had just one module "gallivm" was an appropriate name. But now we have modules containing all functions for a particular variant, so give it a corresponding name (this is really just for helping debugging). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 3624d930f61..d29adfbea3e 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -525,6 +525,7 @@ draw_llvm_create_variant(struct draw_llvm *llvm,
struct llvm_vertex_shader *shader =
llvm_vertex_shader(llvm->draw->vs.vertex_shader);
LLVMTypeRef vertex_header;
+ char module_name[64];
variant = MALLOC(sizeof *variant +
shader->variant_key_size -
@@ -535,7 +536,10 @@ draw_llvm_create_variant(struct draw_llvm *llvm,
variant->llvm = llvm;
variant->shader = shader;
- variant->gallivm = gallivm_create();
+ util_snprintf(module_name, sizeof(module_name), "draw_llvm_vs_variant%u",
+ variant->shader->variants_cached);
+
+ variant->gallivm = gallivm_create(module_name);
create_jit_types(variant);
@@ -1513,8 +1517,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
memset(&system_values, 0, sizeof(system_values));
- util_snprintf(func_name, sizeof(func_name), "draw_llvm_vs_variant%u%s",
- variant->shader->variants_cached, elts ? "_elts" : "");
+ util_snprintf(func_name, sizeof(func_name), "draw_llvm_vs_variant%u_%s",
+ variant->shader->variants_cached, elts ? "elts" : "linear");
i = 0;
arg_types[i++] = get_context_ptr_type(variant); /* context */
@@ -2177,6 +2181,7 @@ draw_gs_llvm_create_variant(struct draw_llvm *llvm,
struct llvm_geometry_shader *shader =
llvm_geometry_shader(llvm->draw->gs.geometry_shader);
LLVMTypeRef vertex_header;
+ char module_name[64];
variant = MALLOC(sizeof *variant +
shader->variant_key_size -
@@ -2187,7 +2192,10 @@ draw_gs_llvm_create_variant(struct draw_llvm *llvm,
variant->llvm = llvm;
variant->shader = shader;
- variant->gallivm = gallivm_create();
+ util_snprintf(module_name, sizeof(module_name), "draw_llvm_gs_variant%u",
+ variant->shader->variants_cached);
+
+ variant->gallivm = gallivm_create(module_name);
create_gs_jit_types(variant);