From 16f6d9cf5f93eb6cdd80e2b5f6cdd7dcfb30ea89 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 4 Dec 2014 14:28:19 -0800 Subject: [PATCH] main: Changed _mesa_alloc_texture_storage to _mesa_AllocTextureStorage_sw. 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 --- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/drivers/dri/i965/intel_tex.c | 2 +- src/mesa/main/texstorage.c | 8 ++++---- src/mesa/main/texstorage.h | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 4f0f7a686ab..0a5220ad760 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -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; diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c index 3be72d5faa1..b2c0335f198 100644 --- a/src/mesa/drivers/dri/i965/intel_tex.c +++ b/src/mesa/drivers/dri/i965/intel_tex.c @@ -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 diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index 897d5891a87..f41076a4b95 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -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; diff --git a/src/mesa/main/texstorage.h b/src/mesa/main/texstorage.h index ec4f7137483..79f228cea3e 100644 --- a/src/mesa/main/texstorage.h +++ b/src/mesa/main/texstorage.h @@ -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 */ -- 2.30.2