From: Rémi Bernon <rbernon@codeweavers.com> Instead of overriding the function itself. Native NVIDIA driver doesn't advertize the extension but supports the functions nonetheless. --- dlls/opengl32/make_opengl | 1 + dlls/opengl32/tests/opengl.c | 22 ++++++++++++++++++++++ dlls/opengl32/unix_thunks.c | 10 +++++----- dlls/opengl32/unix_wgl.c | 1 - 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 61771b0b4fb..6faf7eff2a8 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -968,6 +968,7 @@ my %unexposed_extensions = my %extension_aliases = ( "GL_EXT_blend_equation_separate" => "GL_ATI_blend_equation_separate", + "GL_EXT_copy_texture" => "GL_VERSION_1_2", "GL_EXT_multi_draw_arrays" => "GL_SUN_multi_draw_arrays", ); diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 5882d75f200..488d009b731 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -2199,6 +2199,7 @@ static void test_getprocaddress(HDC hdc) const char *extensions = (const char*)glGetString(GL_EXTENSIONS); PROC func = NULL; HGLRC ctx = wglGetCurrentContext(); + BOOL expect; if (!extensions) { @@ -2237,6 +2238,27 @@ static void test_getprocaddress(HDC hdc) func = wglGetProcAddress("glActiveTextureARB"); ok(func == NULL, "Function lookup without a context passed, expected a failure; last error %#lx\n", GetLastError()); wglMakeCurrent(hdc, ctx); + + /* functions aren't automatically aliased */ + func = wglGetProcAddress("glBlendFuncSeparate"); + ok(func != NULL, "got glBlendFuncSeparate %p\n", func); + func = wglGetProcAddress("glBlendFuncSeparateINGR"); + expect = gl_extension_supported(extensions, "GL_INGR_blend_func_separate"); + ok(expect ? func != NULL : func == NULL, "got glBlendFuncSeparateINGR %p\n", func); + + /* needed by RuneScape */ + expect = gl_extension_supported(extensions, "GL_EXT_copy_texture"); + ok(expect || broken(!expect) /* NVIDIA */, "GL_EXT_copy_texture missing\n"); + func = wglGetProcAddress("glCopyTexImage1DEXT"); + ok(func != NULL, "got glCopyTexImage1DEXT %p\n", func); + func = wglGetProcAddress("glCopyTexImage2DEXT"); + ok(func != NULL, "got glCopyTexImage2DEXT %p\n", func); + func = wglGetProcAddress("glCopyTexSubImage1DEXT"); + ok(func != NULL, "got glCopyTexSubImage1DEXT %p\n", func); + func = wglGetProcAddress("glCopyTexSubImage2DEXT"); + ok(func != NULL, "got glCopyTexSubImage2DEXT %p\n", func); + func = wglGetProcAddress("glCopyTexSubImage3DEXT"); + ok(func != NULL, "got glCopyTexSubImage3DEXT %p\n", func); } static void test_make_current_read(HDC hdc) diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index 6f199d5a0fb..2743b3bef87 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -92069,12 +92069,12 @@ const struct registry_entry extension_registry[2756] = { "glCopyMultiTexSubImage3DEXT", "GL_EXT_direct_state_access\0", offsetof(struct opengl_funcs, p_glCopyMultiTexSubImage3DEXT) }, { "glCopyNamedBufferSubData", "GL_ARB_direct_state_access\0GL_VERSION_4_5\0", offsetof(struct opengl_funcs, p_glCopyNamedBufferSubData) }, { "glCopyPathNV", "GL_NV_path_rendering\0", offsetof(struct opengl_funcs, p_glCopyPathNV) }, - { "glCopyTexImage1DEXT", "GL_EXT_copy_texture\0", offsetof(struct opengl_funcs, p_glCopyTexImage1DEXT) }, - { "glCopyTexImage2DEXT", "GL_EXT_copy_texture\0", offsetof(struct opengl_funcs, p_glCopyTexImage2DEXT) }, - { "glCopyTexSubImage1DEXT", "GL_EXT_copy_texture\0", offsetof(struct opengl_funcs, p_glCopyTexSubImage1DEXT) }, - { "glCopyTexSubImage2DEXT", "GL_EXT_copy_texture\0", offsetof(struct opengl_funcs, p_glCopyTexSubImage2DEXT) }, + { "glCopyTexImage1DEXT", "GL_EXT_copy_texture\0GL_VERSION_1_2\0", offsetof(struct opengl_funcs, p_glCopyTexImage1DEXT) }, + { "glCopyTexImage2DEXT", "GL_EXT_copy_texture\0GL_VERSION_1_2\0", offsetof(struct opengl_funcs, p_glCopyTexImage2DEXT) }, + { "glCopyTexSubImage1DEXT", "GL_EXT_copy_texture\0GL_VERSION_1_2\0", offsetof(struct opengl_funcs, p_glCopyTexSubImage1DEXT) }, + { "glCopyTexSubImage2DEXT", "GL_EXT_copy_texture\0GL_VERSION_1_2\0", offsetof(struct opengl_funcs, p_glCopyTexSubImage2DEXT) }, { "glCopyTexSubImage3D", "GL_VERSION_1_2\0", offsetof(struct opengl_funcs, p_glCopyTexSubImage3D) }, - { "glCopyTexSubImage3DEXT", "GL_EXT_copy_texture\0", offsetof(struct opengl_funcs, p_glCopyTexSubImage3DEXT) }, + { "glCopyTexSubImage3DEXT", "GL_EXT_copy_texture\0GL_VERSION_1_2\0", offsetof(struct opengl_funcs, p_glCopyTexSubImage3DEXT) }, { "glCopyTextureImage1DEXT", "GL_EXT_direct_state_access\0", offsetof(struct opengl_funcs, p_glCopyTextureImage1DEXT) }, { "glCopyTextureImage2DEXT", "GL_EXT_direct_state_access\0", offsetof(struct opengl_funcs, p_glCopyTextureImage2DEXT) }, { "glCopyTextureSubImage1D", "GL_ARB_direct_state_access\0GL_VERSION_4_5\0", offsetof(struct opengl_funcs, p_glCopyTextureSubImage1D) }, diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 09b1bbf063b..256c512be9c 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -924,7 +924,6 @@ PROC wrap_wglGetProcAddress( TEB *teb, LPCSTR name ) unsigned int i; static const struct { const char *name, *alt; } alternatives[] = { - { "glCopyTexSubImage3DEXT", "glCopyTexSubImage3D" }, /* needed by RuneScape */ { "glVertexAttribDivisor", "glVertexAttribDivisorARB"}, /* needed by Caffeine */ { "glCompressedTexImage2DARB", "glCompressedTexImage2D" }, /* needed by Grim Fandango Remastered */ }; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9987