mirror of https://github.com/PCSX2/pcsx2.git
gsdx-d3d11: Add CopyRenderTarget function
This commit is contained in:
parent
1427d55b08
commit
84dbdd6b18
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue