mesa/es2: Allow depth component cube maps in ES2 if the extension is enabled
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 18 Jan 2013 23:43:08 +0000 (15:43 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 21 Jan 2013 01:56:18 +0000 (20:56 -0500)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/teximage.c

index b2fb41bb62409d551594bfb11d22ea4126cce189..2539d86e3bd1a9d98723f17d11a765852925085c 100644 (file)
@@ -2020,7 +2020,8 @@ texture_error_check( struct gl_context *ctx,
           target != GL_TEXTURE_RECTANGLE_ARB &&
           target != GL_PROXY_TEXTURE_RECTANGLE_ARB &&
          !((_mesa_is_cube_face(target) || target == GL_PROXY_TEXTURE_CUBE_MAP) &&
-           (ctx->Version >= 30 || ctx->Extensions.EXT_gpu_shader4)) &&
+           (ctx->Version >= 30 || ctx->Extensions.EXT_gpu_shader4
+            || (ctx->API == API_OPENGLES2 && ctx->Extensions.OES_depth_texture_cube_map))) &&
           !((target == GL_TEXTURE_CUBE_MAP_ARRAY ||
              target == GL_PROXY_TEXTURE_CUBE_MAP_ARRAY) &&
             ctx->Extensions.ARB_texture_cube_map_array)) {