diff options
Diffstat (limited to 'lib/mesa/src/gallium/drivers/radeonsi/si_test_dma.c')
-rw-r--r-- | lib/mesa/src/gallium/drivers/radeonsi/si_test_dma.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_test_dma.c b/lib/mesa/src/gallium/drivers/radeonsi/si_test_dma.c index b3ab2750f..90a2032cd 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_test_dma.c +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_test_dma.c @@ -192,10 +192,11 @@ void si_test_dma(struct si_screen *sscreen) struct pipe_context *ctx = screen->context_create(screen, NULL, 0); struct si_context *sctx = (struct si_context*)ctx; uint64_t max_alloc_size; - unsigned i, iterations, num_partial_copies, max_tex_side; + unsigned i, iterations, num_partial_copies, max_levels, max_tex_side; unsigned num_pass = 0, num_fail = 0; - max_tex_side = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_SIZE); + max_levels = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); + max_tex_side = 1 << (max_levels - 1); /* Max 128 MB allowed for both textures. */ max_alloc_size = 128 * 1024 * 1024; @@ -223,7 +224,7 @@ void si_test_dma(struct si_screen *sscreen) struct si_texture *ssrc; struct cpu_texture src_cpu, dst_cpu; unsigned bpp, max_width, max_height, max_depth, j, num; - unsigned gfx_blits = 0, dma_blits = 0, cs_blits = 0, max_tex_side_gen; + unsigned gfx_blits = 0, dma_blits = 0, max_tex_side_gen; unsigned max_tex_layers; bool pass; bool do_partial_copies = rand() & 1; @@ -308,7 +309,7 @@ void si_test_dma(struct si_screen *sscreen) /* clear dst pixels */ uint32_t zero = 0; si_clear_buffer(sctx, dst, 0, sdst->surface.surf_size, &zero, 4, - SI_COHERENCY_SHADER, false); + SI_COHERENCY_SHADER); memset(dst_cpu.ptr, 0, dst_cpu.layer_stride * tdst.array_size); /* preparation */ @@ -323,7 +324,6 @@ void si_test_dma(struct si_screen *sscreen) struct pipe_box box; unsigned old_num_draw_calls = sctx->num_draw_calls; unsigned old_num_dma_calls = sctx->num_dma_calls; - unsigned old_num_cs_calls = sctx->num_compute_calls; if (!do_partial_copies) { /* copy whole src to dst */ @@ -383,7 +383,6 @@ void si_test_dma(struct si_screen *sscreen) /* See which engine was used. */ gfx_blits += sctx->num_draw_calls > old_num_draw_calls; dma_blits += sctx->num_dma_calls > old_num_dma_calls; - cs_blits += sctx->num_compute_calls > old_num_cs_calls; /* CPU copy */ util_copy_box(dst_cpu.ptr, tdst.format, dst_cpu.stride, @@ -400,8 +399,8 @@ void si_test_dma(struct si_screen *sscreen) else num_fail++; - printf("BLITs: GFX = %2u, DMA = %2u, CS = %2u, %s [%u/%u]\n", - gfx_blits, dma_blits, cs_blits, pass ? "pass" : "fail", + printf("BLITs: GFX = %2u, DMA = %2u, %s [%u/%u]\n", + gfx_blits, dma_blits, pass ? "pass" : "fail", num_pass, num_pass+num_fail); /* cleanup */ |