Mesa (main): meson: add missing custom target to generate shader_replacement.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 31 18:48:40 UTC 2021


Module: Mesa
Branch: main
Commit: 805c6a37b827cd1741da30bdb1644cd7a9722bcd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=805c6a37b827cd1741da30bdb1644cd7a9722bcd

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Aug 20 16:27:03 2021 -0400

meson: add missing custom target to generate shader_replacement.h

for custom shader replacements enabled by -Dcustom-shader-replacement=path.
process_shaders.py should generate shader_replacement.h, which should
contain shaders and their substitutions.

Loosely based on Pierre-Eric's commit.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12492>

---

 src/mesa/main/meson.build | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/mesa/main/meson.build b/src/mesa/main/meson.build
index a5f0e02c6cd..a4637597159 100644
--- a/src/mesa/main/meson.build
+++ b/src/mesa/main/meson.build
@@ -44,3 +44,14 @@ main_remap_helper_h = custom_target(
   depend_files : glapi_gen_depends,
   capture : true,
 )
+
+if _shader_replacement != ''
+  # shader replacement
+  shader_replacement_h = custom_target(
+    'shader_replacement.h',
+    input: [files(_shader_replacement + '/process_shaders.py')],
+    output: 'shader_replacement.h',
+    command: [prog_python, '@INPUT0@', _shader_replacement, '@OUTPUT@'],
+    build_always: true,
+  )
+endif



More information about the mesa-commit mailing list