diff options
author | Marek Olšák <[email protected]> | 2014-01-22 00:58:12 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-01-28 01:39:25 +0100 |
commit | a9ae7635b77fc4fd9f4614fead63fefa6ff74f4e (patch) | |
tree | 4c751ccad59ece93f559592ff659eea293bbd114 /src/gallium/drivers/radeonsi | |
parent | 8739c60796453c885c5cfcbb5dd7726eda8932e2 (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/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/Makefile.sources | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_resource.c | 61 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_resource.h | 2 |
5 files changed, 0 insertions, 69 deletions
diff --git a/src/gallium/drivers/radeonsi/Makefile.sources b/src/gallium/drivers/radeonsi/Makefile.sources index 56295720f4d..c24eb75194b 100644 --- a/src/gallium/drivers/radeonsi/Makefile.sources +++ b/src/gallium/drivers/radeonsi/Makefile.sources @@ -7,7 +7,6 @@ C_SOURCES := \ si_hw_context.c \ si_pipe.c \ si_pm4.c \ - si_resource.c \ si_shader.c \ si_state.c \ si_state_draw.c \ diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 077706f4cf3..4879b2ff914 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -142,7 +142,6 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void * goto fail; si_init_blit_functions(sctx); - si_init_context_resource_functions(sctx); si_init_compute_functions(sctx); if (sscreen->b.info.has_uvd) { @@ -637,7 +636,6 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) sscreen->b.b.get_video_param = si_get_video_param; sscreen->b.b.is_video_format_supported = vl_video_buffer_is_format_supported; } - si_init_screen_resource_functions(&sscreen->b.b); if (!r600_common_screen_init(&sscreen->b, ws)) { FREE(sscreen); diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index ecc66993230..aa62852b093 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -176,9 +176,6 @@ void si_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence, unsigned flags); const char *si_get_llvm_processor_name(enum radeon_family family); -/* si_resource.c */ -void si_init_context_resource_functions(struct si_context *sctx); - /* si_translate.c */ void si_translate_index_buffer(struct si_context *sctx, struct pipe_index_buffer *ib, diff --git a/src/gallium/drivers/radeonsi/si_resource.c b/src/gallium/drivers/radeonsi/si_resource.c deleted file mode 100644 index c0f1e264ae4..00000000000 --- a/src/gallium/drivers/radeonsi/si_resource.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2010 Marek Olšák <[email protected] - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "si_pipe.h" - -static struct pipe_resource *si_resource_create(struct pipe_screen *screen, - const struct pipe_resource *templ) -{ - if (templ->target == PIPE_BUFFER) { - return r600_buffer_create(screen, templ, 4096); - } else { - return r600_texture_create(screen, templ); - } -} - -static struct pipe_resource *si_resource_from_handle(struct pipe_screen * screen, - const struct pipe_resource *templ, - struct winsys_handle *whandle) -{ - if (templ->target == PIPE_BUFFER) { - return NULL; - } else { - return r600_texture_from_handle(screen, templ, whandle); - } -} - -void si_init_screen_resource_functions(struct pipe_screen *screen) -{ - screen->resource_create = si_resource_create; - screen->resource_from_handle = si_resource_from_handle; - screen->resource_get_handle = u_resource_get_handle_vtbl; - screen->resource_destroy = u_resource_destroy_vtbl; -} - -void si_init_context_resource_functions(struct si_context *sctx) -{ - sctx->b.b.transfer_map = u_transfer_map_vtbl; - sctx->b.b.transfer_flush_region = u_default_transfer_flush_region; - sctx->b.b.transfer_unmap = u_transfer_unmap_vtbl; - sctx->b.b.transfer_inline_write = u_default_transfer_inline_write; -} diff --git a/src/gallium/drivers/radeonsi/si_resource.h b/src/gallium/drivers/radeonsi/si_resource.h index 67da8faead8..a76419c7b2b 100644 --- a/src/gallium/drivers/radeonsi/si_resource.h +++ b/src/gallium/drivers/radeonsi/si_resource.h @@ -44,8 +44,6 @@ struct si_surface { struct pipe_surface base; }; -void si_init_screen_resource_functions(struct pipe_screen *screen); - struct si_context; void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuffer, |