mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Partially revert "Clarify some logic, improve framebuffer names"
I screwed up a couple things.
Fixes #13619
This reverts commit 32eb882bc6
.
This commit is contained in:
parent
627be60529
commit
3e6d121016
@ -471,16 +471,11 @@ TexCacheEntry *TextureCacheCommon::SetTexture() {
|
||||
// No texture found, or changed (depending on entry).
|
||||
// Check for framebuffers.
|
||||
|
||||
TextureDefinition def;
|
||||
TextureDefinition def{};
|
||||
def.addr = texaddr;
|
||||
def.dim = dim;
|
||||
def.format = format;
|
||||
def.bufw = bufw;
|
||||
def.swizzled = gstate.isTextureSwizzled();
|
||||
|
||||
if (texaddr == 0x40cc000) {
|
||||
texaddr = texaddr;
|
||||
}
|
||||
|
||||
std::vector<AttachCandidate> candidates = GetFramebufferCandidates(def, 0);
|
||||
if (candidates.size() > 0) {
|
||||
@ -856,11 +851,9 @@ FramebufferMatchInfo TextureCacheCommon::MatchFramebuffer(
|
||||
// NOTE: This check is okay because the first texture formats are the same as the buffer formats.
|
||||
if (entry.format != (GETextureFormat)framebuffer->format) {
|
||||
WARN_LOG_ONCE(diffFormat1, G3D, "Texturing from framebuffer with different formats %s != %s", GeTextureFormatToString(entry.format), GeBufferFormatToString(framebuffer->format));
|
||||
return FramebufferMatchInfo{ FramebufferMatch::VALID };
|
||||
} else {
|
||||
// TODO: Here we should either change the format of the framebuffer, reinterpreting it,
|
||||
// or read from it while reinterpreting it. Not sure which is generally best.
|
||||
return FramebufferMatchInfo{ FramebufferMatch::NO_MATCH };
|
||||
} else {
|
||||
return FramebufferMatchInfo{ FramebufferMatch::VALID };
|
||||
}
|
||||
} else {
|
||||
// Apply to buffered mode only.
|
||||
@ -1014,7 +1007,6 @@ bool TextureCacheCommon::SetOffsetTexture(u32 yOffset) {
|
||||
def.format = fmt;
|
||||
def.bufw = GetTextureBufw(0, texaddr, fmt);
|
||||
def.dim = gstate.getTextureDimension(0);
|
||||
def.swizzled = gstate.isTextureSwizzled();
|
||||
|
||||
std::vector<AttachCandidate> candidates = GetFramebufferCandidates(def, texaddrOffset);
|
||||
if (candidates.size() > 0) {
|
||||
|
@ -98,7 +98,6 @@ struct TextureDefinition {
|
||||
GETextureFormat format;
|
||||
u32 dim;
|
||||
u32 bufw;
|
||||
bool swizzled;
|
||||
};
|
||||
|
||||
|
||||
|
@ -496,7 +496,6 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry) {
|
||||
// Don't scale the PPGe texture.
|
||||
if (entry->addr > 0x05000000 && entry->addr < PSP_GetKernelMemoryEnd())
|
||||
scaleFactor = 1;
|
||||
|
||||
if ((entry->status & TexCacheEntry::STATUS_CHANGE_FREQUENT) != 0 && scaleFactor != 1) {
|
||||
// Remember for later that we /wanted/ to scale this texture.
|
||||
entry->status |= TexCacheEntry::STATUS_TO_SCALE;
|
||||
|
@ -492,6 +492,9 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry) {
|
||||
}
|
||||
}
|
||||
|
||||
// If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient.
|
||||
Draw::DataFormat dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat());
|
||||
|
||||
int scaleFactor = standardScaleFactor_;
|
||||
|
||||
// Rachet down scale factor in low-memory mode.
|
||||
@ -532,10 +535,7 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry) {
|
||||
texelsScaledThisFrame_ += w * h;
|
||||
}
|
||||
}
|
||||
|
||||
// If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient.
|
||||
Draw::DataFormat dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat());
|
||||
|
||||
|
||||
// GLES2 doesn't have support for a "Max lod" which is critical as PSP games often
|
||||
// don't specify mips all the way down. As a result, we either need to manually generate
|
||||
// the bottom few levels or rely on OpenGL's autogen mipmaps instead, which might not
|
||||
|
Loading…
Reference in New Issue
Block a user