GS/HW: Allow preload if FBW = 0 on small draw

This commit is contained in:
refractionpcsx2 2024-04-22 14:36:35 +01:00
parent c5604472f6
commit 6d25c6b1ef
1 changed files with 2 additions and 1 deletions

View File

@ -2408,8 +2408,9 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons
const GSLocalMemory::psm_t& psm_s = GSLocalMemory::m_psm[TEX0.PSM]; const GSLocalMemory::psm_t& psm_s = GSLocalMemory::m_psm[TEX0.PSM];
const bool supported_fmt = !GSConfig.UserHacks_DisableDepthSupport || psm_s.depth == 0; const bool supported_fmt = !GSConfig.UserHacks_DisableDepthSupport || psm_s.depth == 0;
std::optional<bool> hw_clear; std::optional<bool> hw_clear;
const bool valid_draw_size = TEX0.TBW > 0 || (psm_s.pgs.x >= size.x && psm_s.pgs.y >= size.y);
if (TEX0.TBW > 0 && supported_fmt) if (valid_draw_size && supported_fmt)
{ {
const GSVector4i newrect = GSVector4i::loadh(size); const GSVector4i newrect = GSVector4i::loadh(size);
const u32 rect_end = GSLocalMemory::GetUnwrappedEndBlockAddress(TEX0.TBP0, TEX0.TBW, TEX0.PSM, newrect); const u32 rect_end = GSLocalMemory::GetUnwrappedEndBlockAddress(TEX0.TBP0, TEX0.TBW, TEX0.PSM, newrect);