RHI: Add CreateRenderPass/CreateFramebuffer to RHIDevice interface
This commit is contained in:
@@ -74,6 +74,17 @@ public:
|
|||||||
RHIFence* CreateFence(const FenceDesc& desc) override;
|
RHIFence* CreateFence(const FenceDesc& desc) override;
|
||||||
RHISampler* CreateSampler(const SamplerDesc& desc) override;
|
RHISampler* CreateSampler(const SamplerDesc& desc) override;
|
||||||
|
|
||||||
|
RHIRenderPass* CreateRenderPass(
|
||||||
|
uint32_t colorAttachmentCount,
|
||||||
|
const AttachmentDesc* colorAttachments,
|
||||||
|
const AttachmentDesc* depthStencilAttachment) override;
|
||||||
|
RHIFramebuffer* CreateFramebuffer(
|
||||||
|
class RHIRenderPass* renderPass,
|
||||||
|
uint32_t width, uint32_t height,
|
||||||
|
uint32_t colorAttachmentCount,
|
||||||
|
RHIResourceView** colorAttachments,
|
||||||
|
RHIResourceView* depthStencilAttachment) override;
|
||||||
|
|
||||||
RHIDescriptorPool* CreateDescriptorPool(const DescriptorPoolDesc& desc) override;
|
RHIDescriptorPool* CreateDescriptorPool(const DescriptorPoolDesc& desc) override;
|
||||||
RHIDescriptorSet* CreateDescriptorSet(RHIDescriptorPool* pool, const DescriptorSetLayoutDesc& layout) override;
|
RHIDescriptorSet* CreateDescriptorSet(RHIDescriptorPool* pool, const DescriptorSetLayoutDesc& layout) override;
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ public:
|
|||||||
|
|
||||||
void Shutdown() override;
|
void Shutdown() override;
|
||||||
|
|
||||||
bool Initialize(D3D12RenderPass* renderPass, uint32_t width, uint32_t height,
|
bool Initialize(class RHIRenderPass* renderPass, uint32_t width, uint32_t height,
|
||||||
uint32_t colorAttachmentCount, RHIResourceView** colorAttachments,
|
uint32_t colorAttachmentCount, RHIResourceView** colorAttachments,
|
||||||
RHIResourceView* depthStencilAttachment);
|
RHIResourceView* depthStencilAttachment) override;
|
||||||
|
|
||||||
void* GetNativeHandle() override { return nullptr; }
|
void* GetNativeHandle() override { return nullptr; }
|
||||||
uint32_t GetWidth() const override { return m_width; }
|
uint32_t GetWidth() const override { return m_width; }
|
||||||
|
|||||||
@@ -45,6 +45,17 @@ public:
|
|||||||
RHIFence* CreateFence(const FenceDesc& desc) override;
|
RHIFence* CreateFence(const FenceDesc& desc) override;
|
||||||
RHISampler* CreateSampler(const SamplerDesc& desc) override;
|
RHISampler* CreateSampler(const SamplerDesc& desc) override;
|
||||||
|
|
||||||
|
RHIRenderPass* CreateRenderPass(
|
||||||
|
uint32_t colorAttachmentCount,
|
||||||
|
const AttachmentDesc* colorAttachments,
|
||||||
|
const AttachmentDesc* depthStencilAttachment) override;
|
||||||
|
RHIFramebuffer* CreateFramebuffer(
|
||||||
|
class RHIRenderPass* renderPass,
|
||||||
|
uint32_t width, uint32_t height,
|
||||||
|
uint32_t colorAttachmentCount,
|
||||||
|
RHIResourceView** colorAttachments,
|
||||||
|
RHIResourceView* depthStencilAttachment) override;
|
||||||
|
|
||||||
RHIDescriptorPool* CreateDescriptorPool(const DescriptorPoolDesc& desc) override;
|
RHIDescriptorPool* CreateDescriptorPool(const DescriptorPoolDesc& desc) override;
|
||||||
RHIDescriptorSet* CreateDescriptorSet(RHIDescriptorPool* pool, const DescriptorSetLayoutDesc& layout) override;
|
RHIDescriptorSet* CreateDescriptorSet(RHIDescriptorPool* pool, const DescriptorSetLayoutDesc& layout) override;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
#include "RHICapabilities.h"
|
#include "RHICapabilities.h"
|
||||||
#include "RHIDescriptorPool.h"
|
#include "RHIDescriptorPool.h"
|
||||||
#include "RHIDescriptorSet.h"
|
#include "RHIDescriptorSet.h"
|
||||||
|
#include "RHIRenderPass.h"
|
||||||
|
#include "RHIFramebuffer.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace XCEngine {
|
namespace XCEngine {
|
||||||
@@ -20,6 +22,8 @@ class RHIPipelineLayout;
|
|||||||
class RHIFence;
|
class RHIFence;
|
||||||
class RHISampler;
|
class RHISampler;
|
||||||
class RHIResourceView;
|
class RHIResourceView;
|
||||||
|
class RHIRenderPass;
|
||||||
|
class RHIFramebuffer;
|
||||||
|
|
||||||
class RHIDevice {
|
class RHIDevice {
|
||||||
public:
|
public:
|
||||||
@@ -39,6 +43,17 @@ public:
|
|||||||
virtual RHIFence* CreateFence(const FenceDesc& desc) = 0;
|
virtual RHIFence* CreateFence(const FenceDesc& desc) = 0;
|
||||||
virtual RHISampler* CreateSampler(const SamplerDesc& desc) = 0;
|
virtual RHISampler* CreateSampler(const SamplerDesc& desc) = 0;
|
||||||
|
|
||||||
|
virtual RHIRenderPass* CreateRenderPass(
|
||||||
|
uint32_t colorAttachmentCount,
|
||||||
|
const AttachmentDesc* colorAttachments,
|
||||||
|
const AttachmentDesc* depthStencilAttachment) = 0;
|
||||||
|
virtual RHIFramebuffer* CreateFramebuffer(
|
||||||
|
class RHIRenderPass* renderPass,
|
||||||
|
uint32_t width, uint32_t height,
|
||||||
|
uint32_t colorAttachmentCount,
|
||||||
|
RHIResourceView** colorAttachments,
|
||||||
|
RHIResourceView* depthStencilAttachment) = 0;
|
||||||
|
|
||||||
virtual RHIDescriptorPool* CreateDescriptorPool(const DescriptorPoolDesc& desc) = 0;
|
virtual RHIDescriptorPool* CreateDescriptorPool(const DescriptorPoolDesc& desc) = 0;
|
||||||
virtual RHIDescriptorSet* CreateDescriptorSet(RHIDescriptorPool* pool, const DescriptorSetLayoutDesc& layout) = 0;
|
virtual RHIDescriptorSet* CreateDescriptorSet(RHIDescriptorPool* pool, const DescriptorSetLayoutDesc& layout) = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user