线程安全的命令列表池,支持快速获取/释放。
CommandList
命令列表封装类,作为 ID3D12GraphicsCommandList 的句柄:
class CommandList {
CommandList();
explicit CommandList(ID3D12GraphicsCommandList* cmdList);
ID3D12GraphicsCommandList* Get() const;
bool IsValid() const;
void Reset(ID3D12CommandAllocator* pAllocator, ID3D12PipelineState* pInitialState);
void Close();
void ResourceBarrier(UINT NumBarriers, const D3D12_RESOURCE_BARRIER* pBarriers);
void DrawInstanced(UINT VertexCountPerInstance, UINT InstanceCount, UINT StartVertexLocation, UINT StartInstanceLocation);
void SetPipelineState(ID3D12PipelineState* pPipelineState);
void SetComputeRootSignature(ID3D12RootSignature* pRootSignature);
void Dispatch(UINT ThreadGroupCountX, UINT ThreadGroupCountY, UINT ThreadGroupCountZ);
};
2026年5月9日小于 1 分钟
