1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 03:02:53 +01:00

d3d12: Never pass nullptr as render target descriptor, even if unused.

Function interface doesn't allow this.
This commit is contained in:
Vincent Lejeune 2016-01-13 00:36:39 +01:00
parent 9c12d8ff22
commit 224facf3ba

View File

@ -257,9 +257,8 @@ void D3D12GSRender::prepare_render_targets(ID3D12GraphicsCommandList *copycmdlis
void D3D12GSRender::set_rtt_and_ds(ID3D12GraphicsCommandList *command_list)
{
UINT num_rtt = get_num_rtt(to_surface_target(rsx::method_registers[NV4097_SET_SURFACE_COLOR_TARGET]));
D3D12_CPU_DESCRIPTOR_HANDLE* rtt_handle = (num_rtt > 0) ? &m_rtts.current_rtts_handle : nullptr;
D3D12_CPU_DESCRIPTOR_HANDLE* ds_handle = (std::get<1>(m_rtts.m_bound_depth_stencil) != nullptr) ? &m_rtts.current_ds_handle : nullptr;
command_list->OMSetRenderTargets((UINT)num_rtt, rtt_handle, true, ds_handle);
command_list->OMSetRenderTargets((UINT)num_rtt, &m_rtts.current_rtts_handle, true, ds_handle);
}
void render_targets::init(ID3D12Device *device)