diff --git a/src/ComputeSharp.Shaders/Translation/Models/CachedShader{T}.cs b/src/ComputeSharp.Shaders/Translation/Models/CachedShader{T}.cs new file mode 100644 index 00000000..3b0005e0 --- /dev/null +++ b/src/ComputeSharp.Shaders/Translation/Models/CachedShader{T}.cs @@ -0,0 +1,33 @@ +using Vortice.Direct3D12; + +namespace ComputeSharp.Shaders.Translation.Models +{ + /// + /// A that contains info on a cached shader + /// + /// The type of compute shader in use + internal readonly struct CachedShader + where T : struct, IComputeShader + { + /// + /// The instance with the shader metadata + /// + public readonly ShaderLoader Loader; + + /// + /// The compiled shader bytecode + /// + public readonly ShaderBytecode Bytecode; + + /// + /// Creates a new instance with the specified parameters + /// + /// The instance with the shader metadata + /// The compiled shader bytecode + public CachedShader(ShaderLoader loader, ShaderBytecode bytecode) + { + Loader = loader; + Bytecode = bytecode; + } + } +}