From bab9963b00953d60bdd6fabe265d5daa45a27661 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 17 Apr 2013 23:09:55 -0400 Subject: New license header introduced for DiscIO, AudioCommon, InputCommon, VideoCommon, and Common projects. --- Source/Core/VideoCommon/Src/TextureCacheBase.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp index 319c014f22..2ea35680b6 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp @@ -1,19 +1,6 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. #include "MemoryUtil.h" -- cgit v1.2.3 From d244bca1f5f210e03839d0e0a485fc5511ede2d6 Mon Sep 17 00:00:00 2001 From: lioncash Date: Fri, 19 Apr 2013 09:21:45 -0400 Subject: Fix a bunch of random typos in comments and logging. Also update the comment headers for two functions in GCMemcard.cpp. --- Source/Core/VideoCommon/Src/TextureCacheBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp index 2ea35680b6..d1abe79245 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp @@ -382,7 +382,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage, // TODO: Print a warning if the format changes! In this case, // we could reinterpret the internal texture object data to the new pixel format - // (similiar to what is already being done in Renderer::ReinterpretPixelFormat()) + // (similar to what is already being done in Renderer::ReinterpretPixelFormat()) return ReturnEntry(stage, entry); } -- cgit v1.2.3 From 8da425b008b46ef90d649e55c6c0d4a0bc2b556b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 24 Apr 2013 09:21:54 -0400 Subject: Formatting cleanup for VideoCommon. Block braces on new lines. Also killed off trailing whitespace and dangling elses. Spaced some things out to make them more readable (only in places where it looked like a bit of a clusterfuck). --- Source/Core/VideoCommon/Src/TextureCacheBase.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp index d1abe79245..d5d21f89d0 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp @@ -42,9 +42,12 @@ TextureCache::TextureCache() temp_size = 2048 * 2048 * 4; if (!temp) temp = (u8*)AllocateAlignedMemory(temp_size, 16); + TexDecoder_SetTexFmtOverlayOptions(g_ActiveConfig.bTexFmtOverlayEnable, g_ActiveConfig.bTexFmtOverlayCenter); + if(g_ActiveConfig.bHiresTextures && !g_ActiveConfig.bDumpTextures) HiresTextures::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str()); + SetHash64Function(g_ActiveConfig.bHiresTextures || g_ActiveConfig.bDumpTextures); } @@ -125,7 +128,9 @@ void TextureCache::Cleanup() textures.erase(iter++); } else + { ++iter; + } } } @@ -143,7 +148,9 @@ void TextureCache::InvalidateRange(u32 start_address, u32 size) textures.erase(iter++); } else + { ++iter; + } } } @@ -201,7 +208,9 @@ void TextureCache::ClearRenderTargets() textures.erase(iter++); } else + { ++iter; + } } } @@ -547,17 +556,20 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat const EFBRectangle& srcRect, bool isIntensity, bool scaleByHalf) { // Emulation methods: + // // - EFB to RAM: // Encodes the requested EFB data at its native resolution to the emulated RAM using shaders. // Load() decodes the data from there again (using TextureDecoder) if the EFB copy is being used as a texture again. // Advantage: CPU can read data from the EFB copy and we don't lose any important updates to the texture // Disadvantage: Encoding+decoding steps often are redundant because only some games read or modify EFB copies before using them as textures. + // // - EFB to texture: // Copies the requested EFB data to a texture object in VRAM, performing any color conversion using shaders. // Advantage: Works for many games, since in most cases EFB copies aren't read or modified at all before being used as a texture again. // Since we don't do any further encoding or decoding here, this method is much faster. // It also allows enhancing the visual quality by doing scaled EFB copies. - // - hybrid EFB copies: + // + // - Hybrid EFB copies: // 1a) Whenever this function gets called, encode the requested EFB data to RAM (like EFB to RAM) // 1b) Set type to TCET_EC_DYNAMIC for all texture cache entries in the destination address range. // If EFB copy caching is enabled, further checks will (try to) prevent redundant EFB copies. @@ -672,8 +684,8 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat } else { - cbufid = 9; - } + cbufid = 9; + } } else// alpha { -- cgit v1.2.3