Unamed Direct3D Benchmarking Tools ================================== By Colourless (aka Ryan Nunn) Email: colourles@users.sourceforge.net Lisence ======= These tools are distributed under the terms of the GNU General Public License. View the Full set or terms here: http://www.fsf.org/licenses/gpl.html Download the source code to the tools here: http://www.users.on.net/triforce/d3dbenchsrc.zip Basic Info ========== To record the output of a program, copy the dlls to the applications directory. Then run the application. It's that simple! The process will create 3 files, bufstream.lcs, comstream.lcs and texstream.lcs. These files can get VERY large very quickly, especially if the program does skinning in software or, heaven forbid, it does it's own TnL. When you are in the application you can then use the 'Scroll Lock' key to create 'benchmark sequences'. The sequences just slightly change how things the csv file is formatted when doing a benchmark. To playback what you recorded you should use LCSPlayer. Just a note that LCSPlayer is purely a frontend for SimpleStreamPlayer so they must be in the same directory to work. LCSPlayer lets you set a number of options including the mode you want to playback in. Demo mode will replay the streams using the exactly same timing that was recorded. Benchmark mode will attempt to playback the streams as fast as possible and will output benchmark timing info in the file "benchmark.csv". The file will be created in the directory containing the 3 stream files. Ideally when you do a benchmark you should have all three Precache options enabled. However note the amount of memory required, precaching can require a hell of a lot of memory. If you don't precache the files will be streamed from disk instaed. While the streaming is fairly efficent, I've noticed that on my system there is about a 5% penalty to framerates in benchmarks. You should really aim to have more than 128 MB of memory unused after precache. There is no rule about how much memory is required though, as each application that has been recorded has different requirements. Lots free is always good though. SimpleStreamPlayer is the program that actually interperates the streams and sends their data to Direct3D. While the program does accept command line args, you can't do anything with tham that you can't already set with LCSPlayer. If people want to know them, I will give details. ComStreamDump is something that only programmer types would be interested in. It will read comstream.lcs and convert the 'bytecode' into a pseudo code. The code is 'almost' C++, but not quite. Many of the function arg values are not printed so there is no chance you'd actually be able to compile it. What it will do is show you what the recorded app was doing. It's only useful to a certain degree though since the volume of text that is produced is phenomenal. Now for a little bit of info on the fields in the benchmark.csv file. Firstly, timing information for every frame is always printed. I will make an option in the future to only output the details for frames that are part of 'benchmark sequences' Frame: The absolute frame number from the start Bench ID: The number of the Benchmark Sequence. This is incremented for each new sequence you create. Bench Frame: The framenumber in the sequence. Time ms: The abolute time in ms from the start during the recording phase Rec ms/frame: How long it took to render the frame when recording Rec FPS: The FPS for the frame when recording Bench ms/frame: How long it took to render the frame when benchmarking Bench FPS: The FPS for the frame when benchmarking If a frame is not part of a benchmarking sequence, Bench ID and Bench Frame will be blank. The first frame of a Benchmarking sequence will have the word Begin to the right of the frame data. The last frame of a benchmarking sequence will have the word end to the right of the frame data. There will also be a set of averages and totals written next to the 'end' marker. Notes ===== When you make a recording, make sure you have VSync on. The reason is basic 2D user interface screen can render in the thousands of frames per second. This tends to create an excessive amount of useless data. You can find that more than half of the benchmark.csv file ends up being frames you don't want. Keeping Vsync on keeps the amount of data down to a useful amount. Then when you do a bencmarks make sure VSync is off. You shouldn't record for more than a few minutes. You'd be surprised at how quickly the stream files can grow. Don't be surprised if generates hundereds of megabyes of data every few minutes. If this starts to happen, it might seriously impact the ability to make benchmarks as you will not be able to precache all the files. This depends on the app though. Older apps that do software skinning are likely to produce huge amounts of vertex data. New apps that use vertex shaders for skinning are likely to produce far less data. Be warned with Halo, it's cinematics are rendered to D3D surfaces. D3DInterceptor will capture these and will attempt to write them to disk. Not only is the process really really slow, you'll generate an excessive amount of data. Just skip through them quickly. Other games might be similar, so, skip though all cinematics as quickly as you can. A limitation with how things currently are, benchmark.csv will be overwritten when you begin to benchmark again. SimpleStreamPlayer/LCSPlayer will bring up a dialog box before is starts the benchmark after loading giving you an opportunity to Cancel before the file if overwritten. You should rename your existing csv file as soon as the benchmark is finished, or convert it to an XLS. The SimpleStreamPlayer benchmark dialog box also serves as something to hold up execution till windows stops playing with it's Virtual Memory. You should wait till the hard drive stops being busy before actually starting the benchmark. The app does NOT do any sort of Caps or Format checking. It assumes that eveything is fine. This means it's possible that a sequence recorded on one card or even driver set will not work properly with another. Not much can be done about this though. Lastly, do not be an idiot. The 3 stream files will contain copyrighted materials so do NOT distribute them!