Module: Mesa Branch: lp-surface-tiling Commit: 4a50ccfd470547c9be0704005818a87014e9c0e9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a50ccfd470547c9be0704005818a87014e9c0e9
Author: Brian Paul <[email protected]> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters --- src/gallium/drivers/llvmpipe/lp_tile_soa.h | 3 +++ src/gallium/drivers/llvmpipe/lp_tile_soa.py | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.h b/src/gallium/drivers/llvmpipe/lp_tile_soa.h index 063fecd..9d6a88a 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_soa.h +++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.h @@ -51,6 +51,9 @@ tile_offset[TILE_VECTOR_HEIGHT][TILE_VECTOR_WIDTH]; #define TILE_Y_STRIDE (TILE_VECTOR_HEIGHT * TILE_SIZE * NUM_CHANNELS) //1024 +extern int tile_write_count, tile_read_count; + + /** * Return offset of the given pixel (and color channel) from the start * of a tile, in bytes. diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.py b/src/gallium/drivers/llvmpipe/lp_tile_soa.py index c1226e4..65810b6 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_soa.py +++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.py @@ -300,6 +300,7 @@ def generate_read(formats, dst_channel, dst_native_type, dst_suffix): print 'lp_tile_read_%s(enum pipe_format format, %s *dst, const void *src, unsigned src_stride, unsigned x, unsigned y, unsigned w, unsigned h)' % (dst_suffix, dst_native_type) print '{' print ' void (*func)(%s *dst, const uint8_t *src, unsigned src_stride, unsigned x0, unsigned y0, unsigned w, unsigned h);' % dst_native_type + print ' tile_read_count += 1;' print ' switch(format) {' for format in formats: if is_format_supported(format): @@ -327,6 +328,7 @@ def generate_write(formats, src_channel, src_native_type, src_suffix): print '{' print ' void (*func)(const %s *src, uint8_t *dst, unsigned dst_stride, unsigned x0, unsigned y0, unsigned w, unsigned h);' % src_native_type + print ' tile_write_count += 1;' print ' switch(format) {' for format in formats: if is_format_supported(format): @@ -358,6 +360,8 @@ def main(): print '#include "util/u_half.h"' print '#include "lp_tile_soa.h"' print + print 'int tile_write_count=0, tile_read_count=0;' + print print 'const unsigned char' print 'tile_offset[TILE_VECTOR_HEIGHT][TILE_VECTOR_WIDTH] = {' print ' { 0, 1, 4, 5},' _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
