summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-01-22 00:58:12 +0100
committerMarek Olšák <[email protected]>2014-01-28 01:39:25 +0100
commita9ae7635b77fc4fd9f4614fead63fefa6ff74f4e (patch)
tree4c751ccad59ece93f559592ff659eea293bbd114 /src/gallium/drivers/radeon/r600_texture.c
parent8739c60796453c885c5cfcbb5dd7726eda8932e2 (diff)
r600g,radeonsi: consolidate the contents of r600_resource.c
Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index caf3743e72f..878b26f2093 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -236,8 +236,8 @@ static int r600_setup_surface(struct pipe_screen *screen,
}
static boolean r600_texture_get_handle(struct pipe_screen* screen,
- struct pipe_resource *ptex,
- struct winsys_handle *whandle)
+ struct pipe_resource *ptex,
+ struct winsys_handle *whandle)
{
struct r600_texture *rtex = (struct r600_texture*)ptex;
struct r600_resource *resource = &rtex->resource;
@@ -763,9 +763,9 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
0, NULL, &surface);
}
-struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen,
- const struct pipe_resource *templ,
- struct winsys_handle *whandle)
+static struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen,
+ const struct pipe_resource *templ,
+ struct winsys_handle *whandle)
{
struct r600_common_screen *rscreen = (struct r600_common_screen*)screen;
struct pb_buffer *buf = NULL;
@@ -1071,10 +1071,16 @@ static void r600_texture_transfer_unmap(struct pipe_context *ctx,
static const struct u_resource_vtbl r600_texture_vtbl =
{
- r600_texture_get_handle, /* get_handle */
+ NULL, /* get_handle */
r600_texture_destroy, /* resource_destroy */
r600_texture_transfer_map, /* transfer_map */
NULL, /* transfer_flush_region */
r600_texture_transfer_unmap, /* transfer_unmap */
NULL /* transfer_inline_write */
};
+
+void r600_init_texture_functions(struct r600_common_screen *rscreen)
+{
+ rscreen->b.resource_from_handle = r600_texture_from_handle;
+ rscreen->b.resource_get_handle = r600_texture_get_handle;
+}