mesa: remove dd_function_table::GetCompressedTexSubImage and clean it up
authorMarek Olšák <marek.olsak@amd.com>
Wed, 13 Dec 2017 18:14:36 +0000 (19:14 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 6 Jan 2018 08:51:43 +0000 (09:51 +0100)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/common/driverfuncs.c
src/mesa/main/dd.h
src/mesa/main/texgetimage.c
src/mesa/main/texgetimage.h
src/mesa/state_tracker/st_cb_texture.c

index ddb4bb6d6a10b6813b60d95432b9ef2c4b585b23..94dc0e62753ae46e81e424173c1df6cb2b4e579e 100644 (file)
@@ -101,7 +101,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
    driver->TestProxyTexImage = _mesa_test_proxy_teximage;
    driver->CompressedTexImage = _mesa_store_compressed_teximage;
    driver->CompressedTexSubImage = _mesa_store_compressed_texsubimage;
-   driver->GetCompressedTexSubImage = _mesa_GetCompressedTexSubImage_sw;
    driver->BindTexture = NULL;
    driver->NewTextureObject = _mesa_new_texture_object;
    driver->DeleteTexture = _mesa_delete_texture_object;
index 4e4d2a6f37decc8f77c77f087747cbd28ce3b8fb..3455ddbd122e5d89c733476d60ef11d777c6cd1f 100644 (file)
@@ -337,16 +337,6 @@ struct dd_function_table {
                                  GLsizei width, GLsizei height, GLsizei depth,
                                  GLenum format,
                                  GLsizei imageSize, const GLvoid *data);
-
-   /**
-    * Called by glGetCompressedTexImage.
-    */
-   void (*GetCompressedTexSubImage)(struct gl_context *ctx,
-                                    struct gl_texture_image *texImage,
-                                    GLint xoffset, GLint yoffset,
-                                    GLint zoffset, GLsizei width,
-                                    GLsizei height, GLsizei depth,
-                                    GLvoid *data);
    /*@}*/
 
    /**
index 26cf3e5644efd835c6ceeca3d3056cc46dd8403f..c61842e39ad73bd6faf4b5c5872cf289ba207cba 100644 (file)
@@ -761,16 +761,15 @@ _mesa_GetTexSubImage_sw(struct gl_context *ctx,
 
 
 /**
- * This is the software fallback for Driver.GetCompressedTexSubImage().
- * All error checking will have been done before this routine is called.
+ * This function assumes that all error checking has been done.
  */
-void
-_mesa_GetCompressedTexSubImage_sw(struct gl_context *ctx,
-                                  struct gl_texture_image *texImage,
-                                  GLint xoffset, GLint yoffset,
-                                  GLint zoffset, GLsizei width,
-                                  GLint height, GLint depth,
-                                  GLvoid *img)
+static void
+get_compressed_texsubimage_sw(struct gl_context *ctx,
+                              struct gl_texture_image *texImage,
+                              GLint xoffset, GLint yoffset,
+                              GLint zoffset, GLsizei width,
+                              GLint height, GLint depth,
+                              GLvoid *img)
 {
    const GLuint dimensions =
       _mesa_get_texture_dimensions(texImage->TexObject->Target);
@@ -1661,9 +1660,9 @@ get_compressed_texture_image(struct gl_context *ctx,
       texImage = texObj->Image[firstFace + i][level];
       assert(texImage);
 
-      ctx->Driver.GetCompressedTexSubImage(ctx, texImage,
-                                           xoffset, yoffset, zoffset,
-                                           width, height, depth, pixels);
+      get_compressed_texsubimage_sw(ctx, texImage,
+                                    xoffset, yoffset, zoffset,
+                                    width, height, depth, pixels);
 
       /* next cube face */
       pixels = (GLubyte *) pixels + imageStride;
index 63c75eb931d934859bf11cf0425d48404d7c2d6c..3928e7abb7b7b23ce1984bddf536bd7abb1e6136 100644 (file)
@@ -43,14 +43,6 @@ _mesa_GetTexSubImage_sw(struct gl_context *ctx,
                         GLenum format, GLenum type, GLvoid *pixels,
                         struct gl_texture_image *texImage);
 
-extern void
-_mesa_GetCompressedTexSubImage_sw(struct gl_context *ctx,
-                                  struct gl_texture_image *texImage,
-                                  GLint xoffset, GLint yoffset,
-                                  GLint zoffset, GLsizei width,
-                                  GLint height, GLint depth,
-                                  GLvoid *data);
-
 extern void
 _mesa_get_compressed_texture_image( struct gl_context *ctx,
                                     struct gl_texture_object *texObj,
index 7766273381b275e88c9abef28cbf91c5c7c28c59..98f2443bb30fb23c24cb7409ed68fe16a83070bb 100644 (file)
@@ -3180,7 +3180,6 @@ st_init_texture_functions(struct dd_function_table *functions)
 
    /* compressed texture functions */
    functions->CompressedTexImage = st_CompressedTexImage;
-   functions->GetCompressedTexSubImage = _mesa_GetCompressedTexSubImage_sw;
 
    functions->NewTextureObject = st_NewTextureObject;
    functions->NewTextureImage = st_NewTextureImage;