[Mesa-dev] [PATCH gles3] i965: Fix maximum supported OpenGL ES2 context version

Chad Versace chad.versace at linux.intel.com
Tue Nov 20 15:31:15 PST 2012


brwCreateContext unconditionally set the maximum supported OpenGL ES2
context version to 3.0. Instead, we need to predicate it on hardware
capabilities. Set it to 3.0 only if and only if OpenGL 3.0 is supported.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 src/mesa/drivers/dri/i965/brw_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 976cb67..6b04290 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -111,7 +111,7 @@ brwCreateContext(int api,
       max_supported_version = 11;
       break;
    case API_OPENGLES2:
-      max_supported_version = 30;
+      max_supported_version = supports_gl30 ? 30 : 20;
       break;
    case API_OPENGL_CORE:
       max_supported_version = supports_gl30 ? 31 : 0;
-- 
1.7.11.7



More information about the mesa-dev mailing list