mirror of
https://github.com/dolphin-emu/dolphin
synced 2025-10-06 00:13:03 +02:00
Merge pull request #13974 from JoshuaVandaele/system-glslang
Externals: Update glslang to 16.0.0 and allow using system glslang
This commit is contained in:
@@ -651,7 +651,7 @@ dolphin_find_optional_system_library_pkgconfig(FMT
|
|||||||
|
|
||||||
add_subdirectory(Externals/imgui)
|
add_subdirectory(Externals/imgui)
|
||||||
add_subdirectory(Externals/implot)
|
add_subdirectory(Externals/implot)
|
||||||
add_subdirectory(Externals/glslang)
|
dolphin_find_optional_system_library(glslang Externals/glslang 15.0)
|
||||||
# SPIRV-Cross is used on Windows for GLSL to HLSL conversion for the Direct3D 11 and Direct3D 12
|
# SPIRV-Cross is used on Windows for GLSL to HLSL conversion for the Direct3D 11 and Direct3D 12
|
||||||
# video backends, and on Apple devices for the Metal video backend.
|
# video backends, and on Apple devices for the Metal video backend.
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR APPLE)
|
||||||
|
9
Externals/glslang/CMakeLists.txt
vendored
9
Externals/glslang/CMakeLists.txt
vendored
@@ -1,7 +1,6 @@
|
|||||||
set(ENABLE_PCH OFF)
|
set(ENABLE_PCH OFF)
|
||||||
set(BUILD_EXTERNAL OFF)
|
set(BUILD_EXTERNAL OFF)
|
||||||
set(SKIP_GLSLANG_INSTALL ON)
|
set(SKIP_GLSLANG_INSTALL ON)
|
||||||
set(ENABLE_SPVREMAPPER OFF)
|
|
||||||
set(ENABLE_GLSLANG_BINARIES OFF)
|
set(ENABLE_GLSLANG_BINARIES OFF)
|
||||||
set(ENABLE_HLSL OFF)
|
set(ENABLE_HLSL OFF)
|
||||||
set(ENABLE_OPT OFF)
|
set(ENABLE_OPT OFF)
|
||||||
@@ -10,5 +9,13 @@ set(ENABLE_EXCEPTIONS OFF)
|
|||||||
add_subdirectory(glslang)
|
add_subdirectory(glslang)
|
||||||
|
|
||||||
if (TARGET glslang)
|
if (TARGET glslang)
|
||||||
|
target_include_directories(glslang
|
||||||
|
# Silence warnings on glslang by flagging it as a system include
|
||||||
|
SYSTEM PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/glslang>
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/glslang/Public>
|
||||||
|
PUBLIC
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
)
|
||||||
dolphin_disable_warnings(glslang)
|
dolphin_disable_warnings(glslang)
|
||||||
endif()
|
endif()
|
||||||
|
1
Externals/glslang/exports.props
vendored
1
Externals/glslang/exports.props
vendored
@@ -2,6 +2,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(ExternalsDir)glslang;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalIncludeDirectories>$(ExternalsDir)glslang\glslang;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ExternalsDir)glslang\glslang;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalIncludeDirectories>$(ExternalsDir)glslang\glslang\glslang;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ExternalsDir)glslang\glslang\glslang;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalIncludeDirectories>$(ExternalsDir)glslang\glslang\glslang\Public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ExternalsDir)glslang\glslang\glslang\Public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
2
Externals/glslang/glslang
vendored
2
Externals/glslang/glslang
vendored
Submodule Externals/glslang/glslang updated: 8a85691a07...a57276bf55
@@ -12,15 +12,8 @@ PUBLIC
|
|||||||
common
|
common
|
||||||
videocommon
|
videocommon
|
||||||
spirv_cross
|
spirv_cross
|
||||||
)
|
PRIVATE
|
||||||
|
glslang::glslang
|
||||||
target_include_directories(videod3dcommon
|
|
||||||
SYSTEM PUBLIC
|
|
||||||
${CMAKE_SOURCE_DIR}/Externals/glslang/glslang/Public
|
|
||||||
SYSTEM PRIVATE
|
|
||||||
${CMAKE_SOURCE_DIR}/Externals/glslang/StandAlone
|
|
||||||
${CMAKE_SOURCE_DIR}/Externals/glslang/SPIRV
|
|
||||||
${CMAKE_SOURCE_DIR}/Externals/glslang
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
#include <glslang/SPIRV/disassemble.h>
|
||||||
#include <wrl/client.h>
|
#include <wrl/client.h>
|
||||||
#include "disassemble.h"
|
|
||||||
#include "spirv_hlsl.hpp"
|
#include "spirv_hlsl.hpp"
|
||||||
|
|
||||||
#include "Common/Assert.h"
|
#include "Common/Assert.h"
|
||||||
|
@@ -35,6 +35,7 @@ PUBLIC
|
|||||||
videocommon
|
videocommon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
spirv_cross
|
spirv_cross
|
||||||
|
glslang::glslang
|
||||||
${FOUNDATION_LIBRARY}
|
${FOUNDATION_LIBRARY}
|
||||||
${METAL_LIBRARY}
|
${METAL_LIBRARY}
|
||||||
${QUARTZCORE_LIBRARY}
|
${QUARTZCORE_LIBRARY}
|
||||||
|
@@ -44,7 +44,7 @@ PUBLIC
|
|||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
# Link against glslang, the other necessary libraries are referenced by the executable.
|
# Link against glslang, the other necessary libraries are referenced by the executable.
|
||||||
glslang
|
glslang::glslang
|
||||||
xxhash::xxhash
|
xxhash::xxhash
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -224,7 +224,7 @@ PRIVATE
|
|||||||
xxhash::xxhash
|
xxhash::xxhash
|
||||||
imgui
|
imgui
|
||||||
implot
|
implot
|
||||||
glslang
|
glslang::glslang
|
||||||
tinygltf
|
tinygltf
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -267,16 +267,6 @@ if(FFmpeg_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Silence warnings on glslang by flagging it as a system include
|
|
||||||
target_include_directories(videocommon
|
|
||||||
SYSTEM PUBLIC
|
|
||||||
${CMAKE_SOURCE_DIR}/Externals/glslang/glslang/glslang/Public
|
|
||||||
SYSTEM PRIVATE
|
|
||||||
${CMAKE_SOURCE_DIR}/Externals/glslang/glslang/glslang
|
|
||||||
${CMAKE_SOURCE_DIR}/Externals/glslang/glslang/SPIRV
|
|
||||||
${CMAKE_SOURCE_DIR}/Externals/glslang/glslang
|
|
||||||
)
|
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# Add precompiled header
|
# Add precompiled header
|
||||||
target_link_libraries(videocommon PRIVATE use_pch)
|
target_link_libraries(videocommon PRIVATE use_pch)
|
||||||
|
@@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
#include "VideoCommon/Spirv.h"
|
#include "VideoCommon/Spirv.h"
|
||||||
|
|
||||||
// glslang includes
|
#include <glslang/SPIRV/GlslangToSpv.h>
|
||||||
#include "GlslangToSpv.h"
|
#include <glslang/SPIRV/disassemble.h>
|
||||||
#include "disassemble.h"
|
|
||||||
|
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/Logging/Log.h"
|
#include "Common/Logging/Log.h"
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "ShaderLang.h"
|
#include <glslang/Public/ShaderLang.h>
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "VideoCommon/VideoCommon.h"
|
#include "VideoCommon/VideoCommon.h"
|
||||||
|
Reference in New Issue
Block a user