- Major optimization of Ghost.RenderGraph.Concept: pooled resources, zero-allocation hot paths, explicit queue types, and batch barrier APIs. - Migrated Ghost.DSL shader compiler to ANTLR4-based parser; removed hand-written parser, added grammar files and semantic model conversion. - Added CollectionPool/ListPool for pooled list management. - Updated documentation for new architecture and performance. - Removed Ghost.Shader.Concept (material/material system) from repo and solution. - README.md replaced with a brief project statement.
48 lines
1.0 KiB
C#
48 lines
1.0 KiB
C#
using Ghost.Core.Graphics;
|
|
|
|
namespace Ghost.DSL.ShaderCompiler;
|
|
|
|
public enum PropertyScope
|
|
{
|
|
Global,
|
|
Local,
|
|
}
|
|
|
|
public class PropertySemantic
|
|
{
|
|
public PropertyScope scope;
|
|
public ShaderPropertyType type;
|
|
public string name = string.Empty;
|
|
public object? defaultValue;
|
|
}
|
|
|
|
public class PipelineSemantic
|
|
{
|
|
public ZTest? zTest;
|
|
public ZWrite? zWrite;
|
|
public Cull? cull;
|
|
public Blend? blend;
|
|
public ColorWriteMask? colorMask;
|
|
}
|
|
|
|
public class PassSemantic
|
|
{
|
|
public string name = string.Empty;
|
|
public ShaderEntryPoint taskShader;
|
|
public ShaderEntryPoint meshShader;
|
|
public ShaderEntryPoint pixelShader;
|
|
public string? hlsl;
|
|
public List<string>? defines;
|
|
public List<string>? includes;
|
|
public List<KeywordsGroup>? keywords;
|
|
public PipelineSemantic? localPipeline;
|
|
}
|
|
|
|
public class DSLShaderSemantics
|
|
{
|
|
public string name = string.Empty;
|
|
public string? hlsl;
|
|
public List<PropertySemantic>? properties;
|
|
public PipelineSemantic? pipeline;
|
|
public List<PassSemantic>? passes;
|
|
} |