This commit is contained in:
2026-08-27 14:54:06 +08:00
parent ecf24cbe50
commit 63bb406a27
34 changed files with 690 additions and 1296 deletions
+22 -31
View File
@@ -54,7 +54,7 @@ int main() {
power, q_axis, 3u);
auto* spectrum_painted = new std::atomic_bool{};
auto* topology_valid = new std::atomic_bool{true};
spectrum->paint_taskflow().add("test.spectrum.paint.complete", [spectrum_painted] {
spectrum->taskflow().add("test.spectrum.render.complete", [spectrum_painted] {
spectrum_painted->store(true, std::memory_order_release);
});
const auto verify_spectrum_precedes_axis =
@@ -62,9 +62,9 @@ int main() {
if (!spectrum_painted->load(std::memory_order_acquire))
topology_valid->store(false, std::memory_order_relaxed);
};
frequency->paint_taskflow().add("test.frequency.paint.order",
frequency->taskflow().add("test.frequency.render.order",
verify_spectrum_precedes_axis);
power->paint_taskflow().add("test.power.paint.order",
power->taskflow().add("test.power.render.order",
verify_spectrum_precedes_axis);
typename Scene_Object::template Builder<Scene_Object> scene_builder;
@@ -96,7 +96,7 @@ int main() {
Axis_Range{0.0, 100.0});
spectrum->pending_buffer<Spectrum_Frame_Tag>() =
Spectrum_Frame{std::vector<Spectrum_Power>(512, -50.0)};
spectrum->mark_dirty<Prepare_Data_Tag>();
spectrum->mark_dirty<Render_Graph_Tag>();
waterfall->set<&Waterfall::Prop::frequency_range>(
Axis_Range{0.0, 100.0});
waterfall->set<&Waterfall::Prop::power_range>(
@@ -109,14 +109,14 @@ int main() {
waterfall->submit_stream<Waterfall_Stream_Tag>(
std::make_shared<const Waterfall_Row>(Waterfall_Row{
second_tick, std::vector<Plot_Value>(64, -30.0)}));
waterfall->mark_dirty<Prepare_Data_Tag>();
waterfall->mark_dirty<Render_Graph_Tag>();
constellation->set<&Constellation_Diagram::Prop::i_range>(
Axis_Range{-1.0, 1.0});
constellation->set<&Constellation_Diagram::Prop::q_range>(
Axis_Range{-1.0, 1.0});
constellation->submit_stream<Constellation_Stream_Tag>(
Constellation_Point{{-50.0, 0.25}, monotonic_milliseconds()});
constellation->mark_dirty<Prepare_Data_Tag>();
constellation->mark_dirty<Render_Graph_Tag>();
scene->set<&Render_Scene_2D::Prop::viewport>(Size{160, 120});
scene->activate_view();
@@ -133,21 +133,16 @@ int main() {
const auto& constellation_state =
constellation->read_state<Renderable::Base_Tag>();
const bool valid = completed == frame &&
spectrum_state.prepare_executed &&
spectrum_state.paint_executed &&
spectrum_state.prepare_task_count == 5 &&
spectrum_state.paint_task_count == 6 &&
waterfall_state.prepare_executed &&
waterfall_state.paint_executed &&
waterfall_state.prepare_task_count == 5 &&
waterfall_state.paint_task_count == 5 &&
constellation_state.prepare_executed &&
constellation_state.paint_executed &&
constellation_state.paint_task_count == 4 &&
spectrum_state.render_executed &&
spectrum_state.task_count == 11 &&
waterfall_state.render_executed &&
waterfall_state.task_count == 10 &&
constellation_state.render_executed &&
constellation_state.task_count == 5 &&
spectrum->read_state<Spectrum::Base_Tag>().sample_count ==
512 &&
frequency->read_state<Renderable::Base_Tag>().paint_executed &&
power->read_state<Renderable::Base_Tag>().paint_executed &&
frequency->read_state<Renderable::Base_Tag>().render_executed &&
power->read_state<Renderable::Base_Tag>().render_executed &&
topology_valid->load(std::memory_order_relaxed) &&
contains_color(completed->image());
if (!valid) std::_Exit(1);
@@ -170,20 +165,16 @@ int main() {
constellation->read_state<Renderable::Base_Tag>();
const bool resized_valid =
next == resized_partition_frame &&
next_spectrum.prepare_graph_rebuilt &&
next_spectrum.paint_graph_rebuilt &&
next_spectrum.prepare_task_count == 3 &&
next_spectrum.paint_task_count == 4 &&
next_waterfall.prepare_graph_rebuilt &&
next_waterfall.paint_graph_rebuilt &&
next_waterfall.prepare_task_count == 7 &&
next_waterfall.paint_task_count == 7 &&
next_constellation.paint_graph_rebuilt &&
next_constellation.paint_task_count == 3 &&
next_spectrum.graph_rebuilt &&
next_spectrum.task_count == 7 &&
next_waterfall.graph_rebuilt &&
next_waterfall.task_count == 14 &&
next_constellation.graph_rebuilt &&
next_constellation.task_count == 4 &&
frequency->read_state<Renderable::Base_Tag>()
.paint_executed &&
.render_executed &&
power->read_state<Renderable::Base_Tag>()
.paint_executed &&
.render_executed &&
topology_valid->load(std::memory_order_relaxed) &&
contains_color(next->image());
std::_Exit(resized_valid ? 0 : 1);