summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/lower-to-ir.cpp1
-rw-r--r--source/slang/parameter-binding.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp
index 428044830..0970eef98 100644
--- a/source/slang/lower-to-ir.cpp
+++ b/source/slang/lower-to-ir.cpp
@@ -2549,6 +2549,7 @@ struct StmtLoweringVisitor : StmtVisitor<StmtLoweringVisitor>
// (and that control flow will fall through to otherwise).
// This is the block that subsequent code will go into.
insertBlock(breakLabel);
+ context->shared->breakLabels.Remove(stmt);
}
};
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp
index b0d90d435..3ff2be61f 100644
--- a/source/slang/parameter-binding.cpp
+++ b/source/slang/parameter-binding.cpp
@@ -2492,14 +2492,14 @@ RefPtr<ProgramLayout> specializeProgramLayout(
for (UInt i = 0; i < varLayout->resourceInfos.Count(); i++)
{
auto resInfo = varLayout->resourceInfos[i];
- auto tresInfo = varLayout->typeLayout->resourceInfos[i];
- SLANG_ASSERT(resInfo.kind == tresInfo.kind);
+ auto tresInfo = varLayout->typeLayout->FindResourceInfo(resInfo.kind);
+ SLANG_ASSERT(tresInfo);
auto usedRangeSet = findUsedRangeSetForSpace(&context, resInfo.space);
markSpaceUsed(&context, resInfo.space);
usedRangeSet->usedResourceRanges[(int)resInfo.kind].Add(
nullptr, // we don't need to track parameter info here
resInfo.index,
- resInfo.index + tresInfo.count);
+ resInfo.index + tresInfo->count);
}
structLayout->fields[varId] = varLayout;
varLayoutMapping[varLayout] = varLayout;