Skip to content

Commit 5e188f0

Browse files
Replace SHADER_RESOURCE_TYPE_INLINE_CONSTANTS type with PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS flag (#672)
1 parent 2a86179 commit 5e188f0

File tree

16 files changed

+83
-71
lines changed

16 files changed

+83
-71
lines changed

Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ const Char* GetShaderVariableTypeLiteralName(SHADER_RESOURCE_VARIABLE_TYPE VarTy
862862

863863
const Char* GetShaderResourceTypeLiteralName(SHADER_RESOURCE_TYPE ResourceType, bool bGetFullName)
864864
{
865-
static_assert(SHADER_RESOURCE_TYPE_LAST == 9, "Please update the switch below to handle the new shader resource type");
865+
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update the switch below to handle the new shader resource type");
866866
switch (ResourceType)
867867
{
868868
// clang-format off
@@ -874,7 +874,6 @@ const Char* GetShaderResourceTypeLiteralName(SHADER_RESOURCE_TYPE ResourceType,
874874
case SHADER_RESOURCE_TYPE_BUFFER_UAV: return bGetFullName ? "SHADER_RESOURCE_TYPE_BUFFER_UAV" : "buffer UAV";
875875
case SHADER_RESOURCE_TYPE_SAMPLER: return bGetFullName ? "SHADER_RESOURCE_TYPE_SAMPLER" : "sampler";
876876
case SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT: return bGetFullName ? "SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT" : "input attachment";
877-
case SHADER_RESOURCE_TYPE_INLINE_CONSTANTS: return bGetFullName ? "SHADER_RESOURCE_TYPE_INLINE_CONSTANTS" : "inline constants";
878877
case SHADER_RESOURCE_TYPE_ACCEL_STRUCT: return bGetFullName ? "SHADER_RESOURCE_TYPE_ACCEL_STRUCT" : "acceleration structure";
879878
// clang-format on
880879
default:
@@ -1638,7 +1637,7 @@ String GetPipelineResourceFlagsString(PIPELINE_RESOURCE_FLAGS Flags, bool GetFul
16381637

16391638
PIPELINE_RESOURCE_FLAGS Flag = ExtractLSB(Flags);
16401639

1641-
static_assert(PIPELINE_RESOURCE_FLAG_LAST == (1u << 4), "Please update the switch below to handle the new pipeline resource flag.");
1640+
static_assert(PIPELINE_RESOURCE_FLAG_LAST == (1u << 5), "Please update the switch below to handle the new pipeline resource flag.");
16421641
switch (Flag)
16431642
{
16441643
case PIPELINE_RESOURCE_FLAG_NO_DYNAMIC_BUFFERS:
@@ -1661,6 +1660,10 @@ String GetPipelineResourceFlagsString(PIPELINE_RESOURCE_FLAGS Flags, bool GetFul
16611660
Str.append(GetFullName ? "PIPELINE_RESOURCE_FLAG_GENERAL_INPUT_ATTACHMENT" : "GENERAL_INPUT_ATTACHMENT");
16621661
break;
16631662

1663+
case PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS:
1664+
Str.append(GetFullName ? "PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS" : "INLINE_CONSTANTS");
1665+
break;
1666+
16641667
default:
16651668
UNEXPECTED("Unexpected pipeline resource flag");
16661669
}
@@ -1805,11 +1808,11 @@ String GetLayoutElementString(const LayoutElement& Element)
18051808

18061809
PIPELINE_RESOURCE_FLAGS GetValidPipelineResourceFlags(SHADER_RESOURCE_TYPE ResourceType)
18071810
{
1808-
static_assert(SHADER_RESOURCE_TYPE_LAST == 9, "Please update the switch below to handle the new shader resource type");
1811+
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update the switch below to handle the new shader resource type");
18091812
switch (ResourceType)
18101813
{
18111814
case SHADER_RESOURCE_TYPE_CONSTANT_BUFFER:
1812-
return PIPELINE_RESOURCE_FLAG_NO_DYNAMIC_BUFFERS | PIPELINE_RESOURCE_FLAG_RUNTIME_ARRAY;
1815+
return PIPELINE_RESOURCE_FLAG_NO_DYNAMIC_BUFFERS | PIPELINE_RESOURCE_FLAG_RUNTIME_ARRAY | PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS;
18131816

18141817
case SHADER_RESOURCE_TYPE_TEXTURE_SRV:
18151818
return PIPELINE_RESOURCE_FLAG_COMBINED_SAMPLER | PIPELINE_RESOURCE_FLAG_RUNTIME_ARRAY;
@@ -1829,9 +1832,6 @@ PIPELINE_RESOURCE_FLAGS GetValidPipelineResourceFlags(SHADER_RESOURCE_TYPE Resou
18291832
case SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT:
18301833
return PIPELINE_RESOURCE_FLAG_GENERAL_INPUT_ATTACHMENT;
18311834

1832-
case SHADER_RESOURCE_TYPE_INLINE_CONSTANTS:
1833-
return PIPELINE_RESOURCE_FLAG_NONE;
1834-
18351835
case SHADER_RESOURCE_TYPE_ACCEL_STRUCT:
18361836
return PIPELINE_RESOURCE_FLAG_RUNTIME_ARRAY;
18371837

Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@ bool VerifyResourceBinding(const char* ExpectedResourceTypeName,
165165
const IDeviceObject* pCachedObject, // Object already set in the cache
166166
const char* SignatureName)
167167
{
168-
if (ResDesc.ResourceType == SHADER_RESOURCE_TYPE_INLINE_CONSTANTS)
169-
{
170-
RESOURCE_VALIDATION_FAILURE("Cannot bind resources to inline constants variable '", GetShaderResourcePrintName(ResDesc, BindInfo.ArrayIndex), '\'');
171-
return false;
172-
}
173-
174168
if (BindInfo.pObject != nullptr && pResourceImpl == nullptr)
175169
{
176170
std::stringstream ss;
@@ -185,6 +179,23 @@ bool VerifyResourceBinding(const char* ExpectedResourceTypeName,
185179
return false;
186180
}
187181

182+
if (ResDesc.ResourceType == SHADER_RESOURCE_TYPE_CONSTANT_BUFFER && (ResDesc.Flags & PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS) != 0)
183+
{
184+
if (pResourceImpl != nullptr)
185+
{
186+
std::stringstream ss;
187+
ss << "Failed to bind " << ExpectedResourceTypeName << " '" << pResourceImpl->GetDesc().Name << "' to variable '"
188+
<< GetShaderResourcePrintName(ResDesc, BindInfo.ArrayIndex) << '\'';
189+
if (SignatureName != nullptr)
190+
{
191+
ss << " defined by signature '" << SignatureName << '\'';
192+
}
193+
ss << ". Inline constants must be set using IShaderResourceVariable::SetInlineConstants() method.";
194+
RESOURCE_VALIDATION_FAILURE(ss.str());
195+
return false;
196+
}
197+
}
198+
188199
if (ResDesc.VarType != SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC &&
189200
(BindInfo.Flags & SET_SHADER_RESOURCE_FLAG_ALLOW_OVERWRITE) == 0 &&
190201
pCachedObject != nullptr && pCachedObject != pResourceImpl)
@@ -614,9 +625,9 @@ inline bool VerifyInlineConstants(const PipelineResourceDesc& ResDesc,
614625
Uint32 NumConstants)
615626
{
616627
bool ParamsOK = true;
617-
if (ResDesc.ResourceType != SHADER_RESOURCE_TYPE_INLINE_CONSTANTS)
628+
if (ResDesc.ResourceType != SHADER_RESOURCE_TYPE_CONSTANT_BUFFER)
618629
{
619-
RESOURCE_VALIDATION_FAILURE("SetInlineConstants() is only allowed for inline constant variables.");
630+
RESOURCE_VALIDATION_FAILURE("SetInlineConstants() is only allowed for constant buffer resources.");
620631
ParamsOK = false;
621632
}
622633

@@ -754,8 +765,14 @@ struct ShaderVariableBase : public ResourceVariableBaseInterface
754765
#ifdef DILIGENT_DEVELOPMENT
755766
{
756767
const PipelineResourceDesc& Desc = GetDesc();
757-
DEV_CHECK_ERR(Desc.ResourceType == SHADER_RESOURCE_TYPE_INLINE_CONSTANTS,
758-
"SetInlineConstants() is only allowed for inline constant variables.");
768+
DEV_CHECK_ERR(Desc.ResourceType == SHADER_RESOURCE_TYPE_CONSTANT_BUFFER,
769+
"SetInlineConstants() is only allowed for constant buffer resources.");
770+
DEV_CHECK_ERR(Desc.Flags & PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS,
771+
"SetInlineConstants() is only allowed for inline constant buffers.");
772+
DEV_CHECK_ERR(pConstants != nullptr, "Pointer to inline constants is null.");
773+
DEV_CHECK_ERR(FirstConstant + NumConstants <= Desc.ArraySize,
774+
"Inline constant range (", FirstConstant, " .. ", FirstConstant + NumConstants - 1,
775+
") is out of bounds for variable '", Desc.Name, "' of size ", Desc.ArraySize, " constants.");
759776
}
760777
#endif
761778

Graphics/GraphicsEngine/interface/PipelineResourceSignature.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,23 @@ DILIGENT_TYPED_ENUM(PIPELINE_RESOURCE_FLAGS, Uint8)
129129
/// \note This flag is only valid in Vulkan.
130130
PIPELINE_RESOURCE_FLAG_GENERAL_INPUT_ATTACHMENT = 1u << 4,
131131

132-
PIPELINE_RESOURCE_FLAG_LAST = PIPELINE_RESOURCE_FLAG_GENERAL_INPUT_ATTACHMENT
132+
/// Indicates that the resource consists of inline constants (also known as push constants in Vulkan or root constants in Direct3D12).
133+
134+
/// Applies to SHADER_RESOURCE_TYPE_CONSTANT_BUFFER only.
135+
///
136+
/// Inline constants are set directly using IShaderResourceVariable::SetInlineConstants.
137+
///
138+
/// This flag cannot be combined with any other flags.
139+
///
140+
/// In Vulkan and Direct3D12, inline constants are not bound via descriptor sets or root
141+
/// signatures, but are set directly in command buffers or command lists. As such, they
142+
/// are very cheap to set and are intended for small pieces of frequently changing data.
143+
///
144+
/// In legacy APIs (Direct3D11 and OpenGL), inline constants are emulated using regular
145+
/// constant buffers and thus have higher overhead.
146+
PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS = 1u << 5,
147+
148+
PIPELINE_RESOURCE_FLAG_LAST = PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS
133149
};
134150
DEFINE_FLAG_ENUM_OPERATORS(PIPELINE_RESOURCE_FLAGS);
135151

Graphics/GraphicsEngine/interface/Shader.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -723,16 +723,6 @@ DILIGENT_TYPED_ENUM(SHADER_RESOURCE_TYPE, Uint8)
723723
/// Input attachment in a render pass
724724
SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT,
725725

726-
/// Inline constants (aka push constants in Vulkan or root constants in Direct3D12)
727-
728-
/// In Vulkan/Direct3D12, inline constants are not bound via descriptor sets or root
729-
/// signatures but are set directly in command buffers / command lists. As such, they
730-
/// are very cheap to set and are intended for small pieces of frequently changing data.
731-
///
732-
/// In legacy APIs (Direct3D11/OpenGL), inline constants are emulated using regular
733-
/// constant buffers.
734-
SHADER_RESOURCE_TYPE_INLINE_CONSTANTS,
735-
736726
/// Acceleration structure
737727
SHADER_RESOURCE_TYPE_ACCEL_STRUCT,
738728

Graphics/GraphicsEngine/interface/ShaderResourceVariable.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,15 @@ DILIGENT_END_INTERFACE
289289

290290
// clang-format off
291291

292-
# define IShaderResourceVariable_Set(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, Set, This, __VA_ARGS__)
293-
# define IShaderResourceVariable_SetArray(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, SetArray, This, __VA_ARGS__)
294-
# define IShaderResourceVariable_SetBufferRange(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, SetBufferRange, This, __VA_ARGS__)
295-
# define IShaderResourceVariable_SetBufferOffset(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, SetBufferOffset, This, __VA_ARGS__)
296-
# define IShaderResourceVariable_GetType(This) CALL_IFACE_METHOD(ShaderResourceVariable, GetType, This)
297-
# define IShaderResourceVariable_GetResourceDesc(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, GetResourceDesc, This, __VA_ARGS__)
298-
# define IShaderResourceVariable_GetIndex(This) CALL_IFACE_METHOD(ShaderResourceVariable, GetIndex, This)
299-
# define IShaderResourceVariable_Get(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, Get, This, __VA_ARGS__)
292+
# define IShaderResourceVariable_Set(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, Set, This, __VA_ARGS__)
293+
# define IShaderResourceVariable_SetArray(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, SetArray, This, __VA_ARGS__)
294+
# define IShaderResourceVariable_SetBufferRange(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, SetBufferRange, This, __VA_ARGS__)
295+
# define IShaderResourceVariable_SetBufferOffset(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, SetBufferOffset, This, __VA_ARGS__)
296+
# define IShaderResourceVariable_SetInlineConstants(This,...)CALL_IFACE_METHOD(ShaderResourceVariable, SetInlineConstants, This, __VA_ARGS__)
297+
# define IShaderResourceVariable_GetType(This) CALL_IFACE_METHOD(ShaderResourceVariable, GetType, This)
298+
# define IShaderResourceVariable_GetResourceDesc(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, GetResourceDesc, This, __VA_ARGS__)
299+
# define IShaderResourceVariable_GetIndex(This) CALL_IFACE_METHOD(ShaderResourceVariable, GetIndex, This)
300+
# define IShaderResourceVariable_Get(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, Get, This, __VA_ARGS__)
300301

301302
// clang-format on
302303

Graphics/GraphicsEngine/src/PipelineResourceSignatureBase.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ void ValidatePipelineResourceSignatureDesc(const PipelineResourceSignatureDesc&
111111
": ", GetPipelineResourceFlagsString(AllowedResourceFlags, false, ", "), ".");
112112
}
113113

114+
if ((Res.Flags & PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS) != 0 && Res.Flags != PIPELINE_RESOURCE_FLAG_INLINE_CONSTANTS)
115+
{
116+
LOG_PRS_ERROR_AND_THROW("Incorrect Desc.Resources[", i, "].Flags (", GetPipelineResourceFlagsString(Res.Flags),
117+
"). INLINE_CONSTANTS flag cannot be combined with other flags.");
118+
}
119+
114120
if ((Res.Flags & PIPELINE_RESOURCE_FLAG_FORMATTED_BUFFER) != 0 && Features.FormattedBuffers == DEVICE_FEATURE_STATE_DISABLED)
115121
{
116122
LOG_PRS_ERROR_AND_THROW("Incorrect Desc.Resources[", i, "].Flags (FORMATTED_BUFFER). The flag can only be used if FormattedBuffers device feature is enabled.");

Graphics/GraphicsEngineD3D11/src/PipelineResourceSignatureD3D11Impl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ PipelineResourceSignatureD3D11Impl::PipelineResourceSignatureD3D11Impl(IReferenc
9090

9191
D3D11_RESOURCE_RANGE PipelineResourceSignatureD3D11Impl::ShaderResourceTypeToRange(SHADER_RESOURCE_TYPE Type)
9292
{
93-
static_assert(SHADER_RESOURCE_TYPE_LAST == 9, "Please update the switch below to handle the new shader resource type");
93+
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update the switch below to handle the new shader resource type");
9494
switch (Type)
9595
{
9696
// clang-format off
@@ -100,7 +100,6 @@ D3D11_RESOURCE_RANGE PipelineResourceSignatureD3D11Impl::ShaderResourceTypeToRan
100100
case SHADER_RESOURCE_TYPE_TEXTURE_UAV: return D3D11_RESOURCE_RANGE_UAV;
101101
case SHADER_RESOURCE_TYPE_BUFFER_UAV: return D3D11_RESOURCE_RANGE_UAV;
102102
case SHADER_RESOURCE_TYPE_SAMPLER: return D3D11_RESOURCE_RANGE_SAMPLER;
103-
case SHADER_RESOURCE_TYPE_INLINE_CONSTANTS: return D3D11_RESOURCE_RANGE_CBV;
104103
case SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT: return D3D11_RESOURCE_RANGE_SRV;
105104
// clang-format on
106105
default:

Graphics/GraphicsEngineD3D11/src/ShaderVariableManagerD3D11.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ D3DShaderResourceCounters ShaderVariableManagerD3D11::CountResources(
121121
[&](Uint32 Index) //
122122
{
123123
const PipelineResourceDesc& ResDesc = Signature.GetResourceDesc(Index);
124-
static_assert(SHADER_RESOURCE_TYPE_LAST == 9, "Please update the switch below to handle the new shader resource range");
124+
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update the switch below to handle the new shader resource range");
125125
switch (ResDesc.ResourceType)
126126
{
127127
// clang-format off
@@ -132,7 +132,6 @@ D3DShaderResourceCounters ShaderVariableManagerD3D11::CountResources(
132132
case SHADER_RESOURCE_TYPE_BUFFER_UAV: ++Counters.NumBufUAVs; break;
133133
case SHADER_RESOURCE_TYPE_SAMPLER: ++Counters.NumSamplers; break;
134134
case SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT: ++Counters.NumTexSRVs; break;
135-
case SHADER_RESOURCE_TYPE_INLINE_CONSTANTS: ++Counters.NumCBs; break;
136135
// clang-format on
137136
default:
138137
UNEXPECTED("Unsupported resource type.");
@@ -216,7 +215,7 @@ void ShaderVariableManagerD3D11::Initialize(const PipelineResourceSignatureD3D11
216215
[&](Uint32 Index) //
217216
{
218217
const PipelineResourceDesc& ResDesc = Signature.GetResourceDesc(Index);
219-
static_assert(SHADER_RESOURCE_TYPE_LAST == 9, "Please update the switch below to handle the new shader resource range");
218+
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update the switch below to handle the new shader resource range");
220219
switch (ResDesc.ResourceType)
221220
{
222221
case SHADER_RESOURCE_TYPE_CONSTANT_BUFFER:
@@ -250,11 +249,6 @@ void ShaderVariableManagerD3D11::Initialize(const PipelineResourceSignatureD3D11
250249
new (&GetResource<SamplerBindInfo>(sam++)) SamplerBindInfo{*this, Index};
251250
break;
252251

253-
case SHADER_RESOURCE_TYPE_INLINE_CONSTANTS:
254-
// Initialize CB for inline constants in place, increment CB counter
255-
new (&GetResource<ConstBuffBindInfo>(cb++)) ConstBuffBindInfo{*this, Index};
256-
break;
257-
258252
default:
259253
UNEXPECTED("Unsupported resource type.");
260254
}

Graphics/GraphicsEngineD3D12/src/D3D12TypeConversions.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ DXGI_FORMAT TypeToRayTracingVertexFormat(VALUE_TYPE ValueType, Uint32 ComponentC
849849

850850
D3D12_DESCRIPTOR_RANGE_TYPE ResourceTypeToD3D12DescriptorRangeType(SHADER_RESOURCE_TYPE ResType)
851851
{
852-
static_assert(SHADER_RESOURCE_TYPE_LAST == 9, "Please update the switch below to handle the new resource type");
852+
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update the switch below to handle the new resource type");
853853

854854
switch (ResType)
855855
{
@@ -864,10 +864,6 @@ D3D12_DESCRIPTOR_RANGE_TYPE ResourceTypeToD3D12DescriptorRangeType(SHADER_RESOUR
864864
case SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT: return D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
865865
// clang-format on
866866

867-
case SHADER_RESOURCE_TYPE_INLINE_CONSTANTS:
868-
UNEXPECTED("Inline constants do not have a descriptor range type");
869-
return static_cast<D3D12_DESCRIPTOR_RANGE_TYPE>(-1);
870-
871867
default:
872868
UNEXPECTED("Unknown resource type");
873869
return static_cast<D3D12_DESCRIPTOR_RANGE_TYPE>(-1);

Graphics/GraphicsEngineD3D12/src/PipelineResourceSignatureD3D12Impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ void PipelineResourceSignatureD3D12Impl::CommitRootConstants(const CommitCacheRe
539539

540540
VERIFY_EXPR(CacheTbl.GetSize() == 1);
541541
const ShaderResourceCacheD3D12::Resource& Res = CacheTbl.GetResource(0);
542-
VERIFY_EXPR(Res.Type == SHADER_RESOURCE_TYPE_INLINE_CONSTANTS);
542+
VERIFY_EXPR(Res.Type == SHADER_RESOURCE_TYPE_CONSTANT_BUFFER);
543543
VERIFY(Res.IsNull(), "There should be no resource bound for root constants as they contain raw data.");
544544

545545
const Uint32* pConstants = reinterpret_cast<const Uint32*>(Res.CPUDescriptorHandle.ptr);
@@ -810,7 +810,7 @@ bool PipelineResourceSignatureD3D12Impl::DvpValidateCommittedResource(const Devi
810810
}
811811
}
812812

813-
static_assert(SHADER_RESOURCE_TYPE_LAST == 9, "Please update the switch below to handle the new shader resource type");
813+
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update the switch below to handle the new shader resource type");
814814
switch (ResDesc.ResourceType)
815815
{
816816
case SHADER_RESOURCE_TYPE_TEXTURE_SRV:

0 commit comments

Comments
 (0)