diff --git a/plugins/GSdx/GSDevice.cpp b/plugins/GSdx/GSDevice.cpp index 23e01d0fc8..b871e51f7c 100644 --- a/plugins/GSdx/GSDevice.cpp +++ b/plugins/GSdx/GSDevice.cpp @@ -175,17 +175,6 @@ void GSDevice::Recycle(GSTexture* t) { if(t) { - // FIXME: WARNING: Broken Texture Cache reuse render target without any - // cleaning (or uploading of correct gs mem data) Ofc it is wrong. If - // blending is enabled, rendering would be completely broken. However - // du to wrong invalidation of the TC it is sometimes better to reuse - // (partially) wrong data... - // - // Invalidating the data might be even worse. I'm not sure invalidating data really - // help on the perf. But people reports better perf on BDG2 (memory intensive) on OpenGL. - // It could be the reason. - t->Invalidate(); - t->last_frame_used = m_frame; m_pool.push_front(t); diff --git a/plugins/GSdx/GSTexture.h b/plugins/GSdx/GSTexture.h index 5418cfebbb..296a5a3873 100644 --- a/plugins/GSdx/GSTexture.h +++ b/plugins/GSdx/GSTexture.h @@ -47,7 +47,6 @@ public: virtual bool Map(GSMap& m, const GSVector4i* r = NULL) = 0; virtual void Unmap() = 0; virtual bool Save(const string& fn, bool user_image = false, bool dds = false) = 0; - virtual void Invalidate() {} virtual uint32 GetID() { return 0; } GSVector2 GetScale() const {return m_scale;} diff --git a/plugins/GSdx/GSTextureOGL.cpp b/plugins/GSdx/GSTextureOGL.cpp index 50a49ae93b..234f5192e9 100644 --- a/plugins/GSdx/GSTextureOGL.cpp +++ b/plugins/GSdx/GSTextureOGL.cpp @@ -159,7 +159,7 @@ namespace PboPool { } GSTextureOGL::GSTextureOGL(int type, int w, int h, int format, GLuint fbo_read) - : m_pbo_size(0), m_dirty(false), m_clean(false), m_local_buffer(NULL), m_r_x(0), m_r_y(0), m_r_w(0), m_r_h(0) + : m_pbo_size(0), m_clean(false), m_local_buffer(NULL), m_r_x(0), m_r_y(0), m_r_w(0), m_r_h(0) { // OpenGL didn't like dimensions of size 0 m_size.x = max(1,w); @@ -281,14 +281,6 @@ GSTextureOGL::~GSTextureOGL() _aligned_free(m_local_buffer); } -void GSTextureOGL::Invalidate() -{ - if (m_dirty && glInvalidateTexImage) { - glInvalidateTexImage(m_texture_id, GL_TEX_LEVEL_0); - m_dirty = false; - } -} - bool GSTextureOGL::Update(const GSVector4i& r, const void* data, int pitch) { ASSERT(m_type != GSTexture::DepthStencil && m_type != GSTexture::Offscreen); @@ -299,7 +291,6 @@ bool GSTextureOGL::Update(const GSVector4i& r, const void* data, int pitch) // Data upload is rather small typically 64B or 1024B. So don't bother with PBO // and directly send the data to the GL synchronously - m_dirty = true; m_clean = false; uint32 row_byte = r.width() << m_int_shift; @@ -390,7 +381,6 @@ bool GSTextureOGL::Map(GSMap& m, const GSVector4i* _r) } else if (m_type == GSTexture::Texture || m_type == GSTexture::RenderTarget) { GL_PUSH("Upload Texture %d", m_texture_id); // POP is in Unmap - m_dirty = true; m_clean = false; uint32 row_byte = r.width() << m_int_shift; diff --git a/plugins/GSdx/GSTextureOGL.h b/plugins/GSdx/GSTextureOGL.h index c12c670a81..f4c5ea20be 100644 --- a/plugins/GSdx/GSTextureOGL.h +++ b/plugins/GSdx/GSTextureOGL.h @@ -44,7 +44,6 @@ class GSTextureOGL final : public GSTexture GLuint m_texture_id; // the texture id int m_pbo_size; GLuint m_fbo_read; - bool m_dirty; bool m_clean; uint8* m_local_buffer; @@ -65,7 +64,6 @@ class GSTextureOGL final : public GSTexture explicit GSTextureOGL(int type, int w, int h, int format, GLuint fbo_read); virtual ~GSTextureOGL(); - void Invalidate() final; bool Update(const GSVector4i& r, const void* data, int pitch) final; bool Map(GSMap& m, const GSVector4i* r = NULL) final; void Unmap() final; @@ -76,7 +74,7 @@ class GSTextureOGL final : public GSTexture uint32 GetID() final { return m_texture_id; } bool HasBeenCleaned() { return m_clean; } - void WasAttached() { m_clean = false; m_dirty = true; } + void WasAttached() { m_clean = false; } void WasCleaned() { m_clean = true; } uint32 GetMemUsage();