From d736b3bcf458b17d2126a82d4d46e51157e6b6c8 Mon Sep 17 00:00:00 2001 From: oltolm Date: Tue, 26 Mar 2024 00:58:22 +0100 Subject: [PATCH] 3rdparty: update glslang submodule --- CMakeLists.txt | 2 +- Common/GPU/Shader.cpp | 2 ++ Common/GPU/ShaderTranslation.cpp | 1 + Common/GPU/Vulkan/VulkanContext.cpp | 1 + UWP/glslang_UWP/glslang_UWP.vcxproj | 4 +--- UWP/glslang_UWP/glslang_UWP.vcxproj.filters | 8 +------- ext/CMakeLists.txt | 7 ++----- ext/glslang | 2 +- ext/glslang-build/Android.mk | 3 +-- ext/glslang.vcxproj | 3 ++- libretro/Makefile.common | 1 - 11 files changed, 13 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1194fec7a3a0..f6cf703e4383 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2448,7 +2448,7 @@ endif() # target_link_libraries(native X11-xcb X11) #endif() -set(GlslangLibs glslang OGLCompiler OSDependent SPIRV spirv-cross-glsl) +set(GlslangLibs glslang OSDependent SPIRV spirv-cross-glsl) if (ENABLE_SPVREMAPPER) list(APPEND GlslangLibs SPVRemapper) diff --git a/Common/GPU/Shader.cpp b/Common/GPU/Shader.cpp index 1310c96118d8..f1a551a8f62f 100644 --- a/Common/GPU/Shader.cpp +++ b/Common/GPU/Shader.cpp @@ -1,4 +1,6 @@ #include "Common/GPU/Shader.h" +#include "glslang/Include/ResourceLimits.h" +#include #ifdef USE_CRT_DBG #undef new diff --git a/Common/GPU/ShaderTranslation.cpp b/Common/GPU/ShaderTranslation.cpp index ad8c1ee76b5f..a84fe0679b70 100644 --- a/Common/GPU/ShaderTranslation.cpp +++ b/Common/GPU/ShaderTranslation.cpp @@ -40,6 +40,7 @@ #include "Common/GPU/ShaderTranslation.h" #include "ext/glslang/SPIRV/GlslangToSpv.h" +#include "glslang/Public/ShaderLang.h" #include "Common/GPU/thin3d.h" #include "Common/GPU/Shader.h" #include "Common/GPU/OpenGL/GLFeatures.h" diff --git a/Common/GPU/Vulkan/VulkanContext.cpp b/Common/GPU/Vulkan/VulkanContext.cpp index d68776ed8d11..ec9c592286cf 100644 --- a/Common/GPU/Vulkan/VulkanContext.cpp +++ b/Common/GPU/Vulkan/VulkanContext.cpp @@ -26,6 +26,7 @@ #define SIMULATE_VULKAN_FAILURE 0 #include "ext/glslang/SPIRV/GlslangToSpv.h" +#include "glslang/Public/ShaderLang.h" #ifdef USE_CRT_DBG #define new DBG_NEW diff --git a/UWP/glslang_UWP/glslang_UWP.vcxproj b/UWP/glslang_UWP/glslang_UWP.vcxproj index efef2fce694b..de05045aca31 100644 --- a/UWP/glslang_UWP/glslang_UWP.vcxproj +++ b/UWP/glslang_UWP/glslang_UWP.vcxproj @@ -151,7 +151,6 @@ - @@ -209,7 +208,6 @@ - @@ -225,4 +223,4 @@ - \ No newline at end of file + diff --git a/UWP/glslang_UWP/glslang_UWP.vcxproj.filters b/UWP/glslang_UWP/glslang_UWP.vcxproj.filters index bff8201bc450..2436183aa476 100644 --- a/UWP/glslang_UWP/glslang_UWP.vcxproj.filters +++ b/UWP/glslang_UWP/glslang_UWP.vcxproj.filters @@ -160,9 +160,6 @@ glslang\OSDependent - - OGLCompilersDLL - glslang\MachineIndependent @@ -334,9 +331,6 @@ hlsl - - OGLCompilersDLL - glslang\MachineIndependent @@ -351,4 +345,4 @@ - \ No newline at end of file + diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index a6e06e112d13..0fa8aa486b0b 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -15,17 +15,14 @@ set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "let's not build binaries we don't ne set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS ON CACHE BOOL "let's not use exceptions" FORCE) set(ENABLE_SPVREMAPPER OFF CACHE BOOL "we don't need spvremapper" FORCE) -# This is really a workaround for an NDK 20 compiler issue (PPSSPP issue #12105), but shouldn't hurt. -if(ANDROID) -set(ENABLE_HLSL OFF CACHE BOOL "let's not build HLSL support we don't need" FORCE) -endif() - # This works around a bug in cpu_features when ${CMAKE_BINARY_DIR} != ${CMAKE_CURRENT_BINRARY_DIR}. # We also disable the list_cpu_features binary. add_subdirectory(cmake/cpu_features EXCLUDE_FROM_ALL) set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "" FORCE) set(ENABLE_GLSLANG_INSTALL OFF) +set(ENABLE_HLSL OFF CACHE BOOL "" FORCE) +set(ENABLE_OPT OFF CACHE BOOL "" FORCE) add_subdirectory(glslang EXCLUDE_FROM_ALL) add_subdirectory(snappy) add_subdirectory(lua-build) diff --git a/ext/glslang b/ext/glslang index b34f619e1c85..46ef757e048e 160000 --- a/ext/glslang +++ b/ext/glslang @@ -1 +1 @@ -Subproject commit b34f619e1c85810dcb3c578107d2e48ba4ee2b37 +Subproject commit 46ef757e048e760b46601e6e77ae0cb72c97bd2f diff --git a/ext/glslang-build/Android.mk b/ext/glslang-build/Android.mk index a08eaf0ec52c..48b672479942 100644 --- a/ext/glslang-build/Android.mk +++ b/ext/glslang-build/Android.mk @@ -53,8 +53,7 @@ LOCAL_SRC_FILES := \ ../glslang/SPIRV/SpvBuilder.cpp \ ../glslang/SPIRV/SPVRemapper.cpp \ ../glslang/SPIRV/SpvPostProcess.cpp \ - ../glslang/SPIRV/SpvTools.cpp \ - ../glslang/OGLCompilersDLL/InitializeDll.cpp + ../glslang/SPIRV/SpvTools.cpp LOCAL_CFLAGS := -O3 -fsigned-char -fno-strict-aliasing -Wall -Wno-multichar -D__STDC_CONSTANT_MACROS -DENABLE_HLSL diff --git a/ext/glslang.vcxproj b/ext/glslang.vcxproj index 2accb51d6e87..7da3f9c800ca 100644 --- a/ext/glslang.vcxproj +++ b/ext/glslang.vcxproj @@ -38,7 +38,7 @@ {EDFA2E87-8AC1-4853-95D4-D7594FF81947} Win32Proj glslang - 10.0 + $(LatestTargetPlatformVersion) @@ -164,6 +164,7 @@ Default true ProgramDatabase + stdcpp17 Windows diff --git a/libretro/Makefile.common b/libretro/Makefile.common index d58bc1e4bc09..b9d108f161ce 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -571,7 +571,6 @@ SOURCES_CXX += \ $(GPUDIR)/GLES/TextureCacheGLES.cpp \ $(GPUDIR)/GLES/ShaderManagerGLES.cpp \ $(GPUDIR)/GLES/StateMappingGLES.cpp \ - $(EXTDIR)/glslang/OGLCompilersDLL/InitializeDll.cpp \ $(EXTDIR)/glslang/glslang/GenericCodeGen/CodeGen.cpp \ $(EXTDIR)/glslang/glslang/GenericCodeGen/Link.cpp \ $(EXTDIR)/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp \