mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-12 21:31:39 +00:00
Create a config dialog. Add dumping TEV texture fetches. Better TEV stage dumping. Byteswap indexed XF loading. Remove scaling texture coordinates in the HW rasterizer because that has already been done by the time they reach the rasterizer. Increase storage for clipper.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6506 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f91ac92895
commit
8f035ae40a
17 changed files with 419 additions and 51 deletions
|
@ -26,6 +26,12 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define ALLOW_TEV_DUMPS 1
|
||||
#else
|
||||
#define ALLOW_TEV_DUMPS 0
|
||||
#endif
|
||||
|
||||
void Tev::Init()
|
||||
{
|
||||
FixedConstants[0] = 0;
|
||||
|
@ -592,11 +598,11 @@ void Tev::Draw()
|
|||
TextureSampler::Sample(Uv[texcoordSel].s >> scaleS, Uv[texcoordSel].t >> scaleT,
|
||||
IndirectLod[stageNum], IndirectLinear[stageNum], texmap, IndirectTex[stageNum]);
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if ALLOW_TEV_DUMPS
|
||||
if (g_Config.bDumpTevStages)
|
||||
{
|
||||
u8 stage[4] = {(u8)IndirectTex[stageNum][3], (u8)IndirectTex[stageNum][2], (u8)IndirectTex[stageNum][1], 255};
|
||||
DebugUtil::DrawObjectBuffer(Position[0], Position[1], stage, 16+stageNum, "Ind");
|
||||
DebugUtil::DrawTempBuffer(stage, INDIRECT + stageNum);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -624,6 +630,11 @@ void Tev::Draw()
|
|||
|
||||
TextureSampler::Sample(TexCoord.s, TexCoord.t, TextureLod[stageNum], TextureLinear[stageNum], texmap, texel);
|
||||
|
||||
#if ALLOW_TEV_DUMPS
|
||||
if (g_Config.bDumpTevTextureFetches)
|
||||
DebugUtil::DrawTempBuffer(texel, DIRECT_TFETCH + stageNum);
|
||||
#endif
|
||||
|
||||
int swaptable = ac.tswap * 2;
|
||||
|
||||
TexColor[0] = texel[bpmem.tevksel[swaptable].swap1];
|
||||
|
@ -673,11 +684,11 @@ void Tev::Draw()
|
|||
else
|
||||
Reg[ac.dest][ALP_C] = Clamp1024(Reg[ac.dest][ALP_C]);
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if ALLOW_TEV_DUMPS
|
||||
if (g_Config.bDumpTevStages)
|
||||
{
|
||||
u8 stage[4] = {(u8)Reg[0][0], (u8)Reg[0][1], (u8)Reg[0][2], (u8)Reg[0][3]};
|
||||
DebugUtil::DrawObjectBuffer(Position[0], Position[1], stage, stageNum, "Stage");
|
||||
DebugUtil::DrawTempBuffer(stage, DIRECT + stageNum);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -775,6 +786,26 @@ void Tev::Draw()
|
|||
return;
|
||||
}
|
||||
|
||||
#if ALLOW_TEV_DUMPS
|
||||
if (g_Config.bDumpTevStages)
|
||||
{
|
||||
for (u32 i = 0; i < bpmem.genMode.numindstages; ++i)
|
||||
DebugUtil::CopyTempBuffer(Position[0], Position[1], INDIRECT, i, "Indirect");
|
||||
for (u32 i = 0; i <= bpmem.genMode.numtevstages; ++i)
|
||||
DebugUtil::CopyTempBuffer(Position[0], Position[1], DIRECT, i, "Stage");
|
||||
}
|
||||
|
||||
if (g_Config.bDumpTevTextureFetches)
|
||||
{
|
||||
for (u32 i = 0; i <= bpmem.genMode.numtevstages; ++i)
|
||||
{
|
||||
TwoTevStageOrders &order = bpmem.tevorders[i >> 1];
|
||||
if (order.getEnable(i & 1))
|
||||
DebugUtil::CopyTempBuffer(Position[0], Position[1], DIRECT_TFETCH, i, "TFetch");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
INCSTAT(stats.thisFrame.tevPixelsOut);
|
||||
|
||||
EfbInterface::BlendTev(Position[0], Position[1], output);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue