Skip to content

Commit

Permalink
Squashed 'framework/d3d12/' changes from ae3bf3f..56fcf4a
Browse files Browse the repository at this point in the history
56fcf4a Remove default mips from dx12u when creating render targets

git-subtree-dir: framework/d3d12
git-subtree-split: 56fcf4a9a07b43658ad893d75347a720dd1001d7
  • Loading branch information
jstewart-amd committed Jun 23, 2016
1 parent d58b438 commit df046db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dx12u/src/depth_stencil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ 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<uint32_t>(height), static_cast<uint16_t>(array_sz), 0, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL);
auto tex_desc = CD3DX12_RESOURCE_DESC::Tex2D(tex_format, width, static_cast<uint32_t>(height), static_cast<uint16_t>(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));
dx12u::throw_if_error(r);
}
else
{
auto tex_desc = CD3DX12_RESOURCE_DESC::Tex2D(tex_format, width, static_cast<uint32_t>(height), static_cast<uint16_t>(array_sz), 0, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL);
auto tex_desc = CD3DX12_RESOURCE_DESC::Tex2D(tex_format, width, static_cast<uint32_t>(height), static_cast<uint16_t>(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));
Expand Down
4 changes: 2 additions & 2 deletions dx12u/src/render_target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ 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<uint32_t>(height), 1, 0, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET);
auto tex_2d_desc = CD3DX12_RESOURCE_DESC::Tex2D(format, width, static_cast<uint32_t>(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));
dx12u::throw_if_error(r);
}
else
{
auto tex_2d_desc = CD3DX12_RESOURCE_DESC::Tex2D(format, width, static_cast<uint32_t>(height), 1, 0, 1, 0, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET);
auto tex_2d_desc = CD3DX12_RESOURCE_DESC::Tex2D(format, width, static_cast<uint32_t>(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));
Expand Down

0 comments on commit df046db

Please sign in to comment.