radeon: move declarations before code
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user