- Replace old pipeline enums/structs with new strongly-typed PipelineState and enums (ZTest, ZWrite, Cull, Blend, ColorWriteMask) - Redesign pipeline keying: introduce 128-bit GraphicsPipelineKey, MaterialPipelineKey, and PassPipelineKey for robust PSO caching - Replace IRenderTargetStrategy with IRenderOutput; add SwapChainRenderOutput and TextureRenderOutput - Update renderer and window code to use new render output abstraction and handle viewport/scissor updates - Make ShaderPass a readonly struct and Shader a struct; use ID-based pass lookup for efficiency - Materials now support per-pass pipeline overrides with new keying - Add defensive checks in D3D12CommandBuffer; update D3D12PipelineLibrary for new keying/state - Move test shader to test.gsdef and update for new pipeline state syntax - Remove obsolete files/interfaces and perform general code cleanups - Update all usages and parsing logic for new pipeline state system
46 lines
1016 B
C#
46 lines
1016 B
C#
using Ghost.Core.Graphics;
|
|
|
|
namespace Ghost.SDL.Compiler;
|
|
|
|
public enum PropertyScope
|
|
{
|
|
Global,
|
|
Local,
|
|
}
|
|
|
|
internal class PropertySemantic
|
|
{
|
|
public PropertyScope scope;
|
|
public ShaderPropertyType type;
|
|
public string name = string.Empty;
|
|
public object? defaultValue;
|
|
}
|
|
|
|
internal class PipelineSemantic
|
|
{
|
|
public ZTest? zTest;
|
|
public ZWrite? zWrite;
|
|
public Cull? cull;
|
|
public Blend? blend;
|
|
public ColorWriteMask? colorMask;
|
|
}
|
|
|
|
internal class PassSemantic
|
|
{
|
|
public string name = string.Empty;
|
|
public ShaderEntryPoint taskShader;
|
|
public ShaderEntryPoint meshShader;
|
|
public ShaderEntryPoint pixelShader;
|
|
public List<string>? defines;
|
|
public List<KeywordsGroup>? keywords;
|
|
public PipelineSemantic? localPipeline;
|
|
}
|
|
|
|
internal class SDLSemantics
|
|
{
|
|
public string name = string.Empty;
|
|
public string fallback = string.Empty;
|
|
public List<PropertySemantic>? properties;
|
|
public PipelineSemantic? pipeline;
|
|
public List<PassSemantic>? passes;
|
|
} |