aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texture.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-09-17 14:50:48 -0600
committerBrian Paul <[email protected]>2011-09-17 14:57:40 -0600
commit1da896803cdd09293c7bb0048a2116e237a51766 (patch)
tree223384979681f6cbe2aaecb0ef631b1970bfd4ed /src/mesa/swrast/s_texture.c
parent146f536b3332b7a2022bb4ba5e2d1d2ec4bedd98 (diff)
swrast: introduce new swrast_texture_image struct
No subclass fields yet. Subsequent patches will add the fields related to software rendering that are currently in gl_texture_image.
Diffstat (limited to 'src/mesa/swrast/s_texture.c')
-rw-r--r--src/mesa/swrast/s_texture.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c
index 6cc72c582f7..184fd952dc5 100644
--- a/src/mesa/swrast/s_texture.c
+++ b/src/mesa/swrast/s_texture.c
@@ -28,9 +28,36 @@
#include "main/context.h"
#include "main/fbobject.h"
+#include "main/teximage.h"
#include "swrast/swrast.h"
#include "swrast/s_context.h"
+
+/**
+ * Allocate a new swrast_texture_image (a subclass of gl_texture_image).
+ * Called via ctx->Driver.NewTextureImage().
+ */
+struct gl_texture_image *
+_swrast_new_texture_image( struct gl_context *ctx )
+{
+ (void) ctx;
+ return (struct gl_texture_image *) CALLOC_STRUCT(swrast_texture_image);
+}
+
+
+/**
+ * Free a swrast_texture_image (a subclass of gl_texture_image).
+ * Called via ctx->Driver.DeleteTextureImage().
+ */
+void
+_swrast_delete_texture_image(struct gl_context *ctx,
+ struct gl_texture_image *texImage)
+{
+ /* Nothing special for the subclass yet */
+ _mesa_delete_texture_image(ctx, texImage);
+}
+
+
/**
* Error checking for debugging only.
*/