File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
source/MaterialXRenderMsl Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,7 @@ class MX_RENDERMSL_API MslProgram
294294 InputMap _uniformList;
295295 std::unordered_map<std::string, std::string> _globalUniformNameList;
296296 // List of program input attributes
297+ bool _attributeListComplete{false };
297298 InputMap _attributeList;
298299
299300 std::unordered_map<std::string, ImagePtr> _explicitBoundImages;
Original file line number Diff line number Diff line change @@ -301,6 +301,8 @@ int GetStrideOfMetalType(MTLDataType type)
301301 throw ExceptionRenderError (errorType, errors);
302302 }
303303
304+ _attributeListComplete = false ;
305+
304306 // If we encountered any errors while trying to create return list
305307 // of all errors. That is we collect all errors per stage plus any
306308 // errors during linking and throw one exception for them all so that
@@ -1518,6 +1520,11 @@ throw ExceptionRenderError(
15181520 throw ExceptionRenderError (errorType, errors);
15191521 }
15201522
1523+ if (_attributeListComplete)
1524+ {
1525+ return _attributeList;
1526+ }
1527+
15211528 if (_shader)
15221529 {
15231530 const ShaderStage& vs = _shader->getStage (Stage::VERTEX);
@@ -1559,6 +1566,8 @@ throw ExceptionRenderError(
15591566 }
15601567 }
15611568
1569+ _attributeListComplete = true ;
1570+
15621571 // Throw an error if any type mismatches were found
15631572 if (uniformTypeMismatchFound)
15641573 {
You can’t perform that action at this time.
0 commit comments