mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
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:
parent
a25cdf80b2
commit
4ac91e105e
1 changed files with 2034 additions and 318 deletions
|
|
@ -139,6 +139,24 @@ public static unsafe partial class ISessionExtensions
|
|||
return self.LoadModuleFromIRBlob(nameP, pathP, source, out outDiagnostics);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the RTTI bytes Slang uses to identify <paramref name="type"/>'s conformance to
|
||||
/// <paramref name="interfaceType"/> into <paramref name="buffer"/>, which must hold at
|
||||
/// least 16 bytes.
|
||||
/// </summary>
|
||||
/// <exception cref="SlangException">Thrown if slang reports a failing <see cref="Result"/>.</exception>
|
||||
public static void GetDynamicObjectRTTIBytes(
|
||||
this ISession self,
|
||||
TypeReflection type,
|
||||
TypeReflection interfaceType,
|
||||
Span<byte> buffer
|
||||
)
|
||||
{
|
||||
fixed (byte* p = buffer)
|
||||
self.GetDynamicObjectRTTIBytes(type, interfaceType, (uint*)p, checked((uint)buffer.Length))
|
||||
.ThrowIfFailure();
|
||||
}
|
||||
|
||||
private const int ShortStringStackBytes = 256;
|
||||
private const int LongStringStackBytes = 8192;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue