<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 30, 2016 at 8:12 PM, Jordan Justen <span dir="ltr"><<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Detect when the surface sizes are too large for a blorp blit. When it<br>
is too large, the blorp blit will be split into a smaller operation<br>
and attempted again.<br>
<br>
For gen7, this fixes the cts test:<br>
<br>
ES3-CTS.gtf.GL3Tests.<wbr>framebuffer_blit.framebuffer_<wbr>blit_functionality_<wbr>multisampled_to_singlesampled_<wbr>blit<br>
<br>
It will also enable us to increase our renderable size from 8k x 8k to<br>
16k x 16k.<br>
<br>
Signed-off-by: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>><br>
---<br>
src/intel/blorp/blorp_blit.c | 37 ++++++++++++++++++++++++++++++<wbr>++++++-<br>
1 file changed, 36 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c<br>
index 782144a..58e9e0c 100644<br>
--- a/src/intel/blorp/blorp_blit.c<br>
+++ b/src/intel/blorp/blorp_blit.c<br>
@@ -1487,9 +1487,37 @@ surf_retile_w_to_y(const struct isl_device *isl_dev,<br>
}<br>
<br>
static bool<br>
+can_shrink_surface(const struct brw_blorp_surface_info *surf)<br>
+{<br>
+ return<br>
+ /* The current code doesn't support offsets into the aux buffers. This<br>
+ * should be possible, but we need to make sure the offset is page<br>
+ * aligned for both the surface and the aux buffer surface. Generally<br>
+ * this mean using the page aligned offset for the aux buffer.<br>
+ *<br>
+ * Currently the cases where we must split the blit are limited to cases<br>
+ * where we don't have a aux buffer.<br>
+ */<br>
+ surf->aux_addr.buffer == NULL &&<br>
+ /* We can't support splitting the blit for gen <= 7, because the qpitch<br>
+ * size is calculated by the hardware based on the surface height for<br>
+ * gen <= 7. In gen >= 8, the qpitch is controlled by the driver.<br>
+ */<br>
+ surf->surf.msaa_layout != ISL_MSAA_LAYOUT_ARRAY;<br></blockquote><div><br></div><div>This might be a bit clearer as<br><br></div><div>if (surf->aux_addr.buffer != NULL)<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+}<br>
+<br>
+static bool<br>
can_shrink_surfaces(const struct blorp_params *params)<br>
{<br>
- return false;<br>
+ return<br>
+ can_shrink_surface(¶ms-><wbr>src) &&<br>
+ can_shrink_surface(¶ms-><wbr>dst);<br>
+}<br>
+<br>
+static unsigned<br>
+get_max_surface_size()<br>
+{<br>
+ return 16384;<br>
}<br>
<br>
struct blt_axis {<br>
@@ -1716,6 +1744,13 @@ try_blorp_blit(struct blorp_batch *batch,<br>
brw_blorp_get_blit_kernel(<wbr>batch->blorp, params, wm_prog_key);<br>
<br>
unsigned result = 0;<br>
+ unsigned max_surface_size = get_max_surface_size(devinfo, params);<br>
+ if (params->src.surf.logical_<wbr>level0_px.width > max_surface_size ||<br>
+ params->dst.surf.logical_<wbr>level0_px.width > max_surface_size)<br>
+ result |= BLIT_WIDTH_TOO_LARGE;<br>
+ if (params->src.surf.logical_<wbr>level0_px.height > max_surface_size ||<br>
+ params->dst.surf.logical_<wbr>level0_px.height > max_surface_size)<br>
+ result |= BLIT_HEIGHT_TOO_LARGE;<br>
<br>
if (result == 0) {<br>
batch->blorp->exec(batch, params);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.10.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>