From edf7e628cadd51e019f6d3723d120e727e50d32e Mon Sep 17 00:00:00 2001 From: Andrey Sukharev Date: Mon, 12 Dec 2022 17:10:05 +0300 Subject: Use method overloads that support trimming. Mark some types to be trimming friendly (#4083) * Use method overloads that support trimming. Mark some types to be trimming friendly * Use generic version of marshalling method --- Ryujinx.Graphics.Gpu/Engine/DeviceStateWithShadow.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/DeviceStateWithShadow.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/DeviceStateWithShadow.cs b/Ryujinx.Graphics.Gpu/Engine/DeviceStateWithShadow.cs index 3a06bc2a..74a9aa04 100644 --- a/Ryujinx.Graphics.Gpu/Engine/DeviceStateWithShadow.cs +++ b/Ryujinx.Graphics.Gpu/Engine/DeviceStateWithShadow.cs @@ -2,6 +2,7 @@ using Ryujinx.Graphics.Device; using System; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace Ryujinx.Graphics.Gpu.Engine @@ -21,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Engine /// Represents a device's state, with a additional shadow state. /// /// Type of the state - class DeviceStateWithShadow : IDeviceState where TState : unmanaged, IShadowState + class DeviceStateWithShadow<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] TState> : IDeviceState where TState : unmanaged, IShadowState { private readonly DeviceState _state; private readonly DeviceState _shadowState; -- cgit v1.2.3