Files
GhostEngine/Ghost.Graphics/RHI/ICommandQueue.cs
Misaki 74bb2ccda5 Refactor descriptor handling and shader compilation
Refactored descriptor allocation and release logic by introducing `IDescriptorAllocator` and replacing `DescriptorHeapAllocator` with `D3D12DescriptorHeap`. Updated descriptor structs to include validation properties and improved memory management with `ReadOnlySpan`.

Enhanced shader compilation by introducing `ShaderStage` and `CompilerVersion` enums, enabling more flexible and maintainable shader handling.

Refactored `Mesh` to use `IBuffer` for vertex and index buffers, added bindless descriptor support, and improved resource cleanup.

Updated `RenderSystem` and other components for better initialization, error handling, and disposal logic. General improvements to code readability and maintainability.
2025-09-13 20:07:29 +09:00

57 lines
1.4 KiB
C#

namespace Ghost.Graphics.RHI;
/// <summary>
/// Command queue interface
/// </summary>
public interface ICommandQueue : IDisposable
{
/// <summary>
/// Type of commands this queue can execute
/// </summary>
CommandQueueType Type
{
get;
}
/// <summary>
/// Submits a single command buffer for execution
/// </summary>
/// <param name="commandBuffer">Command buffer to submit</param>
void Submit(ICommandBuffer commandBuffer);
/// <summary>
/// Submits multiple command buffers for execution
/// </summary>
/// <param name="commandBuffers">Command buffers to submit</param>
void Submit(params ReadOnlySpan<ICommandBuffer> commandBuffers);
/// <summary>
/// Signals a fence with the specified value
/// </summary>
/// <param name="value">Value to signal</param>
/// <returns>The fence value that was signaled</returns>
ulong Signal(ulong value);
/// <summary>
/// Waits for the fence to reach the specified value
/// </summary>
/// <param name="value">Value to wait for</param>
void WaitForValue(ulong value);
/// <summary>
/// Gets the last completed fence value
/// </summary>
/// <returns>Last completed fence value</returns>
ulong GetCompletedValue();
}
/// <summary>
/// Command queue types
/// </summary>
public enum CommandQueueType
{
Graphics,
Compute,
Copy
}