- D3D12Device, D3D12CommandQueue, D3D12CommandAllocator, D3D12Fence - D3D12DescriptorHeap, D3D12QueryHeap, D3D12RootSignature - D3D12PipelineState, D3D12Sampler, D3D12Shader - D3D12Buffer, D3D12Texture, D3D12SwapChain All D3D12 backend classes now directly use D3D12 APIs without going through RHI interface abstraction. This decouples the D3D12 backend from the RHI abstraction layer. Test: D3D12 rendering test passed (screenshot comparison 100% match)
37 lines
753 B
C++
37 lines
753 B
C++
#pragma once
|
|
|
|
#include <d3d12.h>
|
|
#include <wrl/client.h>
|
|
#include <cstdint>
|
|
|
|
#include "../DescriptorHeap.h"
|
|
#include "D3D12Enum.h"
|
|
|
|
using Microsoft::WRL::ComPtr;
|
|
|
|
namespace XCEngine {
|
|
namespace RHI {
|
|
|
|
class D3D12QueryHeap {
|
|
public:
|
|
D3D12QueryHeap();
|
|
~D3D12QueryHeap();
|
|
|
|
bool Initialize(ID3D12Device* device, QueryType type, uint32_t count);
|
|
void Shutdown();
|
|
|
|
ID3D12QueryHeap* GetQueryHeap() const { return m_queryHeap.Get(); }
|
|
|
|
void* GetNativeHandle() const { return m_queryHeap.Get(); }
|
|
QueryType GetType() const { return m_type; }
|
|
uint32_t GetCount() const { return m_count; }
|
|
|
|
private:
|
|
ComPtr<ID3D12QueryHeap> m_queryHeap;
|
|
QueryType m_type;
|
|
uint32_t m_count;
|
|
};
|
|
|
|
} // namespace RHI
|
|
} // namespace XCEngine
|