mirror of https://github.com/PCSX2/pcsx2.git
GSdx: small fixes to the last commit
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1426 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
b284fae2d5
commit
c1fc72a634
|
@ -24,119 +24,120 @@
|
||||||
|
|
||||||
CRC::Game CRC::m_games[] =
|
CRC::Game CRC::m_games[] =
|
||||||
{
|
{
|
||||||
{0x00000000, None, Unknown},
|
{0x00000000, None, Unknown, 0},
|
||||||
{0x2113EA2E, MetalSlug6, Unknown},
|
{0x2113EA2E, MetalSlug6, Unknown, 0},
|
||||||
{0x42E05BAF, TomoyoAfter, JP},
|
{0x42E05BAF, TomoyoAfter, JP, PointListPalette},
|
||||||
{0x7800DC84, Clannad, JP},
|
{0x7800DC84, Clannad, JP, PointListPalette},
|
||||||
{0xA6167B59, Lamune, JP},
|
{0xA6167B59, Lamune, JP, PointListPalette},
|
||||||
{0xDDB59F46, KyuuketsuKitanMoonties, JP},
|
{0xDDB59F46, KyuuketsuKitanMoonties, JP, PointListPalette},
|
||||||
{0xa39517ab, FFX, EU},
|
{0xC8EE2562, PiaCarroteYoukosoGPGakuenPrincess, JP, PointListPalette},
|
||||||
{0xa39517ae, FFX, FR},
|
{0xa39517ab, FFX, EU, 0},
|
||||||
{0x941bb7d9, FFX, DE},
|
{0xa39517ae, FFX, FR, 0},
|
||||||
{0xa39517a9, FFX, IT},
|
{0x941bb7d9, FFX, DE, 0},
|
||||||
{0x941bb7de, FFX, ES},
|
{0xa39517a9, FFX, IT, 0},
|
||||||
{0xb4414ea1, FFX, RU},
|
{0x941bb7de, FFX, ES, 0},
|
||||||
{0xee97db5b, FFX, RU},
|
{0xb4414ea1, FFX, RU, 0},
|
||||||
{0xaec495cc, FFX, RU},
|
{0xee97db5b, FFX, RU, 0},
|
||||||
{0xbb3d833a, FFX, US},
|
{0xaec495cc, FFX, RU, 0},
|
||||||
{0x6a4efe60, FFX, JP},
|
{0xbb3d833a, FFX, US, 0},
|
||||||
{0x3866ca7e, FFX, ASIA}, // int.
|
{0x6a4efe60, FFX, JP, 0},
|
||||||
{0x658597e2, FFX, JP}, // int.
|
{0x3866ca7e, FFX, ASIA, 0}, // int.
|
||||||
{0x9aac5309, FFX2, EU},
|
{0x658597e2, FFX, JP, 0}, // int.
|
||||||
{0x9aac530c, FFX2, FR},
|
{0x9aac5309, FFX2, EU, 0},
|
||||||
{0x9aac530a, FFX2, FR}, // ?
|
{0x9aac530c, FFX2, FR, 0},
|
||||||
{0x9aac530d, FFX2, DE},
|
{0x9aac530a, FFX2, FR, 0}, // ?
|
||||||
{0x9aac530b, FFX2, IT},
|
{0x9aac530d, FFX2, DE, 0},
|
||||||
{0x48fe0c71, FFX2, US},
|
{0x9aac530b, FFX2, IT, 0},
|
||||||
{0xe1fd9a2d, FFX2, JP}, // int.
|
{0x48fe0c71, FFX2, US, 0},
|
||||||
{0x78da0252, FFXII, EU},
|
{0xe1fd9a2d, FFX2, JP, 0}, // int.
|
||||||
{0xc1274668, FFXII, EU},
|
{0x78da0252, FFXII, EU, 0},
|
||||||
{0xdc2a467e, FFXII, EU},
|
{0xc1274668, FFXII, EU, 0},
|
||||||
{0xca284668, FFXII, EU},
|
{0xdc2a467e, FFXII, EU, 0},
|
||||||
{0x280AD120, FFXII, JP},
|
{0xca284668, FFXII, EU, 0},
|
||||||
{0x8BE3D7B2, ShadowHearts, Unknown},
|
{0x280AD120, FFXII, JP, 0},
|
||||||
{0xDEFA4763, ShadowHearts, US},
|
{0x8BE3D7B2, ShadowHearts, Unknown, 0},
|
||||||
{0x21068223, Okami, US},
|
{0xDEFA4763, ShadowHearts, US, 0},
|
||||||
{0x891f223f, Okami, FR},
|
{0x21068223, Okami, US, 0},
|
||||||
{0xC5DEFEA0, Okami, JP},
|
{0x891f223f, Okami, FR, 0},
|
||||||
{0x053D2239, MetalGearSolid3, US},
|
{0xC5DEFEA0, Okami, JP, 0},
|
||||||
{0x086273D2, MetalGearSolid3, FR},
|
{0x053D2239, MetalGearSolid3, US, 0},
|
||||||
{0x26A6E286, MetalGearSolid3, EU},
|
{0x086273D2, MetalGearSolid3, FR, 0},
|
||||||
{0xAA31B5BF, MetalGearSolid3, Unknown},
|
{0x26A6E286, MetalGearSolid3, EU, 0},
|
||||||
{0x9F185CE1, MetalGearSolid3, Unknown},
|
{0xAA31B5BF, MetalGearSolid3, Unknown, 0},
|
||||||
{0x98D4BC93, MetalGearSolid3, EU},
|
{0x9F185CE1, MetalGearSolid3, Unknown, 0},
|
||||||
{0x86BC3040, MetalGearSolid3, US}, //Subsistance disc 1
|
{0x98D4BC93, MetalGearSolid3, EU, 0},
|
||||||
{0x0481AD8A, MetalGearSolid3, JP},
|
{0x86BC3040, MetalGearSolid3, US, 0}, //Subsistance disc 1
|
||||||
{0x79ED26AD, MetalGearSolid3, EU},
|
{0x0481AD8A, MetalGearSolid3, JP, 0},
|
||||||
{0x5E31EA42, MetalGearSolid3, EU},
|
{0x79ED26AD, MetalGearSolid3, EU, 0},
|
||||||
{0x278722BF, DBZBT2, US},
|
{0x5E31EA42, MetalGearSolid3, EU, 0},
|
||||||
{0xFE961D28, DBZBT2, US},
|
{0x278722BF, DBZBT2, US, 0},
|
||||||
{0x0393B6BE, DBZBT2, EU},
|
{0xFE961D28, DBZBT2, US, 0},
|
||||||
{0xE2F289ED, DBZBT2, JP}, // Sparking Neo!
|
{0x0393B6BE, DBZBT2, EU, 0},
|
||||||
{0x35AA84D1, DBZBT2, Unknown},
|
{0xE2F289ED, DBZBT2, JP, 0}, // Sparking Neo!
|
||||||
{0x428113C2, DBZBT3, US},
|
{0x35AA84D1, DBZBT2, Unknown, 0},
|
||||||
{0xA422BB13, DBZBT3, EU},
|
{0x428113C2, DBZBT3, US, 0},
|
||||||
{0x983C53D2, DBZBT3, Unknown},
|
{0xA422BB13, DBZBT3, EU, 0},
|
||||||
{0x983C53D3, DBZBT3, Unknown},
|
{0x983C53D2, DBZBT3, Unknown, 0},
|
||||||
{0x72B3802A, SFEX3, US},
|
{0x983C53D3, DBZBT3, Unknown, 0},
|
||||||
{0x71521863, SFEX3, US},
|
{0x72B3802A, SFEX3, US, 0},
|
||||||
{0x28703748, Bully, US},
|
{0x71521863, SFEX3, US, 0},
|
||||||
{0xC78A495D, BullyCC, US},
|
{0x28703748, Bully, US, 0},
|
||||||
{0xC19A374E, SoTC, US},
|
{0xC78A495D, BullyCC, US, 0},
|
||||||
{0x7D8F539A, SoTC, EU},
|
{0xC19A374E, SoTC, US, 0},
|
||||||
{0x3122B508, OnePieceGrandAdventure, US},
|
{0x7D8F539A, SoTC, EU, 0},
|
||||||
{0x8DF14A24, OnePieceGrandAdventure, Unknown},
|
{0x3122B508, OnePieceGrandAdventure, US, 0},
|
||||||
{0x6F8545DB, ICO, US},
|
{0x8DF14A24, OnePieceGrandAdventure, Unknown, 0},
|
||||||
{0xB01A4C95, ICO, JP},
|
{0x6F8545DB, ICO, US, 0},
|
||||||
{0x5C991F4E, ICO, Unknown},
|
{0xB01A4C95, ICO, JP, 0},
|
||||||
{0x7ACF7E03, ICO, Unknown},
|
{0x5C991F4E, ICO, Unknown, 0},
|
||||||
{0xAEAD1CA3, GT4, JP},
|
{0x7ACF7E03, ICO, Unknown, 0},
|
||||||
{0x44A61C8F, GT4, Unknown},
|
{0xAEAD1CA3, GT4, JP, 0},
|
||||||
{0x0086E35B, GT4, Unknown},
|
{0x44A61C8F, GT4, Unknown, 0},
|
||||||
{0x77E61C8A, GT4, Unknown},
|
{0x0086E35B, GT4, Unknown, 0},
|
||||||
{0xC164550A, WildArms5, JPUNDUB},
|
{0x77E61C8A, GT4, Unknown, 0},
|
||||||
{0xC1640D2C, WildArms5, US},
|
{0xC164550A, WildArms5, JPUNDUB, 0},
|
||||||
{0x0FCF8FE4, WildArms5, EU},
|
{0xC1640D2C, WildArms5, US, 0},
|
||||||
{0x2294D322, WildArms5, JP},
|
{0x0FCF8FE4, WildArms5, EU, 0},
|
||||||
{0x565B6170, WildArms5, JP},
|
{0x2294D322, WildArms5, JP, 0},
|
||||||
{0x8B029334, Manhunt2, Unknown},
|
{0x565B6170, WildArms5, JP, 0},
|
||||||
{0x09F49E37, CrashBandicootWoC, Unknown},
|
{0x8B029334, Manhunt2, Unknown, 0},
|
||||||
{0x013E349D, ResidentEvil4, US},
|
{0x09F49E37, CrashBandicootWoC, Unknown, 0},
|
||||||
{0x6BA2F6B9, ResidentEvil4, Unknown},
|
{0x013E349D, ResidentEvil4, US, 0},
|
||||||
{0x60FA8C69, ResidentEvil4, JP},
|
{0x6BA2F6B9, ResidentEvil4, Unknown, 0},
|
||||||
{0x72E1E60E, Spartan, Unknown},
|
{0x60FA8C69, ResidentEvil4, JP, 0},
|
||||||
{0x5ED8FB53, AceCombat4, JP},
|
{0x72E1E60E, Spartan, Unknown, 0},
|
||||||
{0x1B9B7563, AceCombat4, Unknown},
|
{0x5ED8FB53, AceCombat4, JP, 0},
|
||||||
{0xEC432B24, Drakengard2, Unknown},
|
{0x1B9B7563, AceCombat4, Unknown, 0},
|
||||||
{0xFC46EA61, Tekken5, JP},
|
{0xEC432B24, Drakengard2, Unknown, 0},
|
||||||
{0x1F88EE37, Tekken5, Unknown},
|
{0xFC46EA61, Tekken5, JP, 0},
|
||||||
{0x652050D2, Tekken5, Unknown},
|
{0x1F88EE37, Tekken5, Unknown, 0},
|
||||||
{0x9E98B8AE, IkkiTousen, JP},
|
{0x652050D2, Tekken5, Unknown, 0},
|
||||||
{0xD6385328, GodOfWar, US},
|
{0x9E98B8AE, IkkiTousen, JP, 0},
|
||||||
{0xFB0E6D72, GodOfWar, EU},
|
{0xD6385328, GodOfWar, US, 0},
|
||||||
{0xEB001875, GodOfWar, EU},
|
{0xFB0E6D72, GodOfWar, EU, 0},
|
||||||
{0xA61A4C6D, GodOfWar, Unknown},
|
{0xEB001875, GodOfWar, EU, 0},
|
||||||
{0xE23D532B, GodOfWar, Unknown},
|
{0xA61A4C6D, GodOfWar, Unknown, 0},
|
||||||
{0xDF1AF973, GodOfWar, Unknown},
|
{0xE23D532B, GodOfWar, Unknown, 0},
|
||||||
{0xD6385328, GodOfWar, Unknown},
|
{0xDF1AF973, GodOfWar, Unknown, 0},
|
||||||
{0x2F123FD8, GodOfWar2, RU},
|
{0xD6385328, GodOfWar, Unknown, 0},
|
||||||
{0x2F123FD8, GodOfWar2, US},
|
{0x2F123FD8, GodOfWar2, RU, 0},
|
||||||
{0x44A8A22A, GodOfWar2, EU},
|
{0x2F123FD8, GodOfWar2, US, 0},
|
||||||
{0x4340C7C6, GodOfWar2, Unknown},
|
{0x44A8A22A, GodOfWar2, EU, 0},
|
||||||
{0x5D482F18, JackieChanAdv, Unknown},
|
{0x4340C7C6, GodOfWar2, Unknown, 0},
|
||||||
{0xf0a6d880, HarvestMoon, US},
|
{0x5D482F18, JackieChanAdv, Unknown, 0},
|
||||||
{0x75c01a04, NamcoXCapcom, US},
|
{0xf0a6d880, HarvestMoon, US, 0},
|
||||||
{0xBF6F101F, GiTS, US},
|
{0x75c01a04, NamcoXCapcom, US, 0},
|
||||||
{0xA5768F53, GiTS, JP},
|
{0xBF6F101F, GiTS, US, 0},
|
||||||
{0x6BF11378, Onimusha3, US},
|
{0xA5768F53, GiTS, JP, 0},
|
||||||
{0xF442260C, MajokkoALaMode2, JP},
|
{0x6BF11378, Onimusha3, US, 0},
|
||||||
{0x14FE77F7, TalesOfAbyss, US},
|
{0xF442260C, MajokkoALaMode2, JP, 0},
|
||||||
{0x045D77E9, TalesOfAbyss, US}, // undub
|
{0x14FE77F7, TalesOfAbyss, US, 0},
|
||||||
{0xAA5EC3A3, TalesOfAbyss, JP},
|
{0x045D77E9, TalesOfAbyss, US, 0}, // undub
|
||||||
{0xFB236A46, SonicUnleashed, US},
|
{0xAA5EC3A3, TalesOfAbyss, JP, 0},
|
||||||
{0x4C7BB3C8, SimpsonsGame, Unknown},
|
{0xFB236A46, SonicUnleashed, US, 0},
|
||||||
{0x4C94B32C, SimpsonsGame, Unknown},
|
{0x4C7BB3C8, SimpsonsGame, Unknown, 0},
|
||||||
{0xD71B57F4, Genji, Unknown},
|
{0x4C94B32C, SimpsonsGame, Unknown, 0},
|
||||||
|
{0xD71B57F4, Genji, Unknown, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
hash_map<uint32, CRC::Game*> CRC::m_map;
|
hash_map<uint32, CRC::Game*> CRC::m_map;
|
||||||
|
|
|
@ -32,6 +32,7 @@ public:
|
||||||
Clannad,
|
Clannad,
|
||||||
Lamune,
|
Lamune,
|
||||||
KyuuketsuKitanMoonties,
|
KyuuketsuKitanMoonties,
|
||||||
|
PiaCarroteYoukosoGPGakuenPrincess,
|
||||||
FFX,
|
FFX,
|
||||||
FFX2,
|
FFX2,
|
||||||
FFXII,
|
FFXII,
|
||||||
|
@ -86,11 +87,17 @@ public:
|
||||||
ASIA
|
ASIA
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum Flags
|
||||||
|
{
|
||||||
|
PointListPalette = 1,
|
||||||
|
};
|
||||||
|
|
||||||
struct Game
|
struct Game
|
||||||
{
|
{
|
||||||
uint32 crc;
|
uint32 crc;
|
||||||
Title title;
|
Title title;
|
||||||
Region region;
|
Region region;
|
||||||
|
uint32 flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -361,7 +361,7 @@ protected:
|
||||||
|
|
||||||
#pragma region palette uploaded in a point list, pure genius...
|
#pragma region palette uploaded in a point list, pure genius...
|
||||||
|
|
||||||
if(m_game.title == CRC::TomoyoAfter || m_game.title == CRC::Clannad || m_game.title == CRC::Lamune || m_game.title == CRC::KyuuketsuKitanMoonties)
|
if(m_game.flags & CRC::PointListPalette)
|
||||||
{
|
{
|
||||||
if(prim == GS_POINTLIST && !PRIM->TME)
|
if(prim == GS_POINTLIST && !PRIM->TME)
|
||||||
{
|
{
|
||||||
|
|
|
@ -468,47 +468,6 @@ void GSRendererHW10::SetupDATE(GSTexture* rt, GSTexture* ds)
|
||||||
{
|
{
|
||||||
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
|
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
|
||||||
|
|
||||||
GSVector4 mm;
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
mm = GSVector4(-1, -1, 1, 1);
|
|
||||||
|
|
||||||
// if(m_count < 100)
|
|
||||||
{
|
|
||||||
GSVector4 pmin(65535, 65535, 0, 0);
|
|
||||||
GSVector4 pmax = GSVector4::zero();
|
|
||||||
|
|
||||||
for(int i = 0, j = m_count; i < j; i++)
|
|
||||||
{
|
|
||||||
GSVector4 p(m_vertices[i].vi[0].uph16());
|
|
||||||
|
|
||||||
pmin = p.minv(pmin);
|
|
||||||
pmax = p.maxv(pmax);
|
|
||||||
}
|
|
||||||
|
|
||||||
mm += pmin.xyxy(pmax);
|
|
||||||
|
|
||||||
float sx = 2.0f * rt->m_scale.x / (w * 16);
|
|
||||||
float sy = 2.0f * rt->m_scale.y / (h * 16);
|
|
||||||
float ox = (float)(int)m_context->XYOFFSET.OFX;
|
|
||||||
float oy = (float)(int)m_context->XYOFFSET.OFY;
|
|
||||||
|
|
||||||
mm.x = (mm.x - ox) * sx - 1;
|
|
||||||
mm.y = (mm.y - oy) * sy - 1;
|
|
||||||
mm.z = (mm.z - ox) * sx - 1;
|
|
||||||
mm.w = (mm.w - oy) * sy - 1;
|
|
||||||
|
|
||||||
if(mm.x < -1) mm.x = -1;
|
|
||||||
if(mm.y < -1) mm.y = -1;
|
|
||||||
if(mm.z > +1) mm.z = +1;
|
|
||||||
if(mm.w > +1) mm.w = +1;
|
|
||||||
}
|
|
||||||
|
|
||||||
GSVector4 uv = (mm + 1.0f) / 2.0f;
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
dev->BeginScene();
|
dev->BeginScene();
|
||||||
|
|
||||||
dev->ClearStencil(ds, 0);
|
dev->ClearStencil(ds, 0);
|
||||||
|
@ -521,12 +480,18 @@ void GSRendererHW10::SetupDATE(GSTexture* rt, GSTexture* ds)
|
||||||
|
|
||||||
// ia
|
// ia
|
||||||
|
|
||||||
|
GSVector4 s = GSVector4(rt->m_scale.x / w, rt->m_scale.y / h);
|
||||||
|
GSVector4 o = GSVector4(-1.0f, 1.0f);
|
||||||
|
|
||||||
|
GSVector4 src = ((m_vt.m_min.p.xyxy(m_vt.m_max.p) + o.xxyy()) * s.xyxy()).sat(o.zzyy());
|
||||||
|
GSVector4 dst = src * 2.0f + o.xxxx();
|
||||||
|
|
||||||
GSVertexPT1 vertices[] =
|
GSVertexPT1 vertices[] =
|
||||||
{
|
{
|
||||||
{GSVector4(mm.x, -mm.y, 0.5f, 1.0f), GSVector2(uv.x, uv.y)},
|
{GSVector4(dst.x, -dst.y, 0.5f, 1.0f), GSVector2(src.x, src.y)},
|
||||||
{GSVector4(mm.z, -mm.y, 0.5f, 1.0f), GSVector2(uv.z, uv.y)},
|
{GSVector4(dst.z, -dst.y, 0.5f, 1.0f), GSVector2(src.z, src.y)},
|
||||||
{GSVector4(mm.x, -mm.w, 0.5f, 1.0f), GSVector2(uv.x, uv.w)},
|
{GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(src.x, src.w)},
|
||||||
{GSVector4(mm.z, -mm.w, 0.5f, 1.0f), GSVector2(uv.z, uv.w)},
|
{GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(src.z, src.w)},
|
||||||
};
|
};
|
||||||
|
|
||||||
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
|
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
|
||||||
|
|
|
@ -468,47 +468,6 @@ void GSRendererHW11::SetupDATE(GSTexture* rt, GSTexture* ds)
|
||||||
{
|
{
|
||||||
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
|
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
|
||||||
|
|
||||||
GSVector4 mm;
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
mm = GSVector4(-1, -1, 1, 1);
|
|
||||||
|
|
||||||
// if(m_count < 100)
|
|
||||||
{
|
|
||||||
GSVector4 pmin(65535, 65535, 0, 0);
|
|
||||||
GSVector4 pmax = GSVector4::zero();
|
|
||||||
|
|
||||||
for(int i = 0, j = m_count; i < j; i++)
|
|
||||||
{
|
|
||||||
GSVector4 p(m_vertices[i].vi[0].uph16());
|
|
||||||
|
|
||||||
pmin = p.minv(pmin);
|
|
||||||
pmax = p.maxv(pmax);
|
|
||||||
}
|
|
||||||
|
|
||||||
mm += pmin.xyxy(pmax);
|
|
||||||
|
|
||||||
float sx = 2.0f * rt->m_scale.x / (w * 16);
|
|
||||||
float sy = 2.0f * rt->m_scale.y / (h * 16);
|
|
||||||
float ox = (float)(int)m_context->XYOFFSET.OFX;
|
|
||||||
float oy = (float)(int)m_context->XYOFFSET.OFY;
|
|
||||||
|
|
||||||
mm.x = (mm.x - ox) * sx - 1;
|
|
||||||
mm.y = (mm.y - oy) * sy - 1;
|
|
||||||
mm.z = (mm.z - ox) * sx - 1;
|
|
||||||
mm.w = (mm.w - oy) * sy - 1;
|
|
||||||
|
|
||||||
if(mm.x < -1) mm.x = -1;
|
|
||||||
if(mm.y < -1) mm.y = -1;
|
|
||||||
if(mm.z > +1) mm.z = +1;
|
|
||||||
if(mm.w > +1) mm.w = +1;
|
|
||||||
}
|
|
||||||
|
|
||||||
GSVector4 uv = (mm + 1.0f) / 2.0f;
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
dev->BeginScene();
|
dev->BeginScene();
|
||||||
|
|
||||||
dev->ClearStencil(ds, 0);
|
dev->ClearStencil(ds, 0);
|
||||||
|
@ -521,12 +480,18 @@ void GSRendererHW11::SetupDATE(GSTexture* rt, GSTexture* ds)
|
||||||
|
|
||||||
// ia
|
// ia
|
||||||
|
|
||||||
|
GSVector4 s = GSVector4(rt->m_scale.x / w, rt->m_scale.y / h);
|
||||||
|
GSVector4 o = GSVector4(-1.0f, 1.0f);
|
||||||
|
|
||||||
|
GSVector4 src = ((m_vt.m_min.p.xyxy(m_vt.m_max.p) + o.xxyy()) * s.xyxy()).sat(o.zzyy());
|
||||||
|
GSVector4 dst = src * 2.0f + o.xxxx();
|
||||||
|
|
||||||
GSVertexPT1 vertices[] =
|
GSVertexPT1 vertices[] =
|
||||||
{
|
{
|
||||||
{GSVector4(mm.x, -mm.y, 0.5f, 1.0f), GSVector2(uv.x, uv.y)},
|
{GSVector4(dst.x, -dst.y, 0.5f, 1.0f), GSVector2(src.x, src.y)},
|
||||||
{GSVector4(mm.z, -mm.y, 0.5f, 1.0f), GSVector2(uv.z, uv.y)},
|
{GSVector4(dst.z, -dst.y, 0.5f, 1.0f), GSVector2(src.z, src.y)},
|
||||||
{GSVector4(mm.x, -mm.w, 0.5f, 1.0f), GSVector2(uv.x, uv.w)},
|
{GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(src.x, src.w)},
|
||||||
{GSVector4(mm.z, -mm.w, 0.5f, 1.0f), GSVector2(uv.z, uv.w)},
|
{GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(src.z, src.w)},
|
||||||
};
|
};
|
||||||
|
|
||||||
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
|
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
|
||||||
|
|
|
@ -464,47 +464,6 @@ void GSRendererHW9::SetupDATE(GSTexture* rt, GSTexture* ds)
|
||||||
{
|
{
|
||||||
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
|
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
|
||||||
|
|
||||||
GSVector4 mm;
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
mm = GSVector4(-1, -1, 1, 1);
|
|
||||||
|
|
||||||
// if(m_count < 100)
|
|
||||||
{
|
|
||||||
GSVector4 pmin(65535, 65535, 0, 0);
|
|
||||||
GSVector4 pmax = GSVector4::zero();
|
|
||||||
|
|
||||||
for(int i = 0, j = m_count; i < j; i++)
|
|
||||||
{
|
|
||||||
GSVector4 p(m_vertices[i].p);
|
|
||||||
|
|
||||||
pmin = p.minv(pmin);
|
|
||||||
pmax = p.maxv(pmax);
|
|
||||||
}
|
|
||||||
|
|
||||||
mm += pmin.xyxy(pmax);
|
|
||||||
|
|
||||||
float sx = 2.0f * rt->m_scale.x / (w * 16);
|
|
||||||
float sy = 2.0f * rt->m_scale.y / (h * 16);
|
|
||||||
float ox = (float)(int)m_context->XYOFFSET.OFX;
|
|
||||||
float oy = (float)(int)m_context->XYOFFSET.OFY;
|
|
||||||
|
|
||||||
mm.x = (mm.x - ox) * sx - 1;
|
|
||||||
mm.y = (mm.y - oy) * sy - 1;
|
|
||||||
mm.z = (mm.z - ox) * sx - 1;
|
|
||||||
mm.w = (mm.w - oy) * sy - 1;
|
|
||||||
|
|
||||||
if(mm.x < -1) mm.x = -1;
|
|
||||||
if(mm.y < -1) mm.y = -1;
|
|
||||||
if(mm.z > +1) mm.z = +1;
|
|
||||||
if(mm.w > +1) mm.w = +1;
|
|
||||||
}
|
|
||||||
|
|
||||||
GSVector4 uv = (mm + 1.0f) / 2.0f;
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
dev->BeginScene();
|
dev->BeginScene();
|
||||||
|
|
||||||
dev->ClearStencil(ds, 0);
|
dev->ClearStencil(ds, 0);
|
||||||
|
@ -517,12 +476,18 @@ void GSRendererHW9::SetupDATE(GSTexture* rt, GSTexture* ds)
|
||||||
|
|
||||||
// ia
|
// ia
|
||||||
|
|
||||||
|
GSVector4 s = GSVector4(rt->m_scale.x / w, rt->m_scale.y / h);
|
||||||
|
GSVector4 o = GSVector4(-1.0f, 1.0f);
|
||||||
|
|
||||||
|
GSVector4 src = ((m_vt.m_min.p.xyxy(m_vt.m_max.p) + o.xxyy()) * s.xyxy()).sat(o.zzyy());
|
||||||
|
GSVector4 dst = src * 2.0f + o.xxxx();
|
||||||
|
|
||||||
GSVertexPT1 vertices[] =
|
GSVertexPT1 vertices[] =
|
||||||
{
|
{
|
||||||
{GSVector4(mm.x, -mm.y, 0.5f, 1.0f), GSVector2(uv.x, uv.y)},
|
{GSVector4(dst.x, -dst.y, 0.5f, 1.0f), GSVector2(src.x, src.y)},
|
||||||
{GSVector4(mm.z, -mm.y, 0.5f, 1.0f), GSVector2(uv.z, uv.y)},
|
{GSVector4(dst.z, -dst.y, 0.5f, 1.0f), GSVector2(src.z, src.y)},
|
||||||
{GSVector4(mm.x, -mm.w, 0.5f, 1.0f), GSVector2(uv.x, uv.w)},
|
{GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(src.x, src.w)},
|
||||||
{GSVector4(mm.z, -mm.w, 0.5f, 1.0f), GSVector2(uv.z, uv.w)},
|
{GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(src.z, src.w)},
|
||||||
};
|
};
|
||||||
|
|
||||||
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
|
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
|
||||||
|
@ -568,14 +533,18 @@ void GSRendererHW9::UpdateFBA(GSTexture* rt)
|
||||||
|
|
||||||
// ia
|
// ia
|
||||||
|
|
||||||
GSVector4 mm = GSVector4(-1, -1, 1, 1);
|
GSVector4 s = GSVector4(rt->m_scale.x / rt->GetWidth(), rt->m_scale.y / rt->GetHeight());
|
||||||
|
GSVector4 o = GSVector4(-1.0f, 1.0f);
|
||||||
|
|
||||||
|
GSVector4 src = ((m_vt.m_min.p.xyxy(m_vt.m_max.p) + o.xxyy()) * s.xyxy()).sat(o.zzyy());
|
||||||
|
GSVector4 dst = src * 2.0f + o.xxxx();
|
||||||
|
|
||||||
GSVertexPT1 vertices[] =
|
GSVertexPT1 vertices[] =
|
||||||
{
|
{
|
||||||
{GSVector4(mm.x, -mm.y, 0.5f, 1.0f), GSVector2(0, 0)},
|
{GSVector4(dst.x, -dst.y, 0.5f, 1.0f), GSVector2(0, 0)},
|
||||||
{GSVector4(mm.z, -mm.y, 0.5f, 1.0f), GSVector2(0, 0)},
|
{GSVector4(dst.z, -dst.y, 0.5f, 1.0f), GSVector2(0, 0)},
|
||||||
{GSVector4(mm.x, -mm.w, 0.5f, 1.0f), GSVector2(0, 0)},
|
{GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(0, 0)},
|
||||||
{GSVector4(mm.z, -mm.w, 0.5f, 1.0f), GSVector2(0, 0)},
|
{GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(0, 0)},
|
||||||
};
|
};
|
||||||
|
|
||||||
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
|
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
|
||||||
|
|
|
@ -78,7 +78,7 @@ bool GSTexture10::Map(GSMap& m, const GSVector4i* r)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_texture)
|
if(m_texture && m_desc.Usage == D3D10_USAGE_STAGING)
|
||||||
{
|
{
|
||||||
D3D10_MAPPED_TEXTURE2D map;
|
D3D10_MAPPED_TEXTURE2D map;
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ bool GSTexture11::Map(GSMap& m, const GSVector4i* r)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_texture)
|
if(m_texture && m_desc.Usage == D3D11_USAGE_STAGING)
|
||||||
{
|
{
|
||||||
D3D11_MAPPED_SUBRESOURCE map;
|
D3D11_MAPPED_SUBRESOURCE map;
|
||||||
|
|
||||||
|
|
|
@ -1342,6 +1342,7 @@
|
||||||
<ClCompile Include="GSTextureCache9.cpp" />
|
<ClCompile Include="GSTextureCache9.cpp" />
|
||||||
<ClCompile Include="GSTextureCacheOGL.cpp" />
|
<ClCompile Include="GSTextureCacheOGL.cpp" />
|
||||||
<ClCompile Include="GSTextureCacheSW.cpp" />
|
<ClCompile Include="GSTextureCacheSW.cpp" />
|
||||||
|
<ClCompile Include="GSTextureFX.cpp" />
|
||||||
<ClCompile Include="GSTextureFX10.cpp" />
|
<ClCompile Include="GSTextureFX10.cpp" />
|
||||||
<ClCompile Include="GSTextureFX11.cpp" />
|
<ClCompile Include="GSTextureFX11.cpp" />
|
||||||
<ClCompile Include="GSTextureFX9.cpp" />
|
<ClCompile Include="GSTextureFX9.cpp" />
|
||||||
|
@ -1352,6 +1353,7 @@
|
||||||
<ClCompile Include="GSVector.cpp" />
|
<ClCompile Include="GSVector.cpp" />
|
||||||
<ClCompile Include="GSVertexList.cpp" />
|
<ClCompile Include="GSVertexList.cpp" />
|
||||||
<ClCompile Include="GSVertexSW.cpp" />
|
<ClCompile Include="GSVertexSW.cpp" />
|
||||||
|
<ClCompile Include="GSVertexTrace.cpp" />
|
||||||
<ClCompile Include="GSWnd.cpp" />
|
<ClCompile Include="GSWnd.cpp" />
|
||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
@ -1466,6 +1468,7 @@
|
||||||
<ClInclude Include="GSTextureCache9.h" />
|
<ClInclude Include="GSTextureCache9.h" />
|
||||||
<ClInclude Include="GSTextureCacheOGL.h" />
|
<ClInclude Include="GSTextureCacheOGL.h" />
|
||||||
<ClInclude Include="GSTextureCacheSW.h" />
|
<ClInclude Include="GSTextureCacheSW.h" />
|
||||||
|
<ClInclude Include="GSTextureFX.h" />
|
||||||
<ClInclude Include="GSTextureFX10.h" />
|
<ClInclude Include="GSTextureFX10.h" />
|
||||||
<ClInclude Include="GSTextureFX11.h" />
|
<ClInclude Include="GSTextureFX11.h" />
|
||||||
<ClInclude Include="GSTextureFX9.h" />
|
<ClInclude Include="GSTextureFX9.h" />
|
||||||
|
@ -1478,6 +1481,7 @@
|
||||||
<ClInclude Include="GSVertexHW.h" />
|
<ClInclude Include="GSVertexHW.h" />
|
||||||
<ClInclude Include="GSVertexList.h" />
|
<ClInclude Include="GSVertexList.h" />
|
||||||
<ClInclude Include="GSVertexSW.h" />
|
<ClInclude Include="GSVertexSW.h" />
|
||||||
|
<ClInclude Include="GSVertexTrace.h" />
|
||||||
<ClInclude Include="GSWnd.h" />
|
<ClInclude Include="GSWnd.h" />
|
||||||
<ClInclude Include="resource.h" />
|
<ClInclude Include="resource.h" />
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
|
|
|
@ -267,6 +267,9 @@
|
||||||
<ClCompile Include="GSTextureCacheSW.cpp">
|
<ClCompile Include="GSTextureCacheSW.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="GSTextureFX.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="GSTextureFX10.cpp">
|
<ClCompile Include="GSTextureFX10.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -297,6 +300,9 @@
|
||||||
<ClCompile Include="GSVertexSW.cpp">
|
<ClCompile Include="GSVertexSW.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="GSVertexTrace.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="GSWnd.cpp">
|
<ClCompile Include="GSWnd.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -584,6 +590,9 @@
|
||||||
<ClInclude Include="GSTextureCacheSW.h">
|
<ClInclude Include="GSTextureCacheSW.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="GSTextureFX.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="GSTextureFX10.h">
|
<ClInclude Include="GSTextureFX10.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -620,6 +629,9 @@
|
||||||
<ClInclude Include="GSVertexSW.h">
|
<ClInclude Include="GSVertexSW.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="GSVertexTrace.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="GSWnd.h">
|
<ClInclude Include="GSWnd.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
Loading…
Reference in New Issue