aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-05-15 09:59:34 +1000
committerDave Airlie <[email protected]>2020-06-11 06:05:40 +1000
commitd815d74f75aa3a70e4c2d3859cf0cd76d0f2f9d8 (patch)
treec9bb012fb9531ceafbe3bd69d5b6baea8356652f /src/gallium/auxiliary
parente639e311a1a7dfcf04dd14f3d07f5d10b14eded0 (diff)
llvmpipe/draw: drop variant number from function names.
When we use an object cache for the MCJIT we can have identical cache entries from the same shader variant in different shaders, but the JIT objcache uses the function name to relink things, so it has to be consistent. Just drop the variants from the function names. Note the modules still have the variant info. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 06bb4456521..79322e4485b 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -1891,8 +1891,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
memset(&system_values, 0, sizeof(system_values));
memset(&outputs, 0, sizeof(outputs));
- snprintf(func_name, sizeof(func_name), "draw_llvm_vs_variant%u",
- variant->shader->variants_cached);
+ snprintf(func_name, sizeof(func_name), "draw_llvm_vs_variant");
i = 0;
arg_types[i++] = get_context_ptr_type(variant); /* context */
@@ -2693,8 +2692,7 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
memset(&system_values, 0, sizeof(system_values));
memset(&outputs, 0, sizeof(outputs));
- snprintf(func_name, sizeof(func_name), "draw_llvm_gs_variant%u",
- variant->shader->variants_cached);
+ snprintf(func_name, sizeof(func_name), "draw_llvm_gs_variant");
assert(variant->vertex_header_ptr_type);
@@ -3230,11 +3228,9 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
memset(&system_values, 0, sizeof(system_values));
- snprintf(func_name, sizeof(func_name), "draw_llvm_tcs_variant%u",
- variant->shader->variants_cached);
+ snprintf(func_name, sizeof(func_name), "draw_llvm_tcs_variant");
- snprintf(func_name_coro, sizeof(func_name_coro), "draw_llvm_tcs_coro_variant%u",
- variant->shader->variants_cached);
+ snprintf(func_name_coro, sizeof(func_name_coro), "draw_llvm_tcs_coro_variant");
arg_types[0] = get_tcs_context_ptr_type(variant); /* context */
arg_types[1] = variant->input_array_type; /* input */
@@ -3762,8 +3758,7 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
memset(&system_values, 0, sizeof(system_values));
memset(&outputs, 0, sizeof(outputs));
- snprintf(func_name, sizeof(func_name), "draw_llvm_tes_variant%u",
- variant->shader->variants_cached);
+ snprintf(func_name, sizeof(func_name), "draw_llvm_tes_variant");
arg_types[0] = get_tes_context_ptr_type(variant); /* context */
arg_types[1] = variant->input_array_type; /* input */