diff options
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | glslang_revert_a5c33d.patch.txt | 18 | ||||
-rw-r--r-- | glslang_revision | 2 | ||||
-rw-r--r-- | update_external_sources.bat | 12 | ||||
-rwxr-xr-x | update_external_sources.sh | 11 |
5 files changed, 34 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e5f32383..263002e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,15 +217,15 @@ if (WIN32) add_library(Loader STATIC IMPORTED) add_library(SPIRV-Tools STATIC IMPORTED) - find_library(GLSLANG_DLIB NAMES glslang + find_library(GLSLANG_DLIB NAMES glslangd HINTS ${GLSLANG_DEBUG_SEARCH_PATH} ) - find_library(OGLCompiler_DLIB NAMES OGLCompiler + find_library(OGLCompiler_DLIB NAMES OGLCompilerd HINTS ${GLSLANG_DEBUG_SEARCH_PATH} ) - find_library(OSDependent_DLIB NAMES OSDependent + find_library(OSDependent_DLIB NAMES OSDependentd HINTS ${GLSLANG_DEBUG_SEARCH_PATH} ) - find_library(HLSL_DLIB NAMES HLSL + find_library(HLSL_DLIB NAMES HLSLd HINTS ${GLSLANG_DEBUG_SEARCH_PATH} ) - find_library(SPIRV_DLIB NAMES SPIRV + find_library(SPIRV_DLIB NAMES SPIRVd HINTS ${GLSLANG_DEBUG_SEARCH_PATH} ) find_library(SPIRV_TOOLS_DLIB NAMES SPIRV-Tools HINTS ${SPIRV_TOOLS_DEBUG_SEARCH_PATH} ) diff --git a/glslang_revert_a5c33d.patch.txt b/glslang_revert_a5c33d.patch.txt new file mode 100644 index 00000000..0d7075c3 --- /dev/null +++ b/glslang_revert_a5c33d.patch.txt @@ -0,0 +1,18 @@ +diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp +index dd11304..aebc986 100755 +--- a/SPIRV/GlslangToSpv.cpp ++++ b/SPIRV/GlslangToSpv.cpp +@@ -2630,13 +2630,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO + bias = true; + } + +- // See if the sampler param should really be just the SPV image part +- if (cracked.fetch) { +- // a fetch needs to have the image extracted first +- if (builder.isSampledImage(params.sampler)) +- params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler); +- } +- + // set the rest of the arguments + + params.coords = arguments[1]; diff --git a/glslang_revision b/glslang_revision index ac7412cb..9a03f5a4 100644 --- a/glslang_revision +++ b/glslang_revision @@ -1 +1 @@ -4678ca9dacfec7a084dbc69bbe568bdad6889f1b +e4821e43c86d97bcf65fb07c1f70471b7102978d diff --git a/update_external_sources.bat b/update_external_sources.bat index b72d7bc6..d027313a 100644 --- a/update_external_sources.bat +++ b/update_external_sources.bat @@ -215,13 +215,9 @@ goto:eof cd %GLSLANG_DIR% git fetch --all git checkout %GLSLANG_REVISION% - REM Special case for this particular revision: - REM Pull in a patch that fixes a compilation issue with g++ 5.3 + REM Revert glslang a5c33d6ffb34ccede5b233bc724c907166b6e479 REM See https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/681 - if "%GLSLANG_REVISION%" == "4678ca9dacfec7a084dbc69bbe568bdad6889f1b" ( - git checkout %GLSLANG_REVISION% -B temp1610 - git cherry-pick 880bf36cacee1cfce7d5d94991eb18c9e2d59d39 - ) + git apply --whitespace=fix %BUILD_DIR%\glslang_revert_a5c33d.patch.txt goto:eof :create_spirv-tools @@ -289,7 +285,7 @@ goto:eof msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug /verbosity:quiet REM Check for existence of one lib, even though we should check for all results - if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslang.lib ( + if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslangd.lib ( echo. echo glslang 32-bit Debug build failed! set errorCode=1 @@ -319,7 +315,7 @@ goto:eof msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet REM Check for existence of one lib, even though we should check for all results - if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslang.lib ( + if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslangd.lib ( echo. echo glslang 64-bit Debug build failed! set errorCode=1 diff --git a/update_external_sources.sh b/update_external_sources.sh index 43992e21..f9f94ec3 100755 --- a/update_external_sources.sh +++ b/update_external_sources.sh @@ -25,13 +25,14 @@ function update_glslang () { cd $BASEDIR/glslang git fetch --all git checkout $GLSLANG_REVISION - # Special case for this particular revision: - # Pull in a patch that fixes a compilation issue with g++ 5.3 + # Revert glslang a5c33d6ffb34ccede5b233bc724c907166b6e479 # See https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/681 - if [ $GLSLANG_REVISION == "4678ca9dacfec7a084dbc69bbe568bdad6889f1b" ] ; + git diff-index --quiet HEAD | true + rc=${PIPESTATUS[0]} + if (( $rc == 0 )) then - git checkout $GLSLANG_REVISION -B temp1610 - git cherry-pick 880bf36cacee1cfce7d5d94991eb18c9e2d59d39 + echo "applying patch to revert glslang a5c33d" + git apply $BUILDDIR/glslang_revert_a5c33d.patch.txt fi } |