From d02995ab72509276f8f03b591788d0b8d7af12925d636758aae7cd3ec0be352e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 8 Oct 2024 16:02:03 +0000 Subject: [PATCH 1/2] [info=cc2f62e82c929c54ca55173c5d938e7bd7f64ad7f8d375a94065846b9a026e6c] OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/shaderc?expand=0&rev=68 --- .gitattributes | 23 +++ .gitignore | 1 + 0001-Use-system-third-party-libs.patch | 46 +++++ _scmsync.obsinfo | 4 + baselibs.conf | 1 + build.specials.obscpio | 3 + shaderc.changes | 274 +++++++++++++++++++++++++ shaderc.spec | 99 +++++++++ v2024.1.tar.gz | 3 + 9 files changed, 454 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Use-system-third-party-libs.patch create mode 100644 _scmsync.obsinfo create mode 100644 baselibs.conf create mode 100644 build.specials.obscpio create mode 100644 shaderc.changes create mode 100644 shaderc.spec create mode 100644 v2024.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Use-system-third-party-libs.patch b/0001-Use-system-third-party-libs.patch new file mode 100644 index 0000000..2105286 --- /dev/null +++ b/0001-Use-system-third-party-libs.patch @@ -0,0 +1,46 @@ +--- + CMakeLists.txt | 3 +-- + libshaderc/CMakeLists.txt | 2 ++ + utils/update_build_version.sh | 1 + + 3 files changed, 4 insertions(+), 2 deletions(-) + +Index: shaderc-2024.0/CMakeLists.txt +=================================================================== +--- shaderc-2024.0.orig/CMakeLists.txt ++++ shaderc-2024.0/CMakeLists.txt +@@ -120,7 +120,6 @@ endif(MSVC) + + # Configure subdirectories. + # We depend on these for later projects, so they should come first. +-add_subdirectory(third_party) + + add_subdirectory(libshaderc_util) + add_subdirectory(libshaderc) +@@ -131,7 +130,7 @@ endif() + + add_custom_target(build-version + ${Python_EXECUTABLE} +- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py ++ ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.sh + ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc + COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") + +Index: shaderc-2024.0/libshaderc/CMakeLists.txt +=================================================================== +--- shaderc-2024.0.orig/libshaderc/CMakeLists.txt ++++ shaderc-2024.0/libshaderc/CMakeLists.txt +@@ -67,6 +67,8 @@ set(SHADERC_LIBS + shaderc_util + SPIRV # from glslang + SPIRV-Tools ++ SPVRemapper ++ HLSL + ) + + target_link_libraries(shaderc PRIVATE ${SHADERC_LIBS}) +Index: shaderc-2024.0/utils/update_build_version.sh +=================================================================== +--- /dev/null ++++ shaderc-2024.0/utils/update_build_version.sh +@@ -0,0 +1 @@ ++#!/bin/true diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..8798311 --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,4 @@ +mtime: 1715969066 +commit: cc2f62e82c929c54ca55173c5d938e7bd7f64ad7f8d375a94065846b9a026e6c +url: https://src.opensuse.org/jengelh/shaderc +revision: master diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..592ed60 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libshaderc_shared1 diff --git a/build.specials.obscpio b/build.specials.obscpio new file mode 100644 index 0000000..b329a95 --- /dev/null +++ b/build.specials.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8eb515d755d6601b7903755c624e6e658dfc1ee45c87fd86cf7a11bebddbf823 +size 256 diff --git a/shaderc.changes b/shaderc.changes new file mode 100644 index 0000000..5456c08 --- /dev/null +++ b/shaderc.changes @@ -0,0 +1,274 @@ +------------------------------------------------------------------- +Thu May 16 12:10:06 UTC 2024 - Jan Engelhardt + +- Update to release 2024.1 + * No changelog was provided + +------------------------------------------------------------------- +Fri Apr 12 17:08:42 UTC 2024 - Jan Engelhardt + +- Update to release 2024.0 + * Explicitly use python3 in shebangs/scripts + +------------------------------------------------------------------- +Fri Jan 19 13:04:49 UTC 2024 - Jan Engelhardt + +- Update to release 2023.8 + * API: Expose rlaxed Vulkan rules from glslang + +------------------------------------------------------------------- +Thu Nov 9 15:46:07 UTC 2023 - Dominique Leuenberger + +- Fix previous change: export to CXXFLAGS instead of CPPFLAGS so + that it's actually picked up. Add optflags to CXXFLAGS to ensure + it's not lost. + +------------------------------------------------------------------- +Thu Nov 2 18:07:38 UTC 2023 - Jan Engelhardt + +- Adjust for glslang-nonstd-devel switching paths + +------------------------------------------------------------------- +Fri Oct 20 12:10:45 UTC 2023 - Jan Engelhardt + +- Update to release 2023.7 + * Adapt a test to different error message from SPIRV-Tools + +------------------------------------------------------------------- +Wed Sep 6 22:58:36 UTC 2023 - Jan Engelhardt + +- Update to release 2023.6 + * Build system updates only + +------------------------------------------------------------------- +Mon May 29 12:51:28 UTC 2023 - Jan Engelhardt + +- Update to release 2023.4 + * Add option to preserve bindings + * Add options to control mesh shading limits + +------------------------------------------------------------------- +Tue Mar 28 23:26:28 UTC 2023 - Jan Engelhardt + +- Update to release 2023.2 + * Fix C++20 compatibility: explicitly construct string_piece when + comparing to `char *` + +------------------------------------------------------------------- +Sun Dec 4 12:50:08 UTC 2022 - Dirk Müller + +- update to 2022.4: + * Add Cmake BUNDLE DESTINATION option for target install + +------------------------------------------------------------------- +Fri Nov 25 10:20:34 UTC 2022 - Ferdinand Thiessen + +- Drop pkgconfig files for not provided static libraries + +------------------------------------------------------------------- +Mon Oct 24 20:29:48 UTC 2022 - Jan Engelhardt + +- Update to release 2022.3 + * Implement default builtin constants needed for GL_EXT_mesh_shader. + +------------------------------------------------------------------- +Mon Aug 22 23:20:48 UTC 2022 - Jan Engelhardt + +- Update to release 2022.2 + * Add support for 16b-bit types in HLSL + +------------------------------------------------------------------- +Mon Aug 8 12:07:29 UTC 2022 - Stephan Kulow + +- Remove old python(2)-xml build dependency - build requires python3 + +------------------------------------------------------------------- +Mon Apr 18 23:38:20 UTC 2022 - Jan Engelhardt + +- Update to release 2022.1 + * Validator handles Nontemporal image operand + * Optimizer handles RayQueryKHR type + +------------------------------------------------------------------- +Mon Mar 28 20:42:26 UTC 2022 - Bjørn Lie + +- Add baselibs.conf, containing libshaderc_shared1 (the shared lib). + +------------------------------------------------------------------- +Sun Jan 30 14:58:58 UTC 2022 - Enrico Belleri + +- Update to release 2022.0 + * Update to Glslang 11.8.0 + * Support Vulkan 1.3 + * Support targeting SPIR-V 1.6, which is the default for Vulkan 1.3 + +------------------------------------------------------------------- +Thu Nov 11 20:16:25 UTC 2021 - Jan Engelhardt + +- Update to release 2021.3 + * No user-visible changes + +------------------------------------------------------------------- +Thu Jun 24 10:51:26 UTC 2021 - Ferdinand Thiessen + +- Update to release 2021.1 + * Add -fauto-combined-image-sampler option to glslc + * Disable deprecated --target-env=opengl_compat with an explicit + error message + +------------------------------------------------------------------- +Wed May 5 09:28:57 UTC 2021 - Jan Engelhardt + +- Upddate to release 2021.0 + * No user-visible changes + +------------------------------------------------------------------- +Mon Mar 1 08:44:37 UTC 2021 - Jan Engelhardt + +- Update to release 2020.5 + * Support newer glslang + +------------------------------------------------------------------- +Mon Jan 11 00:50:07 UTC 2021 - Dirk Müller + +- update to 2020.4: + - Removed svpc + - Fixed issues with embedders getting duplicate symbols + - Converted C-style casts to static_cast + - Rolled ahead to fix/pickup Vulkan Raytracing support + +------------------------------------------------------------------- +Fri Sep 4 12:08:28 UTC 2020 - Jan Engelhardt + +- Update to release 2020.3: + * spvc: added support for Dawn using deprecated Options constructor + * spvc: added support for the additional fixed sample mask in MSL + +------------------------------------------------------------------- +Mon Aug 17 01:07:43 UTC 2020 - malcolmlewis@opensuse.org + +- Updated to release 2020.2: + * Support both posix and non-posix MinGW toolchains. + * Support optionally building Tint tooling for WGSL. + * Add -h option to glslc, spvc; same as --help. + * Update to Glslang generator 9. + * Add interface to support 16-bit types in HLSL + * Add glslc hidden experimental option -mfmt=wgsl; requires Tint. + * Add minimum buffer size for Dawn reflection. +- Changes from release 2020.1: + * Added warning signs about unsupported downloads. + * Removed Singleton pattern around access to glslang. + * Added concept of comparison sampler to API. + * Added support for options.hlsl.nonwritable_uav_texture_as_srv. + * Support forcing storage buffers to be always declared as UAV. +- Rebase 0001-Use-system-third-party-libs.patch. + +------------------------------------------------------------------- +Wed Apr 8 11:59:02 UTC 2020 - Jan Engelhardt + +- Update to release 2020.0 + * Added support for new Glslang profile enum, EProfileCount. + * Add documentation for Vulkan 1.2 and SPIR-V 1.5. + * Added support for generating WebGPU SPIR-V to libshaderc. + +------------------------------------------------------------------- +Mon Feb 17 12:45:35 UTC 2020 - Jan Engelhardt + +- Update to release 2019.1 + * Vulkan 1.2 support + * Add spvc parser support for a number of ops +- Drop 0001-Force-Glslang-to-support-HLSL-in-its-interface-784.patch + +------------------------------------------------------------------- +Tue Nov 19 09:02:32 UTC 2019 - Jan Engelhardt + +- Add 0001-Force-Glslang-to-support-HLSL-in-its-interface-784.patch + +------------------------------------------------------------------- +Wed Jun 5 11:59:17 UTC 2019 - Jan Engelhardt + +- Update to new upstream release 2019.0 + * Add optional spvc, libshaderc_spvc as wrapper around + SPIRV-Cross. + * Support NV extensions for shader stages. + * spvc: Added option to specify source environment. Spvc will + transform from source to target environment if they are + different. This only works for WebGPU0 and Vulkan 1.1. + + +------------------------------------------------------------------- +Fri Dec 14 23:08:14 UTC 2018 - Jan Engelhardt + +- Update to new upstream release 2018.0 + * Support -fhlsl_functionality1 (also -fhlsl-functionality1) + * Support NVIDIA Turing extensions. Requires updated Glslang + and SPIRV-Tools. + * Use SPIR-V optimization and HLSL legalization recipes from + SPIRV-Tools. + * Pass target environment into SPIRV-Tools code, e.g. from + --target-env vulkan1.1 . + +------------------------------------------------------------------- +Sat Mar 31 16:32:38 UTC 2018 - 9+suse@cirno.systems + +- Update to version 20180329.g2a0f3a3: + * Use standard SPIRV-Tools transformation recipes + * Locate clang for Linux buildbots. (#446) + * Support setting target environment version, e.g. Vulkan 1.1 + * Re-enable the Windows continuous Debug builds. (#444) + * Add build result badges to README. (#439) + * Glslang generator version 6 + * Glslang generator version 5 + * Update glslc README for -fauto-map-locations + * Add glslc tests for -fauto-map-locations + * Fix setting of debug DLL name for AppVeyor + * Adding kokoro build configurations. (#429) + * AppVeyor packaging: debug DLL name no longer has extra "d" + * Start v2018.0-dev + * Finalize v2017.2 + * copyright check: Skip auto-generated CMakeFiles + * Update CHANGES for -fauto-map-locations + * Glslang now requires bindings on resources + * Add -fauto-map-locations option + +------------------------------------------------------------------- +Fri Feb 23 02:20:35 UTC 2018 - 9+suse@cirno.systems + +- Update to version 20180207.g563bc6e: + * Add a virtual destructor, otherwise Clang 6.0complains about delete being called on an abstract class. + * Skip Debug builds for VS 2013 and VS 2015 + * Glslang updated its generator version number to 4 + * Android.mk: add glslang/MachineIndependent/attribute.cpp + * Make tests resilient to better SPIR-V optimizations + * Travis CI: install pip and set clone depth to 1 + * Adapt to Glslang codegen version update + +------------------------------------------------------------------- +Thu Nov 23 21:57:06 UTC 2017 - 9@cirno.systems + +- Update to version 20171030.g98ab88b: + * glslc tests: Relax version word check + * Avoid -fPIC for MinGW builds + * Allow override of SPVTOOLS_LOCAL_PATH + * Move spirv-tools build from third_party/Android.mk + * Update CHANGES + * Adapt to Glslang generator version number change + * Travis CI: use make to build + * Add HLSL legalization passes to compiler.cc + * Add SPIRV-Tools optimizer files for linker + * Added more opt passes to PassId enum + +------------------------------------------------------------------- +Wed Nov 22 14:00:28 UTC 2017 - 9@cirno.systems + +- Re-add explicit version dependencies + +------------------------------------------------------------------- +Mon Nov 20 22:21:12 UTC 2017 - 9@cirno.systems + +- Drop explicit version dependency on spirv-tools + +------------------------------------------------------------------- +Fri Nov 3 13:01:32 UTC 2017 - 9@cirno.systems + +- init diff --git a/shaderc.spec b/shaderc.spec new file mode 100644 index 0000000..d70ac6b --- /dev/null +++ b/shaderc.spec @@ -0,0 +1,99 @@ +# +# spec file for package shaderc +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +# Remember to bump in baselibs.conf +%define lname libshaderc_shared1 +Name: shaderc +Version: 2024.1 +Release: 0 +Summary: A collection of tools, libraries and tests for shader compilation +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://github.com/google/shaderc +#Git-Clone: https://github.com/google/shaderc +Source: https://github.com/google/shaderc/archive/v%version.tar.gz +Source99: baselibs.conf +Patch1: 0001-Use-system-third-party-libs.patch +BuildRequires: c++_compiler +BuildRequires: cmake >= 2.8.12 +BuildRequires: glslang-devel >= 14.1.0 +BuildRequires: glslang-nonstd-devel +BuildRequires: python3-base +BuildRequires: spirv-headers >= 1.6.1~sdk280 +BuildRequires: spirv-tools-devel >= 2024.1~rc1 + +%description +A collection of tools, libraries and tests for shader compilation. +Included are: + +* glslc, a command line compiler for GLSL/HLSL to SPIR-V, and +* libshaderc, a library API for doing the same. + +Shaderc wraps around core functionality in glslang and SPIRV-Tools. + +%package -n %lname +Summary: SPIR-V shader compiler library +Group: System/Libraries + +%description -n %lname +A compiler library for GLSL/HLSL to SPIR-V. + +Shaderc wraps around core functionality in glslang and SPIRV-Tools + +%package devel +Summary: Header files for the shaderc library +Group: Development/Libraries/C and C++ +Requires: %lname = %version + +%description devel +A compiler library for GLSL/HLSL to SPIR-V. + +Shaderc wraps around core functionality in glslang and SPIRV-Tools + +%prep +%autosetup -p1 +chmod a+x utils/update_build_version.sh +echo "\"%version\"" >glslc/src/build-version.inc +find . -type f -exec grep -l '#!/usr/bin/env python' {} + | xargs perl -i -lpe 's{/env python\w*}{/python3}g' + +%build +export CXXFLAGS="%{optflags} -I%_includedir/External" +%cmake -DSHADERC_SKIP_TESTS=ON +%cmake_build + +%install +%cmake_install +# Remove static libraries and their pkgconfig files +rm %buildroot/%_libdir/*.a +rm %buildroot/%_libdir/pkgconfig/shaderc_{static,combined}.pc + +%ldconfig_scriptlets -n %lname + +%files +%license LICENSE +%_bindir/glslc + +%files -n %lname +%_libdir/libshaderc_shared.so.1* + +%files devel +%_includedir/shaderc/ +%_libdir/libshaderc_shared.so +%_libdir/pkgconfig/shaderc.pc + +%changelog diff --git a/v2024.1.tar.gz b/v2024.1.tar.gz new file mode 100644 index 0000000..adddbf1 --- /dev/null +++ b/v2024.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 +size 227211 From 5ae6eec9efd4af6440985e0115853d4148a3bdbf99083f462fb99a6720f50ed8 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 8 Oct 2024 16:33:27 +0000 Subject: [PATCH 2/2] [info=aa5a5524d17a867ab545f9c4c4e176749afe4b6ee8b9196c0f51acc018b52ae7] OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/shaderc?expand=0&rev=69 --- _scmsync.obsinfo | 4 ++-- build.specials.obscpio | 2 +- shaderc.changes | 11 +++++++++++ shaderc.spec | 8 ++++---- v2024.1.tar.gz | 3 --- v2024.3.tar.gz | 3 +++ 6 files changed, 21 insertions(+), 10 deletions(-) delete mode 100644 v2024.1.tar.gz create mode 100644 v2024.3.tar.gz diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo index 8798311..1b390e3 100644 --- a/_scmsync.obsinfo +++ b/_scmsync.obsinfo @@ -1,4 +1,4 @@ -mtime: 1715969066 -commit: cc2f62e82c929c54ca55173c5d938e7bd7f64ad7f8d375a94065846b9a026e6c +mtime: 1728405193 +commit: aa5a5524d17a867ab545f9c4c4e176749afe4b6ee8b9196c0f51acc018b52ae7 url: https://src.opensuse.org/jengelh/shaderc revision: master diff --git a/build.specials.obscpio b/build.specials.obscpio index b329a95..44a2f09 100644 --- a/build.specials.obscpio +++ b/build.specials.obscpio @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8eb515d755d6601b7903755c624e6e658dfc1ee45c87fd86cf7a11bebddbf823 +oid sha256:abe06cc0463d3df10749fab250b86b0a54dcdc092391273c298bbf9ee8b87e65 size 256 diff --git a/shaderc.changes b/shaderc.changes index 5456c08..fd95126 100644 --- a/shaderc.changes +++ b/shaderc.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Oct 8 16:02:50 UTC 2024 - Jan Engelhardt + +- Update to release 2024.3 + * During HLSL compilation or any optimizing compile, do not + tell the validator to use "friendly names". This should save + time spent in the initial validation step of the optimization + recipe. + * Adapt test golden results to Glslang changes which reorder + decorations by object enum value. + ------------------------------------------------------------------- Thu May 16 12:10:06 UTC 2024 - Jan Engelhardt diff --git a/shaderc.spec b/shaderc.spec index d70ac6b..45fa50d 100644 --- a/shaderc.spec +++ b/shaderc.spec @@ -19,7 +19,7 @@ # Remember to bump in baselibs.conf %define lname libshaderc_shared1 Name: shaderc -Version: 2024.1 +Version: 2024.3 Release: 0 Summary: A collection of tools, libraries and tests for shader compilation License: Apache-2.0 @@ -31,11 +31,11 @@ Source99: baselibs.conf Patch1: 0001-Use-system-third-party-libs.patch BuildRequires: c++_compiler BuildRequires: cmake >= 2.8.12 -BuildRequires: glslang-devel >= 14.1.0 +BuildRequires: glslang-devel >= 15 BuildRequires: glslang-nonstd-devel BuildRequires: python3-base -BuildRequires: spirv-headers >= 1.6.1~sdk280 -BuildRequires: spirv-tools-devel >= 2024.1~rc1 +BuildRequires: spirv-headers >= 1.6.4+sdk296 +BuildRequires: spirv-tools-devel >= 2024.4~rc1 %description A collection of tools, libraries and tests for shader compilation. diff --git a/v2024.1.tar.gz b/v2024.1.tar.gz deleted file mode 100644 index adddbf1..0000000 --- a/v2024.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 -size 227211 diff --git a/v2024.3.tar.gz b/v2024.3.tar.gz new file mode 100644 index 0000000..416e3aa --- /dev/null +++ b/v2024.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5c68b5de5d4c7859d9699054493e0a42a2a5eb21b425d63f7b7dd543db0d708 +size 227490