OLD | NEW |
1 /* | 1 /* |
2 Copyright (c) 2010 Sony Pictures Imageworks Inc., et al. | 2 Copyright (c) 2010 Sony Pictures Imageworks Inc., 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 { | 128 { |
129 ASSERT (nargs == 3); | 129 ASSERT (nargs == 3); |
130 Symbol &Result (exec->sym (args[0])); | 130 Symbol &Result (exec->sym (args[0])); |
131 Symbol &Name (exec->sym (args[1])); | 131 Symbol &Name (exec->sym (args[1])); |
132 Symbol &Val (exec->sym (args[2])); | 132 Symbol &Val (exec->sym (args[2])); |
133 ASSERT (Result.typespec().is_int() && Name.typespec().is_string()); | 133 ASSERT (Result.typespec().is_int() && Name.typespec().is_string()); |
134 | 134 |
135 bool varying = (Name.is_varying()); | 135 bool varying = (Name.is_varying()); |
136 exec->adjust_varying (Result, varying); | 136 exec->adjust_varying (Result, varying); |
137 exec->adjust_varying (Val, varying); | 137 exec->adjust_varying (Val, varying); |
| 138 varying |= Result.is_varying(); // adjust in case we're in a conditional |
138 | 139 |
139 VaryingRef<int> result ((int *)Result.data(), Result.step()); | 140 VaryingRef<int> result ((int *)Result.data(), Result.step()); |
140 VaryingRef<ustring> name ((ustring *)Name.data(), Name.step()); | 141 VaryingRef<ustring> name ((ustring *)Name.data(), Name.step()); |
141 ParamValueList &messages (exec->context()->messages()); | 142 ParamValueList &messages (exec->context()->messages()); |
142 std::vector<ClosureColor> &closure_msgs (exec->context()->closure_msgs()); | 143 std::vector<ClosureColor> &closure_msgs (exec->context()->closure_msgs()); |
143 | 144 |
144 TypeDesc type = Val.typespec().simpletype(); | 145 TypeDesc type = Val.typespec().simpletype(); |
145 if (Val.typespec().is_closure ()) | 146 if (Val.typespec().is_closure ()) |
146 type = TypeDesc::TypeInt; // Actually store closure indices only | 147 type = TypeDesc::TypeInt; // Actually store closure indices only |
147 size_t datasize = type.size(); | 148 size_t datasize = type.size(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 exec->zero_derivs (Val); | 195 exec->zero_derivs (Val); |
195 } | 196 } |
196 | 197 |
197 | 198 |
198 | 199 |
199 }; // namespace pvt | 200 }; // namespace pvt |
200 }; // namespace OSL | 201 }; // namespace OSL |
201 #ifdef OSL_NAMESPACE | 202 #ifdef OSL_NAMESPACE |
202 }; // end namespace OSL_NAMESPACE | 203 }; // end namespace OSL_NAMESPACE |
203 #endif | 204 #endif |
OLD | NEW |