Extract main stroke live-pass orchestration
This commit is contained in:
@@ -1437,6 +1437,31 @@ void retained_stroke_main_pass_frame_callbacks_preserve_order(pp::tests::Harness
|
||||
PP_EXPECT(h, events == expected_events);
|
||||
}
|
||||
|
||||
void retained_stroke_main_pass_execution_preserves_bind_and_unbind_order(pp::tests::Harness& h)
|
||||
{
|
||||
std::vector<std::string> events;
|
||||
|
||||
const auto ok = pp::panopainter::execute_legacy_canvas_stroke_main_pass(
|
||||
pp::panopainter::LegacyCanvasStrokeMainPassExecutionRequest {
|
||||
.context = "test",
|
||||
.bind_samplers = [&] { events.emplace_back("bind-samplers"); },
|
||||
.bind_textures = [&] { events.emplace_back("bind-textures"); },
|
||||
.execute_frame_pass = [&] { events.emplace_back("execute"); },
|
||||
.unbind_textures = [&] { events.emplace_back("unbind-textures"); },
|
||||
.unbind_samplers = [&] { events.emplace_back("unbind-samplers"); },
|
||||
});
|
||||
|
||||
const std::vector<std::string> expected_events {
|
||||
"bind-samplers",
|
||||
"bind-textures",
|
||||
"execute",
|
||||
"unbind-textures",
|
||||
"unbind-samplers",
|
||||
};
|
||||
PP_EXPECT(h, ok);
|
||||
PP_EXPECT(h, events == expected_events);
|
||||
}
|
||||
|
||||
void retained_stroke_pad_face_callbacks_preserve_order(pp::tests::Harness& h)
|
||||
{
|
||||
const std::array<bool, 3> dirty_faces { true, false, true };
|
||||
@@ -1781,6 +1806,9 @@ int main()
|
||||
harness.run(
|
||||
"retained_stroke_main_pass_frame_callbacks_preserve_order",
|
||||
retained_stroke_main_pass_frame_callbacks_preserve_order);
|
||||
harness.run(
|
||||
"retained_stroke_main_pass_execution_preserves_bind_and_unbind_order",
|
||||
retained_stroke_main_pass_execution_preserves_bind_and_unbind_order);
|
||||
harness.run(
|
||||
"retained_stroke_live_pass_sampler_dispatch_helper_builds_expected_callback_wiring",
|
||||
retained_stroke_live_pass_sampler_dispatch_helper_builds_expected_callback_wiring);
|
||||
|
||||
Reference in New Issue
Block a user