gsdx-ogl: GL_ARB_copy_image is now mandatory

This commit is contained in:
Gregory Hainaut 2016-04-19 18:58:25 +02:00
parent 99bccc6dff
commit 9598417f42
4 changed files with 8 additions and 15 deletions

View File

@ -163,8 +163,6 @@ 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)
// DX10 GPU limited driver (SW)
bool found_GL_ARB_copy_image = false;
// DX11 GPU
bool found_GL_ARB_draw_buffers_blend = false; // Not supported on AMD R600 (80 nm class chip, HD2900). Nvidia requires FERMI. Intel SB
bool found_GL_ARB_gpu_shader5 = false; // Require IvyBridge
@ -174,6 +172,7 @@ namespace GLLoader {
// Mandatory
bool found_GL_ARB_buffer_storage = false;
bool found_GL_ARB_clip_control = false;
bool found_GL_ARB_copy_image = false;
bool found_GL_ARB_direct_state_access = false;
bool found_GL_ARB_separate_shader_objects = false;
bool found_GL_ARB_shading_language_420pack = false;
@ -296,7 +295,7 @@ namespace GLLoader {
status &= status_and_override(found_GL_ARB_shading_language_420pack, "GL_ARB_shading_language_420pack", true);
status &= status_and_override(found_GL_ARB_texture_storage, "GL_ARB_texture_storage", true);
// GL4.3
status &= status_and_override(found_GL_ARB_copy_image, "GL_ARB_copy_image");
status &= status_and_override(found_GL_ARB_copy_image, "GL_ARB_copy_image", true);
// GL4.4
status &= status_and_override(found_GL_ARB_buffer_storage,"GL_ARB_buffer_storage", true);
status &= status_and_override(found_GL_ARB_clear_texture,"GL_ARB_clear_texture");

View File

@ -338,7 +338,6 @@ namespace GLLoader {
extern bool in_replayer;
// GL
extern bool found_GL_ARB_copy_image;
extern bool found_geometry_shader;
extern bool found_GL_ARB_gpu_shader5;
extern bool found_GL_ARB_shader_image_load_store;

View File

@ -974,16 +974,11 @@ void GSDeviceOGL::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r
GL_PUSH("CopyRect from %d to %d", sid, did);
if (GLLoader::found_GL_ARB_copy_image) {
glCopyImageSubData( sid, GL_TEXTURE_2D,
0, r.x, r.y, 0,
did, GL_TEXTURE_2D,
0, 0, 0, 0,
r.width(), r.height(), 1);
} else {
// Slower copy (conversion is done)
CopyRectConv(sTex, dTex, r, true);
}
glCopyImageSubData( sid, GL_TEXTURE_2D,
0, r.x, r.y, 0,
did, GL_TEXTURE_2D,
0, 0, 0, 0,
r.width(), r.height(), 1);
GL_POP();
}

View File

@ -116,7 +116,7 @@ void GSWndGL::PopulateGlFunction()
GL_EXT_LOAD_OPT(glBindImageTexture);
GL_EXT_LOAD_OPT(glMemoryBarrier);
// GL4.3
GL_EXT_LOAD_OPT(glCopyImageSubData);
GL_EXT_LOAD(glCopyImageSubData);
GL_EXT_LOAD_OPT(glInvalidateTexImage);
GL_EXT_LOAD_OPT(glPushDebugGroup);
GL_EXT_LOAD_OPT(glPopDebugGroup);