From 0a0f51bd5faabe47716469c16b3a0826a5691aeb Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 8 May 2021 16:10:17 +0200 Subject: [PATCH] Fixed incorrect exceptions for unsupported 3D texture type --- src/ComputeSharp/Graphics/Resources/Abstract/Texture3D{T}.cs | 2 +- .../Graphics/Resources/Abstract/TransferTexture3D{T}.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ComputeSharp/Graphics/Resources/Abstract/Texture3D{T}.cs b/src/ComputeSharp/Graphics/Resources/Abstract/Texture3D{T}.cs index f29c2db8..f0c14da2 100644 --- a/src/ComputeSharp/Graphics/Resources/Abstract/Texture3D{T}.cs +++ b/src/ComputeSharp/Graphics/Resources/Abstract/Texture3D{T}.cs @@ -82,7 +82,7 @@ namespace ComputeSharp.Resources if (!device.D3D12Device->IsDxgiFormatSupported(DXGIFormatHelper.GetForType(), d3D12FormatSupport)) { - UnsupportedTextureTypeException.ThrowForTexture2D(); + UnsupportedTextureTypeException.ThrowForTexture3D(); } GraphicsDevice = device; diff --git a/src/ComputeSharp/Graphics/Resources/Abstract/TransferTexture3D{T}.cs b/src/ComputeSharp/Graphics/Resources/Abstract/TransferTexture3D{T}.cs index 42e4b092..0085661b 100644 --- a/src/ComputeSharp/Graphics/Resources/Abstract/TransferTexture3D{T}.cs +++ b/src/ComputeSharp/Graphics/Resources/Abstract/TransferTexture3D{T}.cs @@ -58,7 +58,7 @@ namespace ComputeSharp.Resources if (!device.D3D12Device->IsDxgiFormatSupported(DXGIFormatHelper.GetForType(), D3D12_FORMAT_SUPPORT1_TEXTURE3D)) { - UnsupportedTextureTypeException.ThrowForTexture2D(); + UnsupportedTextureTypeException.ThrowForTexture3D(); } GraphicsDevice = device;