Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/avendish
Submodule avendish updated 67 files
+24 −0 .github/scripts/gen_dump_tus.py
+92 −0 .github/workflows/backend_matrix.yml
+11 −11 .github/workflows/build_cmake.yml
+21 −0 cmake/AvendishAddon.cmake
+77 −0 cmake/avendish.cmake
+16 −2 cmake/avendish.dependencies.cmake
+35 −23 cmake/avendish.disableexceptions.cmake
+39 −2 cmake/avendish.dump.cmake
+6 −0 cmake/avendish.max.cmake
+7 −1 cmake/avendish.sources.cmake
+1 −0 cmake/avendish.tests.cmake
+5 −1 cmake/avendish.wasm.cmake
+32 −37 include/avnd/binding/dump/DumpCBOR.hpp
+183 −0 include/avnd/binding/dump/json_writer.hpp
+2 −2 include/avnd/binding/godot/node.hpp
+37 −0 include/avnd/binding/gstreamer/parameters.hpp
+81 −0 include/avnd/binding/gstreamer/utils.hpp
+2 −2 include/avnd/binding/max/attributes_setup.hpp
+20 −0 include/avnd/binding/max/c74_varfun_conformant.hpp
+1 −1 include/avnd/binding/max/from_atoms.hpp
+47 −6 include/avnd/binding/max/jitter_helpers.hpp
+1 −1 include/avnd/binding/max/jitter_texture_format.hpp
+2 −2 include/avnd/binding/max/outputs.hpp
+10 −4 include/avnd/binding/max/processor_common.hpp
+15 −5 include/avnd/binding/max/to_atoms.hpp
+1 −1 include/avnd/binding/pd/inputs.hpp
+2 −2 include/avnd/binding/pd/outputs.hpp
+1 −1 include/avnd/binding/python/processor.hpp
+1 −1 include/avnd/binding/touchdesigner/CHOP_AUDIO.prototype.cpp.in
+1 −1 include/avnd/binding/touchdesigner/CHOP_MESSAGE.prototype.cpp.in
+1 −1 include/avnd/binding/touchdesigner/DAT.prototype.cpp.in
+1 −1 include/avnd/binding/touchdesigner/POP.prototype.cpp.in
+1 −1 include/avnd/binding/touchdesigner/SOP.prototype.cpp.in
+5 −4 include/avnd/binding/touchdesigner/TOP.prototype.cpp.in
+4 −1 include/avnd/binding/touchdesigner/configure.hpp
+2 −2 include/avnd/binding/touchdesigner/parameter_setup.hpp
+3 −3 include/avnd/binding/touchdesigner/parameter_update.hpp
+12 −6 include/avnd/binding/touchdesigner/top/texture_processor.hpp
+5 −5 include/avnd/binding/wasm/controls.hpp
+12 −13 include/avnd/common/aggregates.base.hpp
+4 −1 include/avnd/common/aggregates.hpp
+0 −112 include/avnd/common/aggregates.p1061.hpp
+199 −0 include/avnd/common/aggregates.structured.hpp
+9 −5 include/avnd/common/enum_reflection.hpp
+64 −0 include/avnd/common/enum_reflection.magic_enum.hpp
+92 −0 include/avnd/common/enum_reflection.p2996.hpp
+2 −2 include/avnd/common/for_nth.hpp
+360 −0 include/avnd/common/function_reflection.classic.hpp
+12 −346 include/avnd/common/function_reflection.hpp
+97 −0 include/avnd/common/function_reflection.p2996.hpp
+32 −0 include/avnd/common/message_tag.hpp
+33 −0 include/avnd/common/meta_polyfill.hpp
+31 −0 include/avnd/common/metadata_tag.hpp
+13 −13 include/avnd/common/struct_reflection.hpp
+40 −0 include/avnd/introspection/field_names.hpp
+39 −0 include/avnd/introspection/field_names.p2996.hpp
+1 −0 include/avnd/introspection/messages.hpp
+113 −0 include/avnd/introspection/messages.p2996.hpp
+44 −0 include/avnd/introspection/metadata.p2996.hpp
+2 −2 include/avnd/introspection/widgets.hpp
+22 −0 include/avnd/wrappers/metadatas.hpp
+14 −0 include/gpp/layout.hpp
+15 −20 include/halp/controls.enums.hpp
+13 −0 include/halp/messages.hpp
+9 −0 include/halp/meta.hpp
+12 −0 src/disable_exceptions.cpp
+402 −0 tests/test_reflection.cpp
32 changes: 16 additions & 16 deletions src/plugins/score-plugin-avnd/Crousti/GppShaders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ struct generate_shaders
,
C::binding(), C::name());

boost::pfr::for_each_field(field, write_binding{shader});
avnd::pfr::for_each_field(field, write_binding{shader});

shader += fmt::format("}};\n\n");
}
Expand All @@ -166,7 +166,7 @@ struct generate_shaders
,
C::binding(), C::name());

boost::pfr::for_each_field(field, write_binding{shader});
avnd::pfr::for_each_field(field, write_binding{shader});

shader += fmt::format("}};\n\n");
}
Expand All @@ -180,24 +180,24 @@ struct generate_shaders
std::string shader = "#version 450\n\n";

if constexpr(requires { lay.vertex_input; })
boost::pfr::for_each_field(lay.vertex_input, write_input{shader});
avnd::pfr::for_each_field(lay.vertex_input, write_input{shader});
else if constexpr(requires { typename T::vertex_input; })
boost::pfr::for_each_field(typename T::vertex_input{}, write_input{shader});
avnd::pfr::for_each_field(typename T::vertex_input{}, write_input{shader});
else
boost::pfr::for_each_field(
avnd::pfr::for_each_field(
DefaultPipeline::layout::vertex_input{}, write_input{shader});

if constexpr(requires { lay.vertex_output; })
boost::pfr::for_each_field(lay.vertex_output, write_output{shader});
avnd::pfr::for_each_field(lay.vertex_output, write_output{shader});
else if constexpr(requires { typename T::vertex_output; })
boost::pfr::for_each_field(typename T::vertex_output{}, write_output{shader});
avnd::pfr::for_each_field(typename T::vertex_output{}, write_output{shader});

shader += "\n";

if constexpr(requires { lay.bindings; })
boost::pfr::for_each_field(lay.bindings, write_bindings{shader});
avnd::pfr::for_each_field(lay.bindings, write_bindings{shader});
else if constexpr(requires { typename T::bindings; })
boost::pfr::for_each_field(typename T::bindings{}, write_bindings{shader});
avnd::pfr::for_each_field(typename T::bindings{}, write_bindings{shader});

return shader;
}
Expand All @@ -208,21 +208,21 @@ struct generate_shaders
std::string shader = "#version 450\n\n";

if constexpr(requires { lay.fragment_input; })
boost::pfr::for_each_field(lay.fragment_input, write_input{shader});
avnd::pfr::for_each_field(lay.fragment_input, write_input{shader});
else if constexpr(requires { typename T::fragment_input; })
boost::pfr::for_each_field(typename T::fragment_input{}, write_input{shader});
avnd::pfr::for_each_field(typename T::fragment_input{}, write_input{shader});

if constexpr(requires { lay.fragment_output; })
boost::pfr::for_each_field(lay.fragment_output, write_output{shader});
avnd::pfr::for_each_field(lay.fragment_output, write_output{shader});
else if constexpr(requires { typename T::fragment_output; })
boost::pfr::for_each_field(typename T::fragment_output{}, write_output{shader});
avnd::pfr::for_each_field(typename T::fragment_output{}, write_output{shader});

shader += "\n";

if constexpr(requires { lay.bindings; })
boost::pfr::for_each_field(lay.bindings, write_bindings{shader});
avnd::pfr::for_each_field(lay.bindings, write_bindings{shader});
else if constexpr(requires { typename T::bindings; })
boost::pfr::for_each_field(typename T::bindings{}, write_bindings{shader});
avnd::pfr::for_each_field(typename T::bindings{}, write_bindings{shader});

return shader;
}
Expand Down Expand Up @@ -250,7 +250,7 @@ struct generate_shaders
fstr.resize(fstr.size() - 2);
fstr += ") in;\n\n";

boost::pfr::for_each_field(lay.bindings, write_bindings{fstr});
avnd::pfr::for_each_field(lay.bindings, write_bindings{fstr});

return fstr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/score-plugin-avnd/Crousti/GpuComputeNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct GpuComputeRenderer final : ComputeRendererBaseType<Node_T>
QVarLengthArray<QRhiShaderResourceBinding, 8> bindings;

using bindings_type = decltype(Node_T::layout::bindings);
boost::pfr::for_each_field(
avnd::pfr::for_each_field(
bindings_type{}, [&](auto f) { bindings.push_back(initBinding(renderer, f)); });

srb->setBindings(bindings.begin(), bindings.end());
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/score-plugin-avnd/Crousti/GpuNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ struct CustomGpuRenderer final : score::gfx::NodeRenderer
if constexpr(requires { decltype(Node_T::layout::bindings){}; })
{
using bindings_type = decltype(Node_T::layout::bindings);
boost::pfr::for_each_field(bindings_type{}, [&](auto f) {
avnd::pfr::for_each_field(bindings_type{}, [&](auto f) {
bindings.push_back(initBinding(renderer, f));
});
}
else if constexpr(requires { sizeof(typename Node_T::layout::bindings); })
{
using bindings_type = typename Node_T::layout::bindings;
boost::pfr::for_each_field(bindings_type{}, [&](auto f) {
avnd::pfr::for_each_field(bindings_type{}, [&](auto f) {
bindings.push_back(initBinding(renderer, f));
});
}
Expand Down
20 changes: 18 additions & 2 deletions src/plugins/score-plugin-avnd/Crousti/GpuUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,25 @@ struct port_to_type_enum
{
using value_type = std::remove_cvref_t<decltype(F::value)>;

if constexpr(std::is_aggregate_v<value_type>)
if constexpr(std::is_array_v<value_type>)
{
constexpr int sz = boost::pfr::tuple_size_v<value_type>;
static constexpr int sz = sizeof(value_type) / sizeof(value_type{}[0]);
if constexpr(sz == 2)
{
return score::gfx::Types::Vec2;
}
else if constexpr(sz == 3)
{
return score::gfx::Types::Vec3;
}
else if constexpr(sz == 4)
{
return score::gfx::Types::Vec4;
}
}
else if constexpr(std::is_aggregate_v<value_type>)
{
static constexpr int sz = avnd::pfr::tuple_size_v<value_type>;
if constexpr(sz == 2)
{
return score::gfx::Types::Vec2;
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/score-plugin-avnd/Crousti/Layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

#include <avnd/concepts/layout.hpp>

#include <avnd/common/aggregates.hpp>

namespace oscr
{
template <typename Item>
Expand Down Expand Up @@ -333,13 +335,11 @@ struct LayoutBuilder final : Process::LayoutBuilderBase
createdLayouts.push_back(new_l);

{
using namespace boost::pfr;
using namespace boost::pfr::detail;
static constexpr int N = boost::pfr::tuple_size_v<Item>;
auto t = boost::pfr::structure_tie(item);
static constexpr int N = avnd::pfr::tuple_size_v<Item>;
auto t = avnd::pfr::detail::tie_as_tuple(item);
[&]<std::size_t... I>(std::index_sequence<I...>) {
using namespace std;
using namespace boost::pfr;
using namespace avnd::pfr;

(this->walkLayout(get<I>(t), recursive_members...), ...);
}(std::make_index_sequence<N>{});
Expand Down
9 changes: 6 additions & 3 deletions src/plugins/score-plugin-avnd/Crousti/MessageBus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct Serializer
if constexpr(std::is_arithmetic_v<F>)
r.stream().stream << f;
else if constexpr(std::is_aggregate_v<F>)
boost::pfr::for_each_field(f, *this);
avnd::pfr::for_each_field(f, *this);
else if constexpr(avnd::list_ish<F>)
{
r.stream().stream << (int64_t)std::ssize(f);
Expand Down Expand Up @@ -115,8 +115,11 @@ struct Deserializer
DataStreamWriter& r;

template <typename F>
requires std::is_aggregate_v<F>
void operator()(F& f) { boost::pfr::for_each_field(f, *this); }
requires std::is_aggregate_v<F>
void operator()(F& f)
{
avnd::pfr::for_each_field(f, *this);
}

template <typename F>
requires(std::is_arithmetic_v<F>)
Expand Down
1 change: 0 additions & 1 deletion src/plugins/score-plugin-avnd/Crousti/Metadatas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <ossia/dataflow/safe_nodes/port.hpp>

#include <boost/mp11/algorithm.hpp>
#include <boost/pfr.hpp>

#include <avnd/introspection/input.hpp>
#include <avnd/introspection/output.hpp>
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/score-plugin-avnd/Crousti/ProcessModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include <ossia/detail/type_if.hpp>
#include <ossia/detail/typelist.hpp>

#include <boost/pfr.hpp>

#include <QTimer>

#include <avnd/binding/ossia/data_node.hpp>
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/score-plugin-fx/Fx/VelToNote.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include <ossia/dataflow/value_port.hpp>
#include <ossia/detail/math.hpp>

#include <boost/pfr.hpp>

#include <halp/controls.hpp>
#include <halp/meta.hpp>
#include <halp/midi.hpp>
Expand Down
Loading