Major architectural update to graphics/material/shader system: - Introduced strongly-typed key structs (Key64/Key128) for passes, variants, and pipelines; removed legacy key types. - Implemented robust hashing and key generation utilities for efficient variant and pipeline lookup/caching. - Shader compiler now compiles/caches all keyword variants using new key system; includes handled as lists. - Switched to push constant root signature for per-draw data; updated HLSL and C# codegen accordingly. - Refactored Material, Shader, and Pass data structures for cache efficiency and variant support. - Pipeline library and PSO management now use 128-bit keys and variant-specific caching. - Replaced WorldNode with SceneNode in editor/scene graph; introduced ComponentManager for archetype/query management. - Migrated math utilities to Misaki.HighPerformance.Mathematics; updated editor controls. - Updated all HLSL and codegen for new buffer/push constant layouts and macros. - Misc: project reference cleanup, D3D12 Work Graph support, doc updates, and code modernization.
58 lines
1.2 KiB
C#
58 lines
1.2 KiB
C#
namespace Ghost.DSL.ShaderCompiler;
|
|
|
|
internal struct FunctionCallDeclaration
|
|
{
|
|
public Token name;
|
|
public List<Token>? arguments;
|
|
}
|
|
|
|
internal struct PropertyDeclaration
|
|
{
|
|
public Token scope;
|
|
public Token type;
|
|
public Token name;
|
|
public FunctionCallDeclaration? propertyConstructor;
|
|
}
|
|
|
|
internal struct ValueDeclaration
|
|
{
|
|
public Token name;
|
|
public Token value;
|
|
}
|
|
|
|
internal struct HlslDeclaration
|
|
{
|
|
public List<Token>? tokens;
|
|
}
|
|
|
|
internal class PropertiesSyntax
|
|
{
|
|
public List<PropertyDeclaration>? properties;
|
|
public List<FunctionCallDeclaration>? functionCalls;
|
|
}
|
|
|
|
internal class PipelineSyntax
|
|
{
|
|
public List<ValueDeclaration>? values;
|
|
public List<FunctionCallDeclaration>? functionCalls;
|
|
}
|
|
|
|
internal class PassSyntax
|
|
{
|
|
public Token name;
|
|
public PipelineSyntax? localPipeline;
|
|
public HlslDeclaration? hlsl;
|
|
public List<Token>? defines;
|
|
public List<Token>? includes;
|
|
public List<FunctionCallDeclaration>? keywords;
|
|
public List<FunctionCallDeclaration>? functionCalls;
|
|
}
|
|
|
|
internal class DSLShaderSyntax
|
|
{
|
|
public Token name;
|
|
public PropertiesSyntax? properties;
|
|
public PipelineSyntax? pipeline;
|
|
public List<PassSyntax>? passes;
|
|
public List<FunctionCallDeclaration>? functionCalls;
|
|
} |