diff options
Diffstat (limited to 'source/slang/slang-ir-lower-append-consume-structured-buffer.cpp')
| -rw-r--r-- | source/slang/slang-ir-lower-append-consume-structured-buffer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/slang/slang-ir-lower-append-consume-structured-buffer.cpp b/source/slang/slang-ir-lower-append-consume-structured-buffer.cpp index 5a7c7ee1c..1d4f10bb9 100644 --- a/source/slang/slang-ir-lower-append-consume-structured-buffer.cpp +++ b/source/slang/slang-ir-lower-append-consume-structured-buffer.cpp @@ -33,8 +33,12 @@ namespace Slang builder.addDecoration(elementBufferKey, kIROp_CounterBufferDecoration, counterBufferKey); - auto elementBufferType = builder.getType(kIROp_HLSLRWStructuredBufferType, elementType); - auto counterBufferType = builder.getType(kIROp_HLSLRWStructuredBufferType, builder.getIntType()); + IRInst* operands[2] = { elementType, type->getDataLayout() }; + auto elementBufferType = builder.getType(kIROp_HLSLRWStructuredBufferType, 2, operands); + + operands[0] = builder.getIntType(); + operands[1] = builder.getType(kIROp_DefaultBufferLayoutType); + auto counterBufferType = builder.getType(kIROp_HLSLRWStructuredBufferType, 2, operands); builder.createStructField(structType, elementBufferKey, elementBufferType); builder.createStructField(structType, counterBufferKey, counterBufferType); |
