summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/identity
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-03-11 16:10:25 +0000
committerKeith Whitwell <[email protected]>2010-03-11 16:18:50 +0000
commitd35ecca5ee231c072687578642e0c22c6c0590b1 (patch)
tree18059c07c64142ebf5dd7b1b674e9426418f3f6b /src/gallium/drivers/identity
parentb43c182f19c6291c88420fa12714f952c2b461fb (diff)
gallium: remove pipe_context member from pipe_transfer
There was very little use for this beyond permitting the pipe_context::tex_transfer_destroy() function to omit the pipe_context argument. This change adds the pipe_context argument into tex_transfer_destroy() so that it looks like other pipe_context functions, and removes the pipe_context pointer from pipe_transfer.
Diffstat (limited to 'src/gallium/drivers/identity')
-rw-r--r--src/gallium/drivers/identity/id_context.c6
-rw-r--r--src/gallium/drivers/identity/id_objects.c12
-rw-r--r--src/gallium/drivers/identity/id_objects.h4
3 files changed, 15 insertions, 7 deletions
diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c
index 5e371c47c81..26770d6b1e9 100644
--- a/src/gallium/drivers/identity/id_context.c
+++ b/src/gallium/drivers/identity/id_context.c
@@ -748,9 +748,11 @@ identity_context_get_tex_transfer(struct pipe_context *_context,
}
static void
-identity_context_tex_transfer_destroy(struct pipe_transfer *_transfer)
+identity_context_tex_transfer_destroy(struct pipe_context *_pipe,
+ struct pipe_transfer *_transfer)
{
- identity_transfer_destroy(identity_transfer(_transfer));
+ identity_transfer_destroy(identity_context(_pipe),
+ identity_transfer(_transfer));
}
static void *
diff --git a/src/gallium/drivers/identity/id_objects.c b/src/gallium/drivers/identity/id_objects.c
index 91831404b8b..d37fb0042e5 100644
--- a/src/gallium/drivers/identity/id_objects.c
+++ b/src/gallium/drivers/identity/id_objects.c
@@ -30,6 +30,7 @@
#include "id_screen.h"
#include "id_objects.h"
+#include "id_context.h"
struct pipe_buffer *
identity_buffer_create(struct identity_screen *id_screen,
@@ -160,22 +161,25 @@ identity_transfer_create(struct identity_context *id_context,
memcpy(&id_transfer->base, transfer, sizeof(struct pipe_transfer));
id_transfer->base.texture = NULL;
- pipe_texture_reference(&id_transfer->base.texture, &id_texture->base);
id_transfer->transfer = transfer;
+
+ pipe_texture_reference(&id_transfer->base.texture, &id_texture->base);
assert(id_transfer->base.texture == &id_texture->base);
return &id_transfer->base;
error:
- transfer->pipe->tex_transfer_destroy(transfer);
+ id_context->pipe->tex_transfer_destroy(id_context->pipe, transfer);
return NULL;
}
void
-identity_transfer_destroy(struct identity_transfer *id_transfer)
+identity_transfer_destroy(struct identity_context *id_context,
+ struct identity_transfer *id_transfer)
{
pipe_texture_reference(&id_transfer->base.texture, NULL);
- id_transfer->transfer->pipe->tex_transfer_destroy(id_transfer->transfer);
+ id_context->pipe->tex_transfer_destroy(id_context->pipe,
+ id_transfer->transfer);
FREE(id_transfer);
}
diff --git a/src/gallium/drivers/identity/id_objects.h b/src/gallium/drivers/identity/id_objects.h
index 3c4e6d3f8c4..7333ecfb7fb 100644
--- a/src/gallium/drivers/identity/id_objects.h
+++ b/src/gallium/drivers/identity/id_objects.h
@@ -65,6 +65,7 @@ struct identity_transfer
{
struct pipe_transfer base;
+ struct pipe_context *pipe;
struct pipe_transfer *transfer;
};
@@ -183,7 +184,8 @@ identity_transfer_create(struct identity_context *id_context,
struct pipe_transfer *transfer);
void
-identity_transfer_destroy(struct identity_transfer *id_transfer);
+identity_transfer_destroy(struct identity_context *id_context,
+ struct identity_transfer *id_transfer);
struct pipe_video_surface *
identity_video_surface_create(struct identity_screen *id_screen,