summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2007-05-09 14:19:45 +0000
committerOliver McFadden <[email protected]>2007-05-09 14:19:45 +0000
commit7b165de5f8a4c3d99b8b9f1820e12d5899b3884f (patch)
tree98ad7b0555d3b833dde0926b6fc944af497489e4 /src/mesa/drivers
parent76d7b62cd27fba8b5739e6523fdbf9a14eedefe7 (diff)
r300: Last of the indent changes. :)
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.h12
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c31
-rw-r--r--src/mesa/drivers/dri/r300/r300_maos.c38
-rw-r--r--src/mesa/drivers/dri/r300/r300_program.h6
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c9
-rw-r--r--src/mesa/drivers/dri/r300/r300_shader.c9
-rw-r--r--src/mesa/drivers/dri/r300/r300_texmem.c7
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c3
9 files changed, 41 insertions, 76 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h
index cf428524d6f..8922d8c57d9 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.h
+++ b/src/mesa/drivers/dri/r300/r300_emit.h
@@ -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;
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index 127aa12eb37..0efdf686f03 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -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;
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index 05fe5e2c904..884a7d49e45 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -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)
diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c
index d3105e0d160..15bb41ddc0c 100644
--- a/src/mesa/drivers/dri/r300/r300_maos.c
+++ b/src/mesa/drivers/dri/r300/r300_maos.c
@@ -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__);
}
}
diff --git a/src/mesa/drivers/dri/r300/r300_program.h b/src/mesa/drivers/dri/r300/r300_program.h
index 3210660df1c..eddd783f073 100644
--- a/src/mesa/drivers/dri/r300/r300_program.h
+++ b/src/mesa/drivers/dri/r300/r300_program.h
@@ -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__ */
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index be10a185875..6b8c908fb3b 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -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) {
diff --git a/src/mesa/drivers/dri/r300/r300_shader.c b/src/mesa/drivers/dri/r300/r300_shader.c
index 9f300e0d95b..0953d32e3d6 100644
--- a/src/mesa/drivers/dri/r300/r300_shader.c
+++ b/src/mesa/drivers/dri/r300/r300_shader.c
@@ -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;
}
diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c
index 221dda41b0e..2c8740bff76 100644
--- a/src/mesa/drivers/dri/r300/r300_texmem.c
+++ b/src/mesa/drivers/dri/r300/r300_texmem.c
@@ -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 ? */
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 4d0c9c27190..3e664e933ef 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -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;