mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 23:55:08 +01:00
Mark GPU resources as dirty before GPU usage
We didn't call `MarkGpuDirty` on textures/buffers prior to GPU usage, this would cause them to not be R/W protected when they should be and provide outdated copies if there were any read accesses from the CPU (which are not possible at the moment since we assume all accesses are writes at the moment). This has now been fixed by calling it after synchronizing the resource.
This commit is contained in:
parent
41a6afed01
commit
a1c06e0401
@ -142,11 +142,14 @@ namespace skyline::gpu::interconnect {
|
||||
.flags = vk::CommandBufferUsageFlagBits::eOneTimeSubmit,
|
||||
});
|
||||
|
||||
for (auto texture : syncTextures)
|
||||
for (auto texture : syncTextures) {
|
||||
texture->SynchronizeHostWithBuffer(commandBuffer, cycle, true);
|
||||
texture->MarkGpuDirty();
|
||||
}
|
||||
|
||||
for (const auto& delegate : syncBuffers) {
|
||||
delegate->buffer->SynchronizeHostWithCycle(cycle, true);
|
||||
delegate->buffer->MarkGpuDirty();
|
||||
delegate->usageCallback = nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user