Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package shaderc for openSUSE:Factory checked 
in at 2022-08-24 15:10:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/shaderc (Old)
 and      /work/SRC/openSUSE:Factory/.shaderc.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "shaderc"

Wed Aug 24 15:10:36 2022 rev:17 rq:998744 version:2022.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/shaderc/shaderc.changes  2022-08-09 
15:26:10.385251578 +0200
+++ /work/SRC/openSUSE:Factory/.shaderc.new.2083/shaderc.changes        
2022-08-24 15:10:44.152479787 +0200
@@ -1,0 +2,6 @@
+Mon Aug 22 23:20:48 UTC 2022 - Jan Engelhardt <jeng...@inai.de>
+
+- Update to release 2022.2
+  * Add support for 16b-bit types in HLSL
+
+-------------------------------------------------------------------

Old:
----
  v2022.1.tar.gz

New:
----
  v2022.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ shaderc.spec ++++++
--- /var/tmp/diff_new_pack.N68w35/_old  2022-08-24 15:10:44.704480319 +0200
+++ /var/tmp/diff_new_pack.N68w35/_new  2022-08-24 15:10:44.708480323 +0200
@@ -19,7 +19,7 @@
 # Remember to bump in baselibs.conf
 %define lname libshaderc_shared1
 Name:           shaderc
-Version:        2022.1
+Version:        2022.2
 Release:        0
 Summary:        A collection of tools, libraries and tests for shader 
compilation
 License:        Apache-2.0
@@ -31,9 +31,9 @@
 Patch1:         0001-Use-system-third-party-libs.patch
 BuildRequires:  c++_compiler
 BuildRequires:  cmake >= 2.8.12
-BuildRequires:  glslang-devel >= 11.8.0
-BuildRequires:  spirv-headers >= 1.6.g6
-BuildRequires:  spirv-tools-devel >= 2022.2~sdk204
+BuildRequires:  glslang-devel >= 11.11.0
+BuildRequires:  spirv-headers >= 1.6.1~sdk224+git2
+BuildRequires:  spirv-tools-devel >= 2022.3
 
 %description
 A collection of tools, libraries and tests for shader compilation.

++++++ v2022.1.tar.gz -> v2022.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/CHANGES new/shaderc-2022.2/CHANGES
--- old/shaderc-2022.1/CHANGES  2022-02-02 18:36:45.000000000 +0100
+++ new/shaderc-2022.2/CHANGES  2022-08-12 16:30:24.000000000 +0200
@@ -1,6 +1,14 @@
 Revision history for Shaderc
 
-v2022.1 2022-01-27
+v2022.2 2022-08-11
+ - Require CMake 3.14 or later
+ - Support 16bit types in HLSL, via glslc option -fhlsl-16bit-types
+   and associated library API methods. PR #1251
+ - Update glslc tests for newer Glslang debug output
+ - Update SPIRV-Tools v2022.3 plus one patch
+ - Update SPIRV-Headers
+
+v2022.1 2022-02-03
  - Update DEPS to include two fixes on top of SPIRV-Tools v2022.1:
     - Validator handles Nontemporal image operand
     - Optimizer handles RayQueryKHR type
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/CMakeLists.txt 
new/shaderc-2022.2/CMakeLists.txt
--- old/shaderc-2022.1/CMakeLists.txt   2022-02-02 18:36:45.000000000 +0100
+++ new/shaderc-2022.2/CMakeLists.txt   2022-08-12 16:30:24.000000000 +0200
@@ -13,6 +13,12 @@
 # limitations under the License.
 
 cmake_minimum_required(VERSION 2.8.12)
+
+if (POLICY CMP00091)
+  # Enable MSVC Runtime Library Property
+  cmake_policy(SET CMP0091 NEW)
+endif()
+
 project(shaderc)
 enable_testing()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/DEPS new/shaderc-2022.2/DEPS
--- old/shaderc-2022.1/DEPS     2022-02-02 18:36:45.000000000 +0100
+++ new/shaderc-2022.2/DEPS     2022-08-12 16:30:24.000000000 +0200
@@ -5,11 +5,11 @@
   'khronos_git': 'https://github.com/KhronosGroup',
 
   'effcee_revision' : '2ec8f8738118cc483b67c04a759fee53496c5659',
-  'glslang_revision': 'c34bb3b6c55f6ab084124ad964be95a699700d34',
+  'glslang_revision': 'f771c1293dce29e1ac3557cf994169136155c81f',
   'googletest_revision': '389cb68b87193358358ae87cc56d257fd0d80189',
   're2_revision': '7107ebc4fbf7205151d8d2a57b2fc6e7853125d4',
-  'spirv_headers_revision': 'b42ba6d92faf6b4938e6f22ddd186dbdacc98d78',
-  'spirv_tools_revision': 'b846f8f1dc2d79f2b5ce27d5ad901f885da1cf82',
+  'spirv_headers_revision': '0bcc624926a25a2a273d07877fd25a6ff5ba1cfb',
+  'spirv_tools_revision': '3a8a961cffb7699422a05dcbafdd721226b4547d',
 }
 
 deps = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/README.md new/shaderc-2022.2/README.md
--- old/shaderc-2022.1/README.md        2022-02-02 18:36:45.000000000 +0100
+++ new/shaderc-2022.2/README.md        2022-08-12 16:30:24.000000000 +0200
@@ -162,7 +162,8 @@
 For building, testing, and profiling Shaderc, the following tools should be
 installed regardless of your OS:
 
-- [CMake](http://www.cmake.org/): for generating compilation targets.
+- [CMake](http://www.cmake.org/) 3.14 or later: for generating compilation 
targets.
+    - Shaderc is tested with cmake 3.17.2
 - [Python 3](http://www.python.org/): for utility scripts and running the test 
suite.
 
 On Linux, the following tools should be installed:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/glslc/README.asciidoc 
new/shaderc-2022.2/glslc/README.asciidoc
--- old/shaderc-2022.1/glslc/README.asciidoc    2022-02-02 18:36:45.000000000 
+0100
+++ new/shaderc-2022.2/glslc/README.asciidoc    2022-08-12 16:30:24.000000000 
+0200
@@ -20,6 +20,7 @@
 glslc [-c|-S|-E]
       [-x ...] [-std=standard]
       [ ... options for resource bindings ... ]
+      [-fhlsl-16bit-types]
       [-fhlsl-offsets]
       [-fhlsl-functionality1]
       [-fentry-point=<name>]
@@ -377,6 +378,11 @@
                  {0x07230203, 0x00010000, 0x00080001, 0x00000006...}
 |===
 
+[[option-fhlsl-16bit-types]]
+==== `-fhlsl-16bit-types`
+
+Enables 16bit types for HLSL compilation.
+
 [[option-fhlsl-offsets]]
 ==== `-fhlsl-offsets`
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/glslc/src/main.cc 
new/shaderc-2022.2/glslc/src/main.cc
--- old/shaderc-2022.1/glslc/src/main.cc        2022-02-02 18:36:45.000000000 
+0100
+++ new/shaderc-2022.2/glslc/src/main.cc        2022-08-12 16:30:24.000000000 
+0200
@@ -67,13 +67,15 @@
   -fentry-point=<name>
                     Specify the entry point name for HLSL compilation, for
                     all subsequent source files.  Default is "main".
+  -fhlsl-16bit-types
+                    Enable 16-bit type support for HLSL.
   -fhlsl_functionality1, -fhlsl-functionality1
                     Enable extension SPV_GOOGLE_hlsl_functionality1 for HLSL
                     compilation.
-  -finvert-y        Invert position.Y output in vertex shader.
   -fhlsl-iomap      Use HLSL IO mappings for bindings.
   -fhlsl-offsets    Use HLSL offset rules for packing members of blocks.
                     Affects only GLSL.  HLSL rules are always used for HLSL.
+  -finvert-y        Invert position.Y output in vertex shader.
   -flimit=<settings>
                     Specify resource limits. Each limit is specified by a limit
                     name followed by an integer value.  Tokens should be
@@ -322,6 +324,8 @@
     } else if (arg == "-fhlsl_functionality1" ||
                arg == "-fhlsl-functionality1") {
       compiler.options().SetHlslFunctionality1(true);
+    } else if (arg == "-fhlsl-16bit-types") {
+      compiler.options().SetHlsl16BitTypes(true);
     } else if (arg == "-finvert-y") {
       compiler.options().SetInvertY(true);
     } else if (arg == "-fnan-clamp") {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/glslc/test/option_dash_cap_O.py 
new/shaderc-2022.2/glslc/test/option_dash_cap_O.py
--- old/shaderc-2022.1/glslc/test/option_dash_cap_O.py  2022-02-02 
18:36:45.000000000 +0100
+++ new/shaderc-2022.2/glslc/test/option_dash_cap_O.py  2022-08-12 
16:30:24.000000000 +0200
@@ -43,6 +43,7 @@
     '               OpName %main "main"\n',
     '       %void = OpTypeVoid\n',
     '          %4 = OpTypeFunction %void\n',
+    '               OpLine %1 2 11\n',
     '       %main = OpFunction %void None %4\n',
     '          %6 = OpLabel\n',
     '               OpReturn\n',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shaderc-2022.1/glslc/test/option_fhlsl_16bit_types.py 
new/shaderc-2022.2/glslc/test/option_fhlsl_16bit_types.py
--- old/shaderc-2022.1/glslc/test/option_fhlsl_16bit_types.py   1970-01-01 
01:00:00.000000000 +0100
+++ new/shaderc-2022.2/glslc/test/option_fhlsl_16bit_types.py   2022-08-12 
16:30:24.000000000 +0200
@@ -0,0 +1,46 @@
+# Copyright 2018 The Shaderc Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import expect
+from glslc_test_framework import inside_glslc_testsuite
+from placeholder import FileShader
+
+HLSL_SHADER_WITH_HALF_TYPE = """
+float4 main() : SV_Target0 {
+  half h0 = (half)0.0;
+  half h1 = (half)1.0;
+  half h2 = (half)2.0;
+  half h3 = (half)3.0;
+  half4 v = (half4)(h0,h1,h2,h3) * (half)2.0;
+  return (float4)(v);
+}
+"""
+
+
+@inside_glslc_testsuite('OptionFHlsl16BitTypes')
+class TestHlsl16BitTypes_EnablesCapability(expect.ValidAssemblyFileWithSubstr):
+    """Tests that -fhlsl_16bit_types enables the 16bit floating point 
capability."""
+
+    shader = FileShader(HLSL_SHADER_WITH_HALF_TYPE, '.frag')
+    glslc_args = ['-S', '-x', 'hlsl', '-fhlsl-16bit-types', 
'-fauto-bind-uniforms', shader]
+    expected_assembly_substr = 'OpCapability Float16';
+
+
+@inside_glslc_testsuite('OptionFHlsl16BitTypes')
+class TestHlsl16BitTypes_CreatesType(expect.ValidAssemblyFileWithSubstr):
+    """Tests that -fhlsl_16bit_types creates the 16bit floating point 
capability."""
+
+    shader = FileShader(HLSL_SHADER_WITH_HALF_TYPE, '.frag')
+    glslc_args = ['-S', '-x', 'hlsl', '-fhlsl-16bit-types', 
'-fauto-bind-uniforms', shader]
+    expected_assembly_substr = '= OpTypeFloat 16';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/glslc/test/parameter_tests.py 
new/shaderc-2022.2/glslc/test/parameter_tests.py
--- old/shaderc-2022.1/glslc/test/parameter_tests.py    2022-02-02 
18:36:45.000000000 +0100
+++ new/shaderc-2022.2/glslc/test/parameter_tests.py    2022-08-12 
16:30:24.000000000 +0200
@@ -71,13 +71,15 @@
   -fentry-point=<name>
                     Specify the entry point name for HLSL compilation, for
                     all subsequent source files.  Default is "main".
+  -fhlsl-16bit-types
+                    Enable 16-bit type support for HLSL.
   -fhlsl_functionality1, -fhlsl-functionality1
                     Enable extension SPV_GOOGLE_hlsl_functionality1 for HLSL
                     compilation.
-  -finvert-y        Invert position.Y output in vertex shader.
   -fhlsl-iomap      Use HLSL IO mappings for bindings.
   -fhlsl-offsets    Use HLSL offset rules for packing members of blocks.
                     Affects only GLSL.  HLSL rules are always used for HLSL.
+  -finvert-y        Invert position.Y output in vertex shader.
   -flimit=<settings>
                     Specify resource limits. Each limit is specified by a limit
                     name followed by an integer value.  Tokens should be
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shaderc-2022.1/kokoro/android-release/build-docker.sh 
new/shaderc-2022.2/kokoro/android-release/build-docker.sh
--- old/shaderc-2022.1/kokoro/android-release/build-docker.sh   1970-01-01 
01:00:00.000000000 +0100
+++ new/shaderc-2022.2/kokoro/android-release/build-docker.sh   2022-08-12 
16:30:24.000000000 +0200
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+# Copyright (C) 2017-2022 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Android Build Script.
+
+
+# Fail on any error.
+set -e
+
+. /bin/using.sh # Declare the bash `using` function for configuring toolchains.
+
+# Display commands being run.
+set -x
+
+using cmake-3.17.2
+using ninja-1.10.0
+using ndk-r21d # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir
+
+cd $ROOT_DIR
+./utils/git-sync-deps
+
+mkdir build
+cd $ROOT_DIR/build
+
+# Invoke the build.
+BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT}
+echo $(date): Starting build...
+cmake \
+  -GNinja \
+  -DCMAKE_MAKE_PROGRAM=ninja \
+  -DCMAKE_BUILD_TYPE=Release \
+  -DANDROID_ABI="$TARGET_ARCH" \
+  -DSHADERC_SKIP_TESTS=ON \
+  -DSPIRV_SKIP_TESTS=ON \
+  -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake 
\
+  -DANDROID_NDK=$ANDROID_NDK_HOME ..
+
+echo $(date): Build glslang...
+ninja glslangValidator
+
+echo $(date): Build everything...
+ninja
+
+echo $(date): Check Shaderc for copyright notices...
+ninja check-copyright
+
+echo $(date): Build completed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/kokoro/android-release/build.sh 
new/shaderc-2022.2/kokoro/android-release/build.sh
--- old/shaderc-2022.1/kokoro/android-release/build.sh  2022-02-02 
18:36:45.000000000 +0100
+++ new/shaderc-2022.2/kokoro/android-release/build.sh  2022-08-12 
16:30:24.000000000 +0200
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (C) 2017 Google Inc.
+# Copyright (C) 2020-2022 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,46 +14,25 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-# Android Build Script.
+# Linux Build Script.
 
+set -e # Fail on any error.
 
-# Fail on any error.
-set -e
-# Display commands being run.
-set -x
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
+ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )"
 
-BUILD_ROOT=$PWD
-SRC=$PWD/github/shaderc
-TARGET_ARCH=$1
+TARGET_ARCH="$1"
 
-# Get NINJA.
-wget -q 
https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip
-unzip -q ninja-linux.zip
-NINJA=$PWD/ninja
-
-# Get Android NDK.
-wget -q 
https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip
-unzip -q android-ndk-r18b-linux-x86_64.zip
-NDK=$PWD/android-ndk-r18b
-
-cd $SRC
-./utils/git-sync-deps
-
-mkdir build
-cd $SRC/build
-
-# Invoke the build.
-BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT}
-echo $(date): Starting build...
-cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=$NINJA 
-DANDROID_ABI=$TARGET_ARCH -DSHADERC_SKIP_TESTS=ON -DSPIRV_SKIP_TESTS=ON 
-DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake 
-DANDROID_NDK=$NDK ..
-
-echo $(date): Build glslang...
-$NINJA glslangValidator
-
-echo $(date): Build everything...
-$NINJA
-
-echo $(date): Check Shaderc for copyright notices...
-$NINJA check-copyright
-
-echo $(date): Build completed.
+# --privileged is required for some sanitizer builds, as they seem to require
+# PTRACE privileges
+docker run --rm -i \
+  --privileged \
+  --volume "${ROOT_DIR}:${ROOT_DIR}" \
+  --volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \
+  --workdir "${ROOT_DIR}" \
+  --env ROOT_DIR="${ROOT_DIR}" \
+  --env SCRIPT_DIR="${SCRIPT_DIR}" \
+  --env TARGET_ARCH="${TARGET_ARCH}" \
+  --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \
+  --entrypoint "${SCRIPT_DIR}/build-docker.sh" \
+  "gcr.io/shaderc-build/radial-build:latest"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/libshaderc/include/shaderc/shaderc.h 
new/shaderc-2022.2/libshaderc/include/shaderc/shaderc.h
--- old/shaderc-2022.1/libshaderc/include/shaderc/shaderc.h     2022-02-02 
18:36:45.000000000 +0100
+++ new/shaderc-2022.2/libshaderc/include/shaderc/shaderc.h     2022-08-12 
16:30:24.000000000 +0200
@@ -461,6 +461,10 @@
 SHADERC_EXPORT void shaderc_compile_options_set_hlsl_functionality1(
     shaderc_compile_options_t options, bool enable);
 
+// Sets whether 16-bit types are supported in HLSL or not.
+SHADERC_EXPORT void shaderc_compile_options_set_hlsl_16bit_types(
+    shaderc_compile_options_t options, bool enable);
+
 // Sets whether the compiler should invert position.Y output in vertex shader.
 SHADERC_EXPORT void shaderc_compile_options_set_invert_y(
     shaderc_compile_options_t options, bool enable);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shaderc-2022.1/libshaderc/include/shaderc/shaderc.hpp 
new/shaderc-2022.2/libshaderc/include/shaderc/shaderc.hpp
--- old/shaderc-2022.1/libshaderc/include/shaderc/shaderc.hpp   2022-02-02 
18:36:45.000000000 +0100
+++ new/shaderc-2022.2/libshaderc/include/shaderc/shaderc.hpp   2022-08-12 
16:30:24.000000000 +0200
@@ -342,6 +342,11 @@
     shaderc_compile_options_set_hlsl_functionality1(options_, enable);
   }
 
+  // Sets whether 16-bit types are supported in HLSL or not.
+  void SetHlsl16BitTypes(bool enable) {
+    shaderc_compile_options_set_hlsl_16bit_types(options_, enable);
+  }
+
   // Sets whether the compiler should invert position.Y output in vertex 
shader.
   void SetInvertY(bool enable) {
     shaderc_compile_options_set_invert_y(options_, enable);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/libshaderc/src/shaderc.cc 
new/shaderc-2022.2/libshaderc/src/shaderc.cc
--- old/shaderc-2022.1/libshaderc/src/shaderc.cc        2022-02-02 
18:36:45.000000000 +0100
+++ new/shaderc-2022.2/libshaderc/src/shaderc.cc        2022-08-12 
16:30:24.000000000 +0200
@@ -552,6 +552,11 @@
   options->compiler.EnableHlslFunctionality1(enable);
 }
 
+void shaderc_compile_options_set_hlsl_16bit_types(
+    shaderc_compile_options_t options, bool enable) {
+  options->compiler.EnableHlsl16BitTypes(enable);
+}
+
 void shaderc_compile_options_set_invert_y(
     shaderc_compile_options_t options, bool enable) {
   options->compiler.EnableInvertY(enable);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shaderc-2022.1/libshaderc_util/include/libshaderc_util/compiler.h 
new/shaderc-2022.2/libshaderc_util/include/libshaderc_util/compiler.h
--- old/shaderc-2022.1/libshaderc_util/include/libshaderc_util/compiler.h       
2022-02-02 18:36:45.000000000 +0100
+++ new/shaderc-2022.2/libshaderc_util/include/libshaderc_util/compiler.h       
2022-08-12 16:30:24.000000000 +0200
@@ -210,6 +210,7 @@
         hlsl_offsets_(false),
         hlsl_legalization_enabled_(true),
         hlsl_functionality1_enabled_(false),
+        hlsl_16bit_types_enabled_(false),
         invert_y_enabled_(false),
         nan_clamp_(false),
         hlsl_explicit_bindings_() {}
@@ -228,6 +229,9 @@
   // Enables or disables extension SPV_GOOGLE_hlsl_functionality1
   void EnableHlslFunctionality1(bool enable);
 
+  // Enables or disables HLSL 16-bit types.
+  void EnableHlsl16BitTypes(bool enable);
+
   // Enables or disables invert position.Y output in vertex shader.
   void EnableInvertY(bool enable);
 
@@ -528,6 +532,9 @@
   // True if the compiler should support extension 
SPV_GOOGLE_hlsl_functionality1.
   bool hlsl_functionality1_enabled_;
 
+  // True if the compiler should support 16-bit HLSL types.
+  bool hlsl_16bit_types_enabled_;
+
   // True if the compiler should invert position.Y output in vertex shader.
   bool invert_y_enabled_;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2022.1/libshaderc_util/src/compiler.cc 
new/shaderc-2022.2/libshaderc_util/src/compiler.cc
--- old/shaderc-2022.1/libshaderc_util/src/compiler.cc  2022-02-02 
18:36:45.000000000 +0100
+++ new/shaderc-2022.2/libshaderc_util/src/compiler.cc  2022-08-12 
16:30:24.000000000 +0200
@@ -72,7 +72,8 @@
 // only valid combinations are used.
 EShMessages GetMessageRules(shaderc_util::Compiler::TargetEnv env,
                             shaderc_util::Compiler::SourceLanguage lang,
-                            bool hlsl_offsets, bool debug_info) {
+                            bool hlsl_offsets, bool hlsl_16bit_types,
+                            bool debug_info) {
   using shaderc_util::Compiler;
   EShMessages result = EShMsgCascadingErrors;
   if (lang == Compiler::SourceLanguage::HLSL) {
@@ -94,6 +95,9 @@
   if (hlsl_offsets) {
     result = static_cast<EShMessages>(result | EShMsgHlslOffsets);
   }
+  if (hlsl_16bit_types) {
+    result = static_cast<EShMessages>(result | EShMsgHlslEnable16BitTypes);
+  }
   if (debug_info) {
     result = static_cast<EShMessages>(result | EShMsgDebugInfo);
   }
@@ -294,7 +298,7 @@
 
   const EShMessages rules =
       GetMessageRules(target_env_, source_language_, hlsl_offsets_,
-                      generate_debug_info_);
+                      hlsl_16bit_types_enabled_, generate_debug_info_);
 
   bool success = shader.parse(&limits_, default_version_, default_profile_,
                               force_version_profile_, kNotForwardCompatible,
@@ -444,6 +448,10 @@
   hlsl_functionality1_enabled_ = enable;
 }
 
+void Compiler::EnableHlsl16BitTypes(bool enable) {
+  hlsl_16bit_types_enabled_ = enable;
+}
+
 void Compiler::EnableInvertY(bool enable) { invert_y_enabled_ = enable; }
 
 void Compiler::SetNanClamp(bool enable) { nan_clamp_ = enable; }
@@ -481,7 +489,7 @@
   const auto rules = static_cast<EShMessages>(
       EShMsgOnlyPreprocessor |
       GetMessageRules(target_env_, source_language_, hlsl_offsets_,
-                      false));
+                      hlsl_16bit_types_enabled_, false));
 
   std::string preprocessed_shader;
   const bool success = shader.preprocess(

Reply via email to