23 halp_meta(name,
"Buffer Info")
24 halp_meta(category,
"Visuals/Utilities")
25 halp_meta(c_name,
"buffer_info")
26 halp_meta(description,
"Report a GPU buffer's handle, byte size, offset and change state as values and readable text.")
27 halp_meta(manual_url,
"https://ossia.io/score-docs/processes/buffer-info.html")
28 halp_meta(uuid,
"f1a3d6c8-2b4e-4c5d-8a9f-1e2d3c4b5a60")
32 struct : halp::gpu_buffer_input<
"Buffer">
34 halp_flag(single_cable);
42 halp::val_port<
"Byte size", int64_t> byte_size;
43 halp::val_port<
"Byte offset", int64_t> byte_offset;
47 halp::val_port<
"Handle", int64_t> handle;
48 halp::val_port<
"Changed",
bool> changed;
50 halp::val_port<
"Readable", std::string> readable;
55 const auto& b = inputs.buffer.buffer;
56 outputs.byte_size.value = b.byte_size;
57 outputs.byte_offset.value = b.byte_offset;
58 outputs.handle.value =
reinterpret_cast<std::int64_t
>(b.handle);
59 outputs.changed.value = b.changed;
61 auto& ret = outputs.readable.value;
64 std::back_inserter(ret),
65 "handle=0x{:x}, byte_size={}, byte_offset={}, changed={}",
66 reinterpret_cast<std::uintptr_t
>(b.handle), b.byte_size, b.byte_offset,
67 b.changed ?
"yes" :
"no");