diff options
author | Brian Paul <[email protected]> | 2012-01-02 11:55:40 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-02 11:55:40 -0700 |
commit | 01a63f4bf5ab5e2e67982c6c60670dd2b4fe9fcb (patch) | |
tree | 71310aaeff80601140e32cadd260408334c6eee8 /src | |
parent | 5edc6fef4ca633a4e468d3afa82ce8bc641a2437 (diff) |
radeon: move declarations before code
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_debug.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_tcl.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_debug.c b/src/mesa/drivers/dri/radeon/radeon_debug.c index 413000b6c06..dd0afb809a0 100644 --- a/src/mesa/drivers/dri/radeon/radeon_debug.c +++ b/src/mesa/drivers/dri/radeon/radeon_debug.c @@ -93,6 +93,8 @@ void _radeon_print(const radeon_debug_type_t type, const char* message, ...) { + va_list values; + GET_CURRENT_CONTEXT(ctx); if (ctx) { radeonContextPtr radeon = RADEON_CONTEXT(ctx); @@ -100,7 +102,6 @@ void _radeon_print(const radeon_debug_type_t type, if (radeon->debug.indent_depth) fprintf(stderr, "%s", radeon->debug.indent); } - va_list values; va_start( values, message ); vfprintf(stderr, message, values); va_end( values ); diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c index 874ba926dc4..06cb8075da1 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tcl.c +++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c @@ -401,8 +401,6 @@ static GLuint radeonEnsureEmitSize( struct gl_context * ctx , GLuint inputs ) /* predict size for elements */ for (i = 0; i < VB->PrimitiveCount; ++i) { - if (!VB->Primitive[i].count) - continue; /* If primitive.count is less than MAX_CONVERSION_SIZE rendering code may decide convert to elts. In that case we have to make pessimistic prediction. @@ -410,6 +408,8 @@ static GLuint radeonEnsureEmitSize( struct gl_context * ctx , GLuint inputs ) const GLuint elts = ELTS_BUFSZ(nr_aos); const GLuint index = INDEX_BUFSZ; const GLuint vbuf = VBUF_BUFSZ; + if (!VB->Primitive[i].count) + continue; if ( (!VB->Elts && VB->Primitive[i].count >= MAX_CONVERSION_SIZE) || vbuf > index + elts) space_required += vbuf; @@ -442,6 +442,7 @@ static GLboolean radeon_run_tcl_render( struct gl_context *ctx, struct vertex_buffer *VB = &tnl->vb; GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0; GLuint i; + GLuint emit_end; /* TODO: separate this from the swtnl pipeline */ @@ -477,7 +478,7 @@ static GLboolean radeon_run_tcl_render( struct gl_context *ctx, } radeonReleaseArrays( ctx, ~0 ); - GLuint emit_end = radeonEnsureEmitSize( ctx, inputs ) + emit_end = radeonEnsureEmitSize( ctx, inputs ) + rmesa->radeon.cmdbuf.cs->cdw; radeonEmitArrays( ctx, inputs ); |