Hasty Briefsbeta

Ten Years of D3D12

2 days ago
  • #APIEvolution
  • #GraphicsProgramming
  • #D3D12
  • Direct3D 12 (D3D12) has been around for ten years, evolving significantly since its release with Windows 10 in 2015.
  • D3D12 has introduced major features like DXR (DirectX Raytracing) and Work Graphs, alongside numerous smaller quality-of-life updates.
  • Programmable Sample Points allow custom MSAA subsample positions, useful for niche cases like software variable rate shading.
  • View Instancing facilitates stereo rendering for VR by instancing draws for multiple views, though its benefits are hardware-dependent.
  • Depth Bounds Test, reintroduced in D3D12, aids in deferred rendering and shadow techniques by testing pixel depth against specified bounds.
  • Variable Rate Shading (VRS) optimizes performance by reducing pixel shader workload in less critical areas, with three specification methods.
  • Relaxed Format Casting simplifies resource view creation by allowing multiple format views without requiring TYPELESS formats.
  • Direct writing to Block-Compressed (BC) formats is now possible, enhancing GPU-based compression workflows.
  • Writable R9G9B9E5 textures enable direct GPU encoding, supported on AMD RDNA2 and newer GPUs.
  • WriteBufferImmediate and OpenExistingHeapFromAddress aid in GPU crash debugging by implementing 'breadcrumbs' for error tracing.
  • GPU Upload Heaps leverage Resizable BAR technology for direct CPU updates to VRAM, improving data upload efficiency.
  • ExecuteIndirect now supports an incrementing constant for draw/dispatch identification, simplifying indirect command workflows.
  • Sampler Feedback provides detailed texture access data, useful for sparse virtual textures but comes with API complexity.
  • Tight Resource Alignment reduces memory waste by allowing smaller alignment values for placed resources.
  • Render Passes optimize tiler GPUs by specifying render target data lifetime and preservation, enhancing bandwidth efficiency.
  • Enhanced Barriers align D3D12 with Vulkan's explicit synchronization model, simplifying resource state management.
  • Ray Tracing (DXR) introduces hardware-accelerated ray tracing with two approaches: DispatchRays and RayQuery.
  • Mesh Shaders replace traditional vertex processing with compute-like flexibility, enabling procedural geometry and efficient culling.
  • Work Graphs enable GPU self-scheduling of compute work, though performance benefits are still under evaluation.
  • Wave and Quad Ops in HLSL facilitate thread communication within waves and quads, useful for optimizations but require careful usage.
  • 16-bit types and Barycentrics enhance shader precision and interpolation control, supported on modern GPUs.
  • Shader Libraries and Dynamic Resources simplify bindless resource access, reducing root signature complexity.
  • Debug features like DRED and shader printf improve GPU crash debugging and shader development workflows.
  • HLSL templates and C++-style features (enums, operator overloading) modernize shader code, enabling more shared code between HLSL and C++.
  • Designated Initializers in C++20 streamline struct initialization, useful for resource and barrier setup.