radeonsi: Rename R600->SI in some remaining defines.
authorAndreas Hartmetz <ahartmetz@gmail.com>
Sat, 11 Jan 2014 14:56:47 +0000 (15:56 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 13 Jan 2014 23:07:13 +0000 (00:07 +0100)
I had previously considered that unsafe.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
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_pm4.c
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state_draw.c

index 8261deb1c985f64c3ad66e3199de9838dee4274e..111081df53ca59590c572ea6169d342377fd90d3 100644 (file)
@@ -46,7 +46,7 @@ void si_upload_const_buffer(struct si_context *rctx, struct r600_resource **rbuf
                        const uint8_t *ptr, unsigned size,
                        uint32_t *const_offset)
 {
-       if (R600_BIG_ENDIAN) {
+       if (SI_BIG_ENDIAN) {
                uint32_t *tmpPtr;
                unsigned i;
 
index a557647e6788956d66fa491129b760bd217fa0fb..4542b0f5efc3d43604ae51506c8be746d0dc9ef5 100644 (file)
@@ -161,9 +161,9 @@ void si_need_cs_space(struct si_context *ctx, unsigned num_dw,
        /* Count in framebuffer cache flushes at the end of CS. */
        num_dw += ctx->atoms.cache_flush->num_dw;
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
        if (ctx->screen->trace_bo) {
-               num_dw += R600_TRACE_CS_DWORDS;
+               num_dw += SI_TRACE_CS_DWORDS;
        }
 #endif
 
@@ -208,7 +208,7 @@ void si_context_flush(struct si_context *ctx, unsigned flags)
        /* force to keep tiling flags */
        flags |= RADEON_FLUSH_KEEP_TILING_FLAGS;
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
        if (ctx->screen->trace_bo) {
                struct si_screen *rscreen = ctx->screen;
                unsigned i;
@@ -223,7 +223,7 @@ void si_context_flush(struct si_context *ctx, unsigned flags)
        /* Flush the CS. */
        ctx->b.ws->cs_flush(ctx->b.rings.gfx.cs, flags, 0);
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
        if (ctx->screen->trace_bo) {
                struct si_screen *rscreen = ctx->screen;
                unsigned i;
@@ -695,7 +695,7 @@ void si_context_queries_resume(struct si_context *ctx)
        }
 }
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
 void si_trace_emit(struct si_context *rctx)
 {
        struct si_screen *rscreen = rctx->screen;
index 2865269ca43b1271ff2d2ed73a080780a56259f9..5c772cba914834b39ac36fef304d277cc419a174 100644 (file)
@@ -597,7 +597,7 @@ static void si_destroy_screen(struct pipe_screen* pscreen)
 
        r600_common_screen_cleanup(&rscreen->b);
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
        if (rscreen->trace_bo) {
                rscreen->ws->buffer_unmap(rscreen->trace_bo->cs_buf);
                pipe_resource_reference((struct pipe_resource**)&rscreen->trace_bo, NULL);
@@ -656,7 +656,7 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
        if (debug_get_bool_option("RADEON_DUMP_SHADERS", FALSE))
                rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS;
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
        rscreen->cs_count = 0;
        if (rscreen->info.drm_minor >= 28) {
                rscreen->trace_bo = (struct r600_resource*)pipe_buffer_create(&rscreen->screen,
index 8fbadc741245b8246474a93b769ce34d6a5d7d84..abf19442c90b939b5a895322d8c3ce924ad1b195 100644 (file)
 #include "si_state.h"
 
 #ifdef PIPE_ARCH_BIG_ENDIAN
-#define R600_BIG_ENDIAN 1
+#define SI_BIG_ENDIAN 1
 #else
-#define R600_BIG_ENDIAN 0
+#define SI_BIG_ENDIAN 0
 #endif
 
-#define R600_TRACE_CS 0
-#define R600_TRACE_CS_DWORDS           6
+#define SI_TRACE_CS 0
+#define SI_TRACE_CS_DWORDS             6
 
 #define SI_MAX_DRAW_CS_DWORDS 18
 
@@ -55,7 +55,7 @@ struct si_pipe_compute;
 
 struct si_screen {
        struct r600_common_screen       b;
-#if R600_TRACE_CS
+#if SI_TRACE_CS
        struct r600_resource            *trace_bo;
        uint32_t                        *trace_ptr;
        unsigned                        cs_count;
@@ -203,7 +203,7 @@ void si_translate_index_buffer(struct si_context *r600,
                               struct pipe_index_buffer *ib,
                               unsigned count);
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
 void si_trace_emit(struct si_context *rctx);
 #endif
 
index c08c86475c624bf4809bb9c6a724adb4c5b609b9..4f81ca875be96e1bf8a3c90290fd0427a5d31294 100644 (file)
@@ -200,10 +200,10 @@ unsigned si_pm4_dirty_dw(struct si_context *rctx)
                        continue;
 
                count += state->ndw;
-#if R600_TRACE_CS
+#if SI_TRACE_CS
                /* for tracing each states */
                if (rctx->screen->trace_bo) {
-                       count += R600_TRACE_CS_DWORDS;
+                       count += SI_TRACE_CS_DWORDS;
                }
 #endif
        }
@@ -227,7 +227,7 @@ void si_pm4_emit(struct si_context *rctx, struct si_pm4_state *state)
 
        cs->cdw += state->ndw;
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
        if (rctx->screen->trace_bo) {
                r600_trace_emit(rctx);
        }
index 78c02da7802c753f93ca70e53d06671ec6f3257c..3e4013719750309964a07bfd26efff8dbdc3de9f 100644 (file)
@@ -1948,7 +1948,7 @@ int si_compile_llvm(struct si_context *rctx, struct si_pipe_shader *shader,
        }
 
        ptr = (uint32_t*)rctx->b.ws->buffer_map(shader->bo->cs_buf, rctx->b.rings.gfx.cs, PIPE_TRANSFER_WRITE);
-       if (0 /*R600_BIG_ENDIAN*/) {
+       if (0 /*SI_BIG_ENDIAN*/) {
                for (i = 0; i < binary.code_size / 4; ++i) {
                        ptr[i] = util_bswap32(*(uint32_t*)(binary.code + i*4));
                }
index 9ce0955e62d53716018ecda4570f7a79eaf1d59b..22111787069ed6ce8e9c2c27cf27864677a7ce69 100644 (file)
@@ -948,7 +948,7 @@ static uint32_t si_translate_colorswap(enum pipe_format format)
 
 static uint32_t si_colorformat_endian_swap(uint32_t colorformat)
 {
-       if (R600_BIG_ENDIAN) {
+       if (SI_BIG_ENDIAN) {
                switch(colorformat) {
                /* 8-bit buffers. */
                case V_028C70_COLOR_8:
index f59472793498605895570e701d2f2c327adb8faf..056fb62e409e0c8ecfe5c99af557f3408e250dfc 100644 (file)
@@ -586,10 +586,10 @@ static void si_state_draw(struct si_context *rctx,
        /* draw packet */
        si_pm4_cmd_begin(pm4, PKT3_INDEX_TYPE);
        if (ib->index_size == 4) {
-               si_pm4_cmd_add(pm4, V_028A7C_VGT_INDEX_32 | (R600_BIG_ENDIAN ?
+               si_pm4_cmd_add(pm4, V_028A7C_VGT_INDEX_32 | (SI_BIG_ENDIAN ?
                                V_028A7C_VGT_DMA_SWAP_32_BIT : 0));
        } else {
-               si_pm4_cmd_add(pm4, V_028A7C_VGT_INDEX_16 | (R600_BIG_ENDIAN ?
+               si_pm4_cmd_add(pm4, V_028A7C_VGT_INDEX_16 | (SI_BIG_ENDIAN ?
                                V_028A7C_VGT_DMA_SWAP_16_BIT : 0));
        }
        si_pm4_cmd_end(pm4, rctx->predicate_drawing);
@@ -748,7 +748,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
        si_pm4_emit_dirty(rctx);
        rctx->pm4_dirty_cdwords = 0;
 
-#if R600_TRACE_CS
+#if SI_TRACE_CS
        if (rctx->screen->trace_bo) {
                r600_trace_emit(rctx);
        }