<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 16, 2016 at 10:08 AM, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@intel.com" target="_blank">chad.versace@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat 11 Jun 2016, Jason Ekstrand wrote:<br>
> Otherwise, we end up with a bogus value in the third component. On gen6-7<br>
> where we always use 2D textures, this can cause problems if the<br>
> SurfaceArray bit is set in the SURFACE_STATE.<br>
<br>
</span>Enlighten me. Why does blorp use 3D surfaces on gen >= 8 but not<br>
earlier?<br></blockquote><div><br></div><div>History? TBH, I'm not really sure. Probably because SKL 3-D is different but you'd have to ask topi to be sure.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
> ---<br>
> src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 11 +++++++++--<br>
> 1 file changed, 9 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
> index 782d285..cdb6b33 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
> @@ -1846,8 +1846,15 @@ brw_blorp_blit_miptrees(struct brw_context *brw,<br>
> brw_blorp_setup_coord_transform(¶ms.wm_push_consts.y_transform,<br>
> src_y0, src_y1, dst_y0, dst_y1, mirror_y);<br>
><br>
> - params.wm_push_consts.src_z =<br>
> - params.src.mt->target == GL_TEXTURE_3D ? params.src.layer : 0;<br>
> + if (brw->gen >= 8 && params.src.mt->target == GL_TEXTURE_3D) {<br>
> + /* On gen8+ we use actual 3-D textures so we need to pass the layer<br>
> + * through to the sampler.<br>
> + */<br>
> + params.wm_push_consts.src_z = params.src.layer;<br>
> + } else {<br>
> + /* On gen7 and earlier, we fake everything with 2-D textures */<br>
> + params.wm_push_consts.src_z = 0;<br>
> + }<br>
><br>
> if (params.dst.num_samples <= 1 && dst_mt->num_samples > 1) {<br>
> /* We must expand the rectangle we send through the rendering pipeline,<br>
</div></div></blockquote></div><br></div></div>