From 7ef0d4c4d471e63c39de058a0841a3358cbd7928 Mon Sep 17 00:00:00 2001 From: Mehran Date: Tue, 6 Oct 2026 11:47:32 +0300 Subject: [PATCH] perf(agc): fill the device proc table before objects copy the context --- .../libSceAgcDriver/Execution/src/VulkanDevice.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp b/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp index 5cadb337f..ff82968bd 100644 --- a/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp +++ b/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp @@ -996,6 +996,11 @@ VulkanDevice::VulkanDevice(const PresentationWindow* window) : state(std::make_u poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; poolInfo.queueFamilyIndex = family; check(state->DeviceFunction("vkCreateCommandPool")(state->device, &poolInfo, nullptr, &state->pool), "vkCreateCommandPool"); + static const bool procTable = std::getenv("APS5_NO_PROC_TABLE") == nullptr; + if (procTable) { + Graphics::FillDeviceFunctions(graphicsContext(), state->deviceFunctions); + state->functionsReady = true; + } Graphics::PrepareImportWatch(graphicsContext()); state->bufferPool = std::make_shared(graphicsContext()); state->emptyBuffer = std::make_unique(graphicsContext(), Graphics::EmptyBufferBytes, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT); @@ -1007,14 +1012,6 @@ VulkanDevice::VulkanDevice(const PresentationWindow* window) : state(std::make_u state->samplerCache = std::make_unique(); state->recorder = std::make_unique(graphicsContext(), state->timelineSemaphores); state->recorder->Activate(); - // The entry points every record site uses, resolved once (APS5_NO_PROC_TABLE=1: per call, as - // before), and the context copy graphicsContext() hands out from here on: built after the - // recorder and the descriptor cache exist, so it carries them. - static const bool procTable = std::getenv("APS5_NO_PROC_TABLE") == nullptr; - if (procTable) { - Graphics::FillDeviceFunctions(graphicsContext(), state->deviceFunctions); - state->functionsReady = true; - } state->context = buildContext(); state->contextReady = true; if (window != nullptr) {