mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-02 13:02:44 +01:00
metal: support buffer to buffer copy
This commit is contained in:
parent
081ad83490
commit
58ac31e2be
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue