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

2012-11-21 Thread Ian Romanick

On 11/20/2012 03:31 PM, Chad Versace wrote:

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.vers...@linux.intel.com


I modified Ken's patch the same way earlier today.  For now this can 
only go on the gles3 branch... obviously. :)


Reviewed-by: Ian Romanick ian.d.roman...@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;



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2012-11-20 Thread Kenneth Graunke

On 11/20/2012 03:31 PM, Chad Versace wrote:

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.vers...@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;


Oops.  Yeah, that's definitely necessary.

Feel free to replace my patch or squash them and claim authorship.

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev