summaryrefslogtreecommitdiff
path: root/examples/live/src/Lang.zig
diff options
context:
space:
mode:
Diffstat (limited to 'examples/live/src/Lang.zig')
-rw-r--r--examples/live/src/Lang.zig12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/live/src/Lang.zig b/examples/live/src/Lang.zig
index a6db8b9..4f3c3bf 100644
--- a/examples/live/src/Lang.zig
+++ b/examples/live/src/Lang.zig
@@ -135,7 +135,9 @@ pub const Instruction = extern struct {
pub const Tape = struct {
len: u32 = 0,
- code: [max_tape]Instruction = @splat(.{}),
+ code: Code = @splat(.{}),
+
+ pub const Code = [max_tape]Instruction;
pub fn slice(tape: *const Tape) []const Instruction {
return tape.code[0..@min(tape.len, max_tape)];
@@ -472,11 +474,11 @@ pub const Picture = extern struct {
pub const glsl = .{ .uniform = .{ .set = 3, .instance = "u" } };
};
-/// synth.comp's uniforms (SDL_GPU's compute set): the tape, and the one
-/// it replaces, which the first `fade` samples cross from.
+/// synth.comp's uniforms (SDL_GPU's compute set). Its tapes, the new one
+/// and the one it replaces, which the first `fade` samples cross from, are
+/// a storage buffer: SDL_GPU's Vulkan backend binds a uniform block 4 KiB
+/// at a time, and two tapes are 4 KiB alone.
pub const Synth = extern struct {
- /// The new tape, then the old one.
- tape: [2 * max_tape][4]u32,
len: u32,
old_len: u32,
/// Samples in the block.