[Mesa-dev] [PATCH] nir: fix generated nir_intrinsics.c for MSVC
Dylan Baker
dylan at pnwbakers.com
Tue Mar 27 19:02:53 UTC 2018
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Quoting Rob Clark (2018-03-27 11:59:37)
> Apparently it is not happy about things like: .foo = {}
>
> So skip over initializers for empty lists.
>
> Fixes: 76dfed8ae2d5c6c509eb2661389be3c6a25077df
> Reported-by: Roland Scheidegger <sroland at vmware.com>
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
> src/compiler/nir/nir_intrinsics_c.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/compiler/nir/nir_intrinsics_c.py b/src/compiler/nir/nir_intrinsics_c.py
> index 556db785c2b..339214ac53e 100644
> --- a/src/compiler/nir/nir_intrinsics_c.py
> +++ b/src/compiler/nir/nir_intrinsics_c.py
> @@ -29,18 +29,22 @@ const nir_intrinsic_info nir_intrinsic_infos[nir_num_intrinsics] = {
> {
> .name = "${name}",
> .num_srcs = ${opcode.num_srcs},
> +% if opcode.src_components:
> .src_components = {
> ${", ".join(str(comp) for comp in opcode.src_components)}
> },
> +% endif
> .has_dest = ${"true" if opcode.has_dest else "false"},
> .dest_components = ${opcode.dest_components},
> .num_variables = ${opcode.num_variables},
> .num_indices = ${opcode.num_indices},
> +% if opcode.indices:
> .index_map = {
> % for i in range(len(opcode.indices)):
> [${opcode.indices[i]}] = ${i + 1},
> % endfor
> },
> +% endif
> .flags = ${"0" if len(opcode.flags) == 0 else " | ".join(opcode.flags)},
> },
> % endfor
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180327/279ff1f6/attachment.sig>
More information about the mesa-dev
mailing list