Skip to content

Commit

Permalink
GS/HW: Allow preload if FBW = 0 on small draw
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Apr 23, 2024
1 parent c560447 commit 6d25c6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pcsx2/GS/Renderers/HW/GSTextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 bool supported_fmt = !GSConfig.UserHacks_DisableDepthSupport || psm_s.depth == 0;
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 u32 rect_end = GSLocalMemory::GetUnwrappedEndBlockAddress(TEX0.TBP0, TEX0.TBW, TEX0.PSM, newrect);
Expand Down

0 comments on commit 6d25c6b

Please sign in to comment.