summaryrefslogtreecommitdiff
path: root/tools/gfx/d3d11
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-11-01 21:42:12 -0700
committerGitHub <noreply@github.com>2023-11-01 21:42:12 -0700
commit6aca3813c4ccc496c0f9b2db293acb546aa11d2d (patch)
tree5281f0ac62946787db90409c1ab3da5ed3f0fc5c /tools/gfx/d3d11
parent532c4322c9d9ab2c95a5bb573c89062456b59236 (diff)
Parameter binding and gfx fixes. (#3302)
* Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/d3d11')
-rw-r--r--tools/gfx/d3d11/d3d11-shader-object-layout.cpp2
-rw-r--r--tools/gfx/d3d11/d3d11-shader-object-layout.h3
-rw-r--r--tools/gfx/d3d11/d3d11-shader-object.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/tools/gfx/d3d11/d3d11-shader-object-layout.cpp b/tools/gfx/d3d11/d3d11-shader-object-layout.cpp
index ff1c5d03c..8032719b0 100644
--- a/tools/gfx/d3d11/d3d11-shader-object-layout.cpp
+++ b/tools/gfx/d3d11/d3d11-shader-object-layout.cpp
@@ -51,7 +51,7 @@ Result ShaderObjectLayoutImpl::Builder::setElementTypeLayout(slang::TypeLayoutRe
BindingRangeInfo bindingRangeInfo;
bindingRangeInfo.bindingType = slangBindingType;
bindingRangeInfo.count = count;
-
+ bindingRangeInfo.isSpecializable = typeLayout->isBindingRangeSpecializable(r);
switch (slangBindingType)
{
case slang::BindingType::ConstantBuffer:
diff --git a/tools/gfx/d3d11/d3d11-shader-object-layout.h b/tools/gfx/d3d11/d3d11-shader-object-layout.h
index 717f270bc..e029a7b76 100644
--- a/tools/gfx/d3d11/d3d11-shader-object-layout.h
+++ b/tools/gfx/d3d11/d3d11-shader-object-layout.h
@@ -52,6 +52,9 @@ public:
/// An index into the sub-object array if this binding range is treated
/// as a sub-object.
Index subObjectIndex;
+
+ /// Is this binding range specializable, e.g. an existential value or ParameterBlock<IFoo>.
+ bool isSpecializable;
};
// Sometimes we just want to iterate over the ranges that represent
diff --git a/tools/gfx/d3d11/d3d11-shader-object.cpp b/tools/gfx/d3d11/d3d11-shader-object.cpp
index 0354b3fdb..285cc60b6 100644
--- a/tools/gfx/d3d11/d3d11-shader-object.cpp
+++ b/tools/gfx/d3d11/d3d11-shader-object.cpp
@@ -334,7 +334,7 @@ Result ShaderObjectImpl::bindAsConstantBuffer(
// Note that this call will use the `offset` value that might have
// been modified during `_bindOrindaryDataBufferIfNeeded`.
//
- SLANG_RETURN_ON_FAIL(bindAsValue(context, offset, specializedLayout));
+ SLANG_RETURN_ON_FAIL(bindAsValue(context, inOffset, specializedLayout));
return SLANG_OK;
}