summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-08-09 12:27:58 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:08 -0800
commitd5146ba6703af1a152957f6a65a006a26ede6739 (patch)
tree96a5281a4ecd4ec713243af45c5075e8448f4583 /src/gallium/drivers
parentad76389f88b9fe851a5a58f360947d40d7212b22 (diff)
iris: actually do stencil blits
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_blit.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c
index 3c4efd4c47e..7a0f72c0337 100644
--- a/src/gallium/drivers/iris/iris_blit.c
+++ b/src/gallium/drivers/iris/iris_blit.c
@@ -164,6 +164,25 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
dst_x0, dst_y0, dst_x1, dst_y1,
filter, mirror_x, mirror_y);
+ if (util_format_is_depth_and_stencil(info->dst.format) &&
+ util_format_has_stencil(util_format_description(info->src.format))) {
+ struct iris_resource *src_res, *dst_res, *junk;
+ iris_get_depth_stencil_resources(info->src.resource, &junk, &src_res);
+ iris_get_depth_stencil_resources(info->dst.resource, &junk, &dst_res);
+ iris_blorp_surf_for_resource(&src_surf, &src_res->base,
+ ISL_AUX_USAGE_NONE, false);
+ iris_blorp_surf_for_resource(&dst_surf, &dst_res->base,
+ ISL_AUX_USAGE_NONE, true);
+
+ blorp_blit(&blorp_batch, &src_surf, info->src.level, src_layer,
+ ISL_FORMAT_R8_UINT, src_isl_swizzle,
+ &dst_surf, info->dst.level, dst_layer,
+ ISL_FORMAT_R8_UINT, ISL_SWIZZLE_IDENTITY,
+ src_x0, src_y0, src_x1, src_y1,
+ dst_x0, dst_y0, dst_x1, dst_y1,
+ filter, mirror_x, mirror_y);
+ }
+
blorp_batch_finish(&blorp_batch);
}