[Mesa-dev] [PATCH v2 5/7] intel/blorp_blit: Enable splitting large blorp blits
Jason Ekstrand
jason at jlekstrand.net
Tue Dec 6 21:49:05 UTC 2016
On Wed, Nov 30, 2016 at 8:12 PM, Jordan Justen <jordan.l.justen at intel.com>
wrote:
> Detect when the surface sizes are too large for a blorp blit. When it
> is too large, the blorp blit will be split into a smaller operation
> and attempted again.
>
> For gen7, this fixes the cts test:
>
> ES3-CTS.gtf.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_
> multisampled_to_singlesampled_blit
>
> It will also enable us to increase our renderable size from 8k x 8k to
> 16k x 16k.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> src/intel/blorp/blorp_blit.c | 37 ++++++++++++++++++++++++++++++++++++-
> 1 file changed, 36 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
> index 782144a..58e9e0c 100644
> --- a/src/intel/blorp/blorp_blit.c
> +++ b/src/intel/blorp/blorp_blit.c
> @@ -1487,9 +1487,37 @@ surf_retile_w_to_y(const struct isl_device *isl_dev,
> }
>
> static bool
> +can_shrink_surface(const struct brw_blorp_surface_info *surf)
> +{
> + return
> + /* The current code doesn't support offsets into the aux buffers.
> This
> + * should be possible, but we need to make sure the offset is page
> + * aligned for both the surface and the aux buffer surface.
> Generally
> + * this mean using the page aligned offset for the aux buffer.
> + *
> + * Currently the cases where we must split the blit are limited to
> cases
> + * where we don't have a aux buffer.
> + */
> + surf->aux_addr.buffer == NULL &&
> + /* We can't support splitting the blit for gen <= 7, because the
> qpitch
> + * size is calculated by the hardware based on the surface height
> for
> + * gen <= 7. In gen >= 8, the qpitch is controlled by the driver.
> + */
> + surf->surf.msaa_layout != ISL_MSAA_LAYOUT_ARRAY;
>
This might be a bit clearer as
if (surf->aux_addr.buffer != NULL)
return false;
if (surf->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY)
return false;
return true;
But I don't care too much about it.
> +}
> +
> +static bool
> can_shrink_surfaces(const struct blorp_params *params)
> {
> - return false;
> + return
> + can_shrink_surface(¶ms->src) &&
> + can_shrink_surface(¶ms->dst);
> +}
> +
> +static unsigned
> +get_max_surface_size()
> +{
> + return 16384;
> }
>
> struct blt_axis {
> @@ -1716,6 +1744,13 @@ try_blorp_blit(struct blorp_batch *batch,
> brw_blorp_get_blit_kernel(batch->blorp, params, wm_prog_key);
>
> unsigned result = 0;
> + unsigned max_surface_size = get_max_surface_size(devinfo, params);
> + if (params->src.surf.logical_level0_px.width > max_surface_size ||
> + params->dst.surf.logical_level0_px.width > max_surface_size)
> + result |= BLIT_WIDTH_TOO_LARGE;
> + if (params->src.surf.logical_level0_px.height > max_surface_size ||
> + params->dst.surf.logical_level0_px.height > max_surface_size)
> + result |= BLIT_HEIGHT_TOO_LARGE;
>
> if (result == 0) {
> batch->blorp->exec(batch, params);
> --
> 2.10.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161206/35c51313/attachment-0001.html>
More information about the mesa-dev
mailing list