radeonsi: Rename r600->si for functions in si_pipe.h.
authorAndreas Hartmetz <ahartmetz@gmail.com>
Tue, 7 Jan 2014 01:40:22 +0000 (02:40 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 13 Jan 2014 23:07:13 +0000 (00:07 +0100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
12 files changed:
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_buffer.c
src/gallium/drivers/radeonsi/si_hw_context.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_query.c
src/gallium/drivers/radeonsi/si_resource.c
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state_draw.c
src/gallium/drivers/radeonsi/si_translate.c
src/gallium/drivers/radeonsi/si_uvd.c

index d2725a923a904619fe29bc0bd61eb1400902ff06..7883202b9db8cd99a9dbc1a0e7f19e2ee93d92cf 100644 (file)
@@ -108,12 +108,12 @@ static unsigned u_max_sample(struct pipe_resource *r)
        return r->nr_samples ? r->nr_samples - 1 : 0;
 }
 
-static void r600_blit_decompress_depth(struct pipe_context *ctx,
-                                      struct r600_texture *texture,
-                                      struct r600_texture *staging,
-                                      unsigned first_level, unsigned last_level,
-                                      unsigned first_layer, unsigned last_layer,
-                                      unsigned first_sample, unsigned last_sample)
+static void si_blit_decompress_depth(struct pipe_context *ctx,
+                                    struct r600_texture *texture,
+                                    struct r600_texture *staging,
+                                    unsigned first_level, unsigned last_level,
+                                    unsigned first_layer, unsigned last_layer,
+                                    unsigned first_sample, unsigned last_sample)
 {
        struct si_context *rctx = (struct si_context *)ctx;
        unsigned layer, level, sample, checked_last_layer, max_layer, max_sample;
@@ -299,8 +299,8 @@ static void r600_blit_decompress_color(struct pipe_context *ctx,
        }
 }
 
-void r600_decompress_color_textures(struct si_context *rctx,
-                                   struct si_textures_info *textures)
+void si_decompress_color_textures(struct si_context *rctx,
+                                 struct si_textures_info *textures)
 {
        unsigned i;
        unsigned mask = textures->compressed_colortex_mask;
@@ -700,5 +700,5 @@ void si_init_blit_functions(struct si_context *rctx)
        rctx->b.b.resource_copy_region = r600_resource_copy_region;
        rctx->b.b.blit = si_blit;
        rctx->b.b.flush_resource = si_flush_resource;
-       rctx->b.blit_decompress_depth = r600_blit_decompress_depth;
+       rctx->b.blit_decompress_depth = si_blit_decompress_depth;
 }
index 8ea19fbdd45f26bfa181c3bc073307e2e8b3dc5e..8261deb1c985f64c3ad66e3199de9838dee4274e 100644 (file)
@@ -35,8 +35,8 @@
 #include "si.h"
 #include "si_pipe.h"
 
-void r600_upload_index_buffer(struct si_context *rctx,
-                             struct pipe_index_buffer *ib, unsigned count)
+void si_upload_index_buffer(struct si_context *rctx,
+                           struct pipe_index_buffer *ib, unsigned count)
 {
        u_upload_data(rctx->b.uploader, 0, count * ib->index_size,
                      ib->user_buffer, &ib->offset, &ib->buffer);
index b978a6c3c89cf212687bfcf6de24dce7dd1a6552..f37e591fda91595f543137ef5402b15dfec00d7e 100644 (file)
@@ -169,7 +169,7 @@ void si_need_cs_space(struct si_context *ctx, unsigned num_dw,
 
        /* Flush if there's not enough space. */
        if (num_dw > RADEON_MAX_CMDBUF_DWORDS) {
-               radeonsi_flush(&ctx->b.b, NULL, RADEON_FLUSH_ASYNC);
+               si_flush(&ctx->b.b, NULL, RADEON_FLUSH_ASYNC);
        }
 }
 
index d0afe21b0b394fefb5ff7c0c67ba27f8aa3c8927..2f0a4d670dd9f06b434892b94988ac77c73e05c2 100644 (file)
@@ -54,8 +54,8 @@
 /*
  * pipe_context
  */
-void radeonsi_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence,
-                   unsigned flags)
+void si_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence,
+             unsigned flags)
 {
        struct si_context *rctx = (struct si_context *)ctx;
        struct pipe_query *render_cond = NULL;
@@ -86,13 +86,13 @@ static void r600_flush_from_st(struct pipe_context *ctx,
                               struct pipe_fence_handle **fence,
                                unsigned flags)
 {
-       radeonsi_flush(ctx, fence,
-                       flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0);
+       si_flush(ctx, fence,
+                flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0);
 }
 
 static void r600_flush_from_winsys(void *ctx, unsigned flags)
 {
-       radeonsi_flush((struct pipe_context*)ctx, NULL, flags);
+       si_flush((struct pipe_context*)ctx, NULL, flags);
 }
 
 static void r600_destroy_context(struct pipe_context *context)
@@ -144,13 +144,13 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
        rctx->screen = rscreen;
 
        si_init_blit_functions(rctx);
-       r600_init_query_functions(rctx);
-       r600_init_context_resource_functions(rctx);
+       si_init_query_functions(rctx);
+       si_init_context_resource_functions(rctx);
        si_init_compute_functions(rctx);
 
        if (rscreen->b.info.has_uvd) {
-               rctx->b.b.create_video_codec = radeonsi_uvd_create_decoder;
-               rctx->b.b.create_video_buffer = radeonsi_video_buffer_create;
+               rctx->b.b.create_video_codec = si_uvd_create_decoder;
+               rctx->b.b.create_video_buffer = si_video_buffer_create;
        } else {
                rctx->b.b.create_video_codec = vl_create_decoder;
                rctx->b.b.create_video_buffer = vl_video_buffer_create;
@@ -229,7 +229,7 @@ static const char* r600_get_vendor(struct pipe_screen* pscreen)
        return "X.Org";
 }
 
-const char *r600_get_llvm_processor_name(enum radeon_family family)
+const char *si_get_llvm_processor_name(enum radeon_family family)
 {
        switch (family) {
                case CHIP_TAHITI: return "tahiti";
@@ -514,7 +514,7 @@ static int r600_get_compute_param(struct pipe_screen *screen,
        //TODO: select these params by asic
        switch (param) {
        case PIPE_COMPUTE_CAP_IR_TARGET: {
-               const char *gpu = r600_get_llvm_processor_name(rscreen->b.family);
+               const char *gpu = si_get_llvm_processor_name(rscreen->b.family);
                if (ret) {
                        sprintf(ret, "%s-r600--", gpu);
                }
index e55bca0b051b0d1ceee879bffe78a8234d78ada9..8fbadc741245b8246474a93b769ce34d6a5d7d84 100644 (file)
@@ -179,43 +179,43 @@ struct si_context {
 void si_init_blit_functions(struct si_context *rctx);
 void si_flush_depth_textures(struct si_context *rctx,
                             struct si_textures_info *textures);
-void r600_decompress_color_textures(struct si_context *rctx,
-                                   struct si_textures_info *textures);
+void si_decompress_color_textures(struct si_context *rctx,
+                                 struct si_textures_info *textures);
 
 /* si_buffer.c */
-void r600_upload_index_buffer(struct si_context *rctx,
-                             struct pipe_index_buffer *ib, unsigned count);
+void si_upload_index_buffer(struct si_context *rctx,
+                           struct pipe_index_buffer *ib, unsigned count);
 
 
 /* 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);
+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_query.c */
-void r600_init_query_functions(struct si_context *rctx);
+void si_init_query_functions(struct si_context *rctx);
 
 /* si_resource.c */
-void r600_init_context_resource_functions(struct si_context *r600);
+void si_init_context_resource_functions(struct si_context *r600);
 
 /* si_translate.c */
-void r600_translate_index_buffer(struct si_context *r600,
-                                struct pipe_index_buffer *ib,
-                                unsigned count);
+void si_translate_index_buffer(struct si_context *r600,
+                              struct pipe_index_buffer *ib,
+                              unsigned count);
 
 #if R600_TRACE_CS
-void r600_trace_emit(struct si_context *rctx);
+void si_trace_emit(struct si_context *rctx);
 #endif
 
 /* si_compute.c */
 void si_init_compute_functions(struct si_context *rctx);
 
 /* si_uvd.c */
-struct pipe_video_codec *radeonsi_uvd_create_decoder(struct pipe_context *context,
-                                                     const struct pipe_video_codec *templ);
+struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context,
+                                              const struct pipe_video_codec *templ);
 
-struct pipe_video_buffer *radeonsi_video_buffer_create(struct pipe_context *pipe,
-                                                      const struct pipe_video_buffer *tmpl);
+struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe,
+                                                const struct pipe_video_buffer *tmpl);
 
 /*
  * common helpers
@@ -244,7 +244,7 @@ static INLINE unsigned si_map_swizzle(unsigned swizzle)
        }
 }
 
-static inline unsigned r600_tex_aniso_filter(unsigned filter)
+static inline unsigned si_tex_aniso_filter(unsigned filter)
 {
        if (filter <= 1)   return 0;
        if (filter <= 2)   return 1;
@@ -254,7 +254,7 @@ static inline unsigned r600_tex_aniso_filter(unsigned filter)
 }
 
 /* 12.4 fixed-point */
-static INLINE unsigned r600_pack_float_12p4(float x)
+static INLINE unsigned si_pack_float_12p4(float x)
 {
        return x <= 0    ? 0 :
               x >= 4096 ? 0xffff : x * 16;
index a847c562aeec89a004b61928136e5780de65ee44..24a9fd84c42a7f97809cd4d153bf81993e8f8d7f 100644 (file)
@@ -134,7 +134,7 @@ static void r600_render_condition(struct pipe_context *ctx,
        }
 }
 
-void r600_init_query_functions(struct si_context *rctx)
+void si_init_query_functions(struct si_context *rctx)
 {
        rctx->b.b.create_query = r600_create_query;
        rctx->b.b.destroy_query = r600_destroy_query;
index 7d5c563fc68c02c63613b24bf91905d0f480a384..3b4f6096c4d0e2f259b39dd3b5881e09b843aa25 100644 (file)
@@ -52,7 +52,7 @@ void si_init_screen_resource_functions(struct pipe_screen *screen)
        screen->resource_destroy = u_resource_destroy_vtbl;
 }
 
-void r600_init_context_resource_functions(struct si_context *r600)
+void si_init_context_resource_functions(struct si_context *r600)
 {
        r600->b.b.transfer_map = u_transfer_map_vtbl;
        r600->b.b.transfer_flush_region = u_default_transfer_flush_region;
index 803de344c2acd9cab301b3290b6fe1cf4e76bfbf..78c02da7802c753f93ca70e53d06671ec6f3257c 100644 (file)
@@ -1899,7 +1899,7 @@ int si_compile_llvm(struct si_context *rctx, struct si_pipe_shader *shader,
                        shader->selector ? shader->selector->tokens : NULL);
        memset(&binary, 0, sizeof(binary));
        radeon_llvm_compile(mod, &binary,
-               r600_get_llvm_processor_name(rctx->screen->b.family), dump);
+               si_get_llvm_processor_name(rctx->screen->b.family), dump);
        if (dump && ! binary.disassembled) {
                fprintf(stderr, "SI CODE:\n");
                for (i = 0; i < binary.code_size; i+=4 ) {
index a6f0548c60c835e066ce3e5c25402fc6b19918f7..9ce0955e62d53716018ecda4570f7a79eaf1d59b 100644 (file)
@@ -610,8 +610,8 @@ static void *si_create_rs_state(struct pipe_context *ctx,
        }
        /* Divide by two, because 0.5 = 1 pixel. */
        si_pm4_set_reg(pm4, R_028A04_PA_SU_POINT_MINMAX,
-                       S_028A04_MIN_SIZE(r600_pack_float_12p4(psize_min/2)) |
-                       S_028A04_MAX_SIZE(r600_pack_float_12p4(psize_max/2)));
+                       S_028A04_MIN_SIZE(si_pack_float_12p4(psize_min/2)) |
+                       S_028A04_MAX_SIZE(si_pack_float_12p4(psize_max/2)));
 
        tmp = (unsigned)state->line_width * 8;
        si_pm4_set_reg(pm4, R_028A08_PA_SU_LINE_CNTL, S_028A08_WIDTH(tmp));
index e9ffedfd4fedd0aab2194eaa9ad6086740278258..e24f0a393c53006691db643a28711f32d895cdfe 100644 (file)
@@ -434,7 +434,7 @@ static void si_update_derived_state(struct si_context *rctx)
                                si_flush_depth_textures(rctx, &rctx->samplers[i]);
                        }
                        if (rctx->samplers[i].compressed_colortex_mask) {
-                               r600_decompress_color_textures(rctx, &rctx->samplers[i]);
+                               si_decompress_color_textures(rctx, &rctx->samplers[i]);
                        }
                }
        }
@@ -717,10 +717,10 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
                ib.offset = rctx->index_buffer.offset + info->start * ib.index_size;
 
                /* Translate or upload, if needed. */
-               r600_translate_index_buffer(rctx, &ib, info->count);
+               si_translate_index_buffer(rctx, &ib, info->count);
 
                if (ib.user_buffer && !ib.buffer) {
-                       r600_upload_index_buffer(rctx, &ib, info->count);
+                       si_upload_index_buffer(rctx, &ib, info->count);
                }
        }
 
index 1b5acec90eaa74d319c4fc20fdf87f41bcedda0d..233fedec132bc6a3703d5771b8b720ec649f9b3b 100644 (file)
@@ -28,9 +28,9 @@
 #include "si_pipe.h"
 
 
-void r600_translate_index_buffer(struct si_context *r600,
-                                struct pipe_index_buffer *ib,
-                                unsigned count)
+void si_translate_index_buffer(struct si_context *r600,
+                              struct pipe_index_buffer *ib,
+                              unsigned count)
 {
        struct pipe_resource *out_buffer = NULL;
        unsigned out_offset;
index 397c697ae24f94ae7315f9c77d573621613559da..8d3dccadf948620b4e45f9f7f1cf1c1b580fa5e8 100644 (file)
@@ -51,8 +51,8 @@
 /**
  * creates an video buffer with an UVD compatible memory layout
  */
-struct pipe_video_buffer *radeonsi_video_buffer_create(struct pipe_context *pipe,
-                                                      const struct pipe_video_buffer *tmpl)
+struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe,
+                                                const struct pipe_video_buffer *tmpl)
 {
        struct si_context *ctx = (struct si_context *)pipe;
        struct r600_texture *resources[VL_NUM_COMPONENTS] = {};
@@ -146,8 +146,8 @@ static struct radeon_winsys_cs_handle* radeonsi_uvd_set_dtb(struct ruvd_msg *msg
 /**
  * creates an UVD compatible decoder
  */
-struct pipe_video_codec *radeonsi_uvd_create_decoder(struct pipe_context *context,
-                                                    const struct pipe_video_codec *templ)
+struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context,
+                                              const struct pipe_video_codec *templ)
 {
        return ruvd_create_decoder(context, templ, radeonsi_uvd_set_dtb);
 }