summaryrefslogtreecommitdiff
path: root/source/slang/type-layout.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/type-layout.h')
-rw-r--r--source/slang/type-layout.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/type-layout.h b/source/slang/type-layout.h
index 6f6dad055..c326ae989 100644
--- a/source/slang/type-layout.h
+++ b/source/slang/type-layout.h
@@ -176,6 +176,16 @@ inline LayoutSize maximum(LayoutSize left, LayoutSize right)
right.getFiniteValue()));
}
+inline bool operator>(LayoutSize left, LayoutSize::RawValue right)
+{
+ return left.isInfinite() || (left.getFiniteValue() > right);
+}
+
+inline bool operator<=(LayoutSize left, LayoutSize::RawValue right)
+{
+ return left.isFinite() && (left.getFiniteValue() <= right);
+}
+
// Layout appropriate to "just memory" scenarios,
// such as laying out the members of a constant buffer.
struct UniformLayoutInfo