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
|
|
@ -1,6 +1,41 @@
|
|||
namespace Brutal.Attributes;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that an entity only exposes memory that has a fixed address. Marking an entity [Fixed] allows the analyser
|
||||
/// to check that the entity is only used in contexts where the memory is guaranteed to be fixed, such as when it is
|
||||
/// returned from a method or passed as a parameter. <para />
|
||||
/// The attribute can be applied to return values, parameters, fields, properties, interfaces, classes, and structs.
|
||||
/// </summary>
|
||||
[AttributeUsage(
|
||||
AttributeTargets.ReturnValue | AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property
|
||||
AttributeTargets.ReturnValue
|
||||
| AttributeTargets.Parameter
|
||||
| AttributeTargets.Field
|
||||
| AttributeTargets.Property
|
||||
| AttributeTargets.Interface
|
||||
| AttributeTargets.Class
|
||||
| AttributeTargets.Struct
|
||||
)]
|
||||
public sealed class FixedAttribute : Attribute { }
|
||||
|
||||
/// <summary>
|
||||
/// Acts like the [Fixed] attribute but only if the referenced type is itself fixed. Pass the <c>nameof</c> a type
|
||||
/// parameter of the containing method or type to resolve its type argument, or the <c>typeof</c> a concrete type or
|
||||
/// interface.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.ReturnValue | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class FixedWhenAttribute : Attribute
|
||||
{
|
||||
public FixedWhenAttribute(string typeName)
|
||||
{
|
||||
TypeName = typeName;
|
||||
}
|
||||
|
||||
public FixedWhenAttribute(Type type)
|
||||
{
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public string? TypeName { get; }
|
||||
|
||||
public Type? Type { get; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue