diff options
author | Eric Anholt <[email protected]> | 2008-01-22 11:34:46 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-02-04 18:24:16 -0800 |
commit | 4e13067d0f95b280da3fef2deb7e59466ea73818 (patch) | |
tree | 7404347515224de6b2ce0eb2c6092f00c96be6c7 /src/mesa | |
parent | df44fefced61d35c302907cb716fa0f9337ae526 (diff) |
[965] Add a wrapper around interleaved copy_array_to_vbo_array for profiling.
If compiled with optimization, it shouldn't appear at all, and helps me for
now.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw_upload.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 19a496a199d..bdb9b5e8946 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -303,8 +303,6 @@ static void get_space( struct brw_context *brw, brw->vb.upload.offset += size; } - - static struct gl_client_array * copy_array_to_vbo_array( struct brw_context *brw, GLuint i, @@ -358,7 +356,19 @@ copy_array_to_vbo_array( struct brw_context *brw, return vbo_array; } - +/** + * Just a wrapper to highlight which cause of copy_array_to_vbo_array + * is happening in the profile. + */ +static struct gl_client_array * +interleaved_copy_array_to_vbo_array(struct brw_context *brw, + GLuint i, + const struct gl_client_array *array, + GLuint element_size, + GLuint count) +{ + return copy_array_to_vbo_array(brw, i, array, element_size, count); +} static struct gl_client_array * interleaved_vbo_array( struct brw_context *brw, @@ -451,10 +461,11 @@ GLboolean brw_upload_vertices( struct brw_context *brw, if (nr_uploads > 1 && interleave && interleave <= 256) { - upload[0]->glarray = copy_array_to_vbo_array(brw, 0, - upload[0]->glarray, - interleave, - upload[0]->count); + upload[0]->glarray = + interleaved_copy_array_to_vbo_array(brw, 0, + upload[0]->glarray, + interleave, + upload[0]->count); for (i = 1; i < nr_uploads; i++) { upload[i]->glarray = interleaved_vbo_array(brw, |