refactor(new_editor): tighten app dependency boundaries
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "Rendering/Viewport/ViewportRenderTargets.h"
|
||||
|
||||
#include "Host/ShaderResourceDescriptorAllocator.h"
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
namespace {
|
||||
@@ -111,7 +113,7 @@ bool CreateViewportSelectionMaskResources(
|
||||
}
|
||||
|
||||
bool CreateViewportTextureDescriptor(
|
||||
Host::D3D12ShaderResourceDescriptorAllocator& textureDescriptorAllocator,
|
||||
Host::ShaderResourceDescriptorAllocator& textureDescriptorAllocator,
|
||||
ViewportRenderTargets& targets) {
|
||||
if (!textureDescriptorAllocator.CreateTextureDescriptor(
|
||||
targets.colorTexture,
|
||||
@@ -217,7 +219,7 @@ bool ViewportRenderTargetManager::EnsureTargets(
|
||||
std::uint32_t width,
|
||||
std::uint32_t height,
|
||||
::XCEngine::RHI::RHIDevice& device,
|
||||
Host::D3D12ShaderResourceDescriptorAllocator& textureDescriptorAllocator,
|
||||
Host::ShaderResourceDescriptorAllocator& textureDescriptorAllocator,
|
||||
ViewportRenderTargets& targets) const {
|
||||
if (width == 0u || height == 0u) {
|
||||
return false;
|
||||
@@ -245,7 +247,7 @@ bool ViewportRenderTargetManager::EnsureTargets(
|
||||
}
|
||||
|
||||
void ViewportRenderTargetManager::DestroyTargets(
|
||||
Host::D3D12ShaderResourceDescriptorAllocator* textureDescriptorAllocator,
|
||||
Host::ShaderResourceDescriptorAllocator* textureDescriptorAllocator,
|
||||
ViewportRenderTargets& targets) const {
|
||||
if (textureDescriptorAllocator != nullptr && targets.srvCpuHandle.ptr != 0) {
|
||||
textureDescriptorAllocator->Free(targets.srvCpuHandle, targets.srvGpuHandle);
|
||||
|
||||
Reference in New Issue
Block a user