First iteration of dx12 command lists.

Doing nothing for now.
This commit is contained in:
2025-02-09 16:15:59 -05:00
parent 004698b135
commit d5e09e28bf
10 changed files with 392 additions and 165 deletions

View File

@@ -21,14 +21,14 @@ namespace Juliet
// Parameters of an INDEXED indirect draw command
struct IndexedIndirectDrawCommand
{
uint32 VertexCount; // Number of vertices to draw
uint32 InstanceCount; // Number of instanced to draw
uint32 VertexCount; // Number of vertices to draw
uint32 InstanceCount; // Number of instanced to draw
uint32 FirstIndex; // Base Index within the index buffer
int32 VertexOffset; // Offset the vertex index into the buffer
int32 VertexOffset; // Offset the vertex index into the buffer
uint32 FirstInstance; // ID of the first instance to draw
};
// Parameters of an INDEXED Indirect Dispatch Command
// Parameters of an INDEXED Indirect Dispatch Command
struct IndirectDispatchCommand
{
uint32 X_WorkGroupCount; // Number of Workgroup to dispatch on dimension X
@@ -36,6 +36,20 @@ namespace Juliet
uint32 Z_WorkGroupCount; // Number of Workgroup to dispatch on dimension Z
};
enum class QueueType : uint8
{
Graphics = 0,
Compute,
Copy,
Count
};
// Opaque types
struct CommandList {};
extern JULIET_API GraphicsDevice* CreateGraphicsDevice(GraphicsConfig config);
extern JULIET_API void DestroyGraphicsDevice(NonNullPtr<GraphicsDevice> device);
extern JULIET_API void DestroyGraphicsDevice(NonNullPtr<GraphicsDevice> device);
extern JULIET_API CommandList* AcquireCommandList(NonNullPtr<GraphicsDevice> device, QueueType queueType = QueueType::Graphics);
extern JULIET_API void SubmitCommandLists(NonNullPtr<GraphicsDevice> device);
} // namespace Juliet

View File

@@ -2,7 +2,7 @@
namespace Juliet
{
enum class RendererType : uint8
enum class DriverType : uint8
{
Any = 0,
DX12 = 1,
@@ -10,6 +10,6 @@ namespace Juliet
struct GraphicsConfig
{
RendererType PreferredRenderer = RendererType::DX12;
DriverType PreferredDriver = DriverType::DX12;
};
} // namespace Juliet