Crafter.Graphics/implementations
catbot cac433ee09 fix(vulkan): clear startup validation errors on native triangle
Two Vulkan validation errors fired on startup of every native (Vulkan)
example, reported in #5:

1. vkCreateDevice enabledLayerCount != 0. Device layers are deprecated
   and ignored since Vulkan 1.0; passing them is a spec violation
   (VUID-VkDeviceCreateInfo-enabledLayerCount-12384). The device-layer
   enumeration/match block in Device::Initialize is removed and
   enabledLayerCount is pinned to 0 — layers are enabled at the instance
   only.

2. vkQueueSubmit layout transition on a presentable image that "has not
   been acquired". StartInit() and RecreateSwapchainAndImages() eagerly
   transitioned every swapchain image UNDEFINED -> PRESENT_SRC_KHR before
   any vkAcquireNextImageKHR, which the spec forbids (a presentable image
   may only be touched after acquire). Those pre-transitions are removed.
   Each image's first layout transition now happens lazily in Render(),
   after acquire, from UNDEFINED; subsequent frames transition from
   PRESENT_SRC_KHR. A per-image `imageInitialised` flag (reset in
   CreateSwapchain) selects the correct oldLayout.

Verified under sway (headless, GPU renderer) + VK_LAYER_KHRONOS_validation:
the original code reproduces both errors on HelloUI; the fixed build emits
zero validation messages across initial render and swapchain recreation.

Resolves #5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 20:59:10 +00:00
..
Crafter.Graphics-Clipboard.cpp clipboard 2026-05-19 00:45:22 +02:00
Crafter.Graphics-ComputeShader.cpp UI rewrite 3rd attempt 2026-05-02 21:08:20 +02:00
Crafter.Graphics-Device.cpp fix(vulkan): clear startup validation errors on native triangle 2026-05-31 20:59:10 +00:00
Crafter.Graphics-Dom.cpp browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-Font.cpp new UI system 2026-05-01 23:35:37 +02:00
Crafter.Graphics-FontAtlas.cpp webgpu support 2026-05-18 04:58:52 +02:00
Crafter.Graphics-Gamepad.cpp browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-Input.cpp new input system 2026-05-12 00:24:48 +02:00
Crafter.Graphics-InputField.cpp new input system 2026-05-12 00:24:48 +02:00
Crafter.Graphics-Mesh-WebGPU.cpp webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-Mesh.cpp new input system 2026-05-12 00:24:48 +02:00
Crafter.Graphics-PipelineRTWebGPU.cpp WebGPU RT: wavefront tracer core (GENERATE/PREP/TRACE/SHADE/RESOLVE) 2026-05-31 16:24:41 +00:00
Crafter.Graphics-RenderingElement3D-WebGPU.cpp webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-RenderingElement3D.cpp update 2026-05-05 23:49:29 +02:00
Crafter.Graphics-Router.cpp browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-ShaderBindingTableWebGPU.cpp webgpu triangle 2026-05-18 18:43:30 +02:00
Crafter.Graphics-UI-Shared.cpp webgpu support 2026-05-18 04:58:52 +02:00
Crafter.Graphics-UI-WebGPU.cpp webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-UI.cpp custom shader webgpu 2026-05-18 05:39:17 +02:00
Crafter.Graphics-UIComponents.cpp update 2026-05-03 02:45:38 +02:00
Crafter.Graphics-WebGPUComputeShader.cpp webgpu triangle 2026-05-18 18:43:30 +02:00
Crafter.Graphics-Window.cpp fix(vulkan): clear startup validation errors on native triangle 2026-05-31 20:59:10 +00:00