[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 029/132] meson: generate shader headers
From: |
Paolo Bonzini |
Subject: |
[PATCH 029/132] meson: generate shader headers |
Date: |
Thu, 12 Dec 2019 13:51:13 +0100 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 18 ------------------
meson.build | 1 +
ui/meson.build | 2 ++
ui/shader/meson.build | 15 +++++++++++++++
4 files changed, 18 insertions(+), 18 deletions(-)
create mode 100644 ui/shader/meson.build
diff --git a/Makefile b/Makefile
index 5d0be7b..472962d 100644
--- a/Makefile
+++ b/Makefile
@@ -582,24 +582,6 @@ cscope:
find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed 's,^\./,,' >
"$(SRC_PATH)/cscope.files"
cscope -b -i"$(SRC_PATH)/cscope.files"
-# opengl shader programs
-ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert
$(SRC_PATH)/scripts/shaderinclude.pl
- @mkdir -p $(dir $@)
- $(call quiet-command,\
- perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\
- "VERT","$@")
-
-ui/shader/%-frag.h: $(SRC_PATH)/ui/shader/%.frag
$(SRC_PATH)/scripts/shaderinclude.pl
- @mkdir -p $(dir $@)
- $(call quiet-command,\
- perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\
- "FRAG","$@")
-
-ui/shader.o: $(SRC_PATH)/ui/shader.c \
- ui/shader/texture-blit-vert.h \
- ui/shader/texture-blit-flip-vert.h \
- ui/shader/texture-blit-frag.h
-
# documentation
MAKEINFO=makeinfo
MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D)
diff --git a/meson.build b/meson.build
index 6d4bf27..447a32c 100644
--- a/meson.build
+++ b/meson.build
@@ -113,6 +113,7 @@ have_block = have_system or have_tools
# Generators
+shaderinclude = find_program('scripts/shaderinclude.pl')
qapi_gen = find_program('scripts/qapi-gen.py')
qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/events.py',
meson.source_root() / 'scripts/qapi/introspect.py',
diff --git a/ui/meson.build b/ui/meson.build
index cad9763..8157754 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -32,3 +32,5 @@ foreach e : keymaps
'--varname',
'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
'code-map', '@INPUT0@', e[0], e[1]])
endforeach
+
+subdir('shader')
diff --git a/ui/shader/meson.build b/ui/shader/meson.build
new file mode 100644
index 0000000..26c7a18
--- /dev/null
+++ b/ui/shader/meson.build
@@ -0,0 +1,15 @@
+shaders = [
+ ['texture-blit', 'frag'],
+ ['texture-blit', 'vert'],
+ ['texture-blit-flip', 'vert'],
+]
+
+foreach e : shaders
+ output = '@0@-@1@.h'.format(e[0], e[1])
+ custom_target(output,
+ output: output,
+ capture: true,
+ build_by_default: true, # to be removed when added to a target
+ input: files('@0@.@1@'.format(e[0], e[1])),
+ command: [shaderinclude, '@INPUT0@'])
+endforeach
--
1.8.3.1
- [PATCH 018/132] contrib/ivshmem: convert to meson, (continued)
- [PATCH 018/132] contrib/ivshmem: convert to meson, Paolo Bonzini, 2019/12/12
- [PATCH 019/132] contrib/elf2dmp: convert to meson, Paolo Bonzini, 2019/12/12
- [PATCH 021/132] meson: convert vss-win32, Paolo Bonzini, 2019/12/12
- [PATCH 020/132] meson: convert qemu-ga, Paolo Bonzini, 2019/12/12
- [PATCH 022/132] meson: add msi generation, Paolo Bonzini, 2019/12/12
- [PATCH 023/132] meson: add qemu-bridge-helper, Paolo Bonzini, 2019/12/12
- [PATCH 024/132] meson: add qemu-keymap, Paolo Bonzini, 2019/12/12
- [PATCH 025/132] meson: add qemu-edid, Paolo Bonzini, 2019/12/12
- [PATCH 009/132] libqemuutil: convert to meson, Paolo Bonzini, 2019/12/12
- [PATCH 027/132] meson: keymap-gen, Paolo Bonzini, 2019/12/12
- [PATCH 029/132] meson: generate shader headers,
Paolo Bonzini <=
- [PATCH 026/132] meson: add virtfs-proxy-helper, Paolo Bonzini, 2019/12/12
- [PATCH 028/132] meson: generate qemu-version.h, Paolo Bonzini, 2019/12/12
- [PATCH 030/132] meson: generate hxtool files, Paolo Bonzini, 2019/12/12
- [PATCH 031/132] meson: configure 50-qemu-gpu.json, Paolo Bonzini, 2019/12/12
- [PATCH 032/132] meson: uncompress edk2 bios, Paolo Bonzini, 2019/12/12
- [PATCH 033/132] build-sys hack: link with whole .fa archives, Paolo Bonzini, 2019/12/12
- [PATCH 035/132] meson: convert authz directory to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 034/132] meson: convert qom directory to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 036/132] meson: convert crypto directory to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 037/132] meson: convert io directory to Meson, Paolo Bonzini, 2019/12/12