diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:49:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:49:04 +0000 |
commit | 16f504a9dca3fe3b70568f67b7d41241ae485288 (patch) | |
tree | c60f36ada0496ba928b7161059ba5ab1ab224f9d /src/libs/dxvk-native-1.9.2a/Makefile.kmk | |
parent | Initial commit. (diff) | |
download | virtualbox-16f504a9dca3fe3b70568f67b7d41241ae485288.tar.xz virtualbox-16f504a9dca3fe3b70568f67b7d41241ae485288.zip |
Adding upstream version 7.0.6-dfsg.upstream/7.0.6-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libs/dxvk-native-1.9.2a/Makefile.kmk')
-rw-r--r-- | src/libs/dxvk-native-1.9.2a/Makefile.kmk | 388 |
1 files changed, 388 insertions, 0 deletions
diff --git a/src/libs/dxvk-native-1.9.2a/Makefile.kmk b/src/libs/dxvk-native-1.9.2a/Makefile.kmk new file mode 100644 index 00000000..fd4953b8 --- /dev/null +++ b/src/libs/dxvk-native-1.9.2a/Makefile.kmk @@ -0,0 +1,388 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for the dxvk-native library. +# + +# +# Copyright (C) 2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <https://www.gnu.org/licenses>. +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../.. +include $(KBUILD_PATH)/subheader.kmk + +# +# Targets. +# +LIBRARIES += VBox-DxVkNativeUtil VBox-DxVkNativeDxVk VBox-DxVkNativeD3D11 +DLLS += VBoxDxVk + +# +# Globals. +# +VBOX_PATH_DXVK := $(PATH_SUB_CURRENT) + +# The HLSL to Spir-V shader compiler +VBOX_GLSLANGVALIDATOR_PATH ?= $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/glslang/v11*))) +ifeq ($(VBOX_GLSLANGVALIDATOR_PATH),) + VBOX_GLSLANGVALIDATOR ?= glslangValidator$(HOSTSUFF_EXE) +else + VBOX_GLSLANGVALIDATOR ?= $(VBOX_GLSLANGVALIDATOR_PATH)/glslangValidator$(HOSTSUFF_EXE) +endif + +# +# Some stuff for compiling shares into header files and making the target depend on these. +# + +## Internal. +## @param 1 full path to shader source. +define def_VBoxDxVkCompileShader +$(1)/shaders/$(basename $(notdir $(2))).h: $(2) | $$$$(dir $$$$@) + $(VBOX_GLSLANGVALIDATOR) -V --vn "$(basename $(notdir $(2)))" "$$<" -o "$$@" +endef + +## Process the VBOX_SHADERS for a target. +## @param 1 target name +define def_VBoxDxVkCompilerShaders +$$(call KB_FN_DO_PASS0_ON_TARGET,$(1)) +$(1)_INCS += $$($(1)_0_OUTDIR)/shaders +$(1)_BLDDIRS += $$($(1)_0_OUTDIR)/shaders +$(1)_INTERMEDIATES := $$(foreach shader,$$($(1)_VBOX_SHADERS) \ + ,$$($(1)_0_OUTDIR)/shaders/$$(basename $$(notdir $$(shader))).h) +$$(foreach shader,$$($(1)_VBOX_SHADERS),$$(evalcall2 def_VBoxDxVkCompileShader,$$($(1)_0_OUTDIR),$$(shader))) +endef + + +# +# DXK utilities static library +# +VBox-DxVkNativeUtil_TEMPLATE = VBoxR3RuntimeDllNonPedantic +VBox-DxVkNativeUtil_DEFS = \ + DXVK_NATIVE \ + NOMINMAX \ + _WIN32_WINNT=0xa00 +VBox-DxVkNativeUtil_DEFS += \ + DXVK_PLATFORM_LINUX \ + DXVK_WSI_HEADLESS +VBox-DxVkNativeUtil_CXXFLAGS.linux += \ + -std=c++17 +VBox-DxVkNativeUtil_CXXFLAGS.darwin += \ + -std=c++17 +VBox-DxVkNativeUtil_INCS = \ + $(VBOX_PATH_DXVK) \ + $(VBOX_PATH_DXVK)/include/ \ + $(VBOX_PATH_DXVK)/src/util/ \ + $(VBOX_PATH_DXVK)/include/native/ \ + $(VBOX_PATH_DXVK)/include/native/windows \ + $(VBOX_PATH_DXVK)/include/native/directx +VBox-DxVkNativeUtil_SOURCES = \ + src/util/util_env.cpp \ + src/util/util_fps_limiter.cpp \ + src/util/util_matrix.cpp \ + src/util/util_monitor.cpp \ + src/util/com/com_guid.cpp \ + src/util/com/com_private_data.cpp \ + src/util/config/config.cpp \ + src/util/log/log.cpp \ + src/util/log/log_debug.cpp \ + src/util/sha1/sha1.c \ + src/util/sha1/sha1_util.cpp \ + src/util/sync/sync_recursive.cpp \ + src/util/platform/util_luid_linux.cpp \ + src/util/platform/util_env_linux.cpp \ + src/util/platform/util_string_linux.cpp \ + src/util/platform/thread_native.cpp \ + src/spirv/spirv_code_buffer.cpp \ + src/spirv/spirv_compression.cpp \ + src/spirv/spirv_module.cpp \ + src/vulkan/vulkan_loader.cpp \ + src/vulkan/vulkan_names.cpp \ + src/vulkan/vulkan_presenter_headless.cpp \ + src/dxgi/dxgi_adapter.cpp \ + src/dxgi/dxgi_enums.cpp \ + src/dxgi/dxgi_factory.cpp \ + src/dxgi/dxgi_format.cpp \ + src/dxgi/dxgi_main.cpp \ + src/dxgi/dxgi_monitor.cpp \ + src/dxgi/dxgi_options.cpp \ + src/dxgi/dxgi_output.cpp \ + src/dxgi/dxgi_swapchain.cpp \ + src/dxbc/dxbc_analysis.cpp \ + src/dxbc/dxbc_chunk_isgn.cpp \ + src/dxbc/dxbc_chunk_shex.cpp \ + src/dxbc/dxbc_common.cpp \ + src/dxbc/dxbc_compiler.cpp \ + src/dxbc/dxbc_defs.cpp \ + src/dxbc/dxbc_decoder.cpp \ + src/dxbc/dxbc_header.cpp \ + src/dxbc/dxbc_module.cpp \ + src/dxbc/dxbc_names.cpp \ + src/dxbc/dxbc_options.cpp \ + src/dxbc/dxbc_reader.cpp \ + src/dxbc/dxbc_util.cpp \ + src/dxso/dxso_common.cpp \ + src/dxso/dxso_options.cpp \ + src/dxso/dxso_module.cpp \ + src/dxso/dxso_reader.cpp \ + src/dxso/dxso_header.cpp \ + src/dxso/dxso_ctab.cpp \ + src/dxso/dxso_util.cpp \ + src/dxso/dxso_code.cpp \ + src/dxso/dxso_tables.cpp \ + src/dxso/dxso_decoder.cpp \ + src/dxso/dxso_analysis.cpp \ + src/dxso/dxso_compiler.cpp \ + src/dxso/dxso_enums.cpp \ + src/wsi/headless/wsi_mode_headless.cpp \ + src/wsi/headless/wsi_monitor_headless.cpp \ + src/wsi/headless/wsi_presenter_headless.cpp \ + src/wsi/headless/wsi_window_headless.cpp + +# +# Core DXVK library. +# +VBox-DxVkNativeDxVk_TEMPLATE = VBoxR3RuntimeDllNonPedantic +VBox-DxVkNativeDxVk_DEFS = \ + DXVK_NATIVE \ + NOMINMAX \ + _WIN32_WINNT=0xa00 +VBox-DxVkNativeDxVk_DEFS += \ + DXVK_PLATFORM_LINUX \ + DXVK_WSI_HEADLESS +VBox-DxVkNativeDxVk_CXXFLAGS.linux += \ + -std=c++17 +VBox-DxVkNativeDxVk_CXXFLAGS.darwin += \ + -std=c++17 +VBox-DxVkNativeDxVk_INCS = \ + $(VBOX_PATH_DXVK) \ + $(VBOX_PATH_DXVK)/include/ \ + $(VBOX_PATH_DXVK)/src/util/ \ + $(VBOX_PATH_DXVK)/include/native/ \ + $(VBOX_PATH_DXVK)/include/native/windows \ + $(VBOX_PATH_DXVK)/include/native/directx +VBox-DxVkNativeDxVk_SOURCES = \ + src/dxvk/dxvk_adapter.cpp \ + src/dxvk/dxvk_barrier.cpp \ + src/dxvk/dxvk_buffer.cpp \ + src/dxvk/dxvk_cmdlist.cpp \ + src/dxvk/dxvk_compute.cpp \ + src/dxvk/dxvk_context.cpp \ + src/dxvk/dxvk_cs.cpp \ + src/dxvk/dxvk_data.cpp \ + src/dxvk/dxvk_descriptor.cpp \ + src/dxvk/dxvk_device.cpp \ + src/dxvk/dxvk_device_filter.cpp \ + src/dxvk/dxvk_extensions.cpp \ + src/dxvk/dxvk_format.cpp \ + src/dxvk/dxvk_framebuffer.cpp \ + src/dxvk/dxvk_gpu_event.cpp \ + src/dxvk/dxvk_gpu_query.cpp \ + src/dxvk/dxvk_graphics.cpp \ + src/dxvk/dxvk_image.cpp \ + src/dxvk/dxvk_instance.cpp \ + src/dxvk/dxvk_lifetime.cpp \ + src/dxvk/dxvk_main.cpp \ + src/dxvk/dxvk_memory.cpp \ + src/dxvk/dxvk_meta_blit.cpp \ + src/dxvk/dxvk_meta_clear.cpp \ + src/dxvk/dxvk_meta_copy.cpp \ + src/dxvk/dxvk_meta_mipgen.cpp \ + src/dxvk/dxvk_meta_pack.cpp \ + src/dxvk/dxvk_meta_resolve.cpp \ + src/dxvk/dxvk_options.cpp \ + src/dxvk/dxvk_pipecache.cpp \ + src/dxvk/dxvk_pipelayout.cpp \ + src/dxvk/dxvk_pipemanager.cpp \ + src/dxvk/dxvk_queue.cpp \ + src/dxvk/dxvk_renderpass.cpp \ + src/dxvk/dxvk_resource.cpp \ + src/dxvk/dxvk_sampler.cpp \ + src/dxvk/dxvk_shader.cpp \ + src/dxvk/dxvk_shader_key.cpp \ + src/dxvk/dxvk_signal.cpp \ + src/dxvk/dxvk_spec_const.cpp \ + src/dxvk/dxvk_staging.cpp \ + src/dxvk/dxvk_state_cache.cpp \ + src/dxvk/dxvk_stats.cpp \ + src/dxvk/dxvk_swapchain_blitter.cpp \ + src/dxvk/dxvk_unbound.cpp \ + src/dxvk/dxvk_util.cpp \ + src/dxvk/hud/dxvk_hud.cpp \ + src/dxvk/hud/dxvk_hud_font.cpp \ + src/dxvk/hud/dxvk_hud_item.cpp \ + src/dxvk/hud/dxvk_hud_renderer.cpp \ + src/dxvk/platform/dxvk_headless_exts.cpp +VBox-DxVkNativeDxVk_VBOX_SHADERS := \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_blit_frag_1d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_blit_frag_2d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_blit_frag_3d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_buffer_f.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_buffer_u.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image1d_f.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image1d_u.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image1darr_f.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image1darr_u.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image2d_f.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image2d_u.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image2darr_f.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image2darr_u.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image3d_f.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_clear_image3d_u.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_buffer_image.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_color_1d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_color_2d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_color_ms.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_depth_1d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_depth_2d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_depth_ms.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_depth_stencil_1d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_depth_stencil_2d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_copy_depth_stencil_ms.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_fullscreen_geom.geom \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_fullscreen_layer_vert.vert \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_fullscreen_vert.vert \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_pack_d24s8.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_pack_d32s8.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_present_frag.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_present_frag_blit.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_present_frag_ms.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_present_frag_ms_amd.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_present_vert.vert \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_resolve_frag_d.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_resolve_frag_ds.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_resolve_frag_f.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_resolve_frag_f_amd.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_resolve_frag_i.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_resolve_frag_u.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_unpack_d24s8.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_unpack_d24s8_as_d32s8.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/shaders/dxvk_unpack_d32s8.comp \ + $(PATH_SUB_CURRENT)/src/dxvk/hud/shaders/hud_line_frag.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/hud/shaders/hud_line_vert.vert \ + $(PATH_SUB_CURRENT)/src/dxvk/hud/shaders/hud_text_frag.frag \ + $(PATH_SUB_CURRENT)/src/dxvk/hud/shaders/hud_text_vert.vert +$(evalcall2 def_VBoxDxVkCompilerShaders,VBox-DxVkNativeDxVk) + + +# +# DXVK D3D11 interface library +# +VBox-DxVkNativeD3D11_TEMPLATE = VBoxR3RuntimeDllNonPedantic +VBox-DxVkNativeD3D11_DEFS = \ + DXVK_NATIVE \ + NOMINMAX \ + _WIN32_WINNT=0xa00 +VBox-DxVkNativeD3D11_DEFS += \ + DXVK_PLATFORM_LINUX \ + DXVK_WSI_HEADLESS +VBox-DxVkNativeD3D11_CXXFLAGS.linux += \ + -std=c++17 +VBox-DxVkNativeD3D11_CXXFLAGS.darwin += \ + -std=c++17 +VBox-DxVkNativeD3D11_INCS = \ + $(VBOX_PATH_DXVK) \ + $(VBOX_PATH_DXVK)/include/ \ + $(VBOX_PATH_DXVK)/src/util/ \ + $(VBOX_PATH_DXVK)/include/native/ \ + $(VBOX_PATH_DXVK)/include/native/windows \ + $(VBOX_PATH_DXVK)/include/native/directx +VBox-DxVkNativeD3D11_SOURCES = \ + src/dxgi/dxgi_format.cpp \ + src/dxgi/dxgi_monitor.cpp \ + src/dxgi/dxgi_swapchain.cpp \ + src/d3d11/d3d11_annotation.cpp \ + src/d3d11/d3d11_blend.cpp \ + src/d3d11/d3d11_buffer.cpp \ + src/d3d11/d3d11_class_linkage.cpp \ + src/d3d11/d3d11_cmdlist.cpp \ + src/d3d11/d3d11_context.cpp \ + src/d3d11/d3d11_context_def.cpp \ + src/d3d11/d3d11_context_ext.cpp \ + src/d3d11/d3d11_context_imm.cpp \ + src/d3d11/d3d11_cuda.cpp \ + src/d3d11/d3d11_depth_stencil.cpp \ + src/d3d11/d3d11_device.cpp \ + src/d3d11/d3d11_enums.cpp \ + src/d3d11/d3d11_initializer.cpp \ + src/d3d11/d3d11_input_layout.cpp \ + src/d3d11/d3d11_interop.cpp \ + src/d3d11/d3d11_main.cpp \ + src/d3d11/d3d11_options.cpp \ + src/d3d11/d3d11_query.cpp \ + src/d3d11/d3d11_rasterizer.cpp \ + src/d3d11/d3d11_resource.cpp \ + src/d3d11/d3d11_sampler.cpp \ + src/d3d11/d3d11_shader.cpp \ + src/d3d11/d3d11_state.cpp \ + src/d3d11/d3d11_state_object.cpp \ + src/d3d11/d3d11_swapchain.cpp \ + src/d3d11/d3d11_texture.cpp \ + src/d3d11/d3d11_util.cpp \ + src/d3d11/d3d11_video.cpp \ + src/d3d11/d3d11_view_dsv.cpp \ + src/d3d11/d3d11_view_rtv.cpp \ + src/d3d11/d3d11_view_srv.cpp \ + src/d3d11/d3d11_view_uav.cpp \ + src/d3d10/d3d10_blend.cpp \ + src/d3d10/d3d10_buffer.cpp \ + src/d3d10/d3d10_depth_stencil.cpp \ + src/d3d10/d3d10_device.cpp \ + src/d3d10/d3d10_input_layout.cpp \ + src/d3d10/d3d10_multithread.cpp \ + src/d3d10/d3d10_query.cpp \ + src/d3d10/d3d10_rasterizer.cpp \ + src/d3d10/d3d10_sampler.cpp \ + src/d3d10/d3d10_texture.cpp \ + src/d3d10/d3d10_util.cpp \ + src/d3d10/d3d10_view_dsv.cpp \ + src/d3d10/d3d10_view_rtv.cpp \ + src/d3d10/d3d10_view_srv.cpp +VBox-DxVkNativeD3D11_VBOX_SHADERS := \ + $(PATH_SUB_CURRENT)/src/d3d11/shaders/d3d11_video_blit_frag.frag \ + $(PATH_SUB_CURRENT)/src/d3d11/shaders/d3d11_video_blit_vert.vert +$(evalcall2 def_VBoxDxVkCompilerShaders,VBox-DxVkNativeD3D11) + +# +# VBoxDxVk - Shared Object / DLL version. +# +VBoxDxVk_TEMPLATE = VBoxR3DllNonPedantic +VBoxDxVk_DEFS = \ + DXVK_NATIVE \ + NOMINMAX \ + _WIN32_WINNT=0xa00 +VBoxDxVk_INCS = \ + $(VBOX_PATH_DXVK) \ + $(VBOX_PATH_DXVK)/include/ \ + $(VBOX_PATH_DXVK)/src/util/ \ + $(VBOX_PATH_DXVK)/include/native/ \ + $(VBOX_PATH_DXVK)/include/native/windows \ + $(VBOX_PATH_DXVK)/include/native/directx +VBoxDxVk_CXXFLAGS.linux += \ + -std=c++17 +VBoxDxVk_SOURCES = \ + VBoxDxVkDeps.cpp +VBoxDxVk_LIBS = \ + $(PATH_STAGE_LIB)/VBox-DxVkNativeD3D11$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/VBox-DxVkNativeDxVk$(VBOX_SUFF_LIB) \ + $(PATH_STAGE_LIB)/VBox-DxVkNativeUtil$(VBOX_SUFF_LIB) \ + $(LIB_RUNTIME) + +include $(FILE_KBUILD_SUB_FOOTER) + |