VirtualBox

source: vbox/trunk/src/VBox/Additions/3D/Config.kmk@ 75443

Last change on this file since 75443 was 75443, checked in by vboxsync, 6 years ago

Exported Mesa related code to OSE.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1# $Id: Config.kmk 75443 2018-11-14 10:17:08Z vboxsync $
2## @file
3# kBuild Configuration file for the Mesa3D.
4#
5
6#
7# Copyright (C) 2016-2018 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18VBOX_MESA3D_CONFIG_KMK_INCLUDED := 1
19
20# Include the top-level configure file.
21ifndef VBOX_ROOT_CONFIG_KMK_INCLUDED
22 include $(PATH_ROOT)/Config.kmk
23endif
24
25VBOX_MESA := mesa-17.3.9
26VBOX_PATH_3D := $(PATH_ROOT)/src/VBox/Additions/3D
27VBOX_PATH_MESA := $(PATH_ROOT)/src/VBox/Additions/3D/mesa/$(VBOX_MESA)
28VBOX_PATH_WDDM := $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video
29VBOX_PATH_VMSVGA_INC := $(VBOX_PATH_MESA)/src/gallium/drivers/svga/include
30
31#
32# Base template for Mesa3D code and code which uses Mesa3D libraries.
33#
34TEMPLATE_VBOXMESA3DGUESTR3DLL = VBox Mesa 3D Guest User Mode DLL
35TEMPLATE_VBOXMESA3DGUESTR3DLL_EXTENDS = NewerVccVBoxGuestR3Dll
36TEMPLATE_VBOXMESA3DGUESTR3DLL_INST = $(INST_ADDITIONS_LIB)
37TEMPLATE_VBOXMESA3DGUESTR3DLL_DEFS = $(TEMPLATE_NewerVccVBoxGuestR3Dll_DEFS) \
38 VBOX_WITH_MESA3D
39TEMPLATE_VBOXMESA3DGUESTR3DLL_SDKS.win = $(TEMPLATE_NewerVccVBoxGuestR3Dll_SDKS) \
40 $(VBOX_WINDDK_GST_W8)
41
42# VirtualBox specific modifications of the Mesa3D code.
43# All modified places can be found by searching for VBOX
44#
45# Each define represents a group of related modifications.
46# The purpose of the separation is to document why each modification was necessary.
47#
48# Modifications which would be nice to have in upstream Mesa code are marked with '*' here.
49#
50# VBOX Modifications in headers shared with VBox WDDM driver code (see comments).
51# VBOX_WITH_MESA3D_COMPILE Tweaks to compile Mesa as part of VBox WDDM.
52# VBOX_WITH_MESA3D_D3D_FROM_SYSTEMMEM Create D3DPOOL_SYSTEMMEM textures from provided system memory pointer.
53# VBOX_WITH_MESA3D_D3D_THREADPOOL (No) threadpool for VBox build.
54# VBOX_WITH_MESA3D_DBG Tweaks for easier debugging and better logging.
55# VBOX_WITH_MESA3D_HACKS Hacks to make it work (need a proper solutions).
56# *VBOX_WITH_MESA3D_MSC Tweaks for Microsoft VCC.
57# VBOX_WITH_MESA3D_NINE_SVGA Make the D3D state tracker to work together with VMSVGA.
58# VBOX_WITH_MESA3D_SVGA_GPU_FINISHED PIPE_QUERY_GPU_FINISHED in VMSVGA driver.
59# VBOX_WITH_MESA3D_SVGA_HALFZ D3D Z coord [0.0;1.0] in the Gallium SVGA driver (VGPU9 only).
60# VBOX_WITH_MESA3D_SVGA_INSTANCING Instancing for DrawPrimitives in the Gallium SVGA driver
61# (VGPU9 only, VGPU10 has it).
62TEMPLATE_VBOXMESA3DGUESTR3DLL_DEFS += \
63 VBOX_WITH_MESA3D_COMPILE \
64 VBOX_WITH_MESA3D_D3D_FROM_SYSTEMMEM \
65 VBOX_WITH_MESA3D_D3D_THREADPOOL \
66 VBOX_WITH_MESA3D_DBG \
67 VBOX_WITH_MESA3D_HACKS \
68 VBOX_WITH_MESA3D_MSC \
69 VBOX_WITH_MESA3D_NINE_SVGA \
70 VBOX_WITH_MESA3D_SVGA_GPU_FINISHED \
71 VBOX_WITH_MESA3D_SVGA_HALFZ \
72 VBOX_WITH_MESA3D_SVGA_INSTANCING
73
74TEMPLATE_VBOXMESA3DGUESTR3DLL_DEFS.win = $(TEMPLATE_NewerVccVBoxGuestR3Dll_DEFS.win) \
75 _USE_MATH_DEFINES \
76 WINAPI=__stdcall \
77 _WIN32
78
79TEMPLATE_VBOXMESA3DGUESTR3DLL_INCS = $(TEMPLATE_NewerVccVBoxGuestR3Dll_INCS) \
80 $(VBOX_PATH_MESA)/include \
81 $(VBOX_PATH_MESA)/include/c99 \
82 $(VBOX_PATH_MESA)/src \
83 $(VBOX_PATH_MESA)/src/mesa \
84 $(VBOX_PATH_MESA)/src/gallium/auxiliary \
85 $(VBOX_PATH_MESA)/src/gallium/include \
86 $(VBOX_PATH_3D)/win/VBoxWddmUmHlp
87
88#
89# Variant of VBOXMESA3DGUESTR3DLL that requires Windows Vista or later.
90#
91TEMPLATE_VBOXMESA3DGUESTR3DLLMinVista = VBox Mesa 3D Guest User Mode DLL (Windows Vista or newer)
92TEMPLATE_VBOXMESA3DGUESTR3DLLMinVista_EXTENDS = VBOXMESA3DGUESTR3DLL
93ifeq ($(KBUILD_TARGET),win)
94 TEMPLATE_VBOXMESA3DGUESTR3DLLMinVista_LDFLAGS.win.x86 = $(filter-out -Section:.bss$(COMMA)RW!K,$(TEMPLATE_VBOXMESA3DGUESTR3DLL_LDFLAGS.win.x86))
95 TEMPLATE_VBOXMESA3DGUESTR3DLLMinVista_POST_CMDS.win.x86 = $(subst $(VBOX_PE_SET_VERSION), $(VBOX_PE_SET_VERSION) --vista,$(TEMPLATE_VBOXMESA3DGUESTR3DLL_POST_CMDS.win.x86))
96 TEMPLATE_VBOXMESA3DGUESTR3DLLMinVista_POST_CMDS.win.amd64 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION) --vista $(out)$$(NLTAB)$(TEMPLATE_VBOXMESA3DGUESTR3DLL_POST_CMDS.win.amd64))
97 TEMPLATE_VBOXMESA3DGUESTR3DLLMinVista_LNK_DEPS.win.amd64 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION)) $(TEMPLATE_VBOXMESA3DGUESTR3DLL_LNK_DEPS.win.amd64)
98endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette