Contents
The Top 10 Myths of Video Game Optimization
 
 
Printer-Friendly VersionPrinter-Friendly Version
 
Latest News
spacer View All spacer
 
November 22, 2009
 
Video Game Watchdog National Institute On Media And The Family Shutting Down [11]
 
Modern Warfare 2 Infinity Ward's 'Most Successful PC Version' Yet [12]
 
New Tech, Design Details Of Project Natal To Emerge At Gamefest In February
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
November 22, 2009
 
Sucker Punch Productions
Character Artist
 
Sucker Punch Productions
3D Environment Artist
 
Sucker Punch Productions
Network Programmer
 
Sucker Punch Productions
Texture Artist
 
Sony Online Entertainment
Brand Manager
 
Monolith Productions
Sr. Software Engineer, Engine - Monolith Productions - #113767
 
Crystal Dynamics
Sr. Level Designer
 
Gargantuan Studios
Lead World Designer
spacer
Latest Features
spacer View All spacer
 
November 22, 2009
 
arrow Upping The Craft: Susan O'Connor On Games Writing [6]
 
arrow Small Developers: Minimizing Risks in Large Productions - Part II [6]
 
arrow iPhone Piracy: The Inside Story [48]
 
arrow And Yet It Grows: Analyzing the Size and Growth of the European Game Market [5]
 
arrow NPD: Behind the Numbers, October 2009 [13]
 
arrow Reflecting On Uncharted 2: How They Did It [5]
 
arrow Sponsored Feature: Rasterization on Larrabee -- Adaptive Rasterization Helps Boost Efficiency
 
arrow Postmortem: Wadjet Eye's The Blackwell Convergence [2]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
November 22, 2009
 
Time Fcuk
 
Accepting the Inherent Value of Games
 
Planckogenesis, Part II: Song Structure & Gravy Train [1]
spacer
About
spacer News Director:
Leigh Alexander
Features Director:
Christian Nutt
Editor At Large:
Chris Remo
Advertising:
John 'Malik' Watson
Recruitment/Education:
Gina Gross
 
Features
  The Top 10 Myths of Video Game Optimization
by Eric Preisz
0 comments
Share RSS
 
 
September 13, 2007 Article Start Previous Page 4 of 4
 

Myth 9: You Can Determine The Performance Of A Graphics Call With The Following Methodology:

int start = getTime();

pD->DrawIndexedPrimitive(…);

Advertisement

int end = getTime();

int time = end-start;

The code above is understandable and intuitive. Unfortunately, VGO is not. The missing piece is the work that exists under the “hood” of the API and the hardware that it drives.

The CPU is a low latency, low throughput resource. In other words, if you ask it one question, you get a quick response. The GPU is a high latency, high throughput processor. In other words, if you ask it a question, you get a slow response. If you ask it many questions, the response is just as slow as if you asked it one.

How do we manage this difference in processing? With a structure called the command buffer. The code above is measuring the time it takes to set the command into the command buffer and determine if your render state changed from the last time you called DrawIndexPrimitive. This does NOT tell you how long it takes to render the triangles. That works occurs at a different time and is under the control of your drivers.

To measure that data, you would either need to force the DrawIndexedPrimitive call to no longer act in parallel (thus reducing the need for a buffer) or use drivers that can provide that information for you.

Myth 10: OpenGL Is Faster Than DirectX (Or Visa Versa)

Not so fast. Religion, politics, and API supremacy is not something I am prepared to discuss in a public forum. The decision is deeply personal, and rooted in the financial gain that your favorite API provides for your future. All sarcasm aside, let’s look at some facts.

You can make a slow game in OpenGL and you can make a slow game in DirectX. An API is an interface to your driver, and the driver is an interface to hardware. Any API that gives access to the hardware, without hindering it, will provide plenty of opportunity for performance.

I will go out on a limb and suggest that, at this time of this article, OpenGL is lacking the toolset supported by DirectX for analyzing GPU performance. There are several efforts in development to alleviate this.

In Closing

The process of VGO is as mystifying and complex as the hardware that drives our games. In the near future, this process will be demystified by better tools and made more complex by modern hardware, such as multi-core (think double digit number of cores) and unified shader architectures. Before implementing any optimization “tip” or “trick”, be certain to understand the underlying hardware that provides the optimization. If you don’t, you may be perpetuating another optimization myth.

 
Article Start Previous Page 4 of 4
 
Comments

none
 
Comment:
 


Submit Comment