Merge branch 'master' into GLSL-master

Conflicts:
	CMakeLists.txt
	Source/Core/DolphinWX/CMakeLists.txt
	Source/Core/DolphinWX/Src/GLInterface.h
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Core/VideoCommon/Src/TextureCacheBase.cpp
	Source/Core/VideoCommon/Src/VertexManagerBase.cpp
	Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj
	Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters
	Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h
	Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/main.cpp
This commit is contained in:
degasus
2013-03-06 15:59:29 +01:00
443 changed files with 16217 additions and 6374 deletions

View File

@ -65,6 +65,7 @@ static u32 s_DepthCbufid;
static u32 s_Textures[8];
static u32 s_ActiveTexture;
static u32 s_NextStage;
struct VBOCache {
GLuint vbo;
@ -204,23 +205,25 @@ TextureCache::TCacheEntryBase* TextureCache::CreateTexture(unsigned int width,
entry.pcfmt = pcfmt;
entry.m_tex_levels = tex_levels;
entry.Load(width, height, expanded_width, 0);
return &entry;
}
void TextureCache::TCacheEntry::Load(unsigned int stage, unsigned int width, unsigned int height,
void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height,
unsigned int expanded_width, unsigned int level)
{
if (s_ActiveTexture != stage)
if (s_ActiveTexture != s_NextStage)
{
glActiveTexture(GL_TEXTURE0 + stage);
s_ActiveTexture = stage;
glActiveTexture(GL_TEXTURE0 + s_NextStage);
s_ActiveTexture = s_NextStage;
}
if (s_Textures[stage] != texture)
if (s_Textures[s_NextStage] != texture)
{
glBindTexture(GL_TEXTURE_2D, texture);
s_Textures[stage] = texture;
s_Textures[s_NextStage] = texture;
}
// TODO: sloppy, just do this on creation?
@ -458,6 +461,7 @@ TextureCache::TextureCache()
s_DepthCbufid = -1;
s_ActiveTexture = -1;
s_NextStage = -1;
for(int i=0; i<8; i++)
s_Textures[i] = -1;
}
@ -490,5 +494,11 @@ void TextureCache::SetStage ()
glActiveTexture(GL_TEXTURE0 + s_ActiveTexture);
}
void TextureCache::SetNextStage ( unsigned int stage )
{
s_NextStage = stage;
}
}