refactor(new_editor): tighten app dependency boundaries

This commit is contained in:
2026-04-19 02:48:41 +08:00
parent 7429f22fb1
commit c59cd83c38
86 changed files with 1754 additions and 1077 deletions

View File

@@ -4,6 +4,8 @@
#define NOMINMAX
#endif
#include "Host/ShaderResourceDescriptorAllocator.h"
#include <XCEngine/RHI/D3D12/D3D12DescriptorHeap.h>
#include <XCEngine/RHI/D3D12/D3D12Device.h>
#include <XCEngine/RHI/D3D12/D3D12Texture.h>
@@ -18,12 +20,12 @@
namespace XCEngine::UI::Editor::Host {
class D3D12ShaderResourceDescriptorAllocator {
class D3D12ShaderResourceDescriptorAllocator : public ShaderResourceDescriptorAllocator {
public:
bool Initialize(::XCEngine::RHI::RHIDevice& device, UINT descriptorCount = 64u);
void Shutdown();
bool Initialize(::XCEngine::RHI::RHIDevice& device, UINT descriptorCount = 64u) override;
void Shutdown() override;
bool IsInitialized() const;
bool IsInitialized() const override;
ID3D12DescriptorHeap* GetDescriptorHeap() const;
UINT GetDescriptorSize() const;
UINT GetDescriptorCount() const;
@@ -34,10 +36,10 @@ public:
bool CreateTextureDescriptor(
::XCEngine::RHI::RHITexture* texture,
D3D12_CPU_DESCRIPTOR_HANDLE* outCpuHandle,
D3D12_GPU_DESCRIPTOR_HANDLE* outGpuHandle);
D3D12_GPU_DESCRIPTOR_HANDLE* outGpuHandle) override;
void Free(
D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle,
D3D12_GPU_DESCRIPTOR_HANDLE gpuHandle);
D3D12_GPU_DESCRIPTOR_HANDLE gpuHandle) override;
private:
void AllocateInternal(