Update Slang, Vulkan, Gltf and ImGui. Offload natives to sub-packages.

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>
This commit is contained in:
BRUTAL release 2026-10-23 15:07:17 +13:00
commit 4ac91e105e
5 changed files with 2034 additions and 318 deletions

View file

@ -62,6 +62,7 @@ global using ReflectionDecl = Brutal.SlangApi.DeclReflection;
global using ReflectionEntryPoint = Brutal.SlangApi.EntryPointLayout;
global using ReflectionFunction = Brutal.SlangApi.FunctionReflection;
global using ReflectionGeneric = Brutal.SlangApi.GenericReflection;
global using ReflectionModifier = Brutal.SlangApi.Modifier;
global using ReflectionParameter = Brutal.SlangApi.VariableLayoutReflection;
global using ReflectionType = Brutal.SlangApi.TypeReflection;
global using ReflectionTypeLayout = Brutal.SlangApi.TypeLayoutReflection;
@ -69,4 +70,3 @@ global using ReflectionTypeParameter = Brutal.SlangApi.TypeParameterReflection;
global using ReflectionVariable = Brutal.SlangApi.VariableReflection;
global using ReflectionVariableLayout = Brutal.SlangApi.VariableLayoutReflection;
global using Session = Brutal.SlangApi.IGlobalSession;
global using UserAttribute = Brutal.SlangApi.Attribute;

View file

@ -7,17 +7,7 @@ namespace Brutal.SlangApi
{
[GeneratedComInterface]
[Guid("00000000-0000-0000-c000-000000000046")]
public unsafe partial interface ISlangUnknown
{
[PreserveSig]
Result QueryInterface(ref Brutal.SlangApi.Uuid uuid, out void* outObject);
[PreserveSig]
uint AddRef();
[PreserveSig]
uint Release();
};
public unsafe partial interface ISlangUnknown { };
[GeneratedComInterface]
[Guid("87ede0e1-4852-44b0-8bf2-cb31874de239")]
@ -43,7 +33,8 @@ namespace Brutal.SlangApi
void* GetBufferPointer();
[PreserveSig]
ByteSize64 GetBufferSize();
[return: MarshalUsing(typeof(SlangSizeMarshaller))]
ByteSize GetBufferSize();
};
[GeneratedComInterface]
@ -51,7 +42,10 @@ namespace Brutal.SlangApi
public unsafe partial interface ISlangFileSystem : Brutal.SlangApi.ISlangCastable
{
[PreserveSig]
Result LoadFile(byte* path, out ISlangBlob outBlob);
Result LoadFile(
byte* path,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outBlob
);
};
[GeneratedComInterface]
@ -75,7 +69,11 @@ namespace Brutal.SlangApi
public unsafe partial interface ISlangSharedLibraryLoader
{
[PreserveSig]
Result LoadSharedLibrary(byte* path, out ISlangSharedLibrary sharedLibraryOut);
Result LoadSharedLibrary(
byte* path,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangSharedLibrary>))]
out ISlangSharedLibrary sharedLibraryOut
);
};
[GeneratedComInterface]
@ -83,21 +81,28 @@ namespace Brutal.SlangApi
public unsafe partial interface ISlangFileSystemExt : Brutal.SlangApi.ISlangFileSystem
{
[PreserveSig]
Result GetFileUniqueIdentity(byte* path, out ISlangBlob outUniqueIdentity);
Result GetFileUniqueIdentity(
byte* path,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outUniqueIdentity
);
[PreserveSig]
Result CalcCombinedPath(
Brutal.SlangApi.PathType fromPathType,
byte* fromPath,
byte* path,
out ISlangBlob pathOut
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob pathOut
);
[PreserveSig]
Result GetPathType(byte* path, out Brutal.SlangApi.PathType pathTypeOut);
[PreserveSig]
Result GetPath(PathKind kind, byte* path, out ISlangBlob outPath);
Result GetPath(
PathKind kind,
byte* path,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outPath
);
[PreserveSig]
void ClearCache();
@ -114,10 +119,13 @@ namespace Brutal.SlangApi
public unsafe partial interface ISlangMutableFileSystem : Brutal.SlangApi.ISlangFileSystemExt
{
[PreserveSig]
Result SaveFile(byte* path, void* data, ByteSize64 size);
Result SaveFile(byte* path, void* data, [MarshalUsing(typeof(SlangSizeMarshaller))] ByteSize size);
[PreserveSig]
Result SaveFileBlob(byte* path, ISlangBlob dataBlob);
Result SaveFileBlob(
byte* path,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] ISlangBlob dataBlob
);
[PreserveSig]
Result Remove(byte* path);
@ -131,18 +139,19 @@ namespace Brutal.SlangApi
public unsafe partial interface ISlangWriter
{
[PreserveSig]
byte* BeginAppendBuffer(ByteSize64 maxNumChars);
byte* BeginAppendBuffer([MarshalUsing(typeof(SlangSizeMarshaller))] ByteSize maxNumChars);
[PreserveSig]
Result EndAppendBuffer(byte* buffer, ByteSize64 numChars);
Result EndAppendBuffer(byte* buffer, [MarshalUsing(typeof(SlangSizeMarshaller))] ByteSize numChars);
[PreserveSig]
Result Write(byte* chars, ByteSize64 numChars);
Result Write(byte* chars, [MarshalUsing(typeof(SlangSizeMarshaller))] ByteSize numChars);
[PreserveSig]
void Flush();
[PreserveSig]
[return: MarshalUsing(typeof(SlangBoolMarshaller))]
Bool IsConsole();
[PreserveSig]
@ -154,7 +163,8 @@ namespace Brutal.SlangApi
public unsafe partial interface ISlangProfiler
{
[PreserveSig]
ByteSize64 GetEntryCount();
[return: MarshalUsing(typeof(SlangSizeMarshaller))]
ByteSize GetEntryCount();
[PreserveSig]
byte* GetEntryName(uint index);
@ -171,7 +181,11 @@ namespace Brutal.SlangApi
public unsafe partial interface IGlobalSession
{
[PreserveSig]
Result CreateSession(ref Brutal.SlangApi.SessionDesc desc, out Brutal.SlangApi.ISession outSession);
Result CreateSession(
ref Brutal.SlangApi.SessionDesc desc,
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.ISession>))]
out Brutal.SlangApi.ISession outSession
);
[PreserveSig]
Brutal.SlangApi.ProfileID FindProfile(byte* name);
@ -183,7 +197,10 @@ namespace Brutal.SlangApi
void SetDownstreamCompilerPrelude(Brutal.SlangApi.PassThrough passThrough, byte* preludeText);
[PreserveSig]
void GetDownstreamCompilerPrelude(Brutal.SlangApi.PassThrough passThrough, out ISlangBlob outPrelude);
void GetDownstreamCompilerPrelude(
Brutal.SlangApi.PassThrough passThrough,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outPrelude
);
[PreserveSig]
byte* GetBuildTagString();
@ -201,18 +218,27 @@ namespace Brutal.SlangApi
void SetLanguagePrelude(Brutal.SlangApi.SourceLanguage sourceLanguage, byte* preludeText);
[PreserveSig]
void GetLanguagePrelude(Brutal.SlangApi.SourceLanguage sourceLanguage, out ISlangBlob outPrelude);
void GetLanguagePrelude(
Brutal.SlangApi.SourceLanguage sourceLanguage,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outPrelude
);
[PreserveSig]
Result CreateCompileRequest(out Brutal.SlangApi.ICompileRequest outCompileRequest);
Result CreateCompileRequest(
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.ICompileRequest>))]
out Brutal.SlangApi.ICompileRequest outCompileRequest
);
[PreserveSig]
void AddBuiltins(byte* sourcePath, byte* sourceString);
[PreserveSig]
void SetSharedLibraryLoader(ISlangSharedLibraryLoader loader);
void SetSharedLibraryLoader(
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangSharedLibraryLoader>))] ISlangSharedLibraryLoader loader
);
[PreserveSig]
[return: MarshalUsing(typeof(BorrowedSlangInterfaceMarshaller<ISlangSharedLibraryLoader>))]
ISlangSharedLibraryLoader? GetSharedLibraryLoader();
[PreserveSig]
@ -225,10 +251,16 @@ namespace Brutal.SlangApi
Result CompileCoreModule(CompileCoreModuleFlags flags);
[PreserveSig]
Result LoadCoreModule(void* coreModule, ByteSize64 coreModuleSizeInBytes);
Result LoadCoreModule(
void* coreModule,
[MarshalUsing(typeof(SlangSizeMarshaller))] ByteSize coreModuleSizeInBytes
);
[PreserveSig]
Result SaveCoreModule(Brutal.SlangApi.ArchiveType archiveType, out ISlangBlob outBlob);
Result SaveCoreModule(
Brutal.SlangApi.ArchiveType archiveType,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outBlob
);
[PreserveSig]
Brutal.SlangApi.CapabilityID FindCapability(byte* name);
@ -257,23 +289,30 @@ namespace Brutal.SlangApi
int argc,
byte** argv,
out Brutal.SlangApi.SessionDesc outSessionDesc,
out ISlangUnknown outAuxAllocation
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangUnknown>))] out ISlangUnknown outAuxAllocation
);
[PreserveSig]
Result GetSessionDescDigest(in Brutal.SlangApi.SessionDesc sessionDesc, out ISlangBlob outBlob);
Result GetSessionDescDigest(
in Brutal.SlangApi.SessionDesc sessionDesc,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outBlob
);
[PreserveSig]
Result CompileBuiltinModule(Brutal.SlangApi.BuiltinModuleName module, CompileCoreModuleFlags flags);
[PreserveSig]
Result LoadBuiltinModule(Brutal.SlangApi.BuiltinModuleName module, void* moduleData, ByteSize64 sizeInBytes);
Result LoadBuiltinModule(
Brutal.SlangApi.BuiltinModuleName module,
void* moduleData,
[MarshalUsing(typeof(SlangSizeMarshaller))] ByteSize sizeInBytes
);
[PreserveSig]
Result SaveBuiltinModule(
Brutal.SlangApi.BuiltinModuleName module,
Brutal.SlangApi.ArchiveType archiveType,
out ISlangBlob outBlob
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outBlob
);
};
@ -282,118 +321,154 @@ namespace Brutal.SlangApi
public unsafe partial interface ISession
{
[PreserveSig]
[return: MarshalUsing(typeof(BorrowedSlangInterfaceMarshaller<Brutal.SlangApi.IGlobalSession>))]
Brutal.SlangApi.IGlobalSession? GetGlobalSession();
[PreserveSig]
Brutal.SlangApi.IModule? LoadModule(byte* moduleName, out IBlob outDiagnostics);
[return: MarshalUsing(typeof(BorrowedSlangInterfaceMarshaller<Brutal.SlangApi.IModule>))]
Brutal.SlangApi.IModule? LoadModule(
byte* moduleName,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
[return: MarshalUsing(typeof(BorrowedSlangInterfaceMarshaller<Brutal.SlangApi.IModule>))]
Brutal.SlangApi.IModule? LoadModuleFromSource(
byte* moduleName,
byte* path,
IBlob source,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] IBlob source,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Result CreateCompositeComponentType(
nint* componentTypes,
Int componentTypeCount,
out Brutal.SlangApi.IComponentType outCompositeComponentType,
out ISlangBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IComponentType>))]
out Brutal.SlangApi.IComponentType outCompositeComponentType,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
[return: MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection SpecializeType(
Brutal.SlangApi.TypeReflection type,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection type,
in Brutal.SlangApi.SpecializationArg specializationArgs,
Int specializationArgCount,
out ISlangBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
[return: MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeLayoutReflection>))]
Brutal.SlangApi.TypeLayoutReflection GetTypeLayout(
Brutal.SlangApi.TypeReflection type,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection type,
Int targetIndex,
Brutal.SlangApi.LayoutRules rules,
out ISlangBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
[return: MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection GetContainerType(
Brutal.SlangApi.TypeReflection elementType,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection elementType,
Brutal.SlangApi.ContainerType containerType,
out ISlangBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
[return: MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection GetDynamicType();
[PreserveSig]
Result GetTypeRTTIMangledName(Brutal.SlangApi.TypeReflection type, out ISlangBlob outNameBlob);
Result GetTypeRTTIMangledName(
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection type,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outNameBlob
);
[PreserveSig]
Result GetTypeConformanceWitnessMangledName(
Brutal.SlangApi.TypeReflection type,
Brutal.SlangApi.TypeReflection interfaceType,
out ISlangBlob outNameBlob
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection type,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection interfaceType,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outNameBlob
);
[PreserveSig]
Result GetTypeConformanceWitnessSequentialID(
Brutal.SlangApi.TypeReflection type,
Brutal.SlangApi.TypeReflection interfaceType,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection type,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection interfaceType,
out uint outId
);
[PreserveSig]
Result CreateCompileRequest(out CompileRequest outCompileRequest);
[PreserveSig]
Result CreateTypeConformanceComponentType(
Brutal.SlangApi.TypeReflection type,
Brutal.SlangApi.TypeReflection interfaceType,
out Brutal.SlangApi.ITypeConformance outConformance,
Int conformanceIdOverride,
out ISlangBlob outDiagnostics
Result CreateCompileRequest(
[MarshalUsing(typeof(SlangHandleMarshaller<CompileRequest>))] out CompileRequest outCompileRequest
);
[PreserveSig]
Result CreateTypeConformanceComponentType(
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection type,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection interfaceType,
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.ITypeConformance>))]
out Brutal.SlangApi.ITypeConformance outConformance,
Int conformanceIdOverride,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
[return: MarshalUsing(typeof(BorrowedSlangInterfaceMarshaller<Brutal.SlangApi.IModule>))]
Brutal.SlangApi.IModule? LoadModuleFromIRBlob(
byte* moduleName,
byte* path,
IBlob source,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] IBlob source,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Int GetLoadedModuleCount();
[PreserveSig]
[return: MarshalUsing(typeof(BorrowedSlangInterfaceMarshaller<Brutal.SlangApi.IModule>))]
Brutal.SlangApi.IModule? GetLoadedModule(Int index);
[PreserveSig]
Brutal.Bool8 IsBinaryModuleUpToDate(byte* modulePath, IBlob binaryModuleBlob);
[return: MarshalUsing(typeof(SlangBoolMarshaller))]
Brutal.Bool8 IsBinaryModuleUpToDate(
byte* modulePath,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] IBlob binaryModuleBlob
);
[PreserveSig]
[return: MarshalUsing(typeof(BorrowedSlangInterfaceMarshaller<Brutal.SlangApi.IModule>))]
Brutal.SlangApi.IModule? LoadModuleFromSourceString(
byte* moduleName,
byte* path,
byte* @string,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Result GetDynamicObjectRTTIBytes(
Brutal.SlangApi.TypeReflection type,
Brutal.SlangApi.TypeReflection interfaceType,
out uint outRTTIDataBuffer,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection type,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.TypeReflection>))]
Brutal.SlangApi.TypeReflection interfaceType,
uint* outRTTIDataBuffer,
uint bufferSizeInBytes
);
[PreserveSig]
Result LoadModuleInfoFromIRBlob(
IBlob source,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] IBlob source,
ref Int outModuleVersion,
ref byte* outModuleCompilerVersion,
ref byte* outModuleName
@ -401,7 +476,8 @@ namespace Brutal.SlangApi
[PreserveSig]
Result GetDeclSourceLocation(
Brutal.SlangApi.DeclReflection decl,
[MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.DeclReflection>))]
Brutal.SlangApi.DeclReflection decl,
out Brutal.SlangApi.SourceLocation outLocation
);
};
@ -411,65 +487,105 @@ namespace Brutal.SlangApi
public unsafe partial interface IComponentType
{
[PreserveSig]
[return: MarshalUsing(typeof(BorrowedSlangInterfaceMarshaller<Brutal.SlangApi.ISession>))]
Brutal.SlangApi.ISession? GetSession();
[PreserveSig]
ProgramLayout GetLayout(Int targetIndex, out IBlob outDiagnostics);
[return: MarshalUsing(typeof(SlangHandleMarshaller<ProgramLayout>))]
ProgramLayout GetLayout(
Int targetIndex,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Int GetSpecializationParamCount();
[PreserveSig]
Result GetEntryPointCode(Int entryPointIndex, Int targetIndex, out IBlob outCode, out IBlob outDiagnostics);
Result GetEntryPointCode(
Int entryPointIndex,
Int targetIndex,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outCode,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Result GetResultAsFileSystem(Int entryPointIndex, Int targetIndex, out ISlangMutableFileSystem outFileSystem);
Result GetResultAsFileSystem(
Int entryPointIndex,
Int targetIndex,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangMutableFileSystem>))]
out ISlangMutableFileSystem outFileSystem
);
[PreserveSig]
void GetEntryPointHash(Int entryPointIndex, Int targetIndex, out IBlob outHash);
void GetEntryPointHash(
Int entryPointIndex,
Int targetIndex,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outHash
);
[PreserveSig]
Result Specialize(
in Brutal.SlangApi.SpecializationArg specializationArgs,
Int specializationArgCount,
out Brutal.SlangApi.IComponentType outSpecializedComponentType,
out ISlangBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IComponentType>))]
out Brutal.SlangApi.IComponentType outSpecializedComponentType,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
Result Link(out Brutal.SlangApi.IComponentType outLinkedComponentType, out ISlangBlob outDiagnostics);
Result Link(
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IComponentType>))]
out Brutal.SlangApi.IComponentType outLinkedComponentType,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
Result GetEntryPointHostCallable(
int entryPointIndex,
int targetIndex,
out ISlangSharedLibrary outSharedLibrary,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangSharedLibrary>))]
out ISlangSharedLibrary outSharedLibrary,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Result RenameEntryPoint(byte* newName, out Brutal.SlangApi.IComponentType outEntryPoint);
Result RenameEntryPoint(
byte* newName,
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IComponentType>))]
out Brutal.SlangApi.IComponentType outEntryPoint
);
[PreserveSig]
Result LinkWithOptions(
out Brutal.SlangApi.IComponentType outLinkedComponentType,
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IComponentType>))]
out Brutal.SlangApi.IComponentType outLinkedComponentType,
uint compilerOptionEntryCount,
in Brutal.SlangApi.CompilerOptionEntry compilerOptionEntries,
out ISlangBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
Result GetTargetCode(Int targetIndex, out IBlob outCode, out IBlob outDiagnostics);
Result GetTargetCode(
Int targetIndex,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outCode,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Result GetTargetMetadata(Int targetIndex, out Brutal.SlangApi.IMetadata outMetadata, out IBlob outDiagnostics);
Result GetTargetMetadata(
Int targetIndex,
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IMetadata>))]
out Brutal.SlangApi.IMetadata outMetadata,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Result GetEntryPointMetadata(
Int entryPointIndex,
Int targetIndex,
out Brutal.SlangApi.IMetadata outMetadata,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IMetadata>))]
out Brutal.SlangApi.IMetadata outMetadata,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
};
@ -478,16 +594,24 @@ namespace Brutal.SlangApi
public unsafe partial interface IModule : Brutal.SlangApi.IComponentType
{
[PreserveSig]
Result FindEntryPointByName(byte* name, out Brutal.SlangApi.IEntryPoint outEntryPoint);
Result FindEntryPointByName(
byte* name,
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IEntryPoint>))]
out Brutal.SlangApi.IEntryPoint outEntryPoint
);
[PreserveSig]
Int32 GetDefinedEntryPointCount();
[PreserveSig]
Result GetDefinedEntryPoint(Int32 index, out Brutal.SlangApi.IEntryPoint outEntryPoint);
Result GetDefinedEntryPoint(
Int32 index,
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IEntryPoint>))]
out Brutal.SlangApi.IEntryPoint outEntryPoint
);
[PreserveSig]
Result Serialize(out ISlangBlob outSerializedBlob);
Result Serialize([MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outSerializedBlob);
[PreserveSig]
Result WriteToFile(byte* fileName);
@ -505,8 +629,9 @@ namespace Brutal.SlangApi
Result FindAndCheckEntryPoint(
byte* name,
Brutal.SlangApi.Stage stage,
out Brutal.SlangApi.IEntryPoint outEntryPoint,
out ISlangBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IEntryPoint>))]
out Brutal.SlangApi.IEntryPoint outEntryPoint,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
@ -516,10 +641,11 @@ namespace Brutal.SlangApi
byte* GetDependencyFilePath(Int32 index);
[PreserveSig]
[return: MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.DeclReflection>))]
Brutal.SlangApi.DeclReflection GetModuleReflection();
[PreserveSig]
Result Disassemble(out IBlob outDisassembledBlob);
Result Disassemble([MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDisassembledBlob);
};
[GeneratedComInterface]
@ -535,7 +661,7 @@ namespace Brutal.SlangApi
Brutal.SlangApi.ParameterCategory category,
UInt spaceIndex,
UInt registerIndex,
ref Brutal.Bool8 outUsed
[MarshalUsing(typeof(SlangBoolMarshaller))] ref Brutal.Bool8 outUsed
);
[PreserveSig]
@ -550,10 +676,13 @@ namespace Brutal.SlangApi
uint GetItemCount();
[PreserveSig]
Result GetItemData(uint index, out IBlob outblob);
Result GetItemData(uint index, [MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outblob);
[PreserveSig]
Result GetMetadata(out Brutal.SlangApi.IMetadata outMetadata);
Result GetMetadata(
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IMetadata>))]
out Brutal.SlangApi.IMetadata outMetadata
);
};
[GeneratedComInterface]
@ -561,6 +690,7 @@ namespace Brutal.SlangApi
public unsafe partial interface IEntryPoint : Brutal.SlangApi.IComponentType
{
[PreserveSig]
[return: MarshalUsing(typeof(SlangHandleMarshaller<Brutal.SlangApi.FunctionReflection>))]
Brutal.SlangApi.FunctionReflection GetFunctionReflection();
};
@ -571,23 +701,26 @@ namespace Brutal.SlangApi
[PreserveSig]
Result GetTargetCompileResult(
Int targetIndex,
out Brutal.SlangApi.ICompileResult outCompileResult,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.ICompileResult>))]
out Brutal.SlangApi.ICompileResult outCompileResult,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Result GetEntryPointCompileResult(
Int entryPointIndex,
Int targetIndex,
out Brutal.SlangApi.ICompileResult outCompileResult,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.ICompileResult>))]
out Brutal.SlangApi.ICompileResult outCompileResult,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
Result GetTargetHostCallable(
int targetIndex,
out ISlangSharedLibrary outSharedLibrary,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangSharedLibrary>))]
out ISlangSharedLibrary outSharedLibrary,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
};
@ -596,13 +729,16 @@ namespace Brutal.SlangApi
public unsafe partial interface IModulePrecompileService_Experimental
{
[PreserveSig]
Result PrecompileForTarget(Brutal.SlangApi.CompileTarget target, out ISlangBlob outDiagnostics);
Result PrecompileForTarget(
Brutal.SlangApi.CompileTarget target,
[MarshalUsing(typeof(SlangInterfaceMarshaller<ISlangBlob>))] out ISlangBlob outDiagnostics
);
[PreserveSig]
Result GetPrecompiledTargetCode(
Brutal.SlangApi.CompileTarget target,
out IBlob outCode,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outCode,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
[PreserveSig]
@ -611,8 +747,9 @@ namespace Brutal.SlangApi
[PreserveSig]
Result GetModuleDependency(
Int dependencyIndex,
out Brutal.SlangApi.IModule outModule,
out IBlob outDiagnostics
[MarshalUsing(typeof(SlangInterfaceMarshaller<Brutal.SlangApi.IModule>))]
out Brutal.SlangApi.IModule outModule,
[MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outDiagnostics
);
};
@ -621,7 +758,7 @@ namespace Brutal.SlangApi
public unsafe partial interface IByteCodeRunner
{
[PreserveSig]
Result LoadModule(IBlob moduleBlob);
Result LoadModule([MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] IBlob moduleBlob);
[PreserveSig]
Result SelectFunctionByIndex(uint functionIndex);
@ -636,13 +773,13 @@ namespace Brutal.SlangApi
void* GetCurrentWorkingSet();
[PreserveSig]
Result Execute(void* argumentData, ByteSize64 argumentSize);
Result Execute(void* argumentData, [MarshalUsing(typeof(SlangSizeMarshaller))] ByteSize argumentSize);
[PreserveSig]
void GetErrorString(out IBlob outBlob);
void GetErrorString([MarshalUsing(typeof(SlangInterfaceMarshaller<IBlob>))] out IBlob outBlob);
[PreserveSig]
void* GetReturnValue(out ByteSize64 outValueSize);
void* GetReturnValue([MarshalUsing(typeof(SlangSizeMarshaller))] out ByteSize outValueSize);
[PreserveSig]
void SetExtInstHandlerUserData(void* userData);

View file

@ -6,17 +6,6 @@ using Brutal.Strings;
namespace Brutal.SlangApi;
public static unsafe partial class ISlangUnknownExtensions
{
public static void* QueryInterface(this ISlangUnknown self, ref Brutal.SlangApi.Uuid uuid)
{
self.QueryInterface(ref uuid, out var __result).ThrowIfFailure();
return __result;
}
public static Result TryQueryInterface(this ISlangUnknown self, ref Brutal.SlangApi.Uuid uuid, out void* outObject)
=> self.QueryInterface(ref uuid, out outObject);
}
public static unsafe partial class ISlangFileSystemExtensions
{
public static ISlangBlob LoadFile(this ISlangFileSystem self, byte* path)
@ -75,7 +64,7 @@ public static unsafe partial class ISlangFileSystemExtExtensions
public static unsafe partial class ISlangMutableFileSystemExtensions
{
public static Result TrySaveFile(this ISlangMutableFileSystem self, byte* path, void* data, ByteSize64 size)
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);
@ -87,9 +76,9 @@ public static unsafe partial class ISlangMutableFileSystemExtensions
public static unsafe partial class ISlangWriterExtensions
{
public static Result TryEndAppendBuffer(this ISlangWriter self, byte* buffer, ByteSize64 numChars)
public static Result TryEndAppendBuffer(this ISlangWriter self, byte* buffer, ByteSize numChars)
=> self.EndAppendBuffer(buffer, numChars);
public static Result TryWrite(this ISlangWriter self, byte* chars, ByteSize64 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);
@ -119,7 +108,7 @@ public static unsafe partial class IGlobalSessionExtensions
=> self.CheckPassThroughSupport(passThrough);
public static Result TryCompileCoreModule(this IGlobalSession self, CompileCoreModuleFlags flags)
=> self.CompileCoreModule(flags);
public static Result TryLoadCoreModule(this IGlobalSession self, void* coreModule, ByteSize64 coreModuleSizeInBytes)
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)
{
@ -130,9 +119,9 @@ public static unsafe partial class IGlobalSessionExtensions
=> self.SaveCoreModule(archiveType, out outBlob);
public static Result TrySetSpirvCoreGrammar(this IGlobalSession self, byte* jsonPath)
=> self.SetSpirvCoreGrammar(jsonPath);
public static ISlangUnknown ParseCommandLineArguments(this IGlobalSession self, int argc, byte** argv, out Brutal.SlangApi.SessionDesc outSessionDesc)
public static Brutal.SlangApi.SessionDesc ParseCommandLineArguments(this IGlobalSession self, int argc, byte** argv, out ISlangUnknown outAuxAllocation)
{
self.ParseCommandLineArguments(argc, argv, out outSessionDesc, out var __result).ThrowIfFailure();
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)
@ -146,7 +135,7 @@ public static unsafe partial class IGlobalSessionExtensions
=> 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, ByteSize64 sizeInBytes)
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)
{
@ -187,15 +176,15 @@ public static unsafe partial class ISessionExtensions
}
public static Result TryCreateCompileRequest(this ISession self, out CompileRequest outCompileRequest)
=> self.CreateCompileRequest(out outCompileRequest);
public static ISlangBlob CreateTypeConformanceComponentType(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out Brutal.SlangApi.ITypeConformance outConformance, Int conformanceIdOverride)
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 outConformance, conformanceIdOverride, out var __result).ThrowIfFailure();
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, out uint outRTTIDataBuffer, uint bufferSizeInBytes)
=> self.GetDynamicObjectRTTIBytes(type, interfaceType, out outRTTIDataBuffer, bufferSizeInBytes);
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)
@ -251,9 +240,9 @@ public static unsafe partial class IComponentTypeExtensions
}
public static Result TryRenameEntryPoint(this IComponentType self, byte* newName, out Brutal.SlangApi.IComponentType outEntryPoint)
=> self.RenameEntryPoint(newName, out outEntryPoint);
public static ISlangBlob LinkWithOptions(this IComponentType self, out Brutal.SlangApi.IComponentType outLinkedComponentType, uint compilerOptionEntryCount, in Brutal.SlangApi.CompilerOptionEntry compilerOptionEntries)
public static Brutal.SlangApi.IComponentType LinkWithOptions(this IComponentType self, uint compilerOptionEntryCount, in Brutal.SlangApi.CompilerOptionEntry compilerOptionEntries, out ISlangBlob outDiagnostics)
{
self.LinkWithOptions(out outLinkedComponentType, compilerOptionEntryCount, in compilerOptionEntries, out var __result).ThrowIfFailure();
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)
@ -409,7 +398,7 @@ public static unsafe partial class IByteCodeRunnerExtensions
}
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, ByteSize64 argumentSize)
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);

View file

@ -239,7 +239,7 @@ namespace Brutal.SlangApi
CompileRequest request,
RefString8 basePath,
void* libData,
ByteSize64 libDataSize
ByteSize libDataSize
);
[LibraryImport("slang")]
@ -342,7 +342,7 @@ namespace Brutal.SlangApi
public static partial void* spGetEntryPointCode(
CompileRequest request,
int entryPointIndex,
out ByteSize64 outSize
out ByteSize outSize
);
[LibraryImport("slang")]
@ -372,7 +372,7 @@ namespace Brutal.SlangApi
);
[LibraryImport("slang")]
public static partial void* spGetCompileRequestCode(CompileRequest request, out ByteSize64 outSize);
public static partial void* spGetCompileRequestCode(CompileRequest request, out ByteSize outSize);
[LibraryImport("slang")]
public static partial Result spGetContainerCode(CompileRequest request, out nint outBlob);
@ -382,7 +382,7 @@ namespace Brutal.SlangApi
CompileRequest request,
nint fileSystem,
void* data,
ByteSize64 size
ByteSize size
);
[LibraryImport("slang")]
@ -402,7 +402,7 @@ namespace Brutal.SlangApi
public static partial Result spExtractRepro(
nint session,
void* reproData,
ByteSize64 reproDataSize,
ByteSize reproDataSize,
nint fileSystem
);
@ -410,7 +410,7 @@ namespace Brutal.SlangApi
public static partial Result spLoadReproAsFileSystem(
nint session,
void* reproData,
ByteSize64 reproDataSize,
ByteSize reproDataSize,
nint replaceFileSystem,
out nint outFileSystem
);
@ -473,7 +473,7 @@ namespace Brutal.SlangApi
public static partial string spReflectionUserAttribute_GetArgumentValueString(
Brutal.SlangApi.ReflectionUserAttribute attrib,
uint index,
out ByteSize64 outSize
out ByteSize outSize
);
[LibraryImport("slang")]
@ -507,10 +507,10 @@ namespace Brutal.SlangApi
public static partial ReflectionVariable spReflectionType_GetFieldByIndex(ReflectionType type, uint index);
[LibraryImport("slang")]
public static partial ByteSize64 spReflectionType_GetElementCount(ReflectionType type);
public static partial ByteSize spReflectionType_GetElementCount(ReflectionType type);
[LibraryImport("slang")]
public static partial ByteSize64 spReflectionType_GetSpecializedElementCount(
public static partial ByteSize spReflectionType_GetSpecializedElementCount(
ReflectionType type,
Reflection reflection
);
@ -558,13 +558,13 @@ namespace Brutal.SlangApi
public static partial Brutal.SlangApi.TypeKind spReflectionTypeLayout_getKind(ReflectionTypeLayout type);
[LibraryImport("slang")]
public static partial ByteSize64 spReflectionTypeLayout_GetSize(
public static partial ByteSize spReflectionTypeLayout_GetSize(
ReflectionTypeLayout type,
Brutal.SlangApi.ParameterCategory category
);
[LibraryImport("slang")]
public static partial ByteSize64 spReflectionTypeLayout_GetStride(
public static partial ByteSize spReflectionTypeLayout_GetStride(
ReflectionTypeLayout type,
Brutal.SlangApi.ParameterCategory category
);
@ -597,7 +597,7 @@ namespace Brutal.SlangApi
);
[LibraryImport("slang")]
public static partial ByteSize64 spReflectionTypeLayout_GetElementStride(
public static partial ByteSize spReflectionTypeLayout_GetElementStride(
ReflectionTypeLayout type,
Brutal.SlangApi.ParameterCategory category
);
@ -801,7 +801,7 @@ namespace Brutal.SlangApi
public static partial ReflectionType spReflectionVariable_GetType(ReflectionVariable var);
[LibraryImport("slang")]
public static partial Brutal.SlangApi.ReflectionModifier spReflectionVariable_FindModifier(
public static partial ReflectionModifier spReflectionVariable_FindModifier(
ReflectionVariable var,
Brutal.SlangApi.ModifierID modifierID
);
@ -851,13 +851,13 @@ namespace Brutal.SlangApi
);
[LibraryImport("slang")]
public static partial ByteSize64 spReflectionVariableLayout_GetOffset(
public static partial ByteSize spReflectionVariableLayout_GetOffset(
ReflectionVariableLayout var,
Brutal.SlangApi.ParameterCategory category
);
[LibraryImport("slang")]
public static partial ByteSize64 spReflectionVariableLayout_GetSpace(
public static partial ByteSize spReflectionVariableLayout_GetSpace(
ReflectionVariableLayout var,
Brutal.SlangApi.ParameterCategory category
);
@ -875,7 +875,7 @@ namespace Brutal.SlangApi
public static partial string spReflectionVariableLayout_GetSemanticName(ReflectionVariableLayout var);
[LibraryImport("slang")]
public static partial ByteSize64 spReflectionVariableLayout_GetSemanticIndex(ReflectionVariableLayout var);
public static partial ByteSize spReflectionVariableLayout_GetSemanticIndex(ReflectionVariableLayout var);
[LibraryImport("slang")]
public static partial ReflectionDecl spReflectionFunction_asDecl(ReflectionFunction func);
@ -888,7 +888,7 @@ namespace Brutal.SlangApi
public static partial string spReflectionFunction_GetName(ReflectionFunction func);
[LibraryImport("slang")]
public static partial Brutal.SlangApi.ReflectionModifier spReflectionFunction_FindModifier(
public static partial ReflectionModifier spReflectionFunction_FindModifier(
ReflectionFunction var,
Brutal.SlangApi.ModifierID modifierID
);
@ -981,7 +981,7 @@ namespace Brutal.SlangApi
public static partial ReflectionDecl spReflectionDecl_getParent(ReflectionDecl decl);
[LibraryImport("slang")]
public static partial Brutal.SlangApi.ReflectionModifier spReflectionDecl_findModifier(
public static partial ReflectionModifier spReflectionDecl_findModifier(
ReflectionDecl decl,
Brutal.SlangApi.ModifierID modifierID
);
@ -1120,7 +1120,7 @@ namespace Brutal.SlangApi
public static partial void spReflectionEntryPoint_getComputeThreadGroupSize(
ReflectionEntryPoint entryPoint,
UInt axisCount,
out UInt outSizeAlongAxis
UInt* outSizeAlongAxis
);
[LibraryImport("slang")]
@ -1251,7 +1251,7 @@ namespace Brutal.SlangApi
public static partial UInt spReflection_getGlobalConstantBufferBinding(Reflection reflection);
[LibraryImport("slang")]
public static partial ByteSize64 spReflection_getGlobalConstantBufferSize(Reflection reflection);
public static partial ByteSize spReflection_getGlobalConstantBufferSize(Reflection reflection);
[LibraryImport("slang")]
public static partial ReflectionType spReflection_specializeType(
@ -1290,11 +1290,11 @@ namespace Brutal.SlangApi
public static partial string spReflection_getHashedString(
Reflection reflection,
UInt index,
out ByteSize64 outCount
out ByteSize outCount
);
[LibraryImport("slang")]
public static partial UInt32 spComputeStringHash(RefString8 chars, ByteSize64 count);
public static partial UInt32 spComputeStringHash(RefString8 chars, ByteSize count);
[LibraryImport("slang")]
public static partial ReflectionTypeLayout spReflection_getGlobalParamsTypeLayout(Reflection reflection);
@ -1312,9 +1312,6 @@ namespace Brutal.SlangApi
[LibraryImport("slang")]
public static partial Int spReflection_getBindlessSpaceIndex(Reflection reflection);
[LibraryImport("slang")]
public static partial nint spReflection_GetSession(Reflection reflection);
[LibraryImport("slang")]
public static partial Result spCompileRequest_getProgram(CompileRequest request, out nint outProgram);
@ -1342,7 +1339,7 @@ namespace Brutal.SlangApi
public static partial Result spCompileRequest_getSession(CompileRequest request, out nint outSession);
[LibraryImport("slang")]
public static partial nint slang_createBlob(void* data, ByteSize64 size);
public static partial nint slang_createBlob(void* data, ByteSize size);
[LibraryImport("slang")]
public static partial nint slang_loadModuleFromSource(
@ -1350,7 +1347,7 @@ namespace Brutal.SlangApi
RefString8 moduleName,
RefString8 path,
RefString8 source,
ByteSize64 sourceSize,
ByteSize sourceSize,
out nint outDiagnostics
);
@ -1360,7 +1357,7 @@ namespace Brutal.SlangApi
RefString8 moduleName,
RefString8 path,
void* source,
ByteSize64 sourceSize,
ByteSize sourceSize,
out nint outDiagnostics
);
@ -1368,7 +1365,7 @@ namespace Brutal.SlangApi
public static partial Result slang_loadModuleInfoFromIRBlob(
nint session,
void* source,
ByteSize64 sourceSize,
ByteSize sourceSize,
ref Int outModuleVersion,
ref byte* outModuleCompilerVersion,
ref byte* outModuleName
@ -1389,9 +1386,6 @@ namespace Brutal.SlangApi
out nint outGlobalSession
);
[LibraryImport("slang")]
public static partial nint slang_getEmbeddedCoreModule();
[LibraryImport("slang")]
public static partial void slang_shutdown();
@ -1502,7 +1496,7 @@ namespace Brutal.SlangApi
internal static unsafe Result ExtractRepro(
nint session,
void* reproData,
ByteSize64 reproDataSize,
ByteSize reproDataSize,
nint fileSystem
)
{
@ -1512,7 +1506,7 @@ namespace Brutal.SlangApi
internal static unsafe Result LoadReproAsFileSystem(
nint session,
void* reproData,
ByteSize64 reproDataSize,
ByteSize reproDataSize,
nint replaceFileSystem,
out nint outFileSystem
)
@ -1567,12 +1561,12 @@ namespace Brutal.SlangApi
return PInvoke.spReflectionType_GetFieldByIndex(type, index);
}
public static ByteSize64 ReflectionTypeGetElementCount(ReflectionType type)
public static ByteSize ReflectionTypeGetElementCount(ReflectionType type)
{
return PInvoke.spReflectionType_GetElementCount(type);
}
public static ByteSize64 ReflectionTypeGetSpecializedElementCount(ReflectionType type, Reflection reflection)
public static ByteSize ReflectionTypeGetSpecializedElementCount(ReflectionType type, Reflection reflection)
{
return PInvoke.spReflectionType_GetSpecializedElementCount(type, reflection);
}
@ -1637,7 +1631,7 @@ namespace Brutal.SlangApi
return PInvoke.spReflectionTypeLayout_getKind(type);
}
public static ByteSize64 ReflectionTypeLayoutGetSize(
public static ByteSize ReflectionTypeLayoutGetSize(
ReflectionTypeLayout type,
Brutal.SlangApi.ParameterCategory category
)
@ -1645,7 +1639,7 @@ namespace Brutal.SlangApi
return PInvoke.spReflectionTypeLayout_GetSize(type, category);
}
public static ByteSize64 ReflectionTypeLayoutGetStride(
public static ByteSize ReflectionTypeLayoutGetStride(
ReflectionTypeLayout type,
Brutal.SlangApi.ParameterCategory category
)
@ -1688,7 +1682,7 @@ namespace Brutal.SlangApi
return PInvoke.spReflectionTypeLayout_GetExplicitCounter(typeLayout);
}
public static ByteSize64 ReflectionTypeLayoutGetElementStride(
public static ByteSize ReflectionTypeLayoutGetElementStride(
ReflectionTypeLayout type,
Brutal.SlangApi.ParameterCategory category
)
@ -1954,7 +1948,7 @@ namespace Brutal.SlangApi
return PInvoke.spReflectionVariable_GetType(var);
}
public static Brutal.SlangApi.ReflectionModifier ReflectionVariableFindModifier(
public static ReflectionModifier ReflectionVariableFindModifier(
ReflectionVariable var,
Brutal.SlangApi.ModifierID modifierID
)
@ -2022,7 +2016,7 @@ namespace Brutal.SlangApi
return PInvoke.spReflectionFunction_GetName(func);
}
public static Brutal.SlangApi.ReflectionModifier ReflectionFunctionFindModifier(
public static ReflectionModifier ReflectionFunctionFindModifier(
ReflectionFunction var,
Brutal.SlangApi.ModifierID modifierID
)
@ -2149,7 +2143,7 @@ namespace Brutal.SlangApi
return PInvoke.spReflectionDecl_getParent(decl);
}
public static Brutal.SlangApi.ReflectionModifier ReflectionDeclFindModifier(
public static ReflectionModifier ReflectionDeclFindModifier(
ReflectionDecl decl,
Brutal.SlangApi.ModifierID modifierID
)
@ -2263,12 +2257,12 @@ namespace Brutal.SlangApi
return PInvoke.spReflectionTypeParameter_GetConstraintByIndex(typeParam, index);
}
public static UInt32 ComputeStringHash(RefString8 chars, ByteSize64 count)
public static UInt32 ComputeStringHash(RefString8 chars, ByteSize count)
{
return PInvoke.spComputeStringHash(chars, count);
}
internal static unsafe nint CreateBlob(void* data, ByteSize64 size)
internal static unsafe nint CreateBlob(void* data, ByteSize size)
{
return PInvoke.slang_createBlob(data, size);
}
@ -2278,7 +2272,7 @@ namespace Brutal.SlangApi
RefString8 moduleName,
RefString8 path,
RefString8 source,
ByteSize64 sourceSize,
ByteSize sourceSize,
out nint outDiagnostics
)
{
@ -2297,7 +2291,7 @@ namespace Brutal.SlangApi
RefString8 moduleName,
RefString8 path,
void* source,
ByteSize64 sourceSize,
ByteSize sourceSize,
out nint outDiagnostics
)
{
@ -2314,7 +2308,7 @@ namespace Brutal.SlangApi
internal static unsafe Result LoadModuleInfoFromIRBlob(
nint session,
void* source,
ByteSize64 sourceSize,
ByteSize sourceSize,
ref Int outModuleVersion,
ref byte* outModuleCompilerVersion,
ref byte* outModuleName
@ -2348,11 +2342,6 @@ namespace Brutal.SlangApi
return PInvoke.slang_createGlobalSessionWithoutCoreModule(apiVersion, out outGlobalSession);
}
internal static nint GetEmbeddedCoreModule()
{
return PInvoke.slang_getEmbeddedCoreModule();
}
public static void Shutdown()
{
PInvoke.slang_shutdown();

View file

@ -197,7 +197,7 @@ namespace Brutal.SlangApi
Slang.PInvoke.spAddTranslationUnitSourceString(this, translationUnitIndex, path, source);
}
public unsafe Result AddLibraryReference(RefString8 basePath, void* libData, ByteSize64 libDataSize)
public unsafe Result AddLibraryReference(RefString8 basePath, void* libData, ByteSize libDataSize)
{
return Slang.PInvoke.spAddLibraryReference(this, basePath, libData, libDataSize);
}
@ -305,7 +305,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spGetEntryPointSource(this, entryPointIndex);
}
public unsafe void* GetEntryPointCode(int entryPointIndex, out ByteSize64 outSize)
public unsafe void* GetEntryPointCode(int entryPointIndex, out ByteSize outSize)
{
return Slang.PInvoke.spGetEntryPointCode(this, entryPointIndex, out outSize);
}
@ -330,7 +330,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spGetTargetHostCallable(this, targetIndex, out outSharedLibrary);
}
public unsafe void* GetCompileRequestCode(out ByteSize64 outSize)
public unsafe void* GetCompileRequestCode(out ByteSize outSize)
{
return Slang.PInvoke.spGetCompileRequestCode(this, out outSize);
}
@ -340,7 +340,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spGetContainerCode(this, out outBlob);
}
internal unsafe Result LoadRepro(nint fileSystem, void* data, ByteSize64 size)
internal unsafe Result LoadRepro(nint fileSystem, void* data, ByteSize size)
{
return Slang.PInvoke.spLoadRepro(this, fileSystem, data, size);
}
@ -494,7 +494,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionDecl_getParent(this);
}
public Brutal.SlangApi.ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID)
public ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID)
{
return Slang.PInvoke.spReflectionDecl_findModifier(this, modifierID);
}
@ -513,12 +513,12 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionTypeLayout_getKind(this);
}
public ByteSize64 GetSize(Brutal.SlangApi.ParameterCategory category)
public ByteSize GetSize(Brutal.SlangApi.ParameterCategory category)
{
return Slang.PInvoke.spReflectionTypeLayout_GetSize(this, category);
}
public ByteSize64 GetStride(Brutal.SlangApi.ParameterCategory category)
public ByteSize GetStride(Brutal.SlangApi.ParameterCategory category)
{
return Slang.PInvoke.spReflectionTypeLayout_GetStride(this, category);
}
@ -548,7 +548,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionTypeLayout_GetExplicitCounter(this);
}
public ByteSize64 GetElementStride(Brutal.SlangApi.ParameterCategory category)
public ByteSize GetElementStride(Brutal.SlangApi.ParameterCategory category)
{
return Slang.PInvoke.spReflectionTypeLayout_GetElementStride(this, category);
}
@ -817,12 +817,12 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionType_GetFieldByIndex(this, index);
}
public ByteSize64 GetElementCount()
public ByteSize GetElementCount()
{
return Slang.PInvoke.spReflectionType_GetElementCount(this);
}
public ByteSize64 GetSpecializedElementCount(Reflection reflection)
public ByteSize GetSpecializedElementCount(Reflection reflection)
{
return Slang.PInvoke.spReflectionType_GetSpecializedElementCount(this, reflection);
}
@ -901,12 +901,12 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionVariableLayout_GetTypeLayout(this);
}
public ByteSize64 GetOffset(Brutal.SlangApi.ParameterCategory category)
public ByteSize GetOffset(Brutal.SlangApi.ParameterCategory category)
{
return Slang.PInvoke.spReflectionVariableLayout_GetOffset(this, category);
}
public ByteSize64 GetSpace(Brutal.SlangApi.ParameterCategory category)
public ByteSize GetSpace(Brutal.SlangApi.ParameterCategory category)
{
return Slang.PInvoke.spReflectionVariableLayout_GetSpace(this, category);
}
@ -921,7 +921,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionVariableLayout_GetSemanticName(this);
}
public ByteSize64 GetSemanticIndex()
public ByteSize GetSemanticIndex()
{
return Slang.PInvoke.spReflectionVariableLayout_GetSemanticIndex(this);
}
@ -950,7 +950,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionVariable_GetType(this);
}
public Brutal.SlangApi.ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID)
public ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID)
{
return Slang.PInvoke.spReflectionVariable_FindModifier(this, modifierID);
}
@ -1009,7 +1009,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionFunction_GetName(this);
}
public Brutal.SlangApi.ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID)
public ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID)
{
return Slang.PInvoke.spReflectionFunction_FindModifier(this, modifierID);
}
@ -1149,9 +1149,6 @@ namespace Brutal.SlangApi
}
};
[InteropHandle]
public readonly unsafe partial struct Attribute { };
[InteropHandle]
public readonly unsafe partial struct ShaderReflection { };
@ -1213,7 +1210,7 @@ namespace Brutal.SlangApi
public unsafe partial struct SessionDesc
{
/// The size of this structure, in bytes.
public ByteSize64 StructureSize;
public ByteSize StructureSize;
/// Code generation targets to include in the session.
public Brutal.SlangApi.TargetDesc* Targets;
@ -1272,7 +1269,7 @@ namespace Brutal.SlangApi
public unsafe partial struct TargetDesc
{
/// The size of this structure, in bytes.
public ByteSize64 StructureSize;
public ByteSize StructureSize;
/// The target format to generate code for (e.g., SPIR-V, DXIL, etc.)
public Brutal.SlangApi.CompileTarget Format;
@ -1336,7 +1333,7 @@ namespace Brutal.SlangApi
public unsafe partial struct ByteCodeRunnerDesc
{
/// The size of this structure, in bytes.
public ByteSize64 StructSize;
public ByteSize StructSize;
};
/// A "Universally Unique Identifier" (UUID)
@ -1355,8 +1352,6 @@ namespace Brutal.SlangApi
public fixed byte Data4[8];
};
public unsafe partial struct Guid { };
/// Can be requested from ISlangCastable cast to indicate the contained chars are null
/// terminated.
public unsafe partial struct TerminatedChars
@ -1372,8 +1367,6 @@ namespace Brutal.SlangApi
[InteropHandle]
public readonly unsafe partial struct EntryPointLayout { };
public unsafe partial struct ReflectionModifier { };
[InteropHandle]
public readonly unsafe partial struct ReflectionUserAttribute
{
@ -1402,7 +1395,7 @@ namespace Brutal.SlangApi
return Slang.PInvoke.spReflectionUserAttribute_GetArgumentValueFloat(this, index, rs);
}
public string GetArgumentValueString(uint index, out ByteSize64 outSize)
public string GetArgumentValueString(uint index, out ByteSize outSize)
{
return Slang.PInvoke.spReflectionUserAttribute_GetArgumentValueString(this, index, out outSize);
}