Crafter.Graphics/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 670df31cc6
fix(wayland): open windows on compositors without xdg-decoration, viewporter or fractional scale
Window
- The constructor made a fractional scale, a toplevel decoration and a
  viewport from Device::fractionalScaleManager, Device::manager and
  Device::wpViewporter without looking at them. Device::handle_global
  binds those globals only when the compositor advertises them, and
  Initialize requires only wl_shm, wl_compositor and xdg_wm_base, so on a
  compositor without one of the three (GNOME's Mutter has no
  xdg-decoration) the constructor handed libwayland a null proxy and
  crashed before the window existed (#162). Each object is now made only
  when its global is there, which Resize and the destructor already
  assumed.
- The fractional scale needs the viewporter too: the preferred scale is
  applied through the viewport, which shows the buffer's physical pixels at
  width/scale x height/scale. A surface without a viewport is as large as
  its buffer, so there the scale stays 1, which keeps pointer and touch
  positions, configure sizes and the text-input caret, all converted by
  it, in physical pixels; the compositor scales the window up on a HiDPI
  output. A scale that changes after the constructor is still applied only
  by the next resize, which is #165.
- Without xdg-decoration the window has no title bar, since the library
  draws no client-side decorations.

Device
- The optional globals say they are optional, and that a request on a
  null proxy crashes.

Tests
- WindowOptionalGlobals: hides xdg-decoration, wp_viewporter and
  wp_fractional_scale_v1 from the Window one at a time and all at once,
  by nulling the Device statics after Initialize, and renders, resizes
  and closes a window each time without a protocol error. Before the fix
  it crashed on the window without xdg-decoration. A global the compositor
  does not offer is reported as a SKIP line, since the path that uses it
  goes untested there.

README
- Which Wayland protocols the window needs, and what it does without the
  optional ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:59:13 +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
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 SPDX license update 2026-07-22 18:09:06 +02:00
HeapASRead feat(device): applications ask for the device features their shaders use 2026-10-31 06:40:02 +01:00
HeapDynamicIndexHit feat(device): applications ask for the device features their shaders use 2026-10-31 06:40:02 +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(win32): restore mouse moves, add enter and leave, capture drags, and close and destroy windows cleanly 2026-10-31 03:29:50 +01:00
PushConstantRewrite feat(device): applications ask for the device features their shaders use 2026-10-31 06:40:02 +01:00
RTPassPushData feat(device): applications ask for the device features their shaders use 2026-10-31 06:40:02 +01:00
SetupCmdBufferReuse SPDX license update 2026-07-22 18:09:06 +02: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
SwapchainTransferDst 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
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 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
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