main: Changed _mesa_alloc_texture_storage to _mesa_AllocTextureStorage_sw.
authorLaura Ekstrand <laura@jlekstrand.net>
Thu, 4 Dec 2014 22:28:19 +0000 (14:28 -0800)
committerLaura Ekstrand <laura@jlekstrand.net>
Thu, 8 Jan 2015 19:37:28 +0000 (11:37 -0800)
In order to implement ARB_DIRECT_STATE_ACCESS, many GL API functions must now
rely on a backend that both traditional and DSA functions can use. For
instance, _mesa_TexStorage2D and _mesa_TextureStorage2D both call a backend
function _mesa_texture_storage that takes a context and a texture object as
arguments.  The backend is named _mesa_texture_storage so that Meta can call
it and avoid looking up the context and the texture object.  However, backend
names often look very close to the names of software fallbacks (ie.
_mesa_alloc_texture_storage).  For this reason, software fallbacks have been
renamed for clarity to have the form _mesa_[Driver function name]_sw.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/common/driverfuncs.c
src/mesa/drivers/dri/i965/intel_tex.c
src/mesa/main/texstorage.c
src/mesa/main/texstorage.h

index 4f0f7a686ab4f0685582c8c5b77d2233b80736f7..0a5220ad7602c0a0d9608996b27e671ac522c871 100644 (file)
@@ -210,7 +210,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
    driver->EndCallList = NULL;
 
    /* GL_ARB_texture_storage */
-   driver->AllocTextureStorage = _mesa_alloc_texture_storage;
+   driver->AllocTextureStorage = _mesa_AllocTextureStorage_sw;
 
    /* GL_ARB_texture_view */
    driver->TextureView = NULL;
index 3be72d5faa12f86564d03d1ef4c92792aeae0619..b2c0335f19890cea4faf6342627c1ef608e21c1d 100644 (file)
@@ -114,7 +114,7 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
 /**
  * ctx->Driver.AllocTextureStorage() handler.
  *
- * Compare this to _mesa_alloc_texture_storage, which would call into
+ * Compare this to _mesa_AllocTextureStorage_sw, which would call into
  * intel_alloc_texture_image_buffer() above.
  */
 static GLboolean
index 897d5891a87b8bc94ea4230d87c1c0d3411a68ed..f41076a4b951959e3efdf1c5a87a3068b9c11e22 100644 (file)
@@ -242,10 +242,10 @@ _mesa_is_legal_tex_storage_format(struct gl_context *ctx, GLenum internalformat)
  * checks at glTexImage* time.
  */
 GLboolean
-_mesa_alloc_texture_storage(struct gl_context *ctx,
-                            struct gl_texture_object *texObj,
-                            GLsizei levels, GLsizei width,
-                            GLsizei height, GLsizei depth)
+_mesa_AllocTextureStorage_sw(struct gl_context *ctx,
+                             struct gl_texture_object *texObj,
+                             GLsizei levels, GLsizei width,
+                             GLsizei height, GLsizei depth)
 {
    const int numFaces = _mesa_num_tex_faces(texObj->Target);
    int face;
index ec4f713748306bcff4845631148d40c97d6f7dd6..79f228cea3e7a327b74e488c02f9ca9290582599 100644 (file)
@@ -62,9 +62,9 @@ extern GLboolean
 _mesa_is_legal_tex_storage_format(struct gl_context *ctx, GLenum internalformat);
 
 extern GLboolean
-_mesa_alloc_texture_storage(struct gl_context *ctx,
-                            struct gl_texture_object *texObj,
-                            GLsizei levels, GLsizei width,
-                            GLsizei height, GLsizei depth);
+_mesa_AllocTextureStorage_sw(struct gl_context *ctx,
+                             struct gl_texture_object *texObj,
+                             GLsizei levels, GLsizei width,
+                             GLsizei height, GLsizei depth);
 
 #endif /* TEXSTORAGE_H */