Skip to content

Commit f2a59bf

Browse files
committed
Update to upstream plume.
1 parent d292c7a commit f2a59bf

23 files changed

Lines changed: 52 additions & 11937 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ FodyWeavers.xsd
397397

398398
# JetBrains Rider
399399
*.sln.iml
400+
.idea
400401

401402
# macOS metadata files
402403
.DS_Store

.gitmodules

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,9 @@
1313
[submodule "thirdparty/vcpkg"]
1414
path = thirdparty/vcpkg
1515
url = https://github.com/microsoft/vcpkg
16-
[submodule "thirdparty/volk"]
17-
path = thirdparty/volk
18-
url = https://github.com/zeux/volk
1916
[submodule "thirdparty/SDL"]
2017
path = thirdparty/SDL
2118
url = https://github.com/libsdl-org/SDL.git
22-
[submodule "thirdparty/Vulkan-Headers"]
23-
path = thirdparty/Vulkan-Headers
24-
url = https://github.com/KhronosGroup/Vulkan-Headers.git
25-
[submodule "thirdparty/VulkanMemoryAllocator"]
26-
path = thirdparty/VulkanMemoryAllocator
27-
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
28-
[submodule "thirdparty/D3D12MemoryAllocator"]
29-
path = thirdparty/D3D12MemoryAllocator
30-
url = https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
3119
[submodule "thirdparty/stb"]
3220
path = thirdparty/stb
3321
url = https://github.com/nothings/stb.git
@@ -67,3 +55,6 @@
6755
[submodule "thirdparty/MoltenVK/SPIRV-Cross"]
6856
path = thirdparty/MoltenVK/SPIRV-Cross
6957
url = https://github.com/KhronosGroup/SPIRV-Cross.git
58+
[submodule "thirdparty/plume"]
59+
path = thirdparty/plume
60+
url = https://github.com/squidbus/plume

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
1919

2020
project("MarathonRecomp-ALL")
2121

22+
if (APPLE)
23+
enable_language(OBJC OBJCXX)
24+
endif()
25+
2226
if (CMAKE_OSX_ARCHITECTURES)
2327
set(MARATHON_RECOMP_ARCHITECTURE ${CMAKE_OSX_ARCHITECTURES})
2428
elseif(CMAKE_SYSTEM_PROCESSOR)

MarathonRecomp/CMakeLists.txt

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project("MarathonRecomp")
22

33
if (WIN32)
4-
option(MARATHON_RECOMP_D3D12 "Add D3D12 support for rendering" OFF)
4+
option(MARATHON_RECOMP_D3D12 "Add D3D12 support for rendering" ON)
55
endif()
66

77
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
@@ -116,15 +116,8 @@ set(MARATHON_RECOMP_GPU_CXX_SOURCES
116116
"gpu/imgui/imgui_common.cpp"
117117
"gpu/imgui/imgui_font_builder.cpp"
118118
"gpu/imgui/imgui_snapshot.cpp"
119-
"gpu/rhi/plume_vulkan.cpp"
120119
)
121120

122-
if (MARATHON_RECOMP_D3D12)
123-
list(APPEND MARATHON_RECOMP_GPU_CXX_SOURCES
124-
"gpu/rhi/plume_d3d12.cpp"
125-
)
126-
endif()
127-
128121
set(MARATHON_RECOMP_APU_CXX_SOURCES
129122
"apu/audio.cpp"
130123
"apu/xma_decoder.cpp"
@@ -225,18 +218,10 @@ set(MARATHON_RECOMP_THIRDPARTY_INCLUDES
225218
"${MARATHON_RECOMP_THIRDPARTY_ROOT}/magic_enum/include"
226219
"${MARATHON_RECOMP_THIRDPARTY_ROOT}/stb"
227220
"${MARATHON_RECOMP_THIRDPARTY_ROOT}/unordered_dense/include"
228-
"${MARATHON_RECOMP_THIRDPARTY_ROOT}/volk"
229-
"${MARATHON_RECOMP_THIRDPARTY_ROOT}/Vulkan-Headers/include"
230-
"${MARATHON_RECOMP_THIRDPARTY_ROOT}/VulkanMemoryAllocator/include"
231221
"${MARATHON_RECOMP_TOOLS_ROOT}/bc_diff"
232222
"${MARATHON_RECOMP_TOOLS_ROOT}/XenosRecomp/thirdparty/smol-v/source"
233223
)
234224

235-
if (MARATHON_RECOMP_D3D12)
236-
list(APPEND MARATHON_RECOMP_THIRDPARTY_INCLUDES "${MARATHON_RECOMP_THIRDPARTY_ROOT}/D3D12MemoryAllocator/include")
237-
list(APPEND MARATHON_RECOMP_THIRDPARTY_SOURCES "${MARATHON_RECOMP_THIRDPARTY_ROOT}/D3D12MemoryAllocator/src/D3D12MemAlloc.cpp")
238-
endif()
239-
240225
set_source_files_properties(${MARATHON_RECOMP_THIRDPARTY_SOURCES} PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
241226

242227
set(MARATHON_RECOMP_CXX_SOURCES
@@ -381,31 +366,27 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
381366
target_compile_definitions(MarathonRecomp PRIVATE SDL_VULKAN_ENABLED)
382367
endif()
383368

384-
#find_package(directx-dxc REQUIRED)
385369
find_package(CURL REQUIRED)
386370

387-
#if (MARATHON_RECOMP_D3D12)
388-
# file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/D3D12)
389-
# add_custom_command(TARGET MarathonRecomp POST_BUILD
390-
# COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Core,IMPORTED_LOCATION_RELEASE> ${CMAKE_CURRENT_BINARY_DIR}/D3D12
391-
# COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Layers,IMPORTED_LOCATION_DEBUG> ${CMAKE_CURRENT_BINARY_DIR}/D3D12
392-
# COMMAND_EXPAND_LISTS
393-
# )
394-
#
395-
# find_file(DIRECTX_DXIL_LIBRARY "dxil.dll")
396-
# file(COPY ${DIRECTX_DXIL_LIBRARY} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
397-
#
398-
# target_link_libraries(MarathonRecomp PRIVATE
399-
# Microsoft::DirectX-Headers
400-
# Microsoft::DirectX-Guids
401-
# Microsoft::DirectX12-Agility
402-
# Microsoft::DirectXShaderCompiler
403-
# Microsoft::DXIL
404-
# dxgi
405-
# )
406-
#endif()
407-
408-
#file(CHMOD ${DIRECTX_DXC_TOOL} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
371+
if (MARATHON_RECOMP_D3D12)
372+
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/D3D12)
373+
add_custom_command(TARGET MarathonRecomp POST_BUILD
374+
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Core,IMPORTED_LOCATION_RELEASE> $<TARGET_FILE_DIR:MarathonRecomp>/D3D12
375+
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Layers,IMPORTED_LOCATION_DEBUG> $<TARGET_FILE_DIR:MarathonRecomp>/D3D12
376+
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectXShaderCompiler,IMPORTED_LOCATION> $<TARGET_FILE_DIR:MarathonRecomp>
377+
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DXIL,IMPORTED_LOCATION> $<TARGET_FILE_DIR:MarathonRecomp>
378+
COMMAND_EXPAND_LISTS
379+
)
380+
381+
target_link_libraries(MarathonRecomp PRIVATE
382+
Microsoft::DirectX-Headers
383+
Microsoft::DirectX-Guids
384+
Microsoft::DirectX12-Agility
385+
Microsoft::DirectXShaderCompiler
386+
Microsoft::DXIL
387+
dxgi
388+
)
389+
endif()
409390

410391
if (WIN32)
411392
target_link_libraries(MarathonRecomp PRIVATE
@@ -432,6 +413,7 @@ target_link_libraries(MarathonRecomp PRIVATE
432413
MarathonRecompLib
433414
xxHash::xxhash
434415
CURL::libcurl
416+
plume
435417
)
436418

437419
if (NOT WIN32)

MarathonRecomp/gpu/rhi/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)