diff --git a/src/xenia/gpu/d3d12/d3d12_command_processor.cc b/src/xenia/gpu/d3d12/d3d12_command_processor.cc index d4c1e24b2..21ab704fd 100644 --- a/src/xenia/gpu/d3d12/d3d12_command_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_command_processor.cc @@ -1027,6 +1027,8 @@ void D3D12CommandProcessor::PerformSwap(uint32_t frontbuffer_ptr, graphics_system->StretchTextureToFrontBuffer( descriptor_gpu_start, &gamma_ramp_gpu_handle, use_pwl_gamma_ramp ? (1.0f / 128.0f) : (1.0f / 256.0f), command_list); + // Ending the current frame's command list anyway, so no need to unbind + // the render targets when using ROV. PushTransitionBarrier(swap_texture_, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); diff --git a/src/xenia/gpu/d3d12/render_target_cache.cc b/src/xenia/gpu/d3d12/render_target_cache.cc index 982a52fad..d6231b6d1 100644 --- a/src/xenia/gpu/d3d12/render_target_cache.cc +++ b/src/xenia/gpu/d3d12/render_target_cache.cc @@ -1444,6 +1444,10 @@ bool RenderTargetCache::ResolveCopy(SharedMemory* shared_memory, command_list->RSSetScissorRects(1, &scissor); command_list->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); command_list->DrawInstanced(3, 1, 0, 0); + if (command_processor_->IsROVUsedForEDRAM()) { + // Clean up - the ROV path doesn't need render targets bound. + command_list->OMSetRenderTargets(0, nullptr, FALSE, nullptr); + } // Copy the resolve target to the buffer.