summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoSoftware
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2013-02-23 17:02:58 +1300
committerMatthew Parlane <parlane@gmail.com>2013-02-23 17:02:58 +1300
commitc30b8c9eae8a72747bf7da77f40f20b35c3d712a (patch)
tree5fbb01b93f8dff848936132b6e2fac964bbac7e4 /Source/Plugins/Plugin_VideoSoftware
parent3d480c088fa27c6dcadef40042a0e8deb3093985 (diff)
parentba979582e2d0b4961f1087b76eef659856eb23bb (diff)
Merge branch 'master' into wii-network
Conflicts: Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
Diffstat (limited to 'Source/Plugins/Plugin_VideoSoftware')
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp4
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp7
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.h4
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp11
4 files changed, 19 insertions, 7 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp
index 45c744ee81..225400e08b 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp
@@ -125,7 +125,7 @@ inline void Draw(s32 x, s32 y, s32 xi, s32 yi)
if (z < 0 || z > 0x00ffffff)
return;
- if (bpmem.zcontrol.early_ztest && bpmem.zmode.testenable)
+ if (bpmem.zcontrol.early_ztest && bpmem.zmode.testenable && g_SWVideoConfig.bZComploc)
{
// early z
if (!EfbInterface::ZCompare(x, y, z))
@@ -369,7 +369,7 @@ void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVer
float w[3] = { 1.0f / v0->projectedPosition.w, 1.0f / v1->projectedPosition.w, 1.0f / v2->projectedPosition.w };
InitSlope(&WSlope, w[0], w[1], w[2], fltdx31, fltdx12, fltdy12, fltdy31);
- if (!bpmem.genMode.zfreeze)
+ if (!bpmem.genMode.zfreeze || !g_SWVideoConfig.bZFreeze)
InitSlope(&ZSlope, v0->screenPosition[2], v1->screenPosition[2], v2->screenPosition[2], fltdx31, fltdx12, fltdy12, fltdy31);
for(unsigned int i = 0; i < bpmem.genMode.numcolchans; i++)
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp
index 05a6cdddf2..07947e0ee7 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp
@@ -35,6 +35,9 @@ SWVideoConfig::SWVideoConfig()
bDumpObjects = false;
bDumpFrames = false;
+ bZComploc = true;
+ bZFreeze = true;
+
bDumpTevStages = false;
bDumpTevTextureFetches = false;
@@ -52,6 +55,8 @@ void SWVideoConfig::Load(const char* ini_file)
iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, false);
iniFile.Get("Rendering", "HwRasterizer", &bHwRasterizer, false);
+ iniFile.Get("Rendering", "ZComploc", &bZComploc, true);
+ iniFile.Get("Rendering", "ZFreeze", &bZFreeze, true);
iniFile.Get("Info", "ShowStats", &bShowStats, false);
@@ -74,6 +79,8 @@ void SWVideoConfig::Save(const char* ini_file)
iniFile.Set("Hardware", "RenderToMainframe", renderToMainframe);
iniFile.Set("Rendering", "HwRasterizer", bHwRasterizer);
+ iniFile.Set("Rendering", "ZComploc", &bZComploc);
+ iniFile.Set("Rendering", "ZFreeze", &bZFreeze);
iniFile.Set("Info", "ShowStats", bShowStats);
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.h b/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.h
index 14eae78b51..c042ae8cc5 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.h
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.h
@@ -36,6 +36,10 @@ struct SWVideoConfig : NonCopyable
bool bHwRasterizer;
+ // Emulation features
+ bool bZComploc;
+ bool bZFreeze;
+
bool bShowStats;
bool bDumpTextures;
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp
index 7813c0b245..927f8931e9 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp
@@ -784,11 +784,12 @@ void Tev::Draw()
output[BLU_C] = (output[BLU_C] * invFog + fogInt * bpmem.fog.color.b) >> 8;
}
- if (!bpmem.zcontrol.early_ztest && bpmem.zmode.testenable)
- {
- if (!EfbInterface::ZCompare(Position[0], Position[1], Position[2]))
- return;
- }
+ bool late_ztest = !bpmem.zcontrol.early_ztest || !g_SWVideoConfig.bZComploc;
+ if (late_ztest && bpmem.zmode.testenable)
+ {
+ if (!EfbInterface::ZCompare(Position[0], Position[1], Position[2]))
+ return;
+ }
#if ALLOW_TEV_DUMPS
if (g_SWVideoConfig.bDumpTevStages)