summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-12-13 12:40:52 -0800
committerGitHub <noreply@github.com>2021-12-13 12:40:52 -0800
commitf024d7299831c0312877e315e8d78b920aaafbaf (patch)
tree51bf3b01e98a8a3d351a2ed313f15a614a2a5c78 /source/core
parent7c1ca35c96096cb0059f0ef23a799bf5952810c5 (diff)
Fixes to `uploadTextureData`. (#2058)
* Fixes to `uploadTextureData`. * Fix, Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-math.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/core/slang-math.h b/source/core/slang-math.h
index 3d229ded8..231e59007 100644
--- a/source/core/slang-math.h
+++ b/source/core/slang-math.h
@@ -163,6 +163,11 @@ namespace Slang
}
}
+ template <typename T>
+ static T getLowestBit(T val)
+ {
+ return val & (-val);
+ }
};
inline int FloatAsInt(float val)
{