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_levels, max_tex_side;
+ unsigned i, iterations, num_partial_copies, max_tex_side;
unsigned num_pass = 0, num_fail = 0;
- max_levels = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
- max_tex_side = 1 << (max_levels - 1);
+ max_tex_side = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_SIZE);
/* Max 128 MB allowed for both textures. */
max_alloc_size = 128 * 1024 * 1024;
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, max_tex_side_gen;
+ unsigned gfx_blits = 0, dma_blits = 0, cs_blits = 0, max_tex_side_gen;
unsigned max_tex_layers;
bool pass;
bool do_partial_copies = rand() & 1;
set_random_pixels(ctx, src, &src_cpu);
/* clear dst pixels */
- si_clear_buffer(sctx, dst, 0, sdst->surface.surf_size, 0, true);
+ uint32_t zero = 0;
+ si_clear_buffer(sctx, dst, 0, sdst->surface.surf_size, &zero, 4,
+ SI_COHERENCY_SHADER, false);
memset(dst_cpu.ptr, 0, dst_cpu.layer_stride * tdst.array_size);
/* preparation */
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 */
/* 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,
else
num_fail++;
- printf("BLITs: GFX = %2u, DMA = %2u, %s [%u/%u]\n",
- gfx_blits, dma_blits, pass ? "pass" : "fail",
+ printf("BLITs: GFX = %2u, DMA = %2u, CS = %2u, %s [%u/%u]\n",
+ gfx_blits, dma_blits, cs_blits, pass ? "pass" : "fail",
num_pass, num_pass+num_fail);
/* cleanup */