Graphics Reference
In-Depth Information
It is important to run any performance tests using a release
build configuration and without the Direct3D debug layer to get
accurate results.
By applying both GPU and CPU load, we are better able to identify where multithreaded
rendering might be beneficial. After reviewing the preceding graphs, it is apparent that unless
a certain amount of CPU load is present, there is only a small improvement in frame times;
in some cases, we even see a decrease in performance. The frame times have been
calculated using a 100-frame simple moving average.
There's moreā€¦
Another important feature of multithreading support in Direct3D 11 is that it also includes the
creation of Direct3D resources on multiple threads. This does not involve using immediate or
deferred contexts and is instead a feature of the Direct3D 11 device class. By creating resources
on multiple threads, we can decrease the initialization time of our Direct3D applications, and
importantly, for Windows 8, we are able to load and compile our resources asynchronously.
To identify the areas where multithreaded rendering has the most impact, it may be necessary
to employ the use of performance profilers or implement an in-application frame profiler.
GPUView is a CPU/GPU profiler included with the Windows Performance Toolkit; an overview
of using this profiling tool is available at http://graphics.stanford.edu/~mdfisher/
GPUView.html . The default install location for this tool on Windows 8 is C:\Program
Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\gpuview .
To check whether multithreading is supported at the hardware/driver level, we can use the
following function:
// Determine if the hardware driver supports CommandLists
// If not, the Direct3D framework will emulate support.
bool createResourcesConcurrently;
bool nativeCommandListSupport;
device.CheckThreadingSupport (out createResourcesConcurrently, out
nativeCommandListSupport);
The CheckThreadingSupport function wraps the native API ID3D11Device::CheckFeat
ureSupport method, returning two Boolean values and indicating whether the driver natively
supports the creation of resources simultaneously on multiple threads or command lists.
If not supported, the Direct3D 11 API will emulate the behavior, albeit with potentially
smaller performance gains.
 
Search WWH ::




Custom Search