From 8e6a6e5cf3077965dcb254b2895238bd4deb8780 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Wed, 21 Dec 2022 21:17:33 +0100 Subject: [PATCH] depends: qt: multimedia: remove shaders --- contrib/depends/packages/qt.mk | 2 + .../depends/patches/qt/remove-shaders.patch | 105 ++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 contrib/depends/patches/qt/remove-shaders.patch diff --git a/contrib/depends/packages/qt.mk b/contrib/depends/packages/qt.mk index 855b182..a2d0cf2 100644 --- a/contrib/depends/packages/qt.mk +++ b/contrib/depends/packages/qt.mk @@ -31,6 +31,7 @@ $(package)_patches += ___isOSVersionAtLeast_hack.patch $(package)_patches += missing-include.patch $(package)_patches += no-__builtin_available.patch $(package)_patches += no-ffmpeg.patch +$(package)_patches += remove-shaders.patch $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) $(package)_qttranslations_sha256_hash=7ab93a930b693eeb53ab97b038b4e6e057d06374e6f49a3814d99145a276925f @@ -268,6 +269,7 @@ define $(package)_preprocess_cmds mv $($(package)_patch_dir)/MacToolchain.cmake . && \ cd qtmultimedia && \ patch -p1 -i $($(package)_patch_dir)/no-ffmpeg.patch && \ + patch -p1 -i $($(package)_patch_dir)/remove-shaders.patch && \ cd .. && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ diff --git a/contrib/depends/patches/qt/remove-shaders.patch b/contrib/depends/patches/qt/remove-shaders.patch new file mode 100644 index 0000000..8d99f9f --- /dev/null +++ b/contrib/depends/patches/qt/remove-shaders.patch @@ -0,0 +1,105 @@ +From 779b0701b82280a319a4b11d04742fbd1a245848 Mon Sep 17 00:00:00 2001 +From: tobtoht +Date: Wed, 21 Dec 2022 21:59:31 +0100 +Subject: [PATCH] Remove shaders + +--- + src/multimedia/CMakeLists.txt | 59 ---------------------- + src/multimedia/video/qvideoframeformat.cpp | 5 -- + 2 files changed, 64 deletions(-) + +diff --git a/src/multimedia/CMakeLists.txt b/src/multimedia/CMakeLists.txt +index 651c7ee76..b386e1501 100644 +--- a/src/multimedia/CMakeLists.txt ++++ b/src/multimedia/CMakeLists.txt +@@ -250,64 +250,5 @@ set(VIDEO_SHADERS + "shaders/nv12_bt2020_hlg.frag" + ) + +-qt_internal_add_shaders(Multimedia "shaders" +- SILENT +- BATCHABLE +- PRECOMPILE +- OPTIMIZED +- PREFIX +- "/qt-project.org/multimedia" +- FILES +- ${VIDEO_VERTEX_SHADERS} +- ${VIDEO_SHADERS} +-) +- + string(REPLACE ".frag" "_linear.frag.qsb" LINEAR_VIDEO_SHADERS "${VIDEO_SHADERS}") + +-qt_internal_add_shaders(Multimedia "shaders_linear" +- SILENT +- BATCHABLE +- PRECOMPILE +- OPTIMIZED +- PREFIX +- "/qt-project.org/multimedia" +- FILES +- ${VIDEO_SHADERS} +- OUTPUTS +- ${LINEAR_VIDEO_SHADERS} +- DEFINES +- QMM_OUTPUTSURFACE_LINEAR +-) +- +-qt_internal_add_shaders(Multimedia "shaders_gl_macos" +- SILENT +- BATCHABLE +- PRECOMPILE +- OPTIMIZED +- PREFIX +- "/qt-project.org/multimedia" +- GLSL +- "120,150" +- NOHLSL +- NOMSL +- FILES +- "shaders/rectsampler.vert" +- "shaders/rectsampler_bgra.frag" +-) +- +-qt_internal_add_shaders(Multimedia "shaders_gl_macos_linear" +- SILENT +- BATCHABLE +- PRECOMPILE +- OPTIMIZED +- PREFIX +- "/qt-project.org/multimedia" +- GLSL +- "120,150" +- NOHLSL +- NOMSL +- FILES +- "shaders/rectsampler_bgra.frag" +- OUTPUTS +- "shaders/rectsampler_bgra_linear.frag.qsb" +-) +diff --git a/src/multimedia/video/qvideoframeformat.cpp b/src/multimedia/video/qvideoframeformat.cpp +index bc8fbe2e1..25bfdd5ff 100644 +--- a/src/multimedia/video/qvideoframeformat.cpp ++++ b/src/multimedia/video/qvideoframeformat.cpp +@@ -11,10 +11,6 @@ + #include + #include + +-static void initResource() { +- Q_INIT_RESOURCE(shaders); +-} +- + QT_BEGIN_NAMESPACE + + class QVideoFrameFormatPrivate : public QSharedData +@@ -348,7 +344,6 @@ QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QVideoFrameFormatPrivate); + QVideoFrameFormat::QVideoFrameFormat() + : d(new QVideoFrameFormatPrivate) + { +- initResource(); + } + + /*! +-- +2.38.1 +