diff options
author | Gert Wollny <[email protected]> | 2019-04-10 14:03:00 +0200 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2019-06-20 08:50:37 +0200 |
commit | cf800998af2b3d57beff972d7e154db6d0944b21 (patch) | |
tree | 7e267c6e3d5602d8a5bff002881a45497db776ae /src | |
parent | 9b0720c436b208b410a42f0026a5b3f90af7cfad (diff) |
virgl: Add driinfo file and tie it into the build
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/virgl/Android.mk | 11 | ||||
-rw-r--r-- | src/gallium/drivers/virgl/meson.build | 16 | ||||
-rw-r--r-- | src/gallium/drivers/virgl/virgl_driinfo.h.in | 11 |
3 files changed, 36 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/Android.mk b/src/gallium/drivers/virgl/Android.mk index 0067dfa702e..577e5eab904 100644 --- a/src/gallium/drivers/virgl/Android.mk +++ b/src/gallium/drivers/virgl/Android.mk @@ -33,6 +33,17 @@ LOCAL_MODULE := libmesa_pipe_virgl include $(GALLIUM_COMMON_MK) include $(BUILD_STATIC_LIBRARY) +GEN_DRIINFO_INPUTS := \ + $(MESA_TOP)/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h \ + $(LOCAL_PATH)/virgl_driinfo.h.in + +MERGE_DRIINFO := $(MESA_TOP)/src/util/merge_driinfo.py + +$(intermediates)/virgl/virgl_driinfo.h: $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS) + @mkdir -p $(dir $@) + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) $(MESA_PYTHON2) $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS) > $@ || ($(RM) $@; false) + ifneq ($(HAVE_GALLIUM_VIRGL),) GALLIUM_TARGET_DRIVERS += virtio_gpu $(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_virgl libmesa_winsys_virgl_vtest) diff --git a/src/gallium/drivers/virgl/meson.build b/src/gallium/drivers/virgl/meson.build index 289203d0459..62e8155b66b 100644 --- a/src/gallium/drivers/virgl/meson.build +++ b/src/gallium/drivers/virgl/meson.build @@ -31,15 +31,27 @@ files_libvirgl = files( 'virgl_tgsi.c', ) +virgl_driinfo_h = custom_target( + 'virgl_driinfo.h', + input : files( + '../../../util/merge_driinfo.py', + '../../auxiliary/pipe-loader/driinfo_gallium.h', 'virgl_driinfo.h.in' + ), + output : 'virgl_driinfo.h', + command : [prog_python, '@INPUT@'], + capture : true, +) + libvirgl = static_library( 'virgl', - files_libvirgl, + [ files_libvirgl, virgl_driinfo_h ], c_args : c_vis_args, include_directories : inc_common, - dependencies : dep_libdrm, + dependencies : dep_libdrm ) driver_virgl = declare_dependency( + sources : virgl_driinfo_h, compile_args : '-DGALLIUM_VIRGL', link_with : [libvirgl, libvirgldrm, libvirglvtest], ) diff --git a/src/gallium/drivers/virgl/virgl_driinfo.h.in b/src/gallium/drivers/virgl/virgl_driinfo.h.in new file mode 100644 index 00000000000..626e21c3648 --- /dev/null +++ b/src/gallium/drivers/virgl/virgl_driinfo.h.in @@ -0,0 +1,11 @@ +// DriConf options specific to virgl +// To add a new tweak: +// 1. Define the tweak in util/xmlpool/t_options.h and also add +// the tweak name as define to virgl_protocol.h +// 2. Add the tweak here with the appropriated default value +// 3. Add the code to query the tweak in virgl_create_screen +// 4. Add the code to send the tweek to the host in virgl_send_tweaks +// 5. Implement the tweak in virglrenderer +DRI_CONF_SECTION_MISCELLANEOUS +DRI_CONF_SECTION_END + |