feat(shader): refactor and enhance shader compilation
Refactored shader compilation and resource management systems: - Introduced `DXCShaderCompiler` for HLSL compilation and reflection. - Added `BuildFinalShaderCode` method for robust shader code generation. - Replaced raw strings with `ShaderEntryPoint` struct for shader paths. - Updated `RenderContext` and `RenderGraphContext` for new pipeline methods. - Added thread-safe resource management methods in `ResourceManager`. - Introduced `DXCShaderReflectionData` for shader reflection handling. - Removed redundant code and simplified `ShaderPropertiesRegistry`. BREAKING CHANGE: Updated shader and resource APIs to use new structures and methods.
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
|
||||
#include "F:/csharp/GhostEngine/src/Runtime/Ghost.Graphics/Shaders/Includes/Common.hlsl"
|
||||
|
||||
#define GLOBAL_BINDLESS_SIG \
|
||||
"RootFlags(ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT | " \
|
||||
"CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | " \
|
||||
"SAMPLER_HEAP_DIRECTLY_INDEXED), " \
|
||||
"RootConstants(num32BitConstants=3, b0, space=0)"
|
||||
|
||||
// TODO: This should be auto generated to match the c# side.
|
||||
|
||||
struct GraphicsPushConstantData
|
||||
@@ -59,6 +65,9 @@ struct MeshData
|
||||
GraphicsPushConstantData g_PushConstantData : register(b0);
|
||||
#elif defined(__COMPUTE__)
|
||||
ComputePushConstantData g_PushConstantData : register(b0);
|
||||
#elif defined(__WORK_GRAPH__)
|
||||
#define WorkGraphPushConstantData ComputePushConstantData
|
||||
WorkGraphPushConstantData g_PushConstantData : register(b0);
|
||||
#endif
|
||||
|
||||
#endif // GHOST_PROPERTIES_HLSL
|
||||
|
||||
Reference in New Issue
Block a user