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