[Mesa-dev] [PATCH 1/4] intel/reg: Add helpers for 64-bit integer immediates

Jason Ekstrand jason at jlekstrand.net
Fri Nov 3 05:16:11 UTC 2017


On Thu, Nov 2, 2017 at 10:12 PM, Michael Schellenberger Costa <
mschellenbergercosta at googlemail.com> wrote:

> Hi Jason,
>
> -----Ursprüngliche Nachricht-----
> Von: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] Im Auftrag
> von Jason Ekstrand
> Gesendet: Freitag, 3. November 2017 05:53
> An: mesa-dev at lists.freedesktop.org
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> Betreff: [Mesa-dev] [PATCH 1/4] intel/reg: Add helpers for 64-bit integer
> immediates
>
> ---
>  src/intel/compiler/brw_reg.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/src/intel/compiler/brw_reg.h b/src/intel/compiler/brw_reg.h
> index d68d64f..a641869 100644
> --- a/src/intel/compiler/brw_reg.h
> +++ b/src/intel/compiler/brw_reg.h
> @@ -597,6 +597,24 @@ brw_imm_f(float f)
>     return imm;
>  }
>
> +/** Construct int64_t immediate register */
> +static inline struct brw_reg
> +brw_imm_q(int64_t q)
> +{
> +   struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_Q);
> +   imm.d64 = q;
> +   return imm;
> +}
> +
> +/** Construct int64_t immediate register */
> This should be uint64_t?
>

Yup.  Fixed locally.


> --Michael
>
> +static inline struct brw_reg
> +brw_imm_uq(uint64_t uq)
> +{
> +   struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_UQ);
> +   imm.u64 = uq;
> +   return imm;
> +}
> +
>  /** Construct integer immediate register */
>  static inline struct brw_reg
>  brw_imm_d(int d)
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> 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/20171102/3e7fc2cb/attachment-0001.html>


More information about the mesa-dev mailing list