Removed Vortice.Windows references and files

このコミットが含まれているのは:
Sergio Pedri committed 2020-11-17 19:40:24 +01:00
1 親 b67af4aaa1
コミット 4811769ebc
46ファイル変更
+1124 -3358

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

+8 -5
ファイルの表示
@@ -15,17 +15,20 @@ namespace ComputeSharp.Exceptions
/// <summary>
/// Creates a new <see cref="GraphicsDeviceMismatchException"/> instance
/// </summary>
internal GraphicsDeviceMismatchException(GraphicsDevice device, GraphicsResource resource) : base(GetExceptionMessage(device, resource)) { }
internal GraphicsDeviceMismatchException(GraphicsDevice device, GraphicsResource resource)
: base(GetExceptionMessage(device, resource))
{
}
// Gets a proper exception message for a pair of device and resource
[Pure]
private static string GetExceptionMessage(GraphicsDevice device, GraphicsResource resource)
private static unsafe string GetExceptionMessage(GraphicsDevice device, GraphicsResource resource)
{
StringBuilder builder = new StringBuilder();
builder.AppendLine("Invalid pairing of graphics devices used to run a compute shader and allocate memory buffers.");
// Check if the device is effectively the same but with two instances pointing to the same adapter
if (device.NativeDevice.AdapterLuid == resource.GraphicsDevice.NativeDevice.AdapterLuid)
if (device.D3D12Device->GetAdapterLuid().Equals(resource.GraphicsDevice.D3D12Device->GetAdapterLuid()))
{
builder.AppendLine("The graphics devices used to allocate buffers and run the shader must be the same instance, not just be using the same physical device.");
builder.AppendLine("You can still run different shaders on different devices, but a shader run on one device must only use buffers allocated by the same device instance.");
@@ -33,8 +36,8 @@ namespace ComputeSharp.Exceptions
else
{
// Actually different devices
builder.AppendLine($"The target device to run the compute shader is \"{device.Name}\" (id: {device.NativeDevice.AdapterLuid}).");
builder.AppendLine($"The buffer of type {resource.GetType().ToFriendlyString()} was allocated on device \"{resource.GraphicsDevice.Name}\" (id: {resource.GraphicsDevice.NativeDevice.AdapterLuid}).");
builder.AppendLine($"The target device to run the compute shader is \"{device.Name}\" (id: {device.D3D12Device->GetAdapterLuid()}).");
builder.AppendLine($"The buffer of type {resource.GetType().ToFriendlyString()} was allocated on device \"{resource.GraphicsDevice.Name}\" (id: {resource.GraphicsDevice.D3D12Device->GetAdapterLuid()}).");
builder.AppendLine("Make sure to always allocate buffers on the same device used to actually run the code that accesses them.");
}