gsdx-d3d11: Add CopyRenderTarget function

This commit is contained in:
Kojin 2018-12-15 21:06:11 -05:00 committed by lightningterror
parent 1427d55b08
commit 84dbdd6b18
2 changed files with 14 additions and 0 deletions

View File

@ -676,6 +676,18 @@ void GSDevice11::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r)
m_ctx->CopySubresourceRegion(*(GSTexture11*)dTex, 0, 0, 0, 0, *(GSTexture11*)sTex, 0, &box);
}
GSTexture* GSDevice11::CopyRenderTarget(GSTexture* src)
{
int w = src->GetWidth();
int h = src->GetHeight();
GSTexture* dest = CreateRenderTarget(w, h, false);
CopyRect(src, dest, GSVector4i(0, 0, w, h));
return dest;
}
void GSDevice11::StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* dTex, const GSVector4& dRect, int shader, bool linear)
{
StretchRect(sTex, sRect, dTex, dRect, m_convert.ps[shader], NULL, linear);

View File

@ -192,6 +192,8 @@ public:
GSTexture* CopyOffscreen(GSTexture* src, const GSVector4& sRect, int w, int h, int format = 0, int ps_shader = 0);
GSTexture* CopyRenderTarget(GSTexture* src);
void CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r);
void StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* dTex, const GSVector4& dRect, int shader = 0, bool linear = true);