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
|
|
@ -122,17 +122,11 @@ public static unsafe class ICompileRequestExtensions
|
|||
/// <summary>
|
||||
/// Returns the <see cref="ISlangWriter"/> currently installed for
|
||||
/// <paramref name="channel"/>, or <c>null</c> if the channel is unset. Slang's
|
||||
/// getter does not AddRef the returned pointer, so this wrapper performs the
|
||||
/// AddRef itself before handing the pointer to <see cref="ComWrappers"/>.
|
||||
/// getter lends the pointer without an AddRef; the returned proxy takes its own
|
||||
/// reference, so release it with <see cref="Slang.Release"/>.
|
||||
/// </summary>
|
||||
public static ISlangWriter? GetWriter(this ICompileRequest self, WriterChannel channel)
|
||||
{
|
||||
var raw = self.GetWriter(channel);
|
||||
if (raw == 0)
|
||||
return null;
|
||||
Marshal.AddRef(raw);
|
||||
return (ISlangWriter)Slang.ComWrappers.GetOrCreateObjectForComInstance(raw, CreateObjectFlags.None);
|
||||
}
|
||||
public static ISlangWriter? GetWriter(this ICompileRequest self, WriterChannel channel) =>
|
||||
Slang.WrapBorrowedComInstance<ISlangWriter>(self.GetWriter(channel));
|
||||
|
||||
/// <summary>
|
||||
/// Adds a translation-unit source whose contents are provided as an
|
||||
|
|
|
|||
Loading…
Reference in a new issue