summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-11-12 21:01:47 -0800
committerGitHub <noreply@github.com>2024-11-12 21:01:47 -0800
commit0754abee603c1afa7803a444124acc9d268d2f0a (patch)
tree016bf4c03ff58595c62ec94e902137b1191e5960 /source/slang/slang-ir.cpp
parent567c7e09b6df36b535c4ffbccd6a3658d18e04c2 (diff)
Push buffer load to end of access chain. (#5544)
* Push buffer load to end of access chain. * Update test. * Fix. * Fix. * Fix. * Make more robust. * Fix.
Diffstat (limited to 'source/slang/slang-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index 823b3cd7d..5e4db43b2 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -6175,7 +6175,7 @@ IRInst* IRBuilder::emitGenericAsm(UnownedStringSlice asmText)
IRInst* IRBuilder::emitRWStructuredBufferGetElementPtr(IRInst* structuredBuffer, IRInst* index)
{
- const auto sbt = cast<IRHLSLRWStructuredBufferType>(structuredBuffer->getDataType());
+ const auto sbt = cast<IRHLSLStructuredBufferTypeBase>(structuredBuffer->getDataType());
const auto t = getPtrType(sbt->getElementType());
IRInst* const operands[2] = {structuredBuffer, index};
const auto i = createInst<IRRWStructuredBufferGetElementPtr>(