diff options
| author | Yong He <yonghe@outlook.com> | 2020-10-22 23:44:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-22 23:44:11 -0700 |
| commit | 6d1fe29cdcbca18d559e302d6427a504d1762173 (patch) | |
| tree | c4f2539c4ad926f3a71ee4af5e13e28e3f7b9606 /source/slang/slang-ir-specialize-dispatch.h | |
| parent | 10e1bae34733f1cdb5abc001666b1aafa1c1f406 (diff) | |
Generate `if` based dispatch logic on GPU targets. (#1585)
Diffstat (limited to 'source/slang/slang-ir-specialize-dispatch.h')
| -rw-r--r-- | source/slang/slang-ir-specialize-dispatch.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/slang-ir-specialize-dispatch.h b/source/slang/slang-ir-specialize-dispatch.h new file mode 100644 index 000000000..fe87eb0bf --- /dev/null +++ b/source/slang/slang-ir-specialize-dispatch.h @@ -0,0 +1,13 @@ +// slang-ir-specialize-dispatch.h +#pragma once + +namespace Slang +{ +struct SharedGenericsLoweringContext; + +/// Modifies the body of interface dispatch functions to use branching instead +/// of function pointer calls to implement the dynamic dispatch logic. +/// This is only used on GPU targets where function pointers are not supported +/// or are not efficient. +void specializeDispatchFunctions(SharedGenericsLoweringContext* sharedContext); +} |
