Skip to content

Commit b44492f

Browse files
ShaderNetwork : Fix bug causing extra shader copying when substituting
1 parent 2799970 commit b44492f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
10.6.x.x (relative to 10.6.1.0)
22
========
33

4+
Improvements
5+
------------
46

7+
- ShaderNetwork : Optimised applySubstitutions() for cases where not all shaders need them.
58

69
10.6.1.0 (relative to 10.6.0.2)
710
========

src/IECoreScene/ShaderNetwork.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,10 @@ class ShaderNetwork::Implementation
745745
}
746746
}
747747

748-
m_parmsNeedingSubstitution[ node.handle ] = parmsNeedingSub;
748+
if( parmsNeedingSub.size() )
749+
{
750+
m_parmsNeedingSubstitution[ node.handle ] = parmsNeedingSub;
751+
}
749752
}
750753

751754
m_hash.append( m_output.shader );

0 commit comments

Comments
 (0)