diff --git a/src/steam/engine/render-drive.cpp b/src/steam/engine/render-drive.cpp index 146c9b7c5..cf5d3df2c 100644 --- a/src/steam/engine/render-drive.cpp +++ b/src/steam/engine/render-drive.cpp @@ -96,6 +96,7 @@ namespace engine { void RenderDrive::performJobPlanningChunk(FrameCnt nextStartFrame) { + TimeAnchor refPoint(getTimings(), nextStartFrame); UNIMPLEMENTED ("the actual meat: advance the render process"); } diff --git a/tests/core/steam/engine/dispatcher-mock.hpp b/tests/core/steam/engine/dispatcher-mock.hpp new file mode 100644 index 000000000..15dbf0cde --- /dev/null +++ b/tests/core/steam/engine/dispatcher-mock.hpp @@ -0,0 +1,147 @@ +/* + DISPATCHER-MOCK.hpp - test scaffolding to verify render job planning and dispatch + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +/** @file testframe.hpp + ** Unit test helper to generate fake test data frames + */ + + +#ifndef STEAM_ENGINE_TEST_DISPATCHER_MOCK_H +#define STEAM_ENGINE_TEST_DISPATCHER_MOCK_H + + +////#include "steam/engine/procnode.hpp" +//#include "steam/play/dummy-play-connection.hpp" +#include "steam/mobject/model-port.hpp" +#include "steam/engine/dispatcher.hpp" +//#include "steam/play/timings.hpp" +//#include "lib/time/timevalue.hpp" +////#include "lib/time/timequant.hpp" +////#include "lib/format-cout.hpp" +#include "lib/depend.hpp" +//#include "lib/itertools.hpp" +//#include "lib/util-coll.hpp" +#include "lib/test/test-helper.hpp" +//#include "lib/util.hpp" + +//#include +//#include + +//using test::Test; +//using util::isnil; +//using util::last; +//using std::vector; +//using std::function; +//using std::rand; + +//#include +//#include + + +namespace steam { +namespace engine { +namespace test { + +// using lib::time::FrameRate; +// using lib::time::Duration; +// using lib::time::Offset; +// using lib::time::TimeVar; +// using lib::time::Time; +// using mobject::ModelPort; +// using play::Timings; + + namespace { // used internally + +// using play::PlayTestFrames_Strategy; +// using play::ModelPorts; + +// typedef play::DummyPlayConnection DummyPlaybackSetup; + + + class MockDispatcherTable + : public Dispatcher + { + +// DummyPlaybackSetup dummySetup_; + + + /* == mock Dispatcher implementation == */ + + FrameCoord + locateRelative (FrameCoord const&, FrameCnt frameOffset) + { + UNIMPLEMENTED ("dummy implementation of the core dispatch operation"); + } + + bool + isEndOfChunk (FrameCnt, ModelPort port) + { + UNIMPLEMENTED ("determine when to finish a planning chunk"); + } + + JobTicket& + accessJobTicket (ModelPort, TimeValue nominalTime) + { + UNIMPLEMENTED ("dummy implementation of the model backbone / segmentation"); + } + + public: + + ModelPort + provideMockModelPort() + { +// ModelPorts mockModelPorts = dummySetup_.provide_testModelPorts(); +// return *mockModelPorts; // using just the first dummy port + } + }; + + lib::Depend mockDispatcher; + + }//(End)internal test helpers.... + +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880 +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #890 + + /** + * Mock for... + * + * @see JobPlanningsetup_test + * @see DispatcherInterface_test + * + */ + class MockJobTicket + { + + public: + ~MockJobTicket(); + + private: + }; + + + + /** */ + + + +}}} // namespace steam::engine::test +#endif /*STEAM_ENGINE_TEST_DISPATCHER_MOCK_H*/ diff --git a/tests/core/steam/engine/job-planning-setup-test.cpp b/tests/core/steam/engine/job-planning-setup-test.cpp new file mode 100644 index 000000000..a5a927af7 --- /dev/null +++ b/tests/core/steam/engine/job-planning-setup-test.cpp @@ -0,0 +1,135 @@ +/* + JobPlanningSetup(Test) - structure and setup of the job-planning pipeline + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +/** @file job-planning-setup-test.cpp + ** unit test \ref CalcStream_test + */ + + +#include "lib/test/run.hpp" +#include "lib/error.hpp" +#include "steam/engine/dispatcher-mock.hpp" + +//#include "steam/engine/job-planning.hpp" + +//#include + +using test::Test; +//using std::rand; + + +namespace steam { +namespace engine{ +namespace test { + + namespace { // test fixture... + + } // (End) test fixture + + + + /****************************************************************************//** + * @test demonstrate interface, structure and setup of the job-planning pipeline. + * - using a frame step as base tick + * - invoke the dispatcher to retrieve the top-level JobTicket + * - expander function to explore prerequisite JobTickets + * - integration: generate a complete sequence of (dummy)Jobs + * - scaffolding and mocking used for this test + * + * @todo WIP-WIP-WIP 4/2023 + * + * @see DispatcherInterface_test + * @see Dispatcher + * @see CalcStream + * @see RenderDriveS + */ + class JobPlanningSetup_test : public Test + { + + virtual void + run (Arg) + { + UNIMPLEMENTED ("shape the interface of the job-planning pipeline"); + demonstrateScaffolding(); + buildBaseTickGenerator(); + accessTopLevelJobTicket(); + exploreJobTickets(); + integration(); + } + + + /** @test document and verify the mock setup used for this test */ + void + demonstrateScaffolding() + { + UNIMPLEMENTED ("how to mock and fake"); + /////////////////////////////////////////////////////////////////////////////TODO: extract from DispatcherInterface_test + /////////////////////////////////////////////////////////////////////////////TODO: design a job-ticket-mock + /////////////////////////////////////////////////////////////////////////////TODO: create a scheme for mock-jobs + } + + + /** @test use the Dispatcher interface (mocked) to generate a frame »beat« + * @remark this is the foundation to generate top-level frame render jobs + */ + void + buildBaseTickGenerator() + { + UNIMPLEMENTED ("foundation of state core"); + } + + + /** @test use the base tick to access the corresponding JobTicket + * through the Dispatcher interface (mocked here). + */ + void + accessTopLevelJobTicket() + { + UNIMPLEMENTED ("transform into job ticket access"); + } + + + /** @test build and verify the exploration function to discover job prerequisites */ + void + exploreJobTickets() + { + UNIMPLEMENTED ("exploration function"); + } + + + /** @test Job-planning pipeline integration test + * @remark generating dummy jobs for verification + */ + void + integration() + { + UNIMPLEMENTED ("integration incl. generation of dummy jobs"); + } + }; + + + /** Register this test class... */ + LAUNCHER (JobPlanningSetup_test, "unit engine"); + + + +}}} // namespace steam::engine::test diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 63fa3a540..f75acc161 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -69535,6 +69535,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -69589,6 +69656,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ den Channel-Parameter kann man leichter wegfallen lassen, als ihn nachträglich durchzufädeln; die Entscheidung selber wird erst relevant, wenn wir das low-Level-Model konkretisieren +

+ +
+ +
+
+
+
+
+
+ + +