MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenShadingLanguage / set_debug

Method set_debug

src/liboslexec/runtimeoptimize.cpp:164–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163
164void
165OSOProcessorBase::set_debug ()
166{
167 // start with the shading system's idea of debugging level
168 m_debug = shadingsys().debug();
169
170 // If either group or layer was specified for debug, surely they want
171 // debugging turned on.
172 if (shadingsys().debug_groupname() || shadingsys().debug_layername())
173 m_debug = std::max (m_debug, 1);
174
175 // Force debugging off if a specific group was selected for debug
176 // and we're not it, or a specific layer was selected for debug and
177 // we're not it.
178 bool wronggroup = (shadingsys().debug_groupname() &&
179 shadingsys().debug_groupname() != group().name());
180 bool wronglayer = (shadingsys().debug_layername() && inst() &&
181 shadingsys().debug_layername() != inst()->layername());
182 if (wronggroup || wronglayer)
183 m_debug = 0;
184}
185
186
187

Callers

nothing calls this directly

Calls 7

groupFunction · 0.85
debug_groupnameMethod · 0.80
debug_layernameMethod · 0.80
layernameMethod · 0.80
maxFunction · 0.50
debugMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected