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:
parent
4dc4b28db4
commit
0ee12b6164
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue