summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2010-12-27 03:09:11 +0000
committerRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2010-12-27 03:09:11 +0000
commitf3336a84a16e93dfd20595201a07fc9ba20a12b5 (patch)
tree69f6470514cc8e44ac4f083fbbfebcff0123d709 /Source/Core/VideoCommon/Src/TextureCacheBase.cpp
parent695010520ff004844c8137a75868dd8b046eb8f3 (diff)
First Experimental Commit:
make some changes to the Clear code. please test a lot , the point of this commit is to determine the correct behavior of the efb clearing so feedback is welcome git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6663 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/TextureCacheBase.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
index fffde7b7b2..bd7023b01e 100644
--- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
@@ -545,6 +545,10 @@ void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer,
else// alpha
{
colmat[15] = 1;
+ if(bpmem.zcontrol.pixel_format != PIXELFMT_RGBA6_Z24)
+ {
+ fConstAdd[3] = 1;
+ }
cbufid = 1;
}
@@ -571,10 +575,18 @@ void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer,
case 3: // RA8
colmat[0] = colmat[4] = colmat[8] = colmat[15] = 1;
cbufid = 3;
+ if(bpmem.zcontrol.pixel_format != PIXELFMT_RGBA6_Z24)
+ {
+ fConstAdd[3] = 1;
+ }
break;
case 7: // A8
colmat[3] = colmat[7] = colmat[11] = colmat[15] = 1;
+ if(bpmem.zcontrol.pixel_format != PIXELFMT_RGBA6_Z24)
+ {
+ fConstAdd[0] = fConstAdd[1] = fConstAdd[2] = fConstAdd[3] = 1;
+ }
cbufid = 4;
break;
@@ -608,6 +620,10 @@ void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer,
case 6: // RGBA8
colmat[0] = colmat[5] = colmat[10] = colmat[15] = 1;
cbufid = 10;
+ if(bpmem.zcontrol.pixel_format != PIXELFMT_RGBA6_Z24)
+ {
+ fConstAdd[3] = 1;
+ }
break;
default:
@@ -617,6 +633,8 @@ void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer,
break;
}
}
+
+
const unsigned int tex_w = (abs(source_rect.GetWidth()) >> (int)bScaleByHalf);
const unsigned int tex_h = (abs(source_rect.GetHeight()) >> (int)bScaleByHalf);