summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2015-06-16 15:32:46 -0600
committerBrian Paul <[email protected]>2015-06-19 08:45:00 -0600
commiteee9247018d710659f14678715a85e4ad6f54366 (patch)
treea29e30a6c0499d7ae60475c9032a2b8706534878 /src/gallium/state_trackers
parent528bd94432b20becc1f436da75f7a102416dabeb (diff)
st/wgl: Don't return core profile for 3.1 contexts.
WGL_CONTEXT_PROFILE_MASK_ARB doesn't apply to desktop OpenGL versions less than 3.2 -- applications can't specify whether they want a core or a compat 3.1 context -- instead they are supposed the check whether the returned context advertises GL_ARB_compatibility extension. Mesa doesn't support compatability contexts for version higher than 3.1, so we used to return core profile context, but this makes several Windows applications unhappy, because they just assume they got a compatability context without checking. So it seems safer to on Windows to never return core profile for 3.1, ie, just fail the context creation. VMware PR1365920. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/wgl/stw_context.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_context.c b/src/gallium/state_trackers/wgl/stw_context.c
index 2ed6c2bfac9..3e99cc44db7 100644
--- a/src/gallium/state_trackers/wgl/stw_context.c
+++ b/src/gallium/state_trackers/wgl/stw_context.c
@@ -226,14 +226,13 @@ stw_create_context_attribs(HDC hdc, INT iLayerPlane, DHGLRC hShareContext,
* be implemented, as determined by the implementation.
* * The core profile of version 3.2 or greater."
*
- * and because Mesa doesn't support GL_ARB_compatibility, the only chance to
- * honour a 3.1 context is through core profile.
+ * But Mesa doesn't support GL_ARB_compatibility, while most prevalent
+ * Windows OpenGL implementations do, and unfortunately many Windows
+ * applications don't check whether they receive or not a context with
+ * GL_ARB_compatibility, so returning a core profile here does more harm
+ * than good.
*/
- if (majorVersion == 3 && minorVersion == 1) {
- attribs.profile = ST_PROFILE_OPENGL_CORE;
- } else {
- attribs.profile = ST_PROFILE_DEFAULT;
- }
+ attribs.profile = ST_PROFILE_DEFAULT;
break;
case WGL_CONTEXT_ES_PROFILE_BIT_EXT:
if (majorVersion >= 2) {