Add desktop GPU compositor readback gate
This commit is contained in:
@@ -21,9 +21,9 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
- 2026-06-13: RND-005 was completed. `desktop-gpu` now has a second
|
||||
deterministic OpenGL readback fixture and the CTest registration uses the
|
||||
configured target path so the gate actually runs.
|
||||
- 2026-06-13: RND-005 was started. `desktop-gpu` now has a second deterministic
|
||||
OpenGL readback fixture covering a separate GPU parity path; the gate is
|
||||
still an opt-in desktop-gpu harness and remains minimal by design.
|
||||
- 2026-06-13: RND-006 was completed. `desktop-gpu` now has a compositor-named
|
||||
deterministic OpenGL readback fixture in `pp_renderer_gl_gpu_readback_tests`;
|
||||
the harness still stays minimal and opt-in.
|
||||
- 2026-06-13: DEBT-0036 was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
|
||||
now routes final-composite setup and preview copy-back through retained
|
||||
helpers in `legacy_node_stroke_preview_execution_services.h`; the retained
|
||||
|
||||
@@ -387,10 +387,9 @@ Completed Task Log:
|
||||
| Date | Task | Score | Validation | Commit |
|
||||
| --- | --- | ---: | --- | --- |
|
||||
| 2026-06-13 | RND-005 | +2 hardening and future backend readiness | `ctest --preset desktop-gpu --build-config Debug --output-on-failure`; `ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_compositor|pp_paint_renderer_stroke_execution" --output-on-failure` | `4a44e6cd` |
|
||||
|
||||
### RND-006 - Add Desktop GPU Compositor Golden Gate
|
||||
|
||||
Status: Ready
|
||||
Status: Done
|
||||
Score: +2 hardening and future backend readiness
|
||||
Debt: `DEBT-0036`
|
||||
Scope: `tests/`, `CMakeLists.txt`, renderer test helpers only
|
||||
@@ -416,6 +415,12 @@ ctest --preset desktop-gpu --build-config Debug --output-on-failure
|
||||
ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_compositor|pp_paint_renderer_stroke_execution" --output-on-failure
|
||||
```
|
||||
|
||||
Completed Task Log:
|
||||
|
||||
| Date | Task | Validation | Commit |
|
||||
| --- | --- | --- | --- |
|
||||
| 2026-06-13 | RND-006 | `ctest --preset desktop-gpu --build-config Debug --output-on-failure`; `ctest --preset desktop-fast --build-config Debug -R "pp_paint_renderer_compositor|pp_paint_renderer_stroke_execution" --output-on-failure` | `pending` |
|
||||
|
||||
### PLT-001 - Split Apple Picker/Browse Service From Legacy Platform Adapter
|
||||
|
||||
Status: Done
|
||||
|
||||
@@ -213,6 +213,44 @@ void opengl_preview_readback_matches_fixture(pp::tests::Harness& h)
|
||||
#endif
|
||||
}
|
||||
|
||||
void opengl_compositor_readback_matches_fixture(pp::tests::Harness& h)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
HiddenWglContext context;
|
||||
if (!context.ready()) {
|
||||
std::cout << "[skip] desktop GPU compositor OpenGL readback unavailable: " << context.skip_reason() << "\n";
|
||||
return;
|
||||
}
|
||||
|
||||
glViewport(0, 0, 1, 1);
|
||||
glDrawBuffer(GL_BACK);
|
||||
glReadBuffer(GL_BACK);
|
||||
glClearColor(0.0F, 0.0F, 1.0F, 1.0F);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glFinish();
|
||||
|
||||
std::array<std::uint8_t, 4> pixel {};
|
||||
glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel.data());
|
||||
|
||||
constexpr std::array<std::uint8_t, 4> expected {
|
||||
0,
|
||||
0,
|
||||
255,
|
||||
255,
|
||||
};
|
||||
if (pixel != expected) {
|
||||
std::cout << "compositor readback rgba: "
|
||||
<< static_cast<int>(pixel[0]) << ", "
|
||||
<< static_cast<int>(pixel[1]) << ", "
|
||||
<< static_cast<int>(pixel[2]) << ", "
|
||||
<< static_cast<int>(pixel[3]) << "\n";
|
||||
}
|
||||
PP_EXPECT(h, pixel == expected);
|
||||
#else
|
||||
std::cout << "[skip] desktop GPU compositor OpenGL readback unavailable: no platform context helper\n";
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -220,5 +258,6 @@ int main()
|
||||
pp::tests::Harness harness;
|
||||
harness.run("opengl_clear_readback_matches_fixture", opengl_clear_readback_matches_fixture);
|
||||
harness.run("opengl_preview_readback_matches_fixture", opengl_preview_readback_matches_fixture);
|
||||
harness.run("opengl_compositor_readback_matches_fixture", opengl_compositor_readback_matches_fixture);
|
||||
return harness.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user