summaryrefslogtreecommitdiff
path: root/source/slang/ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/ir.h')
-rw-r--r--source/slang/ir.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/slang/ir.h b/source/slang/ir.h
index 1561d15a7..6e4a25fe1 100644
--- a/source/slang/ir.h
+++ b/source/slang/ir.h
@@ -275,6 +275,17 @@ struct IRVectorType : IRType
IRInst* getElementCount() { return elementCount.usedValue; }
};
+struct IRMatrixType : IRType
+{
+ IRUse elementType;
+ IRUse rowCount;
+ IRUse columnCount;
+
+ IRType* getElementType() { return (IRType*) elementType.usedValue; }
+ IRInst* getRowCount() { return rowCount.usedValue; }
+ IRInst* getColumnCount() { return columnCount.usedValue; }
+};
+
struct IRFuncType : IRType
{
IRUse resultType;
@@ -497,6 +508,10 @@ struct IRBuilder
IRType* getBaseType(BaseType flavor);
IRType* getBoolType();
IRType* getVectorType(IRType* elementType, IRValue* elementCount);
+ IRType* getMatrixType(
+ IRType* elementType,
+ IRValue* rowCount,
+ IRValue* columnCount);
IRType* getTypeType();
IRType* getVoidType();
IRType* getBlockType();
@@ -568,6 +583,17 @@ struct IRBuilder
IRValue* basePtr,
IRStructField* field);
+ IRInst* emitElementExtract(
+ IRType* type,
+ IRValue* base,
+ IRValue* index);
+
+ IRInst* emitElementAddress(
+ IRType* type,
+ IRValue* basePtr,
+ IRValue* index);
+
+
IRInst* emitReturn(
IRValue* val);