GSDX: Do not interpret TEXA while filling the gsdx internal temporary CLUT buffer used in texture creation and updating (I didn't realise this was happening and it's incompatible with my approach). Probably generally fixes stuff in combination with the other changes in palette handling, at the very least I know it fixes lines in sprites in Ar Tonelico 2 (currently needs the "sprite hack"), a bug which I spent a long time trying to fix after it was pointed out to me before.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5309 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1@gmail.com 2012-06-19 00:12:35 +00:00
parent 27a4110256
commit c755435eeb
2 changed files with 10 additions and 2 deletions

View File

@ -206,8 +206,6 @@ void GSRendererHW::Draw()
if(PRIM->TME) if(PRIM->TME)
{ {
m_mem.m_clut.Read32(context->TEX0, env.TEXA);
GSVector4i r; GSVector4i r;
GetTextureMinMax(r, context->TEX0, context->CLAMP, m_vt.IsLinear()); GetTextureMinMax(r, context->TEX0, context->CLAMP, m_vt.IsLinear());

View File

@ -57,6 +57,14 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
{ {
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM]; const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
const GSLocalMemory::psm_t& cpsm = psm.pal > 0 ? GSLocalMemory::m_psm[TEX0.CPSM] : psm; const GSLocalMemory::psm_t& cpsm = psm.pal > 0 ? GSLocalMemory::m_psm[TEX0.CPSM] : psm;
GIFRegTEXA plainTEXA;
plainTEXA.AEM = 1;
plainTEXA.TA0 = 0;
plainTEXA.TA1 = 0x80;
m_renderer->m_mem.m_clut.Read32(TEX0, plainTEXA);
const uint32* clut = m_renderer->m_mem.m_clut; const uint32* clut = m_renderer->m_mem.m_clut;
Source* src = NULL; Source* src = NULL;
@ -1036,6 +1044,8 @@ void GSTextureCache::Source::Flush(uint32 count)
pitch >>= 2; pitch >>= 2;
rtx = psm.rtxP; rtx = psm.rtxP;
} }
else if (psm.pal > 0)
m_renderer->m_mem.m_clut.Read32(m_TEX0, m_TEXA);
uint8* buff = m_temp; uint8* buff = m_temp;