- Add RHIDescriptorSet base class with Update/UpdateSampler/GetNativeHandle - Add RHIDescriptorPool with AllocateSet/FreeSet methods - Add SetGraphicsDescriptorSets/SetComputeDescriptorSets to RHICommandList - Implement D3D12DescriptorSet using descriptor heap allocation - Implement OpenGLDescriptorSet using TextureUnitAllocator - Add CreateDescriptorPool/CreateDescriptorSet factory methods to RHIDevice - Fix unit test SetVertexBuffer -> SetVertexBuffers API - Add SetVertexBuffer convenience method for D3D12 backward compatibility - Update CMakeLists.txt with new source files
37 lines
796 B
C++
37 lines
796 B
C++
#pragma once
|
|
|
|
#include "RHIEnums.h"
|
|
#include <cstdint>
|
|
|
|
namespace XCEngine {
|
|
namespace RHI {
|
|
|
|
class RHIDescriptorSet;
|
|
struct DescriptorSetLayoutDesc;
|
|
|
|
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;
|
|
|
|
virtual RHIDescriptorSet* AllocateSet(const DescriptorSetLayoutDesc& layout) = 0;
|
|
virtual void FreeSet(RHIDescriptorSet* set) = 0;
|
|
};
|
|
|
|
} // namespace RHI
|
|
} // namespace XCEngine
|