mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 01:59:34 +01:00
Merge pull request #3691 from raven02/patch-20
Add and apply gstate.getTextureDimension(level)
This commit is contained in:
commit
d617a1079d
2 files changed
+4
-3
No files matched your search
@@ -1066,7 +1066,7 @@ void TextureCache::SetTexture() {
|
||||
if (iter != cache.end()) {
|
||||
entry = &iter->second;
|
||||
// Validate the texture still matches the cache entry.
|
||||
int dim = gstate.texsize[0] & 0xF0F;
|
||||
u16 dim = gstate.getTextureDimension(0);
|
||||
bool match = entry->Matches(dim, format, maxLevel);
|
||||
|
||||
// Check for FBO - slow!
|
||||
@@ -1161,7 +1161,7 @@ void TextureCache::SetTexture() {
|
||||
gpuStats.numTextureInvalidations++;
|
||||
DEBUG_LOG(G3D, "Texture different or overwritten, reloading at %08x", texaddr);
|
||||
if (doDelete) {
|
||||
if (entry->maxLevel == maxLevel && entry->dim == (gstate.texsize[0] & 0xF0F) && entry->format == format && g_Config.iTexScalingLevel <= 1) {
|
||||
if (entry->maxLevel == maxLevel && entry->dim == gstate.getTextureDimension(0) && entry->format == format && g_Config.iTexScalingLevel <= 1) {
|
||||
// Actually, if size and number of levels match, let's try to avoid deleting and recreating.
|
||||
// Instead, let's use glTexSubImage to replace the images.
|
||||
replaceImages = true;
|
||||
@@ -1198,7 +1198,7 @@ void TextureCache::SetTexture() {
|
||||
entry->maxLevel = maxLevel;
|
||||
entry->lodBias = 0.0f;
|
||||
|
||||
entry->dim = gstate.texsize[0] & 0xF0F;
|
||||
entry->dim = gstate.getTextureDimension(0);
|
||||
entry->bufw = bufw;
|
||||
|
||||
// This would overestimate the size in many case so we underestimate instead
|
||||
|
||||
Reference in new issue
Block a user