OLD | NEW |
1 /* | 1 /* |
2 Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al. | 2 Copyright (c) 2009-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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 namespace pvt { // OSL::pvt | 120 namespace pvt { // OSL::pvt |
121 | 121 |
122 | 122 |
123 | 123 |
124 ShadingSystemImpl::ShadingSystemImpl (RendererServices *renderer, | 124 ShadingSystemImpl::ShadingSystemImpl (RendererServices *renderer, |
125 TextureSystem *texturesystem, | 125 TextureSystem *texturesystem, |
126 ErrorHandler *err) | 126 ErrorHandler *err) |
127 : m_renderer(renderer), m_texturesys(texturesystem), m_err(err), | 127 : m_renderer(renderer), m_texturesys(texturesystem), m_err(err), |
128 m_statslevel (0), m_debug (false), m_lazylayers (true), | 128 m_statslevel (0), m_debug (false), m_lazylayers (true), |
129 m_clearmemory (false), m_rebind (false), | 129 m_clearmemory (false), m_rebind (false), m_debugnan (false), |
130 m_commonspace_synonym("world"), | 130 m_commonspace_synonym("world"), |
131 m_in_group (false), | 131 m_in_group (false), |
132 m_global_heap_total (0) | 132 m_global_heap_total (0) |
133 { | 133 { |
134 m_stat_shaders_loaded = 0; | 134 m_stat_shaders_loaded = 0; |
135 m_stat_shaders_requested = 0; | 135 m_stat_shaders_requested = 0; |
136 m_stat_groups = 0; | 136 m_stat_groups = 0; |
137 m_stat_groupinstances = 0; | 137 m_stat_groupinstances = 0; |
138 m_stat_regexes = 0; | 138 m_stat_regexes = 0; |
139 m_layers_executed_uncond = 0; | 139 m_layers_executed_uncond = 0; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 return true; | 201 return true; |
202 } | 202 } |
203 if (name == "clearmemory" && type == TypeDesc::INT) { | 203 if (name == "clearmemory" && type == TypeDesc::INT) { |
204 m_clearmemory = *(const int *)val; | 204 m_clearmemory = *(const int *)val; |
205 return true; | 205 return true; |
206 } | 206 } |
207 if (name == "rebind" && type == TypeDesc::INT) { | 207 if (name == "rebind" && type == TypeDesc::INT) { |
208 m_rebind = *(const int *)val; | 208 m_rebind = *(const int *)val; |
209 return true; | 209 return true; |
210 } | 210 } |
| 211 if (name == "debugnan" && type == TypeDesc::INT) { |
| 212 m_debugnan = *(const int *)val; |
| 213 return true; |
| 214 } |
211 if (name == "commonspace" && type == TypeDesc::STRING) { | 215 if (name == "commonspace" && type == TypeDesc::STRING) { |
212 m_commonspace_synonym = ustring (*(const char **)val); | 216 m_commonspace_synonym = ustring (*(const char **)val); |
213 return true; | 217 return true; |
214 } | 218 } |
215 return false; | 219 return false; |
216 } | 220 } |
217 | 221 |
218 | 222 |
219 | 223 |
220 bool | 224 bool |
(...skipping 18 matching lines...) Expand all Loading... |
239 return true; | 243 return true; |
240 } | 244 } |
241 if (name == "clearmemory" && type == TypeDesc::INT) { | 245 if (name == "clearmemory" && type == TypeDesc::INT) { |
242 *(int *)val = m_clearmemory; | 246 *(int *)val = m_clearmemory; |
243 return true; | 247 return true; |
244 } | 248 } |
245 if (name == "rebind" && type == TypeDesc::INT) { | 249 if (name == "rebind" && type == TypeDesc::INT) { |
246 *(int *)val = m_rebind; | 250 *(int *)val = m_rebind; |
247 return true; | 251 return true; |
248 } | 252 } |
| 253 if (name == "debugnan" && type == TypeDesc::INT) { |
| 254 *(int *)val = m_debugnan; |
| 255 return true; |
| 256 } |
249 return false; | 257 return false; |
250 } | 258 } |
251 | 259 |
252 | 260 |
253 | 261 |
254 void | 262 void |
255 ShadingSystemImpl::error (const char *format, ...) | 263 ShadingSystemImpl::error (const char *format, ...) |
256 { | 264 { |
257 va_list ap; | 265 va_list ap; |
258 va_start (ap, format); | 266 va_start (ap, format); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 return f != m_global_heap_offsets.end() ? f->second : -1; | 796 return f != m_global_heap_offsets.end() ? f->second : -1; |
789 } | 797 } |
790 | 798 |
791 | 799 |
792 }; // namespace pvt | 800 }; // namespace pvt |
793 }; // namespace OSL | 801 }; // namespace OSL |
794 | 802 |
795 #ifdef OSL_NAMESPACE | 803 #ifdef OSL_NAMESPACE |
796 }; // end namespace OSL_NAMESPACE | 804 }; // end namespace OSL_NAMESPACE |
797 #endif | 805 #endif |
OLD | NEW |