diff --git a/.cirrus.yml b/.cirrus.yml index 856ccf8fb2..0c638615c4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -40,8 +40,8 @@ windows_task: # - choco install -y python # Needed for SPIRV, use either this or make a new Docker image # spirv_script: # - export PATH=${PATH}:"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin" -# - cd "${CIRRUS_WORKING_DIR}/Vulkan/spirv-tools-build" -# - msbuild.exe spirv-tools-build.vcxproj //p:Configuration=Release //m +# - cd "${CIRRUS_WORKING_DIR}/3rdparty/SPIRV" +# - msbuild.exe spirv.vcxproj //p:Configuration=Release //m rpcs3_script: - export PATH=${PATH}:"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin" - msbuild.exe rpcs3.sln //p:Configuration=Release //m diff --git a/.gitignore b/.gitignore index 19ddce97ca..70a607bbd4 100644 --- a/.gitignore +++ b/.gitignore @@ -37,10 +37,6 @@ /rpcs3/Debug /rpcs3/Release /llvm_build -/3rdparty/llvm_build -/Vulkan/Vulkan-build -/3rdparty/glslang -/Vulkan/spirv-tools-build !/bin /bin/* diff --git a/.gitmodules b/.gitmodules index 798e037b2a..3f18cb5c33 100644 --- a/.gitmodules +++ b/.gitmodules @@ -11,16 +11,16 @@ path = llvm url = https://github.com/RPCS3/llvm-mirror ignore = dirty -[submodule "Vulkan/glslang"] +[submodule "3rdparty/glslang"] path = 3rdparty/glslang/glslang url = https://github.com/KhronosGroup/glslang.git ignore = dirty -[submodule "Vulkan/spirv-tools"] - path = Vulkan/spirv-tools +[submodule "3rdparty/SPIRV-Tools"] + path = 3rdparty/SPIRV/SPIRV-Tools url = https://github.com/KhronosGroup/SPIRV-Tools.git ignore = dirty -[submodule "Vulkan/spirv-headers"] - path = Vulkan/spirv-headers +[submodule "3rdparty/SPIRV-Headers"] + path = 3rdparty/SPIRV/SPIRV-Headers url = https://github.com/KhronosGroup/SPIRV-Headers.git ignore = dirty [submodule "3rdparty/cereal"] diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 279d169bcc..7e38cf4f7e 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -82,8 +82,9 @@ endif() add_subdirectory(hidapi) -# glslang -add_subdirectory(glslang) +# Vulkan +add_subdirectory(glslang EXCLUDE_FROM_ALL) +add_subdirectory(SPIRV EXCLUDE_FROM_ALL) # yaml-cpp diff --git a/3rdparty/SPIRV/.gitignore b/3rdparty/SPIRV/.gitignore new file mode 100644 index 0000000000..f3b5fb62e4 --- /dev/null +++ b/3rdparty/SPIRV/.gitignore @@ -0,0 +1,2 @@ +/build +/x64 diff --git a/3rdparty/SPIRV/CMakeLists.txt b/3rdparty/SPIRV/CMakeLists.txt new file mode 100644 index 0000000000..9202f34769 --- /dev/null +++ b/3rdparty/SPIRV/CMakeLists.txt @@ -0,0 +1,3 @@ +set(SKIP_SPIRV_TOOLS_INSTALL ON CACHE BOOL "Skip spirv-tools install" FORCE) +set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Headers" CACHE STRING "SPIRV-Headers path" FORCE) +add_subdirectory(SPIRV-Tools) diff --git a/Vulkan/spirv-headers b/3rdparty/SPIRV/SPIRV-Headers similarity index 100% rename from Vulkan/spirv-headers rename to 3rdparty/SPIRV/SPIRV-Headers diff --git a/Vulkan/spirv-tools b/3rdparty/SPIRV/SPIRV-Tools similarity index 100% rename from Vulkan/spirv-tools rename to 3rdparty/SPIRV/SPIRV-Tools diff --git a/Vulkan/spirv-tools-build/spirv-tools-build.vcxproj b/3rdparty/SPIRV/spirv.vcxproj similarity index 73% rename from Vulkan/spirv-tools-build/spirv-tools-build.vcxproj rename to 3rdparty/SPIRV/spirv.vcxproj index 9f2875ab34..1ce9784ee1 100644 --- a/Vulkan/spirv-tools-build/spirv-tools-build.vcxproj +++ b/3rdparty/SPIRV/spirv.vcxproj @@ -1,69 +1,69 @@ - - - - - Debug - x64 - - - Release - x64 - - - - {4CBD3DDD-5555-49A4-A44D-DD3D8CB516A1} - MakeFileProj - - - - - - Makefile - true - - - Makefile - false - - - - - - - - - - - - - - "Visual Studio $(VisualStudioVersion.Substring(0,2))" - cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../spirv-headers')) ../spirv-tools - cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../spirv-headers')) ../spirv-tools - $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\common_default.props')) - - - $(CmakeReleaseCLI) - msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m - $(CmakeReleaseCLI) - msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m - $(CmakeReleaseCLI) - msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m - - - $(CmakeDebugCLI) - msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m - - $(CmakeDebugCLI) - msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m - - $(CmakeDebugCLI) - msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m - - - - - - - + + + + + Debug + x64 + + + Release + x64 + + + + {4CBD3DDD-5555-49A4-A44D-DD3D8CB516A1} + MakeFileProj + + + + + + Makefile + true + + + Makefile + false + + + + + + + + + + + + + + "Visual Studio $(VisualStudioVersion.Substring(0,2))" + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)/SPIRV-Headers')) SPIRV-Tools -B build + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)/SPIRV-Headers')) -S SPIRV-Tools -B build + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\buildfiles\msvc\common_default.props')) + + + $(CmakeReleaseCLI) + msbuild.exe build\ALL_BUILD.vcxproj /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m + $(CmakeReleaseCLI) + msbuild.exe build\ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m + $(CmakeReleaseCLI) + msbuild.exe build\ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m + + + $(CmakeDebugCLI) + msbuild.exe build\ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m + + $(CmakeDebugCLI) + msbuild.exe build\ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m + + $(CmakeDebugCLI) + msbuild.exe build\ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(PropsAbsPath) /m + + + + + + + \ No newline at end of file diff --git a/Vulkan/spirv-tools-build/spirv-tools-build.vcxproj.filters b/3rdparty/SPIRV/spirv.vcxproj.filters similarity index 100% rename from Vulkan/spirv-tools-build/spirv-tools-build.vcxproj.filters rename to 3rdparty/SPIRV/spirv.vcxproj.filters diff --git a/3rdparty/glslang/.gitignore b/3rdparty/glslang/.gitignore new file mode 100644 index 0000000000..f3b5fb62e4 --- /dev/null +++ b/3rdparty/glslang/.gitignore @@ -0,0 +1,2 @@ +/build +/x64 diff --git a/3rdparty/glslang/glslang.vcxproj b/3rdparty/glslang/glslang.vcxproj index 093538dfa2..011786c635 100644 --- a/3rdparty/glslang/glslang.vcxproj +++ b/3rdparty/glslang/glslang.vcxproj @@ -38,26 +38,26 @@ "Visual Studio $(VisualStudioVersion.Substring(0,2))" - cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT glslang - cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT glslang + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT -S glslang -B build + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT -S glslang -B build $(CmakeReleaseCLI) - msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m + msbuild.exe build\ALL_BUILD.vcxproj /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m $(CmakeReleaseCLI) - msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m + msbuild.exe build\ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m $(CmakeReleaseCLI) - msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m + msbuild.exe build\ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m $(CmakeDebugCLI) - msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m + msbuild.exe build\ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m $(CmakeDebugCLI) - msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m + msbuild.exe build\ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m $(CmakeDebugCLI) - msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m + msbuild.exe build\ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets=$(SolutionDir)common_default.props /m diff --git a/BUILDING.md b/BUILDING.md index d58aa06d4c..e72c433ef8 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -115,7 +115,7 @@ You may want to download the precompiled [LLVM libs](https://github.com/RPCS3/ll If you're not using the precompiled libs, build the following projects in *__BUILD_BEFORE* folder by right-clicking on a project > *Build*.: * glslang * **Either** llvm_build **or** llvm_build_clang_cl -* spirv-tools-build +* spirv Afterwards: diff --git a/CMakeLists.txt b/CMakeLists.txt index 310a8874db..11ddad0560 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,6 @@ if(MSVC) add_compile_options(/wd4530 /utf-8) # C++ exception handler used, but unwind semantics are not enabled endif() -add_subdirectory(Vulkan EXCLUDE_FROM_ALL) add_subdirectory(3rdparty) unset(CMAKE_CXX_FLAGS) diff --git a/Vulkan/CMakeLists.txt b/Vulkan/CMakeLists.txt deleted file mode 100644 index 0b20d1861b..0000000000 --- a/Vulkan/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(SKIP_SPIRV_TOOLS_INSTALL ON CACHE BOOL "Skip spirv-tools install" FORCE) -set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/spirv-headers" CACHE STRING "spirv-headers path" FORCE) -add_subdirectory(spirv-tools) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 382db8c61b..a4c2ecb9de 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -93,7 +93,7 @@ jobs: - task: MSBuild@1 inputs: - solution: './Vulkan/spirv-tools-build/spirv-tools-build.vcxproj' + solution: './3rdparty/SPIRV/spirv.vcxproj' maximumCpuCount: true platform: x64 configuration: 'Release' diff --git a/rpcs3.sln b/rpcs3.sln index 1c7d3a81ad..a1ee876660 100644 --- a/rpcs3.sln +++ b/rpcs3.sln @@ -73,7 +73,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "3rdparty\curl\li {73973223-5EE8-41CA-8E88-1D60E89A237B} = {73973223-5EE8-41CA-8E88-1D60E89A237B} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spirv-tools-build", "Vulkan\spirv-tools-build\spirv-tools-build.vcxproj", "{4CBD3DDD-5555-49A4-A44D-DD3D8CB516A1}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SPIRV", "3rdparty\SPIRV\spirv.vcxproj", "{4CBD3DDD-5555-49A4-A44D-DD3D8CB516A1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rdParty", "3rdParty", "{6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}" EndProject diff --git a/rpcs3/VKGSRender.vcxproj b/rpcs3/VKGSRender.vcxproj index cfe59dc4be..0db83b202f 100644 --- a/rpcs3/VKGSRender.vcxproj +++ b/rpcs3/VKGSRender.vcxproj @@ -136,7 +136,7 @@ - $(VULKAN_SDK)\Include;$(SolutionDir)\3rdparty\glslang\glslang\Public;..\3rdparty\glslang\glslang;..\Vulkan\spirv-tools\include;%(AdditionalIncludeDirectories) + $(VULKAN_SDK)\Include;$(SolutionDir)\3rdparty\glslang\glslang\Public;..\3rdparty\glslang\glslang;..\3rdparty\SPIRV\SPIRV-Tools\include;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) MaxSpeed diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj index b40dda073c..8da431c931 100644 --- a/rpcs3/rpcs3.vcxproj +++ b/rpcs3/rpcs3.vcxproj @@ -89,7 +89,7 @@ Ole32.lib;gdi32.lib;..\hidapi.lib;..\libusb-1.0.lib;winmm.lib;OpenAL.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;MachineIndependent.lib;GenericCodeGen.lib;Advapi32.lib;user32.lib;zlib.lib;..\libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmain.lib;shell32.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5Core.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5WinExtras.lib;Qt5Concurrent.lib;7zlib.lib;SPIRV-Tools.lib;SPIRV-Tools-opt.lib;%(AdditionalDependencies) - ..\3rdparty\OpenAL\libs\Win64;..\3rdparty\glslang\hlsl\Release;..\3rdparty\glslang\SPIRV\Release;..\3rdparty\glslang\OGLCompilersDLL\Release;..\3rdparty\glslang\glslang\OSDependent\Windows\Release;..\3rdparty\glslang\glslang\Release;..\Vulkan\spirv-tools-build\source\Release;..\Vulkan\spirv-tools-build\source\opt\Release;..\lib\$(CONFIGURATION)-$(PLATFORM);..\3rdparty\XAudio2Redist\libs;..\3rdparty\discord-rpc\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories);$(VULKAN_SDK)\Lib + ..\3rdparty\OpenAL\libs\Win64;..\3rdparty\glslang\build\hlsl\Release;..\3rdparty\glslang\build\SPIRV\Release;..\3rdparty\glslang\build\OGLCompilersDLL\Release;..\3rdparty\glslang\build\glslang\OSDependent\Windows\Release;..\3rdparty\glslang\build\glslang\Release;..\3rdparty\SPIRV\build\source\Release;..\3rdparty\SPIRV\build\source\opt\Release;..\lib\$(CONFIGURATION)-$(PLATFORM);..\3rdparty\XAudio2Redist\libs;..\3rdparty\discord-rpc\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories);$(VULKAN_SDK)\Lib "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) true Debug @@ -140,7 +140,7 @@ Ole32.lib;gdi32.lib;..\hidapi.lib;..\libusb-1.0.lib;winmm.lib;OpenAL.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslangd.lib;OSDependentd.lib;OGLCompilerd.lib;SPIRVd.lib;MachineIndependentd.lib;GenericCodeGend.lib;Advapi32.lib;user32.lib;zlib.lib;..\libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmaind.lib;shell32.lib;$(QTDIR)\lib\Qt5Widgetsd.lib;$(QTDIR)\lib\Qt5Guid.lib;$(QTDIR)\lib\Qt5Cored.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;Qt5WinExtrasd.lib;Qt5Concurrentd.lib;7zlib.lib;SPIRV-Tools.lib;SPIRV-Tools-opt.lib;%(AdditionalDependencies) - ..\3rdparty\OpenAL\libs\Win64;..\3rdparty\glslang\hlsl\Debug;..\3rdparty\glslang\SPIRV\Debug;..\3rdparty\glslang\OGLCompilersDLL\Debug;..\3rdparty\glslang\glslang\OSDependent\Windows\Debug;..\3rdparty\glslang\glslang\Debug;..\Vulkan\spirv-tools-build\source\opt\Debug;..\3rdparty\XAudio2Redist\libs;..\3rdparty\discord-rpc\lib;..\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;%(AdditionalLibraryDirectories);$(VULKAN_SDK)\Lib + ..\3rdparty\OpenAL\libs\Win64;..\3rdparty\glslang\build\hlsl\Debug;..\3rdparty\glslang\build\SPIRV\Debug;..\3rdparty\glslang\build\OGLCompilersDLL\Debug;..\3rdparty\glslang\build\glslang\OSDependent\Windows\Debug;..\3rdparty\glslang\build\glslang\Debug;..\3rdparty\SPIRV\build\source\opt\Debug;..\3rdparty\XAudio2Redist\libs;..\3rdparty\discord-rpc\lib;..\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;%(AdditionalLibraryDirectories);$(VULKAN_SDK)\Lib "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /VERBOSE %(AdditionalOptions) true Debug