Skip to content

Commit 7ce9a4e

Browse files
authored
Merge branch 'AcademySoftwareFoundation:main' into testminimal
2 parents beca645 + b20a55e commit 7ce9a4e

File tree

50 files changed

+226
-111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+226
-111
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
cxx_std: 17
105105
openimageio_ver: master
106106
python_ver: 3.9
107-
pybind11_ver: v2.6.2
107+
pybind11_ver: v2.7.0
108108
simd: avx2,f16c
109109
batched: b8_AVX2,b8_AVX512,b16_AVX512
110110
setenvs: USE_OPENVDB=0
@@ -180,7 +180,7 @@ jobs:
180180
openexr_ver: v2.4.3
181181
openimageio_ver: v2.4.13.0
182182
python_ver: 2.7
183-
pybind11_ver: v2.6.2
183+
pybind11_ver: v2.7.0
184184
simd: 0
185185
setenvs: export PUGIXML_VERSION=v1.8
186186
CMAKE_VERSION=3.15.5

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ add_definitions (-DOSL_INTERNAL=1)
143143

144144
# To make sure we aren't relying on deprecated OIIO features, we define
145145
# OIIO_DISABLE_DEPRECATED before including any OIIO headers.
146-
add_definitions (-DOIIO_DISABLE_DEPRECATED=1)
146+
add_definitions (-DOIIO_DISABLE_DEPRECATED=900000)
147147

148148
# Set the default namespace. For symbol hiding reasons, it's important that
149149
# the project name is a subset of the namespace name.

src/build-scripts/ci-startup.bash

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ export DYLD_LIBRARY_PATH=${LOCAL_DEPS_DIR}/dist/lib:$DYLD_LIBRARY_PATH
4747

4848
export TESTSUITE_CLEANUP_ON_SUCCESS=${TESTSUITE_CLEANUP_ON_SUCCESS:=1}
4949

50+
# For CI, default to building missing dependencies automatically
51+
export OpenImageIO_BUILD_MISSING_DEPS=${OpenImageIO_BUILD_MISSING_DEPS:=all}
52+
5053
# Parallel builds
5154
if [[ `uname -s` == "Linux" ]] ; then
5255
echo "procs: " `nproc`

src/cmake/compiler.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ message (STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}")
2525
###########################################################################
2626
# C++ language standard
2727
#
28-
set (CMAKE_CXX_STANDARD 14 CACHE STRING
28+
set (CMAKE_CXX_STANDARD 17 CACHE STRING
2929
"C++ standard to build with (14, 17, 20, etc.)")
3030
set (DOWNSTREAM_CXX_STANDARD 14 CACHE STRING
3131
"C++ minimum standard to impose on downstream clients")

src/doc/languagespec.tex

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5049,27 +5049,19 @@ \subsection{Surface BSDF closures}
50495049

50505050
\apiitem{albedo}
50515051
\vspace{12pt}
5052-
Single-scattering albedo of the medium.
5053-
\apiend
5054-
\vspace{-16pt}
5055-
5056-
\apiitem{transmission_depth}
5057-
\vspace{12pt}
5058-
Distance travelled inside the medium by white light before its color becomes
5059-
transmission_color by Beer's law. Given in scene length units, range
5060-
[0,infinity). Together with transmission_color this determines the
5061-
extinction coefficient of the medium.
5052+
Effective albedo of the medium (after multiple scattering). The renderer is expected to
5053+
invert this color to derive the appropriate single-scattering albedo that will produce
5054+
this color for the average random walk.
50625055
\apiend
50635056
\vspace{-16pt}
50645057

5065-
\apiitem{transmission_color}
5058+
\apiitem{radius}
50665059
\vspace{12pt}
5067-
Desired color resulting from white light transmitted a distance of
5068-
'transmission_depth' through the medium. Together with transmission_depth
5069-
this determines the extinction coefficient of the medium.
5060+
Average distance travelled inside the medium per color channel. This is typically taken
5061+
to be the mean-free path of the volume.
50705062
\apiend
50715063
\vspace{-16pt}
5072-
5064+
50735065
\apiitem{anisotropy}
50745066
\vspace{12pt}
50755067
Scattering anisotropy [-1,1]. Negative values give backwards scattering,

src/doc/stdlib.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,14 +1506,11 @@ properties of the physically-based shading nodes of MaterialX v1.38
15061506
: Normal vector of the surface point being shaded.
15071507

15081508
`albedo`
1509-
: Single-scattering albedo of the medium.
1510-
1511-
`transmission_depth`
1512-
: Distance travelled inside the medium by white light before its color becomes transmission_color by Beer's law. Given in scene length units, range [0,infinity). Together with transmission_color this determines the extinction coefficient of the medium.
1513-
1514-
`transmission_color`
1515-
: Desired color resulting from white light transmitted a distance of 'transmission_depth' through the medium. Together with transmission_depth this determines the extinction coefficient of the medium.
1509+
: Effective albedo of the medium (after multiple scattering). The renderer is expected to invert this color to derive the appropriate single-scattering albedo that will produce this color for the average random walk.
15161510

1511+
`radius`
1512+
: Average distance travelled inside the medium per color channel. This is typically taken to be the mean-free path of the volume.
1513+
15171514
`anisotropy`
15181515
: Scattering anisotropy [-1,1]. Negative values give backwards scattering, positive values give forward scattering, and 0.0 gives uniform scattering.
15191516

src/include/OSL/oslnoise.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,28 +154,28 @@ bitcast_to_uint (float x)
154154
OSL_FORCEINLINE void
155155
bjmix(vint4& a, vint4& b, vint4& c)
156156
{
157-
using OIIO::simd::rotl32;
158-
a -= c; a ^= rotl32(c, 4); c += b;
159-
b -= a; b ^= rotl32(a, 6); a += c;
160-
c -= b; c ^= rotl32(b, 8); b += a;
161-
a -= c; a ^= rotl32(c,16); c += b;
162-
b -= a; b ^= rotl32(a,19); a += c;
163-
c -= b; c ^= rotl32(b, 4); b += a;
157+
using OIIO::simd::rotl;
158+
a -= c; a ^= rotl(c, 4); c += b;
159+
b -= a; b ^= rotl(a, 6); a += c;
160+
c -= b; c ^= rotl(b, 8); b += a;
161+
a -= c; a ^= rotl(c,16); c += b;
162+
b -= a; b ^= rotl(a,19); a += c;
163+
c -= b; c ^= rotl(b, 4); b += a;
164164
}
165165

166166
// Perform a bjfinal (see OpenImageIO/hash.h) on 4 sets of values at once.
167167
OSL_FORCEINLINE vint4
168168
bjfinal(const vint4& a_, const vint4& b_, const vint4& c_)
169169
{
170-
using OIIO::simd::rotl32;
170+
using OIIO::simd::rotl;
171171
vint4 a(a_), b(b_), c(c_);
172-
c ^= b; c -= rotl32(b,14);
173-
a ^= c; a -= rotl32(c,11);
174-
b ^= a; b -= rotl32(a,25);
175-
c ^= b; c -= rotl32(b,16);
176-
a ^= c; a -= rotl32(c,4);
177-
b ^= a; b -= rotl32(a,14);
178-
c ^= b; c -= rotl32(b,24);
172+
c ^= b; c -= rotl(b,14);
173+
a ^= c; a -= rotl(c,11);
174+
b ^= a; b -= rotl(a,25);
175+
c ^= b; c -= rotl(b,16);
176+
a ^= c; a -= rotl(c,4);
177+
b ^= a; b -= rotl(a,14);
178+
c ^= b; c -= rotl(b,24);
179179
return c;
180180
}
181181
#endif

src/liboslexec/llvm_ops.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,19 +628,19 @@ osl_step_vvv(void* result, void* edge, void* x)
628628
OSL_SHADEOP int
629629
osl_isnan_if(float f)
630630
{
631-
return OIIO::isnan(f);
631+
return std::isnan(f);
632632
}
633633

634634
OSL_SHADEOP int
635635
osl_isinf_if(float f)
636636
{
637-
return OIIO::isinf(f);
637+
return std::isinf(f);
638638
}
639639

640640
OSL_SHADEOP int
641641
osl_isfinite_if(float f)
642642
{
643-
return OIIO::isfinite(f);
643+
return std::isfinite(f);
644644
}
645645

646646

@@ -694,7 +694,7 @@ safe_div(float a, float b)
694694
// to see if is finite and return 0.0f when it is not.
695695
// Typical implementation isfinite is (fabs(v) != INF), so not too expensive.
696696
float q = a / b;
697-
return OIIO::isfinite(q) ? q : 0.0f;
697+
return std::isfinite(q) ? q : 0.0f;
698698
// TODO: add a FTZ mode and only add checking the result when FTZ is disabled
699699
#endif
700700
}

src/liboslexec/optexture.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ OSL_SHADEOP void
184184
osl_texture_set_interp(void* opt, ustringhash_pod modename_)
185185
{
186186
ustringhash modename_hash = ustringhash_from(modename_);
187-
ustring modename = ustring_from(modename_hash);
188-
int mode = tex_interp_to_code(modename);
187+
int mode = tex_interp_to_code(modename_hash);
189188
if (mode >= 0)
190189
((TextureOpt*)opt)->interpmode = (TextureOpt::InterpMode)mode;
191190
}

src/liboslexec/runtimeoptimize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,8 +3348,7 @@ RuntimeOptimizer::run()
33483348
m_unknown_closures_needed = true;
33493349
}
33503350
} else if (op.opname() == u_backfacing) {
3351-
m_globals_needed.insert(u_N);
3352-
m_globals_needed.insert(u_I);
3351+
m_globals_needed.insert(u_backfacing);
33533352
} else if (op.opname() == u_calculatenormal) {
33543353
m_globals_needed.insert(u_flipHandedness);
33553354
} else if (op.opname() == u_getattribute) {

0 commit comments

Comments
 (0)