mirror of https://github.com/PCSX2/pcsx2.git
gsdx hw: allow overlapping of texture (alpha) and framebuffer (RGB)
Fix HUD on Berserk v2: use fbmask instead of hacking the target format to 24 bits.
This commit is contained in:
parent
25e76d0564
commit
a4658eac24
|
@ -493,7 +493,7 @@ void GSRendererHW::Draw()
|
||||||
GSTextureCache::Target* rt = NULL;
|
GSTextureCache::Target* rt = NULL;
|
||||||
GSTexture* rt_tex = NULL;
|
GSTexture* rt_tex = NULL;
|
||||||
if (!no_rt) {
|
if (!no_rt) {
|
||||||
rt = m_tc->LookupTarget(TEX0, m_width, m_height, GSTextureCache::RenderTarget, true);
|
rt = m_tc->LookupTarget(TEX0, m_width, m_height, GSTextureCache::RenderTarget, true, fm);
|
||||||
rt_tex = rt->m_texture;
|
rt_tex = rt->m_texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -403,7 +403,7 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
|
||||||
return src;
|
return src;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int w, int h, int type, bool used)
|
GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int w, int h, int type, bool used, uint32 fbmask)
|
||||||
{
|
{
|
||||||
const GSLocalMemory::psm_t& psm_s = GSLocalMemory::m_psm[TEX0.PSM];
|
const GSLocalMemory::psm_t& psm_s = GSLocalMemory::m_psm[TEX0.PSM];
|
||||||
uint32 bp = TEX0.TBP0;
|
uint32 bp = TEX0.TBP0;
|
||||||
|
@ -432,7 +432,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||||
|
|
||||||
dst->Update();
|
dst->Update();
|
||||||
|
|
||||||
dst->m_dirty_alpha |= (psm_s.trbpp != 24);
|
dst->m_dirty_alpha |= (psm_s.trbpp == 32 && (fbmask & 0xFF000000) != 0xFF000000) || (psm_s.trbpp == 16);
|
||||||
|
|
||||||
} else if (CanConvertDepth()) {
|
} else if (CanConvertDepth()) {
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ public:
|
||||||
Source* LookupSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r);
|
Source* LookupSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r);
|
||||||
Source* LookupDepthSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r, bool palette = false);
|
Source* LookupDepthSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r, bool palette = false);
|
||||||
|
|
||||||
Target* LookupTarget(const GIFRegTEX0& TEX0, int w, int h, int type, bool used);
|
Target* LookupTarget(const GIFRegTEX0& TEX0, int w, int h, int type, bool used, uint32 fbmask = 0);
|
||||||
Target* LookupTarget(const GIFRegTEX0& TEX0, int w, int h, int real_h);
|
Target* LookupTarget(const GIFRegTEX0& TEX0, int w, int h, int real_h);
|
||||||
|
|
||||||
void InvalidateVideoMemType(int type, uint32 bp);
|
void InvalidateVideoMemType(int type, uint32 bp);
|
||||||
|
|
Loading…
Reference in New Issue