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:
@@ -5,16 +5,23 @@
|
||||
|
||||
// TODO: This should be auto generated to match the c# side.
|
||||
|
||||
struct PushConstantData
|
||||
struct GraphicsPushConstantData
|
||||
{
|
||||
BYTE_ADDRESS_BUFFER frameBuffer;
|
||||
BYTE_ADDRESS_BUFFER viewBuffer;
|
||||
BYTE_ADDRESS_BUFFER instanceBuffer;
|
||||
uint instanceIndex;
|
||||
};
|
||||
|
||||
struct ComputePushConstantData
|
||||
{
|
||||
BYTE_ADDRESS_BUFFER frameBuffer;
|
||||
BYTE_ADDRESS_BUFFER viewBuffer;
|
||||
BYTE_ADDRESS_BUFFER propertiesBuffer;
|
||||
};
|
||||
|
||||
struct FrameData
|
||||
{
|
||||
BYTE_ADDRESS_BUFFER instanceBuffer;
|
||||
BYTE_ADDRESS_BUFFER userBuffer;
|
||||
};
|
||||
|
||||
@@ -48,6 +55,10 @@ struct MeshData
|
||||
BYTE_ADDRESS_BUFFER meshletTrianglesBuffer;
|
||||
};
|
||||
|
||||
PushConstantData g_PushConstantData : register(b0);
|
||||
#if define(__GRAPHICS__)
|
||||
GraphicsPushConstantData g_PushConstantData : register(b0);
|
||||
#elif defined(__COMPUTE__)
|
||||
ComputePushConstantData g_PushConstantData : register(b0);
|
||||
#endif
|
||||
|
||||
#endif // GHOST_PROPERTIES_HLSL
|
||||
|
||||
Reference in New Issue
Block a user