mirror of https://github.com/PCSX2/pcsx2.git
GS/HW: Prevent out of bounds copy in OI_BlitFMV()
This commit is contained in:
parent
1eaec773e2
commit
520a369872
|
@ -88,6 +88,7 @@ public:
|
|||
int GetWidth() const { return m_size.x; }
|
||||
int GetHeight() const { return m_size.y; }
|
||||
GSVector2i GetSize() const { return m_size; }
|
||||
GSVector4i GetRect() const { return GSVector4i(m_size).zwxy(); }
|
||||
int GetMipmapLevels() const { return m_mipmap_levels; }
|
||||
bool IsMipmap() const { return m_mipmap_levels > 1; }
|
||||
|
||||
|
|
|
@ -4560,7 +4560,7 @@ bool GSRendererHW::OI_BlitFMV(GSTextureCache::Target* _rt, GSTextureCache::Sourc
|
|||
|
||||
// Copy back the texture into the GS mem. I don't know why but it will be
|
||||
// reuploaded again later
|
||||
m_tc->Read(tex, r_texture);
|
||||
m_tc->Read(tex, r_texture.rintersect(tex->m_texture->GetRect()));
|
||||
|
||||
m_tc->InvalidateVideoMemSubTarget(_rt);
|
||||
|
||||
|
|
|
@ -2830,6 +2830,9 @@ void GSTextureCache::Read(Target* t, const GSVector4i& r)
|
|||
|
||||
void GSTextureCache::Read(Source* t, const GSVector4i& r)
|
||||
{
|
||||
if (r.rempty())
|
||||
return;
|
||||
|
||||
const GSVector4i drc(0, 0, r.width(), r.height());
|
||||
|
||||
if (!PrepareDownloadTexture(drc.z, drc.w, GSTexture::Format::Color, &m_color_download_texture))
|
||||
|
|
Loading…
Reference in New Issue