build: Replace enable_standalone_d3d12 with tristate enable_d3d12.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
This commit is contained in:
parent
f37254e6b6
commit
98f005116b
|
@ -54,12 +54,12 @@ ninja install
|
||||||
#### Compiling manually (cross for d3d12.dll, default)
|
#### Compiling manually (cross for d3d12.dll, default)
|
||||||
```
|
```
|
||||||
# 64-bit build.
|
# 64-bit build.
|
||||||
meson --cross-file build-win64.txt -Denable_standalone_d3d12=True --buildtype release --prefix /your/vkd3d-proton/directory build.64
|
meson --cross-file build-win64.txt --buildtype release --prefix /your/vkd3d-proton/directory build.64
|
||||||
cd build.64
|
cd build.64
|
||||||
ninja install
|
ninja install
|
||||||
|
|
||||||
# 32-bit build
|
# 32-bit build
|
||||||
meson --cross-file build-win32.txt -Denable_standalone_d3d12=True --buildtype release --prefix /your/vkd3d-proton/directory build.86
|
meson --cross-file build-win32.txt --buildtype release --prefix /your/vkd3d-proton/directory build.86
|
||||||
cd build.86
|
cd build.86
|
||||||
ninja install
|
ninja install
|
||||||
```
|
```
|
||||||
|
|
|
@ -2,6 +2,6 @@ subdir('vkd3d-common')
|
||||||
subdir('vkd3d-shader')
|
subdir('vkd3d-shader')
|
||||||
subdir('vkd3d')
|
subdir('vkd3d')
|
||||||
subdir('vkd3d-utils')
|
subdir('vkd3d-utils')
|
||||||
if enable_standalone_d3d12
|
if enable_d3d12
|
||||||
subdir('d3d12')
|
subdir('d3d12')
|
||||||
endif
|
endif
|
|
@ -36,7 +36,7 @@ vkd3d_src = [
|
||||||
'vkd3d_main.c',
|
'vkd3d_main.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
if enable_standalone_d3d12
|
if enable_d3d12
|
||||||
vkd3d_src += 'swapchain.c'
|
vkd3d_src += 'swapchain.c'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ if enable_renderdoc
|
||||||
vkd3d_src += ['renderdoc.c']
|
vkd3d_src += ['renderdoc.c']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if not enable_standalone_d3d12
|
if not enable_d3d12
|
||||||
vkd3d_lib = shared_library('vkd3d-proton', vkd3d_src, glsl_generator.process(vkd3d_shaders), vkd3d_build, vkd3d_version,
|
vkd3d_lib = shared_library('vkd3d-proton', vkd3d_src, glsl_generator.process(vkd3d_shaders), vkd3d_build, vkd3d_version,
|
||||||
dependencies : [ vkd3d_common_dep, vkd3d_shader_dep ] + vkd3d_extra_libs,
|
dependencies : [ vkd3d_common_dep, vkd3d_shader_dep ] + vkd3d_extra_libs,
|
||||||
include_directories : vkd3d_private_includes,
|
include_directories : vkd3d_private_includes,
|
||||||
|
|
14
meson.build
14
meson.build
|
@ -11,11 +11,17 @@ vkd3d_platform = target_machine.system()
|
||||||
|
|
||||||
enable_tests = get_option('enable_tests')
|
enable_tests = get_option('enable_tests')
|
||||||
enable_extras = get_option('enable_extras')
|
enable_extras = get_option('enable_extras')
|
||||||
enable_standalone_d3d12 = get_option('enable_standalone_d3d12')
|
enable_d3d12 = get_option('enable_d3d12')
|
||||||
enable_profiling = get_option('enable_profiling')
|
enable_profiling = get_option('enable_profiling')
|
||||||
enable_renderdoc = get_option('enable_renderdoc')
|
enable_renderdoc = get_option('enable_renderdoc')
|
||||||
|
|
||||||
if vkd3d_platform != 'windows' and enable_standalone_d3d12
|
if enable_d3d12 == 'auto'
|
||||||
|
enable_d3d12 = (vkd3d_platform == 'windows')
|
||||||
|
else
|
||||||
|
enable_d3d12 = (enable_d3d12 == 'true')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if vkd3d_platform != 'windows' and enable_d3d12
|
||||||
error('Standalone D3D12 is only supported on Windows.')
|
error('Standalone D3D12 is only supported on Windows.')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -27,7 +33,7 @@ if vkd3d_platform == 'windows'
|
||||||
add_project_arguments('-D_WIN32_WINNT=0x600', language : 'c')
|
add_project_arguments('-D_WIN32_WINNT=0x600', language : 'c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if enable_standalone_d3d12
|
if enable_d3d12
|
||||||
add_project_arguments('-DVKD3D_BUILD_STANDALONE_D3D12', language : 'c')
|
add_project_arguments('-DVKD3D_BUILD_STANDALONE_D3D12', language : 'c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -120,7 +126,7 @@ subdir('include')
|
||||||
subdir('libs')
|
subdir('libs')
|
||||||
|
|
||||||
if vkd3d_platform == 'windows'
|
if vkd3d_platform == 'windows'
|
||||||
if enable_standalone_d3d12
|
if enable_d3d12
|
||||||
lib_d3d12 = d3d12_dep
|
lib_d3d12 = d3d12_dep
|
||||||
elif not lib_d3d12.found()
|
elif not lib_d3d12.found()
|
||||||
lib_d3d12 = vkd3d_utils_dep
|
lib_d3d12 = vkd3d_utils_dep
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
option('enable_tests', type : 'boolean', value : false)
|
option('enable_tests', type : 'boolean', value : false)
|
||||||
option('enable_extras', type : 'boolean', value : false)
|
option('enable_extras', type : 'boolean', value : false)
|
||||||
option('enable_standalone_d3d12', type : 'boolean', value : false)
|
option('enable_d3d12', type : 'combo', value : 'auto', choices : ['false', 'true', 'auto'])
|
||||||
option('enable_profiling', type : 'boolean', value : false)
|
option('enable_profiling', type : 'boolean', value : false)
|
||||||
option('enable_renderdoc', type : 'boolean', value : false)
|
option('enable_renderdoc', type : 'boolean', value : false)
|
||||||
|
|
|
@ -82,8 +82,8 @@ function package {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $opt_native -eq 0 ]; then
|
if [ $opt_native -eq 0 ]; then
|
||||||
build_arch 64 "--cross-file build-win64.txt -Denable_standalone_d3d12=True"
|
build_arch 64 "--cross-file build-win64.txt
|
||||||
build_arch 86 "--cross-file build-win32.txt -Denable_standalone_d3d12=True"
|
build_arch 86 "--cross-file build-win32.txt
|
||||||
build_script
|
build_script
|
||||||
else
|
else
|
||||||
build_arch 64
|
build_arch 64
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
vkd3d_test_flags = []
|
vkd3d_test_flags = []
|
||||||
if vkd3d_platform == 'windows'
|
if vkd3d_platform == 'windows'
|
||||||
if enable_standalone_d3d12
|
if enable_d3d12
|
||||||
vkd3d_test_deps = [ lib_d3d12, lib_dxgi, vkd3d_common_dep ]
|
vkd3d_test_deps = [ lib_d3d12, lib_dxgi, vkd3d_common_dep ]
|
||||||
else
|
else
|
||||||
vkd3d_test_deps = [ vkd3d_dep, vkd3d_utils_dep ]
|
vkd3d_test_deps = [ vkd3d_dep, vkd3d_utils_dep ]
|
||||||
|
|
Loading…
Reference in New Issue