D3D12: Specify read/write ranges when calling Map/Unmap

This commit is contained in:
Stenzek
2016-03-15 22:26:01 +10:00
parent fde7dee652
commit ccf9470241
10 changed files with 51 additions and 26 deletions

View File

@ -78,7 +78,8 @@ void BBox::Invalidate()
if (!s_bbox_staging_buffer_map)
return;
s_bbox_staging_buffer->Unmap(0, nullptr);
D3D12_RANGE write_range = {};
s_bbox_staging_buffer->Unmap(0, &write_range);
s_bbox_staging_buffer_map = nullptr;
}
@ -139,7 +140,8 @@ int BBox::Get(int index)
D3D::command_list_mgr->ExecuteQueuedWork(true);
CheckHR(s_bbox_staging_buffer->Map(0, nullptr, &s_bbox_staging_buffer_map));
D3D12_RANGE read_range = { 0, BBOX_BUFFER_SIZE };
CheckHR(s_bbox_staging_buffer->Map(0, &read_range, &s_bbox_staging_buffer_map));
}
int value;