mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 19:32:40 -06: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_buffer_cache.h"
|
||||||
|
|
||||||
|
#include "video_core/renderer_metal/mtl_command_recorder.h"
|
||||||
#include "video_core/renderer_metal/mtl_device.h"
|
#include "video_core/renderer_metal/mtl_device.h"
|
||||||
|
|
||||||
namespace Metal {
|
namespace Metal {
|
||||||
|
@ -80,7 +81,10 @@ void BufferCacheRuntime::Finish() {}
|
||||||
void BufferCacheRuntime::CopyBuffer(MTL::Buffer* dst_buffer, MTL::Buffer* src_buffer,
|
void BufferCacheRuntime::CopyBuffer(MTL::Buffer* dst_buffer, MTL::Buffer* src_buffer,
|
||||||
std::span<const VideoCommon::BufferCopy> copies, bool barrier,
|
std::span<const VideoCommon::BufferCopy> copies, bool barrier,
|
||||||
bool can_reorder_upload) {
|
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) {
|
void BufferCacheRuntime::ClearBuffer(MTL::Buffer* dest_buffer, u32 offset, size_t size, u32 value) {
|
||||||
|
|
Loading…
Reference in a new issue