mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
Public-PR: https://github.com/ahwootech/BRUTAL/pull/9 Public-PR: https://github.com/ahwootech/BRUTAL/pull/15 Public-PR: https://github.com/ahwootech/BRUTAL/pull/21 Fixes: ahwootech/BRUTAL#8 Fixes: ahwootech/BRUTAL#22 Co-authored-by: Laurens de Voogd <laurens@devoogd.be> Co-authored-by: sGo7-Dev <goulax16@gmail.com> Co-authored-by: Capsup <capsup@live.dk>
408 lines
25 KiB
C#
408 lines
25 KiB
C#
// <auto-generated />
|
|
#nullable disable
|
|
using System.Runtime.InteropServices;
|
|
using Brutal.Interop;
|
|
using Brutal.Strings;
|
|
|
|
namespace Brutal.SlangApi;
|
|
|
|
public static unsafe partial class ISlangFileSystemExtensions
|
|
{
|
|
public static ISlangBlob LoadFile(this ISlangFileSystem self, byte* path)
|
|
{
|
|
self.LoadFile(path, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryLoadFile(this ISlangFileSystem self, byte* path, out ISlangBlob outBlob)
|
|
=> self.LoadFile(path, out outBlob);
|
|
}
|
|
|
|
public static unsafe partial class ISlangSharedLibraryLoaderExtensions
|
|
{
|
|
public static ISlangSharedLibrary LoadSharedLibrary(this ISlangSharedLibraryLoader self, byte* path)
|
|
{
|
|
self.LoadSharedLibrary(path, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryLoadSharedLibrary(this ISlangSharedLibraryLoader self, byte* path, out ISlangSharedLibrary sharedLibraryOut)
|
|
=> self.LoadSharedLibrary(path, out sharedLibraryOut);
|
|
}
|
|
|
|
public static unsafe partial class ISlangFileSystemExtExtensions
|
|
{
|
|
public static ISlangBlob GetFileUniqueIdentity(this ISlangFileSystemExt self, byte* path)
|
|
{
|
|
self.GetFileUniqueIdentity(path, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetFileUniqueIdentity(this ISlangFileSystemExt self, byte* path, out ISlangBlob outUniqueIdentity)
|
|
=> self.GetFileUniqueIdentity(path, out outUniqueIdentity);
|
|
public static ISlangBlob CalcCombinedPath(this ISlangFileSystemExt self, Brutal.SlangApi.PathType fromPathType, byte* fromPath, byte* path)
|
|
{
|
|
self.CalcCombinedPath(fromPathType, fromPath, path, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryCalcCombinedPath(this ISlangFileSystemExt self, Brutal.SlangApi.PathType fromPathType, byte* fromPath, byte* path, out ISlangBlob pathOut)
|
|
=> self.CalcCombinedPath(fromPathType, fromPath, path, out pathOut);
|
|
public static Brutal.SlangApi.PathType GetPathType(this ISlangFileSystemExt self, byte* path)
|
|
{
|
|
self.GetPathType(path, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetPathType(this ISlangFileSystemExt self, byte* path, out Brutal.SlangApi.PathType pathTypeOut)
|
|
=> self.GetPathType(path, out pathTypeOut);
|
|
public static ISlangBlob GetPath(this ISlangFileSystemExt self, PathKind kind, byte* path)
|
|
{
|
|
self.GetPath(kind, path, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetPath(this ISlangFileSystemExt self, PathKind kind, byte* path, out ISlangBlob outPath)
|
|
=> self.GetPath(kind, path, out outPath);
|
|
public static Result TryEnumeratePathContents(this ISlangFileSystemExt self, byte* path, FileSystemContentsCallBack callback, void* userData)
|
|
=> self.EnumeratePathContents(path, callback, userData);
|
|
}
|
|
|
|
public static unsafe partial class ISlangMutableFileSystemExtensions
|
|
{
|
|
public static Result TrySaveFile(this ISlangMutableFileSystem self, byte* path, void* data, ByteSize size)
|
|
=> self.SaveFile(path, data, size);
|
|
public static Result TrySaveFileBlob(this ISlangMutableFileSystem self, byte* path, ISlangBlob dataBlob)
|
|
=> self.SaveFileBlob(path, dataBlob);
|
|
public static Result TryRemove(this ISlangMutableFileSystem self, byte* path)
|
|
=> self.Remove(path);
|
|
public static Result TryCreateDirectory(this ISlangMutableFileSystem self, byte* path)
|
|
=> self.CreateDirectory(path);
|
|
}
|
|
|
|
public static unsafe partial class ISlangWriterExtensions
|
|
{
|
|
public static Result TryEndAppendBuffer(this ISlangWriter self, byte* buffer, ByteSize numChars)
|
|
=> self.EndAppendBuffer(buffer, numChars);
|
|
public static Result TryWrite(this ISlangWriter self, byte* chars, ByteSize numChars)
|
|
=> self.Write(chars, numChars);
|
|
public static Result TrySetMode(this ISlangWriter self, Brutal.SlangApi.WriterMode mode)
|
|
=> self.SetMode(mode);
|
|
}
|
|
|
|
public static unsafe partial class IGlobalSessionExtensions
|
|
{
|
|
public static Brutal.SlangApi.ISession CreateSession(this IGlobalSession self, ref Brutal.SlangApi.SessionDesc desc)
|
|
{
|
|
self.CreateSession(ref desc, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryCreateSession(this IGlobalSession self, ref Brutal.SlangApi.SessionDesc desc, out Brutal.SlangApi.ISession outSession)
|
|
=> self.CreateSession(ref desc, out outSession);
|
|
public static Result TrySetDefaultDownstreamCompiler(this IGlobalSession self, Brutal.SlangApi.SourceLanguage sourceLanguage, Brutal.SlangApi.PassThrough defaultCompiler)
|
|
=> self.SetDefaultDownstreamCompiler(sourceLanguage, defaultCompiler);
|
|
public static Brutal.SlangApi.ICompileRequest CreateCompileRequest(this IGlobalSession self)
|
|
{
|
|
self.CreateCompileRequest(out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryCreateCompileRequest(this IGlobalSession self, out Brutal.SlangApi.ICompileRequest outCompileRequest)
|
|
=> self.CreateCompileRequest(out outCompileRequest);
|
|
public static Result TryCheckCompileTargetSupport(this IGlobalSession self, Brutal.SlangApi.CompileTarget target)
|
|
=> self.CheckCompileTargetSupport(target);
|
|
public static Result TryCheckPassThroughSupport(this IGlobalSession self, Brutal.SlangApi.PassThrough passThrough)
|
|
=> self.CheckPassThroughSupport(passThrough);
|
|
public static Result TryCompileCoreModule(this IGlobalSession self, CompileCoreModuleFlags flags)
|
|
=> self.CompileCoreModule(flags);
|
|
public static Result TryLoadCoreModule(this IGlobalSession self, void* coreModule, ByteSize coreModuleSizeInBytes)
|
|
=> self.LoadCoreModule(coreModule, coreModuleSizeInBytes);
|
|
public static ISlangBlob SaveCoreModule(this IGlobalSession self, Brutal.SlangApi.ArchiveType archiveType)
|
|
{
|
|
self.SaveCoreModule(archiveType, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TrySaveCoreModule(this IGlobalSession self, Brutal.SlangApi.ArchiveType archiveType, out ISlangBlob outBlob)
|
|
=> self.SaveCoreModule(archiveType, out outBlob);
|
|
public static Result TrySetSpirvCoreGrammar(this IGlobalSession self, byte* jsonPath)
|
|
=> self.SetSpirvCoreGrammar(jsonPath);
|
|
public static Brutal.SlangApi.SessionDesc ParseCommandLineArguments(this IGlobalSession self, int argc, byte** argv, out ISlangUnknown outAuxAllocation)
|
|
{
|
|
self.ParseCommandLineArguments(argc, argv, out var __result, out outAuxAllocation).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryParseCommandLineArguments(this IGlobalSession self, int argc, byte** argv, out Brutal.SlangApi.SessionDesc outSessionDesc, out ISlangUnknown outAuxAllocation)
|
|
=> self.ParseCommandLineArguments(argc, argv, out outSessionDesc, out outAuxAllocation);
|
|
public static ISlangBlob GetSessionDescDigest(this IGlobalSession self, in Brutal.SlangApi.SessionDesc sessionDesc)
|
|
{
|
|
self.GetSessionDescDigest(in sessionDesc, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetSessionDescDigest(this IGlobalSession self, in Brutal.SlangApi.SessionDesc sessionDesc, out ISlangBlob outBlob)
|
|
=> self.GetSessionDescDigest(in sessionDesc, out outBlob);
|
|
public static Result TryCompileBuiltinModule(this IGlobalSession self, Brutal.SlangApi.BuiltinModuleName module, CompileCoreModuleFlags flags)
|
|
=> self.CompileBuiltinModule(module, flags);
|
|
public static Result TryLoadBuiltinModule(this IGlobalSession self, Brutal.SlangApi.BuiltinModuleName module, void* moduleData, ByteSize sizeInBytes)
|
|
=> self.LoadBuiltinModule(module, moduleData, sizeInBytes);
|
|
public static ISlangBlob SaveBuiltinModule(this IGlobalSession self, Brutal.SlangApi.BuiltinModuleName module, Brutal.SlangApi.ArchiveType archiveType)
|
|
{
|
|
self.SaveBuiltinModule(module, archiveType, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TrySaveBuiltinModule(this IGlobalSession self, Brutal.SlangApi.BuiltinModuleName module, Brutal.SlangApi.ArchiveType archiveType, out ISlangBlob outBlob)
|
|
=> self.SaveBuiltinModule(module, archiveType, out outBlob);
|
|
}
|
|
|
|
public static unsafe partial class ISessionExtensions
|
|
{
|
|
public static ISlangBlob GetTypeRTTIMangledName(this ISession self, Brutal.SlangApi.TypeReflection type)
|
|
{
|
|
self.GetTypeRTTIMangledName(type, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetTypeRTTIMangledName(this ISession self, Brutal.SlangApi.TypeReflection type, out ISlangBlob outNameBlob)
|
|
=> self.GetTypeRTTIMangledName(type, out outNameBlob);
|
|
public static ISlangBlob GetTypeConformanceWitnessMangledName(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType)
|
|
{
|
|
self.GetTypeConformanceWitnessMangledName(type, interfaceType, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetTypeConformanceWitnessMangledName(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out ISlangBlob outNameBlob)
|
|
=> self.GetTypeConformanceWitnessMangledName(type, interfaceType, out outNameBlob);
|
|
public static uint GetTypeConformanceWitnessSequentialID(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType)
|
|
{
|
|
self.GetTypeConformanceWitnessSequentialID(type, interfaceType, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetTypeConformanceWitnessSequentialID(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out uint outId)
|
|
=> self.GetTypeConformanceWitnessSequentialID(type, interfaceType, out outId);
|
|
public static CompileRequest CreateCompileRequest(this ISession self)
|
|
{
|
|
self.CreateCompileRequest(out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryCreateCompileRequest(this ISession self, out CompileRequest outCompileRequest)
|
|
=> self.CreateCompileRequest(out outCompileRequest);
|
|
public static Brutal.SlangApi.ITypeConformance CreateTypeConformanceComponentType(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, Int conformanceIdOverride, out ISlangBlob outDiagnostics)
|
|
{
|
|
self.CreateTypeConformanceComponentType(type, interfaceType, out var __result, conformanceIdOverride, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryCreateTypeConformanceComponentType(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out Brutal.SlangApi.ITypeConformance outConformance, Int conformanceIdOverride, out ISlangBlob outDiagnostics)
|
|
=> self.CreateTypeConformanceComponentType(type, interfaceType, out outConformance, conformanceIdOverride, out outDiagnostics);
|
|
public static Result TryGetDynamicObjectRTTIBytes(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, uint* outRTTIDataBuffer, uint bufferSizeInBytes)
|
|
=> self.GetDynamicObjectRTTIBytes(type, interfaceType, outRTTIDataBuffer, bufferSizeInBytes);
|
|
public static Result TryLoadModuleInfoFromIRBlob(this ISession self, IBlob source, ref Int outModuleVersion, ref byte* outModuleCompilerVersion, ref byte* outModuleName)
|
|
=> self.LoadModuleInfoFromIRBlob(source, ref outModuleVersion, ref outModuleCompilerVersion, ref outModuleName);
|
|
public static Brutal.SlangApi.SourceLocation GetDeclSourceLocation(this ISession self, Brutal.SlangApi.DeclReflection decl)
|
|
{
|
|
self.GetDeclSourceLocation(decl, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetDeclSourceLocation(this ISession self, Brutal.SlangApi.DeclReflection decl, out Brutal.SlangApi.SourceLocation outLocation)
|
|
=> self.GetDeclSourceLocation(decl, out outLocation);
|
|
}
|
|
|
|
public static unsafe partial class IComponentTypeExtensions
|
|
{
|
|
public static IBlob GetEntryPointCode(this IComponentType self, Int entryPointIndex, Int targetIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetEntryPointCode(entryPointIndex, targetIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetEntryPointCode(this IComponentType self, Int entryPointIndex, Int targetIndex, out IBlob outCode, out IBlob outDiagnostics)
|
|
=> self.GetEntryPointCode(entryPointIndex, targetIndex, out outCode, out outDiagnostics);
|
|
public static ISlangMutableFileSystem GetResultAsFileSystem(this IComponentType self, Int entryPointIndex, Int targetIndex)
|
|
{
|
|
self.GetResultAsFileSystem(entryPointIndex, targetIndex, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetResultAsFileSystem(this IComponentType self, Int entryPointIndex, Int targetIndex, out ISlangMutableFileSystem outFileSystem)
|
|
=> self.GetResultAsFileSystem(entryPointIndex, targetIndex, out outFileSystem);
|
|
public static Brutal.SlangApi.IComponentType Specialize(this IComponentType self, in Brutal.SlangApi.SpecializationArg specializationArgs, Int specializationArgCount, out ISlangBlob outDiagnostics)
|
|
{
|
|
self.Specialize(in specializationArgs, specializationArgCount, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TrySpecialize(this IComponentType self, in Brutal.SlangApi.SpecializationArg specializationArgs, Int specializationArgCount, out Brutal.SlangApi.IComponentType outSpecializedComponentType, out ISlangBlob outDiagnostics)
|
|
=> self.Specialize(in specializationArgs, specializationArgCount, out outSpecializedComponentType, out outDiagnostics);
|
|
public static Brutal.SlangApi.IComponentType Link(this IComponentType self, out ISlangBlob outDiagnostics)
|
|
{
|
|
self.Link(out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryLink(this IComponentType self, out Brutal.SlangApi.IComponentType outLinkedComponentType, out ISlangBlob outDiagnostics)
|
|
=> self.Link(out outLinkedComponentType, out outDiagnostics);
|
|
public static ISlangSharedLibrary GetEntryPointHostCallable(this IComponentType self, int entryPointIndex, int targetIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetEntryPointHostCallable(entryPointIndex, targetIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetEntryPointHostCallable(this IComponentType self, int entryPointIndex, int targetIndex, out ISlangSharedLibrary outSharedLibrary, out IBlob outDiagnostics)
|
|
=> self.GetEntryPointHostCallable(entryPointIndex, targetIndex, out outSharedLibrary, out outDiagnostics);
|
|
public static Brutal.SlangApi.IComponentType RenameEntryPoint(this IComponentType self, byte* newName)
|
|
{
|
|
self.RenameEntryPoint(newName, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryRenameEntryPoint(this IComponentType self, byte* newName, out Brutal.SlangApi.IComponentType outEntryPoint)
|
|
=> self.RenameEntryPoint(newName, out outEntryPoint);
|
|
public static Brutal.SlangApi.IComponentType LinkWithOptions(this IComponentType self, uint compilerOptionEntryCount, in Brutal.SlangApi.CompilerOptionEntry compilerOptionEntries, out ISlangBlob outDiagnostics)
|
|
{
|
|
self.LinkWithOptions(out var __result, compilerOptionEntryCount, in compilerOptionEntries, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryLinkWithOptions(this IComponentType self, out Brutal.SlangApi.IComponentType outLinkedComponentType, uint compilerOptionEntryCount, in Brutal.SlangApi.CompilerOptionEntry compilerOptionEntries, out ISlangBlob outDiagnostics)
|
|
=> self.LinkWithOptions(out outLinkedComponentType, compilerOptionEntryCount, in compilerOptionEntries, out outDiagnostics);
|
|
public static IBlob GetTargetCode(this IComponentType self, Int targetIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetTargetCode(targetIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetTargetCode(this IComponentType self, Int targetIndex, out IBlob outCode, out IBlob outDiagnostics)
|
|
=> self.GetTargetCode(targetIndex, out outCode, out outDiagnostics);
|
|
public static Brutal.SlangApi.IMetadata GetTargetMetadata(this IComponentType self, Int targetIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetTargetMetadata(targetIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetTargetMetadata(this IComponentType self, Int targetIndex, out Brutal.SlangApi.IMetadata outMetadata, out IBlob outDiagnostics)
|
|
=> self.GetTargetMetadata(targetIndex, out outMetadata, out outDiagnostics);
|
|
public static Brutal.SlangApi.IMetadata GetEntryPointMetadata(this IComponentType self, Int entryPointIndex, Int targetIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetEntryPointMetadata(entryPointIndex, targetIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetEntryPointMetadata(this IComponentType self, Int entryPointIndex, Int targetIndex, out Brutal.SlangApi.IMetadata outMetadata, out IBlob outDiagnostics)
|
|
=> self.GetEntryPointMetadata(entryPointIndex, targetIndex, out outMetadata, out outDiagnostics);
|
|
}
|
|
|
|
public static unsafe partial class IModuleExtensions
|
|
{
|
|
public static Brutal.SlangApi.IEntryPoint FindEntryPointByName(this IModule self, byte* name)
|
|
{
|
|
self.FindEntryPointByName(name, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryFindEntryPointByName(this IModule self, byte* name, out Brutal.SlangApi.IEntryPoint outEntryPoint)
|
|
=> self.FindEntryPointByName(name, out outEntryPoint);
|
|
public static Brutal.SlangApi.IEntryPoint GetDefinedEntryPoint(this IModule self, Int32 index)
|
|
{
|
|
self.GetDefinedEntryPoint(index, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetDefinedEntryPoint(this IModule self, Int32 index, out Brutal.SlangApi.IEntryPoint outEntryPoint)
|
|
=> self.GetDefinedEntryPoint(index, out outEntryPoint);
|
|
public static ISlangBlob Serialize(this IModule self)
|
|
{
|
|
self.Serialize(out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TrySerialize(this IModule self, out ISlangBlob outSerializedBlob)
|
|
=> self.Serialize(out outSerializedBlob);
|
|
public static Result TryWriteToFile(this IModule self, byte* fileName)
|
|
=> self.WriteToFile(fileName);
|
|
public static Brutal.SlangApi.IEntryPoint FindAndCheckEntryPoint(this IModule self, byte* name, Brutal.SlangApi.Stage stage, out ISlangBlob outDiagnostics)
|
|
{
|
|
self.FindAndCheckEntryPoint(name, stage, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryFindAndCheckEntryPoint(this IModule self, byte* name, Brutal.SlangApi.Stage stage, out Brutal.SlangApi.IEntryPoint outEntryPoint, out ISlangBlob outDiagnostics)
|
|
=> self.FindAndCheckEntryPoint(name, stage, out outEntryPoint, out outDiagnostics);
|
|
public static IBlob Disassemble(this IModule self)
|
|
{
|
|
self.Disassemble(out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryDisassemble(this IModule self, out IBlob outDisassembledBlob)
|
|
=> self.Disassemble(out outDisassembledBlob);
|
|
}
|
|
|
|
public static unsafe partial class IMetadataExtensions
|
|
{
|
|
public static Result TryIsParameterLocationUsed(this IMetadata self, Brutal.SlangApi.ParameterCategory category, UInt spaceIndex, UInt registerIndex, ref Brutal.Bool8 outUsed)
|
|
=> self.IsParameterLocationUsed(category, spaceIndex, registerIndex, ref outUsed);
|
|
}
|
|
|
|
public static unsafe partial class ICompileResultExtensions
|
|
{
|
|
public static IBlob GetItemData(this ICompileResult self, uint index)
|
|
{
|
|
self.GetItemData(index, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetItemData(this ICompileResult self, uint index, out IBlob outblob)
|
|
=> self.GetItemData(index, out outblob);
|
|
public static Brutal.SlangApi.IMetadata GetMetadata(this ICompileResult self)
|
|
{
|
|
self.GetMetadata(out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetMetadata(this ICompileResult self, out Brutal.SlangApi.IMetadata outMetadata)
|
|
=> self.GetMetadata(out outMetadata);
|
|
}
|
|
|
|
public static unsafe partial class IComponentType2Extensions
|
|
{
|
|
public static Brutal.SlangApi.ICompileResult GetTargetCompileResult(this IComponentType2 self, Int targetIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetTargetCompileResult(targetIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetTargetCompileResult(this IComponentType2 self, Int targetIndex, out Brutal.SlangApi.ICompileResult outCompileResult, out IBlob outDiagnostics)
|
|
=> self.GetTargetCompileResult(targetIndex, out outCompileResult, out outDiagnostics);
|
|
public static Brutal.SlangApi.ICompileResult GetEntryPointCompileResult(this IComponentType2 self, Int entryPointIndex, Int targetIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetEntryPointCompileResult(entryPointIndex, targetIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetEntryPointCompileResult(this IComponentType2 self, Int entryPointIndex, Int targetIndex, out Brutal.SlangApi.ICompileResult outCompileResult, out IBlob outDiagnostics)
|
|
=> self.GetEntryPointCompileResult(entryPointIndex, targetIndex, out outCompileResult, out outDiagnostics);
|
|
public static ISlangSharedLibrary GetTargetHostCallable(this IComponentType2 self, int targetIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetTargetHostCallable(targetIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetTargetHostCallable(this IComponentType2 self, int targetIndex, out ISlangSharedLibrary outSharedLibrary, out IBlob outDiagnostics)
|
|
=> self.GetTargetHostCallable(targetIndex, out outSharedLibrary, out outDiagnostics);
|
|
}
|
|
|
|
public static unsafe partial class IModulePrecompileService_ExperimentalExtensions
|
|
{
|
|
public static ISlangBlob PrecompileForTarget(this IModulePrecompileService_Experimental self, Brutal.SlangApi.CompileTarget target)
|
|
{
|
|
self.PrecompileForTarget(target, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryPrecompileForTarget(this IModulePrecompileService_Experimental self, Brutal.SlangApi.CompileTarget target, out ISlangBlob outDiagnostics)
|
|
=> self.PrecompileForTarget(target, out outDiagnostics);
|
|
public static IBlob GetPrecompiledTargetCode(this IModulePrecompileService_Experimental self, Brutal.SlangApi.CompileTarget target, out IBlob outDiagnostics)
|
|
{
|
|
self.GetPrecompiledTargetCode(target, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetPrecompiledTargetCode(this IModulePrecompileService_Experimental self, Brutal.SlangApi.CompileTarget target, out IBlob outCode, out IBlob outDiagnostics)
|
|
=> self.GetPrecompiledTargetCode(target, out outCode, out outDiagnostics);
|
|
public static Brutal.SlangApi.IModule GetModuleDependency(this IModulePrecompileService_Experimental self, Int dependencyIndex, out IBlob outDiagnostics)
|
|
{
|
|
self.GetModuleDependency(dependencyIndex, out var __result, out outDiagnostics).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetModuleDependency(this IModulePrecompileService_Experimental self, Int dependencyIndex, out Brutal.SlangApi.IModule outModule, out IBlob outDiagnostics)
|
|
=> self.GetModuleDependency(dependencyIndex, out outModule, out outDiagnostics);
|
|
}
|
|
|
|
public static unsafe partial class IByteCodeRunnerExtensions
|
|
{
|
|
public static Result TryLoadModule(this IByteCodeRunner self, IBlob moduleBlob)
|
|
=> self.LoadModule(moduleBlob);
|
|
public static Result TrySelectFunctionByIndex(this IByteCodeRunner self, uint functionIndex)
|
|
=> self.SelectFunctionByIndex(functionIndex);
|
|
public static Brutal.SlangApi.ByteCodeFuncInfo GetFunctionInfo(this IByteCodeRunner self, uint index)
|
|
{
|
|
self.GetFunctionInfo(index, out var __result).ThrowIfFailure();
|
|
return __result;
|
|
}
|
|
public static Result TryGetFunctionInfo(this IByteCodeRunner self, uint index, out Brutal.SlangApi.ByteCodeFuncInfo outInfo)
|
|
=> self.GetFunctionInfo(index, out outInfo);
|
|
public static Result TryExecute(this IByteCodeRunner self, void* argumentData, ByteSize argumentSize)
|
|
=> self.Execute(argumentData, argumentSize);
|
|
public static Result TryRegisterExtCall(this IByteCodeRunner self, byte* name, VMExtFunction functionPtr)
|
|
=> self.RegisterExtCall(name, functionPtr);
|
|
public static Result TrySetPrintCallback(this IByteCodeRunner self, VMPrintFunc callback, void* userData)
|
|
=> self.SetPrintCallback(callback, userData);
|
|
}
|
|
|