fix(vulkan,rendering,editor): vkQueueSubmit2, deferred texture upload, async drag-drop - #773
Conversation
|
[2026-09-09 09:07:44.115] [ENGINE] [warning] Pipeline 'Depth-Prepass-Pipeline': 4 unset input(s): DrawDataSB, IndexSB, VertexSB, TransformSB |
|
[2026-09-09 09:15:42.212] [ENGINE] [info] [RRM] Geometry pool: auto-detected 512 MB vtx + 512 MB idx (15% of largest device-local heap) |
a0d0342 to
7152b8a
Compare
f46b411 to
95eb902
Compare
|
another crash on windows [2026-09-09 19:23:38.702] [ENGINE] [info] || |
|
[2026-09-09 20:06:00.966] [ENGINE] [info] Window created, Width = 1500, Height = 800 |
|
[2026-09-09 21:13:34.415] [ENGINE] [info] Fallback texture ready |
|
[2026-09-09 21:17:53.991] [ENGINE] [info] Using "Intel(R) Iris(R) Plus Graphics" with driver: "C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_c7d8ede2ab197971\igvk64.dll" |
|
[2026-09-09 22:41:33.443] [ENGINE] [info] |
|
[2026-09-09 23:27:32.458] [ENGINE] [info] Using "Intel(R) Iris(R) Plus Graphics" with driver: "C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_c7d8ede2ab197971\igvk64.dll" |
…2, uint32 material maps - Halt engine at startup when VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS is detected: fences/semaphores signal before GPU execution completes on Intel HD/UHD Windows — no reliable Vulkan workaround exists. Clear user message directs to driver update or future D3D12 backend. Intel Arc (newer driver) and Linux ANV unaffected. Tracks as issue #775. - Replace uint64_t material map fields with uint32_t in MaterialData (GLSL) and MeshMaterial (C++): removes GL_EXT_shader_explicit_arithmetic_types_int64 / shaderInt64 capability from GBuffer shader — Intel Iris Plus and other drivers that lack shaderInt64 now compile the pipeline successfully. - Migrate all timeline semaphore submits from vkQueueSubmit+VkTimelineSemaphoreSubmitInfo to vkQueueSubmit2+VkSemaphoreSubmitInfo. Enable VkPhysicalDeviceSynchronization2Features. Fix type correctness: stage flag fields use VkPipelineStageFlags2. Remove ASSERT_TIMELINE_MONOTONIC and all 6 call sites. - Deferred texture upload: texture async ops go into 1-frame SPSC deferred queues. Present() runs before SubmitAsyncUploads() so the same-frame GPU stall on drag-drop is eliminated. RequestDeferredDescriptorUpdate writes fallback then real image from the render thread to avoid concurrent vkUpdateDescriptorSets. - Async drag-drop mesh deserialization: DeserializeMeshAssetFile and IngestMaterialFromUUID moved to ThreadPool worker with a dedicated ArenaAllocator (4x file size + 8 MB). Main-thread callback handles IngestMesh + actor create. - Gate batch staging retirement on RenderTimeline (not m_batch_timeline): submit_1 waits for batch before signalling RenderTimeline, guaranteeing GPU completion before staging buffers are freed. Submit batch immediately before Present() so geometry is always ready when render commands execute. - Fix same-session texture bug: AppRenderPipeline::RenderScene used GetAsset<AssetMaterial> which returns null when VFSScanner marks the registry record Stale. Changed to UUIDToMaterialSlot.find() which is always authoritative after IngestMaterial.
95eb902 to
e5283ad
Compare
Summary
vkQueueSubmit2 migration — replace `vkQueueSubmit` + `VkTimelineSemaphoreSubmitInfo` with `vkQueueSubmit2` + `VkSemaphoreSubmitInfo` in all timeline semaphore submit paths. Each semaphore carries its own struct, eliminating the parallel-array count ambiguity that caused Intel Windows driver corruption (UINT64_MAX semaphore value). Enable `VkPhysicalDeviceSynchronization2Features` in `VkDeviceCreateInfo` — the extension was loaded but the feature flag was never set. Fix type correctness: stage flag fields now use `VkPipelineStageFlags2`. Remove `ASSERT_TIMELINE_MONOTONIC` macro and all 6 call sites — root cause fixed at API level.
Deferred texture upload — texture async ops and descriptor updates go into 1-frame SPSC deferred queues. `Present()` runs before `SubmitAsyncUploads()` so the same-frame GPU stall on drag-drop is eliminated. `RequestDeferredDescriptorUpdate` pre-fills the new descriptor slot with the fallback image view for the one-frame upload window, written from the render thread after present to avoid concurrent `vkUpdateDescriptorSets`.
Async drag-drop mesh deserialization — `DeserializeMeshAssetFile` and `IngestMaterialFromUUID` are synchronous file reads that were blocking the render thread on every drag-drop. Both now run on a `ThreadPool` worker with a dedicated per-drop `ArenaAllocator` (4× file size + 8 MB). The main-thread callback handles only the lightweight `IngestMesh` + actor create.
Same-session texture fix — in a same-session cook+drag-drop flow, `GetAsset(uuid)` returned null because the VFSFileWatcher marks the AssetRegistry record Stale after the importer sets it Loaded. Material index lookup now uses `UUIDToMaterialSlot.find(uuid)` directly — the raw slot set by `IngestMaterial`, never touched by the scanner.
Result
Stable 121 fps through mesh drag-drop with correct textures, both in fresh sessions and same-session cook+ingest flows.
Test plan