Remove dependent temp replacement pipes when removing shader replacement

This commit is contained in:
baldurk committed 2017-12-11 19:01:44 +00:00
1 parent 6547c6db94
commit f693a9fadc
1 file changed
+9 -1
+9 -1
View File
@@ -1626,7 +1626,15 @@ void D3D12Replay::RemoveReplacement(ResourceId id)
ResourceId pipeid = rm->GetOriginalID(pipe->GetResourceID());
rm->RemoveReplacement(pipeid);
if(rm->HasReplacement(pipeid))
{
// if there was an active replacement, remove the dependent replaced pipelines.
ID3D12DeviceChild *replpipe = rm->GetLiveResource(pipeid);
rm->RemoveReplacement(pipeid);
SAFE_RELEASE(replpipe);
}
}
}
}