namespace Ghost.Graphics.RHI;
///
/// D3D12-native render device interface for creating graphics resources
///
public interface IRenderDevice : IDisposable
{
///
/// Graphics command queue for rendering operations
///
ICommandQueue GraphicsQueue { get; }
///
/// Compute command queue for compute shader operations
///
ICommandQueue ComputeQueue { get; }
///
/// Copy command queue for data transfer operations
///
ICommandQueue CopyQueue { get; }
///
/// Creates a command buffer for recording rendering commands
///
/// Type of command buffer to create
/// A new command buffer instance
ICommandBuffer CreateCommandBuffer(CommandBufferType type = CommandBufferType.Graphics);
///
/// Creates a swap chain for presentation
///
/// Swap chain description
/// A new swap chain instance
ISwapChain CreateSwapChain(SwapChainDesc desc);
///
/// Creates a render target for off-screen rendering
///
/// Render target description
/// A new render target instance
IRenderTarget CreateRenderTarget(RenderTargetDesc desc);
///
/// Creates a texture resource
///
/// Texture description
/// A new texture instance
ITexture CreateTexture(TextureDesc desc);
///
/// Creates a buffer resource
///
/// Buffer description
/// A new buffer instance
IBuffer CreateBuffer(BufferDesc desc);
///
/// Gets the descriptor allocator for managing descriptors
///
IDescriptorAllocator DescriptorAllocator { get; }
}
///
/// Command buffer types matching D3D12 command list types
///
public enum CommandBufferType
{
Graphics,
Compute,
Copy
}