r600g: indentation fixes
authorJerome Glisse <jglisse@redhat.com>
Mon, 28 Feb 2011 18:33:13 +0000 (13:33 -0500)
committerJerome Glisse <jglisse@redhat.com>
Mon, 28 Feb 2011 18:33:13 +0000 (13:33 -0500)
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/drivers/r600/r600.h
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_buffer.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_state_common.c

index 64c52bca795a248bed777e55002796d733413fee..1b76f0098dd6610eba72805e0984fdb2868cae95 100644 (file)
@@ -118,10 +118,10 @@ unsigned r600_get_clock_crystal_freq(struct radeon *radeon);
 /* r600_bo.c */
 struct r600_bo;
 struct r600_bo *r600_bo(struct radeon *radeon,
-                        unsigned size, unsigned alignment,
-                        unsigned binding, unsigned usage);
+                       unsigned size, unsigned alignment,
+                       unsigned binding, unsigned usage);
 struct r600_bo *r600_bo_handle(struct radeon *radeon,
-                              unsigned handle, unsigned *array_mode);
+                               unsigned handle, unsigned *array_mode);
 void *r600_bo_map(struct radeon *radeon, struct r600_bo *bo, unsigned usage, void *ctx);
 void r600_bo_unmap(struct radeon *radeon, struct r600_bo *bo);
 void r600_bo_reference(struct radeon *radeon, struct r600_bo **dst,
index 5d59356bf70a8c52d36b1e2c9f42126921d25234..a3197475933c7f43fe2b453463d157a5ffb5cdef 100644 (file)
@@ -2070,7 +2070,7 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
        unsigned fetch_resource_start = rctx->family >= CHIP_CEDAR ? 0 : 160;
        unsigned format, num_format, format_comp;
        u32 *bytecode;
-        int i, r;
+       int i, r;
 
        /* vertex elements offset need special handling, if offset is bigger
        + * than what we can put in fetch instruction then we need to alterate
@@ -2090,23 +2090,23 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
                return r;
 
        for (i = 0; i < ve->count; i++) {
-               if (elements[i].instance_divisor > 1) {
+               if (elements[i].instance_divisor > 1) {
                        struct r600_bc_alu alu;
 
                        memset(&alu, 0, sizeof(alu));
-                        alu.inst = BC_INST(&bc, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT);
-                        alu.src[0].sel = 0;
-                        alu.src[0].chan = 3;
+                       alu.inst = BC_INST(&bc, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT);
+                       alu.src[0].sel = 0;
+                       alu.src[0].chan = 3;
 
                        alu.dst.sel = i + 1;
                        alu.dst.chan = 3;
                        alu.dst.write = 1;
                        alu.last = 1;
 
-                        if ((r = r600_bc_add_alu(&bc, &alu))) {
+                       if ((r = r600_bc_add_alu(&bc, &alu))) {
                                r600_bc_clear(&bc);
-                                return r;
-                        }
+                               return r;
+                       }
 
                        memset(&alu, 0, sizeof(alu));
                        alu.inst = BC_INST(&bc, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
@@ -2121,10 +2121,10 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
                        alu.dst.write = 1;
                        alu.last = 1;
 
-                        if ((r = r600_bc_add_alu(&bc, &alu))) {
+                       if ((r = r600_bc_add_alu(&bc, &alu))) {
                                r600_bc_clear(&bc);
-                                return r;
-                        }
+                               return r;
+                       }
 
                        memset(&alu, 0, sizeof(alu));
                        alu.inst = BC_INST(&bc, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC);
@@ -2136,26 +2136,26 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
                        alu.dst.write = 1;
                        alu.last = 1;
 
-                        if ((r = r600_bc_add_alu(&bc, &alu))) {
+                       if ((r = r600_bc_add_alu(&bc, &alu))) {
                                r600_bc_clear(&bc);
-                                return r;
-                        }
+                               return r;
+                       }
 
                        memset(&alu, 0, sizeof(alu));
-                        alu.inst = BC_INST(&bc, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT);
-                        alu.src[0].sel = i + 1;
-                        alu.src[0].chan = 3;
+                       alu.inst = BC_INST(&bc, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT);
+                       alu.src[0].sel = i + 1;
+                       alu.src[0].chan = 3;
 
                        alu.dst.sel = i + 1;
                        alu.dst.chan = 3;
                        alu.dst.write = 1;
                        alu.last = 1;
 
-                        if ((r = r600_bc_add_alu(&bc, &alu))) {
+                       if ((r = r600_bc_add_alu(&bc, &alu))) {
                                r600_bc_clear(&bc);
-                                return r;
-                        }
-               }
+                               return r;
+                       }
+               }
        }
 
        for (i = 0; i < ve->count; i++) {
@@ -2202,14 +2202,14 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
                return -ENOMEM;
        }
 
-        ve->fs_size = bc.ndw*4;
+       ve->fs_size = bc.ndw*4;
        if ((r = r600_bc_build(&bc))) {
                r600_bc_clear(&bc);
                return r;
        }
 
-        if (dump_shaders == -1)
-                dump_shaders = debug_get_bool_option("R600_DUMP_SHADERS", FALSE);
+       if (dump_shaders == -1)
+               dump_shaders = debug_get_bool_option("R600_DUMP_SHADERS", FALSE);
 
        if (dump_shaders) {
                fprintf(stderr, "--------------------------------------------------------------\n");
index 0c5d7133c7ac4677a5ece370c3dad60ac7c318a8..2363cd1ebc5db5d043b56212f40ace1142022dfe 100644 (file)
@@ -132,13 +132,13 @@ static void r600_transfer_destroy(struct pipe_context *ctx,
 }
 
 static void r600_buffer_transfer_inline_write(struct pipe_context *pipe,
-                                              struct pipe_resource *resource,
-                                              unsigned level,
-                                              unsigned usage,
-                                              const struct pipe_box *box,
-                                              const void *data,
-                                              unsigned stride,
-                                              unsigned layer_stride)
+                                               struct pipe_resource *resource,
+                                               unsigned level,
+                                               unsigned usage,
+                                               const struct pipe_box *box,
+                                               const void *data,
+                                               unsigned stride,
+                                               unsigned layer_stride)
 {
        struct radeon *ws = (struct radeon*)pipe->winsys;
        struct r600_resource_buffer *rbuffer = r600_buffer(resource);
@@ -224,7 +224,7 @@ struct pipe_resource *r600_user_buffer_create(struct pipe_screen *screen,
        rbuffer->r.b.b.b.depth0 = 1;
        rbuffer->r.b.b.b.array_size = 1;
        rbuffer->r.b.b.b.flags = 0;
-        rbuffer->r.b.user_ptr = ptr;
+       rbuffer->r.b.user_ptr = ptr;
        rbuffer->r.bo = NULL;
        rbuffer->r.bo_size = 0;
        return &rbuffer->r.b.b.b;
index adcd74aec7643200b299c7780ed5d799b8aa68a6..db3afad2b84ea4ef0bc4b4ab21e6c1acb06a60fc 100644 (file)
@@ -76,8 +76,7 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags,
        u_upload_flush(rctx->vbuf_mgr->uploader);
 }
 
-static void r600_update_num_contexts(struct r600_screen *rscreen,
-                                     int diff)
+static void r600_update_num_contexts(struct r600_screen *rscreen, int diff)
 {
        pipe_mutex_lock(rscreen->mutex_num_contexts);
        if (diff > 0) {
index 65923fb96488c124e6e4d5d5dd30c2caebe3f5f1..4146cb3c5fdecd2c8260441070fada12250bc49d 100644 (file)
@@ -241,10 +241,10 @@ int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *s
        struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
        int r;
 
-        /* Would like some magic "get_bool_option_once" routine.
-         */
-        if (dump_shaders == -1)
-                dump_shaders = debug_get_bool_option("R600_DUMP_SHADERS", FALSE);
+       /* Would like some magic "get_bool_option_once" routine.
+       */
+       if (dump_shaders == -1)
+               dump_shaders = debug_get_bool_option("R600_DUMP_SHADERS", FALSE);
 
        if (dump_shaders) {
                fprintf(stderr, "--------------------------------------------------------------\n");
@@ -453,24 +453,24 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
        case TGSI_FILE_ADDRESS:
                break;
 
-        case TGSI_FILE_SYSTEM_VALUE:
-                if (d->Semantic.Name == TGSI_SEMANTIC_INSTANCEID) {
-                        struct r600_bc_alu alu;
-                        memset(&alu, 0, sizeof(struct r600_bc_alu));
+       case TGSI_FILE_SYSTEM_VALUE:
+               if (d->Semantic.Name == TGSI_SEMANTIC_INSTANCEID) {
+                       struct r600_bc_alu alu;
+                       memset(&alu, 0, sizeof(struct r600_bc_alu));
 
-                        alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT);
-                        alu.src[0].sel = 0;
-                        alu.src[0].chan = 3;
+                       alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT);
+                       alu.src[0].sel = 0;
+                       alu.src[0].chan = 3;
 
                        alu.dst.sel = 0;
                        alu.dst.chan = 3;
                        alu.dst.write = 1;
-                        alu.last = 1;
+                       alu.last = 1;
 
-                        if ((r = r600_bc_add_alu(ctx->bc, &alu)))
-                                return r;
-                        break;
-                }
+                       if ((r = r600_bc_add_alu(ctx->bc, &alu)))
+                               return r;
+                       break;
+               }
 
        default:
                R600_ERR("unsupported file %d declaration\n", d->Declaration.File);
@@ -558,13 +558,13 @@ static void tgsi_src(struct r600_shader_ctx *ctx,
                r600_src->sel = V_SQ_ALU_SRC_LITERAL;
                memcpy(r600_src->value, ctx->literals + index * 4, sizeof(r600_src->value));
        } else if (tgsi_src->Register.File == TGSI_FILE_SYSTEM_VALUE) {
-                /* assume we wan't TGSI_SEMANTIC_INSTANCEID here */
-                r600_src->swizzle[0] = 3;
-                r600_src->swizzle[1] = 3;
-                r600_src->swizzle[2] = 3;
-                r600_src->swizzle[3] = 3;
-                r600_src->sel = 0;
-        } else {
+               /* assume we wan't TGSI_SEMANTIC_INSTANCEID here */
+               r600_src->swizzle[0] = 3;
+               r600_src->swizzle[1] = 3;
+               r600_src->swizzle[2] = 3;
+               r600_src->swizzle[3] = 3;
+               r600_src->sel = 0;
+       } else {
                if (tgsi_src->Register.Indirect)
                        r600_src->rel = V_SQ_REL_RELATIVE;
                r600_src->sel = tgsi_src->Register.Index;
index 677e220934029efe2fe996e94f3b378537a2f3ea..3c072fe7ca9a80da7b6ce5f013b3c2bfd62b7e4b 100644 (file)
@@ -299,13 +299,13 @@ void r600_spi_update(struct r600_pipe_context *rctx)
                        tmp |= S_028644_PT_SPRITE_TEX(1);
                }
 
-                if (rctx->family < CHIP_CEDAR) {
-                    if (rshader->input[i].centroid)
-                            tmp |= S_028644_SEL_CENTROID(1);
+               if (rctx->family < CHIP_CEDAR) {
+                       if (rshader->input[i].centroid)
+                               tmp |= S_028644_SEL_CENTROID(1);
 
-                    if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR)
-                            tmp |= S_028644_SEL_LINEAR(1);
-                }
+                       if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR)
+                               tmp |= S_028644_SEL_LINEAR(1);
+               }
 
                r600_pipe_state_add_reg(&rstate, R_028644_SPI_PS_INPUT_CNTL_0 + i * 4, tmp, 0xFFFFFFFF, NULL);
        }