DirectX 遊戲的最佳化與進階主題Optimization and advanced topics for DirectX games

本節提供有關最佳化 DirectX 遊戲效能和其他進階主題的資訊。This section provides information about optimizing your DirectX game performance and other advanced topics.

「遊戲的非同步程式設計」主題討論,當您使用非同步程式設計以平行處理某些元件,以及使用多執行緒以充分使用功能強大的 GPU 時,應考量的各個重點。Asynchronous programming for games topic discusses the various points to consider when you want to use asynchronous programming to parallelize some of the components and use multithreading to maximise the use of a powerful GPU.

「處理 Direct3D 11 中的裝置已移除案例」這個主題使用逐步解說解釋使用 Direct3D 11 開發的遊戲如何偵測及回應圖形卡重設、移除或變更的案例。Handle device removed scenarios in Direct3D 11 topic uses a walkthrough to explain how games developed using Direct3D 11 can detect and respond to situations where the graphics adapter is reset, removed, or changed.

「UWP app 中的多重取樣」主題概述如何使用多重取樣消除鋸齒,一種在以 Direct3D 建立的 UWP 遊戲中減少鋸齒邊緣外觀的圖形技術。Multisampling in UWP apps topic provides an overview of how to use multi-sample antialiasing, a graphics technique to reduce the appearance of aliased edges in UWP games built with Direct3D.

「最佳化輸入和轉譯迴圈」主題提供有關如何選擇輸入事件處理選項,以管理輸入延遲及最佳化轉譯迴圈的指引。Optimize input and rendering loop topic provides guidance on how to choose the right input event processing option to manage input latency and optimize the rendering loop.

「透過 DXGI 1.3 交換鏈結減少延遲」主題說明如何藉由等候交換鏈結在適當時機發出訊號來開始轉譯新畫面,減少有效的畫面延遲。Reduce latency with DXGI 1.3 swap chains topic explains how to reduce effective frame latency by waiting for the swap chain to signal the appropriate time to begin rendering a new frame.

「交換鏈結縮放和覆疊」主題說明如何藉由使用縮放交換鏈結,比起顯示器原生解析度,以較低解析度來轉譯即時遊戲內容,改善轉譯時間。Swap chain scaling and overlays topic explains how to improve rendering times by using scaled swap chains to render real-time game content at a lower resolution than the display is natively capable of. 它也說明如何為具有硬體重疊功能的裝置,建立覆疊交換鏈結;這項技術可用來改善因使用交換鏈結縮放而縮小 UI 的問題。It also explains how to create overlay swap chains for devices with the hardware overlay capability; this technique can be used to alleviate the issue of a scaled down UI resulting from the use of swap chain scaling.

主題Topic 描述Description

遊戲的非同步程式設計Asynchronous programming for games

了解如何使用 DirectX 進行非同步程式設計與執行緒處理。Understand asynchronous programming and threading with DirectX.

在 Direct3D 11 中處理裝置移除案例Handle device removed scenarios in Direct3D 11

在移除或重新初始化圖形卡之後,重建 Direct3D 與 DXGI 裝置介面鏈結。Recreate the Direct3D and DXGI device interface chain when the graphics adapter is removed or reinitialized.

UWP app 中的多重取樣Multisampling in UWP apps

在使用 Direct3D 建置的 UWP 遊戲中使用多重取樣。Use multisampling in UWP games built using Direct3D.

最佳化輸入和轉譯迴圈Optimize input and rendering loop

降低輸入延遲和最佳化轉譯迴圈。Reduce input latency and optimize the rendering loop.

透過 DXGI 1.3 交換鏈結減少延遲Reduce latency with DXGI 1.3 swap chains

使用 DXGI 1.3 減少有效的畫面延遲。Use DXGI 1.3 to reduce the effective frame latency.

交換鏈結縮放和重疊Swap chain scaling and overlays

在行動裝置上建立縮放的交換鏈結以加快轉譯速度,以及使用覆疊交換鏈結來提高視覺品質。Create scaled swap chains for faster rendering on mobile devices, and use overlay swap chains to increase the visual quality.