From b33646cced0e3bb2005bb995bba868797da5b1e6 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sat, 29 Jun 2013 17:22:26 +0200 Subject: [PATCH] softgpu: Disable texturing in clear mode. --- GPU/Software/Rasterizer.cpp | 2 +- GPU/Software/SoftGpu.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/GPU/Software/Rasterizer.cpp b/GPU/Software/Rasterizer.cpp index 9c3c0ee6f4..84ebcd4d46 100644 --- a/GPU/Software/Rasterizer.cpp +++ b/GPU/Software/Rasterizer.cpp @@ -178,7 +178,7 @@ void DrawTriangle(VertexData vertexdata[3]) color = vertexdata[2].color0.r() | (vertexdata[2].color0.g()<<8) | (vertexdata[2].color0.b()<<16) | (vertexdata[2].color0.a()<<24); // TODO: Also disable if vertex has no texture coordinates? - if (gstate.isTextureMapEnabled()) + if (gstate.isTextureMapEnabled() && !gstate.isModeClear()) color |= /*TextureDecoder::*/SampleNearest(0, s, t); *(u32*)&fb[p.x*4+p.y*(gstate.fbwidth&0x7C0)*4] = color; diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index f1d7c5457c..0bcdcfe516 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -251,6 +251,7 @@ void SoftGPU::ExecuteOp(u32 op, u32 diff) "TRIANGLE_FAN=5,", "RECTANGLES=6,", }; + if (type != GE_PRIM_TRIANGLES && type != GE_PRIM_RECTANGLES) break;