refactor(new_editor): tighten app dependency boundaries
This commit is contained in:
31
new_editor/app/Host/ShaderResourceDescriptorAllocator.h
Normal file
31
new_editor/app/Host/ShaderResourceDescriptorAllocator.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#include <XCEngine/RHI/RHIDevice.h>
|
||||
#include <XCEngine/RHI/RHITexture.h>
|
||||
|
||||
#include <d3d12.h>
|
||||
|
||||
namespace XCEngine::UI::Editor::Host {
|
||||
|
||||
class ShaderResourceDescriptorAllocator {
|
||||
public:
|
||||
virtual ~ShaderResourceDescriptorAllocator() = default;
|
||||
|
||||
virtual bool Initialize(::XCEngine::RHI::RHIDevice& device, UINT descriptorCount = 64u) = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
[[nodiscard]] virtual bool IsInitialized() const = 0;
|
||||
virtual bool CreateTextureDescriptor(
|
||||
::XCEngine::RHI::RHITexture* texture,
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE* outCpuHandle,
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE* outGpuHandle) = 0;
|
||||
virtual void Free(
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle,
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE gpuHandle) = 0;
|
||||
};
|
||||
|
||||
} // namespace XCEngine::UI::Editor::Host
|
||||
Reference in New Issue
Block a user