UE4 - Workaround deprecation warnings

#rb none
#jira UE-71246
#rnx

[CL 5359623 by Rolando Caloca in Main branch]
This commit is contained in:
Rolando Caloca
2019-03-11 11:17:34 -04:00
parent 8e16044464
commit 8f1665648b
3 changed files with 7 additions and 1 deletions
@@ -365,7 +365,9 @@ void FAmdAmfVideoEncoder::ResolveBackBuffer(const FTexture2DRHIRef& BackBuffer,
}
else // Texture format mismatch, use a shader to do the copy.
{
PRAGMA_DISABLE_DEPRECATION_WARNINGS
SetRenderTarget(RHICmdList, ResolvedBackBuffer, FTextureRHIRef());
PRAGMA_ENABLE_DEPRECATION_WARNINGS
RHICmdList.SetViewport(0, 0, 0.0f, ResolvedBackBuffer->GetSizeX(), ResolvedBackBuffer->GetSizeY(), 1.0f);
FGraphicsPipelineStateInitializer GraphicsPSOInit;
@@ -402,7 +404,7 @@ void FAmdAmfVideoEncoder::ResolveBackBuffer(const FTexture2DRHIRef& BackBuffer,
*VertexShader,
EDRF_Default);
SetRenderTarget(RHICmdList, FTextureRHIRef(), FTextureRHIRef());
UnbindRenderTargets(RHICmdList);
}
}
@@ -334,7 +334,9 @@ void FNvVideoEncoder::CopyBackBuffer(const FTexture2DRHIRef& SrcBackBuffer, cons
}
else // Texture format mismatch, use a shader to do the copy.
{
PRAGMA_DISABLE_DEPRECATION_WARNINGS
SetRenderTarget(RHICmdList, DstFrame.ResolvedBackBuffer, FTextureRHIRef());
PRAGMA_ENABLE_DEPRECATION_WARNINGS
RHICmdList.SetViewport(0, 0, 0.0f, DstFrame.ResolvedBackBuffer->GetSizeX(), DstFrame.ResolvedBackBuffer->GetSizeY(), 1.0f);
FGraphicsPipelineStateInitializer GraphicsPSOInit;
@@ -480,7 +480,9 @@ void FWmfVideoEncoder::ResolveBackBuffer(const FTexture2DRHIRef& BackBuffer, con
}
else // Texture format mismatch, use a shader to do the copy.
{
PRAGMA_DISABLE_DEPRECATION_WARNINGS
SetRenderTarget(RHICmdList, ResolvedBackBuffer, FTextureRHIRef());
PRAGMA_ENABLE_DEPRECATION_WARNINGS
RHICmdList.SetViewport(0, 0, 0.0f, ResolvedBackBuffer->GetSizeX(), ResolvedBackBuffer->GetSizeY(), 1.0f);
FGraphicsPipelineStateInitializer GraphicsPSOInit;