summaryrefslogtreecommitdiff
path: root/source/slang/hlsl.meta.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-02-20 14:42:50 -0800
committerGitHub <noreply@github.com>2023-02-20 14:42:50 -0800
commit47715e625337d489f3c0131bbc2b849378b48a5a (patch)
treebc737c8f03ef537b2ac39860bbb922c7600edc43 /source/slang/hlsl.meta.slang
parent8b05df4187117d61491f2fdbeb7d744146ad73f7 (diff)
Miscellaneous backward autodiff fixes. (#2665)
* Fix differentiable type registration * Fix use of non-differentiable return value in a differentiable func. * Fix use of primal inst that does not dominate the diff block. * Fix primal inst hoisting, and add missing type legalization logic. * Make `detach` defined on all differentiable T. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/hlsl.meta.slang')
-rw-r--r--source/slang/hlsl.meta.slang20
1 files changed, 0 insertions, 20 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang
index 1d2b327d2..7e75d06b3 100644
--- a/source/slang/hlsl.meta.slang
+++ b/source/slang/hlsl.meta.slang
@@ -770,26 +770,6 @@ struct TriangleStream
// Try to terminate the current draw or dispatch call (HLSL SM 4.0)
void abort();
-// Detach and set derivatives to zero
-
-__generic<T : __BuiltinFloatingPointType>
-T detach(T x)
-{
- return x;
-}
-
-__generic<T : __BuiltinFloatingPointType, let N : int>
-vector<T, N> detach(vector<T, N> x)
-{
- return x;
-}
-
-__generic<T : __BuiltinFloatingPointType, let N : int, let M : int>
-matrix<T, N, M> detach(matrix<T, N, M> x)
-{
- return x;
-}
-
// Absolute value (HLSL SM 1.0)
__generic<T : __BuiltinIntegerType>