Skip to content

Commit

Permalink
git subtree pull of latest Framework12
Browse files Browse the repository at this point in the history
Remove default mips from dx12u when creating render targets
  • Loading branch information
jstewart-amd committed Jun 23, 2016
2 parents 6be1944 + df046db commit 96b766f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions framework/d3d12/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 framework/d3d12/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 96b766f

Please sign in to comment.