Crafter.Graphics/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 578a3c6dc4
fix(window): set the title on Win32 through a Unicode window class, and send only the view's bytes on Wayland
Win32
- SetTitle had a body only for Wayland, so the title passed to Window's
  constructor and every later SetTitle left a Win32 window untitled. It
  converts the title from UTF-8 and hands it to SetWindowTextW.
- The window class is registered with RegisterClassW, the window made
  with CreateWindowExW, and WndProc hands what it does not handle to
  DefWindowProcW. An ANSI class has the text of every message converted
  to the process code page on its way to WndProc, so SetWindowTextW
  alone would not do: under Wine, in CP1252, 日本 in a title came back
  as ??. WM_CHAR, whose handler takes wParam for a UTF-16 code unit, got
  € as its CP1252 byte 0x80 and passed it on as U+0080, and 日 and both
  halves of a surrogate pair as ?.
- Both message pumps use PeekMessageW and DispatchMessageW. PeekMessageA
  converts WM_CHAR to the code page whatever the window's class: on the
  Unicode class, an ANSI pump still turned 日 and the surrogates into ?.

Wayland
- SetTitle handed title.data() to xdg_toplevel_set_title, which reads up
  to a NUL: a view into a longer string sent the whole string, and an
  empty view's null data() made libwayland fail the display with EINVAL.
  It copies the view into a std::string, as SetAppId does.

Tests
- TextWin32: the constructor's title, SetTitle with characters outside
  the code page, with a view into a longer string and with an empty
  title, read back with GetWindowTextW; and é, €, 日 and a surrogate
  pair posted as WM_CHAR and delivered by StartSync's own loop, which
  returns on the WM_CLOSE posted after them, so a StartSync pumping with
  the A functions fails it. The window is disabled, so a real keystroke
  can't reach the check. Without the fix every check but the empty title
  fails. Like PointerWin32, built on Linux it runs under Wine.
- TitleWayland: SetTitle's set_title requests, read off a wl_display
  connected to a socketpair, for a view into a longer string and for an
  empty view. Both checks fail without the fix. No compositor.
- PointerWin32 pumps with the W functions, as StartSync now does.

Docs
- AGENTS.md names TextWin32 beside PointerWin32 as the Win32 tests, says
  what their Wine runs needed (the vulkan-1 import library, -luuid, which
  the link flags lack, #184, and a __libc_single_threaded definition),
  and lists TitleWayland among the tests that need no GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:28:16 +01:00
..
BLASBuildOptions feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
DebugMessengerSeverity feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
DeferredDeletion feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
DeletionQueueThreads feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
DescriptorHeapLayout fix(descriptor-heap): round the buffer region up, align the reserved range for buffers too, and never size a heap at zero 2026-10-31 16:06:44 +01:00
DeviceFeatures feat(device): applications ask for the device features their shaders use 2026-10-31 06:40:02 +01:00
DeviceSelection feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
ExampleShaders fix(rt): split Sponza's combined image sampler into a heap texture and sampler 2026-10-31 08:25:52 +01:00
FeatureRequests feat(device): applications ask for the device features their shaders use 2026-10-31 06:40:02 +01:00
FontAdvanceCache SPDX license update 2026-07-22 18:09:06 +02:00
FontAtlasDirtyRect SPDX license update 2026-07-22 18:09:06 +02:00
FrameLoopSync fix(window): size the swapchain for its present mode, and key frames in flight by frame instead of image 2026-10-31 18:14:18 +01:00
HeapASRead fix(window): size the swapchain for its present mode, and key frames in flight by frame instead of image 2026-10-31 18:14:18 +01:00
HeapDynamicIndexHit fix(window): size the swapchain for its present mode, and key frames in flight by frame instead of image 2026-10-31 18:14:18 +01:00
HeapSlotReuse feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
ImageStagingRelease feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
InputFieldCaretCache SPDX license update 2026-07-22 18:09:06 +02:00
InputFieldHitTest SPDX license update 2026-07-22 18:09:06 +02:00
MemoryTypeFallback SPDX license update 2026-07-22 18:09:06 +02:00
MeshDecompressStagingRelease feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
MeshLifetime feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
MipChainBarrierBatch SPDX license update 2026-07-22 18:09:06 +02:00
MipChainNonSquare feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
MouseScroll SPDX license update 2026-07-22 18:09:06 +02:00
PipelineCacheValidation SPDX license update 2026-07-22 18:09:06 +02:00
PipelineLifetime feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
PointerEnterLeave fix(win32): restore mouse moves, add enter and leave, capture drags, and close and destroy windows cleanly 2026-10-31 03:29:50 +01:00
PointerWin32 fix(window): set the title on Win32 through a Unicode window class, and send only the view's bytes on Wayland 2026-10-31 18:28:16 +01:00
PushConstantRewrite feat(device): applications ask for the device features their shaders use 2026-10-31 06:40:02 +01:00
RTPassPushData fix(window): size the swapchain for its present mode, and key frames in flight by frame instead of image 2026-10-31 18:14:18 +01:00
SetupCmdBufferReuse fix(window): size the swapchain for its present mode, and key frames in flight by frame instead of image 2026-10-31 18:14:18 +01:00
ShapeTextCache SPDX license update 2026-07-22 18:09:06 +02:00
SwapchainBarrierScope feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
SwapchainImageCount fix(window): size the swapchain for its present mode, and key frames in flight by frame instead of image 2026-10-31 18:14:18 +01:00
SwapchainTransferDst fix(window): size the swapchain for its present mode, and key frames in flight by frame instead of image 2026-10-31 18:14:18 +01:00
TextWin32 fix(window): set the title on Win32 through a Unicode window class, and send only the view's bytes on Wayland 2026-10-31 18:28:16 +01:00
TitleWayland fix(window): set the title on Win32 through a Unicode window class, and send only the view's bytes on Wayland 2026-10-31 18:28:16 +01:00
TLASBuildBarrier fix(rt): rebuild TLASes in place, after earlier traces, and queue their handles like a Mesh's 2026-10-31 02:32:48 +01:00
TLASEmptyBuild test(rt): an empty scene's TLAS builds, then grows and shrinks 2026-10-19 03:03:16 +02:00
TLASHighWaterMark fix(rt): rebuild TLASes in place, after earlier traces, and queue their handles like a Mesh's 2026-10-31 02:32:48 +01:00
TLASInstanceDirtyTracking fix(rt): never destroy the static TLASes 2026-10-19 03:03:16 +02:00
TLASLifetime fix(rt): rebuild TLASes in place, after earlier traces, and queue their handles like a Mesh's 2026-10-31 02:32:48 +01:00
UIClipFlag SPDX license update 2026-07-22 18:09:06 +02:00
UIFallbackParity fix(window): size the swapchain for its present mode, and key frames in flight by frame instead of image 2026-10-31 18:14:18 +01:00
UIFusedShader test(ui): the descriptor-set fallback draws the same frame as the heap 2026-10-06 17:28:46 +02:00
UploadInFlight feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
UploadStrategy SPDX license update 2026-07-22 18:09:06 +02:00
VulkanBufferAddress feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
VulkanBufferFlushGate SPDX license update 2026-07-22 18:09:06 +02:00
VulkanBufferRangedFlush SPDX license update 2026-07-22 18:09:06 +02:00
VulkanBufferResizeReuse SPDX license update 2026-07-22 18:09:06 +02:00
VulkanShaderLifetime feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
WindowOptionalGlobals fix(wayland): open windows on compositors without xdg-decoration, viewporter or fractional scale 2026-10-31 09:59:13 +01:00
WindowUpdateClock feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00