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)
'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],
)
--- /dev/null
+// 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
+