diff options
| author | Yong He <yonghe@outlook.com> | 2025-08-06 15:56:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-06 22:56:27 +0000 |
| commit | de7ccaf127d8bb847a0ad25f45e8d1902dc1b958 (patch) | |
| tree | 77cf9c35e6f04a416da7932adc1aa23ff7b25a1e /source | |
| parent | b9f999b74301665d793357e8b78da3b8de9473da (diff) | |
Fix unused space discovery for bindless heap. (#8075)
Diffstat (limited to 'source')
| -rw-r--r-- | source/compiler-core/slang-artifact-associated-impl.h | 1 | ||||
| -rw-r--r-- | source/slang/slang-ir-lower-dynamic-resource-heap.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source/compiler-core/slang-artifact-associated-impl.h b/source/compiler-core/slang-artifact-associated-impl.h index 6ae01626a..9f60c51b6 100644 --- a/source/compiler-core/slang-artifact-associated-impl.h +++ b/source/compiler-core/slang-artifact-associated-impl.h @@ -166,6 +166,7 @@ struct ShaderBindingRange case slang::VaryingInput: case slang::VaryingOutput: case slang::SpecializationConstant: + case slang::SubElementRegisterSpace: return true; default: return false; diff --git a/source/slang/slang-ir-lower-dynamic-resource-heap.cpp b/source/slang/slang-ir-lower-dynamic-resource-heap.cpp index b2199a174..495795cca 100644 --- a/source/slang/slang-ir-lower-dynamic-resource-heap.cpp +++ b/source/slang/slang-ir-lower-dynamic-resource-heap.cpp @@ -11,7 +11,7 @@ UInt findUnusedSpaceIndex(TargetProgram* targetProgram, IRModule* module) auto processVarLayout = [&](IRVarLayout* varLayout) { UInt spaceOffset = 0; - if (auto spaceAttr = varLayout->findOffsetAttr(LayoutResourceKind::RegisterSpace)) + if (auto spaceAttr = varLayout->findOffsetAttr(LayoutResourceKind::SubElementRegisterSpace)) { spaceOffset = spaceAttr->getOffset(); } |
