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 @@ -298,6 +298,8 @@ int GetStrideOfMetalType(MTLDataType type)
298298 throw ExceptionRenderError (errorType, errors);
299299 }
300300
301+ _attributeListComplete = false ;
302+
301303 // If we encountered any errors while trying to create return list
302304 // of all errors. That is we collect all errors per stage plus any
303305 // errors during linking and throw one exception for them all so that
@@ -1515,6 +1517,11 @@ throw ExceptionRenderError(
15151517 throw ExceptionRenderError (errorType, errors);
15161518 }
15171519
1520+ if (_attributeListComplete)
1521+ {
1522+ return _attributeList;
1523+ }
1524+
15181525 if (_shader)
15191526 {
15201527 const ShaderStage& vs = _shader->getStage (Stage::VERTEX);
@@ -1556,6 +1563,8 @@ throw ExceptionRenderError(
15561563 }
15571564 }
15581565
1566+ _attributeListComplete = true ;
1567+
15591568 // Throw an error if any type mismatches were found
15601569 if (uniformTypeMismatchFound)
15611570 {
You can’t perform that action at this time.
0 commit comments