mirror of https://github.com/PCSX2/pcsx2.git
gsdx ogl: drop fallback of GL_ARB_clear_texture
Mesa AMD was updated :) all drivers[1] that support GL_ARB_shader_image_load_store got GL_ARB_clear_texture [1] Intel driver misses others extensions to run GSdx
This commit is contained in:
parent
63944e8c43
commit
d0b1162b15
|
@ -198,7 +198,7 @@ namespace GLLoader {
|
|||
|
||||
bool found_geometry_shader = true; // we require GL3.3 so geometry must be supported by default
|
||||
bool found_GL_EXT_texture_filter_anisotropic = false;
|
||||
bool found_GL_ARB_clear_texture = false; // Miss AMD Mesa (otherwise seems SW)
|
||||
bool found_GL_ARB_clear_texture = false;
|
||||
bool found_GL_ARB_get_texture_sub_image = false; // Not yet used
|
||||
// DX11 GPU
|
||||
bool found_GL_ARB_gpu_shader5 = false; // Require IvyBridge
|
||||
|
|
|
@ -722,41 +722,6 @@ void GSDeviceOGL::ClearRenderTarget(GSTexture* t, uint32 c)
|
|||
ClearRenderTarget(t, color);
|
||||
}
|
||||
|
||||
void GSDeviceOGL::ClearRenderTarget_i(GSTexture* t, int32 c)
|
||||
{
|
||||
// Hopefully AMD mesa will support this extension soon
|
||||
ASSERT(!GLLoader::found_GL_ARB_clear_texture);
|
||||
|
||||
if (!t) return;
|
||||
|
||||
GSTextureOGL* T = static_cast<GSTextureOGL*>(t);
|
||||
|
||||
GL_PUSH("Clear RTi %d", T->GetID());
|
||||
|
||||
uint32 old_color_mask = GLState::wrgba;
|
||||
OMSetColorMaskState();
|
||||
|
||||
// Keep SCISSOR_TEST enabled on purpose to reduce the size
|
||||
// of clean in DATE (impact big upscaling)
|
||||
int32 col[4] = {c, c, c, c};
|
||||
|
||||
OMSetFBO(m_fbo);
|
||||
OMAttachRt(T);
|
||||
|
||||
// Blending is not supported when you render to an Integer texture
|
||||
if (GLState::blend) {
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
glClearBufferiv(GL_COLOR, 0, col);
|
||||
|
||||
OMSetColorMaskState(OMColorMaskSelector(old_color_mask));
|
||||
|
||||
if (GLState::blend) {
|
||||
glEnable(GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
void GSDeviceOGL::ClearDepth(GSTexture* t)
|
||||
{
|
||||
if (!t) return;
|
||||
|
@ -917,11 +882,7 @@ void GSDeviceOGL::InitPrimDateTexture(GSTexture* rt, const GSVector4i& area)
|
|||
|
||||
// Clean with the max signed value
|
||||
int max_int = 0x7FFFFFFF;
|
||||
if (GLLoader::found_GL_ARB_clear_texture) {
|
||||
static_cast<GSTextureOGL*>(m_date.t)->Clear(&max_int, area);
|
||||
} else {
|
||||
ClearRenderTarget_i(m_date.t, max_int);
|
||||
}
|
||||
static_cast<GSTextureOGL*>(m_date.t)->Clear(&max_int, area);
|
||||
|
||||
glBindImageTexture(2, static_cast<GSTextureOGL*>(m_date.t)->GetID(), 0, false, 0, GL_READ_WRITE, GL_R32I);
|
||||
#ifdef ENABLE_OGL_DEBUG
|
||||
|
|
|
@ -532,7 +532,6 @@ public:
|
|||
|
||||
void ClearRenderTarget(GSTexture* t, const GSVector4& c) final;
|
||||
void ClearRenderTarget(GSTexture* t, uint32 c) final;
|
||||
void ClearRenderTarget_i(GSTexture* t, int32 c);
|
||||
void ClearDepth(GSTexture* t) final;
|
||||
void ClearStencil(GSTexture* t, uint8 c) final;
|
||||
|
||||
|
|
|
@ -1331,7 +1331,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
|||
} else if (m_accurate_date) {
|
||||
GL_PERF("Slow DATE with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max);
|
||||
|
||||
if (GLLoader::found_GL_ARB_shader_image_load_store) {
|
||||
if (GLLoader::found_GL_ARB_shader_image_load_store && GLLoader::found_GL_ARB_clear_texture) {
|
||||
DATE_GL42 = true;
|
||||
} else {
|
||||
m_require_full_barrier = true;
|
||||
|
|
Loading…
Reference in New Issue