[Mesa-dev] [PATCH 8/9] intel/blorp: Apply source offset in the TEX case
Ian Romanick
idr at freedesktop.org
Fri Jun 16 21:01:56 UTC 2017
From: Ian Romanick <ian.d.romanick at intel.com>
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>
---
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 317a2f3..f552302 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));
--
2.9.4
More information about the mesa-dev
mailing list