summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texobj.h
diff options
context:
space:
mode:
authorLaura Ekstrand <laura@jlekstrand.net>2014-11-12 11:56:12 -0800
committerLaura Ekstrand <laura@jlekstrand.net>2015-01-08 11:37:29 -0800
commitf51f6805f5dacb89b6583cbe134ee0b374ddfec7 (patch)
tree7001789d8b9d918d73b28a56c0cd8535d0676690 /src/mesa/main/texobj.h
parentd6b7c40cecfe01ec8545974b01cca16da2856ac2 (diff)
downloadexternal_mesa3d-f51f6805f5dacb89b6583cbe134ee0b374ddfec7.zip
external_mesa3d-f51f6805f5dacb89b6583cbe134ee0b374ddfec7.tar.gz
external_mesa3d-f51f6805f5dacb89b6583cbe134ee0b374ddfec7.tar.bz2
main: Nameless texture creation and deletion. Does not affect normal creation and deletion paths.
In implementing ARB_DIRECT_STATE_ACCESS functions, it is often necessary to abstract the functionality of a traditional GL API function into a backend that both the traditional and dsa API functions can share. For instance, glTexParameteri and glTextureParameteri both call _mesa_texture_parameteri, which takes a context object and a texture object as arguments. The existance of such backend functions provides the opportunity for driver internals (such as meta) to pass around the actual texture object rather than its ID or target, saving on texture object storage and look-up overhead. This patch provides nameless texture creation and deletion for meta. This will be used in an upcoming refactor of meta. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Diffstat (limited to 'src/mesa/main/texobj.h')
-rw-r--r--src/mesa/main/texobj.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h
index 723b277..0a49fe2 100644
--- a/src/mesa/main/texobj.h
+++ b/src/mesa/main/texobj.h
@@ -198,6 +198,13 @@ _mesa_unlock_context_textures( struct gl_context *ctx );
extern void
_mesa_lock_context_textures( struct gl_context *ctx );
+extern struct gl_texture_object *
+_mesa_create_nameless_texture(struct gl_context *ctx, GLenum target);
+
+extern void
+_mesa_delete_nameless_texture(struct gl_context *ctx,
+ struct gl_texture_object *texObj);
+
extern void
_mesa_bind_texture_unit(struct gl_context *ctx,
GLuint unit,