Game Development Reference
In-Depth Information
useful with small projects. The second screen allows you to specify what directories
and file extensions to synchronize. Obviously, this is not ecient when running with
exceptionally large data files, so you can disable syncing and simply use a network
share to access the files from both the host and target.
21.2.2 Capturing a Direct3D Frame
The typical workflow for debugging applications is to run them over and over until
you see a problem and then try to reproduce that problem by replicating the steps
that lead to the bug. Once you have a reproducible case, you then go through the
typical debugging cycle of instrumentation and inspection, code modification and
recompilation, and retry the scenario. This is a reasonable workflow, but can be
tedious because of the long turnaround time from bug detection to testing the fix.
Parallel Nsight improves this workflow by allowing the developer to capture
entire frames of rendering calls while the application in question is still running.
So, instead of having to exit the application and try to reproduce an issue, the
developer can capture the bug while the application is still running and inspect the
call stream and the state of the Direct3D runtime for the cause.
When the frame is captured, Parallel Nsight intercepts all of the timing functions
in the system so that the application will not change any state (world updates,
physics, animation, etc.). All of these systems will need to handle a very small
or even zero time delta properly to prevent application errors, and possible divide
by zero crashes. The easiest thing to do is to check the time delta at the top of
the routine and exit out early if the delta is 0 or so small that the system cannot
handle it.
If postmortem analysis is preferred, say, when trying to illustrate an issue with
a coworker, these saved frames can be serialized to disk and reloaded. This saved
frame can also be used as representative benchmark frames, for reporting bugs to
IHVs, and more.
Finally, the developer can exit the captured frame and return to the application,
which was dormant during that analysis session. The application will come back to
life right where the developer left off and from there he or she can continue playing
the game, looking for other issues to debug or analyze for performance.
21.2.3 Understanding Your Frame's Structure
Modern engines typically use a number of different passes on their frame database
to construct the final image. Shadow pass, Z prepass, albedo pass, even full-fledged
deferred rendering are all examples of multipass techniques. Then, once the scene is
rendered, many applications do any number of full-screen effects for HDR rendering,
glow effects, depth of field, etc., in order to achieve an amazing cinematic quality in
the final rendering. On top of all of this, there is a huge process distance between an
artist constructing some assets, running that through a content pipeline to prepare
Search WWH ::




Custom Search