summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-26 10:00:47 -0800
committerJason Ekstrand <[email protected]>2015-12-28 09:59:53 -0800
commit237f2f2d8b45d9d956102eec6f9be63193e5269b (patch)
tree1b092bc0121132385b14f3a7ca6c9e7898fd365f /src/gallium/drivers/freedreno/ir3
parent109c348284843054f708f4403260739b7db18275 (diff)
nir: Get rid of function overloads
When Connor originally drafted NIR, he copied the same function+overload system that GLSL IR had with a few names changed. However, this double-indirection is not really needed and has only served to confuse people. Instead, let's just have functions which may not have unique names and may or may not have an implementation. If someone wants to do overload resolving, they can hav a hash table based function+overload system in the overload resolving pass. There's no good reason to keep it in core NIR. Reviewed-by: Connor Abbott <[email protected]> Acked-by: Kenneth Graunke <[email protected]> ir3 bits are Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c8
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
index 44c74b84e34..224f7806b3c 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
@@ -2351,10 +2351,10 @@ emit_instructions(struct ir3_compile *ctx)
nir_function_impl *fxn = NULL;
/* Find the main function: */
- nir_foreach_overload(ctx->s, overload) {
- compile_assert(ctx, strcmp(overload->function->name, "main") == 0);
- compile_assert(ctx, overload->impl);
- fxn = overload->impl;
+ nir_foreach_function(ctx->s, function) {
+ compile_assert(ctx, strcmp(function->name, "main") == 0);
+ compile_assert(ctx, function->impl);
+ fxn = function->impl;
break;
}
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c b/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c
index 4ec0e2bd2ac..6eee2ebbab6 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c
@@ -328,9 +328,9 @@ ir3_nir_lower_if_else(nir_shader *shader)
{
bool progress = false;
- nir_foreach_overload(shader, overload) {
- if (overload->impl)
- progress |= lower_if_else_impl(overload->impl);
+ nir_foreach_function(shader, function) {
+ if (function->impl)
+ progress |= lower_if_else_impl(function->impl);
}
return progress;