diff --git a/docs/modernization/build-inventory.md b/docs/modernization/build-inventory.md index 440b22e..e35901c 100644 --- a/docs/modernization/build-inventory.md +++ b/docs/modernization/build-inventory.md @@ -258,7 +258,8 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p automation and is covered by `pano_cli_simulate_document_export_smoke`. - `pano_cli simulate-document-render` exposes the pure document-to-renderer frame compositor plus renderer texture-upload command stream through JSON - automation and is covered by + automation, including the OpenGL command-plan support counts for that upload + stream, and is covered by `pano_cli_simulate_document_render_smoke`. - `pano_cli save-document-project` writes that pure document export to a PPI file and is covered by `pano_cli_save_document_project_roundtrip_smoke`, diff --git a/docs/modernization/capability-map.md b/docs/modernization/capability-map.md index 64216fd..12c77dd 100644 --- a/docs/modernization/capability-map.md +++ b/docs/modernization/capability-map.md @@ -26,7 +26,7 @@ and validation command. | PNG/JPEG import | `Image`, `Canvas` import paths | `pp_assets`, `pp_document` | Fixture import, malformed file | | PNG/JPEG export | `Canvas`, `Image`, export dialogs | `pp_assets`, `pp_paint_renderer`, `pp_app_core` | Golden output tolerance, export start/target planning tests | | Equirectangular import/export | `Canvas`, shaders, RTT, export dialogs | `pp_paint_renderer`, `pp_app_core` | Tiny cube/equirect golden, app-core file target tests | -| Cube face export | `Canvas` | `pp_paint_renderer` | Pure six-face document frame composite, renderer texture-upload bridge, six-face golden set | +| Cube face export | `Canvas` | `pp_paint_renderer` | Pure six-face document frame composite, renderer texture-upload bridge, OpenGL command-plan coverage, six-face golden set | | Depth export | `Canvas`, grid tools | `pp_paint_renderer` | Float/readback validation | ## Brush And Painting @@ -38,7 +38,7 @@ and validation command. | PPBR import/export | brush panel/dialog | `pp_assets`, `pp_panopainter_ui` | Round-trip fixture | | Stroke sampling | `Stroke`, `Canvas` | `pp_paint` | Property tests for spacing, pressure, jitter | | Dual brush/pattern behavior | `Brush`, shaders | `pp_paint`, `pp_paint_renderer` | Stroke-alpha CPU reference, dual/pattern feedback planning, GPU golden | -| Blend modes | GLSL include files, layer rendering | `pp_paint`, `pp_paint_renderer` | Final RGBA and stroke-alpha CPU reference vectors, pure `pp_document` face and six-face frame compositing plus renderer texture upload, fixed-function/framebuffer-fetch/ping-pong stroke composite planning, live `Canvas`/`NodeCanvas` blend-gate coverage, live canvas stroke/thumbnail/brush-preview destination-copy coverage, and GPU parity | +| Blend modes | GLSL include files, layer rendering | `pp_paint`, `pp_paint_renderer` | Final RGBA and stroke-alpha CPU reference vectors, pure `pp_document` face and six-face frame compositing plus renderer texture upload/OpenGL command-plan coverage, fixed-function/framebuffer-fetch/ping-pong stroke composite planning, live `Canvas`/`NodeCanvas` blend-gate coverage, live canvas stroke/thumbnail/brush-preview destination-copy coverage, and GPU parity | | Erase/flood fill/masks | `Canvas`, modes, shaders | `pp_document`, `pp_paint_renderer` | Edge masks, alpha lock, dirty rects | ## Layers And Animation diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index 39f0ff3..1dc5d6d 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -453,6 +453,11 @@ agent or engineer to remove them without reconstructing context from chat. a pure document frame's six composited faces through the renderer-neutral `IRenderDevice` texture API, and the recording backend/CLI smoke validate six RGBA8 texture uploads plus explicit shader-read transitions. +- 2026-06-05: DEBT-0010/DEBT-0036 were narrowed. `pano_cli + simulate-document-render` now also runs those recorded document upload + commands through `pp_renderer_gl::plan_recorded_render_commands`, proving + the six texture uploads and transitions are accepted by the current OpenGL + command planner while live legacy GL execution remains retained. ## Open Debt @@ -466,7 +471,7 @@ agent or engineer to remove them without reconstructing context from chat. | DEBT-0007 | Open | Modernization | `vcpkg.json` and `windows-msvc-vcpkg-headless` are validated for the headless Windows component matrix, and root CMake now exposes a focused `panopainter_platform_build_vcpkg_ui_core` target for the vcpkg-backed `pp_ui_core`/tinyxml2 boundary, but app targets still use vendored libraries and Android/Apple triplets are not proven | Dependency migration must stay incremental while SDK/patched/vendor dependencies remain in use | `cmake --preset windows-msvc-vcpkg-headless`; `ctest --preset desktop-fast-vcpkg --build-config Debug`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_platform_build_vcpkg_ui_core` | Component targets consume vcpkg packages where reliable and desktop app, Android, and Apple triplets are validated or explicitly documented as permanent vendor exceptions | | DEBT-0008 | Open | Modernization | `windows-msvc-default` and `windows-msvc-vcpkg-headless` explicitly select Visual Studio 18 2026 for local validation, but non-VS2026 CMake executables on PATH may not know that generator | The local machine has VS 2026, but using an older CMake can still default to Ninja or reject the VS 2026 generator | `cmake --preset windows-msvc-default`; `cmake --build --preset windows-msvc-default --config Debug --target PanoPainter`; `ctest --preset desktop-fast --build-config Debug` | The repo automation invokes or locates a CMake executable that supports `Visual Studio 18 2026`, and VS 2026 generator validation is the normal Windows path without manual tool selection | | DEBT-0009 | Open | Modernization | Android root CMake validation currently builds headless targets only, while retained standard/Quest/Focus package CMake paths now have a refreshed CMake 3.10/C++23 baseline outside root CMake; automation queries `sdkmanager`, installs newer or missing SDK Manager NDK/CMake packages, selects the resulting pair before configure, and reports update decisions; root CMake exposes non-default platform-build and retained native package validation targets | Platform app entrypoints still live in legacy Gradle/CMake projects and need Phase 6 alignment | `powershell -ExecutionPolicy Bypass -File scripts\automation\platform-build.ps1 -Presets android-arm64`; `cmake --build --preset android-x64`; `cmake --build --preset android-quest-arm64`; `cmake --build --preset android-focus-arm64`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_platform_build_android_assets`; `powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages standard`; `powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages quest,focus -ConfigureOnly`; `powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -ReadinessOnly -AndroidNativeChecks -PackageKinds android-standard-apk,android-quest-apk,android-focus-apk`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_android_native_package_smoke` | Android standard, Quest, and Focus/Wave package targets consume shared component targets and have package smoke commands | -| DEBT-0010 | Open | Modernization | `pp_document` is a pure layer/frame/document/undo-history model with alpha-lock metadata, snapshot construction, per-layer frame metadata, renderer-free RGBA8 face payload storage, snapshot-embedded face-payload validation, renderer-free alpha8 selection-mask storage, PPI import/export helpers, stroke-script-to-face-payload CLI automation, `pp_paint_renderer` document face/frame compositors, and renderer-neutral six-face texture upload with CLI render automation, but it is not yet wired to legacy `Canvas`, legacy save, or legacy action commands | Keep extraction incremental while preserving app behavior | `ctest --preset desktop-fast --build-config Debug`; `pano_cli create-document --width 64 --height 32 --layers 2`; `pano_cli load-project --path tests\data\projects\minimal-project.ppi`; `pano_cli simulate-document-render --width 64 --height 32`; `pp_document_tests`; `pp_document_ppi_import_tests`; `pp_document_ppi_export_tests`; `pp_paint_renderer_compositor_tests`; `pano_cli_simulate_document_edits_smoke`; `pano_cli_simulate_document_export_smoke`; `pano_cli_simulate_document_render_smoke`; `pano_cli_save_document_project_roundtrip_smoke`; `pano_cli_apply_stroke_script_roundtrip_smoke`; `pano_cli_apply_stroke_script_rejects_tiny_canvas` | Legacy document behavior is represented by `pp_document`/`pp_paint_renderer` tests and the app consumes it through a boundary/facade | +| DEBT-0010 | Open | Modernization | `pp_document` is a pure layer/frame/document/undo-history model with alpha-lock metadata, snapshot construction, per-layer frame metadata, renderer-free RGBA8 face payload storage, snapshot-embedded face-payload validation, renderer-free alpha8 selection-mask storage, PPI import/export helpers, stroke-script-to-face-payload CLI automation, `pp_paint_renderer` document face/frame compositors, renderer-neutral six-face texture upload, and OpenGL command-planner validation through CLI render automation, but it is not yet wired to legacy `Canvas`, legacy save, or legacy action commands | Keep extraction incremental while preserving app behavior | `ctest --preset desktop-fast --build-config Debug`; `pano_cli create-document --width 64 --height 32 --layers 2`; `pano_cli load-project --path tests\data\projects\minimal-project.ppi`; `pano_cli simulate-document-render --width 64 --height 32`; `pp_document_tests`; `pp_document_ppi_import_tests`; `pp_document_ppi_export_tests`; `pp_paint_renderer_compositor_tests`; `pano_cli_simulate_document_edits_smoke`; `pano_cli_simulate_document_export_smoke`; `pano_cli_simulate_document_render_smoke`; `pano_cli_save_document_project_roundtrip_smoke`; `pano_cli_apply_stroke_script_roundtrip_smoke`; `pano_cli_apply_stroke_script_rejects_tiny_canvas` | Legacy document behavior is represented by `pp_document`/`pp_paint_renderer` tests and the app consumes it through a boundary/facade | | DEBT-0011 | Open | Modernization | `package-smoke` validates the Windows CMake app artifact and launch-folder DLL payload, and reports a structured package readiness matrix for Windows AppX, Android standard/Quest/Focus APKs, Apple bundles, Linux app output, and WebGL output; the Windows app smoke passes the configure-time CMake executable so VS 2026 generator validation does not depend on `cmake` from PATH, retained Android package native CMake paths, and retained Linux/WebGL CMake baseline metadata are reachable from package validation and root CMake package-readiness targets, but Windows AppX/APK/Linux/Apple/WebGL package outputs are still `blocked` because root CMake package targets do not exist yet | Platform package targets are not migrated to root CMake yet | `powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -Preset windows-msvc-default -Configuration Debug`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_windows_app_package_smoke`; `powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -ReadinessOnly -AndroidNativeChecks -PackageKinds android-standard-apk,android-quest-apk,android-focus-apk`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_android_native_package_smoke`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_linux_webgl_package_readiness`; `python scripts/dev/check_package_smoke_readiness.py`; `bash -n scripts/automation/package-smoke.sh` | Package-smoke builds and validates Windows AppX, Android APK variants, Linux app, Apple bundles, and WebGL output where local toolchains are present | | DEBT-0012 | Open | Modernization | `pp_ui_core` uses vcpkg tinyxml2 on `windows-msvc-vcpkg-headless`, but retains `pp_vendor_tinyxml2` for default and unproven platform presets | Mobile/AppX/Apple triplets and app packaging still need validation before removing the vendored fallback | `ctest --preset desktop-fast-vcpkg --build-config Debug`; `ctest --preset desktop-fast --build-config Debug`; `powershell -ExecutionPolicy Bypass -File scripts\automation\platform-build.ps1 -Presets android-arm64` | All supported presets consume vcpkg tinyxml2 or document a permanent vendored exception | | DEBT-0013 | Open | Modernization | `pp_assets`, `pp_document`, `pano_cli inspect-project`, `pano_cli load-project`, and `pano_cli save-project` validate the fixed PPI header, thumbnail/body byte layout, generated multi-layer/multi-frame PPI writing with explicit layer opacity/blend/alpha-lock/visibility metadata, per-layer frame durations, metadata-only and targeted dirty-face-payload save/load round-trips, layer/frame index, dirty-face descriptors, dirty-face PNG payload metadata, asset-level RGBA PNG payload decoding, pure document-to-PPI export, CLI document export automation, file-writing document export automation, stroke-script-generated document payload export, and decoded pixel attachment to `pp_document`, but full legacy PPI round-trip parity is not yet extracted | Full PPI save parity requires staged extraction of legacy `Canvas` serialization and image/layer payload handling | `ctest --preset desktop-fast --build-config Debug`; `pp_assets_image_pixels_tests`; `pp_assets_ppi_header_tests`; `pp_document_ppi_import_tests`; `pp_document_ppi_export_tests`; `pano_cli_inspect_project_layout_smoke`; `pano_cli_load_project_metadata_smoke`; `pano_cli_save_project_roundtrip_smoke`; `pano_cli_save_project_payload_roundtrip_smoke`; `pano_cli_simulate_document_export_smoke`; `pano_cli_save_document_project_roundtrip_smoke`; `pano_cli_apply_stroke_script_roundtrip_smoke`; `pano_cli_apply_stroke_script_rejects_tiny_canvas` | Full PPI load/save fixtures cover thumbnails, decoded layer face payloads attached to documents, frames, corrupt payloads, dirty-face payload saving, arbitrary legacy canvas payload/layout combinations, and legacy app round-trip compatibility | diff --git a/docs/modernization/roadmap.md b/docs/modernization/roadmap.md index 9f2d99f..7dd4de1 100644 --- a/docs/modernization/roadmap.md +++ b/docs/modernization/roadmap.md @@ -487,7 +487,8 @@ decodes the generated PPI bytes, reimports them, and emits JSON round-trip metadata. `pano_cli simulate-document-render` exercises the pure document-to-renderer frame compositor and renderer texture-upload bridge, emitting six-face render -and upload-command summaries for headless automation. +summaries, renderer upload-command summaries, and OpenGL command-planner +support counts for headless automation. `pano_cli save-document-project` writes the same pure document export to a PPI file for inspect/load round-trip automation. `pano_cli create-document` can create simple animation documents with explicit @@ -1733,7 +1734,8 @@ Results: round-trip state as JSON. - `pano_cli_simulate_document_render_smoke` passed and reports pure `pp_document` to `pp_paint_renderer` six-face frame compositing and - renderer texture-upload command summaries as JSON. + renderer texture-upload command summaries plus OpenGL command-planner + support counts as JSON. - `pano_cli_simulate_image_import_smoke` passed and reports embedded PNG decode plus `pp_document` face-payload attachment state as JSON. - `pano_cli_inspect_image_rejects_unsupported` passed as an expected failure diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fe6dee3..373647f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2452,7 +2452,7 @@ if(TARGET pano_cli) COMMAND pano_cli simulate-document-render --width 64 --height 32) set_tests_properties(pano_cli_simulate_document_render_smoke PROPERTIES LABELS "document;renderer;integration;desktop-fast" - PASS_REGULAR_EXPRESSION "\"command\":\"simulate-document-render\".*\"source\":\\{\"width\":64,\"height\":32,\"layers\":2,\"frames\":2,\"facePayloads\":2\\}.*\"render\":\\{\"frame\":0,\"width\":64,\"height\":32,\"faces\":6,\"visitedLayers\":2,\"compositedLayerFaces\":1,\"facePayloads\":1.*\\{\"face\":0,\"pixels\":2048,\"payloads\":1,\"nonClearPixels\":1,\"firstNonClear\":\\{\"index\":194,\"x\":2,\"y\":3,\"r\":1,\"g\":0,\"b\":0,\"a\":1\\}\\}.*\\{\"face\":5,\"pixels\":2048,\"payloads\":0,\"nonClearPixels\":0\\}.*\"upload\":\\{\"backend\":\"recording\",\"textures\":6,\"bytes\":49152,\"commands\":12,\"uploadCommands\":6,\"transitionCommands\":6,\"transitions\":6\\}") + PASS_REGULAR_EXPRESSION "\"command\":\"simulate-document-render\".*\"source\":\\{\"width\":64,\"height\":32,\"layers\":2,\"frames\":2,\"facePayloads\":2\\}.*\"render\":\\{\"frame\":0,\"width\":64,\"height\":32,\"faces\":6,\"visitedLayers\":2,\"compositedLayerFaces\":1,\"facePayloads\":1.*\\{\"face\":0,\"pixels\":2048,\"payloads\":1,\"nonClearPixels\":1,\"firstNonClear\":\\{\"index\":194,\"x\":2,\"y\":3,\"r\":1,\"g\":0,\"b\":0,\"a\":1\\}\\}.*\\{\"face\":5,\"pixels\":2048,\"payloads\":0,\"nonClearPixels\":0\\}.*\"upload\":\\{\"backend\":\"recording\",\"textures\":6,\"bytes\":49152,\"commands\":12,\"uploadCommands\":6,\"transitionCommands\":6,\"transitions\":6,\"openGlPlan\":\\{\"available\":true,\"supported\":true,\"commands\":12,\"uploadCommands\":6,\"transitionCommands\":6,\"unsupportedCommands\":0,\"renderPassOrderErrors\":0,\"dependencyErrors\":0\\}") add_test(NAME pano_cli_simulate_image_import_smoke COMMAND pano_cli simulate-image-import --width 64 --height 32) diff --git a/tools/pano_cli/main.cpp b/tools/pano_cli/main.cpp index 3762e03..c23e7f4 100644 --- a/tools/pano_cli/main.cpp +++ b/tools/pano_cli/main.cpp @@ -10684,9 +10684,13 @@ int simulate_document_render(int argc, char** argv) const auto& document = document_result.value(); const auto& uploaded_value = uploaded.value(); const auto& result = uploaded_value.composite; + const auto commands = render_device.commands(); +#ifdef PP_PANO_CLI_ENABLE_OPENGL_PLAN + const auto open_gl_plan = pp::renderer::gl::plan_recorded_render_commands(commands); +#endif std::size_t upload_command_count = 0; std::size_t transition_command_count = 0; - for (const auto& command : render_device.commands()) { + for (const auto& command : commands) { if (command.kind == pp::renderer::RecordedRenderCommandKind::upload_texture) { ++upload_command_count; } @@ -10746,10 +10750,23 @@ int simulate_document_render(int argc, char** argv) std::cout << "],\"upload\":{\"backend\":\"" << render_device.backend_name() << "\",\"textures\":" << uploaded_value.texture_count << ",\"bytes\":" << uploaded_value.uploaded_bytes - << ",\"commands\":" << render_device.commands().size() + << ",\"commands\":" << commands.size() << ",\"uploadCommands\":" << upload_command_count << ",\"transitionCommands\":" << transition_command_count << ",\"transitions\":" << uploaded_value.transition_count +#ifdef PP_PANO_CLI_ENABLE_OPENGL_PLAN + << ",\"openGlPlan\":{\"available\":true" + << ",\"supported\":" << json_bool(open_gl_plan.supported) + << ",\"commands\":" << open_gl_plan.commands.size() + << ",\"uploadCommands\":" << open_gl_plan.upload_command_count + << ",\"transitionCommands\":" << open_gl_plan.transition_command_count + << ",\"unsupportedCommands\":" << open_gl_plan.unsupported_command_count + << ",\"renderPassOrderErrors\":" << open_gl_plan.render_pass_order_error_count + << ",\"dependencyErrors\":" << open_gl_plan.dependency_error_count + << "}" +#else + << ",\"openGlPlan\":{\"available\":false}" +#endif << "}}}\n"; return 0; }