forked from ShuriZma/suyu
1
0
Fork 0

metal: implement buffer to buffer copy

This commit is contained in:
Samuliak 2024-04-08 17:03:25 +02:00
parent 3fa495840a
commit 40eca20e12
No known key found for this signature in database
2 changed files with 7 additions and 6 deletions

View File

@ -81,11 +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) {
// HACK: needs to be commented out, since it interrupts render pass for (const VideoCommon::BufferCopy& copy : copies) {
// for (const VideoCommon::BufferCopy& copy : copies) { command_recorder.GetBlitCommandEncoder()->copyFromBuffer(
// command_recorder.GetBlitCommandEncoder()->copyFromBuffer( src_buffer, copy.src_offset, dst_buffer, copy.dst_offset, copy.size);
// 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) {

View File

@ -59,7 +59,9 @@ void GraphicsPipeline::Configure(bool is_indexed) {
buffer_cache.UpdateGraphicsBuffers(is_indexed); buffer_cache.UpdateGraphicsBuffers(is_indexed);
buffer_cache.BindHostGeometryBuffers(is_indexed); buffer_cache.BindHostGeometryBuffers(is_indexed);
texture_cache.UpdateRenderTargets(true); texture_cache.SynchronizeGraphicsDescriptors();
texture_cache.UpdateRenderTargets(false);
const Framebuffer* const framebuffer = texture_cache.GetFramebuffer(); const Framebuffer* const framebuffer = texture_cache.GetFramebuffer();
if (!framebuffer) { if (!framebuffer) {
return; return;