From: Chip Davis Subject: [PATCH 1/4] wined3d: Fix detection of Apple core contexts. Message-Id: <20200409062135.33872-1-cdavis@codeweavers.com> Date: Thu, 9 Apr 2020 01:21:32 -0500 Core contexts on Mac OS don't have GL_APPLE_fence or GL_APPLE_ycbcr_422... but they do have GL_APPLE_flush_render and GL_APPLE_rgb_422. So, go back to using APPLE_flush_render in our OS X detection, and accept APPLE_rgb_422 in addition to APPLE_ycbcr_422. Signed-off-by: Chip Davis --- dlls/wined3d/adapter_gl.c | 5 ++++- dlls/wined3d/wined3d_gl.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 77fe4ca720f..dfe598acf1b 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -54,6 +54,8 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_APPLE_float_pixels", APPLE_FLOAT_PIXELS }, {"GL_APPLE_flush_buffer_range", APPLE_FLUSH_BUFFER_RANGE }, {"GL_APPLE_ycbcr_422", APPLE_YCBCR_422 }, + {"GL_APPLE_flush_render", APPLE_FLUSH_RENDER }, + {"GL_APPLE_rgb_422", APPLE_RGB_422 }, /* ARB */ {"GL_ARB_base_instance", ARB_BASE_INSTANCE }, @@ -1225,7 +1227,8 @@ static enum wined3d_gl_vendor wined3d_guess_gl_vendor(const struct wined3d_gl_in * is specific to the Mac OS X window management, and GL_APPLE_ycbcr_422 is QuickTime specific. So * the chance that other implementations support them is rather small since Win32 QuickTime uses * DirectDraw, not OpenGL. */ - if (gl_info->supported[APPLE_FENCE] && gl_info->supported[APPLE_YCBCR_422]) + if (gl_info->supported[APPLE_FLUSH_RENDER] + && (gl_info->supported[APPLE_YCBCR_422] || gl_info->supported[APPLE_RGB_422])) return GL_VENDOR_APPLE; if (strstr(gl_vendor_string, "NVIDIA")) diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 6b1c99e6da8..2dbc56ab79d 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -37,6 +37,8 @@ enum wined3d_gl_extension APPLE_FENCE, APPLE_FLOAT_PIXELS, APPLE_FLUSH_BUFFER_RANGE, + APPLE_FLUSH_RENDER, + APPLE_RGB_422, APPLE_YCBCR_422, /* ARB */ ARB_BASE_INSTANCE, -- 2.24.0