From 786af2f963925df2c2a6fb60b29a83e8340f03c7 Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Sat, 4 Jan 2014 18:44:33 +0100 Subject: [PATCH] radeonsi: Apply si_* file naming scheme. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/Makefile.sources | 24 +++++------ src/gallium/drivers/radeonsi/r600_resource.h | 40 ------------------- src/gallium/drivers/radeonsi/{r600.h => si.h} | 6 +-- .../radeonsi/{r600_blit.c => si_blit.c} | 2 +- .../radeonsi/{r600_buffer.c => si_buffer.c} | 4 +- src/gallium/drivers/radeonsi/si_commands.c | 4 +- .../{radeonsi_compute.c => si_compute.c} | 4 +- src/gallium/drivers/radeonsi/si_descriptors.c | 6 +-- .../{r600_hw_context.c => si_hw_context.c} | 4 +- .../radeonsi/{radeonsi_pipe.c => si_pipe.c} | 8 ++-- .../radeonsi/{radeonsi_pipe.h => si_pipe.h} | 30 +++++++------- .../radeonsi/{radeonsi_pm4.c => si_pm4.c} | 4 +- .../radeonsi/{radeonsi_pm4.h => si_pm4.h} | 4 +- .../{radeonsi_public.h => si_public.h} | 4 +- .../radeonsi/{r600_query.c => si_query.c} | 2 +- .../{r600_resource.c => si_resource.c} | 2 +- .../{radeonsi_resource.h => si_resource.h} | 16 +++++++- .../{radeonsi_shader.c => si_shader.c} | 4 +- .../{radeonsi_shader.h => si_shader.h} | 4 +- src/gallium/drivers/radeonsi/si_state.c | 4 +- src/gallium/drivers/radeonsi/si_state.h | 2 +- src/gallium/drivers/radeonsi/si_state_draw.c | 4 +- .../{r600_translate.c => si_translate.c} | 2 +- .../radeonsi/{radeonsi_uvd.c => si_uvd.c} | 2 +- .../targets/pipe-loader/pipe_radeonsi.c | 2 +- .../targets/radeonsi/common/drm_target.c | 2 +- 26 files changed, 81 insertions(+), 109 deletions(-) delete mode 100644 src/gallium/drivers/radeonsi/r600_resource.h rename src/gallium/drivers/radeonsi/{r600.h => si.h} (98%) rename src/gallium/drivers/radeonsi/{r600_blit.c => si_blit.c} (99%) rename src/gallium/drivers/radeonsi/{r600_buffer.c => si_buffer.c} (98%) rename src/gallium/drivers/radeonsi/{radeonsi_compute.c => si_compute.c} (99%) rename src/gallium/drivers/radeonsi/{r600_hw_context.c => si_hw_context.c} (99%) rename src/gallium/drivers/radeonsi/{radeonsi_pipe.c => si_pipe.c} (99%) rename src/gallium/drivers/radeonsi/{radeonsi_pipe.h => si_pipe.h} (95%) rename src/gallium/drivers/radeonsi/{radeonsi_pm4.c => si_pm4.c} (99%) rename src/gallium/drivers/radeonsi/{radeonsi_pm4.h => si_pm4.h} (98%) rename src/gallium/drivers/radeonsi/{radeonsi_public.h => si_public.h} (96%) rename src/gallium/drivers/radeonsi/{r600_query.c => si_query.c} (99%) rename src/gallium/drivers/radeonsi/{r600_resource.c => si_resource.c} (98%) rename src/gallium/drivers/radeonsi/{radeonsi_resource.h => si_resource.h} (81%) rename src/gallium/drivers/radeonsi/{radeonsi_shader.c => si_shader.c} (99%) rename src/gallium/drivers/radeonsi/{radeonsi_shader.h => si_shader.h} (98%) rename src/gallium/drivers/radeonsi/{r600_translate.c => si_translate.c} (98%) rename src/gallium/drivers/radeonsi/{radeonsi_uvd.c => si_uvd.c} (99%) diff --git a/src/gallium/drivers/radeonsi/Makefile.sources b/src/gallium/drivers/radeonsi/Makefile.sources index 1302c6a7dfe..33f1492f6ce 100644 --- a/src/gallium/drivers/radeonsi/Makefile.sources +++ b/src/gallium/drivers/radeonsi/Makefile.sources @@ -1,16 +1,16 @@ C_SOURCES := \ - r600_blit.c \ - r600_buffer.c \ - r600_hw_context.c \ - radeonsi_pipe.c \ - r600_query.c \ - r600_resource.c \ - radeonsi_shader.c \ - r600_translate.c \ - radeonsi_pm4.c \ - radeonsi_compute.c \ + si_blit.c \ + si_buffer.c \ + si_commands.c \ + si_compute.c \ si_descriptors.c \ + si_hw_context.c \ + si_pipe.c \ + si_pm4.c \ + si_query.c \ + si_resource.c \ + si_shader.c \ si_state.c \ si_state_draw.c \ - si_commands.c \ - radeonsi_uvd.c + si_translate.c \ + si_uvd.c diff --git a/src/gallium/drivers/radeonsi/r600_resource.h b/src/gallium/drivers/radeonsi/r600_resource.h deleted file mode 100644 index be9ab33d90b..00000000000 --- a/src/gallium/drivers/radeonsi/r600_resource.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2010 Marek Olšák */ -#include "radeonsi_pipe.h" -#include "radeonsi_pm4.h" #include "sid.h" +#include "si_pipe.h" +#include "si_pm4.h" void si_cmd_context_control(struct si_pm4_state *pm4) { diff --git a/src/gallium/drivers/radeonsi/radeonsi_compute.c b/src/gallium/drivers/radeonsi/si_compute.c similarity index 99% rename from src/gallium/drivers/radeonsi/radeonsi_compute.c rename to src/gallium/drivers/radeonsi/si_compute.c index 214ea3c2552..40d75daa3f5 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -1,8 +1,8 @@ #include "util/u_memory.h" #include "../radeon/r600_cs.h" -#include "radeonsi_pipe.h" -#include "radeonsi_shader.h" +#include "si_pipe.h" +#include "si_shader.h" #include "radeon_llvm_util.h" diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index c43b35e3983..9cb5da12ad8 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -24,9 +24,9 @@ * Marek Olšák */ #include "../radeon/r600_cs.h" -#include "radeonsi_pipe.h" -#include "radeonsi_resource.h" -#include "radeonsi_shader.h" +#include "si_pipe.h" +#include "si_resource.h" +#include "si_shader.h" #include "util/u_memory.h" diff --git a/src/gallium/drivers/radeonsi/r600_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c similarity index 99% rename from src/gallium/drivers/radeonsi/r600_hw_context.c rename to src/gallium/drivers/radeonsi/si_hw_context.c index c21a1013f93..bb67baa52d2 100644 --- a/src/gallium/drivers/radeonsi/r600_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -24,9 +24,9 @@ * Jerome Glisse */ #include "../radeon/r600_cs.h" -#include "radeonsi_pm4.h" -#include "radeonsi_pipe.h" #include "sid.h" +#include "si_pm4.h" +#include "si_pipe.h" #include "util/u_memory.h" #include diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c similarity index 99% rename from src/gallium/drivers/radeonsi/radeonsi_pipe.c rename to src/gallium/drivers/radeonsi/si_pipe.c index 0fec6d56978..62fd2a3f7a1 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -42,12 +42,12 @@ #include "vl/vl_video_buffer.h" #include "os/os_time.h" #include "pipebuffer/pb_buffer.h" -#include "radeonsi_pipe.h" +#include "si_pipe.h" #include "radeon/radeon_uvd.h" -#include "r600.h" +#include "si.h" #include "sid.h" -#include "r600_resource.h" -#include "radeonsi_pipe.h" +#include "si_resource.h" +#include "si_pipe.h" #include "si_state.h" #include "../radeon/r600_cs.h" diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h similarity index 95% rename from src/gallium/drivers/radeonsi/radeonsi_pipe.h rename to src/gallium/drivers/radeonsi/si_pipe.h index 56145bc4111..36fb875f88f 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -23,8 +23,8 @@ * Authors: * Jerome Glisse */ -#ifndef RADEONSI_PIPE_H -#define RADEONSI_PIPE_H +#ifndef SI_PIPE_H +#define SI_PIPE_H #include "../radeon/r600_pipe_common.h" @@ -33,12 +33,12 @@ #include "util/u_format.h" #include "util/u_math.h" #include "util/u_slab.h" -#include "r600.h" -#include "radeonsi_public.h" -#include "radeonsi_pm4.h" -#include "si_state.h" -#include "r600_resource.h" +#include "si.h" #include "sid.h" +#include "si_public.h" +#include "si_pm4.h" +#include "si_resource.h" +#include "si_state.h" #ifdef PIPE_ARCH_BIG_ENDIAN #define R600_BIG_ENDIAN 1 @@ -175,30 +175,30 @@ struct r600_context { union si_state emitted; }; -/* r600_blit.c */ +/* si_blit.c */ void si_init_blit_functions(struct r600_context *rctx); void si_flush_depth_textures(struct r600_context *rctx, struct r600_textures_info *textures); void r600_decompress_color_textures(struct r600_context *rctx, struct r600_textures_info *textures); -/* r600_buffer.c */ +/* si_buffer.c */ void r600_upload_index_buffer(struct r600_context *rctx, struct pipe_index_buffer *ib, unsigned count); -/* r600_pipe.c */ +/* si_pipe.c */ void radeonsi_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence, unsigned flags); const char *r600_get_llvm_processor_name(enum radeon_family family); -/* r600_query.c */ +/* si_query.c */ void r600_init_query_functions(struct r600_context *rctx); -/* r600_resource.c */ +/* si_resource.c */ void r600_init_context_resource_functions(struct r600_context *r600); -/* r600_translate.c */ +/* si_translate.c */ void r600_translate_index_buffer(struct r600_context *r600, struct pipe_index_buffer *ib, unsigned count); @@ -207,10 +207,10 @@ void r600_translate_index_buffer(struct r600_context *r600, void r600_trace_emit(struct r600_context *rctx); #endif -/* radeonsi_compute.c */ +/* si_compute.c */ void si_init_compute_functions(struct r600_context *rctx); -/* radeonsi_uvd.c */ +/* si_uvd.c */ struct pipe_video_codec *radeonsi_uvd_create_decoder(struct pipe_context *context, const struct pipe_video_codec *templ); diff --git a/src/gallium/drivers/radeonsi/radeonsi_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c similarity index 99% rename from src/gallium/drivers/radeonsi/radeonsi_pm4.c rename to src/gallium/drivers/radeonsi/si_pm4.c index eed0c4756d7..511c32d8866 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pm4.c +++ b/src/gallium/drivers/radeonsi/si_pm4.c @@ -26,8 +26,8 @@ #include "../radeon/r600_cs.h" #include "util/u_memory.h" -#include "radeonsi_pipe.h" -#include "radeonsi_pm4.h" +#include "si_pipe.h" +#include "si_pm4.h" #include "sid.h" #define NUMBER_OF_STATES (sizeof(union si_state) / sizeof(struct si_pm4_state *)) diff --git a/src/gallium/drivers/radeonsi/radeonsi_pm4.h b/src/gallium/drivers/radeonsi/si_pm4.h similarity index 98% rename from src/gallium/drivers/radeonsi/radeonsi_pm4.h rename to src/gallium/drivers/radeonsi/si_pm4.h index 2e32a19e212..fcdf470e6cf 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pm4.h +++ b/src/gallium/drivers/radeonsi/si_pm4.h @@ -24,8 +24,8 @@ * Christian König */ -#ifndef RADEONSI_PM4_H -#define RADEONSI_PM4_H +#ifndef SI_PM4_H +#define SI_PM4_H #include "../../winsys/radeon/drm/radeon_winsys.h" diff --git a/src/gallium/drivers/radeonsi/radeonsi_public.h b/src/gallium/drivers/radeonsi/si_public.h similarity index 96% rename from src/gallium/drivers/radeonsi/radeonsi_public.h rename to src/gallium/drivers/radeonsi/si_public.h index 5dcec0fc93b..7cf36c8407a 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_public.h +++ b/src/gallium/drivers/radeonsi/si_public.h @@ -20,8 +20,8 @@ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef RADEONSI_PUBLIC_H -#define RADEONSI_PUBLIC_H +#ifndef SI_PUBLIC_H +#define SI_PUBLIC_H struct radeon_winsys; diff --git a/src/gallium/drivers/radeonsi/r600_query.c b/src/gallium/drivers/radeonsi/si_query.c similarity index 99% rename from src/gallium/drivers/radeonsi/r600_query.c rename to src/gallium/drivers/radeonsi/si_query.c index e9fce94ee93..2f23d0881de 100644 --- a/src/gallium/drivers/radeonsi/r600_query.c +++ b/src/gallium/drivers/radeonsi/si_query.c @@ -20,7 +20,7 @@ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "radeonsi_pipe.h" +#include "si_pipe.h" #include "sid.h" static struct pipe_query *r600_create_query(struct pipe_context *ctx, unsigned query_type) diff --git a/src/gallium/drivers/radeonsi/r600_resource.c b/src/gallium/drivers/radeonsi/si_resource.c similarity index 98% rename from src/gallium/drivers/radeonsi/r600_resource.c rename to src/gallium/drivers/radeonsi/si_resource.c index 9a0fde430ff..1d1e9d8c9b3 100644 --- a/src/gallium/drivers/radeonsi/r600_resource.c +++ b/src/gallium/drivers/radeonsi/si_resource.c @@ -21,7 +21,7 @@ * USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "radeonsi_pipe.h" +#include "si_pipe.h" static struct pipe_resource *r600_resource_create(struct pipe_screen *screen, const struct pipe_resource *templ) diff --git a/src/gallium/drivers/radeonsi/radeonsi_resource.h b/src/gallium/drivers/radeonsi/si_resource.h similarity index 81% rename from src/gallium/drivers/radeonsi/radeonsi_resource.h rename to src/gallium/drivers/radeonsi/si_resource.h index 7794beb9c57..5a9aba31125 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_resource.h +++ b/src/gallium/drivers/radeonsi/si_resource.h @@ -24,8 +24,8 @@ * Christian König */ -#ifndef RADEONSI_RESOURCE_H -#define RADEONSI_RESOURCE_H +#ifndef SI_RESOURCE_H +#define SI_RESOURCE_H #include "../radeon/r600_pipe_common.h" #include "util/u_transfer.h" @@ -40,4 +40,16 @@ r600_resource_create_custom(struct pipe_screen *screen, PIPE_BIND_CUSTOM, usage, size)); } +struct r600_surface { + struct pipe_surface base; +}; + +void r600_init_screen_resource_functions(struct pipe_screen *screen); + +struct r600_context; + +void r600_upload_const_buffer(struct r600_context *rctx, struct r600_resource **rbuffer, + const uint8_t *ptr, unsigned size, + uint32_t *const_offset); + #endif diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/si_shader.c similarity index 99% rename from src/gallium/drivers/radeonsi/radeonsi_shader.c rename to src/gallium/drivers/radeonsi/si_shader.c index 9c1fb13272a..03a1c83f7e8 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -44,8 +44,8 @@ #include "tgsi/tgsi_util.h" #include "tgsi/tgsi_dump.h" -#include "radeonsi_pipe.h" -#include "radeonsi_shader.h" +#include "si_pipe.h" +#include "si_shader.h" #include "si_state.h" #include "sid.h" diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.h b/src/gallium/drivers/radeonsi/si_shader.h similarity index 98% rename from src/gallium/drivers/radeonsi/radeonsi_shader.h rename to src/gallium/drivers/radeonsi/si_shader.h index 5e5a27f8580..2a15a9fa2bd 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -26,8 +26,8 @@ * Christian König */ -#ifndef RADEONSI_SHADER_H -#define RADEONSI_SHADER_H +#ifndef SI_SHADER_H +#define SI_SHADER_H #include /* LLVMModuleRef */ diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index ba734016905..10d016730d3 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -34,8 +34,8 @@ #include "util/u_format_s3tc.h" #include "tgsi/tgsi_parse.h" #include "tgsi/tgsi_scan.h" -#include "radeonsi_pipe.h" -#include "radeonsi_shader.h" +#include "si_pipe.h" +#include "si_shader.h" #include "si_state.h" #include "../radeon/r600_cs.h" #include "sid.h" diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 6fac4f0442c..3002d56e536 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -27,7 +27,7 @@ #ifndef SI_STATE_H #define SI_STATE_H -#include "radeonsi_pm4.h" +#include "si_pm4.h" #include "../radeon/r600_pipe_common.h" struct si_state_blend { diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index f64b51a04ff..4d5cd0166de 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -28,8 +28,8 @@ #include "util/u_framebuffer.h" #include "util/u_blitter.h" #include "tgsi/tgsi_parse.h" -#include "radeonsi_pipe.h" -#include "radeonsi_shader.h" +#include "si_pipe.h" +#include "si_shader.h" #include "si_state.h" #include "../radeon/r600_cs.h" #include "sid.h" diff --git a/src/gallium/drivers/radeonsi/r600_translate.c b/src/gallium/drivers/radeonsi/si_translate.c similarity index 98% rename from src/gallium/drivers/radeonsi/r600_translate.c rename to src/gallium/drivers/radeonsi/si_translate.c index 177a9dd7084..158bdc8b0da 100644 --- a/src/gallium/drivers/radeonsi/r600_translate.c +++ b/src/gallium/drivers/radeonsi/si_translate.c @@ -25,7 +25,7 @@ #include "util/u_index_modify.h" #include "util/u_upload_mgr.h" -#include "radeonsi_pipe.h" +#include "si_pipe.h" void r600_translate_index_buffer(struct r600_context *r600, diff --git a/src/gallium/drivers/radeonsi/radeonsi_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c similarity index 99% rename from src/gallium/drivers/radeonsi/radeonsi_uvd.c rename to src/gallium/drivers/radeonsi/si_uvd.c index 6ecb17c8051..847c8179992 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_uvd.c +++ b/src/gallium/drivers/radeonsi/si_uvd.c @@ -44,7 +44,7 @@ #include "vl/vl_defines.h" #include "vl/vl_mpeg12_decoder.h" -#include "radeonsi_pipe.h" +#include "si_pipe.h" #include "radeon/radeon_uvd.h" #include "sid.h" diff --git a/src/gallium/targets/pipe-loader/pipe_radeonsi.c b/src/gallium/targets/pipe-loader/pipe_radeonsi.c index bb57118b7b0..48b2b5dff3f 100644 --- a/src/gallium/targets/pipe-loader/pipe_radeonsi.c +++ b/src/gallium/targets/pipe-loader/pipe_radeonsi.c @@ -1,7 +1,7 @@ #include "state_tracker/drm_driver.h" #include "target-helpers/inline_debug_helper.h" #include "radeon/drm/radeon_drm_public.h" -#include "radeonsi/radeonsi_public.h" +#include "radeonsi/si_public.h" static struct pipe_screen * create_screen(int fd) diff --git a/src/gallium/targets/radeonsi/common/drm_target.c b/src/gallium/targets/radeonsi/common/drm_target.c index 08ff47dfb68..c695dde51ed 100644 --- a/src/gallium/targets/radeonsi/common/drm_target.c +++ b/src/gallium/targets/radeonsi/common/drm_target.c @@ -29,7 +29,7 @@ #include "target-helpers/inline_debug_helper.h" #include "radeon/drm/radeon_drm_public.h" #include "radeon/drm/radeon_winsys.h" -#include "radeonsi/radeonsi_public.h" +#include "radeonsi/si_public.h" static struct pipe_screen *create_screen(int fd) { -- 2.30.2