From ecd0bda0099845e192472d90e2e4fe122507e728 Mon Sep 17 00:00:00 2001 From: BlueRose <378100977@qq.com> Date: Wed, 8 Oct 2025 16:49:03 +0800 Subject: [PATCH] vault backup: 2025-10-08 16:49:03 --- .../DirectX12学习笔记(2)——Direct3D初始化.md | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/04-ComputerGraphics/Directx12/DirectX12学习笔记(2)——Direct3D初始化.md b/04-ComputerGraphics/Directx12/DirectX12学习笔记(2)——Direct3D初始化.md index bdef171..bdf4213 100644 --- a/04-ComputerGraphics/Directx12/DirectX12学习笔记(2)——Direct3D初始化.md +++ b/04-ComputerGraphics/Directx12/DirectX12学习笔记(2)——Direct3D初始化.md @@ -44,4 +44,23 @@ typedef struct DXGI_SAMPLE_DESC - DXGI_MODE_SCALING:缩放方式。 # 功能支持检测 -使用 \ No newline at end of file +使用ID3D12Device::CheckFeatureSupport()检查功能支持情况。 +- D3D12_FEATURE + - D3D12_FEATURE_D3D12_OPTIONS + - D3D12_FEATURE_ARCHITECHTURE + - D3D12_FEATURE_FEATURE_LEVELS + - D3D12_FEATURE_FORMAT_SUPPORT + - D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS + +# CPU与GPU间的交互 +## 命令队列 +DX12的命令队列被抽象为ID3D12CommandQueue。使用ID3D12Device::CreateCommandQueue()来创建。 +```c++ +Microsoft::WRL::ComPtr mCommandQueue; +D3D12_COMMAND_QUEUE_DESC queueDesc={}; +queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; +queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE; +ThrowIfFailed(md3Device->CreateCommandQueue(&queueDesc,IID_PPV_ARGS(&mCommandQueue))); +``` + +IID_PPV_ARGS \ No newline at end of file