[D3D12] SHM - mark pages as modified in the beginning of a frame

This commit is contained in:
Triang3l
2018-07-25 15:04:14 +03:00
parent ae1196f29d
commit bbabbc2439
3 changed files with 85 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ bool D3D12CommandProcessor::SetupContext() {
}
}
shared_memory_ = std::make_unique<SharedMemory>(context);
shared_memory_ = std::make_unique<SharedMemory>(memory_, context);
if (!shared_memory_->Initialize()) {
XELOGE("Failed to initialize shared memory");
return false;
@@ -164,6 +164,8 @@ bool D3D12CommandProcessor::BeginFrame() {
command_lists_setup_[current_queue_frame_]->BeginRecording();
command_lists_[current_queue_frame_]->BeginRecording();
shared_memory_->BeginFrame();
return true;
}