From df046db606ac23056d9512a1c44d095b05c2d4b9 Mon Sep 17 00:00:00 2001 From: jstewart-amd Date: Thu, 23 Jun 2016 07:09:50 -0400 Subject: [PATCH] Squashed 'framework/d3d12/' changes from ae3bf3f..56fcf4a 56fcf4a Remove default mips from dx12u when creating render targets git-subtree-dir: framework/d3d12 git-subtree-split: 56fcf4a9a07b43658ad893d75347a720dd1001d7 --- dx12u/src/depth_stencil.cpp | 4 ++-- dx12u/src/render_target.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dx12u/src/depth_stencil.cpp b/dx12u/src/depth_stencil.cpp index 00dc3d0..d8bffb8 100644 --- a/dx12u/src/depth_stencil.cpp +++ b/dx12u/src/depth_stencil.cpp @@ -86,7 +86,7 @@ namespace if (h.Get() == nullptr) { auto default_heap = CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT); - auto tex_desc = CD3DX12_RESOURCE_DESC::Tex2D(tex_format, width, static_cast(height), static_cast(array_sz), 0, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL); + auto tex_desc = CD3DX12_RESOURCE_DESC::Tex2D(tex_format, width, static_cast(height), static_cast(array_sz), 1, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL); auto r = dvc->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &tex_desc, D3D12_RESOURCE_STATE_DEPTH_WRITE, &depth_clear_value, IID_PPV_ARGS(&rsrc)); @@ -94,7 +94,7 @@ namespace } else { - auto tex_desc = CD3DX12_RESOURCE_DESC::Tex2D(tex_format, width, static_cast(height), static_cast(array_sz), 0, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL); + auto tex_desc = CD3DX12_RESOURCE_DESC::Tex2D(tex_format, width, static_cast(height), static_cast(array_sz), 1, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL); auto r = dvc->CreatePlacedResource(h.Get(), heap_offset, &tex_desc, D3D12_RESOURCE_STATE_DEPTH_WRITE, &depth_clear_value, IID_PPV_ARGS(&rsrc)); diff --git a/dx12u/src/render_target.cpp b/dx12u/src/render_target.cpp index d6b24e1..1ff1fd2 100644 --- a/dx12u/src/render_target.cpp +++ b/dx12u/src/render_target.cpp @@ -53,7 +53,7 @@ namespace if (h.Get() == nullptr) { auto heap_default = CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT, gpu_mask, visible_mask); - auto tex_2d_desc = CD3DX12_RESOURCE_DESC::Tex2D(format, width, static_cast(height), 1, 0, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); + auto tex_2d_desc = CD3DX12_RESOURCE_DESC::Tex2D(format, width, static_cast(height), 1, 1, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); auto r = dvc->CreateCommittedResource(&heap_default, D3D12_HEAP_FLAG_NONE, &tex_2d_desc, D3D12_RESOURCE_STATE_RENDER_TARGET, &clear_value, IID_PPV_ARGS(&rsrc)); @@ -61,7 +61,7 @@ namespace } else { - auto tex_2d_desc = CD3DX12_RESOURCE_DESC::Tex2D(format, width, static_cast(height), 1, 0, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); + auto tex_2d_desc = CD3DX12_RESOURCE_DESC::Tex2D(format, width, static_cast(height), 1, 1, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); auto r = dvc->CreatePlacedResource(h.Get(), heap_offset, &tex_2d_desc, D3D12_RESOURCE_STATE_RENDER_TARGET, &clear_value, IID_PPV_ARGS(&rsrc));