Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package qt6-shadertools for openSUSE:Factory 
checked in at 2021-11-04 16:09:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-shadertools (Old)
 and      /work/SRC/openSUSE:Factory/.qt6-shadertools.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qt6-shadertools"

Thu Nov  4 16:09:26 2021 rev:9 rq:928718 version:6.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-shadertools/qt6-shadertools.changes  
2021-10-04 18:41:18.238188029 +0200
+++ 
/work/SRC/openSUSE:Factory/.qt6-shadertools.new.1890/qt6-shadertools.changes    
    2021-11-04 16:09:46.405053976 +0100
@@ -1,0 +2,7 @@
+Tue Oct 26 11:22:57 UTC 2021 - Christophe Giboudeaux <[email protected]>
+
+- Update to 6.2.1
+  * https://www.qt.io/blog/qt-6.2.1-released
+
+
+-------------------------------------------------------------------

Old:
----
  qtshadertools-everywhere-src-6.2.0.tar.xz

New:
----
  qtshadertools-everywhere-src-6.2.1.tar.xz

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

Other differences:
------------------
++++++ qt6-shadertools.spec ++++++
--- /var/tmp/diff_new_pack.FN5fcU/_old  2021-11-04 16:09:47.145054408 +0100
+++ /var/tmp/diff_new_pack.FN5fcU/_new  2021-11-04 16:09:47.149054410 +0100
@@ -16,7 +16,7 @@
 #
 
 
-%define real_version 6.2.0
+%define real_version 6.2.1
 %define short_version 6.2
 %define tar_name qtshadertools-everywhere-src
 %define tar_suffix %{nil}
@@ -27,7 +27,7 @@
 %endif
 #
 Name:           qt6-shadertools%{?pkg_suffix}
-Version:        6.2.0
+Version:        6.2.1
 Release:        0
 Summary:        Qt 6 ShaderTools library
 License:        GPL-3.0-or-later

++++++ qtshadertools-everywhere-src-6.2.0.tar.xz -> 
qtshadertools-everywhere-src-6.2.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtshadertools-everywhere-src-6.2.0/.cmake.conf 
new/qtshadertools-everywhere-src-6.2.1/.cmake.conf
--- old/qtshadertools-everywhere-src-6.2.0/.cmake.conf  2021-09-24 
20:58:18.000000000 +0200
+++ new/qtshadertools-everywhere-src-6.2.1/.cmake.conf  2021-10-21 
08:23:03.000000000 +0200
@@ -1,2 +1,2 @@
-set(QT_REPO_MODULE_VERSION "6.2.0")
-set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
+set(QT_REPO_MODULE_VERSION "6.2.1")
+set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtshadertools-everywhere-src-6.2.0/.qmake.conf 
new/qtshadertools-everywhere-src-6.2.1/.qmake.conf
--- old/qtshadertools-everywhere-src-6.2.0/.qmake.conf  2021-09-24 
20:58:18.000000000 +0200
+++ new/qtshadertools-everywhere-src-6.2.1/.qmake.conf  2021-10-21 
08:23:03.000000000 +0200
@@ -3,4 +3,4 @@
 CONFIG += warning_clean
 DEFINES += QT_NO_FOREACH
 
-MODULE_VERSION = 6.2.0
+MODULE_VERSION = 6.2.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtshadertools-everywhere-src-6.2.0/.tag 
new/qtshadertools-everywhere-src-6.2.1/.tag
--- old/qtshadertools-everywhere-src-6.2.0/.tag 2021-09-24 20:58:18.000000000 
+0200
+++ new/qtshadertools-everywhere-src-6.2.1/.tag 2021-10-21 08:23:03.000000000 
+0200
@@ -1 +1 @@
-d293da49d39d7bbc4faf370764b91bcad89cb4a9
+36eb23c07dc6386e34a19591442f8e7e2c6395a9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtshadertools-everywhere-src-6.2.0/CMakeLists.txt 
new/qtshadertools-everywhere-src-6.2.1/CMakeLists.txt
--- old/qtshadertools-everywhere-src-6.2.0/CMakeLists.txt       2021-09-24 
20:58:18.000000000 +0200
+++ new/qtshadertools-everywhere-src-6.2.1/CMakeLists.txt       2021-10-21 
08:23:03.000000000 +0200
@@ -1,6 +1,6 @@
 # Generated from qtshadertools.pro.
 
-cmake_minimum_required(VERSION 3.15.0)
+cmake_minimum_required(VERSION 3.16)
 
 include(.cmake.conf)
 project(QtShaderTools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtshadertools-everywhere-src-6.2.0/dependencies.yaml 
new/qtshadertools-everywhere-src-6.2.1/dependencies.yaml
--- old/qtshadertools-everywhere-src-6.2.0/dependencies.yaml    2021-09-24 
20:58:18.000000000 +0200
+++ new/qtshadertools-everywhere-src-6.2.1/dependencies.yaml    2021-10-21 
08:23:03.000000000 +0200
@@ -1,4 +1,4 @@
 dependencies:
   ../qtbase:
-    ref: cc60cf83db6bbf9775b1f7747a48d6b7eb24e585
+    ref: 9fa805f7f8dfe96d561e9ed3170770ad768baf93
     required: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qshaderbaker_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qshaderbaker_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qshaderbaker_p.h
   2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qshaderbaker_p.h
   1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/shadertools/qshaderbaker_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qshaderbatchablerewriter_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qshaderbatchablerewriter_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qshaderbatchablerewriter_p.h
       2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qshaderbatchablerewriter_p.h
       1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/shadertools/qshaderbatchablerewriter_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvcompiler_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvcompiler_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvcompiler_p.h
 2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvcompiler_p.h
 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/shadertools/qspirvcompiler_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvshader_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvshader_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvshader_p.h
   2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvshader_p.h
   1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/shadertools/qspirvshader_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvshaderremap_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvshaderremap_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvshaderremap_p.h
      2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qspirvshaderremap_p.h
      1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/shadertools/qspirvshaderremap_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qtshadertoolsglobal_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qtshadertoolsglobal_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.0/QtShaderTools/private/qtshadertoolsglobal_p.h
    2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.0/QtShaderTools/private/qtshadertoolsglobal_p.h
    1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/shadertools/qtshadertoolsglobal_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qshaderbaker_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qshaderbaker_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qshaderbaker_p.h
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qshaderbaker_p.h
   2021-10-21 08:23:03.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/shadertools/qshaderbaker_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qshaderbatchablerewriter_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qshaderbatchablerewriter_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qshaderbatchablerewriter_p.h
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qshaderbatchablerewriter_p.h
       2021-10-21 08:23:03.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/shadertools/qshaderbatchablerewriter_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvcompiler_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvcompiler_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvcompiler_p.h
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvcompiler_p.h
 2021-10-21 08:23:03.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/shadertools/qspirvcompiler_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvshader_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvshader_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvshader_p.h
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvshader_p.h
   2021-10-21 08:23:03.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/shadertools/qspirvshader_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvshaderremap_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvshaderremap_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvshaderremap_p.h
      1970-01-01 01:00:00.000000000 +0100
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qspirvshaderremap_p.h
      2021-10-21 08:23:03.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/shadertools/qspirvshaderremap_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qtshadertoolsglobal_p.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qtshadertoolsglobal_p.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/6.2.1/QtShaderTools/private/qtshadertoolsglobal_p.h
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/6.2.1/QtShaderTools/private/qtshadertoolsglobal_p.h
    2021-10-21 08:23:03.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/shadertools/qtshadertoolsglobal_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/qtshadertoolsversion.h
 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/qtshadertoolsversion.h
--- 
old/qtshadertools-everywhere-src-6.2.0/include/QtShaderTools/qtshadertoolsversion.h
 2021-09-25 17:40:16.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/include/QtShaderTools/qtshadertoolsversion.h
 2021-10-21 18:32:38.000000000 +0200
@@ -2,8 +2,8 @@
 #ifndef QT_QTSHADERTOOLS_VERSION_H
 #define QT_QTSHADERTOOLS_VERSION_H
 
-#define QTSHADERTOOLS_VERSION_STR "6.2.0"
+#define QTSHADERTOOLS_VERSION_STR "6.2.1"
 
-#define QTSHADERTOOLS_VERSION 0x060200
+#define QTSHADERTOOLS_VERSION 0x060201
 
 #endif // QT_QTSHADERTOOLS_VERSION_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/src/shadertools/doc/src/qtshadertools-build.qdoc
 
new/qtshadertools-everywhere-src-6.2.1/src/shadertools/doc/src/qtshadertools-build.qdoc
--- 
old/qtshadertools-everywhere-src-6.2.0/src/shadertools/doc/src/qtshadertools-build.qdoc
     2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/src/shadertools/doc/src/qtshadertools-build.qdoc
     2021-10-21 08:23:03.000000000 +0200
@@ -243,4 +243,22 @@
 
     \endlist
 
+    \section1 Substituting Hand-Crafted Shaders
+
+    The CMake integration also supports specifying replacements for
+    given versions of the shader in the resulting .qsb file. This in
+    effect is equivalent to running \l{QSB Manual}{qsb} with the
+    \c{-r} command-line option.
+
+    This is enabled by the following special syntax in the FILES list:
+
+    \badcode
+    FILES
+        
"shaders/externalsampler.frag@glsl,100es,shaders/externalsampler_gles.frag"
+    \endcode
+
+    The filename can be followed by any number of @-separated
+    replacement specifications. Each of these specifies the shading
+    language, the version, and the file from which the data is to be
+    read separated by commas. See the \l{QSB Manual} for details.
 */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/src/shadertools/doc/src/qtshadertools-qsb.qdoc
 
new/qtshadertools-everywhere-src-6.2.1/src/shadertools/doc/src/qtshadertools-qsb.qdoc
--- 
old/qtshadertools-everywhere-src-6.2.0/src/shadertools/doc/src/qtshadertools-qsb.qdoc
       2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/src/shadertools/doc/src/qtshadertools-qsb.qdoc
       2021-10-21 08:23:03.000000000 +0200
@@ -37,9 +37,11 @@
     spirv-opt, and generates \c{.qsb} files. Additionally, it can be
     used to inspect the contents of a \c{.qsb} package.
 
+    The application prints an overview of all available options when you run it
+    from the command line without passing any arguments:
+
     \badcode
 Usage: qsb [options] file
-Qt Shader Baker (using QShader from Qt 6.0.0)
 
 Options:
   -?, -h, --help               Displays help on commandline options.
@@ -64,7 +66,8 @@
   -t, --metallib               In combination with --msl builds a Metal library
                                with xcrun metal(lib) and stores that instead of
                                the source.
-  -D, --define <name[=value]>  Define macro
+  -D, --define <name[=value]>  Define macro. This argument can be specified
+                               multiple times.
   -p, --per-target             Enable per-target compilation. (instead of
                                source->SPIRV->targets, do source->SPIRV->target
                                separately for each target)
@@ -74,7 +77,15 @@
                                to be a shader pack. Result is written to the
                                output specified by -o. Pass -b to choose the
                                batchable variant.
-                               
<what>=reflect|spirv.<version>|glsl.<version>|...
+                               
<what>=reflect|spirv,<version>|glsl,<version>|...
+  -r, --replace <what>         Switches to replace mode. Replaces the specified
+                               shader in the shader pack with the contents of a
+                               file. This argument can be specified multiple
+                               times. Pass -b to choose the batchable variant.
+                               <what>=<target>,<filename> where
+                               <target>=spirv,<version>|glsl,<version>|...
+  -s, --silent                 Enables silent mode. Only fatal errors will be
+                               printed.
 
 Arguments:
   file                         Vulkan GLSL source file to compile
@@ -495,4 +506,88 @@
 
     \endlist
 
+    \section1 Working with GLSL Features Specific to OpenGL
+
+    It can sometimes be necessary to use shading language constructs that are
+    specific to OpenGL and GLSL, and are not applicable to other shading
+    languages, intermediate formats, and graphics APIs.
+
+    The prime examples of this are the external textures and samplers of OpenGL
+    ES. Implementing video playback or showing a camera viewfinder may involve,
+    depending on the platform, working with OpenGL texture objects that are not
+    meant to be used as regular 2D textures, but are rather usable, with a
+    limited feature set, via the
+    
\l{https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt}{GL_TEXTURE_EXTERNAL_OES}
+    binding point in the OpenGL API and the \c{samplerExternalOES} sampler type
+    in shaders. The latter presents a potential showstopper when using the
+    SPIR-V based shader pipeline of Qt: running such a shader through qsb will
+    result in a failure due to \c{samplerExternalOES} not being accepted as a
+    valid type due to not being mappable to SPIR-V and other target shading
+    languages.
+
+    To overcome this, qsb offers the option to replace the contents of any 
given
+    shader variant in a .qsb file with user-provided data that is read from a
+    file, fully replacing the original qsb-generated shader source or byte 
code.
+
+    Take the following fragment shader. Note the type of \c tex. What if the
+    type needs to be \c samplerExternalOES when running with OpenGL ES?
+
+\badcode
+#version 440
+
+layout(location = 0) in vec2 texCoord;
+layout(location = 0) out vec4 fragColor;
+
+layout(std140, binding = 0) uniform buf {
+    float opacity;
+} ubuf;
+
+layout(binding = 1) uniform sampler2D tex;
+
+void main()
+{
+    fragColor = texture(tex, texCoord).rgba * ubuf.opacity;
+}
+\endcode
+
+   Just changing the type of samplerExternalOES is not feasible. That leads to
+   compilation errors right away.
+
+   There is a simple solution, however: writing a separate, pure OpenGL ES
+   targeted version of the shader, and injecting it into the .qsb file. The
+   following shader is only compatible with GLSL ES and cannot be run through
+   qsb. However, we know that it can be processed by OpenGL ES at run time.
+
+\badcode
+precision highp float;
+#extension GL_OES_EGL_image_external : require
+varying vec2 texCoord;
+
+struct buf
+{
+    float opacity;
+};
+
+uniform buf ubuf;
+uniform samplerExternalOES tex;
+
+void main()
+{
+    gl_FragColor = texture2D(tex, texCoord).rgba * ubuf.opacity;
+}
+\endcode
+
+    Let's call this \c{shader_gles.frag}. Once \c{qsb --glsl 100es -o
+    shader.frag.qsb shader.frag} completes, giving us a (half-ready) .qsb file,
+    we can do \c{qsb -r glsl,100es,shader_gles.frag shader.frag.qsb} to update
+    update \c{shader.frag.qsb} by substituting the shader for GLSL 100 es with
+    the contents of the specified file (\c{shader_gles.frag}). Now
+    \c{shader.frag.qsb} is ready to be used at run time with OpenGL ES.
+
+    \note Pay attention to keeping the interface between the shader and the
+    application unchanged. Always inspect the qsb-generated GLSL code first,
+    either by printing the .qsb file contents via \c{-d} option, or by
+    extracting the GLSL ES 100 shader by running \c{qsb -x glsl,100es -o
+    gles_shader.frag shader.frag.qsb}. The struct, struct member, and uniform
+    names must not differ in the manually injected version either.
 */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/tests/auto/cmake/CMakeLists.txt 
new/qtshadertools-everywhere-src-6.2.1/tests/auto/cmake/CMakeLists.txt
--- old/qtshadertools-everywhere-src-6.2.0/tests/auto/cmake/CMakeLists.txt      
2021-09-24 20:58:18.000000000 +0200
+++ new/qtshadertools-everywhere-src-6.2.1/tests/auto/cmake/CMakeLists.txt      
2021-10-21 08:23:03.000000000 +0200
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.16)
 
 project(qmake_cmake_files)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtshadertools-everywhere-src-6.2.0/tests/manual/qmlappshadermacro/CMakeLists.txt
 
new/qtshadertools-everywhere-src-6.2.1/tests/manual/qmlappshadermacro/CMakeLists.txt
--- 
old/qtshadertools-everywhere-src-6.2.0/tests/manual/qmlappshadermacro/CMakeLists.txt
        2021-09-24 20:58:18.000000000 +0200
+++ 
new/qtshadertools-everywhere-src-6.2.1/tests/manual/qmlappshadermacro/CMakeLists.txt
        2021-10-21 08:23:03.000000000 +0200
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
 project(contextinfo LANGUAGES CXX)
 
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtshadertools-everywhere-src-6.2.0/tools/qsb/qsb.cpp 
new/qtshadertools-everywhere-src-6.2.1/tools/qsb/qsb.cpp
--- old/qtshadertools-everywhere-src-6.2.0/tools/qsb/qsb.cpp    2021-09-24 
20:58:18.000000000 +0200
+++ new/qtshadertools-everywhere-src-6.2.1/tools/qsb/qsb.cpp    2021-10-21 
08:23:03.000000000 +0200
@@ -40,6 +40,9 @@
 #include <QtCore/qprocess.h>
 #endif
 
+#include <cstdarg>
+#include <cstdio>
+
 // All qDebug must be guarded by !silent. For qWarnings, only the most
 // fatal ones should be unconditional; warnings from external tool
 // invocations must be guarded with !silent.
@@ -51,6 +54,15 @@
     Text
 };
 
+static void printError(const char *msg, ...)
+{
+    va_list arglist;
+    va_start(arglist, msg);
+    vfprintf(stderr, msg, arglist);
+    fputs("\n", stderr);
+    va_end(arglist);
+}
+
 static bool writeToFile(const QByteArray &buf, const QString &filename, 
FileType fileType)
 {
     QDir().mkpath(QFileInfo(filename).path());
@@ -59,7 +71,7 @@
     if (fileType == FileType::Text)
         flags |= QIODevice::Text;
     if (!f.open(flags)) {
-        qWarning("Failed to open %s for writing", qPrintable(filename));
+        printError("Failed to open %s for writing", qPrintable(filename));
         return false;
     }
     f.write(buf);
@@ -73,7 +85,7 @@
     if (fileType == FileType::Text)
         flags |= QIODevice::Text;
     if (!f.open(flags)) {
-        qWarning("Failed to open %s", qPrintable(filename));
+        printError("Failed to open %s", qPrintable(filename));
         return QByteArray();
     }
     return f.readAll();
@@ -99,18 +111,18 @@
         qDebug("%s", qPrintable(cmd));
     if (!p.waitForStarted()) {
         if (!silent)
-            qWarning("Failed to run %s: %s", qPrintable(cmd), 
qPrintable(p.errorString()));
+            printError("Failed to run %s: %s", qPrintable(cmd), 
qPrintable(p.errorString()));
         return false;
     }
     if (!p.waitForFinished()) {
         if (!silent)
-            qWarning("%s timed out", qPrintable(cmd));
+            printError("%s timed out", qPrintable(cmd));
         return false;
     }
 
     if (p.exitStatus() == QProcess::CrashExit) {
         if (!silent)
-            qWarning("%s crashed", qPrintable(cmd));
+            printError("%s crashed", qPrintable(cmd));
         return false;
     }
 
@@ -119,7 +131,7 @@
 
     if (p.exitCode() != 0) {
         if (!silent)
-            qWarning("%s returned non-zero error code %d", qPrintable(cmd), 
p.exitCode());
+            printError("%s returned non-zero error code %d", qPrintable(cmd), 
p.exitCode());
         return false;
     }
 
@@ -316,7 +328,7 @@
     for (const QString &what : whatList) {
         const QStringList spec = what.split(QLatin1Char(','), 
Qt::SkipEmptyParts);
         if (spec.count() < 3) {
-            qWarning("Invalid replace spec '%s'", qPrintable(what));
+            printError("Invalid replace spec '%s'", qPrintable(what));
             return false;
         }
 
@@ -491,14 +503,14 @@
                                 return 1;
                             }
                         } else {
-                            qWarning("No output file specified");
+                            printError("No output file specified");
                         }
                     } else if (cmdLineParser.isSet(replaceOption)) {
                         if (!replace(bs, cmdLineParser.values(replaceOption), 
cmdLineParser.isSet(batchableOption), fn))
                             return 1;
                     }
                 } else {
-                    qWarning("Failed to deserialize %s", qPrintable(fn));
+                    printError("Failed to deserialize %s", qPrintable(fn));
                 }
             }
             continue;
@@ -548,7 +560,7 @@
                 if (ok)
                     genShaders << qMakePair(QShader::GlslShader, 
QShaderVersion(v, flags));
                 else
-                    qWarning("Ignoring invalid GLSL version %s", 
qPrintable(version));
+                    printError("Ignoring invalid GLSL version %s", 
qPrintable(version));
             }
         }
 
@@ -557,10 +569,12 @@
             for (QString version : versions) {
                 bool ok = false;
                 int v = version.toInt(&ok);
-                if (ok)
+                if (ok) {
                     genShaders << qMakePair(QShader::HlslShader, 
QShaderVersion(v));
-                else
-                    qWarning("Ignoring invalid HLSL (Shader Model) version 
%s", qPrintable(version));
+                } else {
+                    printError("Ignoring invalid HLSL (Shader Model) version 
%s",
+                               qPrintable(version));
+                }
             }
         }
 
@@ -572,7 +586,7 @@
                 if (ok)
                     genShaders << qMakePair(QShader::MslShader, 
QShaderVersion(v));
                 else
-                    qWarning("Ignoring invalid MSL version %s", 
qPrintable(version));
+                    printError("Ignoring invalid MSL version %s", 
qPrintable(version));
             }
         }
 
@@ -597,7 +611,7 @@
 
         QShader bs = baker.bake();
         if (!bs.isValid()) {
-            qWarning("Shader baking failed: %s", 
qPrintable(baker.errorMessage()));
+            printError("Shader baking failed: %s", 
qPrintable(baker.errorMessage()));
             return 1;
         }
 
@@ -607,7 +621,7 @@
         if (cmdLineParser.isSet(spirvOptOption)) {
             QTemporaryDir tempDir;
             if (!tempDir.isValid()) {
-                qWarning("Failed to create temporary directory");
+                printError("Failed to create temporary directory");
                 return 1;
             }
             auto skeys = bs.availableShaders();
@@ -634,7 +648,7 @@
                             replaceShaderContents(&bs, k, 
QShader::SpirvShader, bytecode, s.entryPoint());
                     } else {
                         if ((!output.isEmpty() || !errorOutput.isEmpty()) && 
!silent) {
-                            qWarning("%s\n%s",
+                            printError("%s\n%s",
                                    qPrintable(output.constData()),
                                    qPrintable(errorOutput.constData()));
                         }
@@ -649,7 +663,7 @@
         if (cmdLineParser.isSet(fxcOption)) {
             QTemporaryDir tempDir;
             if (!tempDir.isValid()) {
-                qWarning("Failed to create temporary directory");
+                printError("Failed to create temporary directory");
                 return 1;
             }
             auto skeys = bs.availableShaders();
@@ -681,7 +695,7 @@
                             replaceShaderContents(&bs, k, QShader::DxbcShader, 
bytecode, s.entryPoint());
                     } else {
                         if ((!output.isEmpty() || !errorOutput.isEmpty()) && 
!silent) {
-                            qWarning("%s\n%s",
+                            printError("%s\n%s",
                                    qPrintable(output.constData()),
                                    qPrintable(errorOutput.constData()));
                         }
@@ -696,7 +710,7 @@
         if (cmdLineParser.isSet(mtllibOption)) {
             QTemporaryDir tempDir;
             if (!tempDir.isValid()) {
-                qWarning("Failed to create temporary directory");
+                printError("Failed to create temporary directory");
                 return 1;
             }
             auto skeys = bs.availableShaders();
@@ -737,14 +751,14 @@
                                 replaceShaderContents(&bs, k, 
QShader::MetalLibShader, bytecode, s.entryPoint());
                         } else {
                             if ((!output.isEmpty() || !errorOutput.isEmpty()) 
&& !silent) {
-                                qWarning("%s\n%s",
+                                printError("%s\n%s",
                                        qPrintable(output.constData()),
                                        qPrintable(errorOutput.constData()));
                             }
                         }
                     } else {
                         if ((!output.isEmpty() || !errorOutput.isEmpty()) && 
!silent) {
-                            qWarning("%s\n%s",
+                            printError("%s\n%s",
                                      qPrintable(output.constData()),
                                      qPrintable(errorOutput.constData()));
                         }

Reply via email to