mirror of https://github.com/PCSX2/pcsx2.git
GSDX: Prodded some offensive code, this isn't meant to affect emulation of any games and it probably won't.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5283 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
1711a26bbb
commit
17f28b24b3
|
@ -576,6 +576,7 @@ void GSTextureCache::IncAge()
|
|||
//Fixme: Several issues in here. Not handling depth stencil, pitch conversion doesnt work.
|
||||
GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* dst)
|
||||
{
|
||||
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
|
||||
Source* src = new Source(m_renderer, TEX0, TEXA, m_temp);
|
||||
|
||||
int tw = 1 << TEX0.TW;
|
||||
|
@ -596,7 +597,7 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
|||
else
|
||||
src->m_spritehack_t = false;
|
||||
|
||||
if(m_paltex && GSLocalMemory::m_psm[TEX0.PSM].pal > 0)
|
||||
if(m_paltex && psm.pal > 0)
|
||||
{
|
||||
src->m_fmt = FMT_8;
|
||||
|
||||
|
@ -769,26 +770,17 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
|||
case PSM_PSMCT16S:
|
||||
src->m_fmt = FMT_16;
|
||||
break;
|
||||
case PSM_PSMT8H:
|
||||
src->m_fmt = FMT_8H;
|
||||
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
|
||||
break;
|
||||
// actually if we end up in that side of the function with a paletted format, we're probably already screwed
|
||||
case PSM_PSMT8:
|
||||
//Not sure, this wasn't handled at all.
|
||||
//Xenosaga 2 and 3 use it, Tales of Legendia as well.
|
||||
//It's always used for fog like effects.
|
||||
src->m_fmt = FMT_8;
|
||||
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
|
||||
break;
|
||||
case PSM_PSMT8H:
|
||||
case PSM_PSMT4:
|
||||
case PSM_PSMT4HL:
|
||||
src->m_fmt = FMT_4HL;
|
||||
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
|
||||
break;
|
||||
case PSM_PSMT4HH:
|
||||
src->m_fmt = FMT_4HH;
|
||||
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
|
||||
src->m_fmt = FMT_8;
|
||||
break;
|
||||
}
|
||||
if (psm.pal > 0)
|
||||
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
|
||||
|
||||
if(tmp != NULL)
|
||||
{
|
||||
|
@ -827,8 +819,6 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
|
||||
|
||||
if(psm.pal > 0)
|
||||
{
|
||||
memcpy(src->m_clut, (const uint32*)m_renderer->m_mem.m_clut, psm.pal * sizeof(uint32));
|
||||
|
|
|
@ -34,9 +34,6 @@ public:
|
|||
FMT_32,
|
||||
FMT_24,
|
||||
FMT_16,
|
||||
FMT_8H,
|
||||
FMT_4HL,
|
||||
FMT_4HH,
|
||||
FMT_8,
|
||||
};
|
||||
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
#define FMT_32 0
|
||||
#define FMT_24 1
|
||||
#define FMT_16 2
|
||||
#define FMT_8H 3
|
||||
#define FMT_4HL 4
|
||||
#define FMT_4HH 5
|
||||
#define FMT_8 6
|
||||
#define FMT_8 3
|
||||
|
||||
#if SHADER_MODEL >= 0x400
|
||||
|
||||
|
@ -390,15 +387,7 @@ float4 sample(float2 st, float q)
|
|||
|
||||
float4x4 c;
|
||||
|
||||
if(PS_FMT == FMT_8H)
|
||||
{
|
||||
c = sample_4p(sample_4a(uv));
|
||||
}
|
||||
else if(PS_FMT == FMT_4HL || PS_FMT == FMT_4HH)
|
||||
{
|
||||
c = sample_4p(fmod(sample_4a(uv), 1.0f / 16));
|
||||
}
|
||||
else if(PS_FMT == FMT_8)
|
||||
if(PS_FMT == FMT_8)
|
||||
{
|
||||
c = sample_4p(sample_4a(uv));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue