iris: call maybe_flush for each blorp operation
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 15 Aug 2018 06:37:53 +0000 (23:37 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:08 +0000 (10:26 -0800)
otherwise with high layer counts we may exceed two batches worth of
commands... (!)

src/gallium/drivers/iris/iris_blit.c

index 5e9a2bcb4974b6a010341c44da2ef25d534d64ea..6064ca17ecf9496e14331bd8220e1b1ed33b45a7 100644 (file)
@@ -149,12 +149,12 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
 
    struct iris_batch *batch = &ice->render_batch;
 
-   iris_batch_maybe_flush(batch, 1500);
-
    struct blorp_batch blorp_batch;
    blorp_batch_init(&ice->blorp, &blorp_batch, batch, 0);
 
    for (int slice = 0; slice < info->dst.box.depth; slice++) {
+      iris_batch_maybe_flush(batch, 1500);
+
       blorp_blit(&blorp_batch,
                  &src_surf, info->src.level, info->src.box.z + slice,
                  src_isl_format, src_isl_swizzle,
@@ -176,6 +176,8 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
                                    ISL_AUX_USAGE_NONE, true);
 
       for (int slice = 0; slice < info->dst.box.depth; slice++) {
+         iris_batch_maybe_flush(batch, 1500);
+
          blorp_blit(&blorp_batch,
                     &src_surf, info->src.level, info->src.box.z + slice,
                     ISL_FORMAT_R8_UINT, src_isl_swizzle,