1
0
Fork 0
forked from suyu/suyu

metal: support buffer to buffer copy

This commit is contained in:
Samuliak 2024-04-07 16:03:20 +02:00
parent 081ad83490
commit 58ac31e2be
No known key found for this signature in database

View file

@ -9,6 +9,7 @@
#include "video_core/renderer_metal/mtl_buffer_cache.h"
#include "video_core/renderer_metal/mtl_command_recorder.h"
#include "video_core/renderer_metal/mtl_device.h"
namespace Metal {
@ -80,7 +81,10 @@ void BufferCacheRuntime::Finish() {}
void BufferCacheRuntime::CopyBuffer(MTL::Buffer* dst_buffer, MTL::Buffer* src_buffer,
std::span<const VideoCommon::BufferCopy> copies, bool barrier,
bool can_reorder_upload) {
// TODO: copy buffer
for (const VideoCommon::BufferCopy& copy : copies) {
command_recorder.GetBlitCommandEncoder()->copyFromBuffer(
src_buffer, copy.src_offset, dst_buffer, copy.dst_offset, copy.size);
}
}
void BufferCacheRuntime::ClearBuffer(MTL::Buffer* dest_buffer, u32 offset, size_t size, u32 value) {