Tightening Up the Graphics: Tools and Techniques for Debugging and Optimization
Elizabeth Baumel
Overview
Who this talk is geared for
Computer Graphics for Games
Graphics (D3D11) Pipeline
Input Assembler
Vertex Shader
Hull Shader
Tessellator
Domain Shader
Geometry Shader
Stream Out
Rasterizer
Pixel Shader
Output Merger
Memory Resources
Textures
Buffers
Render Targets
Constants
DepthStencil
...
CPU Side
Graphics (D3D11) Pipeline
Input Assembler
Vertex Shader
Hull Shader
Tessellator
Domain Shader
Geometry Shader
Stream Out
Rasterizer
Pixel Shader
Output Merger
Memory Resources
Textures
Buffers
Render Targets
Constants
DepthStencil
...
CPU Side
Common Graphics Problems
Blank Screen Quick Checks
¯\_(ツ)_/¯
Flickering
pretend this is flashing
Corruptions
Geometry Corruptions
Texture Corruptions
Depth and Render Target Horrors
Constant Buffer Corruptions
Shader color “printf” debugging
Use the D3D debug layer
Down the Rabbit Hole
Frame Capture and Analysis Tools
Renderdoc
Renderdoc
Timeline
API Calls
Specify exe to debug here
Events
Renderdoc
Timeline
API Calls
Pipeline State
Events
Timeline
API Calls
Mesh Output
Events
(draw calls)
Render Passes
Current pass’s clears and draw calls
Corresponding API calls
Shader Debugging
Sometimes it’s not your fault (but usually it is)
Profiling
Profiling
GPU PerfStudio
GPU PerfStudio
Draw Calls
Times PS was invoked
# prims rendered
# prims sent to rasterizer
# samples that passed depth stencil
# verts/prims read by IA
Times VS was invoked
Performance Issues
Overdraw
Hi-Z
Early Z
Pixel Shader
Late Z
Textures
Shaders
Vertex Shaders
struct VS_INPUT
{
float4 Position : POSITION;
float2 Texcoord : TEXCOORD0;
float3 Normal : NORMAL;
float3 Tangent : TANGENT;
float3 Bitangent: BINORMAL;
};
Tessellation
Geometry Shaders
Pixel Shaders
Compute Shaders
Wrap Up
Questions?
@Icetigris