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 <kenneth@whitecape.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user