11#include "misc/Error.h"
12#include "render/general/resource/GpuResource.h"
13#include "render/directx/descriptors/DirectXDescriptor.h"
14#include "render/directx/descriptors/DirectXDescriptorType.hpp"
17#include "directx/d3dx12.h"
18#include "D3D12MemoryAllocator/include/D3D12MemAlloc.h"
24 using namespace Microsoft::WRL;
26 class DirectXRenderer;
27 class DirectXDescriptorHeap;
28 class DirectXResourceManager;
29 class ContinuousDirectXDescriptorRange;
62 DirectXDescriptorType descriptorType,
64 bool bBindDescriptorsToCubemapFaces =
true);
74 std::optional<D3D12_CPU_DESCRIPTOR_HANDLE>
88 DirectXDescriptorType descriptorType,
size_t iCubemapFaceIndex);
98 std::optional<D3D12_GPU_DESCRIPTOR_HANDLE>
137 std::array<std::unique_ptr<DirectXDescriptor>, 6>
175 static std::variant<std::unique_ptr<DirectXResource>,
Error>
create(
178 D3D12MA::Allocator* pMemoryAllocator,
179 const D3D12MA::ALLOCATION_DESC& allocationDesc,
180 const D3D12_RESOURCE_DESC& resourceDesc,
181 const D3D12_RESOURCE_STATES& initialResourceState,
182 std::optional<D3D12_CLEAR_VALUE> resourceClearValue,
212 std::recursive_mutex,
213 std::array<DescriptorsSameType, static_cast<size_t>(DirectXDescriptorType::END)>>
Definition: DirectXDescriptorHeap.h:44
Definition: DirectXDescriptorHeap.h:211
Definition: DirectXDescriptor.h:18
Definition: DirectXResourceManager.h:27
Definition: DirectXResource.h:32
ComPtr< D3D12MA::Allocation > pAllocatedResource
Definition: DirectXResource.h:217
std::optional< D3D12_GPU_DESCRIPTOR_HANDLE > getBindedDescriptorGpuHandle(DirectXDescriptorType descriptorType)
Definition: DirectXResource.cpp:158
ComPtr< ID3D12Resource > pSwapChainBuffer
Definition: DirectXResource.h:223
std::optional< D3D12_CPU_DESCRIPTOR_HANDLE > getBindedDescriptorCpuHandle(DirectXDescriptorType descriptorType)
Definition: DirectXResource.cpp:99
std::optional< D3D12_CPU_DESCRIPTOR_HANDLE > getBindedCubemapFaceDescriptorCpuHandle(DirectXDescriptorType descriptorType, size_t iCubemapFaceIndex)
Definition: DirectXResource.cpp:123
std::optional< Error > bindDescriptor(DirectXDescriptorType descriptorType, ContinuousDirectXDescriptorRange *pRange=nullptr, bool bBindDescriptorsToCubemapFaces=true)
Definition: DirectXResource.cpp:213
DirectXDescriptor * getDescriptor(DirectXDescriptorType descriptorType)
Definition: DirectXResource.cpp:182
static std::variant< std::unique_ptr< DirectXResource >, Error > create(DirectXResourceManager *pResourceManager, const std::string &sResourceName, D3D12MA::Allocator *pMemoryAllocator, const D3D12MA::ALLOCATION_DESC &allocationDesc, const D3D12_RESOURCE_DESC &resourceDesc, const D3D12_RESOURCE_STATES &initialResourceState, std::optional< D3D12_CLEAR_VALUE > resourceClearValue, size_t iElementSizeInBytes=0, size_t iElementCount=0)
Definition: DirectXResource.cpp:11
ID3D12Resource * pInternalResource
Definition: DirectXResource.h:229
static std::variant< std::unique_ptr< DirectXResource >, Error > createResourceFromSwapChainBuffer(DirectXResourceManager *pResourceManager, DirectXDescriptorHeap *pRtvHeap, const ComPtr< ID3D12Resource > &pSwapChainBuffer)
Definition: DirectXResource.cpp:76
std::pair< std::recursive_mutex, std::array< DescriptorsSameType, static_cast< size_t >(DirectXDescriptorType::END)> > mtxHeapDescriptors
Definition: DirectXResource.h:214
ID3D12Resource * getInternalResource() const
Definition: DirectXResource.h:110
Definition: GpuResource.h:16
const std::string sResourceName
Definition: GpuResource.h:97
const unsigned int iElementCount
Definition: GpuResource.h:94
const unsigned int iElementSizeInBytes
Definition: GpuResource.h:91