summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_pipe.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/r600/r600_pipe.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/r600/r600_pipe.c')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index e217be5abae..abc25b29efe 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -211,7 +211,6 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
rctx->keep_tiling_flags = rscreen->b.info.drm_minor >= 12;
r600_init_blit_functions(rctx);
- r600_init_context_resource_functions(rctx);
if (rscreen->b.info.has_uvd) {
rctx->b.b.create_video_codec = r600_uvd_create_decoder;
@@ -826,6 +825,16 @@ static int r600_get_driver_query_info(struct pipe_screen *screen,
return 1;
}
+static struct pipe_resource *r600_resource_create(struct pipe_screen *screen,
+ const struct pipe_resource *templ)
+{
+ if (templ->target == PIPE_BUFFER &&
+ (templ->bind & PIPE_BIND_GLOBAL))
+ return r600_compute_global_buffer_create(screen, templ);
+
+ return r600_resource_create_common(screen, templ);
+}
+
struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
{
struct r600_screen *rscreen = CALLOC_STRUCT(r600_screen);
@@ -859,7 +868,7 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
rscreen->b.b.get_video_param = r600_get_video_param;
rscreen->b.b.is_video_format_supported = vl_video_buffer_is_format_supported;
}
- r600_init_screen_resource_functions(&rscreen->b.b);
+ rscreen->b.b.resource_create = r600_resource_create;
if (!r600_common_screen_init(&rscreen->b, ws)) {
FREE(rscreen);