Mesa (master): intel/blorp: Apply source offset in the TEX case

Ian Romanick idr at kemper.freedesktop.org
Tue Jun 20 18:09:02 UTC 2017


Module: Mesa
Branch: master
Commit: cbb941cdec657427d3a0630b5293ae713e2c7f61
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cbb941cdec657427d3a0630b5293ae713e2c7f61

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Jun  1 15:43:08 2017 -0700

intel/blorp: Apply source offset in the TEX case

Previously the offset was only applied in the TXF case.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Suggested-by: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/blorp/blorp_blit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 317a2f35a1..f552302aa8 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -202,6 +202,9 @@ static nir_ssa_def *
 blorp_nir_tex(nir_builder *b, struct brw_blorp_blit_vars *v,
               const struct brw_blorp_blit_prog_key *key, nir_ssa_def *pos)
 {
+   if (key->need_src_offset)
+      pos = nir_fadd(b, pos, nir_i2f32(b, nir_load_var(b, v->v_src_offset)));
+
    /* If the sampler requires normalized coordinates, we need to compensate. */
    if (key->src_coords_normalized)
       pos = nir_fmul(b, pos, nir_load_var(b, v->v_src_inv_size));




More information about the mesa-commit mailing list