summaryrefslogtreecommitdiffstats
path: root/src/intel/blorp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2017-06-01 15:43:08 -0700
committerIan Romanick <[email protected]>2017-06-20 11:07:02 -0700
commitcbb941cdec657427d3a0630b5293ae713e2c7f61 (patch)
tree848bead2ea86eac8611434d14d8a319e775e0c2e /src/intel/blorp
parent990f2be139cefe2b978848558372fe025c91ce99 (diff)
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]>
Diffstat (limited to 'src/intel/blorp')
-rw-r--r--src/intel/blorp/blorp_blit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 317a2f35a12..f552302aa85 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));