[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 050/150] meson: generate shader headers
From: |
Paolo Bonzini |
Subject: |
[PATCH 050/150] meson: generate shader headers |
Date: |
Fri, 14 Aug 2020 05:11:46 -0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 19 -------------------
meson.build | 1 +
ui/meson.build | 2 ++
ui/shader/meson.build | 15 +++++++++++++++
4 files changed, 18 insertions(+), 19 deletions(-)
create mode 100644 ui/shader/meson.build
diff --git a/Makefile b/Makefile
index 9abf7be598..0732886563 100644
--- a/Makefile
+++ b/Makefile
@@ -384,7 +384,6 @@ clean: recurse-clean ninja-clean clean-ctlist
rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~
*/*~
rm -f fsdev/*.pod scsi/*.pod
rm -f qemu-img-cmds.h
- rm -f ui/shader/*-vert.h ui/shader/*-frag.h
rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
rm -f config-all-devices.mak
rm -f $(SUBDIR_DEVICES_MAK)
@@ -609,24 +608,6 @@ endif
$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
done
-# 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 56b3dd2979..ad2b0d6478 100644
--- a/meson.build
+++ b/meson.build
@@ -155,6 +155,7 @@ have_block = have_system or have_tools
# Generators
genh = []
+shaderinclude = find_program('scripts/shaderinclude.pl')
qapi_gen = find_program('scripts/qapi-gen.py')
qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py',
meson.source_root() / 'scripts/qapi/commands.py',
diff --git a/ui/meson.build b/ui/meson.build
index a6aa7f2b36..35da0d8d26 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -32,3 +32,5 @@ if have_system
'code-map', '@INPUT0@', e[0], e[1]])
endforeach
endif
+
+subdir('shader')
diff --git a/ui/shader/meson.build b/ui/shader/meson.build
new file mode 100644
index 0000000000..f69e44ed89
--- /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])
+ genh += 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
--
2.26.2
- [PATCH 039/150] meson: add solaris and Haiku libraries, (continued)
- [PATCH 039/150] meson: add solaris and Haiku libraries, Paolo Bonzini, 2020/08/14
- [PATCH 043/150] meson: convert dummy Windows qga/qemu-ga target, Paolo Bonzini, 2020/08/14
- [PATCH 048/150] meson: keymap-gen, Paolo Bonzini, 2020/08/14
- [PATCH 046/150] meson: add qemu-edid, Paolo Bonzini, 2020/08/14
- [PATCH 044/150] meson: add qemu-bridge-helper, Paolo Bonzini, 2020/08/14
- [PATCH 047/150] meson: add virtfs-proxy-helper, Paolo Bonzini, 2020/08/14
- [PATCH 049/150] meson: generate qemu-version.h, Paolo Bonzini, 2020/08/14
- [PATCH 035/150] contrib/vhost-user-gpu: convert to meson, Paolo Bonzini, 2020/08/14
- [PATCH 042/150] meson: add msi generation, Paolo Bonzini, 2020/08/14
- [PATCH 040/150] meson: convert qemu-ga, Paolo Bonzini, 2020/08/14
- [PATCH 050/150] meson: generate shader headers,
Paolo Bonzini <=
- [PATCH 052/150] meson: handle edk2 bios and descriptors, Paolo Bonzini, 2020/08/14
- [PATCH 045/150] meson: add qemu-keymap, Paolo Bonzini, 2020/08/14
- [PATCH 053/150] meson: convert check-decodetree, Paolo Bonzini, 2020/08/14
- [PATCH 054/150] meson: convert tests/fp and check-softfloat, Paolo Bonzini, 2020/08/14
- [PATCH 059/150] meson: convert io directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 057/150] meson: convert authz directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 058/150] meson: convert crypto directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 051/150] meson: generate hxtool files, Paolo Bonzini, 2020/08/14
- [PATCH 055/150] meson: convert check-qapi-schema, Paolo Bonzini, 2020/08/14
- [PATCH 056/150] meson: convert qom directory to Meson (tools part), Paolo Bonzini, 2020/08/14