[packages/glslang] - updated to 8.13.3559 - removed outdated runtests patch, just use new runtests arguments - added vu

qboosh qboosh at pld-linux.org
Sun Mar 15 07:59:51 CET 2020


commit fd4cb220c9b8a2f3c24e6bcd4174e7643338335b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Mar 15 08:00:53 2020 +0100

    - updated to 8.13.3559
    - removed outdated runtests patch, just use new runtests arguments
    - added vulkan1.2 patch (Vulkan 1.2 support, required for shaderc 2019.1)

 glslang-vulkan1.2.patch | 126 ++++++++++++++++++++++++++++++++++++++++++++++++
 glslang.spec            |  25 +++++++---
 runtests.patch          |  17 -------
 3 files changed, 144 insertions(+), 24 deletions(-)
---
diff --git a/glslang.spec b/glslang.spec
index 16dcb14..f1f972e 100644
--- a/glslang.spec
+++ b/glslang.spec
@@ -6,18 +6,19 @@
 Summary:	Khronos reference front-end for GLSL and ESSL
 Summary(pl.UTF-8):	Wzorcowy frontend GLSL i ESSL z projektu Khronos
 Name:		glslang
-Version:	7.12.3352
-Release:	2
+Version:	8.13.3559
+Release:	1
 License:	BSD-like
 Group:		Applications/Graphics
 #Source0Download: https://github.com/KhronosGroup/glslang/releases
 Source0:	https://github.com/KhronosGroup/glslang/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	b31bc89ffa86dbb5ab638c9c2a412302
-Patch0:		runtests.patch
+# Source0-md5:	cb32322377cee2bc1cee5b60ebe46133
+# https://github.com/KhronosGroup/glslang/commit/273d3a50931951b52c5b1f46ea583c786f1be6c8.patch
+Patch0:		%{name}-vulkan1.2.patch
 Patch1:		%{name}-system-spirv.patch
 URL:		https://github.com/KhronosGroup/glslang
 BuildRequires:	bison
-BuildRequires:	cmake >= 2.8.11
+BuildRequires:	cmake >= 2.8.12
 BuildRequires:	libstdc++-devel >= 6:4.7
 %if %{with tests} || %{with spirv_opt}
 BuildRequires:	spirv-tools-devel
@@ -62,7 +63,8 @@ cd ..
 
 %if %{with tests}
 cd Test
-./runtests
+LD_LIBRARY_PATH=../build/StandAlone
+./runtests localResults ../build/StandAlone/glslangValidator ../build/StandAlone/spirv-remap
 cd ..
 %endif
 
@@ -77,7 +79,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README-spirv-remap.txt
+%doc LICENSE.txt README-spirv-remap.txt
 %attr(755,root,root) %{_bindir}/glslangValidator
 %attr(755,root,root) %{_bindir}/spirv-remap
 %attr(755,root,root) %{_libdir}/libHLSL.so
@@ -93,3 +95,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libOSDependent.a
 %{_includedir}/SPIRV
 %{_includedir}/glslang
+%{_libdir}/cmake/HLSLTargets*.cmake
+%{_libdir}/cmake/OGLCompilerTargets*.cmake
+%{_libdir}/cmake/OSDependentTargets*.cmake
+%{_libdir}/cmake/SPIRVTargets*.cmake
+%{_libdir}/cmake/SPVRemapperTargets*.cmake
+%{_libdir}/cmake/glslang-default-resource-limitsTargets*.cmake
+%{_libdir}/cmake/glslangTargets*.cmake
+%{_libdir}/cmake/glslangValidatorTargets*.cmake
+%{_libdir}/cmake/spirv-remapTargets*.cmake
diff --git a/glslang-vulkan1.2.patch b/glslang-vulkan1.2.patch
new file mode 100644
index 0000000..077494e
--- /dev/null
+++ b/glslang-vulkan1.2.patch
@@ -0,0 +1,126 @@
+From 273d3a50931951b52c5b1f46ea583c786f1be6c8 Mon Sep 17 00:00:00 2001
+From: John Kessenich <cepheus at frii.com>
+Date: Wed, 15 Jan 2020 00:10:41 -0700
+Subject: [PATCH] SPV/Vulkan: Add support for Vulkan 1.2, which defaults to
+ SPIR-V 1.5.
+
+---
+ SPIRV/SpvTools.cpp                            |  2 ++
+ StandAlone/StandAlone.cpp                     | 28 ++++++++++++-------
+ Test/runtests                                 |  1 +
+ .../MachineIndependent/localintermediate.h    |  3 ++
+ glslang/Public/ShaderLang.h                   |  1 +
+ 5 files changed, 25 insertions(+), 10 deletions(-)
+
+diff --git a/SPIRV/SpvTools.cpp b/SPIRV/SpvTools.cpp
+index 7c3b03919..8db58c5f8 100644
+--- a/SPIRV/SpvTools.cpp
++++ b/SPIRV/SpvTools.cpp
+@@ -67,6 +67,8 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
+             logger->missingFunctionality("Target version for SPIRV-Tools validator");
+             return spv_target_env::SPV_ENV_VULKAN_1_1;
+         }
++    case glslang::EShTargetVulkan_1_2:
++        return spv_target_env::SPV_ENV_UNIVERSAL_1_5;  //?? should change to SPV_ENV_VULKAN_1_2, when available
+     default:
+         break;
+     }
+diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
+index 28c5e1509..6e4c8d30d 100644
+--- a/StandAlone/StandAlone.cpp
++++ b/StandAlone/StandAlone.cpp
+@@ -608,6 +608,9 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
+                             } else if (strcmp(argv[1], "vulkan1.1") == 0) {
+                                 setVulkanSpv();
+                                 ClientVersion = glslang::EShTargetVulkan_1_1;
++                            } else if (strcmp(argv[1], "vulkan1.2") == 0) {
++                                setVulkanSpv();
++                                ClientVersion = glslang::EShTargetVulkan_1_2;
+                             } else if (strcmp(argv[1], "opengl") == 0) {
+                                 setOpenGlSpv();
+                                 ClientVersion = glslang::EShTargetOpenGL_450;
+@@ -630,7 +633,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
+                                 TargetLanguage = glslang::EShTargetSpv;
+                                 TargetVersion = glslang::EShTargetSpv_1_5;
+                             } else
+-                                Error("--target-env expected one of: vulkan1.0, vulkan1.1, opengl,\n"
++                                Error("--target-env expected one of: vulkan1.0, vulkan1.1, vulkan1.2, opengl,\n"
+                                       "spirv1.0, spirv1.1, spirv1.2, spirv1.3, spirv1.4, or spirv1.5");
+                         }
+                         bumpArg();
+@@ -825,6 +828,10 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
+             TargetLanguage = glslang::EShTargetSpv;
+             TargetVersion = glslang::EShTargetSpv_1_3;
+             break;
++        case glslang::EShTargetVulkan_1_2:
++            TargetLanguage = glslang::EShTargetSpv;
++            TargetVersion = glslang::EShTargetSpv_1_5;
++            break;
+         case glslang::EShTargetOpenGL_450:
+             TargetLanguage = glslang::EShTargetSpv;
+             TargetVersion = glslang::EShTargetSpv_1_0;
+@@ -1640,16 +1647,17 @@ void usage()
+            "  --sep                             synonym for --source-entrypoint\n"
+            "  --stdin                           read from stdin instead of from a file;\n"
+            "                                    requires providing the shader stage using -S\n"
+-           "  --target-env {vulkan1.0 | vulkan1.1 | opengl | \n"
++           "  --target-env {vulkan1.0 | vulkan1.1 | vulkan1.2 | opengl | \n"
+            "                spirv1.0 | spirv1.1 | spirv1.2 | spirv1.3 | spirv1.4 | spirv1.5}\n"
+-           "                                    set execution environment that emitted code\n"
+-           "                                    will execute in (versus source language\n"
+-           "                                    semantics selected by --client) defaults:\n"
+-           "                                     * 'vulkan1.0' under '--client vulkan<ver>'\n"
+-           "                                     * 'opengl' under '--client opengl<ver>'\n"
+-           "                                     * 'spirv1.0' under --target-env vulkan1.0\n"
+-           "                                     * 'spirv1.3' under --target-env vulkan1.1\n"
+-           "                                    multiple --targen-env can be specified.\n"
++           "                                    Set the execution environment that the\n"
++           "                                    generated code will be executed in.\n"
++           "                                    Defaults to:\n"
++           "                                     * vulkan1.0 under --client vulkan<ver>\n"
++           "                                     * opengl    under --client opengl<ver>\n"
++           "                                     * spirv1.0  under --target-env vulkan1.0\n"
++           "                                     * spirv1.3  under --target-env vulkan1.1\n"
++           "                                     * spirv1.5  under --target-env vulkan1.2\n"
++           "                                    Multiple --target-env can be specified.\n"
+            "  --variable-name <name>\n"
+            "  --vn <name>                       creates a C header file that contains a\n"
+            "                                    uint32_t array named <name>\n"
+diff --git a/Test/runtests b/Test/runtests
+index d1ca221ff..1a7c7c941 100755
+--- a/Test/runtests
++++ b/Test/runtests
+@@ -189,6 +189,7 @@ $EXE --client vulkan100       spv.targetVulkan.vert || HASERROR=1
+ $EXE --client opengl100       spv.targetOpenGL.vert || HASERROR=1
+ $EXE --target-env vulkan1.0   spv.targetVulkan.vert || HASERROR=1
+ $EXE --target-env vulkan1.1   spv.targetVulkan.vert || HASERROR=1
++$EXE --target-env vulkan1.2   spv.targetVulkan.vert || HASERROR=1
+ $EXE --target-env opengl      spv.targetOpenGL.vert || HASERROR=1
+ $EXE -V100                    spv.targetVulkan.vert || HASERROR=1
+ $EXE -G100                    spv.targetOpenGL.vert || HASERROR=1
+diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h
+index cb172e5e9..683290af7 100644
+--- a/glslang/MachineIndependent/localintermediate.h
++++ b/glslang/MachineIndependent/localintermediate.h
+@@ -332,6 +332,9 @@ class TIntermediate {
+         case EShTargetVulkan_1_1:
+             processes.addProcess("target-env vulkan1.1");
+             break;
++        case EShTargetVulkan_1_2:
++            processes.addProcess("target-env vulkan1.2");
++            break;
+         default:
+             processes.addProcess("target-env vulkanUnknown");
+             break;
+diff --git a/glslang/Public/ShaderLang.h b/glslang/Public/ShaderLang.h
+index 4cc6c2f48..4fe5c7df1 100755
+--- a/glslang/Public/ShaderLang.h
++++ b/glslang/Public/ShaderLang.h
+@@ -145,6 +145,7 @@ typedef enum {
+ typedef enum {
+     EShTargetVulkan_1_0 = (1 << 22),                  // Vulkan 1.0
+     EShTargetVulkan_1_1 = (1 << 22) | (1 << 12),      // Vulkan 1.1
++    EShTargetVulkan_1_2 = (1 << 22) | (2 << 12),      // Vulkan 1.2
+     EShTargetOpenGL_450 = 450,                        // OpenGL
+ } EShTargetClientVersion;
+ 
diff --git a/runtests.patch b/runtests.patch
deleted file mode 100644
index eb3ac39..0000000
--- a/runtests.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -dur glslang-4678ca9dacfec7a084dbc69bbe568bdad6889f1b.orig/Test/runtests glslang-4678ca9dacfec7a084dbc69bbe568bdad6889f1b/Test/runtests
---- glslang-4678ca9dacfec7a084dbc69bbe568bdad6889f1b.orig/Test/runtests	2016-05-13 17:33:42.000000000 +0200
-+++ glslang-4678ca9dacfec7a084dbc69bbe568bdad6889f1b/Test/runtests	2016-07-14 10:00:43.000000000 +0200
-@@ -1,9 +1,11 @@
- #!/usr/bin/env bash
- 
-+export LD_LIBRARY_PATH=../build/StandAlone
-+
- TARGETDIR=localResults
- BASEDIR=baseResults
--EXE=../build/install/bin/glslangValidator
--REMAPEXE=../build/install/bin/spirv-remap
-+EXE=../build/StandAlone/glslangValidator
-+REMAPEXE=../build/StandAlone/spirv-remap
- HASERROR=0
- mkdir -p localResults
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glslang.git/commitdiff/fd4cb220c9b8a2f3c24e6bcd4174e7643338335b



More information about the pld-cvs-commit mailing list