feat(shader): add compute shader support and refactor pipeline
Refactored shader system to support both graphics and compute shaders. - Updated ANTLR grammars and parser logic for explicit shader model and compute shader entry points. - Split shader models and descriptors for graphics and compute. - Refactored pipeline key generation and D3D12 pipeline library for compute support. - Updated push constant layouts and HLSL includes for both shader types. - Improved error handling and test coverage with new example files. BREAKING CHANGE: Shader model, descriptor, and pipeline APIs have changed. Existing shader and pipeline code must be updated to use the new types and conventions.
This commit is contained in:
@@ -10,20 +10,25 @@ public static class RootSignatureLayout
|
||||
public const int ROOT_PARAMETER_COUNT = 1;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 16)]
|
||||
[StructLayout(LayoutKind.Explicit, Size = 12)]
|
||||
public struct PushConstantsData
|
||||
{
|
||||
public const uint NUM_32BITS_VALUE = 16u / sizeof(uint);
|
||||
|
||||
public const uint NUM_32BITS_VALUE = 12u / sizeof(uint);
|
||||
|
||||
[FieldOffset(0)]
|
||||
public uint frameBuffer;
|
||||
[FieldOffset(4)]
|
||||
public uint viewBuffer;
|
||||
public uint instanceBuffer;
|
||||
[FieldOffset(8)]
|
||||
public uint instanceIndex;
|
||||
[FieldOffset(8)]
|
||||
public uint propertyBuffer;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct FrameData
|
||||
{
|
||||
public uint instanceBuffer;
|
||||
public uint userBuffer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user