summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_cfg.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-10-19 10:11:22 -0700
committerJason Ekstrand <[email protected]>2017-12-02 08:07:35 -0800
commit6bd876dcaa4403b30eedd5ebe66bfadcef1f1a0c (patch)
tree769f3abfb15b350a4e878d01af9a243a6f2e2ffa /src/compiler/spirv/vtn_cfg.c
parentf5aad36d2e5bd7d699cd6bbbfc8c9866c815f52e (diff)
spirv: Only emit functions which are actually used
Instead of emitting absolutely everything, just emit the few functions that are actually referenced in some way by the entrypoint. This should save us quite a bit of time when handed large shader modules containing many entrypoints. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_cfg.c')
-rw-r--r--src/compiler/spirv/vtn_cfg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c
index 13f02217710..70bbccb7cdd 100644
--- a/src/compiler/spirv/vtn_cfg.c
+++ b/src/compiler/spirv/vtn_cfg.c
@@ -783,4 +783,6 @@ vtn_function_emit(struct vtn_builder *b, struct vtn_function *func,
*/
if (b->has_loop_continue)
nir_repair_ssa_impl(func->impl);
+
+ func->emitted = true;
}