2026-03-18 01:46:01 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "RHIEnums.h"
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
namespace XCEngine {
|
|
|
|
|
namespace RHI {
|
|
|
|
|
|
2026-03-25 00:26:16 +08:00
|
|
|
class RHIDescriptorSet;
|
|
|
|
|
struct DescriptorSetLayoutDesc;
|
|
|
|
|
|
2026-03-18 01:46:01 +08:00
|
|
|
struct DescriptorPoolDesc {
|
|
|
|
|
void* device;
|
|
|
|
|
DescriptorHeapType type;
|
|
|
|
|
uint32_t descriptorCount;
|
|
|
|
|
bool shaderVisible;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class RHIDescriptorPool {
|
|
|
|
|
public:
|
|
|
|
|
virtual ~RHIDescriptorPool() = default;
|
|
|
|
|
|
|
|
|
|
virtual bool Initialize(const DescriptorPoolDesc& desc) = 0;
|
|
|
|
|
virtual void Shutdown() = 0;
|
|
|
|
|
|
|
|
|
|
virtual void* GetNativeHandle() = 0;
|
|
|
|
|
|
|
|
|
|
virtual uint32_t GetDescriptorCount() const = 0;
|
|
|
|
|
virtual DescriptorHeapType GetType() const = 0;
|
2026-03-25 00:26:16 +08:00
|
|
|
|
|
|
|
|
virtual RHIDescriptorSet* AllocateSet(const DescriptorSetLayoutDesc& layout) = 0;
|
|
|
|
|
virtual void FreeSet(RHIDescriptorSet* set) = 0;
|
2026-03-18 01:46:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace RHI
|
|
|
|
|
} // namespace XCEngine
|