sharpemu/src/SharpEmu.ShaderCompiler.Metal/Gen5MslShader.cs

28 lines
817 B
C#

// Copyright (C) 2026 SharpEmu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
using SharpEmu.ShaderCompiler;
namespace SharpEmu.ShaderCompiler.Metal;
// MSL-specific shader artifact types. These stay beside the MSL emitter (not in the
// backend-neutral SharpEmu.ShaderCompiler project): each codegen owns its own
// compiled-shader shape, mirroring Gen5SpirvShader on the Vulkan side.
public enum Gen5MslStage
{
Vertex,
Pixel,
Compute,
}
// Compiled source, stage interface counts, and the argument-buffer layout.
public sealed record Gen5MslShader(
string Source,
string EntryPoint,
Gen5MslStage Stage,
uint AttributeCount,
uint ThreadgroupSizeX = 1,
uint ThreadgroupSizeY = 1,
uint ThreadgroupSizeZ = 1,
Gen5MslArgumentLayout? ArgumentLayout = null);