mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 02:16:17 +00:00
gem_stress: option to only use x-tiling
This seems to be another trick to massively improve correctness of the render blit. At least on my i945. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
f70a717482
commit
a67091b220
@ -448,8 +448,8 @@ static void init_set(unsigned set)
|
|||||||
else
|
else
|
||||||
buffers[set][i].tiling = I915_TILING_NONE;
|
buffers[set][i].tiling = I915_TILING_NONE;
|
||||||
r >>= 2;
|
r >>= 2;
|
||||||
if (options.no_tiling)
|
if (options.forced_tiling >= 0)
|
||||||
buffers[set][i].tiling = I915_TILING_NONE;
|
buffers[set][i].tiling = options.forced_tiling;
|
||||||
|
|
||||||
if (buffers[set][i].tiling == I915_TILING_NONE) {
|
if (buffers[set][i].tiling == I915_TILING_NONE) {
|
||||||
/* min 64 byte stride */
|
/* min 64 byte stride */
|
||||||
@ -560,7 +560,8 @@ static void parse_options(int argc, char **argv)
|
|||||||
{"buffer-count", 1, 0, 'c'},
|
{"buffer-count", 1, 0, 'c'},
|
||||||
{"trace-tile", 1, 0, 't'},
|
{"trace-tile", 1, 0, 't'},
|
||||||
{"disable-render", 0, 0, 'r'},
|
{"disable-render", 0, 0, 'r'},
|
||||||
{"untiled", 0, 0, 'u'}
|
{"untiled", 0, 0, 'u'},
|
||||||
|
{"x-tiled", 0, 0, 'x'}
|
||||||
};
|
};
|
||||||
|
|
||||||
options.scratch_buf_size = 256*4096;
|
options.scratch_buf_size = 256*4096;
|
||||||
@ -569,9 +570,9 @@ static void parse_options(int argc, char **argv)
|
|||||||
options.num_buffers = 0;
|
options.num_buffers = 0;
|
||||||
options.trace_tile = -1;
|
options.trace_tile = -1;
|
||||||
options.use_render = 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) {
|
long_options, &option_index)) != -1) {
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'd':
|
case 'd':
|
||||||
@ -612,9 +613,13 @@ static void parse_options(int argc, char **argv)
|
|||||||
printf("disabling render copy\n");
|
printf("disabling render copy\n");
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
options.no_tiling = 1;
|
options.forced_tiling = I915_TILING_NONE;
|
||||||
printf("disabling tiling\n");
|
printf("disabling tiling\n");
|
||||||
break;
|
break;
|
||||||
|
case 'x':
|
||||||
|
options.forced_tiling = I915_TILING_X;
|
||||||
|
printf("using only X-tiling\n");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
printf("unkown command options\n");
|
printf("unkown command options\n");
|
||||||
break;
|
break;
|
||||||
@ -646,7 +651,13 @@ static void init(void)
|
|||||||
devid = intel_get_drm_devid(drm_fd);
|
devid = intel_get_drm_devid(drm_fd);
|
||||||
num_fences = get_num_fences();
|
num_fences = get_num_fences();
|
||||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||||
|
|
||||||
busy_bo = drm_intel_bo_alloc(bufmgr, "tiled bo", BUSY_BUF_SIZE, 4096);
|
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++) {
|
for (i = 0; i < num_buffers; i++) {
|
||||||
init_buffer(&buffers[0][i], options.scratch_buf_size);
|
init_buffer(&buffers[0][i], options.scratch_buf_size);
|
||||||
|
@ -31,7 +31,7 @@ struct option_struct {
|
|||||||
int no_hw;
|
int no_hw;
|
||||||
int gpu_busy_load;
|
int gpu_busy_load;
|
||||||
int use_render;
|
int use_render;
|
||||||
int no_tiling;
|
int forced_tiling;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct option_struct options;
|
extern struct option_struct options;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user