summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_blit.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-06-26 07:31:56 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:07 -0800
commitcbbd6a61c460439a4cde3ad2782e61b997d6a091 (patch)
tree7eaf17243984386255620f2c3634cbce1459a1d3 /src/gallium/drivers/iris/iris_blit.c
parente0f3971280ebe07405e76a15df18ee0e51ae3d68 (diff)
iris: maybe-flush before blorp operations
otherwise if we have a lot of back-to-back blorp operations we can potentially overflow even the chained batch
Diffstat (limited to 'src/gallium/drivers/iris/iris_blit.c')
-rw-r--r--src/gallium/drivers/iris/iris_blit.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c
index 79d98792f93..da23a9d524c 100644
--- a/src/gallium/drivers/iris/iris_blit.c
+++ b/src/gallium/drivers/iris/iris_blit.c
@@ -99,8 +99,12 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
GLenum filter =
info->filter == PIPE_TEX_FILTER_LINEAR ? GL_LINEAR : GL_NEAREST;
+ 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, &ice->render_batch, 0);
+ blorp_batch_init(&ice->blorp, &blorp_batch, batch, 0);
blorp_blit(&blorp_batch, &src_surf, info->src.level, src_layer,
src_isl_format, src_isl_swizzle,
&dst_surf, info->dst.level, dst_layer,
@@ -130,8 +134,12 @@ iris_resource_copy_region(struct pipe_context *ctx,
unsigned dst_layer = dstz;
unsigned src_layer = src_box->z;
+ 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, &ice->render_batch, 0);
+ blorp_batch_init(&ice->blorp, &blorp_batch, batch, 0);
blorp_copy(&blorp_batch, &src_surf, src_level, src_layer,
&dst_surf, dst_level, dst_layer,
src_box->x, src_box->y, dstx, dsty,