Skip to content

Graphics and GPU rendering checklist

Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).

Also apply the general checklist.

This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.

  • GFX-1 (8) Choose the graphics API or engine render pipeline, and the oldest hardware you will support, at the start of the project, and record the choice and the options you rejected in an ADR. (specific/graphics)
  • GFX-5 (8) Don't compile shaders or create pipeline state objects during gameplay. Create them while loading or on background threads, and keep them between runs in a pipeline cache (VkPipelineCache, a Direct3D 12 pipeline library) or as precompiled binaries where the platform allows, such as Metal binary archives. (specific/graphics) Automatable: Vulkan Best Practices validation.
  • GFX-2 (7) Break each platform's frame-time budget (GAMEDEV-12) down into GPU budgets for each device tier: GPU time per frame, shader cycles, triangle counts, and memory for textures, meshes and render targets. (specific/graphics) Automatable: Mali Offline Compiler.
  • GFX-3 (7) Before optimising, find out whether the frame is CPU-bound or GPU-bound, and which GPU stage limits it. Measure frame times in milliseconds with vsync off, not frames per second, and measure again after each change, because the bottleneck moves. (specific/graphics)
  • GFX-6 (7) Keep the number of shader variants small and known: count them in every build, strip those no material uses, and use dynamic branching, specialization constants or an ubershader for features that don't need a variant of their own. (specific/graphics)
  • GFX-7 (7) Compile every shader for every target API offline, in CI, and validate the output, so that a shader that fails on one platform breaks the build rather than the game. (specific/graphics) Automatable: DirectX Shader Compiler, glslang, naga.
  • GFX-8 (7) Run development and automated test builds with the graphics API's validation turned on, such as the Vulkan validation layers with Best Practices, the Direct3D 12 debug layer or Metal API Validation, and fix what they report. (specific/graphics)
  • GFX-10 (7) Cut draw calls and state changes: cull objects outside the view on the CPU, batch or instance objects that share a material, and sort draws by pipeline state. (specific/graphics) Automatable: Vulkan Best Practices validation.
  • GFX-12 (7) On tile-based GPUs, which include most mobile GPUs and Apple silicon, choose every attachment's load and store action deliberately: clear or don't-care on load unless you need the previous contents, and don't-care on store for attachments you don't read later, such as depth and multisampled color, which can then be transient or memoryless. (specific/graphics) Automatable: Vulkan Best Practices validation.
  • GFX-13 (7) Ship textures in GPU-compressed formats, with mipmaps for anything seen in 3D: ASTC, with ETC2 as the fallback, on mobile, BC formats on desktop, and on the web a format each device supports, for example by transcoding Basis Universal at load time. (specific/graphics)
  • GFX-4 (6) Inspect GPU frames with a frame debugger and GPU profiler for each target API: RenderDoc for Vulkan, Direct3D and OpenGL ES, PIX for Direct3D 12, the Metal debugger in Xcode for Apple GPUs, and Android GPU Inspector or the GPU vendor's profiler on Android. (specific/graphics)
  • GFX-9 (6) Use 16-bit precision (mediump or explicit 16-bit types) wherever it is accurate enough, especially in fragment shaders on mobile GPUs, and check the results on a mobile GPU, because desktop GPUs usually ignore mediump. (specific/graphics) Automatable: Mali Offline Compiler.
  • GFX-11 (6) Draw opaque geometry front to back and transparent geometry back to front, and avoid discard and depth writes in fragment shaders where you can, so that early depth testing removes hidden fragments before they are shaded. (specific/graphics)
  • GFX-14 (6) Give meshes that move towards and away from the camera levels of detail, with about half the triangles at each level, so that distant objects don't cost more than they show. (specific/graphics)
  • GFX-15 (6) Feature-detect WebGPU and keep a WebGL 2 fallback, or use an engine that has one. (specific/graphics)
  • GFX-16 (6) Handle a lost GPU context: listen for webglcontextlost and webglcontextrestored in WebGL, and watch GPUDevice.lost in WebGPU, and be able to recreate every GPU resource. (specific/graphics)