OLD | NEW |
1 /* | 1 /* |
2 Copyright (c) 2009 Sony Pictures Imageworks, et al. | 2 Copyright (c) 2009 Sony Pictures Imageworks, et al. |
3 All Rights Reserved. | 3 All Rights Reserved. |
4 | 4 |
5 Redistribution and use in source and binary forms, with or without | 5 Redistribution and use in source and binary forms, with or without |
6 modification, are permitted provided that the following conditions are | 6 modification, are permitted provided that the following conditions are |
7 met: | 7 met: |
8 * Redistributions of source code must retain the above copyright | 8 * Redistributions of source code must retain the above copyright |
9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
10 * Redistributions in binary form must reproduce the above copyright | 10 * Redistributions in binary form must reproduce the above copyright |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 const boost::regex & find_regex (ustring r); | 622 const boost::regex & find_regex (ustring r); |
623 | 623 |
624 /// Return a pointer to the shading attribs for this context. | 624 /// Return a pointer to the shading attribs for this context. |
625 /// | 625 /// |
626 ShadingAttribState *attribs () { return m_attribs; } | 626 ShadingAttribState *attribs () { return m_attribs; } |
627 | 627 |
628 /// Return a reference to the ParamValueList containing messages. | 628 /// Return a reference to the ParamValueList containing messages. |
629 /// | 629 /// |
630 ParamValueList & messages () { return m_messages; } | 630 ParamValueList & messages () { return m_messages; } |
631 | 631 |
| 632 /// Return a reference so the closure message memory. |
| 633 /// |
| 634 std::vector<ClosureColor> & closure_msgs () { return m_closure_msgs; } |
| 635 |
632 private: | 636 private: |
633 ShadingSystemImpl &m_shadingsys; ///< Backpointer to shadingsys | 637 ShadingSystemImpl &m_shadingsys; ///< Backpointer to shadingsys |
634 ShadingAttribState *m_attribs; ///< Ptr to shading attrib state | 638 ShadingAttribState *m_attribs; ///< Ptr to shading attrib state |
635 ShaderGlobals *m_globals; ///< Ptr to shader globals | 639 ShaderGlobals *m_globals; ///< Ptr to shader globals |
636 std::vector<char> m_heap; ///< Heap memory | 640 std::vector<char> m_heap; ///< Heap memory |
637 size_t m_heap_allotted; ///< Heap memory allotted | 641 size_t m_heap_allotted; ///< Heap memory allotted |
638 std::vector<ClosureColor> m_closures; ///< Closure memory | 642 std::vector<ClosureColor> m_closures; ///< Closure memory |
639 size_t m_closures_allotted; ///< Closure memory allotted | 643 size_t m_closures_allotted; ///< Closure memory allotted |
640 ExecutionLayers m_exec[ShadUseLast];///< Execution layers for the group | 644 ExecutionLayers m_exec[ShadUseLast];///< Execution layers for the group |
641 int m_npoints; ///< Number of points being shaded | 645 int m_npoints; ///< Number of points being shaded |
642 int m_nlights; ///< Number of lights | 646 int m_nlights; ///< Number of lights |
643 int m_curlight; ///< Current light index | 647 int m_curlight; ///< Current light index |
644 int m_curuse; ///< Current use that we're running | 648 int m_curuse; ///< Current use that we're running |
645 int m_nlayers[ShadUseLast]; ///< Number of layers for each use | 649 int m_nlayers[ShadUseLast]; ///< Number of layers for each use |
646 std::map<ustring,boost::regex> m_regex_map; ///< Compiled regex's | 650 std::map<ustring,boost::regex> m_regex_map; ///< Compiled regex's |
647 ParamValueList m_messages; ///< Message blackboard | 651 ParamValueList m_messages; ///< Message blackboard |
| 652 std::vector<ClosureColor> m_closure_msgs; // Mem for closure messages |
648 int m_lazy_evals; ///< Running tab of lazy evals | 653 int m_lazy_evals; ///< Running tab of lazy evals |
649 | 654 |
650 friend class ShadingExecution; | 655 friend class ShadingExecution; |
651 }; | 656 }; |
652 | 657 |
653 | 658 |
654 | 659 |
655 /// The state and machinery necessary to execute a single shader (node). | 660 /// The state and machinery necessary to execute a single shader (node). |
656 /// | 661 /// |
657 class ShadingExecution { | 662 class ShadingExecution { |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 | 982 |
978 | 983 |
979 }; // namespace OSL | 984 }; // namespace OSL |
980 | 985 |
981 #ifdef OSL_NAMESPACE | 986 #ifdef OSL_NAMESPACE |
982 }; // end namespace OSL_NAMESPACE | 987 }; // end namespace OSL_NAMESPACE |
983 using namespace OSL_NAMESPACE; | 988 using namespace OSL_NAMESPACE; |
984 #endif | 989 #endif |
985 | 990 |
986 #endif /* OSLEXEC_PVT_H */ | 991 #endif /* OSLEXEC_PVT_H */ |
OLD | NEW |