Skip to content

Commit

Permalink
Pre-reject DXT formats, Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Aug 17, 2022
1 parent 705b34d commit b5f0e26
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions GPU/Common/TextureCacheCommon.cpp
Expand Up @@ -641,15 +641,13 @@ std::vector<AttachCandidate> TextureCacheCommon::GetFramebufferCandidates(const
}

if (candidates.size() > 1) {
bool depth = channel == RasterChannel::RASTER_DEPTH;

std::string cands;
for (auto &candidate : candidates) {
cands += candidate.ToString() + " ";
}

WARN_LOG_REPORT_ONCE(multifbcandidate, G3D, "GetFramebufferCandidates(%s): Multiple (%d) candidate framebuffers. First will be chosen. texaddr: %08x offset: %d (%dx%d stride %d, %s):\n%s",
depth ? "DEPTH" : "COLOR", (int)candidates.size(),
WARN_LOG_REPORT_ONCE(multifbcandidate, G3D, "GetFramebufferCandidates: Multiple (%d) candidate framebuffers. texaddr: %08x offset: %d (%dx%d stride %d, %s):\n%s",
(int)candidates.size(),
entry.addr, texAddrOffset, dimWidth(entry.dim), dimHeight(entry.dim), entry.bufw, GeTextureFormatToString(entry.format),
cands.c_str()
);
Expand Down Expand Up @@ -878,6 +876,13 @@ bool TextureCacheCommon::MatchFramebuffer(
return false;
}

switch (entry.format) {
case GE_TFMT_DXT1:
case GE_TFMT_DXT3:
case GE_TFMT_DXT5:
return false;
}

u32 addr = fb_address & 0x3FFFFFFF;
u32 texaddr = entry.addr + texaddrOffset;

Expand Down

0 comments on commit b5f0e26

Please sign in to comment.