24
24
25
25
#include " ../src/messagey.h"
26
26
27
+ // For layer logging.
28
+ #if __linux__
29
+ #if __x86_64__
30
+ #define WSI_LAYER_INFO " [Gamescope WSI 64-bit] "
31
+ #elif __i386__
32
+ #define WSI_LAYER_INFO " [Gamescope WSI 32-bit] "
33
+ #else
34
+ #define WSI_LAYER_INFO " [Gamescope WSI] "
35
+ #endif
36
+ #else
37
+ #define WSI_LAYER_INFO " [Gamescope WSI] "
38
+ #endif
39
+
27
40
using namespace std ::literals;
28
41
29
42
namespace GamescopeWSILayer {
@@ -150,17 +163,17 @@ namespace GamescopeWSILayer {
150
163
static uint32_t getMinImageCount () {
151
164
static uint32_t s_minImageCount = []() -> uint32_t {
152
165
if (auto minCount = parseEnv<uint32_t >(" GAMESCOPE_WSI_MIN_IMAGE_COUNT" )) {
153
- fprintf (stderr, " [Gamescope WSI] minImageCount overridden by GAMESCOPE_WSI_MIN_IMAGE_COUNT: %u\n " , *minCount);
166
+ fprintf (stderr, WSI_LAYER_INFO " minImageCount overridden by GAMESCOPE_WSI_MIN_IMAGE_COUNT: %u\n " , *minCount);
154
167
return *minCount;
155
168
}
156
169
157
170
if (auto minCount = parseEnv<uint32_t >(" vk_wsi_override_min_image_count" )) {
158
- fprintf (stderr, " [Gamescope WSI] minImageCount overridden by vk_wsi_override_min_image_count: %u\n " , *minCount);
171
+ fprintf (stderr, WSI_LAYER_INFO " minImageCount overridden by vk_wsi_override_min_image_count: %u\n " , *minCount);
159
172
return *minCount;
160
173
}
161
174
162
175
if (auto minCount = parseEnv<uint32_t >(" vk_x11_override_min_image_count" )) {
163
- fprintf (stderr, " [Gamescope WSI] minImageCount overridden by vk_x11_override_min_image_count: %u\n " , *minCount);
176
+ fprintf (stderr, WSI_LAYER_INFO " minImageCount overridden by vk_x11_override_min_image_count: %u\n " , *minCount);
164
177
return *minCount;
165
178
}
166
179
@@ -233,13 +246,13 @@ namespace GamescopeWSILayer {
233
246
{
234
247
const char *mesaExecutableEnv = getenv (" MESA_DRICONF_EXECUTABLE_OVERRIDE" );
235
248
if (mesaExecutableEnv && *mesaExecutableEnv) {
236
- fprintf (stderr, " [Gamescope WSI] Executable name overriden by MESA_DRICONF_EXECUTABLE_OVERRIDE: %s\n " , mesaExecutableEnv);
249
+ fprintf (stderr, WSI_LAYER_INFO " Executable name overriden by MESA_DRICONF_EXECUTABLE_OVERRIDE: %s\n " , mesaExecutableEnv);
237
250
return mesaExecutableEnv;
238
251
}
239
252
240
253
const char *mesaProcessName = getenv (" MESA_PROCESS_NAME" );
241
254
if (mesaProcessName && *mesaProcessName) {
242
- fprintf (stderr, " [Gamescope WSI] Executable name overriden by MESA_PROCESS_NAME: %s\n " , mesaExecutableEnv);
255
+ fprintf (stderr, WSI_LAYER_INFO " Executable name overriden by MESA_PROCESS_NAME: %s\n " , mesaExecutableEnv);
243
256
return mesaProcessName;
244
257
}
245
258
@@ -250,7 +263,7 @@ namespace GamescopeWSILayer {
250
263
free (programNameCStr);
251
264
}
252
265
253
- fprintf (stderr, " [Gamescope WSI] Executable name: %s\n " , name.c_str ());
266
+ fprintf (stderr, WSI_LAYER_INFO " Executable name: %s\n " , name.c_str ());
254
267
return name;
255
268
}();
256
269
@@ -435,15 +448,15 @@ namespace GamescopeWSILayer {
435
448
auto largestObscuringWindowSize = xcb::getLargestObscuringChildWindowSize (connection, window);
436
449
auto toplevelWindow = xcb::getToplevelWindow (connection, window);
437
450
if (!rect || !largestObscuringWindowSize || !toplevelWindow) {
438
- fprintf (stderr, " [Gamescope WSI] canBypassXWayland: failed to get window info for window 0x%x.\n " , window);
451
+ fprintf (stderr, WSI_LAYER_INFO " canBypassXWayland: failed to get window info for window 0x%x.\n " , window);
439
452
return false ;
440
453
}
441
454
442
455
cachedWindowRect = *rect;
443
456
444
457
auto toplevelRect = xcb::getWindowRect (connection, *toplevelWindow);
445
458
if (!toplevelRect) {
446
- fprintf (stderr, " [Gamescope WSI] canBypassXWayland: failed to get window info for window 0x%x.\n " , window);
459
+ fprintf (stderr, WSI_LAYER_INFO " canBypassXWayland: failed to get window info for window 0x%x.\n " , window);
447
460
return false ;
448
461
}
449
462
@@ -459,7 +472,7 @@ namespace GamescopeWSILayer {
459
472
// (There can be dummy composite redirect windows and whatever.)
460
473
if (largestObscuringWindowSize->width > 1 || largestObscuringWindowSize->height > 1 ) {
461
474
#if GAMESCOPE_WSI_BYPASS_DEBUG
462
- fprintf (stderr, " [Gamescope WSI] Largest obscuring window size: %u %u\n " , largestObscuringWindowSize->width , largestObscuringWindowSize->height );
475
+ fprintf (stderr, WSI_LAYER_INFO " Largest obscuring window size: %u %u\n " , largestObscuringWindowSize->width , largestObscuringWindowSize->height );
463
476
#endif
464
477
return false ;
465
478
}
@@ -475,7 +488,7 @@ namespace GamescopeWSILayer {
475
488
iabs (int32_t (toplevelRect->extent .width ) - int32_t (rect->extent .width )) > 2 ||
476
489
iabs (int32_t (toplevelRect->extent .height ) - int32_t (rect->extent .height )) > 2 ) {
477
490
#if GAMESCOPE_WSI_BYPASS_DEBUG
478
- fprintf (stderr, " [Gamescope WSI] Not within 1px margin of error. Offset: %d %d Extent: %u %u vs %u %u\n " ,
491
+ fprintf (stderr, WSI_LAYER_INFO " Not within 1px margin of error. Offset: %d %d Extent: %u %u vs %u %u\n " ,
479
492
rect->offset .x , rect->offset .y ,
480
493
toplevelRect->extent .width , toplevelRect->extent .height ,
481
494
rect->extent .width , rect->extent .height );
@@ -547,7 +560,7 @@ namespace GamescopeWSILayer {
547
560
std::unique_lock lock (*swapchain->presentTimingMutex );
548
561
swapchain->refreshCycle = (uint64_t (refresh_cycle_hi) << 32 ) | refresh_cycle_lo;
549
562
}
550
- fprintf (stderr, " [Gamescope WSI] Swapchain recieved new refresh cycle: %.2fms\n " , swapchain->refreshCycle / 1'000'000.0 );
563
+ fprintf (stderr, WSI_LAYER_INFO " Swapchain recieved new refresh cycle: %.2fms\n " , swapchain->refreshCycle / 1'000'000.0 );
551
564
},
552
565
553
566
.retired = [](
@@ -557,7 +570,7 @@ namespace GamescopeWSILayer {
557
570
{
558
571
swapchain->retired = true ;
559
572
}
560
- fprintf (stderr, " [Gamescope WSI] Swapchain retired\n " );
573
+ fprintf (stderr, WSI_LAYER_INFO " Swapchain retired\n " );
561
574
},
562
575
};
563
576
@@ -596,20 +609,20 @@ namespace GamescopeWSILayer {
596
609
597
610
wl_display *display = wl_display_connect (gamescopeWaylandSocket ());
598
611
if (!display) {
599
- fprintf (stderr, " [Gamescope WSI] Failed to connect to gamescope socket: %s. Bypass layer will be unavailable.\n " , gamescopeWaylandSocket ());
612
+ fprintf (stderr, WSI_LAYER_INFO " Failed to connect to gamescope socket: %s. Bypass layer will be unavailable.\n " , gamescopeWaylandSocket ());
600
613
return result;
601
614
}
602
615
603
616
{
604
617
if (pCreateInfo->pApplicationInfo ) {
605
- fprintf (stderr, " [Gamescope WSI] Application info:\n " );
618
+ fprintf (stderr, WSI_LAYER_INFO " Application info:\n " );
606
619
fprintf (stderr, " pApplicationName: %s\n " , pCreateInfo->pApplicationInfo ->pApplicationName );
607
620
fprintf (stderr, " applicationVersion: %u\n " , pCreateInfo->pApplicationInfo ->applicationVersion );
608
621
fprintf (stderr, " pEngineName: %s\n " , pCreateInfo->pApplicationInfo ->pEngineName );
609
622
fprintf (stderr, " engineVersion: %u\n " , pCreateInfo->pApplicationInfo ->engineVersion );
610
623
fprintf (stderr, " apiVersion: %u\n " , pCreateInfo->pApplicationInfo ->apiVersion );
611
624
} else {
612
- fprintf (stderr, " [Gamescope WSI] No application info given.\n " );
625
+ fprintf (stderr, WSI_LAYER_INFO " No application info given.\n " );
613
626
}
614
627
}
615
628
@@ -663,7 +676,7 @@ namespace GamescopeWSILayer {
663
676
vkroots::ChainPatcher<VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT>
664
677
maintenance1Patcher (&deviceCreateInfo, [&](VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT *pMaintenance1)
665
678
{
666
- fprintf (stderr, " [Gamescope WSI] Forcing on VK_EXT_swapchain_maintenance1.\n " );
679
+ fprintf (stderr, WSI_LAYER_INFO " Forcing on VK_EXT_swapchain_maintenance1.\n " );
667
680
pMaintenance1->swapchainMaintenance1 = VK_TRUE;
668
681
return true ;
669
682
});
@@ -735,7 +748,7 @@ namespace GamescopeWSILayer {
735
748
736
749
GamescopeWaylandObjects waylandObjects = GamescopeWaylandObjects::get (pCreateInfo->display );
737
750
if (!waylandObjects.valid ()) {
738
- fprintf (stderr, " [Gamescope WSI] Failed to get Wayland objects\n " );
751
+ fprintf (stderr, WSI_LAYER_INFO " Failed to get Wayland objects\n " );
739
752
return VK_ERROR_SURFACE_LOST_KHR;
740
753
}
741
754
@@ -975,17 +988,17 @@ namespace GamescopeWSILayer {
975
988
xcb_window_t window,
976
989
const VkAllocationCallbacks* pAllocator,
977
990
VkSurfaceKHR* pSurface) {
978
- fprintf (stderr, " [Gamescope WSI] Creating Gamescope surface: xid: 0x%x\n " , window);
991
+ fprintf (stderr, WSI_LAYER_INFO " Creating Gamescope surface: xid: 0x%x\n " , window);
979
992
980
993
GamescopeWaylandObjects waylandObjects = GamescopeWaylandObjects::get (gamescopeInstance->display );
981
994
if (!waylandObjects.valid ()) {
982
- fprintf (stderr, " [Gamescope WSI] Failed to get Wayland objects\n " );
995
+ fprintf (stderr, WSI_LAYER_INFO " Failed to get Wayland objects\n " );
983
996
return VK_ERROR_SURFACE_LOST_KHR;
984
997
}
985
998
986
999
wl_surface* waylandSurface = wl_compositor_create_surface (waylandObjects.compositor );
987
1000
if (!waylandSurface) {
988
- fprintf (stderr, " [Gamescope WSI] Failed to create wayland surface - xid: 0x%x\n " , window);
1001
+ fprintf (stderr, WSI_LAYER_INFO " Failed to create wayland surface - xid: 0x%x\n " , window);
989
1002
return VK_ERROR_SURFACE_LOST_KHR;
990
1003
}
991
1004
@@ -1009,7 +1022,7 @@ namespace GamescopeWSILayer {
1009
1022
1010
1023
VkResult result = pDispatch->CreateWaylandSurfaceKHR (instance, &waylandCreateInfo, pAllocator, pSurface);
1011
1024
if (result != VK_SUCCESS) {
1012
- fprintf (stderr, " [Gamescope WSI] Failed to create Vulkan wayland surface - vr: %s xid: 0x%x\n " , vkroots::helpers::enumString (result), window);
1025
+ fprintf (stderr, WSI_LAYER_INFO " Failed to create Vulkan wayland surface - vr: %s xid: 0x%x\n " , vkroots::helpers::enumString (result), window);
1013
1026
return result;
1014
1027
}
1015
1028
@@ -1023,11 +1036,11 @@ namespace GamescopeWSILayer {
1023
1036
VkSurfaceKHR fallbackSurface = VK_NULL_HANDLE;
1024
1037
result = pDispatch->CreateXcbSurfaceKHR (instance, &xcbCreateInfo, pAllocator, &fallbackSurface);
1025
1038
if (result != VK_SUCCESS) {
1026
- fprintf (stderr, " [Gamescope WSI] Failed to create Vulkan xcb (fallback) surface - vr: %s xid: 0x%x\n " , vkroots::helpers::enumString (result), window);
1039
+ fprintf (stderr, WSI_LAYER_INFO " Failed to create Vulkan xcb (fallback) surface - vr: %s xid: 0x%x\n " , vkroots::helpers::enumString (result), window);
1027
1040
return result;
1028
1041
}
1029
1042
1030
- fprintf (stderr, " [Gamescope WSI] Made gamescope surface for xid: 0x%x\n " , window);
1043
+ fprintf (stderr, WSI_LAYER_INFO " Made gamescope surface for xid: 0x%x\n " , window);
1031
1044
auto gamescopeSurface = GamescopeSurface::create (*pSurface, GamescopeSurfaceData {
1032
1045
.instance = instance,
1033
1046
.display = gamescopeInstance->display ,
@@ -1046,7 +1059,7 @@ namespace GamescopeWSILayer {
1046
1059
}
1047
1060
1048
1061
static void DumpGamescopeSurfaceState (GamescopeInstance& instance, GamescopeSurface& surface) {
1049
- fprintf (stderr, " [Gamescope WSI] Surface state:\n " );
1062
+ fprintf (stderr, WSI_LAYER_INFO " Surface state:\n " );
1050
1063
fprintf (stderr, " steam app id: %u\n " , instance->appId );
1051
1064
fprintf (stderr, " window xid: 0x%x\n " , surface->window );
1052
1065
fprintf (stderr, " wayland surface res id: %u\n " , wl_proxy_get_id (reinterpret_cast <struct wl_proxy *>(surface->surface )));
@@ -1076,9 +1089,9 @@ namespace GamescopeWSILayer {
1076
1089
gamescope_swapchain_destroy (state->object );
1077
1090
}
1078
1091
GamescopeSwapchain::remove (swapchain);
1079
- fprintf (stderr, " [Gamescope WSI] Destroying swapchain: %p\n " , reinterpret_cast <void *>(swapchain));
1092
+ fprintf (stderr, WSI_LAYER_INFO " Destroying swapchain: %p\n " , reinterpret_cast <void *>(swapchain));
1080
1093
pDispatch->DestroySwapchainKHR (device, swapchain, pAllocator);
1081
- fprintf (stderr, " [Gamescope WSI] Destroyed swapchain: %p\n " , reinterpret_cast <void *>(swapchain));
1094
+ fprintf (stderr, WSI_LAYER_INFO " Destroyed swapchain: %p\n " , reinterpret_cast <void *>(swapchain));
1082
1095
}
1083
1096
1084
1097
static VkResult CreateSwapchainKHR (
@@ -1158,7 +1171,7 @@ namespace GamescopeWSILayer {
1158
1171
minImageCount = std::max (getMinImageCount (), minImageCount);
1159
1172
swapchainInfo.minImageCount = minImageCount;
1160
1173
1161
- fprintf (stderr, " [Gamescope WSI] Creating swapchain for xid: 0x%0x - oldSwapchain: %p - provided minImageCount: %u - minImageCount: %u - format: %s - colorspace: %s - flip: %s\n " ,
1174
+ fprintf (stderr, WSI_LAYER_INFO " Creating swapchain for xid: 0x%0x - oldSwapchain: %p - provided minImageCount: %u - minImageCount: %u - format: %s - colorspace: %s - flip: %s\n " ,
1162
1175
gamescopeSurface->window ,
1163
1176
reinterpret_cast <void *>(pCreateInfo->oldSwapchain ),
1164
1177
pCreateInfo->minImageCount ,
@@ -1183,7 +1196,7 @@ namespace GamescopeWSILayer {
1183
1196
&VkSurfaceFormatKHR::format) ;
1184
1197
1185
1198
if (!supportedSwapchainFormat) {
1186
- fprintf (stderr, " [Gamescope WSI] Refusing to make swapchain (unsupported VkFormat) for xid: 0x%0x - format: %s - colorspace: %s - flip: %s\n " ,
1199
+ fprintf (stderr, WSI_LAYER_INFO " Refusing to make swapchain (unsupported VkFormat) for xid: 0x%0x - format: %s - colorspace: %s - flip: %s\n " ,
1187
1200
gamescopeSurface->window ,
1188
1201
vkroots::helpers::enumString (pCreateInfo->imageFormat ),
1189
1202
vkroots::helpers::enumString (pCreateInfo->imageColorSpace ),
@@ -1197,21 +1210,21 @@ namespace GamescopeWSILayer {
1197
1210
if (!gamescopeSurface->isWayland ()) {
1198
1211
auto oServerId = xcb::getPropertyValue<uint32_t >(gamescopeSurface->connection , " GAMESCOPE_XWAYLAND_SERVER_ID" sv);
1199
1212
if (!oServerId) {
1200
- fprintf (stderr, " [Gamescope WSI] Failed to get Xwayland server id. Failing swapchain creation.\n " );
1213
+ fprintf (stderr, WSI_LAYER_INFO " Failed to get Xwayland server id. Failing swapchain creation.\n " );
1201
1214
return VK_ERROR_SURFACE_LOST_KHR;
1202
1215
}
1203
1216
serverId = *oServerId;
1204
1217
}
1205
1218
1206
1219
auto gamescopeInstance = GamescopeInstance::get (gamescopeSurface->instance );
1207
1220
if (!gamescopeInstance) {
1208
- fprintf (stderr, " [Gamescope WSI] CreateSwapchainKHR: Instance for swapchain was already destroyed. (App use after free).\n " );
1221
+ fprintf (stderr, WSI_LAYER_INFO " CreateSwapchainKHR: Instance for swapchain was already destroyed. (App use after free).\n " );
1209
1222
return VK_ERROR_SURFACE_LOST_KHR;
1210
1223
}
1211
1224
1212
1225
VkResult result = pDispatch->CreateSwapchainKHR (device, &swapchainInfo, pAllocator, pSwapchain);
1213
1226
if (result != VK_SUCCESS) {
1214
- fprintf (stderr, " [Gamescope WSI] Failed to create swapchain - vr: %s xid: 0x%x\n " , vkroots::helpers::enumString (result), gamescopeSurface->window );
1227
+ fprintf (stderr, WSI_LAYER_INFO " Failed to create swapchain - vr: %s xid: 0x%x\n " , vkroots::helpers::enumString (result), gamescopeSurface->window );
1215
1228
return result;
1216
1229
}
1217
1230
@@ -1239,7 +1252,7 @@ namespace GamescopeWSILayer {
1239
1252
uint32_t imageCount = 0 ;
1240
1253
pDispatch->GetSwapchainImagesKHR (device, *pSwapchain, &imageCount, nullptr );
1241
1254
1242
- fprintf (stderr, " [Gamescope WSI] Created swapchain for xid: 0x%0x swapchain: %p - imageCount: %u\n " ,
1255
+ fprintf (stderr, WSI_LAYER_INFO " Created swapchain for xid: 0x%0x swapchain: %p - imageCount: %u\n " ,
1243
1256
gamescopeSurface->window ,
1244
1257
reinterpret_cast <void *>(*pSwapchain),
1245
1258
imageCount);
@@ -1310,7 +1323,7 @@ namespace GamescopeWSILayer {
1310
1323
assert (pPresentTimes->swapchainCount == presentInfo.swapchainCount );
1311
1324
1312
1325
#if GAMESCOPE_WSI_DISPLAY_TIMING_DEBUG
1313
- fprintf (stderr, " [Gamescope WSI] QueuePresentKHR: presentID: %u - desiredPresentTime: %lu - now: %lu\n " , pPresentTimes->pTimes [i].presentID , pPresentTimes->pTimes [i].desiredPresentTime , getTimeMonotonic ());
1326
+ fprintf (stderr, WSI_LAYER_INFO " QueuePresentKHR: presentID: %u - desiredPresentTime: %lu - now: %lu\n " , pPresentTimes->pTimes [i].presentID , pPresentTimes->pTimes [i].desiredPresentTime , getTimeMonotonic ());
1314
1327
#endif
1315
1328
gamescope_swapchain_set_present_time (
1316
1329
gamescopeSwapchain->object ,
@@ -1408,13 +1421,13 @@ namespace GamescopeWSILayer {
1408
1421
// exposed as supported in order for them to handle presentation latency like they
1409
1422
// would as in FIFO mode.
1410
1423
if (frameLimiterAware && gamescopeSwapchain->forceFifo != forceFifo) {
1411
- fprintf (stderr, " [Gamescope WSI] Forcing swapchain recreation as frame limiter changed, and we want the app to know the exposed modes changed.\n " );
1424
+ fprintf (stderr, WSI_LAYER_INFO " Forcing swapchain recreation as frame limiter changed, and we want the app to know the exposed modes changed.\n " );
1412
1425
UpdateSwapchainResult (VK_ERROR_OUT_OF_DATE_KHR);
1413
1426
}
1414
1427
1415
1428
auto gamescopeSurface = GamescopeSurface::get (gamescopeSwapchain->surface );
1416
1429
if (!gamescopeSurface) {
1417
- fprintf (stderr, " [Gamescope WSI] QueuePresentKHR: Surface for swapchain %u was already destroyed. (App use after free).\n " , i);
1430
+ fprintf (stderr, WSI_LAYER_INFO " QueuePresentKHR: Surface for swapchain %u was already destroyed. (App use after free).\n " , i);
1418
1431
abort ();
1419
1432
continue ;
1420
1433
}
@@ -1438,7 +1451,7 @@ namespace GamescopeWSILayer {
1438
1451
if (windowSizeChanged)
1439
1452
UpdateSwapchainResult (VK_ERROR_OUT_OF_DATE_KHR);
1440
1453
} else {
1441
- fprintf (stderr, " [Gamescope WSI] QueuePresentKHR: Failed to get cached window size for swapchain %u\n " , i);
1454
+ fprintf (stderr, WSI_LAYER_INFO " QueuePresentKHR: Failed to get cached window size for swapchain %u\n " , i);
1442
1455
}
1443
1456
}
1444
1457
}
@@ -1456,7 +1469,7 @@ namespace GamescopeWSILayer {
1456
1469
for (uint32_t i = 0 ; i < swapchainCount; i++) {
1457
1470
auto gamescopeSwapchain = GamescopeSwapchain::get (pSwapchains[i]);
1458
1471
if (!gamescopeSwapchain) {
1459
- fprintf (stderr, " [Gamescope WSI] SetHdrMetadataEXT: Swapchain %u does not support HDR.\n " , i);
1472
+ fprintf (stderr, WSI_LAYER_INFO " SetHdrMetadataEXT: Swapchain %u does not support HDR.\n " , i);
1460
1473
continue ;
1461
1474
}
1462
1475
@@ -1476,7 +1489,7 @@ namespace GamescopeWSILayer {
1476
1489
nits_to_u16 (metadata.maxContentLightLevel ),
1477
1490
nits_to_u16 (metadata.maxFrameAverageLightLevel ));
1478
1491
1479
- fprintf (stderr, " [Gamescope WSI] VkHdrMetadataEXT: display primaries:\n " );
1492
+ fprintf (stderr, WSI_LAYER_INFO " VkHdrMetadataEXT: display primaries:\n " );
1480
1493
fprintf (stderr, " r: %.4g %.4g\n " , metadata.displayPrimaryRed .x , metadata.displayPrimaryRed .y );
1481
1494
fprintf (stderr, " g: %.4g %.4g\n " , metadata.displayPrimaryGreen .x , metadata.displayPrimaryGreen .y );
1482
1495
fprintf (stderr, " b: %.4g %.4g\n " , metadata.displayPrimaryBlue .x , metadata.displayPrimaryBlue .y );
@@ -1495,7 +1508,7 @@ namespace GamescopeWSILayer {
1495
1508
VkPastPresentationTimingGOOGLE* pPresentationTimings) {
1496
1509
auto gamescopeSwapchain = GamescopeSwapchain::get (swapchain);
1497
1510
if (!gamescopeSwapchain) {
1498
- fprintf (stderr, " [Gamescope WSI] GetPastPresentationTimingGOOGLE: Not a gamescope swapchain.\n " );
1511
+ fprintf (stderr, WSI_LAYER_INFO " GetPastPresentationTimingGOOGLE: Not a gamescope swapchain.\n " );
1499
1512
return VK_ERROR_SURFACE_LOST_KHR;
1500
1513
}
1501
1514
@@ -1522,7 +1535,7 @@ namespace GamescopeWSILayer {
1522
1535
VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
1523
1536
auto gamescopeSwapchain = GamescopeSwapchain::get (swapchain);
1524
1537
if (!gamescopeSwapchain) {
1525
- fprintf (stderr, " [Gamescope WSI] GetRefreshCycleDurationGOOGLE: Not a gamescope swapchain.\n " );
1538
+ fprintf (stderr, WSI_LAYER_INFO " GetRefreshCycleDurationGOOGLE: Not a gamescope swapchain.\n " );
1526
1539
return VK_ERROR_SURFACE_LOST_KHR;
1527
1540
}
1528
1541
0 commit comments