From ed92b7bc810fefa7169f53d92548105f7a90ddf1372367ec734c57a9b5b12390 Mon Sep 17 00:00:00 2001 From: Hans-Peter Jansen Date: Sun, 10 Apr 2022 12:50:49 +0000 Subject: [PATCH] Accepting request 968219 from home:dirkmueller:Factory - update to 1.11.17.0: * Fix in runtime optimizer where tracking of messages and unknown messages relied on uninitialized variables. * Minor changes related to OpenColorIO changing their master branch name to "main". #1431 * Testing: Get texture3d tests operational again. #1437 * Docs: Fix missing "errormessage" explanation for environment() and texture3d(). * Build/cmake fixes: Make PROJECT_VERSION_RELEASE_TYPE and OSL_SUPPORTED_RELEASE be cache strings, so they can be overridden; change OSL_IS_SUBPROJECT to PROJECT_IS_TOP_LEVEL (and change its sense) to match CMake 21+ behavior; add a TIME_COMMANDS option to help debug performance of the build. #1443 - drop 8682211d0bfe5c4be63a4a003d06037ff9721e66.diff, 1420.diff (upstream) OBS-URL: https://build.opensuse.org/request/show/968219 OBS-URL: https://build.opensuse.org/package/show/graphics/OpenShadingLanguage?expand=0&rev=31 --- 1420.diff | 207 ------------------ 8682211d0bfe5c4be63a4a003d06037ff9721e66.diff | 33 --- OpenShadingLanguage-1.11.15.0.tar.gz | 3 - OpenShadingLanguage-1.11.17.0.tar.gz | 3 + OpenShadingLanguage.changes | 18 ++ OpenShadingLanguage.spec | 8 +- 6 files changed, 23 insertions(+), 249 deletions(-) delete mode 100644 1420.diff delete mode 100644 8682211d0bfe5c4be63a4a003d06037ff9721e66.diff delete mode 100644 OpenShadingLanguage-1.11.15.0.tar.gz create mode 100644 OpenShadingLanguage-1.11.17.0.tar.gz diff --git a/1420.diff b/1420.diff deleted file mode 100644 index f9498bc..0000000 --- a/1420.diff +++ /dev/null @@ -1,207 +0,0 @@ -Index: b/INSTALL.md -=================================================================== ---- a/INSTALL.md -+++ b/INSTALL.md -@@ -16,7 +16,7 @@ NEW or CHANGED dependencies since the la - - * A suitable C++11 compiler to build OSL itself, which may be any of: - - GCC 4.8.5 or newer (tested through gcc 11) -- - Clang 3.4 or newer (tested through clang 12) -+ - Clang 3.4 or newer (tested through clang 13) - - Microsoft Visual Studio 2015 or newer - - Intel C++ compiler icc version 13 (?) or newer - -@@ -43,7 +43,7 @@ NEW or CHANGED dependencies since the la - DYLD_LIBRARY_PATH on OS X) and then OSL's build scripts will be able - to find it. - --* **[LLVM](http://www.llvm.org) 7, 8, 9, 10, 11, or 12**, including -+* **[LLVM](http://www.llvm.org) 7, 8, 9, 10, 11, 12, or 13**, including clang - clang libraries. - - Note that LLVM 10+ is not compatible with C++11, and requires C++14 or -@@ -73,13 +73,13 @@ Build process - - Here are the steps to check out, build, and test the OSL distribution: - --0. Install and build dependencies. -+1. Install and build dependencies. - --1. Check out a copy of the source code from the Git repository: -+2. Check out a copy of the source code from the Git repository: - - git clone https://github.com/AcademySoftwareFoundation/OpenShadingLanguage.git osl - --2. Change to the distribution directory and 'make' -+3. Change to the distribution directory and 'make' - - cd osl - make -@@ -95,7 +95,7 @@ Here are the steps to check out, build, - "make STOP_ON_WARNING=0", that create a build that will only stop for - full errors, not warnings. - --3. After compilation, you'll end up with a full OSL distribution in -+4. After compilation, you'll end up with a full OSL distribution in - dist/ARCH, where ARCH is the architecture you are building on, one of - "linux", "linux64", "macosx", "windows", or "windows64". - -@@ -103,14 +103,14 @@ Here are the steps to check out, build, - instead type 'make debug' at the top level, you will end up with - a debug build (no optimization, full symbols) in "dist/ARCH.debug". - --4. Add the "dist/ARCH/bin" to your $PATH, and "dist/ARCH/lib" to your -+5. Add the "dist/ARCH/bin" to your $PATH, and "dist/ARCH/lib" to your - $LD_LIBRAY_PATH (or $DYLD_LIBRARY_PATH on OS X), or copy the contents - of those files to appropriate directories. Public include files - (those needed when building applications that incorporate OSL) - can be found in "dist/ARCH/include", and documentation can be found - in "dist/ARCH/share/doc". - --5. After building (and setting your library path), you can run the -+6. After building (and setting your library path), you can run the - test suite with: - - make test -Index: b/src/include/OSL/llvm_util.h -=================================================================== ---- a/src/include/OSL/llvm_util.h -+++ b/src/include/OSL/llvm_util.h -@@ -577,6 +577,9 @@ public: - llvm::Value *src, int srcalign, int len); - - /// Dereference a pointer: return *ptr -+ /// type is the type of the thing being pointed to. -+ llvm::Value *op_load (llvm::Type* type, llvm::Value *ptr); -+ // Blind pointer version that's deprecated as of LLVM13: - llvm::Value *op_load (llvm::Value *ptr); - - /// Store to a dereferenced pointer: *ptr = val -@@ -589,17 +592,25 @@ public: - - /// Generate a GEP (get element pointer) where the element index is an - /// llvm::Value, which can be generated from either a constant or a -- /// runtime-computed integer element index. -+ /// runtime-computed integer element index. `type` is the type of the data -+ /// we're retrieving. -+ llvm::Value *GEP (llvm::Type* type, llvm::Value *ptr, llvm::Value *elem); -+ // Blind pointer version that's deprecated as of LLVM13: - llvm::Value *GEP (llvm::Value *ptr, llvm::Value *elem); - - /// Generate a GEP (get element pointer) with an integer element -- /// offset. -+ /// offset. `type` is the type of the data we're retrieving. -+ llvm::Value *GEP (llvm::Type* type, llvm::Value *ptr, int elem); -+ // Blind pointer version that's deprecated as of LLVM13: - llvm::Value *GEP (llvm::Value *ptr, int elem); - - /// Generate a GEP (get element pointer) with two integer element - /// offsets. This is just a special (and common) case of GEP where - /// we have a 2-level hierarchy and we have fixed element indices -- /// that are known at compile time. -+ /// that are known at compile time. `type` is the type of the data we're -+ /// retrieving. -+ llvm::Value *GEP (llvm::Type* type, llvm::Value *ptr, int elem1, int elem2); -+ // Blind pointer version that's deprecated as of LLVM13: - llvm::Value *GEP (llvm::Value *ptr, int elem1, int elem2); - - // Arithmetic ops. It auto-detects the type (int vs float). -Index: b/src/liboslexec/llvm_util.cpp -=================================================================== ---- a/src/liboslexec/llvm_util.cpp -+++ b/src/liboslexec/llvm_util.cpp -@@ -2592,9 +2592,17 @@ LLVM_Util::op_memcpy (llvm::Value *dst, - - - llvm::Value * -+LLVM_Util::op_load (llvm::Type* type, llvm::Value* ptr) -+{ -+ return builder().CreateLoad (type, ptr); -+} -+ -+ -+ -+llvm::Value * - LLVM_Util::op_load (llvm::Value *ptr) - { -- return builder().CreateLoad (ptr); -+ return op_load(ptr->getType()->getPointerElementType(), ptr); - } - - -@@ -2608,9 +2616,26 @@ LLVM_Util::op_store (llvm::Value *val, l - - - llvm::Value * -+LLVM_Util::GEP (llvm::Type* type, llvm::Value* ptr, llvm::Value* elem) -+{ -+ return builder().CreateGEP(type, ptr, elem); -+} -+ -+ -+ -+llvm::Value * - LLVM_Util::GEP (llvm::Value *ptr, llvm::Value *elem) - { -- return builder().CreateGEP (ptr, elem); -+ return GEP(ptr->getType()->getScalarType()->getPointerElementType(), ptr, -+ elem); -+} -+ -+ -+ -+llvm::Value * -+LLVM_Util::GEP (llvm::Type* type, llvm::Value* ptr, int elem) -+{ -+ return builder().CreateConstGEP1_32(type, ptr, elem); - } - - -@@ -2618,7 +2643,16 @@ LLVM_Util::GEP (llvm::Value *ptr, llvm:: - llvm::Value * - LLVM_Util::GEP (llvm::Value *ptr, int elem) - { -- return builder().CreateConstGEP1_32 (ptr, elem); -+ return GEP(ptr->getType()->getScalarType()->getPointerElementType(), ptr, -+ elem); -+} -+ -+ -+ -+llvm::Value * -+LLVM_Util::GEP(llvm::Type* type, llvm::Value* ptr, int elem1, int elem2) -+{ -+ return builder().CreateConstGEP2_32 (type, ptr, elem1, elem2); - } - - -@@ -2626,7 +2660,8 @@ LLVM_Util::GEP (llvm::Value *ptr, int el - llvm::Value * - LLVM_Util::GEP (llvm::Value *ptr, int elem1, int elem2) - { -- return builder().CreateConstGEP2_32 (nullptr, ptr, elem1, elem2); -+ return GEP(ptr->getType()->getScalarType()->getPointerElementType(), ptr, -+ elem1, elem2); - } - - -Index: b/src/liboslexec/runtimeoptimize.cpp -=================================================================== ---- a/src/liboslexec/runtimeoptimize.cpp -+++ b/src/liboslexec/runtimeoptimize.cpp -@@ -2301,7 +2301,6 @@ RuntimeOptimizer::optimize_instance () - // passes, but we have a hard cutoff just to be sure we don't - // ever get into an infinite loop from an unforseen cycle where we - // end up inadvertently transforming A => B => A => etc. -- int totalchanged = 0; - int reallydone = 0; // Force a few passes after we think we're done - int npasses = shadingsys().opt_passes(); - for (m_pass = 0; m_pass < npasses; ++m_pass) { -@@ -2362,7 +2361,6 @@ RuntimeOptimizer::optimize_instance () - // If nothing changed, we're done optimizing. But wait, it may be - // that after re-tracking variable lifetimes, we can notice new - // optimizations! So force another pass, then we're really done. -- totalchanged += changed; - if (changed < 1) { - if (++reallydone > 3) - break; diff --git a/8682211d0bfe5c4be63a4a003d06037ff9721e66.diff b/8682211d0bfe5c4be63a4a003d06037ff9721e66.diff deleted file mode 100644 index eee1c87..0000000 --- a/8682211d0bfe5c4be63a4a003d06037ff9721e66.diff +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp -index 4bd0dca35..4d0e1752d 100644 ---- a/src/liboslexec/llvm_util.cpp -+++ b/src/liboslexec/llvm_util.cpp -@@ -1407,7 +1407,9 @@ LLVM_Util::make_jit_execengine (std::string *err, - - options.NoZerosInBSS = false; - options.GuaranteedTailCallOpt = false; -+#if OSL_LLVM_VERSION < 120 - options.StackAlignmentOverride = 0; -+#endif - options.FunctionSections = true; - options.UseInitArray = false; - options.FloatABIType = llvm::FloatABI::Default; -@@ -5385,7 +5387,7 @@ void - LLVM_Util::write_bitcode_file (const char *filename, std::string *err) - { - std::error_code local_error; -- llvm::raw_fd_ostream out (filename, local_error, llvm::sys::fs::F_None); -+ llvm::raw_fd_ostream out (filename, local_error, llvm::sys::fs::OF_None); - if (! out.has_error()) { - llvm::WriteBitcodeToFile (*module(), out); - if (err && local_error) -@@ -5447,7 +5449,9 @@ LLVM_Util::ptx_compile_group (llvm::Module* lib_module, const std::string& name, - options.AllowFPOpFusion = llvm::FPOpFusion::Fast; - options.NoZerosInBSS = 0; - options.GuaranteedTailCallOpt = 0; -+#if OSL_LLVM_VERSION < 120 - options.StackAlignmentOverride = 0; -+#endif - options.UseInitArray = 0; - - llvm::TargetMachine* target_machine = llvm_target->createTargetMachine( diff --git a/OpenShadingLanguage-1.11.15.0.tar.gz b/OpenShadingLanguage-1.11.15.0.tar.gz deleted file mode 100644 index 7a21447..0000000 --- a/OpenShadingLanguage-1.11.15.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:62482b4f1751cd209ad0dd82c2d1505b4921e851fc2a0eb105aba31a03bef9c3 -size 14143075 diff --git a/OpenShadingLanguage-1.11.17.0.tar.gz b/OpenShadingLanguage-1.11.17.0.tar.gz new file mode 100644 index 0000000..d96b2f2 --- /dev/null +++ b/OpenShadingLanguage-1.11.17.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab7e17fde3f759b94efcc159d8f4ccc6cc92f40cba76e4f88a8133a00587738f +size 13888114 diff --git a/OpenShadingLanguage.changes b/OpenShadingLanguage.changes index f1a9cea..5b1e031 100644 --- a/OpenShadingLanguage.changes +++ b/OpenShadingLanguage.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Sun Apr 10 10:06:53 UTC 2022 - Dirk Müller + +- update to 1.11.17.0: + * Fix in runtime optimizer where tracking of messages and unknown messages + relied on uninitialized variables. + * Minor changes related to OpenColorIO changing their master branch name to + "main". #1431 + * Testing: Get texture3d tests operational again. #1437 + * Docs: Fix missing "errormessage" explanation for environment() and + texture3d(). + * Build/cmake fixes: Make PROJECT_VERSION_RELEASE_TYPE and + OSL_SUPPORTED_RELEASE be cache strings, so they can be overridden; change + OSL_IS_SUBPROJECT to PROJECT_IS_TOP_LEVEL (and change its sense) to match + CMake 21+ behavior; add a TIME_COMMANDS option to help debug performance of + the build. #1443 +- drop 8682211d0bfe5c4be63a4a003d06037ff9721e66.diff, 1420.diff (upstream) + ------------------------------------------------------------------- Fri Apr 8 07:42:38 UTC 2022 - Guillaume GARDET diff --git a/OpenShadingLanguage.spec b/OpenShadingLanguage.spec index 8ff9c3b..9cbeb39 100644 --- a/OpenShadingLanguage.spec +++ b/OpenShadingLanguage.spec @@ -1,7 +1,7 @@ # # spec file for package OpenShadingLanguage # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,7 +23,7 @@ %define oiio_major_minor_ver %(rpm -q --queryformat='%%{version}' OpenImageIO-devel | cut -d . -f 1-2) Name: OpenShadingLanguage -Version: 1.11.15.0 +Version: 1.11.17.0 Release: 0 Summary: A language for programmable shading License: BSD-3-Clause @@ -31,10 +31,6 @@ Group: Productivity/Graphics/Other URL: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage Source0: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: https://creativecommons.org/licenses/by/3.0/legalcode.txt#/CC-BY-3.0.txt -# PATCH-FIX-UPSTREAM: 8682211d0bfe5c4be63a4a003d06037ff9721e66.diff - fix build with LLVM >= 12 -Patch0: 8682211d0bfe5c4be63a4a003d06037ff9721e66.diff -# PATCH-FIX-UPSTREAM: 1420.diff - fix build with LLVM >= 13 -Patch1: 1420.diff BuildRequires: OpenEXR-devel BuildRequires: OpenImageIO BuildRequires: bison