d3d12: name rtts/ds/texture for debugging purpose

This commit is contained in:
Vincent Lejeune 2015-12-19 19:34:05 +01:00
parent ecad586739
commit b41fcf3734
2 changed files with 6 additions and 0 deletions

View File

@ -299,6 +299,8 @@ ID3D12Resource *render_targets::bind_address_as_render_targets(ID3D12Device *dev
IID_PPV_ARGS(rtt.GetAddressOf())
);
render_targets_storage[address] = rtt;
std::wstring name = L"rtt_@" + std::to_wstring(address);
rtt->SetName(name.c_str());
return rtt.Get();
}
@ -339,6 +341,8 @@ ID3D12Resource * render_targets::bind_address_as_depth_stencil(ID3D12Device * de
IID_PPV_ARGS(new_depth_stencil.GetAddressOf())
);
depth_stencil_storage[address] = new_depth_stencil;
std::wstring name = L"ds_@" + std::to_wstring(address);
new_depth_stencil->SetName(name.c_str());
return new_depth_stencil.Get();
}

View File

@ -201,6 +201,8 @@ void D3D12GSRender::upload_and_bind_textures(ID3D12GraphicsCommandList *command_
if (cached_texture != nullptr)
get_current_resource_storage().dirty_textures.push_back(m_texture_cache.remove_from_cache(texaddr));
ComPtr<ID3D12Resource> tex = upload_single_texture(textures[i], m_device.Get(), command_list, m_texture_upload_data);
std::wstring name = L"texture_@" + std::to_wstring(texaddr);
tex->SetName(name.c_str());
vram_texture = tex.Get();
m_texture_cache.store_and_protect_data(texaddr, texaddr, get_texture_size(textures[i]), format, w, h, textures[i].mipmap(), tex);
}