RavEngine
Loading...
Searching...
No Matches
RGLD3D12.hpp
1#pragma once
2#include <RGL/Types.hpp>
3#include <RGL/Core.hpp>
4#include <RGL/TextureFormat.hpp>
5#include <RGL/Common.hpp>
6#include "RGLCommon.hpp"
7#include <cassert>
8#include <comdef.h>
9#include <wrl.h>
10#include <format>
11#include <directx/d3d12.h>
12
13//#define REFL_ENABLED
14
15inline void DX_CHECK(HRESULT dx_check_hr) {
16 RGL::Assert(!FAILED(dx_check_hr), _com_error(dx_check_hr,nullptr).ErrorMessage());
17}
18
19namespace RGL {
20 void InitD3D12(const RGL::InitOptions&);
21 void DeintD3D12();
22 struct RenderPassConfig;
23
24 Microsoft::WRL::ComPtr<ID3D12DescriptorHeap> CreateDescriptorHeap(Microsoft::WRL::ComPtr<ID3D12Device2> device,
25 D3D12_DESCRIPTOR_HEAP_TYPE type, uint32_t numDescriptors, D3D12_DESCRIPTOR_HEAP_FLAGS flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE);
26
27 RGLRenderPassPtr CreateRenderPassD3D12(const RenderPassConfig& config);
28
29 DXGI_FORMAT rgl2dxgiformat_texture(RGL::TextureFormat format);
30 D3D12_RESOURCE_STATES rgl2d3d12resourcestate(RGL::ResourceLayout layout);
31 D3D12_COMPARISON_FUNC rgl2d3dcompfn(RGL::DepthCompareFunction depthFunction);
32
33 void RGLDeviceRemovedHandler(PVOID context, BOOLEAN);
34
35 typedef void(*PIXBeginEvent_t)(void*, UINT64, _In_ PCSTR, ...);
36 typedef void(*PIXEndEvent_t)(void*);
37}
Definition base.h:1940
Definition Core.hpp:47