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));