Skip to content

Commit 24857a0

Browse files
ShaderResourceCacheD3D12: do not transition/validated null resources
1 parent 1c4be13 commit 24857a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Graphics/GraphicsEngineD3D12/src/ShaderResourceCacheD3D12.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@ void ShaderResourceCacheD3D12::DbgValidateDynamicBuffersMask() const
573573

574574
void ShaderResourceCacheD3D12::Resource::TransitionResource(CommandContext& Ctx)
575575
{
576+
if (IsNull())
577+
return;
578+
576579
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update this function to handle the new resource type");
577580
switch (Type)
578581
{
@@ -657,6 +660,9 @@ void ShaderResourceCacheD3D12::Resource::TransitionResource(CommandContext& Ctx)
657660
#ifdef DILIGENT_DEVELOPMENT
658661
void ShaderResourceCacheD3D12::Resource::DvpVerifyResourceState()
659662
{
663+
if (IsNull())
664+
return;
665+
660666
static_assert(SHADER_RESOURCE_TYPE_LAST == 8, "Please update this function to handle the new resource type");
661667
switch (Type)
662668
{

0 commit comments

Comments
 (0)