Native and manual checks / native (ubuntu-24.04) (push) Failing after 31s
Native and manual checks / manual (push) Successful in 29s
Windows editor and software Vulkan / windows-graphics (push) Canceled after 0s
Native and manual checks / native (windows-2025) (push) Canceled after 0s
16 lines
5.4 KiB
Markdown
16 lines
5.4 KiB
Markdown
# P2 visibility on the pinned SwiftShader device — 2026-09-23
|
|
|
|
The first Windows CI run of P2 at `ba3efa8` exposed two related problems. The native CPU-only job ran `gpu_visibility` because its CTest registration lacked the `gpu` label. The graphics job had a Vulkan driver, but every P2 rendering test fell back to Direct. Its pinned SwiftShader device reports `shaderDrawParameters = false`. Slang generated `OpCapability DrawParameters` and a `BaseInstance` input for `SV_InstanceID`, and Faset therefore excluded the device from GPU visibility. The graphics failures in shader reload, Player diagnostics and the HZB overlay followed from that same fallback. The failing runs are [Windows graphics](https://github.com/emil28092005/Faset_Engine/actions/runs/35916372091) and [native/manual checks](https://github.com/emil28092005/Faset_Engine/actions/runs/35916372071).
|
|
|
|
Commit `433bce0` changes both GPU vertex entries to `SV_VulkanInstanceID`, which reads Vulkan's raw `InstanceIndex`. Every fixed-bin indirect command has `firstInstance = 0` and passes its visible-ID range base separately, so indexing is unchanged. The renderer no longer requests `shaderDrawParameters`. A shader reflection regression test rejects `OpCapability DrawParameters` in both compiled vertex entries. The GPU smoke test now carries `gpu;p2` labels: a CPU-only `ctest -LE gpu` excludes it, while P2 runs include it. [Slang's SPIR-V semantics](https://github.com/shader-slang/slang/blob/master/docs/user-guide/a2-01-spirv-target-specific.md#using-sv_instanceid-and-sv_vertexid-with-spir-v-target) explain why `SV_InstanceID` had introduced `BaseInstance`.
|
|
|
|
The matching Linux build of the [pinned SwiftShader source](https://github.com/google/swiftshader/tree/1e80438d2b93ef36a7c05f8d2b81233bac0e3d16) reports the same unsupported feature and sufficient storage-buffer/workgroup limits in the [capability record](local-capabilities.txt). After the change, [both vertex SPIR-V modules](spirv-instance-capabilities.txt) contain only the core `Shader` capability and pass `spirv-val`. [All 16 P2 cases](local-p2-ctest.txt) pass with GPU visibility active on this device. The three previously failing ancillary checks — shader reload, Player diagnostics and HZB overlay — also [pass](local-gpu-contracts.txt). With Vulkan deliberately unavailable, the [26 CPU-only Release tests](local-cpu-without-vulkan.txt) passed and `ctest -LE gpu` excluded `gpu_visibility`.
|
|
|
|
The first green [Windows graphics CI run at `433bce0`](https://github.com/emil28092005/Faset_Engine/actions/runs/35918597688) used the pinned SwiftShader Win32 driver: all 58 registered tests passed, including GPU visibility, shader reload, HZB overlay, Player mode diagnostics and native window/editor tests. Its export integration test built and launched 2D and 3D Release games. The matching [native/manual CI run](https://github.com/emil28092005/Faset_Engine/actions/runs/35918597686) also passed, including Windows CPU-only selection and strict documentation.
|
|
|
|
The Linux SwiftShader ICD in this local build does not expose a Wayland surface, so its window lifecycle and GUI/MCP tests cannot be used as a native-window acceptance result. The Windows graphics workflow checks those paths on its Win32 surface. The Windows runner did not provide the Khronos validation layer; its reported zero validation errors are **not** a validation-layer pass. Software Vulkan establishes compatibility and functional behavior, not frame-time performance or coverage of physical Windows GPUs. The [Linux NVIDIA/Lavapipe dossier](../p2-gpu-visibility-2026-09-23/README.md) keeps the earlier benchmark, exported Player and visual-comparison evidence at its original revision.
|
|
|
|
An independent review of the complete P2 branch found two reporting/identity gaps, fixed in `22012c1`. The renderer now records the effective visibility mode separately from the requested mode; an occlusion request on a device without HZB is reported as GPU frustum, and missing GPU culling is reported as Direct. A CPU policy test covers both capability fallbacks. The stable slot and full 64-bit generation from `InstanceTracker` now travel in each GPU instance record; compact candidate/visible indices remain frame-local buffer addresses. A focused test covers reorder, mesh replacement, anonymous records and upper generation bits. The reviewer confirmed both fixes. At `22012c1`, full Linux Debug and Release CTest each reported 57 registered tests, zero failures and one existing native-window skip; the ImGui overlay test passed 1/1; pinned Linux SwiftShader passed P2 16/16 and Player diagnostics 1/1; a driverless CPU-only Release selection passed 26/26.
|
|
|
|
The final [Windows graphics CI run at `22012c1`](https://github.com/emil28092005/Faset_Engine/actions/runs/35922643226) passed all 58 registered tests with no skips on pinned SwiftShader. Its export integration test and the separate [playable-export report](windows-playable-report.json), retained from that run's artifact, record both checked-in 2D/3D Release games after Unicode-path relocation and 120 headless frames each with captured image hashes. Those exported games used the default Direct mode; P2 GPU-mode Player execution was exercised by Windows CTest and by relocated Linux exports, not by this Windows export script. The [native/manual CI run at `22012c1`](https://github.com/emil28092005/Faset_Engine/actions/runs/35922643004) passed on Linux and Windows, including the Windows CPU-only selection and strict documentation build.
|