|
33 | 33 | #include <user/config.h> |
34 | 34 | #include <sdl_listener.h> |
35 | 35 | #include <xxHashMap.h> |
| 36 | +#include <os/logger.h> |
36 | 37 | #include <os/process.h> |
37 | 38 |
|
38 | 39 | #if defined(ASYNC_PSO_DEBUG) || defined(PSO_CACHING) |
@@ -1969,6 +1970,19 @@ bool Video::CreateHostDevice(const char *sdlVideoDriver, bool graphicsApiRetry) |
1969 | 1970 | g_swapChain->setVsyncEnabled(Config::VSync); |
1970 | 1971 | g_swapChainValid = !g_swapChain->needsResize(); |
1971 | 1972 |
|
| 1973 | +#ifdef UNLEASHED_RECOMP_IOS |
| 1974 | + LOGFN("Created iOS swapchain: buffers={} maxFrameLatency={} valid={} size={}x{} viewport={}x{} window={}x{}", |
| 1975 | + bufferCount, |
| 1976 | + Config::MaxFrameLatency.Value, |
| 1977 | + g_swapChainValid, |
| 1978 | + g_swapChain->getWidth(), |
| 1979 | + g_swapChain->getHeight(), |
| 1980 | + Video::s_viewportWidth, |
| 1981 | + Video::s_viewportHeight, |
| 1982 | + GameWindow::s_width, |
| 1983 | + GameWindow::s_height); |
| 1984 | +#endif |
| 1985 | + |
1972 | 1986 | for (auto& acquireSemaphore : g_acquireSemaphores) |
1973 | 1987 | acquireSemaphore = g_device->createCommandSemaphore(); |
1974 | 1988 |
|
@@ -2184,6 +2198,10 @@ void Video::WaitForGPU() |
2184 | 2198 |
|
2185 | 2199 | static uint32_t CreateDevice(uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4, uint32_t a5, be<uint32_t>* a6) |
2186 | 2200 | { |
| 2201 | +#ifdef UNLEASHED_RECOMP_IOS |
| 2202 | + LOGFN("Guest CreateDevice called: a1=0x{:08X} a2=0x{:08X} a3=0x{:08X} a4=0x{:08X} a5=0x{:08X}", a1, a2, a3, a4, a5); |
| 2203 | +#endif |
| 2204 | + |
2187 | 2205 | g_xdbfTextureCache = std::unordered_map<uint16_t, GuestTexture *>(); |
2188 | 2206 |
|
2189 | 2207 | for (auto &achievement : g_xdbfWrapper.GetAchievements(XDBF_LANGUAGE_ENGLISH)) |
@@ -2233,6 +2251,10 @@ static uint32_t CreateDevice(uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4, |
2233 | 2251 |
|
2234 | 2252 | *a6 = g_memory.MapVirtual(device); |
2235 | 2253 |
|
| 2254 | +#ifdef UNLEASHED_RECOMP_IOS |
| 2255 | + LOGFN("Guest CreateDevice finished: device=0x{:08X}", uint32_t(*a6)); |
| 2256 | +#endif |
| 2257 | + |
2236 | 2258 | return 0; |
2237 | 2259 | } |
2238 | 2260 |
|
@@ -2873,6 +2895,15 @@ static std::atomic<bool> g_executedCommandList; |
2873 | 2895 |
|
2874 | 2896 | void Video::Present() |
2875 | 2897 | { |
| 2898 | +#ifdef UNLEASHED_RECOMP_IOS |
| 2899 | + static uint32_t s_presentCount = 0; |
| 2900 | + if (s_presentCount < 5 || (s_presentCount % 300) == 0) |
| 2901 | + { |
| 2902 | + LOGFN("Video::Present count={} swapChainValid={}", s_presentCount, g_swapChainValid); |
| 2903 | + } |
| 2904 | + s_presentCount++; |
| 2905 | +#endif |
| 2906 | + |
2876 | 2907 | g_readyForCommands = false; |
2877 | 2908 |
|
2878 | 2909 | RenderCommand cmd; |
|
0 commit comments