Skip to content

Commit 962af08

Browse files
committed
Merge branch 'RB-10.6'
2 parents 72756f5 + d5bc3e6 commit 962af08

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

Changes

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,17 @@ Breaking Changes
169169
- Removed support for `IECORE_RTLD_GLOBAL` environment variable.
170170
- SmoothSkinningData : Removed, along with all associated Ops and Parameters.
171171

172-
10.5.x.x (relative to 10.5.15.4)
173-
=======
172+
10.5.x.x (relative to 10.5.16.0)
173+
========
174+
175+
10.5.16.0 (relative to 10.5.15.4)
176+
=========
174177

178+
Improvements
179+
------------
175180

181+
- ShaderNetworkAlgo : Added render adaptor API, allowing just-in-time modifications to
182+
ShaderNetworks during translation for rendering.
176183

177184
10.5.15.4 (relative to 10.5.15.3)
178185
========

include/IECore/MurmurHash.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ inline void murmurHashAppend( MurmurHash &h, const Imath::Matrix44<T> &data )
347347
template<typename T>
348348
inline void murmurHashAppend( MurmurHash &h, const Imath::Box<T> &data )
349349
{
350-
h.append( &data.min, 2 );
350+
h.append( data.min );
351+
h.append( data.max );
351352
}
352353

353354
template<typename T>

test/IECore/MurmurHashTest.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,35 @@ struct MurmurHashTest
6969
// many elements in it - currently, I'm seeing a max occupancy of 8.
7070
BOOST_CHECK( maxBucketOccupancy < 16 );
7171
}
72+
73+
void testAllElementsOfImathBoxes()
74+
{
75+
Imath::Box3i ref( Imath::V3i( 123, 456, 789 ), Imath::V3i( 10123, 10456, 10789 ) );
76+
std::unordered_set< IECore::MurmurHash > set;
77+
78+
for( int i = 0; i < 6; i++ )
79+
{
80+
for( int j = 0; j < 32; j++ )
81+
{
82+
int bitToFlip = 1 << j;
83+
Imath::Box3i q = ref;
84+
if( i >= 3 )
85+
{
86+
q.max[i - 3] = bitToFlip ^ q.max[i - 3];
87+
}
88+
else
89+
{
90+
q.min[i] = bitToFlip ^ q.min[i];
91+
}
92+
93+
IECore::MurmurHash h;
94+
h.append( q );
95+
set.insert( h );
96+
}
97+
}
98+
99+
BOOST_CHECK( set.size() == ( 6 * 32 ) );
100+
}
72101
};
73102

74103

@@ -80,6 +109,7 @@ struct MurmurHashTestSuite : public boost::unit_test::test_suite
80109
boost::shared_ptr<MurmurHashTest> instance( new MurmurHashTest() );
81110

82111
add( BOOST_CLASS_TEST_CASE( &MurmurHashTest::testUnorderedSet, instance ) );
112+
add( BOOST_CLASS_TEST_CASE( &MurmurHashTest::testAllElementsOfImathBoxes, instance ) );
83113
}
84114
};
85115

0 commit comments

Comments
 (0)