From 14a1925de0161db170653141721754ac342499cd Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sat, 2 May 2015 16:53:34 +0200 Subject: [PATCH] gsdx ogl: date texture is signed to use i variant --- plugins/GSdx/GSDeviceOGL.cpp | 9 +++++---- plugins/GSdx/GSDeviceOGL.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index b09388c7cb..472fa47b81 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -444,16 +444,16 @@ void GSDeviceOGL::ClearRenderTarget(GSTexture* t, uint32 c) ClearRenderTarget(t, color); } -void GSDeviceOGL::ClearRenderTarget_ui(GSTexture* t, uint32 c) +void GSDeviceOGL::ClearRenderTarget_i(GSTexture* t, int32 c) { // Keep SCISSOR_TEST enabled on purpose to reduce the size // of clean in DATE (impact big upscaling) - uint32 col[4] = {c, c, c, c}; + int32 col[4] = {c, c, c, c}; OMSetFBO(m_fbo); OMAttachRt(static_cast(t)->GetID()); - gl_ClearBufferuiv(GL_COLOR, 0, col); + gl_ClearBufferiv(GL_COLOR, 0, col); } void GSDeviceOGL::ClearDepth(GSTexture* t, float c) @@ -530,7 +530,8 @@ void GSDeviceOGL::InitPrimDateTexture(GSTexture* rt) if (m_date.t == NULL) m_date.t = CreateTexture(rtsize.x, rtsize.y, GL_R32I); - ClearRenderTarget_ui(m_date.t, 0x0FFFFFFF); + // Clean with the max signed value + ClearRenderTarget_i(m_date.t, 0x7FFFFFFF); gl_BindImageTexture(2, static_cast(m_date.t)->GetID(), 0, false, 0, GL_READ_WRITE, GL_R32I); } diff --git a/plugins/GSdx/GSDeviceOGL.h b/plugins/GSdx/GSDeviceOGL.h index 71ca9ff452..56aee67efe 100644 --- a/plugins/GSdx/GSDeviceOGL.h +++ b/plugins/GSdx/GSDeviceOGL.h @@ -588,7 +588,7 @@ class GSDeviceOGL : public GSDevice void ClearRenderTarget(GSTexture* t, const GSVector4& c); void ClearRenderTarget(GSTexture* t, uint32 c); - void ClearRenderTarget_ui(GSTexture* t, uint32 c); + void ClearRenderTarget_i(GSTexture* t, int32 c); void ClearDepth(GSTexture* t, float c); void ClearStencil(GSTexture* t, uint8 c);