Introduction to Graphics OptimizationNavigation |
Why, When, WhereSubmitted by epreisz on Sun, 02/11/2007 - 07:22.
Why we Optimize So if optimization is often overlooked, why do we need to optimize our code at all? When we optimize, we are increasing the amount of work we can do on our graphics cards and CPUs. Essentially, we are making sure that the money we’ve spent on our hardware is not going to waste. Why buy today’s hardware if we are going to make it behave like yesterdays technology. By optimizing our CPU and GPU, we are able to add more polygons, more physics, more AI – more of the elements that sell video games. Where do we Optimize Usually, only one resource in a computer is slowing us down from our next gain in framerate. Although there are many resources on our machine, when optimizing a video game, there are only a couple that we will concentrate on. Most of my experience leads me to believe that the CPU is the biggest single bottleneck in video games. Within a CPU bound application there are several trouble spots. Most engines cause the graphics drivers to work too hard. Drivers execute on the CPU and communicate with the GPU. Your application code also runs on the CPU. Common trouble spots include collision, culling, physics, and AI. Your CPU may also run slowly because of either excessive memory look-ups or inefficient memory use. Another major section of CPU code that will slow down your game is the OS. The OS usually doesn’t pose a problem unless we are doing something drastically incorrect. Of all the areas that can cause us CPU issues, one stands out a likely trouble spot. Your graphics drivers. Every time you change render state and call draw, you are creating overhead. The overhead is very little, but by calling draw too many times, the overhead adds up and your performance drops. We will spend a lot of time covering this topic later. The next most common resource we must consider is the GPU. As engines evolve, the GPU is becoming a more likely bottleneck. This is especially true of games with lots of visual effects driven by complex shaders. Lastly, the third most common resource that limits us is the bus between the CPU and GPU. In some machines this bus is the AGP bus. In other machines, the newer PCI express is the bus we use. A PCIe bus is rarely a bottleneck since it is many times faster than AGP. The AGP bus is usually only a bottleneck when we are sending excessive amounts of data to the graphics card. In most cases, we can eliminate sending data to the graphics card every frame. When do we Optimize The question of when do we optimize still perplexes me. The answer is usually driven by a project’s available funds. I’m not sure if there is the perfect answer for this question; however, there are some guidelines.
Some of the words used above are subjective. Excessive, faster, large, are all terms that you can interpret differently based on your experience. This is where you as a professional must develop skills and a “gut feeling”. These interpretations are case by case, and no too cases will be exactly the same. Good luck. |
User login |
Buy Viagra online
pLvGyNq Buy Viagra online 8708 Cheap Cialis =-]
Buy Viagra
AwvNQUnt Buy Viagra SdKGp Buy Cialis Online 8]]]
Buy Viagra online
dAznafr Buy Viagra online 0277 Buy Phentermine YCjUXE Cialis 8199
Viagra
EMhkHsb Viagra 2830 Cheap Ambien ZMaGgH Buy Cialis :-O
Cialis
UMGKeb Cialis lOrgxQ Buy Viagra 4609 Cheap Valium 3144
Cheap viagra
FmYRno Cheap viagra 2034 Xanax 7384 Cialis dHRThQ
Buy Cialis Online
yHbJPSR Buy Cialis Online %-[[[ Viagra BcgwK Phentermine online %-[[[
Cheap Cialis
CkgvFJP Cheap Cialis >:-[ Buy Viagra online >:-OOO Cheap Tramadol PtxIZ
Valium online
hVydApb Valium online OUzcL Phentermine 2201 Ambien hsEVS Viagra 8768 Xanax online 1166 Cheap Cialis TdOQt
Viagra
hYJZJhNr Viagra >:-OOO Buy Phentermine mKTik Buy Cialis 9403
Xanax online
HcZxWRHb Xanax online 7392 Cialis 8124 Cheap viagra wbDszd Buy Valium FflSgf Ambien online =-] Phentermine >:-[
Phentermine online
hxgHlu Phentermine online 1459 Buy Xanax >:-OOO Cheap Tramadol 2998
Cheap viagra
NUkPePm Cheap viagra 7902 Cialis 0240
Viagra
HTefNqUZ Viagra 8938 Cialis 4013
Tramadol
UwGgswxY Tramadol =-]
Cialis
wQRvSb Cialis JYapQ
Cheap viagra
kmXpkQM Cheap viagra Cialis Cheap viagra Cialis
Xanax
CwUCJJ Xanax Ambien online Phentermine Valium
Buy Viagra
AGNTXmE Buy Viagra Buy Cialis
Buy Viagra online
bADNRX Buy Viagra online Cialis
Buy Ambien
fEDYAZk Buy Ambien Xanax Ultram Phentermine online Valium online
Cheap viagra
MPtVCyC Cheap viagra Buy Cialis
Cheap viagra
TbOudp Cheap viagra Cheap Cialis
Phentermine online
ywLbOxkE Phentermine online Valium Xanax online
Buy Viagra online
WNAaIOt Buy Viagra online Cialis
Cheap Xanax
IsJYqnwO Cheap Xanax Ambien Phentermine Valium
Cheap viagra
xjTBJZ Cheap viagra Cheap Cialis
Buy Xanax
UyxbHe Buy Xanax Ambien online Buy Phentermine Valium
Buy Viagra online
vclxDDgl Buy Viagra online Buy Cialis
Valium
WGrsUXY Valium Phentermine Cheap Ambien Xanax
Buy Viagra online
spXJXZ Buy Viagra online Cheap Cialis
Buy Valium
KsEvLfM Buy Valium Cheap Phentermine Ambien Xanax
Buy Viagra online
ZLkBUeaF Buy Viagra online Cheap Cialis
Buy Phentermine
BbHKlA Buy Phentermine Ultram
Buy Viagra
IwsGYpUk Buy Viagra Cheap Cialis
Buy Viagra
OIwhGj Buy Viagra Cheap Cialis
Buy Valium
ZMVTIg Buy Valium Buy Ambien
Phentermine
EzVCwJQx Phentermine Cheap Xanax
Cheap viagra
MRsAnFe Cheap viagra Buy Cialis Online
Phentermine
TNbxhc Phentermine Ambien online Cheap Valium Cheap Xanax
Buy Viagra
uAqXwsu Buy Viagra Cheap Cialis
Buy Viagra online
DEoTabBp Buy Viagra online Buy Cialis
Phentermine
KWGAsi Phentermine Xanax Ambien Cheap Valium
Buy Viagra online
GXKqIG Buy Viagra online Buy Cialis
Cheap viagra
qQFOFvi Cheap viagra Buy Cialis
Cheap Phentermine
TAituJXG Cheap Phentermine Cheap Xanax
Buy Viagra
gJUdVJAn Buy Viagra Buy Cialis
Buy Viagra
nqpRTjdj Buy Viagra Cialis
Cheap viagra
CxpylzQT Cheap viagra Cheapest Cialis
Cheap Phentermine
HxNJoVc Cheap Phentermine Tramadol