Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game [email protected]....
Transcript of Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game [email protected]....
![Page 1: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/1.jpg)
Beyond Printfy
D b i G hiDebugging Graphics Through Toolsg
![Page 2: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/2.jpg)
PresentersDave Aronson
NVIDIA Technical EvangelistNVIDIA – Technical [email protected]
Karen StevensMicrosoft – Software Design Engineer / Testg gXNA Professional Game [email protected]
![Page 3: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/3.jpg)
PurposeTo determine criteria for graphics tool selectionselection
To demonstrate how tools can be used toTo demonstrate how tools can be used to identify and solve top game scenarios
![Page 4: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/4.jpg)
AgendagTool SelectionScenariosScenariosLive Demos Q&AQ&AReferences
![Page 5: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/5.jpg)
Preliminary Criteria PointsyWhen selecting a tool, consider:
BudgetBudgetGeneral machine requirementsH d f tHardware manufacturersAdditional required softwareC d difi i iCode modification requirementsProduct supportFeatures and general areas of interest
![Page 6: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/6.jpg)
Popular Tool Areas of InterestGame Assets
Textures Shaders Vertex Buffers etcTextures, Shaders, Vertex Buffers, etcAPI Usage
DirectX / OpenGL calls state debug spewDirectX / OpenGL calls, state, debug spewDriver
Driver versions driver timingDriver versions, driver timingHardware
Timing, hardware usageTiming, hardware usage
![Page 7: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/7.jpg)
Tools Shown TodayyAMD
GPU PerfStudioGPU PerfStudioMicrosoft
PIX for WindowsPIX for WindowsNVIDIA
PerfHUDPerfHUDFX Composer
![Page 8: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/8.jpg)
Tool CategorizationgGame Asset
PIX for Windows GPU PerfStudioPIX for Windows, GPU PerfStudio,FX Composer, PerfHUD
APIPIX for Windows, PerfHUD, GPU PerfStudio
DriverPerfHUD, GPU PerfStudio
HardwarePerfHUD, GPU PerfStudio
![Page 9: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/9.jpg)
ExampleCriteria:
Application uses DirectX 9 / HLSLApplication uses DirectX 9 / HLSLNVIDIA GeForce 7800 card is presentD t t t h d t t lDo not want to change code to use toolPreference towards free tools
Possible options from previous list: FX ComposerPIX for Windows
![Page 10: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/10.jpg)
How to ChooseDetermine analysis levels of interest
One strategy is to start at the game asset levelOne strategy is to start at the game asset level and work down the list
Determine how tool fits criteriaPrioritize your requirements
ExperimentMost tools are free or have free trial periods, try a variety of scenarios
![Page 11: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/11.jpg)
ScenariosGlitches
Incorrect behaviorIncorrect behavior
BottlenecksBottlenecksPoor performance
![Page 12: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/12.jpg)
GlitchesThe game is not behaving as expected:
Game CrashGame CrashBlank ScreenMi i Obj tMissing ObjectsFlickering
![Page 13: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/13.jpg)
Game Crash
![Page 14: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/14.jpg)
Game CrashScenario:
Game crashes when moving fromGame crashes when moving from windowed to full screenOnly occurs on specific video cardsOnly occurs on specific video cardsThe game does not have a debug build due to performance/game play reasonsdue to performance/game play reasons
![Page 15: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/15.jpg)
Game CrashSelect settings to handle crash analysis
![Page 16: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/16.jpg)
Game CrashSetup diagnostic logging
![Page 17: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/17.jpg)
Game Crash
![Page 18: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/18.jpg)
Game CrashAnalysis:
Error: Direct3D9: (ERROR) :All userError: Direct3D9: (ERROR) :All user created D3DPOOL_DEFAULT surfaces must be freed before ResetEx canmust be freed before ResetEx can succeed. ResetEx Fails. An unhandled exception occurred.
![Page 19: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/19.jpg)
Game CrashOpen run file for analysis
![Page 20: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/20.jpg)
Game CrashExamine objects left after last valid call
![Page 21: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/21.jpg)
Game CrashLocated rouge object creation point
![Page 22: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/22.jpg)
Game CrashTrace calls for objects requiring release
![Page 23: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/23.jpg)
Game CrashConclusion:
Some D3DPOOL DEFAULT textures wereSome D3DPOOL_DEFAULT textures were not released before ResetEx occurredTools can examine remainingTools can examine remaining objects/textures to help ID items that require reworkequ e e oRemaining objects are easily cleaned up once identifiedAllows debugging of both retail and debug builds (assuming no copy write protection)
![Page 24: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/24.jpg)
Blank Screen
![Page 25: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/25.jpg)
Blank ScreenScenario:
Many machines render a black screenMany machines render a black screenThe program works fine on some machinesmachinesVideo card is the same on all machinesVideo driver is the same on all machinesVideo driver is the same on all machines
![Page 26: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/26.jpg)
Blank ScreenOverriding states can rule out issues early
![Page 27: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/27.jpg)
Blank ScreenOverriding texture renders scene viewable
![Page 28: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/28.jpg)
Blank ScreenChecking for sampler issues
Samplers exist, values look ok
![Page 29: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/29.jpg)
Blank ScreenCheck texture sampler 0 - OK
![Page 30: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/30.jpg)
Blank ScreenSampler texture 1 should not be black
![Page 31: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/31.jpg)
Blank ScreenRender frame and select inaccurate pixel
![Page 32: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/32.jpg)
Blank ScreenPixel history shows all calls output black
![Page 33: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/33.jpg)
Blank ScreenShader debugging proves black texture obliterates computed colorobliterates computed color
![Page 34: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/34.jpg)
Blank ScreenAnalysis:
Incorrect texture is usedIncorrect texture is usedThe texture is involved in all lighting operations therefore everything is blackoperations, therefore everything is blackBlack is a common fallback for textures which were unable to be loaded atwhich were unable to be loaded at runtime
![Page 35: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/35.jpg)
Blank ScreenConclusion:
The texture failed to loadThe texture failed to loadTexture loading is based on a file pathM hi ith i t th did ’tMachines with an incorrect path didn’t load the textureCorrecting path in setup restored lightingCorrecting path in setup restored lighting to all machines
![Page 36: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/36.jpg)
Missing Objectsg j
![Page 37: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/37.jpg)
Missing Objectsg jScenario:
Code traces prove all draw calls areCode traces prove all draw calls are executedA few of the objects drawn are notA few of the objects drawn are not displaying on the screen
![Page 38: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/38.jpg)
Missing Objectsg jRendered scene has missing objects
![Page 39: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/39.jpg)
Missing Objectsg jCheck wireframe geometry of scene
![Page 40: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/40.jpg)
Missing Objectsg jSuspicious artifacts present
![Page 41: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/41.jpg)
Missing Objectsg jIncorrect vertex shader input
![Page 42: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/42.jpg)
Missing Objectsg jYields unexpected output
![Page 43: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/43.jpg)
Missing Objectsg jIncorrect input & fogged out
![Page 44: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/44.jpg)
Missing Objectsg jDefect demonstration, modifying application: no fog no cull zooming outno fog, no cull, zooming out
![Page 45: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/45.jpg)
Missing Objectsg jConclusion:
Incorrect values were sent to vertexIncorrect values were sent to vertex shaders in both casesCulling reduced odds of detecting theCulling reduced odds of detecting the scene was inside the rook, fogging hid few remaining visible facese a g s b e aces
![Page 46: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/46.jpg)
Flickeringg
![Page 47: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/47.jpg)
FlickeringgScenario:
Texture shifts between two images everyTexture shifts between two images every time mouse is moved or scene position changeschangesThere is only one known mesh object used for the chess boardo t e c ess boa d
![Page 48: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/48.jpg)
FlickeringgExamine wireframe for obvious z-fighting
![Page 49: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/49.jpg)
FlickeringgExamine mesh view for hidden artifacts
![Page 50: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/50.jpg)
FlickeringgHidden mesh subset uncovered
![Page 51: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/51.jpg)
FlickeringgConclusion:
The checkerboard mesh had 2 subsetsThe checkerboard mesh had 2 subsets1 subset was coplanar with the board topR l f b t fi d ti i t dRemoval of subset fixed unanticipated z-fighting
![Page 52: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/52.jpg)
Bottleneck AnalysisyOverall behavior is correct, but rendering
takes longer than expected:takes longer than expected:Culling & Render OrderBuffer SizesBuffer SizesIneffective CodeInefficient ShadersInefficient Shaders Batch Sizes
![Page 53: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/53.jpg)
Culling & Render OrdergLook at the overdraw in the tool
![Page 54: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/54.jpg)
Culling & Render OrdergScroll through the draw calls to see how the frame is composedthe frame is composed
![Page 55: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/55.jpg)
Culling & Render OrdergNotice how the draws are just stacking and nothing is culledand nothing is culledAre objects being rendered multiplerendered multiple times?
![Page 56: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/56.jpg)
Culling & Render OrdergCheck the render statesRender stateRender state changes can happen inhappen in multiple places
![Page 57: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/57.jpg)
Culling & Render OrdergYou want to draw where the culling behavior will have the most effectbehavior will have the most effect.
![Page 58: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/58.jpg)
Culling & Render OrdergRemember that transparent objects must be drawn after opaque objects They alsobe drawn after opaque objects. They also need to be drawn via the painters algorithm.g
Render back to front
![Page 59: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/59.jpg)
Culling & Render OrdergGuidelines:
Order of culling methods used:Order of culling methods used:Software (portal/scene)View FrustumView FrustumZ-testBounding box – hw queries g q(did any pixels render or potentially render?)
![Page 60: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/60.jpg)
Buffer SizesPerformance is slowBut everything looks correctBut everything looks correctThrashing of system resources
![Page 61: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/61.jpg)
Buffer SizesThere could be lots of swapping occurring
![Page 62: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/62.jpg)
Buffer SizesLook at the perfmon counter for memory page faultspage faults
is it too high?
![Page 63: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/63.jpg)
Buffer SizesIs the swapping due to textures or other buffersbuffersLook at the signals in PerfHUD
![Page 64: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/64.jpg)
Buffer SizesSort the object table textures in PIX by size
![Page 65: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/65.jpg)
Buffer SizesUse mip-mapped texturestexturesUse smaller texturestextures
Use a compact texture formatte tu e o atDon’t become infatuated with new features
E.g. Selectively use aniso on texturesg y
![Page 66: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/66.jpg)
Buffer SizesOnly use data where necessaryPack data buffers with a smaller vdeclPack data buffers with a smaller vdeclUse LOD techniques to reduce the amount of data neededof data needed
Use a paging algorithm for loading dataUse a paging algorithm for loading dataReuse Render targets when possible
![Page 67: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/67.jpg)
Inefficient CodeAre you sure you are GPU bound? Look at the timing in PIX PerfHUDLook at the timing in PIX, PerfHUD
CPU
GPU
![Page 68: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/68.jpg)
Inefficient Code
Total time
Input Assembly
Geometry
Shader
TextureTexture
Raster Ops
Frame Buffer
![Page 69: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/69.jpg)
Inefficient CodeAdjust
render size texture sizes cull objectsrender size, texture sizes, cull objects
![Page 70: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/70.jpg)
Inefficient CodeStill slow? CPU boundRedundant state setting set texture callsRedundant state setting, set texture calls
![Page 71: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/71.jpg)
Inefficient ShadersUse a tool to analyze your shader
![Page 72: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/72.jpg)
Inefficient ShadersAre you sure it is the shader?Swap the shader for a simpler shader didSwap the shader for a simpler shader, did that make a difference?Suboptimal code in inner loopSuboptimal code in inner loop
![Page 73: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/73.jpg)
Batch SizesSmall batch sizes are inefficient and hard to detectto detectJust because the batches are big doesn’t mean that it is good eithermean that it is good either
![Page 74: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/74.jpg)
SummaryyTools can be a valuable aid to quickly determine root causes of a variety ofdetermine root causes of a variety of graphics problemsTools can cover a variety of debuggingTools can cover a variety of debugging levels, from high-level API issues to low-level hardware issues
![Page 75: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/75.jpg)
Live DemosMicrosoft - PIX for Windows
NVIDIA - PerfHUD
![Page 76: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/76.jpg)
Q&AQuestions, Comments, Concerns?
![Page 77: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/77.jpg)
ResourcesTools shown today can be downloaded at:
AMDAMDhttp://developer.amd.com
Microsofthttp://msdn.microsoft.com/directx
NVIDIAhttp://developer NVIDIA com/http://developer.NVIDIA.com/
The “PIXGameDebugging” application used in this presentation is available as a d3d9in this presentation is available as a d3d9 tutorial in the DirectX Software Development Kit, March 2008 release.p
![Page 78: Beyond Printf - Nvidia · 2008. 2. 29. · XNA Professional Game Platform!kstevens@microsoft.com. Purpose!To determine criteria for graphics tool ... in this presentation is available](https://reader035.fdocuments.in/reader035/viewer/2022071002/5fbe773034eeef67c92e49e0/html5/thumbnails/78.jpg)
ResourcesRecommended Newsgroups, sites, &
ForumsForumshttp://developer.NVIDIA.com/forums/http://forums xna com/http://forums.xna.com/http://www.gamedev.net/http://developer intel comhttp://developer.intel.comhttp://www.opengl.orghtt // d /http://www.gremedy.com/http://www.acm.org