mirror of https://github.com/PCSX2/pcsx2.git
gsdx-tc: only clean RT in openGL
It is a debug feature for myself
This commit is contained in:
parent
3f6edc39cf
commit
a8bcc760b4
|
@ -200,12 +200,10 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_OGL_DEBUG
|
||||
} else {
|
||||
GL_CACHE("TC: src hit: %d (0x%x F:0x%x)",
|
||||
src->m_texture ? src->m_texture->GetID() : 0,
|
||||
TEX0.TBP0, TEX0.PSM);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (src->m_palette)
|
||||
|
@ -308,10 +306,12 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
|||
//
|
||||
// From a performance point of view, it might cost a little on big upscaling
|
||||
// but normally few RT are miss so it must remain reasonable.
|
||||
switch (type) {
|
||||
case RenderTarget: m_renderer->m_dev->ClearRenderTarget(dst->m_texture, 0); break;
|
||||
case DepthStencil: m_renderer->m_dev->ClearDepth(dst->m_texture, 0); break;
|
||||
default:break;
|
||||
if (IsOpenGL()) {
|
||||
switch (type) {
|
||||
case RenderTarget: m_renderer->m_dev->ClearRenderTarget(dst->m_texture, 0); break;
|
||||
case DepthStencil: m_renderer->m_dev->ClearDepth(dst->m_texture, 0); break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -998,7 +998,7 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
|||
|
||||
if(tmp != NULL)
|
||||
{
|
||||
// tmp is texture before a MultiSample resolve
|
||||
// tmp is the texture before a MultiSample resolve
|
||||
m_renderer->m_dev->Recycle(dst->m_texture);
|
||||
|
||||
dst->m_texture = tmp;
|
||||
|
|
|
@ -128,6 +128,7 @@ protected:
|
|||
#endif
|
||||
|
||||
virtual bool CanConvertDepth() { return m_can_convert_depth; }
|
||||
virtual bool IsOpenGL() { return false; }
|
||||
|
||||
public:
|
||||
GSTextureCache(GSRenderer* r);
|
||||
|
|
|
@ -28,10 +28,12 @@
|
|||
class GSTextureCacheOGL : public GSTextureCache
|
||||
{
|
||||
protected:
|
||||
int Get8bitFormat() { return GL_R8; /* TODO return DXGI_FORMAT_A8_UNORM;*/}
|
||||
int Get8bitFormat() { return GL_R8;}
|
||||
|
||||
void Read(Target* t, const GSVector4i& r);
|
||||
|
||||
virtual bool IsOpenGL() { return true; }
|
||||
|
||||
public:
|
||||
GSTextureCacheOGL(GSRenderer* r);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue