diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-04-12 22:26:42 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-04-12 22:26:42 +0200 |
commit | 7ca5426f7cae1fa151f3a3c9146bd8b7d508b37b (patch) | |
tree | fc990483abbbd808e46e99e10f1b884852d4081e | |
parent | f70a717482823e69637b4d91e216ae5756f07e0d (diff) |
gem_stress: option to only use x-tilinggem_stress
This seems to be another trick to massevily improve correctness
of the render blit. At least on my i945.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | tests/gem_stress.c | 23 | ||||
-rw-r--r-- | tests/gem_stress.h | 2 |
2 files changed, 18 insertions, 7 deletions
diff --git a/tests/gem_stress.c b/tests/gem_stress.c index ff75087f..0f62b445 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -448,8 +448,8 @@ static void init_set(unsigned set) else buffers[set][i].tiling = I915_TILING_NONE; r >>= 2; - if (options.no_tiling) - buffers[set][i].tiling = I915_TILING_NONE; + if (options.forced_tiling >= 0) + buffers[set][i].tiling = options.forced_tiling; if (buffers[set][i].tiling == I915_TILING_NONE) { /* min 64 byte stride */ @@ -560,7 +560,8 @@ static void parse_options(int argc, char **argv) {"buffer-count", 1, 0, 'c'}, {"trace-tile", 1, 0, 't'}, {"disable-render", 0, 0, 'r'}, - {"untiled", 0, 0, 'u'} + {"untiled", 0, 0, 'u'}, + {"x-tiled", 0, 0, 'x'} }; options.scratch_buf_size = 256*4096; @@ -569,9 +570,9 @@ static void parse_options(int argc, char **argv) options.num_buffers = 0; options.trace_tile = -1; options.use_render = 1; - options.no_tiling = 0; + options.forced_tiling = -1; - while((c = getopt_long(argc, argv, "ns:g:c:t:ru", + while((c = getopt_long(argc, argv, "ns:g:c:t:rux", long_options, &option_index)) != -1) { switch(c) { case 'd': @@ -612,9 +613,13 @@ static void parse_options(int argc, char **argv) printf("disabling render copy\n"); break; case 'u': - options.no_tiling = 1; + options.forced_tiling = I915_TILING_NONE; printf("disabling tiling\n"); break; + case 'x': + options.forced_tiling = I915_TILING_X; + printf("using only X-tiling\n"); + break; default: printf("unkown command options\n"); break; @@ -646,7 +651,13 @@ static void init(void) devid = intel_get_drm_devid(drm_fd); num_fences = get_num_fences(); batch = intel_batchbuffer_alloc(bufmgr, devid); + busy_bo = drm_intel_bo_alloc(bufmgr, "tiled bo", BUSY_BUF_SIZE, 4096); + if (options.forced_tiling >= 0) { + tmp = options.forced_tiling; + set_tiling(busy_bo, &tmp, 4096); + assert(tmp == options.forced_tiling); + } for (i = 0; i < num_buffers; i++) { init_buffer(&buffers[0][i], options.scratch_buf_size); diff --git a/tests/gem_stress.h b/tests/gem_stress.h index a2c3b50b..9b85eb83 100644 --- a/tests/gem_stress.h +++ b/tests/gem_stress.h @@ -31,7 +31,7 @@ struct option_struct { int no_hw; int gpu_busy_load; int use_render; - int no_tiling; + int forced_tiling; }; extern struct option_struct options; |