virgl: Add driinfo file and tie it into the build

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This commit is contained in:
Gert Wollny 2019-04-10 14:03:00 +02:00
parent 9b0720c436
commit cf800998af
3 changed files with 36 additions and 2 deletions

View file

@ -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)

View file

@ -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],
)

View file

@ -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