From 1c6ca7e5fba9236d06e9f8248d90eb728d8a80c6 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 8 Dec 2020 00:45:08 +0100 Subject: [PATCH] remove unused BinChunk type Signed-off-by: Elias Naur --- piet-gpu-types/src/bins.rs | 7 ------- piet-gpu/shader/bins.h | 31 ------------------------------- 2 files changed, 38 deletions(-) diff --git a/piet-gpu-types/src/bins.rs b/piet-gpu-types/src/bins.rs index 88f16f1..b9945f9 100644 --- a/piet-gpu-types/src/bins.rs +++ b/piet-gpu-types/src/bins.rs @@ -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, - // Instances follow - } } } diff --git a/piet-gpu/shader/bins.h b/piet-gpu/shader/bins.h index 3ce06e0..5d2b2c7 100644 --- a/piet-gpu/shader/bins.h +++ b/piet-gpu/shader/bins.h @@ -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; -} -