--- src/intel/blorp/blorp_clear.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index 5b575dccc22..03badf83ada 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -648,6 +648,18 @@ blorp_clear_depth_stencil(struct blorp_batch *batch, } } +static bool +is_full_surface_clear(const struct isl_surf *surf, uint32_t level, + uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1) +{ + const struct isl_extent2d level_extent = { + .w = minify(surf->logical_level0_px.width, level), + .h = minify(surf->logical_level0_px.height, level), + }; + return x0 == 0 && x1 == level_extent.width && + y0 == 0 && y1 == level_extent.height; +} + bool blorp_can_hiz_clear_depth(uint8_t gen, enum isl_format format, uint32_t num_samples, @@ -746,6 +758,9 @@ blorp_hiz_clear_depth_stencil(struct blorp_batch *batch, params.depth_format = isl_format_get_depth_format(depth->surf->format, false); params.num_samples = params.depth.surf.samples; + + if (is_full_surface_clear(depth->surf, level, x0, y0, x1, y1)) + params.full_surface_hiz_op = true; } batch->blorp->exec(batch, ¶ms); -- 2.19.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev