Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a precompiled header in dxvk and d3d9 subprojects #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/d3d9/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ d3d9_src = [
'd3d9_swapchain_external.cpp',
]

d3d9_pch = [
'pch/d3d9_pch.h',
]

d3d9_dll = shared_library('d3d9', d3d9_src, dxvk_version, glsl_generator.process(d3d9_shaders), d3d9_res,
name_prefix : '',
link_with : [ util_lib ],
Expand All @@ -99,7 +103,8 @@ d3d9_dll = shared_library('d3d9', d3d9_src, dxvk_version, glsl_generator.process
install : true,
objects : not dxvk_is_msvc ? 'd3d9' + def_spec_ext : [],
vs_module_defs : 'd3d9'+def_spec_ext,
override_options : ['cpp_std='+dxvk_cpp_std])
override_options : ['cpp_std='+dxvk_cpp_std],
cpp_pch : d3d9_pch)

d3d9_dep = declare_dependency(
link_with : [ d3d9_dll ],
Expand Down
1 change: 1 addition & 0 deletions src/d3d9/pch/d3d9_pch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "../dxvk/dxvk_device.h"
7 changes: 6 additions & 1 deletion src/dxvk/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ dxvk_src = files([
'imgui/implot_items.cpp',
])

dxvk_pch = [
'pch/dxvk_pch.h',
]

thread_dep = dependency('threads')

nrd_include_dir = include_directories(join_paths('../../', 'external/nrd/Include'))
Expand Down Expand Up @@ -434,7 +438,8 @@ dxvk_lib = static_library('dxvk', dxvk_src, dxvk_version, [generated_dxvk_shader
link_with : [ util_lib, spirv_lib ],
dependencies : [ dxvk_deps ],
include_directories : [ dxvk_include_path, dxvk_shader_include_path, rtxdi_include_path, remix_api_include_path ],
override_options : ['cpp_std='+dxvk_cpp_std])
override_options : ['cpp_std='+dxvk_cpp_std],
cpp_pch : dxvk_pch)

dxvk_dep = declare_dependency(
link_with : [ dxvk_lib ],
Expand Down
1 change: 1 addition & 0 deletions src/dxvk/pch/dxvk_pch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "dxvk_device.h"
2 changes: 2 additions & 0 deletions src/dxvk/rtx_render/rtx_ngx_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
* DEALINGS IN THE SOFTWARE.
*/

#ifndef _WIN32_WINNT
#define WIN32_NO_STATUS
#include <windows.h>
#undef WIN32_NO_STATUS
#include <ntstatus.h>
#endif
#include <Winternl.h>
#include <d3dkmthk.h>
#include <d3dkmdt.h>
Expand Down