SwiftclassShaderGraph

class ShaderGraph.UserGraphCompiler

Members 9

  1. deinitdeinit
  2. fieldvar context: ShaderGraph.UserGraphCompiler.CompileContext?
  3. funcapplyConstExpr(context: inout ShaderGraph.UserGraphCompiler.CompileContext, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram
  4. funccompile(sourceProgram: ShaderGraph.UserGraph, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram
  5. funccompiledShaderProgram(for: ShaderGraph.UserGraph) throws -> ShaderGraph.MetalShaderProgram
  6. funcemitEdges(context: inout ShaderGraph.UserGraphCompiler.CompileContext, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram
  7. funcemitFunctionNodes(context: inout ShaderGraph.UserGraphCompiler.CompileContext, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram
  8. funcremovePassthroughNodes(context: inout ShaderGraph.UserGraphCompiler.CompileContext, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram
  9. initShaderGraph.UserGraphCompiler.__allocating_init() -> ShaderGraph.UserGraphCompiler
class UserGraphCompiler {
    struct CompileContext {
        let sourceProgram: ShaderGraph.UserGraph
        var sourceNodesToCompiledObjectIDs: [ShaderGraph.ShaderGraphNode.ID : ShaderGraph.FunctionNodeID]
        var inputsToCompiledObjectIDs: [ShaderGraph.Input : ShaderGraph.FunctionNodeID]
        var outputsToCompiledObjectIDs: [ShaderGraph.Output : ShaderGraph.FunctionNodeID]

        init(sourceProgram: ShaderGraph.UserGraph)

        func compiledNode(for: ShaderGraph.Input, in: ShaderGraph.MetalShaderProgram) -> (any ShaderGraph.MetalFunctionNode)?
        func compiledNode(for: ShaderGraph.Output, in: ShaderGraph.MetalShaderProgram) -> (any ShaderGraph.MetalFunctionNode)?
        func compiledNodeID(for: ShaderGraph.ShaderGraphNode) -> ShaderGraph.FunctionNodeID?
        func compiledNodeID(for: ShaderGraph.Input) -> ShaderGraph.FunctionNodeID?
        func compiledNodeID(for: ShaderGraph.Output) -> ShaderGraph.FunctionNodeID?
        func setOutput(_: any ShaderGraph.MetalFunctionNode, for: ShaderGraph.ShaderGraphNode) throws
        func setSource(_: ShaderGraph.ShaderGraphNode.ID, for: ShaderGraph.FunctionNodeID)
        func setSource(_: ShaderGraph.Input, for: ShaderGraph.FunctionNodeID)
        func setSource(_: ShaderGraph.Output, for: ShaderGraph.FunctionNodeID)
    }
    var context: ShaderGraph.UserGraphCompiler.CompileContext?

    init()
    func compile(sourceProgram: ShaderGraph.UserGraph, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram

    final func compiledShaderProgram(for: ShaderGraph.UserGraph) throws -> ShaderGraph.MetalShaderProgram
    final func applyConstExpr(context: inout ShaderGraph.UserGraphCompiler.CompileContext, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram
    final func emitFunctionNodes(context: inout ShaderGraph.UserGraphCompiler.CompileContext, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram
    final func removePassthroughNodes(context: inout ShaderGraph.UserGraphCompiler.CompileContext, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram
    final func emitEdges(context: inout ShaderGraph.UserGraphCompiler.CompileContext, into: ShaderGraph.MetalShaderProgram) throws -> ShaderGraph.MetalShaderProgram

    deinit
}