summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir.h')
-rw-r--r--source/slang/slang-ir.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/slang/slang-ir.h b/source/slang/slang-ir.h
index 69a000b81..161e70b25 100644
--- a/source/slang/slang-ir.h
+++ b/source/slang/slang-ir.h
@@ -695,6 +695,12 @@ struct IRInst
IRUse* getOperands();
+ IRUse* getOperandUse(UInt index)
+ {
+ SLANG_ASSERT(index < getOperandCount());
+ return getOperands() + index;
+ }
+
IRInst* getOperand(UInt index)
{
SLANG_ASSERT(index < getOperandCount());
@@ -1533,7 +1539,7 @@ struct IRUniformParameterGroupType : IRParameterGroupType
FIDDLE()
-struct IRGLSLShaderStorageBufferType : IRBuiltinGenericType
+struct IRGLSLShaderStorageBufferType : IRPointerLikeType
{
FIDDLE(leafInst())
IRType* getDataLayout() { return (IRType*)getOperand(1); }
@@ -1760,6 +1766,8 @@ struct IRGetStringHash : IRInst
/// The given IR `builder` will be used if new instructions need to be created.
IRType* tryGetPointedToType(IRBuilder* builder, IRType* type);
+IRType* tryGetPointedToOrBufferElementType(IRBuilder* builder, IRType* type);
+
FIDDLE()
struct IRFuncType : IRType
{