From 6bd876dcaa4403b30eedd5ebe66bfadcef1f1a0c Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 19 Oct 2017 10:11:22 -0700 Subject: 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 Reviewed-by: Kristian H. Kristensen --- src/compiler/spirv/vtn_cfg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/spirv/vtn_cfg.c') 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; } -- cgit v1.2.3