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

Author: Ian Romanick <[email protected]>
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 <[email protected]>
Suggested-by: Jason Ekstrand <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>

---

 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));

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to