forked from HansKristian-Work/vkd3d-proton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
- Loading branch information
1 parent
45f9836
commit 8c216e6
Showing
21 changed files
with
313 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ vkd3d-*.tar.xz | |
.deps | ||
.dirstamp | ||
.libs | ||
build | ||
build.native | ||
build.cross |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[binaries] | ||
c = 'i686-w64-mingw32-gcc' | ||
cpp = 'i686-w64-mingw32-g++' | ||
ar = 'i686-w64-mingw32-ar' | ||
strip = 'i686-w64-mingw32-strip' | ||
cmake = 'i686-w64-mingw32-cmake' | ||
|
||
[properties] | ||
c_args=['-msse', '-msse2'] | ||
cpp_args=['-msse', '-msse2'] | ||
c_link_args = ['-static', '-static-libgcc'] | ||
cpp_link_args = ['-static', '-static-libgcc', '-static-libstdc++'] | ||
needs_exe_wrapper = true | ||
|
||
[host_machine] | ||
system = 'windows' | ||
cpu_family = 'x86' | ||
cpu = 'x86' | ||
endian = 'little' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[binaries] | ||
c = 'x86_64-w64-mingw32-gcc' | ||
cpp = 'x86_64-w64-mingw32-g++' | ||
ar = 'x86_64-w64-mingw32-ar' | ||
strip = 'x86_64-w64-mingw32-strip' | ||
cmake = 'x86_64-w64-mingw32-cmake' | ||
|
||
[properties] | ||
c_link_args = ['-static', '-static-libgcc'] | ||
cpp_link_args = ['-static', '-static-libgcc', '-static-libstdc++'] | ||
needs_exe_wrapper = true | ||
|
||
[host_machine] | ||
system = 'windows' | ||
cpu_family = 'x86_64' | ||
cpu = 'x86_64' | ||
endian = 'little' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
demo_vkd3d_deps = [ | ||
threads_dep | ||
] | ||
|
||
if vkd3d_platform != 'windows' | ||
demo_vkd3d_deps += [ | ||
lib_m, | ||
lib_xcb, | ||
lib_xcbkeysyms, | ||
|
||
vkd3d_dep, | ||
vkd3d_utils_dep, | ||
] | ||
else | ||
demo_vkd3d_deps += [ | ||
lib_dxgi, | ||
lib_d3d12 | ||
] | ||
endif | ||
|
||
executable('gears', 'gears.c', vkd3d_headers, | ||
dependencies : demo_vkd3d_deps, | ||
install : true, | ||
gui_app : true, | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
executable('triangle', 'triangle.c', vkd3d_headers, | ||
dependencies : demo_vkd3d_deps, | ||
install : true, | ||
gui_app : true, | ||
override_options : [ 'c_std='+vkd3d_c_std ]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
vkd3d_idl = [ | ||
'vkd3d_d3d12.idl', | ||
'vkd3d_d3d12sdklayers.idl', | ||
'vkd3d_d3dcommon.idl', | ||
'vkd3d_dxgi.idl', | ||
'vkd3d_dxgi1_2.idl', | ||
'vkd3d_dxgi1_3.idl', | ||
'vkd3d_dxgi1_4.idl', | ||
'vkd3d_dxgibase.idl', | ||
'vkd3d_dxgiformat.idl', | ||
'vkd3d_dxgitype.idl', | ||
] | ||
|
||
vkd3d_headers = idl_generator.process(vkd3d_idl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
subdir('vkd3d-common') | ||
subdir('vkd3d-shader') | ||
subdir('vkd3d') | ||
subdir('vkd3d-utils') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
vkd3d_common_src = [ | ||
'debug.c', | ||
'memory.c', | ||
'utf8.c', | ||
] | ||
|
||
vkd3d_common_lib = static_library('vkd3d_common', vkd3d_common_src, | ||
include_directories : vkd3d_private_includes, | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
vkd3d_common_dep = declare_dependency( | ||
link_with : vkd3d_common_lib, | ||
include_directories : vkd3d_public_includes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
vkd3d_shader_src = [ | ||
'checksum.c', | ||
'dxil.c', | ||
'dxbc.c', | ||
'spirv.c', | ||
'trace.c', | ||
'vkd3d_shader_main.c', | ||
] | ||
|
||
vkd3d_shader_lib = shared_library('vkd3d-shader', vkd3d_shader_src, vkd3d_headers, | ||
dependencies : [ vkd3d_common_dep, dxil_spirv_lib ], | ||
include_directories : vkd3d_private_includes, | ||
install : true, | ||
vs_module_defs : 'vkd3d_shader.def', | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
vkd3d_shader_dep = declare_dependency( | ||
link_with : vkd3d_shader_lib, | ||
include_directories : vkd3d_public_includes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
LIBRARY vkd3d-shader | ||
EXPORTS | ||
vkd3d_shader_compile_dxbc | ||
vkd3d_shader_convert_root_signature | ||
vkd3d_shader_find_signature_element | ||
vkd3d_shader_free_root_signature | ||
vkd3d_shader_free_shader_code | ||
vkd3d_shader_free_shader_signature | ||
vkd3d_shader_parse_input_signature | ||
vkd3d_shader_parse_root_signature | ||
vkd3d_shader_scan_dxbc | ||
vkd3d_shader_serialize_root_signature | ||
vkd3d_shader_supports_dxil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
vkd3d_utils_src = [ | ||
'vkd3d_utils_main.c', | ||
] | ||
|
||
vkd3d_utils_lib = shared_library('vkd3d-utils', vkd3d_utils_src, vkd3d_headers, | ||
dependencies : vkd3d_dep, | ||
include_directories : vkd3d_private_includes, | ||
install : true, | ||
vs_module_defs : 'vkd3d_utils.def', | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
vkd3d_utils_dep = declare_dependency( | ||
link_with : vkd3d_utils_lib, | ||
include_directories : vkd3d_public_includes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
LIBRARY vkd3d-utils | ||
EXPORTS | ||
D3D12CreateDevice | ||
D3D12CreateRootSignatureDeserializer | ||
D3D12CreateVersionedRootSignatureDeserializer | ||
D3D12GetDebugInterface | ||
D3D12SerializeRootSignature | ||
D3D12SerializeVersionedRootSignature | ||
vkd3d_create_event | ||
vkd3d_destroy_event | ||
vkd3d_signal_event | ||
vkd3d_wait_event | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
vkd3d_src = [ | ||
'command.c', | ||
'device.c', | ||
'meta.c', | ||
'platform.c', | ||
'resource.c', | ||
'state.c', | ||
'utils.c', | ||
'vkd3d_main.c', | ||
] | ||
|
||
vkd3d_lib = shared_library('vkd3d', vkd3d_src, vkd3d_version, vkd3d_headers, | ||
dependencies : [ vkd3d_common_dep, vkd3d_shader_dep ] + vkd3d_extra_libs, | ||
include_directories : vkd3d_private_includes, | ||
install : true, | ||
vs_module_defs : 'vkd3d.def', | ||
version : '1.1.0', | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
vkd3d_dep = declare_dependency( | ||
link_with : [ vkd3d_lib, vkd3d_common_lib ], | ||
dependencies : vkd3d_extra_libs, | ||
include_directories : vkd3d_public_includes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
LIBRARY vkd3d | ||
EXPORTS | ||
vkd3d_acquire_vk_queue | ||
vkd3d_create_device | ||
vkd3d_create_image_resource | ||
vkd3d_create_instance | ||
vkd3d_create_root_signature_deserializer | ||
vkd3d_create_versioned_root_signature_deserializer | ||
vkd3d_get_device_parent | ||
vkd3d_get_dxgi_format | ||
vkd3d_get_vk_device | ||
vkd3d_get_vk_format | ||
vkd3d_get_vk_physical_device | ||
vkd3d_get_vk_queue_family_index | ||
vkd3d_instance_decref | ||
vkd3d_instance_from_device | ||
vkd3d_instance_get_vk_instance | ||
vkd3d_instance_incref | ||
vkd3d_release_vk_queue | ||
vkd3d_resource_decref | ||
vkd3d_resource_incref | ||
vkd3d_serialize_root_signature | ||
vkd3d_serialize_versioned_root_signature |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
project('vkd3d', ['c'], version : '1.1', meson_version : '>= 0.51') | ||
|
||
cpu_family = target_machine.cpu_family() | ||
|
||
add_project_arguments('-DHAVE_DXIL_SPV', language : 'c') | ||
add_project_arguments('-D_GNU_SOURCE', language : 'c') | ||
add_project_arguments('-DPACKAGE_VERSION="' + meson.project_version() + '"', language : 'c') | ||
|
||
vkd3d_compiler = meson.get_compiler('c') | ||
vkd3d_c_std = 'c99' | ||
|
||
vkd3d_external_includes = [ './subprojects/Vulkan-Headers/include', './subprojects/SPIRV-Headers/include' ] | ||
vkd3d_public_includes = [ './include' ] + vkd3d_external_includes | ||
vkd3d_private_includes = [ './include/private' ] + vkd3d_public_includes | ||
|
||
vkd3d_external_includes = include_directories(vkd3d_external_includes) | ||
vkd3d_public_includes = include_directories(vkd3d_public_includes) | ||
vkd3d_private_includes = include_directories(vkd3d_private_includes) | ||
|
||
idl_compiler = find_program('widl') | ||
idl_generator = generator(idl_compiler, | ||
output : [ '@BASENAME@.h' ], | ||
arguments : [ '-h', '-o', '@OUTPUT@', '@INPUT@' ]) | ||
|
||
threads_dep = dependency('threads') | ||
|
||
vkd3d_platform = target_machine.system() | ||
if vkd3d_platform == 'linux' | ||
lib_dl = vkd3d_compiler.find_library('dl') | ||
# For the demos... | ||
lib_m = vkd3d_compiler.find_library('m') | ||
lib_xcb = vkd3d_compiler.find_library('xcb') | ||
lib_xcbkeysyms = vkd3d_compiler.find_library('xcb-keysyms') | ||
vkd3d_extra_libs = [ lib_dl, threads_dep ] | ||
elif vkd3d_platform == 'windows' | ||
lib_dxgi = vkd3d_compiler.find_library('dxgi') | ||
lib_d3d12 = vkd3d_compiler.find_library('d3d12') | ||
vkd3d_extra_libs = [ threads_dep ] | ||
else | ||
error('Unknown platform') | ||
endif | ||
|
||
add_project_arguments(vkd3d_compiler.get_supported_arguments([ | ||
'-Wno-format', | ||
'-Wno-discarded-qualifiers', | ||
'-Wno-incompatible-pointer-types', | ||
'-Wno-missing-braces']), | ||
language : 'c') | ||
|
||
vkd3d_version = vcs_tag( | ||
command : ['git', 'describe', '--dirty=+'], | ||
input : 'vkd3d_version.c.in', | ||
output : 'vkd3d_version.c') | ||
|
||
cmake = import('cmake') | ||
dxil_spirv = cmake.subproject('dxil-spirv', cmake_options: ['-DDXIL_SPIRV_CLI=OFF'] ) | ||
dxil_spirv_lib = dxil_spirv.dependency('dxil-spirv-c-shared') | ||
|
||
subdir('include') | ||
subdir('libs') | ||
|
||
enable_tests = get_option('enable_tests') | ||
enable_extras = get_option('enable_extras') | ||
|
||
if enable_tests | ||
subdir('tests') | ||
endif | ||
|
||
if enable_extras | ||
subdir('demos') | ||
subdir('programs') | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
option('enable_tests', type : 'boolean', value : false) | ||
option('enable_extras', type : 'boolean', value : false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
subdir('vkd3d-compiler') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
vkd3d_test_deps = [ vkd3d_dep, vkd3d_utils_dep ] | ||
|
||
executable('vkd3d_api', 'vkd3d_api.c', vkd3d_headers, | ||
dependencies : vkd3d_test_deps, | ||
include_directories : vkd3d_private_includes, | ||
install : true, | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
executable('vkd3d_common', 'vkd3d_common.c', vkd3d_headers, | ||
dependencies : vkd3d_test_deps, | ||
include_directories : vkd3d_private_includes, | ||
install : true, | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
executable('vkd3d_shader_api', 'vkd3d_shader_api.c', vkd3d_headers, | ||
dependencies : vkd3d_test_deps + [ vkd3d_shader_dep ], | ||
include_directories : vkd3d_private_includes, | ||
install : true, | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
executable('d3d12', 'd3d12.c', vkd3d_headers, | ||
dependencies : vkd3d_test_deps + [ vkd3d_shader_dep ], | ||
include_directories : vkd3d_private_includes, | ||
install : true, | ||
override_options : [ 'c_std='+vkd3d_c_std ]) | ||
|
||
executable('d3d12_invalid_usage', 'd3d12_invalid_usage.c', vkd3d_headers, | ||
dependencies : vkd3d_test_deps + [ vkd3d_shader_dep ], | ||
include_directories : vkd3d_private_includes, | ||
install : true, | ||
override_options : [ 'c_std='+vkd3d_c_std ]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
const char vkd3d_build[] = "@VCS_TAG@"; |