summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoSoftware
diff options
context:
space:
mode:
authordonkopunchstania <donkopunchstania@gmail.com>2011-01-29 08:34:57 +0000
committerdonkopunchstania <donkopunchstania@gmail.com>2011-01-29 08:34:57 +0000
commitd5e5730fef5b3e0dbc650fbda31008625c53dd7a (patch)
tree5a37b81bfac920e995249035b9ae23654517d23e /Source/Plugins/Plugin_VideoSoftware
parentfa95b7d89fe06735f151a3335fa19e5a70cc0934 (diff)
If perspective divide is enabled and texture coordinate Z is 0 then leave texture coordinates alone. Fixes issue 3676.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6964 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoSoftware')
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/Clipper.cpp4
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/OpcodeDecoder.cpp7
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp7
3 files changed, 9 insertions, 9 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Clipper.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Clipper.cpp
index 5a55dc25e2..dc792ea694 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/Clipper.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/Clipper.cpp
@@ -54,7 +54,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "XFMemLoader.h"
#include "BPMemLoader.h"
#include "Statistics.h"
-#include "SWVideoConfig.h"
namespace Clipper
@@ -274,9 +273,6 @@ namespace Clipper
void ProcessTriangle(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2)
{
- if (stats.thisFrame.numDrawnObjects < g_SWVideoConfig.drawStart || stats.thisFrame.numDrawnObjects >= g_SWVideoConfig.drawEnd )
- return;
-
INCSTAT(stats.thisFrame.numTrianglesIn)
bool backface;
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/OpcodeDecoder.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/OpcodeDecoder.cpp
index 67022ed928..05e5467ca6 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/OpcodeDecoder.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/OpcodeDecoder.cpp
@@ -28,6 +28,7 @@
#include "Statistics.h"
#include "DebugUtil.h"
#include "CommandProcessor.h"
+#include "SWVideoConfig.h"
typedef void (*DecodingFunction)(u32);
DecodingFunction currentFunction = NULL;
@@ -48,7 +49,11 @@ void DecodePrimitiveStream(u32 iBufferSize)
{
u32 vertexSize = vertexLoader.GetVertexSize();
- if(g_bSkipCurrentFrame)
+ bool skipPrimitives = g_bSkipCurrentFrame ||
+ stats.thisFrame.numDrawnObjects < g_SWVideoConfig.drawStart ||
+ stats.thisFrame.numDrawnObjects >= g_SWVideoConfig.drawEnd;
+
+ if (skipPrimitives)
{
while (streamSize > 0 && iBufferSize >= vertexSize)
{
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp
index e73c28d2c2..1bb5cf97bc 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp
@@ -257,14 +257,13 @@ void BuildBlock(s32 blockX, s32 blockY)
// tex coords
for (unsigned int i = 0; i < bpmem.genMode.numtexgens; i++)
{
- float projection;
+ float projection = invW;
if (xfregs.texMtxInfo[i].projection)
{
float q = TexSlopes[i][2].GetValue(dx, dy) * invW;
- projection = invW / q;
+ if (q != 0.0f)
+ projection = invW / q;
}
- else
- projection = invW;
pixel.Uv[i][0] = TexSlopes[i][0].GetValue(dx, dy) * projection;
pixel.Uv[i][1] = TexSlopes[i][1].GetValue(dx, dy) * projection;