mesa: Don't set dispatch pointer for glTexStorage in ES2
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 5 Sep 2012 21:07:50 +0000 (14:07 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Sep 2012 15:19:53 +0000 (08:19 -0700)
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/api_exec.c

index ad69fc271ec4b1fe10ce057cdb46f897ecf67652..69b09b80080c4649276bcc74115973b2c2b81ac1 100644 (file)
@@ -874,10 +874,12 @@ _mesa_create_exec_table(struct gl_context *ctx)
       SET_TexStorage1D(exec, _mesa_TexStorage1D);
       SET_TextureStorage1DEXT(exec, _mesa_TextureStorage1DEXT);
    }
-   SET_TexStorage2D(exec, _mesa_TexStorage2D);
-   SET_TexStorage3D(exec, _mesa_TexStorage3D);
-   SET_TextureStorage2DEXT(exec, _mesa_TextureStorage2DEXT);
-   SET_TextureStorage3DEXT(exec, _mesa_TextureStorage3DEXT);
+   if (_mesa_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
+      SET_TexStorage2D(exec, _mesa_TexStorage2D);
+      SET_TexStorage3D(exec, _mesa_TexStorage3D);
+      SET_TextureStorage2DEXT(exec, _mesa_TextureStorage2DEXT);
+      SET_TextureStorage3DEXT(exec, _mesa_TextureStorage3DEXT);
+   }
 
    if (ctx->API != API_OPENGLES2) {
       _mesa_init_sampler_object_dispatch(exec);