summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/d3d12/d3d12-shader-object-layout.cpp9
-rw-r--r--tools/gfx/d3d12/d3d12-shader-object-layout.h8
2 files changed, 9 insertions, 8 deletions
diff --git a/tools/gfx/d3d12/d3d12-shader-object-layout.cpp b/tools/gfx/d3d12/d3d12-shader-object-layout.cpp
index ef59c3672..c93ddf2cd 100644
--- a/tools/gfx/d3d12/d3d12-shader-object-layout.cpp
+++ b/tools/gfx/d3d12/d3d12-shader-object-layout.cpp
@@ -691,8 +691,8 @@ void RootShaderObjectLayoutImpl::RootSignatureDescBuilder::addAsValue(
void RootShaderObjectLayoutImpl::RootSignatureDescBuilder::addAsConstantBuffer(
slang::TypeLayoutReflection* typeLayout,
Index physicalDescriptorSetIndex,
- BindingRegisterOffsetPair const& offsetForChildrenThatNeedNewSpace,
- BindingRegisterOffsetPair const& offsetForOrdinaryChildren)
+ BindingRegisterOffsetPair offsetForChildrenThatNeedNewSpace,
+ BindingRegisterOffsetPair offsetForOrdinaryChildren)
{
if (typeLayout->getSize(SLANG_PARAMETER_CATEGORY_UNIFORM) != 0)
{
@@ -705,6 +705,7 @@ void RootShaderObjectLayoutImpl::RootSignatureDescBuilder::addAsConstantBuffer(
offsetForOrdinaryChildren.primary.spaceOffset,
1,
false);
+ offsetForRangeType++;
}
addAsValue(typeLayout, physicalDescriptorSetIndex, offsetForChildrenThatNeedNewSpace, offsetForOrdinaryChildren);
@@ -713,8 +714,8 @@ void RootShaderObjectLayoutImpl::RootSignatureDescBuilder::addAsConstantBuffer(
void RootShaderObjectLayoutImpl::RootSignatureDescBuilder::addAsValue(
slang::TypeLayoutReflection* typeLayout,
Index physicalDescriptorSetIndex,
- BindingRegisterOffsetPair const& containerOffset,
- BindingRegisterOffsetPair const& elementOffset)
+ BindingRegisterOffsetPair containerOffset,
+ BindingRegisterOffsetPair elementOffset)
{
// Our first task is to add the binding ranges for stuff that is
// directly contained in `typeLayout` rather than via sub-objects.
diff --git a/tools/gfx/d3d12/d3d12-shader-object-layout.h b/tools/gfx/d3d12/d3d12-shader-object-layout.h
index b8b3082f6..2b27a1d98 100644
--- a/tools/gfx/d3d12/d3d12-shader-object-layout.h
+++ b/tools/gfx/d3d12/d3d12-shader-object-layout.h
@@ -450,14 +450,14 @@ public:
void addAsConstantBuffer(
slang::TypeLayoutReflection* typeLayout,
Index physicalDescriptorSetIndex,
- BindingRegisterOffsetPair const& containerOffset,
- BindingRegisterOffsetPair const& elementOffset);
+ BindingRegisterOffsetPair containerOffset,
+ BindingRegisterOffsetPair elementOffset);
void addAsValue(
slang::TypeLayoutReflection* typeLayout,
Index physicalDescriptorSetIndex,
- BindingRegisterOffsetPair const& containerOffset,
- BindingRegisterOffsetPair const& elementOffset);
+ BindingRegisterOffsetPair containerOffset,
+ BindingRegisterOffsetPair elementOffset);
D3D12_ROOT_SIGNATURE_DESC1& build();
};