<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 16, 2017 at 2:01 PM, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
<br>
Otherwise the values used for coordinate normalization use the wrong<br>
sizes.<br>
<br>
Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
Suggested-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br>
---<br>
src/intel/blorp/blorp_blit.c | 20 +++++++++++---------<br>
1 file changed, 11 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c<br>
index e48e5da..317a2f3 100644<br>
--- a/src/intel/blorp/blorp_blit.c<br>
+++ b/src/intel/blorp/blorp_blit.c<br>
@@ -1822,6 +1822,17 @@ try_blorp_blit(struct blorp_batch *batch,<br>
<br>
params->num_samples = params->dst.surf.samples;<br>
<br>
+ if (wm_prog_key->bilinear_filter && batch->blorp->isl_dev->info-><wbr>gen < 6) {<br>
+ /* Gen4-5 don't support non-normalized texture coordinates */<br>
+ wm_prog_key->src_coords_<wbr>normalized = true;<br>
+ params->wm_inputs.src_inv_<wbr>size[0] =<br>
+ 1.0f / minify(params->src.surf.<wbr>logical_level0_px.width,<br>
+ params->src.view.base_level);<br>
+ params->wm_inputs.src_inv_<wbr>size[1] =<br>
+ 1.0f / minify(params->src.surf.<wbr>logical_level0_px.height,<br>
+ params->src.view.base_level);<br>
+ }<br>
+<br>
if (params->src.tile_x_sa || params->src.tile_y_sa) {<br>
assert(wm_prog_key->need_src_<wbr>offset);<br>
surf_get_intratile_offset_px(&<wbr>params->src,<br>
@@ -2085,15 +2096,6 @@ blorp_blit(struct blorp_batch *batch,<br>
if (filter == GL_LINEAR &&<br>
params.src.surf.samples <= 1 && params.dst.surf.samples <= 1) {<br>
wm_prog_key.bilinear_filter = true;<br>
-<br>
- if (batch->blorp->isl_dev->info-><wbr>gen < 6) {<br>
- /* Gen4-5 don't support non-normalized texture coordinates */<br>
- wm_prog_key.src_coords_<wbr>normalized = true;<br>
- params.wm_inputs.src_inv_size[<wbr>0] =<br>
- 1.0f / minify(params.src.surf.<wbr>logical_level0_px.width, src_level);<br>
- params.wm_inputs.src_inv_size[<wbr>1] =<br>
- 1.0f / minify(params.src.surf.<wbr>logical_level0_px.height, src_level);<br>
- }<br>
}<br>
<br>
if ((params.src.surf.usage & ISL_SURF_USAGE_DEPTH_BIT) == 0 &&<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.4<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>