RenderMan Shader ProfilingMarch 2006 |
Shader profiling identifies hotspots in shaders, taking the guesswork out of optimization. Shader hotspots include call stacks, allowing a detailed understanding of the context in which heavily used library routines are called. Each hotspot is linked to its source code, simplifying browsing and analysis.
Profiling is enabled with the following RIB option, which specifies an output filename:
Option "statistics" "shaderprofile" ["profile.xml"]When profiling is enabled, single-threaded rendering should be used to ensure accurate timing, i.e. using "prman -t:1" The impact on execution time and memory is modest. Profiling typically increases overall time by less than 5% and uses a few hundred kilobytes per shader.
Important: Shaders compiled with older versions of the shader compiler (before Release 13) will not be profiled. The output of the profiler includes a list of any shaders that require recompilation.
The output file contains an <xml-stylesheet> tag that specifies the location of a stylesheet. Sometimes the Web browser is unable to locate the stylesheet. This commonly occurs if the statistics are generated on a renderfarm but viewed on workstation that does not have the stylesheet in the same location.
A simple workaround is to edit the output file to specify the correct location of the stylesheet, which is normally located in $RMANTREE/etc/html where $RMANTREE is the location of the RenderMan installation directory. The current stylesheet filename is rmProfileHtml_1.0.xml, but subsequent releases will likely use a different version number.
/prman/statistics/profilestylesheet http://megacorp.com/render/profileStyle.xmlHowever, beware that "cross-domain security" featuers in some browsers do not permit an XML file to use a stylesheet in a different domain (e.g. if the XML is loaded from the local filesystem, the stylesheet cannot be loaded from a web server).
Other issues may arise:
Make sure JavaScript is enabled.
Mysteriously, some browsers will not load source code that starts with "#define". (This is probably a relic of Unix file type conventions.) Simply add a comment to the start of such files and try again.
Line numbers in the source code browser are sometimes off by one. This is due to a browser bug that discards the first blank line of any text file. The source code browser provides a button to adjust for this quirk. Or simply edit such files to eliminate leading blank lines.
Some browsers will not load files with unknown filename extensions (such as ".sl"). It might be possible to work around such issues by changing MIME types or file associations. For example, in Firefox this can be accomplished by editing a file called mimeTypes.rdf in your Firefox profile directory, which is usually located in the following directory:
Look for the description of mimetype:text/plain, and add the filename extensions sl and h:
<RDF:Description RDF:about="urn:mimetype:text/plain" NC:value="text/plain"> <NC:fileExtensions>txt</NC:fileExtensions> <NC:fileExtensions>text</NC:fileExtensions> <NC:fileExtensions>sl</NC:fileExtensions> <NC:fileExtensions>h</NC:fileExtensions> <NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain"/> </RDF:Description>
Pixar
Animation Studios
|