forked from ShuriZma/suyu
metal: implement buffer to buffer copy
This commit is contained in:
parent
3fa495840a
commit
40eca20e12
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue