diff --git a/.gitignore b/.gitignore index 6b176a17d3..19ddce97ca 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ /llvm_build /3rdparty/llvm_build /Vulkan/Vulkan-build -/Vulkan/glslang-build +/3rdparty/glslang /Vulkan/spirv-tools-build !/bin diff --git a/.gitmodules b/.gitmodules index 1f98eb06a5..bd9ac2bfd5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ url = https://github.com/RPCS3/llvm-mirror ignore = dirty [submodule "Vulkan/glslang"] - path = Vulkan/glslang + path = 3rdparty/glslang/glslang url = https://github.com/KhronosGroup/glslang.git ignore = dirty [submodule "Vulkan/spirv-tools"] diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 2a24b68af6..e13783bbfa 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -81,6 +81,11 @@ endif() # hidapi add_subdirectory(hidapi) + +# glslang +add_subdirectory(glslang) + + # yaml-cpp # We don't want to install yaml-cpp but its cmake file doesn't have option # to disable it... diff --git a/3rdparty/glslang/CMakeLists.txt b/3rdparty/glslang/CMakeLists.txt new file mode 100644 index 0000000000..5b6aa8e962 --- /dev/null +++ b/3rdparty/glslang/CMakeLists.txt @@ -0,0 +1,11 @@ +#glslang + +set(ENABLE_PCH OFF CACHE BOOL "Enables Precompiled header" FORCE) +set(BUILD_EXTERNAL OFF CACHE BOOL "Build external dependencies in /External" FORCE) +set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "Skip installation" FORCE) +set(ENABLE_SPVREMAPPER OFF CACHE BOOL "Enables building of SPVRemapper" FORCE) +set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "Builds glslangValidator and spirv-remap" FORCE) +set(ENABLE_HLSL OFF CACHE BOOL "Enables HLSL input support" FORCE) +set(ENABLE_OPT OFF CACHE BOOL "Enables spirv-opt capability if present" FORCE) +set(ENABLE_CTEST OFF CACHE BOOL "Enables testing" FORCE) +add_subdirectory(glslang) diff --git a/Vulkan/glslang b/3rdparty/glslang/glslang similarity index 100% rename from Vulkan/glslang rename to 3rdparty/glslang/glslang diff --git a/Vulkan/glslang-build/glslang-build.vcxproj b/3rdparty/glslang/glslang.vcxproj similarity index 98% rename from Vulkan/glslang-build/glslang-build.vcxproj rename to 3rdparty/glslang/glslang.vcxproj index 7eebad7fdc..093538dfa2 100644 --- a/Vulkan/glslang-build/glslang-build.vcxproj +++ b/3rdparty/glslang/glslang.vcxproj @@ -38,8 +38,8 @@ "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 glslang + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT glslang $(CmakeReleaseCLI) diff --git a/Vulkan/glslang-build/glslang-build.vcxproj.filters b/3rdparty/glslang/glslang.vcxproj.filters similarity index 100% rename from Vulkan/glslang-build/glslang-build.vcxproj.filters rename to 3rdparty/glslang/glslang.vcxproj.filters diff --git a/BUILDING.md b/BUILDING.md index b1c60c80a3..d58aa06d4c 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -113,7 +113,7 @@ Open `rpcs3.sln`. The recommended build configuration is `Release`. (On older re You may want to download the precompiled [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win/llvmlibs_mt.7z) and extract them to the root rpcs3 folder (which contains `rpcs3.sln`), as well as download and extract the [additional libs](https://github.com/RPCS3/glslang/releases/download/custom-build-win/glslanglibs_mt.7z) to `lib\%CONFIGURATION%-x64\` to speed up compilation time (unoptimised/debug libs are currently not available precompiled). If you're not using the precompiled libs, build the following projects in *__BUILD_BEFORE* folder by right-clicking on a project > *Build*.: -* glslang-build +* glslang * **Either** llvm_build **or** llvm_build_clang_cl * spirv-tools-build diff --git a/Vulkan/CMakeLists.txt b/Vulkan/CMakeLists.txt index 6a63235b13..0b20d1861b 100644 --- a/Vulkan/CMakeLists.txt +++ b/Vulkan/CMakeLists.txt @@ -1,13 +1,3 @@ -set(ENABLE_PCH OFF CACHE BOOL "Enables Precompiled header" FORCE) -set(BUILD_EXTERNAL OFF CACHE BOOL "Build external dependencies in /External" FORCE) -set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "Skip installation" FORCE) -set(ENABLE_SPVREMAPPER OFF CACHE BOOL "Enables building of SPVRemapper" FORCE) -set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "Builds glslangValidator and spirv-remap" FORCE) -set(ENABLE_HLSL OFF CACHE BOOL "Enables HLSL input support" FORCE) -set(ENABLE_OPT OFF CACHE BOOL "Enables spirv-opt capability if present" FORCE) -set(ENABLE_CTEST OFF CACHE BOOL "Enables testing" FORCE) -add_subdirectory(glslang) - 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/rpcs3.sln b/rpcs3.sln index 1ef4be355f..1c7d3a81ad 100644 --- a/rpcs3.sln +++ b/rpcs3.sln @@ -29,7 +29,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "3rdparty\libpng\l EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "3rdparty\zlib.vcxproj", "{60F89955-91C6-3A36-8000-13C592FEC2DF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glslang-build", "Vulkan\glslang-build\glslang-build.vcxproj", "{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glslang", "3rdparty\glslang\glslang.vcxproj", "{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKGSRender", "rpcs3\VKGSRender.vcxproj", "{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}" ProjectSection(ProjectDependencies) = postProject diff --git a/rpcs3/VKGSRender.vcxproj b/rpcs3/VKGSRender.vcxproj index e77733dd39..cfe59dc4be 100644 --- a/rpcs3/VKGSRender.vcxproj +++ b/rpcs3/VKGSRender.vcxproj @@ -136,7 +136,7 @@ - $(VULKAN_SDK)\Include;..\Vulkan\glslang\glslang\Public;..\Vulkan\glslang;..\Vulkan\spirv-tools\include;%(AdditionalIncludeDirectories) + $(VULKAN_SDK)\Include;$(SolutionDir)\3rdparty\glslang\glslang\Public;..\3rdparty\glslang\glslang;..\Vulkan\spirv-tools\include;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) MaxSpeed diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj index e877b5ec10..e78d9582ee 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;..\Vulkan\glslang-build\hlsl\Release;..\Vulkan\glslang-build\SPIRV\Release;..\Vulkan\glslang-build\OGLCompilersDLL\Release;..\Vulkan\glslang-build\glslang\OSDependent\Windows\Release;..\Vulkan\glslang-build\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\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 "/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;..\Vulkan\glslang-build\hlsl\Debug;..\Vulkan\glslang-build\SPIRV\Debug;..\Vulkan\glslang-build\OGLCompilersDLL\Debug;..\Vulkan\glslang-build\glslang\OSDependent\Windows\Debug;..\Vulkan\glslang-build\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\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 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /VERBOSE %(AdditionalOptions) true Debug