build: Update glslang to e4821e
authorKarl Schultz <karl@lunarg.com>
Mon, 18 Jul 2016 15:40:37 +0000 (09:40 -0600)
committerKarl Schultz <karl@lunarg.com>
Mon, 18 Jul 2016 17:19:22 +0000 (11:19 -0600)
This includes applying a patch to glslang to revert glslang
commit a5c33d, which fixes a texel fetch problem that many IHV
drivers are not ready to cope with yet.

CMakeLists.txt
glslang_revert_a5c33d.patch.txt [new file with mode: 0644]
glslang_revision
update_external_sources.bat
update_external_sources.sh

index e5f3238..263002e 100644 (file)
@@ -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 (file)
index 0000000..0d7075c
--- /dev/null
@@ -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];
index ac7412c..9a03f5a 100644 (file)
@@ -1 +1 @@
-4678ca9dacfec7a084dbc69bbe568bdad6889f1b
+e4821e43c86d97bcf65fb07c1f70471b7102978d
index b72d7bc..d027313 100644 (file)
@@ -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
index 43992e2..f9f94ec 100755 (executable)
@@ -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
 }