Cleanup some warnings and reuse some vars.

This commit is contained in:
Unknown W. Brackets committed 2013-02-18 08:34:51 -08:00
1 parent 9d490a8b50
commit d8b1ea22f5
3 files changed
+12 -10

No files matched your search

+5 -5
View File
@@ -684,6 +684,8 @@ void TextureCache::SetTexture() {
clutformat = gstate.clutformat & 3;
clutaddr = GetClutAddr(clutformat == GE_CMODE_32BIT_ABGR8888 ? 4 : 2);
cachekey |= (u64)clutaddr << 32;
} else {
clutaddr = 0;
}
int maxLevel = ((gstate.texmode >> 16) & 0x7);
@@ -725,7 +727,7 @@ void TextureCache::SetTexture() {
entry->hash != texhash ||
entry->format != format ||
entry->maxLevel != maxLevel ||
((format >= GE_TFMT_CLUT4 && format <= GE_TFMT_CLUT32) &&
(hasClut &&
(entry->clutformat != clutformat ||
entry->clutaddr != clutaddr ||
entry->cluthash != Memory::Read_U32(entry->clutaddr))))
@@ -810,9 +812,9 @@ void TextureCache::SetTexture() {
entry->lodBias = 0.0f;
if (format >= GE_TFMT_CLUT4 && format <= GE_TFMT_CLUT32) {
if (hasClut) {
entry->clutformat = clutformat;
entry->clutaddr = GetClutAddr(clutformat == GE_CMODE_32BIT_ABGR8888 ? 4 : 2);
entry->clutaddr = clutaddr;
entry->cluthash = Memory::Read_U32(entry->clutaddr);
} else {
entry->clutaddr = 0;
@@ -1173,8 +1175,6 @@ bool TextureCache::DecodeTexture(u8* output, GPUgstate state)
// TODO: Look into using BGRA for 32-bit textures when the GL_EXT_texture_format_BGRA8888 extension is available, as it's faster than RGBA on some chips.
// TODO: Actually decode the mipmaps.
switch (format)
{
case GE_TFMT_CLUT4:
+2 -2
View File
@@ -66,8 +66,8 @@ private:
int numFrames;
u32 framesUntilNextFullHash;
u8 format;
u8 clutformat;
u16 dim;
u8 clutformat;
u32 clutaddr;
u32 cluthash;
u32 texture; //GLuint
@@ -102,7 +102,7 @@ private:
u32 *clutBuf32;
u16 *clutBuf16;
int lastBoundTexture;
u32 lastBoundTexture;
float maxAnisotropyLevel;
};
+5 -3
View File
@@ -53,12 +53,14 @@ enum {
};
TransformDrawEngine::TransformDrawEngine()
: numDrawCalls(0),
collectedVerts(0),
: collectedVerts(0),
prevPrim_(-1),
lastVType_(-1),
curVbo_(0),
shaderManager_(0) {
shaderManager_(0),
textureCache_(0),
framebufferManager_(0),
numDrawCalls(0) {
// Allocate nicely aligned memory. Maybe graphics drivers will
// appreciate it.
// All this is a LOT of memory, need to see if we can cut down somehow.