summaryrefslogtreecommitdiff
path: root/source/slang/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/compiler.h')
-rw-r--r--source/slang/compiler.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/slang/compiler.h b/source/slang/compiler.h
index 526168e3a..8e578f95f 100644
--- a/source/slang/compiler.h
+++ b/source/slang/compiler.h
@@ -73,6 +73,18 @@ namespace Slang
Binary
};
+ // When storing the layout for a matrix-type
+ // value, we need to know whether it has been
+ // laid ot with row-major or column-major
+ // storage.
+ //
+ enum MatrixLayoutMode
+ {
+ kMatrixLayoutMode_RowMajor = SLANG_MATRIX_LAYOUT_ROW_MAJOR,
+ kMatrixLayoutMode_ColumnMajor = SLANG_MATRIX_LAYOUT_COLUMN_MAJOR,
+ };
+
+
class CompileRequest;
class TranslationUnitRequest;
@@ -221,6 +233,10 @@ namespace Slang
// TypeLayouts created on the fly by reflection API
Dictionary<Type*, RefPtr<TypeLayout>> typeLayouts;
+
+ /// The layout to use for matrices by default (row/column major)
+ MatrixLayoutMode defaultMatrixLayoutMode = kMatrixLayoutMode_ColumnMajor;
+ MatrixLayoutMode getDefaultMatrixLayoutMode() { return defaultMatrixLayoutMode; }
};
// Compute the "effective" profile to use when outputting the given entry point