Add DeviceLostReason.AccessDenied value

このコミットが含まれているのは:
Sergio Pedri committed 2022-07-31 23:26:10 +02:00
1 親 aa50b02144
コミット 701c88983c
2ファイル変更
+17 -7

検索条件に一致するファイルはありません

+16 -7
ファイルの表示
@@ -1,4 +1,7 @@
namespace ComputeSharp;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
namespace ComputeSharp;
/// <summary>
/// Indicates a reason a <see cref="GraphicsDevice"/> instance was lost.
@@ -9,33 +12,39 @@ public enum DeviceLostReason
/// The application's device failed due to badly formed commands sent by the application.
/// This is an design-time issue that should be investigated and fixed.
/// </summary>
DeviceHung = unchecked((int)0x887A0006),
DeviceHung = DXGI.DXGI_ERROR_DEVICE_HUNG,
/// <summary>
/// The video card has been physically removed from the system, or a driver upgrade for
/// the video card has occurred. The application should destroy and recreate the device.
/// </summary>
DeviceRemoved = unchecked((int)0x887A0005),
DeviceRemoved = DXGI.DXGI_ERROR_DEVICE_REMOVED,
/// <summary>
/// The device failed due to a badly formed command. This is a run-time issue.
/// The application should destroy and recreate the device.
/// </summary>
DeviceReset = unchecked((int)0x887A0007),
DeviceReset = DXGI.DXGI_ERROR_DEVICE_RESET,
/// <summary>
/// The driver encountered a problem and was put into the device removed state.
/// </summary>
DriverInternalError = unchecked((int)0x887A0020),
DriverInternalError = DXGI.DXGI_ERROR_DRIVER_INTERNAL_ERROR,
/// <summary>
/// The application provided invalid parameter data.
/// This must be debugged and fixed before the application is released.
/// </summary>
InvalidCall = unchecked((int)0x887A0001),
InvalidCall = DXGI.DXGI_ERROR_INVALID_CALL,
/// <summary>
/// The device was removed after attempting an invalid operation (eg. trying to write to the wrong swapchain buffer).
/// The application should destroy and recreate the device. This also likely indicates an application bug.
/// </summary>
AccessDenied = DXGI.DXGI_ERROR_ACCESS_DENIED,
/// <summary>
/// The device was lost for an unspecified reason.
/// </summary>
UnspecifiedError = unchecked((int)0x80004005)
UnspecifiedError = E.E_FAIL
}
+1
ファイルの表示
@@ -90,6 +90,7 @@ unsafe partial class GraphicsDevice
DXGI.DXGI_ERROR_DEVICE_RESET => DeviceLostReason.DeviceReset,
DXGI.DXGI_ERROR_DRIVER_INTERNAL_ERROR => DeviceLostReason.DriverInternalError,
DXGI.DXGI_ERROR_INVALID_CALL => DeviceLostReason.InvalidCall,
DXGI.DXGI_ERROR_ACCESS_DENIED => DeviceLostReason.AccessDenied,
_ => DeviceLostReason.UnspecifiedError
};