mesa/es3: Enable ES 3.0 API and shading language version
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 8 Aug 2012 22:25:00 +0000 (15:25 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 25 Jan 2013 13:30:40 +0000 (08:30 -0500)
v2: Add ARB_internalformat_query to the list of required extensions.

v3: Add OES_depth_texture_cube_map to the list of required extensions.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/getstring.c
src/mesa/main/version.c

index 1f23cc0a4ed4805a2547a33e5598bafbf27c011d..aa3a528fd3d9c9c1434d2bd1dc43b32af39272bb 100644 (file)
@@ -74,7 +74,9 @@ shading_language_version(struct gl_context *ctx)
       break;
 
    case API_OPENGLES2:
-      return (const GLubyte *) "OpenGL ES GLSL ES 1.0.16";
+      return (ctx->Version < 30)
+         ? (const GLubyte *) "OpenGL ES GLSL ES 1.0.16"
+         : (const GLubyte *) "OpenGL ES GLSL ES 3.0";
 
    case API_OPENGLES:
       /* fall-through */
index 4373d7b9180a2764a682ca1378d1ba7076461f2a..e944a55182690cdacdf33426f283bb2db8ce8a9a 100644 (file)
@@ -323,7 +323,30 @@ compute_version_es2(struct gl_context *ctx)
                               ctx->Extensions.ARB_fragment_shader &&
                               ctx->Extensions.ARB_texture_non_power_of_two &&
                               ctx->Extensions.EXT_blend_equation_separate);
-   if (ver_2_0) {
+   /* FINISHME: This list isn't quite right. */
+   const GLboolean ver_3_0 = (ctx->Extensions.ARB_half_float_vertex &&
+                              ctx->Extensions.ARB_internalformat_query &&
+                              ctx->Extensions.ARB_map_buffer_range &&
+                              ctx->Extensions.ARB_shader_texture_lod &&
+                              ctx->Extensions.ARB_texture_float &&
+                              ctx->Extensions.ARB_texture_rg &&
+                              ctx->Extensions.ARB_texture_compression_rgtc &&
+                              ctx->Extensions.EXT_draw_buffers2 &&
+                              /* ctx->Extensions.ARB_framebuffer_object && */
+                              ctx->Extensions.EXT_framebuffer_sRGB &&
+                              ctx->Extensions.EXT_packed_float &&
+                              ctx->Extensions.EXT_texture_array &&
+                              ctx->Extensions.EXT_texture_shared_exponent &&
+                              ctx->Extensions.EXT_transform_feedback &&
+                              ctx->Extensions.NV_conditional_render &&
+                              ctx->Extensions.ARB_draw_instanced &&
+                              ctx->Extensions.ARB_uniform_buffer_object &&
+                              ctx->Extensions.EXT_texture_snorm &&
+                              ctx->Extensions.NV_primitive_restart &&
+                              ctx->Extensions.OES_depth_texture_cube_map);
+   if (ver_3_0) {
+      ctx->Version = 30;
+   } else if (ver_2_0) {
       ctx->Version = 20;
    } else {
       _mesa_problem(ctx, "Incomplete OpenGL ES 2.0 support.");