mirror of https://github.com/PCSX2/pcsx2.git
gsdx-debug: log all write (texture) from the EE
It is verbose but it might help to understand the invalidation of texture
This commit is contained in:
parent
e66aac8ab7
commit
99b03b4632
|
@ -1486,6 +1486,11 @@ void GSState::Write(const uint8* mem, int len)
|
|||
return;
|
||||
}
|
||||
|
||||
GL_CACHE("Write! ... => 0x%x W:%d F:%d (DIR %d%d), dPos(%d %d) size(%d %d)",
|
||||
m_env.BITBLTBUF.DBP, m_env.BITBLTBUF.DBW, m_env.BITBLTBUF.DPSM,
|
||||
m_env.TRXPOS.DIRX, m_env.TRXPOS.DIRY,
|
||||
m_env.TRXPOS.DSAX, m_env.TRXPOS.DSAY, w, h);
|
||||
|
||||
if(PRIM->TME && (m_env.BITBLTBUF.DBP == m_context->TEX0.TBP0 || m_env.BITBLTBUF.DBP == m_context->TEX0.CBP)) // TODO: hmmmm
|
||||
{
|
||||
FlushPrim();
|
||||
|
@ -1602,7 +1607,7 @@ void GSState::Move()
|
|||
int w = m_env.TRXREG.RRW;
|
||||
int h = m_env.TRXREG.RRH;
|
||||
|
||||
GL_CACHE("Move! %05x %d %d => %05x %d %d (DIR %d%d), sPos(%d %d) dPos(%d %d) size(%d %d)",
|
||||
GL_CACHE("Move! 0x%x W:%d F:%d => 0x%x W:%d F:%d (DIR %d%d), sPos(%d %d) dPos(%d %d) size(%d %d)",
|
||||
m_env.BITBLTBUF.SBP, m_env.BITBLTBUF.SBW, m_env.BITBLTBUF.SPSM,
|
||||
m_env.BITBLTBUF.DBP, m_env.BITBLTBUF.DBW, m_env.BITBLTBUF.DPSM,
|
||||
m_env.TRXPOS.DIRX, m_env.TRXPOS.DIRY,
|
||||
|
|
|
@ -379,7 +379,6 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
|||
|
||||
dst = CreateTarget(TEX0, w, h, RenderTarget);
|
||||
|
||||
|
||||
if(dst == NULL)
|
||||
{
|
||||
return NULL;
|
||||
|
@ -556,6 +555,13 @@ void GSTextureCache::InvalidateVideoMem(GSOffset* off, const GSVector4i& rect, b
|
|||
|
||||
Target* t = *j;
|
||||
|
||||
// GH: (I think) this code is completely broken. Typical issue:
|
||||
// EE write an alpha channel into 32 bits texture
|
||||
// Results: the target is deleted (because HasCompatibleBits is false)
|
||||
//
|
||||
// Major issues are expected if the game try to reuse the target
|
||||
// If we dirty the RT, it will likely upload partially invalid data.
|
||||
// (The color on the previous example)
|
||||
if(GSUtil::HasSharedBits(bp, psm, t->m_TEX0.TBP0, t->m_TEX0.PSM))
|
||||
{
|
||||
if(!found && GSUtil::HasCompatibleBits(psm, t->m_TEX0.PSM))
|
||||
|
@ -574,6 +580,7 @@ void GSTextureCache::InvalidateVideoMem(GSOffset* off, const GSVector4i& rect, b
|
|||
}
|
||||
}
|
||||
|
||||
// GH: Try to detect texture write that will overlap with a target buffer
|
||||
if(GSUtil::HasSharedBits(psm, t->m_TEX0.PSM) && bp < t->m_TEX0.TBP0)
|
||||
{
|
||||
uint32 rowsize = bw * 8192;
|
||||
|
|
Loading…
Reference in New Issue