summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2008-02-27 14:21:12 -0700
committerBrian <brian@i915.localnet.net>2008-02-27 14:21:12 -0700
commit6f715dcc219071e574e363a9db4365c9c31ebbd3 (patch)
treec6d68d50d428b418a242578d06db39328037f715 /src/gallium/include/pipe
parent364f8cad0f8f02fd39d9c51ea0774d349121b58d (diff)
gallium: remove pipe_context->texture_create/release/get_tex_surface()
These functions are now per-screen, not per-context.
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_context.h18
-rw-r--r--src/gallium/include/pipe/p_inlines.h18
2 files changed, 8 insertions, 28 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index bb345df153..d0f25d7d46 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -189,30 +189,16 @@ struct pipe_context {
struct pipe_surface *ps,
unsigned clearValue);
-
- /*
- * Texture functions
- * XXX these are moving to pipe_screen...
- */
- struct pipe_texture * (*texture_create)(struct pipe_context *pipe,
- const struct pipe_texture *templat);
-
- void (*texture_release)(struct pipe_context *pipe,
- struct pipe_texture **pt);
-
/**
* Called when texture data is changed.
* Note: we could pass some hints about which mip levels or cube faces
* have changed...
+ * XXX this may go away - could pass a 'write' flag to get_tex_surface()
*/
void (*texture_update)(struct pipe_context *pipe,
struct pipe_texture *texture);
- /** Get a surface which is a "view" into a texture */
- struct pipe_surface *(*get_tex_surface)(struct pipe_context *pipe,
- struct pipe_texture *texture,
- unsigned face, unsigned level,
- unsigned zslice);
+
/* Flush rendering:
*/
diff --git a/src/gallium/include/pipe/p_inlines.h b/src/gallium/include/pipe/p_inlines.h
index a7e97fcd7d..274f76a383 100644
--- a/src/gallium/include/pipe/p_inlines.h
+++ b/src/gallium/include/pipe/p_inlines.h
@@ -107,15 +107,9 @@ pipe_texture_reference(struct pipe_texture **ptr,
pt->refcount++;
if (*ptr) {
- struct pipe_context *pipe = (*ptr)->pipe;
- /* XXX temporary mess here */
- if (pipe) {
- pipe->texture_release(pipe, ptr);
- }
- else {
- struct pipe_screen *screen = (*ptr)->screen;
- screen->texture_release(screen, ptr);
- }
+ struct pipe_screen *screen = (*ptr)->screen;
+ assert(screen);
+ screen->texture_release(screen, ptr);
assert(!*ptr);
}
@@ -127,10 +121,10 @@ pipe_texture_reference(struct pipe_texture **ptr,
static INLINE void
pipe_texture_release(struct pipe_texture **ptr)
{
- struct pipe_context *pipe;
+ struct pipe_screen *screen;
assert(ptr);
- pipe = (*ptr)->pipe;
- pipe->texture_release(pipe, ptr);
+ screen = (*ptr)->screen;
+ screen->texture_release(screen, ptr);
*ptr = NULL;
}