summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_private.h
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_private.h
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_private.h')
-rw-r--r--src/compiler/spirv/vtn_private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
index 173a7b3d7c7..751f5011b7d 100644
--- a/src/compiler/spirv/vtn_private.h
+++ b/src/compiler/spirv/vtn_private.h
@@ -159,6 +159,9 @@ struct vtn_block {
struct vtn_function {
struct exec_node node;
+ bool referenced;
+ bool emitted;
+
nir_function_impl *impl;
struct vtn_block *start_block;