nir: Add missing dependency on nir_opcodes.py
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 16 Feb 2022 22:02:16 +0000 (14:02 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 17 Feb 2022 22:57:33 +0000 (22:57 +0000)
Commit 38800b38 changed nir_opcodes.py, but that doesn't seem to have
triggered nir_opt_algebraic.py.  The change in 75ef5991 depends on
opt_algebraic lowering 16-bit versions of slt, but if opt_algebraic is
not rebuilt, this may not happen.  This resulted in some people seeing
assertion failures in, for example,
dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic_3.step,
due to the backend seeing nir_op_slt that it didn't know how to handle.

v2: Add nir_opcodes.py to nir_algebraic_py so that all the per-driver
algebraic passes pick up the dependency too.  Rename it to
nir_algebraic_depends.  Suggested by Emma.

Closes: #6047
Fixes: d1992255bb2 ("meson: Add build Intel "anv" vulkan driver")
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15050>

src/compiler/nir/meson.build
src/freedreno/ir3/meson.build
src/gallium/drivers/lima/meson.build
src/gallium/drivers/r300/meson.build
src/gallium/drivers/zink/meson.build
src/intel/compiler/meson.build
src/microsoft/compiler/meson.build
src/panfrost/bifrost/meson.build
src/panfrost/midgard/meson.build

index 96d0c7f..c91c44a 100644 (file)
@@ -20,6 +20,8 @@
 
 nir_depends = files('nir_opcodes.py', 'nir_intrinsics.py')
 
+nir_algebraic_depends = files('nir_opcodes.py', 'nir_algebraic.py')
+
 nir_builder_opcodes_h = custom_target(
   'nir_builder_opcodes.h',
   input : 'nir_builder_opcodes_h.py',
@@ -62,7 +64,7 @@ nir_opt_algebraic_c = custom_target(
   output : 'nir_opt_algebraic.c',
   command : [prog_python, '@INPUT@'],
   capture : true,
-  depend_files : files('nir_algebraic.py'),
+  depend_files : nir_algebraic_depends,
 )
 
 nir_intrinsics_h = custom_target(
@@ -372,8 +374,6 @@ idep_nir = declare_dependency(
   link_with : _libnir,
 )
 
-nir_algebraic_py = files('nir_algebraic.py')
-
 if with_tests
   test(
     'nir_tests',
index 55f5ad0..23ac832 100644 (file)
@@ -27,7 +27,7 @@ ir3_nir_trig_c = custom_target(
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   capture : true,
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
 )
 
 ir3_nir_imul_c = custom_target(
@@ -39,7 +39,7 @@ ir3_nir_imul_c = custom_target(
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   capture : true,
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
 )
 
 ir3_parser = custom_target(
index c7b9a8b..6810c36 100644 (file)
@@ -93,7 +93,7 @@ lima_nir_algebraic_c = custom_target(
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   capture : true,
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
 )
 
 liblima = static_library(
index bb43789..f3423a1 100644 (file)
@@ -125,7 +125,7 @@ r300_nir_algebraic_c = custom_target(
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
     '@OUTPUT@',
   ],
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
 )
 
 libr300 = static_library(
index 80f5612..d4be88f 100644 (file)
@@ -71,7 +71,7 @@ zink_nir_algebraic_c = custom_target(
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   capture : true,
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
 )
 
 zink_c_args = []
index 8c3d55e..3a04973 100644 (file)
@@ -148,7 +148,7 @@ brw_nir_trig = custom_target(
     prog_python, '@INPUT@',
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
   capture : true,
 )
 
index 78e4792..a04fe87 100644 (file)
@@ -42,7 +42,7 @@ dxil_nir_algebraic_c = custom_target(
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   capture : true,
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
 )
 
 libdxil_compiler = static_library(
index 48ff023..1dcd9b5 100644 (file)
@@ -117,7 +117,7 @@ bifrost_nir_algebraic_c = custom_target(
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   capture : true,
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
 )
 
 libpanfrost_bifrost_disasm = static_library(
index 446ad52..64c584c 100644 (file)
@@ -52,7 +52,7 @@ midgard_nir_algebraic_c = custom_target(
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   capture : true,
-  depend_files : nir_algebraic_py,
+  depend_files : nir_algebraic_depends,
 )
 
 libpanfrost_midgard_disasm = static_library(