mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
remove unused BinChunk type
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
parent
2eecaa8f0b
commit
1c6ca7e5fb
|
@ -8,12 +8,5 @@ piet_gpu! {
|
|||
struct BinInstance {
|
||||
element_ix: u32,
|
||||
}
|
||||
|
||||
struct BinChunk {
|
||||
// First chunk can have n = 0, subsequent ones not.
|
||||
n: u32,
|
||||
next: Ref<BinChunk>,
|
||||
// Instances follow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,10 +4,6 @@ struct BinInstanceRef {
|
|||
uint offset;
|
||||
};
|
||||
|
||||
struct BinChunkRef {
|
||||
uint offset;
|
||||
};
|
||||
|
||||
struct BinInstance {
|
||||
uint element_ix;
|
||||
};
|
||||
|
@ -18,17 +14,6 @@ BinInstanceRef BinInstance_index(BinInstanceRef ref, uint index) {
|
|||
return BinInstanceRef(ref.offset + index * BinInstance_size);
|
||||
}
|
||||
|
||||
struct BinChunk {
|
||||
uint n;
|
||||
BinChunkRef next;
|
||||
};
|
||||
|
||||
#define BinChunk_size 8
|
||||
|
||||
BinChunkRef BinChunk_index(BinChunkRef ref, uint index) {
|
||||
return BinChunkRef(ref.offset + index * BinChunk_size);
|
||||
}
|
||||
|
||||
BinInstance BinInstance_read(BinInstanceRef ref) {
|
||||
uint ix = ref.offset >> 2;
|
||||
uint raw0 = bins[ix + 0];
|
||||
|
@ -42,19 +27,3 @@ void BinInstance_write(BinInstanceRef ref, BinInstance s) {
|
|||
bins[ix + 0] = s.element_ix;
|
||||
}
|
||||
|
||||
BinChunk BinChunk_read(BinChunkRef ref) {
|
||||
uint ix = ref.offset >> 2;
|
||||
uint raw0 = bins[ix + 0];
|
||||
uint raw1 = bins[ix + 1];
|
||||
BinChunk s;
|
||||
s.n = raw0;
|
||||
s.next = BinChunkRef(raw1);
|
||||
return s;
|
||||
}
|
||||
|
||||
void BinChunk_write(BinChunkRef ref, BinChunk s) {
|
||||
uint ix = ref.offset >> 2;
|
||||
bins[ix + 0] = s.n;
|
||||
bins[ix + 1] = s.next.offset;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue