summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp6
2 files changed, 3 insertions, 7 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
index 7e49b537..0fb907da 100644
--- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
@@ -1393,7 +1393,7 @@ namespace Diligent
auto& TextureD3D12 = *ValidatedCast<TextureD3D12Impl>(pTexture);
const auto& TexDesc = TextureD3D12.GetDesc();
auto Subres = D3D12CalcSubresource(MipLevel, ArraySlice, 0, TexDesc.MipLevels, TexDesc.ArraySize);
- if (TexDesc.Usage == USAGE_DEFAULT)
+ if (TexDesc.Usage == USAGE_DYNAMIC)
{
if (MapType != MAP_WRITE)
{
@@ -1483,7 +1483,7 @@ namespace Diligent
TextureD3D12Impl& TextureD3D12 = *ValidatedCast<TextureD3D12Impl>(pTexture);
const auto& TexDesc = TextureD3D12.GetDesc();
auto Subres = D3D12CalcSubresource(MipLevel, ArraySlice, 0, TexDesc.MipLevels, TexDesc.ArraySize);
- if (TexDesc.Usage == USAGE_DEFAULT)
+ if (TexDesc.Usage == USAGE_DYNAMIC)
{
auto UploadSpaceIt = m_MappedTextures.find(MappedTextureKey{&TextureD3D12, Subres});
if(UploadSpaceIt != m_MappedTextures.end())
diff --git a/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp
index 0310ee06..a776f97d 100644
--- a/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp
@@ -137,7 +137,7 @@ TextureD3D12Impl :: TextureD3D12Impl(IReferenceCounters* pRefCounters,
D3D12_RESOURCE_DESC Desc = GetD3D12TextureDesc();
auto* pd3d12Device = pRenderDeviceD3D12->GetD3D12Device();
- if (m_Desc.Usage == USAGE_STATIC || m_Desc.Usage == USAGE_DEFAULT)
+ if (m_Desc.Usage == USAGE_STATIC || m_Desc.Usage == USAGE_DEFAULT || m_Desc.Usage == USAGE_DYNAMIC)
{
D3D12_CLEAR_VALUE ClearValue;
D3D12_CLEAR_VALUE* pClearValue = nullptr;
@@ -355,10 +355,6 @@ TextureD3D12Impl :: TextureD3D12Impl(IReferenceCounters* pRefCounters,
if(FAILED(hr))
LOG_ERROR_AND_THROW("Failed to create staging buffer");
}
- else if (m_Desc.Usage == USAGE_DYNAMIC)
- {
- LOG_ERROR_AND_THROW("Dynamic textures are not currently implemented in D3D12 back-end");
- }
else
{
UNEXPECTED("Unexpected usage");