diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-07-14 12:07:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-14 12:07:45 -0700 |
| commit | ffa7f2a9e919be6f155d1c6e62e85827ffc6e3bd (patch) | |
| tree | fb6ab85174f2f630dd49910bc69bb23309f9eee0 /source/slang/lower.cpp | |
| parent | d9366db8993c566fbb0af780c13db438dbf74022 (diff) | |
| parent | f4ac13d6718d6433f69eb21311110c8225a95aee (diff) | |
Merge pull request #90 from tfoleyNV/cbuffer-field-layout-fix
Adjust type layout when parameter block constains member using the sa…
Diffstat (limited to 'source/slang/lower.cpp')
| -rw-r--r-- | source/slang/lower.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/source/slang/lower.cpp b/source/slang/lower.cpp index c7278201a..caa1ab075 100644 --- a/source/slang/lower.cpp +++ b/source/slang/lower.cpp @@ -1828,25 +1828,6 @@ struct LoweringVisitor needsOffset = true; break; } - - // Even if the base offset of the parent is zero, we may still - // need to offset the child, because the parent consumes a - // resources of the same kind... - if (primaryVarLayout->typeLayout->type->As<UniformParameterBlockType>()) - { - switch (rr.kind) - { - default: - break; - - case LayoutResourceKind::ConstantBuffer: - case LayoutResourceKind::DescriptorTableSlot: - needsOffset = true; - break; - } - if (needsOffset) - break; - } } } if (needsOffset) @@ -1867,22 +1848,6 @@ struct LoweringVisitor { newResInfo->index += parentInfo->index; newResInfo->space += parentInfo->space; - - // Very special-case hack to deal with the case where the parent - // itself consumes a resources of the same type as the field. - if (primaryVarLayout->typeLayout->type->As<UniformParameterBlockType>()) - { - switch (resInfo.kind) - { - default: - break; - - case LayoutResourceKind::ConstantBuffer: - case LayoutResourceKind::DescriptorTableSlot: - newResInfo->index += 1; - break; - } - } } } |
