// Generated API outline. Implementation bodies omitted. #nullable enable using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using System.Threading; using System; using nfloat = System.Runtime.InteropServices.NFloat; using static Xui.Core.Math2D.Constants; namespace Xui.GPU.Backends.Metal { using System.Text; using Xui.GPU.IR; /// /// Metal Shading Language (MSL) code generator for Apple platforms (macOS, iOS). /// Translates IR to MSL shader code compatible with the Metal framework. /// /// /// MSL maps closely to C++14 with Metal-specific extensions. /// Key differences from HLSL: /// - Vertex/fragment functions use [[attribute(n)]] instead of semantics /// - Built-ins use [[position]], [[color(n)]], etc. /// - Resource bindings use [[buffer(n)]], [[texture(n)]], [[sampler(n)]] /// - Entry points are marked with [[vertex]] and [[fragment]] attributes /// - Structs use attribute annotations directly on fields /// public class MslCodeGenerator : IShaderBackend { /// /// Gets the name of this backend (e.g., "HLSL", "MSL", "GLSL"). /// public string Name { get; } /// /// Generates MSL shader code from an IR module. /// public string GenerateCode(IrShaderModule module); } }