mirror of https://github.com/PCSX2/pcsx2.git
parent
587c0ea339
commit
f6ee94589f
|
@ -766,6 +766,9 @@ void GSRendererHW::OI_GsMemClear()
|
|||
GSOffset* off = m_context->offset.fb;
|
||||
GSVector4i r = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in));
|
||||
|
||||
int format = GSLocalMemory::m_psm[m_context->FRAME.PSM].fmt;
|
||||
|
||||
if (format == 0) {
|
||||
// Based on WritePixel32
|
||||
for(int y = r.top; y < r.bottom; y++)
|
||||
{
|
||||
|
@ -777,6 +780,34 @@ void GSRendererHW::OI_GsMemClear()
|
|||
d[col[x]] = 0; // Here the constant color
|
||||
}
|
||||
}
|
||||
} else if (format == 1) {
|
||||
// Based on WritePixel24
|
||||
for(int y = r.top; y < r.bottom; y++)
|
||||
{
|
||||
uint32* RESTRICT d = &m_mem.m_vm32[off->pixel.row[y]];
|
||||
int* RESTRICT col = off->pixel.col[0];
|
||||
|
||||
for(int x = r.left; x < r.right; x++)
|
||||
{
|
||||
d[col[x]] &= 0xff000000; // Clear the color
|
||||
}
|
||||
}
|
||||
} else if (format == 2) {
|
||||
; // Hack is used for FMV which are likely 24/32 bits. Let's keep the for reference
|
||||
#if 0
|
||||
// Based on WritePixel16
|
||||
for(int y = r.top; y < r.bottom; y++)
|
||||
{
|
||||
uint32* RESTRICT d = &m_mem.m_vm16[off->pixel.row[y]];
|
||||
int* RESTRICT col = off->pixel.col[0];
|
||||
|
||||
for(int x = r.left; x < r.right; x++)
|
||||
{
|
||||
d[col[x]] = 0; // Here the constant color
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue