r300: Last of the indent changes. :)
authorOliver McFadden <z3ro.geek@gmail.com>
Wed, 9 May 2007 14:19:45 +0000 (14:19 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Wed, 9 May 2007 14:19:45 +0000 (14:19 +0000)
src/mesa/drivers/dri/r300/r300_emit.h
src/mesa/drivers/dri/r300/r300_fragprog.c
src/mesa/drivers/dri/r300/r300_ioctl.c
src/mesa/drivers/dri/r300/r300_maos.c
src/mesa/drivers/dri/r300/r300_program.h
src/mesa/drivers/dri/r300/r300_render.c
src/mesa/drivers/dri/r300/r300_shader.c
src/mesa/drivers/dri/r300/r300_texmem.c
src/mesa/drivers/dri/r300/r300_vertprog.c

index cf428524d6f8abe347d2a46dbab82d1eb5e132ef..8922d8c57d964a90cda7ed2a9ed58be4eee69466 100644 (file)
@@ -209,8 +209,7 @@ void static inline end_3d(r300ContextPtr rmesa)
        drm_radeon_cmd_header_t *cmd = NULL;
 
        cmd =
-           (drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, 1,
-                                                       __FUNCTION__);
+           (drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, 1, __FUNCTION__);
        cmd[0].header.cmd_type = R300_CMD_END3D;
 }
 
@@ -219,8 +218,7 @@ void static inline cp_delay(r300ContextPtr rmesa, unsigned short count)
        drm_radeon_cmd_header_t *cmd = NULL;
 
        cmd =
-           (drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, 1,
-                                                       __FUNCTION__);
+           (drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, 1, __FUNCTION__);
        cmd[0].i = cmdcpdelay(count);
 }
 
@@ -229,16 +227,14 @@ void static inline cp_wait(r300ContextPtr rmesa, unsigned char flags)
        drm_radeon_cmd_header_t *cmd = NULL;
 
        cmd =
-           (drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, 1,
-                                                       __FUNCTION__);
+           (drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, 1, __FUNCTION__);
        cmd[0].i = cmdwait(flags);
 }
 
 /**
  * fire vertex buffer
  */
-static void inline
-fire_AOS(r300ContextPtr rmesa, int vertex_count, int type)
+static void inline fire_AOS(r300ContextPtr rmesa, int vertex_count, int type)
 {
        int cmd_reserved = 0;
        int cmd_written = 0;
index 127aa12eb37ba2e7cbca2ea854bc3e0d88c4b097..0efdf686f039c3215d812d6778f448912b07504a 100644 (file)
@@ -918,7 +918,7 @@ static void emit_tex(struct r300_fragment_program *rp,
                         */
                        gl_state_index tokens[STATE_LENGTH] = {
                                STATE_INTERNAL, STATE_R300_TEXRECT_FACTOR, 0, 0,
-                                   0
+                               0
                        };
                        int factor_index;
                        GLuint factorreg;
index 05fe5e2c90434ceaf7f7c7e268ef9638e6b4bb60..884a7d49e451415669c63e493334de479e16f28b 100644 (file)
@@ -127,8 +127,7 @@ static void r300ClearBuffer(r300ContextPtr r300, int flags, int buffer)
                if (flags & CLEARBUFFER_DEPTH) {
                        t1 |= R300_RB3D_Z_WRITE_ONLY;
                        t2 |=
-                           (R300_ZS_ALWAYS <<
-                            R300_RB3D_ZS1_DEPTH_FUNC_SHIFT);
+                           (R300_ZS_ALWAYS << R300_RB3D_ZS1_DEPTH_FUNC_SHIFT);
                } else {
                        t1 |= R300_RB3D_Z_DISABLED_1;   // disable
                }
@@ -159,9 +158,7 @@ static void r300ClearBuffer(r300ContextPtr r300, int flags, int buffer)
                e32(r300->state.stencil.clear);
        }
 
-       cmd2 =
-           (drm_r300_cmd_header_t *) r300AllocCmdBuf(r300, 9,
-                                                     __FUNCTION__);
+       cmd2 = (drm_r300_cmd_header_t *) r300AllocCmdBuf(r300, 9, __FUNCTION__);
        cmd2[0].packet3.cmd_type = R300_CMD_PACKET3;
        cmd2[0].packet3.packet = R300_CMD_PACKET3_CLEAR;
        cmd2[1].u = r300PackFloat32(dPriv->w / 2.0);
@@ -297,8 +294,7 @@ static void r300EmitClearState(GLcontext * ctx)
        R300_STATECHANGE(r300, fpi[3]);
 
        reg_start(R300_PFS_INSTR0_0, 0);
-       e32(FP_INSTRC
-           (MAD, FP_ARGC(SRC0C_XYZ), FP_ARGC(ONE), FP_ARGC(ZERO)));
+       e32(FP_INSTRC(MAD, FP_ARGC(SRC0C_XYZ), FP_ARGC(ONE), FP_ARGC(ZERO)));
 
        reg_start(R300_PFS_INSTR1_0, 0);
        e32(FP_SELC(0, NO, XYZ, FP_TMP(0), 0, 0));
@@ -396,8 +392,7 @@ static void r300Clear(GLcontext * ctx, GLbitfield mask)
        }
 
        if (flags & BUFFER_BIT_BACK_LEFT) {
-               r300ClearBuffer(r300, bits | CLEARBUFFER_COLOR,
-                               swapped ^ 1);
+               r300ClearBuffer(r300, bits | CLEARBUFFER_COLOR, swapped ^ 1);
                bits = 0;
        }
 
@@ -433,8 +428,7 @@ static void r300RefillCurrentDmaRegion(r300ContextPtr rmesa, int size)
        }
 
        if (rmesa->dma.current.buf)
-               r300ReleaseDmaRegion(rmesa, &rmesa->dma.current,
-                                    __FUNCTION__);
+               r300ReleaseDmaRegion(rmesa, &rmesa->dma.current, __FUNCTION__);
 
        if (rmesa->dma.nr_released_bufs > 4)
                r300FlushCmdBuf(rmesa, __FUNCTION__);
@@ -477,8 +471,7 @@ static void r300RefillCurrentDmaRegion(r300ContextPtr rmesa, int size)
 }
 
 void r300ReleaseDmaRegion(r300ContextPtr rmesa,
-                         struct r300_dma_region *region,
-                         const char *caller)
+                         struct r300_dma_region *region, const char *caller)
 {
        if (RADEON_DEBUG & DEBUG_IOCTL)
                fprintf(stderr, "%s from %s\n", __FUNCTION__, caller);
@@ -554,8 +547,7 @@ static void r300RefillCurrentDmaRegion(r300ContextPtr rmesa)
        }
 
        if (rmesa->dma.current.buf)
-               r300ReleaseDmaRegion(rmesa, &rmesa->dma.current,
-                                    __FUNCTION__);
+               r300ReleaseDmaRegion(rmesa, &rmesa->dma.current, __FUNCTION__);
 
        if (rmesa->dma.nr_released_bufs > 4)
                r300FlushCmdBuf(rmesa, __FUNCTION__);
@@ -612,8 +604,7 @@ static void r300RefillCurrentDmaRegion(r300ContextPtr rmesa)
 }
 
 void r300ReleaseDmaRegion(r300ContextPtr rmesa,
-                         struct r300_dma_region *region,
-                         const char *caller)
+                         struct r300_dma_region *region, const char *caller)
 {
        if (RADEON_DEBUG & DEBUG_IOCTL)
                fprintf(stderr, "%s from %s\n", __FUNCTION__, caller);
@@ -723,8 +714,7 @@ GLboolean r300IsGartMemory(r300ContextPtr rmesa, const GLvoid * pointer,
        return valid;
 }
 
-GLuint r300GartOffsetFromVirtual(r300ContextPtr rmesa,
-                                const GLvoid * pointer)
+GLuint r300GartOffsetFromVirtual(r300ContextPtr rmesa, const GLvoid * pointer)
 {
        int offset =
            (char *)pointer -
@@ -736,8 +726,7 @@ GLuint r300GartOffsetFromVirtual(r300ContextPtr rmesa,
            || offset > rmesa->radeon.radeonScreen->gartTextures.size)
                return ~0;
        else
-               return rmesa->radeon.radeonScreen->gart_texture_offset +
-                   offset;
+               return rmesa->radeon.radeonScreen->gart_texture_offset + offset;
 }
 
 void r300InitIoctlFuncs(struct dd_function_table *functions)
index d3105e0d160279b254f79dc8823d775bbee9ae30..15bb41ddc0cd652dde5b62ac9598869cf56b5ffb 100644 (file)
@@ -137,8 +137,7 @@ static void emit_vec12(GLcontext * ctx,
 
        if (RADEON_DEBUG & DEBUG_VERTS)
                fprintf(stderr, "%s count %d stride %d out %p data %p\n",
-                       __FUNCTION__, count, stride, (void *)out,
-                       (void *)data);
+                       __FUNCTION__, count, stride, (void *)out, (void *)data);
 
        if (stride == 12)
                COPY_DWORDS(out, data, count * 3);
@@ -233,8 +232,7 @@ void r300EmitElts(GLcontext * ctx, void *elts, unsigned long n_elts,
        assert(elt_size == 2 || elt_size == 4);
 
        if (r300IsGartMemory(rmesa, elts, n_elts * elt_size)) {
-               rvb->address =
-                   rmesa->radeon.radeonScreen->gartTextures.map;
+               rvb->address = rmesa->radeon.radeonScreen->gartTextures.map;
                rvb->start = ((char *)elts) - rvb->address;
                rvb->aos_offset =
                    rmesa->radeon.radeonScreen->gart_texture_offset +
@@ -357,8 +355,7 @@ static GLuint t_vir1(uint32_t * dst, int swizzle[][4], GLuint nr)
        GLuint i;
 
        for (i = 0; i + 1 < nr; i += 2) {
-               dst[i >> 1] =
-                   t_swizzle(swizzle[i]) | R300_INPUT_ROUTE_ENABLE;
+               dst[i >> 1] = t_swizzle(swizzle[i]) | R300_INPUT_ROUTE_ENABLE;
                dst[i >> 1] |=
                    (t_swizzle(swizzle[i + 1]) | R300_INPUT_ROUTE_ENABLE)
                    << 16;
@@ -425,8 +422,7 @@ int r300EmitArrays(GLcontext * ctx)
                    CURRENT_VERTEX_SHADER(ctx);
                inputs = prog->inputs;
                InputsRead = CURRENT_VERTEX_SHADER(ctx)->key.InputsRead;
-               OutputsWritten =
-                   CURRENT_VERTEX_SHADER(ctx)->key.OutputsWritten;
+               OutputsWritten = CURRENT_VERTEX_SHADER(ctx)->key.OutputsWritten;
        } else {
                DECLARE_RENDERINPUTS(inputs_bitset);
                inputs = r300->state.sw_tcl_inputs;
@@ -441,8 +437,7 @@ int r300EmitArrays(GLcontext * ctx)
                assert(RENDERINPUTS_TEST(inputs_bitset, _TNL_ATTRIB_NORMAL)
                       == 0);
 
-               assert(RENDERINPUTS_TEST
-                      (inputs_bitset, _TNL_ATTRIB_COLOR0));
+               assert(RENDERINPUTS_TEST(inputs_bitset, _TNL_ATTRIB_COLOR0));
                InputsRead |= 1 << VERT_ATTRIB_COLOR0;
                OutputsWritten |= 1 << VERT_RESULT_COL0;
 
@@ -455,8 +450,7 @@ int r300EmitArrays(GLcontext * ctx)
                        if (RENDERINPUTS_TEST
                            (inputs_bitset, _TNL_ATTRIB_TEX(i))) {
                                InputsRead |= 1 << (VERT_ATTRIB_TEX0 + i);
-                               OutputsWritten |=
-                                   1 << (VERT_RESULT_TEX0 + i);
+                               OutputsWritten |= 1 << (VERT_RESULT_TEX0 + i);
                        }
 
                for (i = 0, nr = 0; i < VERT_ATTRIB_MAX; i++)
@@ -482,11 +476,9 @@ int r300EmitArrays(GLcontext * ctx)
                        if (InputsRead & (1 << VERT_ATTRIB_COLOR1))
                                inputs[VERT_ATTRIB_COLOR1] = 3;
 
-                       for (i = VERT_ATTRIB_TEX0; i <= VERT_ATTRIB_TEX7;
-                            i++)
+                       for (i = VERT_ATTRIB_TEX0; i <= VERT_ATTRIB_TEX7; i++)
                                if (InputsRead & (1 << i))
-                                       inputs[i] =
-                                           6 + (i - VERT_ATTRIB_TEX0);
+                                       inputs[i] = 6 + (i - VERT_ATTRIB_TEX0);
                }
 
                RENDERINPUTS_COPY(rmesa->state.render_inputs_bitset,
@@ -528,9 +520,8 @@ int r300EmitArrays(GLcontext * ctx)
                }
 #endif                         /* MESA_BIG_ENDIAN */
 
-               if (r300IsGartMemory
-                   (rmesa, VB->AttribPtr[tab[i]].data,
-                    /*(count-1)*stride */ 4)) {
+               if (r300IsGartMemory(rmesa, VB->AttribPtr[tab[i]].data,
+                                    /*(count-1)*stride */ 4)) {
                        if (VB->AttribPtr[tab[i]].stride % 4)
                                return R300_FALLBACK_TCL;
 
@@ -540,8 +531,7 @@ int r300EmitArrays(GLcontext * ctx)
                        rmesa->state.aos[i].aos_offset =
                            r300GartOffsetFromVirtual(rmesa,
                                                      VB->
-                                                     AttribPtr[tab[i]].
-                                                     data);
+                                                     AttribPtr[tab[i]].data);
                        rmesa->state.aos[i].aos_stride =
                            VB->AttribPtr[tab[i]].stride / 4;
 
@@ -639,8 +629,7 @@ int r300EmitArrays(GLcontext * ctx)
 
        for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
                if (OutputsWritten & (1 << (VERT_RESULT_TEX0 + i)))
-                       r300->hw.vof.cmd[R300_VOF_CNTL_1] |=
-                           (4 << (3 * i));
+                       r300->hw.vof.cmd[R300_VOF_CNTL_1] |= (4 << (3 * i));
 
        rmesa->state.aos_count = nr;
 
@@ -696,7 +685,6 @@ void r300ReleaseArrays(GLcontext * ctx)
 
        r300ReleaseDmaRegion(rmesa, &rmesa->state.elt_dma, __FUNCTION__);
        for (i = 0; i < rmesa->state.aos_count; i++) {
-               r300ReleaseDmaRegion(rmesa, &rmesa->state.aos[i],
-                                    __FUNCTION__);
+               r300ReleaseDmaRegion(rmesa, &rmesa->state.aos[i], __FUNCTION__);
        }
 }
index 3210660df1c4179753c1c9a31e455c477db7acab..eddd783f07330417953b4b943ff20a5becddbe8a 100644 (file)
@@ -145,6 +145,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        ((arg1) << R300_FPI2_ARG1A_SHIFT) |     \
        ((arg2) << R300_FPI2_ARG2A_SHIFT))
 
-extern void debug_vp(GLcontext *ctx, struct gl_vertex_program *vp);
-       
-#endif /* __R300_PROGRAM_H__ */
+extern void debug_vp(GLcontext * ctx, struct gl_vertex_program *vp);
+
+#endif                         /* __R300_PROGRAM_H__ */
index be10a185875f57faa3db40f03ad13a834d91c215..6b8c908fb3b0afbbd6c660d0d75ef03566af76f9 100644 (file)
@@ -73,8 +73,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r300_emit.h"
 extern int future_hw_tcl_on;
 
-static int r300PrimitiveType(r300ContextPtr rmesa, GLcontext * ctx,
-                            int prim)
+static int r300PrimitiveType(r300ContextPtr rmesa, GLcontext * ctx, int prim)
 {
        int type = -1;
 
@@ -309,8 +308,7 @@ static GLboolean r300RunRender(GLcontext * ctx,
                GLuint start = VB->Primitive[i].start;
                GLuint length = VB->Primitive[i].count;
 
-               r300RunRenderPrimitive(rmesa, ctx, start, start + length,
-                                      prim);
+               r300RunRenderPrimitive(rmesa, ctx, start, start + length, prim);
        }
 
        reg_start(R300_RB3D_DSTCACHE_CTLSTAT, 0);
@@ -359,8 +357,7 @@ int r300Fallback(GLcontext * ctx)
 
        FALLBACK_IF(ctx->Color.ColorLogicOpEnabled);
 
-       if (ctx->Extensions.NV_point_sprite
-           || ctx->Extensions.ARB_point_sprite)
+       if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite)
                FALLBACK_IF(ctx->Point.PointSprite);
 
        if (!r300->disable_lowimpact_fallback) {
index 9f300e0d95bd2ca45e2e9e147bff512980afaf1d..0953d32e3d68583ade2aa26fbba5a7edf467ff8c 100644 (file)
@@ -54,12 +54,10 @@ static void r300DeleteProgram(GLcontext * ctx, struct gl_program *prog)
 }
 
 static void
-r300ProgramStringNotify(GLcontext * ctx, GLenum target,
-                       struct gl_program *prog)
+r300ProgramStringNotify(GLcontext * ctx, GLenum target, struct gl_program *prog)
 {
        struct r300_vertex_program_cont *vp = (void *)prog;
-       struct r300_fragment_program *fp =
-           (struct r300_fragment_program *)prog;
+       struct r300_fragment_program *fp = (struct r300_fragment_program *)prog;
 
        switch (target) {
        case GL_VERTEX_PROGRAM_ARB:
@@ -77,8 +75,7 @@ r300ProgramStringNotify(GLcontext * ctx, GLenum target,
 }
 
 static GLboolean
-r300IsProgramNative(GLcontext * ctx, GLenum target,
-                   struct gl_program *prog)
+r300IsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog)
 {
        return 1;
 }
index 221dda41b0e7697a56fa5edf51a80408622b7e78..2c8740bff76e1636a0f33e88844d261663fb7af8 100644 (file)
@@ -441,10 +441,9 @@ static void uploadSubImage(r300ContextPtr rmesa, r300TexObjPtr t,
 #if 1
                if ((t->tile_bits & R300_TXO_MACRO_TILE) &&
                    (texImage->Width * texImage->TexFormat->TexelBytes >= 256)
-                   &&
-                   ((!(t->tile_bits & R300_TXO_MICRO_TILE)
-                     && (texImage->Height >= 8))
-                    || (texImage->Height >= 16))) {
+                   && ((!(t->tile_bits & R300_TXO_MICRO_TILE)
+                        && (texImage->Height >= 8))
+                       || (texImage->Height >= 16))) {
                        /* weird: R200 disables macro tiling if mip width is smaller than 256 bytes,
                           OR if height is smaller than 8 automatically, but if micro tiling is active
                           the limit is height 16 instead ? */
index 4d0c9c2719066496d277ae0faf7c79b773378e14..3e664e933efd62067ec9171384c5e193d492b0b1 100644 (file)
@@ -1215,8 +1215,7 @@ static void pos_as_texcoord(struct r300_vertex_program *vp,
 }
 
 static struct r300_vertex_program *build_program(struct r300_vertex_program_key
-                                                *wanted_key,
-                                                struct gl_vertex_program
+                                                *wanted_key, struct gl_vertex_program
                                                 *mesa_vp, GLint wpos_idx)
 {
        struct r300_vertex_program *vp;