VideoBackends:Metal: Allocate bounding box uploads on a cpu buffer

AMD Metal drivers have a goofy bug where the bbox buffer stops being coherent with the cpu if you copy to it from a private (gpu) buffer and don't do anything else with it in that command buffer.
This commit is contained in:
TellowKrinkle 2023-05-18 00:29:58 -05:00
parent 4dc4b28db4
commit 0ee12b6164
1 changed files with 1 additions and 2 deletions

View File

@ -54,8 +54,7 @@ void Metal::BoundingBox::Write(u32 index, const std::vector<BBoxType>& values)
{
@autoreleasepool
{
StateTracker::Map map = g_state_tracker->Allocate(StateTracker::UploadBuffer::Other, size,
StateTracker::AlignMask::Other);
StateTracker::Map map = g_state_tracker->AllocateForTextureUpload(size);
memcpy(map.cpu_buffer, values.data(), size);
g_state_tracker->EndRenderPass();
id<MTLBlitCommandEncoder> upload = [g_state_tracker->GetRenderCmdBuf() blitCommandEncoder];