Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise OIIO minimum to 2.2 going forward #1426

Merged
merged 1 commit into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ on:

jobs:
vfxplatform-2019:
name: "Linux VFXP-2019: gcc6/C++14 llvm7.1 py2.7 boost1.66 exr2.3 oiio2.1 sse2"
name: "Linux VFXP-2019: gcc6/C++14 llvm7.1 py2.7 boost1.66 exr2.3 oiio2.2 sse2"
runs-on: ubuntu-latest
container:
image: aswf/ci-osl:2019-clang7
env:
CXX: g++
CC: gcc
CMAKE_CXX_STANDARD: 14
OPENIMAGEIO_VERSION: v2.2.17.0
PYTHON_VERSION: 2.7
USE_PYTHON: 0
OPENIMAGEIO_VERSION: Release-2.1.20.0
steps:
- uses: actions/checkout@v2
- name: Prepare ccache timestamp
Expand Down Expand Up @@ -75,14 +75,15 @@ jobs:
build/CMake*.{txt,log}

vfxplatform-2020:
name: "Linux VFXP-2020 gcc6/C++14 llvm7.1 py3.7 boost1.70 exr2.4 oiio2.1 sse4"
name: "Linux VFXP-2020 gcc6/C++14 llvm7.1 py3.7 boost1.70 exr2.4 oiio2.2 sse4"
runs-on: ubuntu-latest
container:
image: aswf/ci-osl:2020
env:
CXX: g++
CC: gcc
CMAKE_CXX_STANDARD: 14
OPENIMAGEIO_VERSION: v2.2.17.0
PYTHON_VERSION: 3.7
USE_SIMD: sse4.2
steps:
Expand Down Expand Up @@ -579,7 +580,7 @@ jobs:
linux-oldest:
# Oldest versions of the dependencies that we can muster, and various
# things disabled.
name: "Linux oldest everything: gcc6/C++14 llvm7 py2.7 boost-1.66 oiio-2.1 no-simd exr2.3"
name: "Linux oldest everything: gcc6/C++14 llvm7 py2.7 boost-1.66 oiio-2.2 no-simd exr2.3"
runs-on: ubuntu-latest
container:
image: aswf/ci-osl:2019-clang7
Expand All @@ -590,7 +591,7 @@ jobs:
PYTHON_VERSION: 2.7
USE_SIMD: 0
USE_PYTHON: 0
OPENIMAGEIO_VERSION: Release-2.1.20.0
OPENIMAGEIO_VERSION: v2.2.17.0
PUGIXML_VERSION: v1.8
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NEW or CHANGED dependencies since the last major release are **bold**.
- Microsoft Visual Studio **2017 or newer**
- Intel C++ compiler icc **version 17 or newer**

* **[OpenImageIO](http://openimageio.org) 2.1 or newer** (tested through 2.3)
* **[OpenImageIO](http://openimageio.org) 2.2 or newer** (tested through 2.3)

OSL uses OIIO both for its texture mapping functionality as well as
numerous utility classes. If you are integrating OSL into an existing
Expand Down
2 changes: 1 addition & 1 deletion src/build-scripts/build_openimageio.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
set -ex

OPENIMAGEIO_REPO=${OPENIMAGEIO_REPO:=OpenImageIO/oiio}
OPENIMAGEIO_VERSION=${OPENIMAGEIO_VERSION:=master}
OPENIMAGEIO_VERSION=${OPENIMAGEIO_VERSION:=release}
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
OPENIMAGEIO_SRCDIR=${OPENIMAGEIO_SRCDIR:=${LOCAL_DEPS_DIR}/OpenImageIO}
OPENIMAGEIO_BUILD_DIR=${OPENIMAGEIO_BUILD_DIR:=${OPENIMAGEIO_SRCDIR}/build}
Expand Down
2 changes: 1 addition & 1 deletion src/cmake/externalpackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ endif ()

# OpenImageIO
checked_find_package (OpenImageIO REQUIRED
VERSION_MIN 2.1.9)
VERSION_MIN 2.2.6)


checked_find_package (pugixml REQUIRED
Expand Down
2 changes: 0 additions & 2 deletions src/include/OSL/oslconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,9 @@ using OIIO::TypeMatrix;
using OIIO::TypeFloat4;
using OIIO::TypeString;
using OIIO::TypeInt;
#if OIIO_VERSION >= 20203
using OIIO::TypeFloat2;
using OIIO::TypeVector2;
using OIIO::TypeVector4;
#endif


// N.B. SymArena is not really "configuration", but we cram it here for
Expand Down
4 changes: 0 additions & 4 deletions src/include/OSL/sfmath.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,7 @@ namespace sfm
// return x.val() >= 0.0f ? x : -x;

// NOTE: negation happens outside of conditional, then is blended based on the condition
#if OPENIMAGEIO_VERSION >= 20112
Dual2<float> neg_x = OIIO::fast_neg(x);
#else
Dual2<float> neg_x = -x;
#endif

bool cond = x.val() < 0.0f;
// Blend per builtin component to allow
Expand Down
2 changes: 1 addition & 1 deletion src/liboslexec/rendservices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ RendererServices::get_texture_info(ustring filename,
TypeDesc datatype, void* data,
ustring* errormessage)
{
#if OPENIMAGEIO_VERSION >= 20307
#if OIIO_VERSION >= 20307
// Newer versions of the TextureSystem interface are able to determine the
// specific UDIM tile we're using.
if (!texture_thread_info)
Expand Down
11 changes: 0 additions & 11 deletions src/testshade/simplerend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,24 +402,13 @@ SimpleRenderer::get_userdata (bool derivatives, ustring name, TypeDesc type,
return true;
}

#if OIIO_VERSION >= 20202
if (const OIIO::ParamValue* p = userdata.find_pv(name, type)) {
size_t size = p->type().size();
memcpy(val, p->data(), size);
if (derivatives)
memcpy(val, (char*)p->data() + size, 2 * size);
return true;
}
#else
auto p = userdata.find(name, type);
if (p != userdata.end()) {
size_t size = p->type().size();
memcpy(val, p->data(), size);
if (derivatives)
memcpy(val, (char*)p->data() + size, 2 * size);
return true;
}
#endif

return false;
}
Expand Down
4 changes: 0 additions & 4 deletions src/testshade/testshade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1668,11 +1668,7 @@ test_shade (int argc, const char *argv[])
rend->attribute("saveptx", (int)saveptx);

// Hand the userdata options from the command line over to the renderer
#if OIIO_VERSION >= 20202
rend->userdata.merge(userdata);
#else
rend->userdata = userdata;
#endif

// Request a TextureSystem (by default it will be the global shared
// one). This isn't strictly necessary, if you pass nullptr to
Expand Down