A little iterator bug and a compiler warning in the OpenGL code.
Use -fvisibility-inlines-hidden on OS X as well. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5875 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
9cb41e7c70
commit
61bd545f80
|
@ -146,6 +146,7 @@ if sys.platform == 'win32':
|
||||||
env['tools'] = ['mingw']
|
env['tools'] = ['mingw']
|
||||||
env['ENV'] = os.environ
|
env['ENV'] = os.environ
|
||||||
else:
|
else:
|
||||||
|
env['CXXFLAGS'] = ['-fvisibility-inlines-hidden']
|
||||||
env['ENV'] = {
|
env['ENV'] = {
|
||||||
'PATH' : os.environ['PATH'],
|
'PATH' : os.environ['PATH'],
|
||||||
'HOME' : os.environ['HOME'],
|
'HOME' : os.environ['HOME'],
|
||||||
|
@ -202,8 +203,6 @@ compileFlags += [ ('-W' + warning) for warning in warnings ]
|
||||||
|
|
||||||
env['CCFLAGS'] = compileFlags
|
env['CCFLAGS'] = compileFlags
|
||||||
env['CPPDEFINES'] = cppDefines
|
env['CPPDEFINES'] = cppDefines
|
||||||
if not sys.platform == 'win32':
|
|
||||||
env['CXXFLAGS'] = ['-fvisibility-inlines-hidden']
|
|
||||||
|
|
||||||
# Configuration tests section
|
# Configuration tests section
|
||||||
tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,
|
tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,
|
||||||
|
@ -268,9 +267,9 @@ if sys.platform == 'darwin':
|
||||||
if env['FRAMEWORKS'].count('QuickTime'):
|
if env['FRAMEWORKS'].count('QuickTime'):
|
||||||
env['FRAMEWORKS'].remove('QuickTime')
|
env['FRAMEWORKS'].remove('QuickTime')
|
||||||
env['CC'] = "gcc-4.2"
|
env['CC'] = "gcc-4.2"
|
||||||
env['CFLAGS'] = ['-x', 'objective-c']
|
env['CFLAGS'] += ['-x', 'objective-c']
|
||||||
env['CXX'] = "g++-4.2"
|
env['CXX'] = "g++-4.2"
|
||||||
env['CXXFLAGS'] = ['-x', 'objective-c++']
|
env['CXXFLAGS'] += ['-x', 'objective-c++']
|
||||||
env['CCFLAGS'] += ['-arch', 'x86_64', '-arch', 'i386']
|
env['CCFLAGS'] += ['-arch', 'x86_64', '-arch', 'i386']
|
||||||
env['LIBS'] += ['iconv']
|
env['LIBS'] += ['iconv']
|
||||||
env['LINKFLAGS'] += ['-arch', 'x86_64', '-arch', 'i386']
|
env['LINKFLAGS'] += ['-arch', 'x86_64', '-arch', 'i386']
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
#include <paths.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
#include <Carbon/Carbon.h>
|
|
||||||
#include <IOKit/IOKitLib.h>
|
#include <IOKit/IOKitLib.h>
|
||||||
#include <IOKit/storage/IOCDMedia.h>
|
#include <IOKit/storage/IOCDMedia.h>
|
||||||
#include <IOKit/storage/IOMedia.h>
|
#include <IOKit/storage/IOMedia.h>
|
||||||
#include <IOKit/IOBSD.h>
|
#include <IOKit/IOBSD.h>
|
||||||
|
#include <paths.h>
|
||||||
#elif __linux__
|
#elif __linux__
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
|
@ -193,17 +193,17 @@ void TextureMngr::Shutdown()
|
||||||
|
|
||||||
void TextureMngr::ProgressiveCleanup()
|
void TextureMngr::ProgressiveCleanup()
|
||||||
{
|
{
|
||||||
TexCache::iterator iter = textures.begin();
|
TexCache::iterator iter = textures.begin();
|
||||||
while (iter != textures.end())
|
while (iter != textures.end())
|
||||||
{
|
{
|
||||||
if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second.frameCount)
|
if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second.frameCount)
|
||||||
{
|
{
|
||||||
iter->second.Destroy(false);
|
iter->second.Destroy(false);
|
||||||
iter = textures.erase(iter);
|
textures.erase(iter++);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
++iter;
|
++iter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureMngr::InvalidateRange(u32 start_address, u32 size)
|
void TextureMngr::InvalidateRange(u32 start_address, u32 size)
|
||||||
|
@ -368,9 +368,11 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
||||||
// instead of destroying it and having to create a new one.
|
// instead of destroying it and having to create a new one.
|
||||||
// Might speed up movie playback very, very slightly.
|
// Might speed up movie playback very, very slightly.
|
||||||
TextureIsDinamic = (entry.isRenderTarget || entry.isDinamic) && !g_ActiveConfig.bCopyEFBToTexture;
|
TextureIsDinamic = (entry.isRenderTarget || entry.isDinamic) && !g_ActiveConfig.bCopyEFBToTexture;
|
||||||
if (!entry.isRenderTarget &&
|
if (!entry.isRenderTarget && ((!entry.isDinamic &&
|
||||||
((!entry.isDinamic && width == entry.w && height==entry.h && FullFormat == entry.fmt)
|
width == entry.w && height == entry.h &&
|
||||||
|| (entry.isDinamic && entry.w == width && entry.h == height)))
|
(int)FullFormat == entry.fmt) ||
|
||||||
|
(entry.isDinamic &&
|
||||||
|
entry.w == width && entry.h == height)))
|
||||||
{
|
{
|
||||||
glBindTexture(entry.isRectangle ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D, entry.texture);
|
glBindTexture(entry.isRectangle ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D, entry.texture);
|
||||||
GL_REPORT_ERRORD();
|
GL_REPORT_ERRORD();
|
||||||
|
|
|
@ -29,7 +29,10 @@ class TextureMngr
|
||||||
public:
|
public:
|
||||||
struct TCacheEntry
|
struct TCacheEntry
|
||||||
{
|
{
|
||||||
TCacheEntry() : texture(0), addr(0), size_in_bytes(0), hash(0), w(0), h(0),MipLevels(0), scaleX(1.0f), scaleY(1.0f),isDinamic(false), isRenderTarget(false), isRectangle(true), bHaveMipMaps(false) { mode.hex = 0xFCFCFCFC; }
|
TCacheEntry() : texture(0), addr(0), size_in_bytes(0), hash(0),
|
||||||
|
w(0), h(0), MipLevels(0), scaleX(1.0f), scaleY(1.0f),
|
||||||
|
isRenderTarget(false), isDinamic(false), isRectangle(true),
|
||||||
|
bHaveMipMaps(false) { mode.hex = 0xFCFCFCFC; }
|
||||||
|
|
||||||
GLuint texture;
|
GLuint texture;
|
||||||
u32 addr;
|
u32 addr;
|
||||||
|
@ -47,7 +50,7 @@ public:
|
||||||
|
|
||||||
bool isRenderTarget; // if render texture, then rendertex is filled with the direct copy of the render target
|
bool isRenderTarget; // if render texture, then rendertex is filled with the direct copy of the render target
|
||||||
// later conversions would have to convert properly from rendertexfmt to texfmt
|
// later conversions would have to convert properly from rendertexfmt to texfmt
|
||||||
bool isDinamic;// mofified from cpu
|
bool isDinamic; // modified from cpu
|
||||||
bool isRectangle; // if nonpow2, use GL_TEXTURE_2D, else GL_TEXTURE_RECTANGLE_NV
|
bool isRectangle; // if nonpow2, use GL_TEXTURE_2D, else GL_TEXTURE_RECTANGLE_NV
|
||||||
bool bHaveMipMaps;
|
bool bHaveMipMaps;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue