diag #387: permanent evidence lines on the resize chain (event, swapchain recreate, resolution apply)
Three rare-event log lines so any future resize report is diagnosable from the launch log alone: 'window: framebuffer resize event WxH', 'vulkan: swapchain recreated WxH ok=', and 'display: resolution pick WxH (window was WxH)'. An instrumented live run on the Windows AMD box shows the full chain firing for both the programmatic resolution apply and external window resizes, and screen captures at 784x561 vs 1584x861 confirm fixed-pixel UI with a true pixel-count re-render. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
a7ae756b44
commit
11e26c909d
3 changed files with 16 additions and 2 deletions
|
|
@ -1625,7 +1625,12 @@ public sealed class GameWindow :
|
|||
/// previously off the new viewport snap back to default positions.
|
||||
/// </summary>
|
||||
private void OnFramebufferResize(Silk.NET.Maths.Vector2D<int> newSize)
|
||||
=> _framebufferResize.Resize(newSize);
|
||||
{
|
||||
// #387 evidence line (permanent — resize events are rare and this is
|
||||
// the only trace of whether the native event fired at all).
|
||||
Console.WriteLine($"window: framebuffer resize event {newSize.X}x{newSize.Y}");
|
||||
_framebufferResize.Resize(newSize);
|
||||
}
|
||||
|
||||
private void OnClosing() => CompleteShutdown(releaseNativeWindow: false);
|
||||
|
||||
|
|
|
|||
|
|
@ -409,12 +409,17 @@ internal sealed unsafe class VulkanGraphicsContext : IDisposable
|
|||
if (VulkanSwapchainRecreationPolicy.OnFramebufferSize(width, height)
|
||||
== VulkanSwapchainAction.Idle)
|
||||
{
|
||||
// No log here: while minimised this runs at frame rate.
|
||||
return false;
|
||||
}
|
||||
|
||||
VulkanInterop.Check(_vk!.DeviceWaitIdle(_device), "vkDeviceWaitIdle (recreate)");
|
||||
_recreateAtFrameBoundary = false;
|
||||
return _swapchain!.Recreate(_pacing, width, height);
|
||||
bool recreated = _swapchain!.Recreate(_pacing, width, height);
|
||||
// #387 evidence line (permanent): the ONLY trace of the swapchain
|
||||
// extent actually changing after startup.
|
||||
_log($"vulkan: swapchain recreated {width}x{height} ok={recreated}");
|
||||
return recreated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -60,6 +60,10 @@ internal sealed class SilkRuntimeDisplayWindowTarget : IRuntimeDisplayWindowTarg
|
|||
TryParseResolution(display.Resolution, out int width, out int height);
|
||||
if (haveResolution && (_window.Size.X != width || _window.Size.Y != height))
|
||||
{
|
||||
// #387 evidence line (permanent): the resolution-pick write path.
|
||||
Console.WriteLine(
|
||||
$"display: resolution pick {width}x{height} " +
|
||||
$"(window was {_window.Size.X}x{_window.Size.Y})");
|
||||
_window.Size = new Vector2D<int>(width, height);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue