[Mesa-dev] [PATCH 8/9] intel/blorp: Apply source offset in the TEX case

Jason Ekstrand jason at jlekstrand.net
Fri Jun 16 22:59:14 UTC 2017


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Fri, Jun 16, 2017 at 2:01 PM, Ian Romanick <idr at freedesktop.org> wrote:

> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170616/6e6c2650/attachment.html>


More information about the mesa-dev mailing list