Merge pull request #14407 from shaquib01/perf/agc-large-host-import

chore(agc): add window attachment timing markers
This commit is contained in:
Adrià authored and GitHub committed 2026-11-06 19:50:00 +01:00
commit b5cc94b1b2
1 file changed
+4
@@ -66,13 +66,17 @@ void Driver::AttachWindow(const PresentationWindow& window) {
CheckFailure();
std::unique_lock replacing(deviceReplacement);
GuestMemory::TagGpuLockSite(GuestMemory::GpuLockSite::Present);
PerformanceTimer timing("Driver.AttachWindow");
std::lock_guard lock(GuestMemory::GpuMutex());
timing.Mark("gpu_mutex_wait");
if (device) {
require(device->Window() == nullptr, "a window is already attached to the device");
device->PrepareForReplacement();
replacedDevices.push_back(device);
timing.Mark("device_replacement");
}
device = std::make_shared<VulkanDevice>(&window);
timing.Mark("vulkan_device_create");
}
void Driver::Present(const PresentationWindow& window, const DisplayBuffer* buffer, const DisplayBuffer* plane, bool opaque, void (*gpuReady)(void*), void* context) {