Rémi Bernon (@rbernon) commented about dlls/win32u/tests/d3dkmt.c:
+ * - Memory object holds shared resource handle + * On AMD: + * - glImportMemoryWin32NameEXT: leaks a shared resource handle + * - glImportMemoryWin32HandleEXT: doesn't hold a shared resource handle + */ + if (opengl_imp && GET_DIM(test) == 2 && !opengl_imp->broken) + { + gl_img = import_opengl_image( opengl_imp, width_2d, height_2d, 1, 4, name, handle, GL_HANDLE_TYPE_OPAQUE_WIN32_EXT ); + ok_x4( glGetError(), ==, 0 ); + + CloseHandle( handle ); + status = open_shared_resource( path, &handle ); + todo_wine ok_nt( STATUS_SUCCESS, status ); + + destroy_opengl_image( gl_img ); + glFinish(); Should this be moved to destroy_opengl_image? It depends on a GL context to be current, which isn't necessarily the case here.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9526#note_122929