[Mesa-dev] [PATCH 04/14] nir: add double constant types

Jason Ekstrand jason at jlekstrand.net
Mon Mar 14 20:51:23 UTC 2016


On Mon, Mar 7, 2016 at 12:46 AM, Samuel Iglesias Gonsálvez <
siglesias at igalia.com> wrote:

> From: Connor Abbott <connor.w.abbott at intel.com>
>
> ---
>  src/compiler/nir/nir.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
> index d493186..d2fd23d 100644
> --- a/src/compiler/nir/nir.h
> +++ b/src/compiler/nir/nir.h
> @@ -99,6 +99,7 @@ union nir_constant_data {
>     int i[16];
>     float f[16];
>     bool b[16];
> +   double d[16];
>

See comment below.


>  };
>
>  typedef struct nir_constant {
> @@ -1177,8 +1178,11 @@ nir_tex_instr_src_index(nir_tex_instr *instr,
> nir_tex_src_type type)
>  typedef struct {
>     union {
>        float f[4];
> +      double d[4];
>        int32_t i[4];
>        uint32_t u[4];
> +      int64_t l[4];
> +      uint64_t ul[4];
>

I really don't like l and ul.  Let's just add bit-size suffixes.  If you
don't want the churn, feel free to leave the u, i, and f in place for now.
It's a union so they'll effectively be aliases for u32, i32, and f32.  We
should eventually use only the sized versions but that can be a follow-on.


>     };
>  } nir_const_value;
>
> --
> 2.7.0
>
> _______________________________________________
> 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/20160314/afcaf508/attachment.html>


More information about the mesa-dev mailing list