From 9539d8871f474aff73beadfd10dfccec256eafa9 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Fri, 1 May 2020 09:06:10 -0700 Subject: [PATCH] Clear item ref on empty segments --- piet-gpu/shader/kernel2s.comp | 4 +++- piet-gpu/shader/kernel2s.spv | Bin 17528 -> 17688 bytes 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/piet-gpu/shader/kernel2s.comp b/piet-gpu/shader/kernel2s.comp index 8c60b5b..d6b1571 100644 --- a/piet-gpu/shader/kernel2s.comp +++ b/piet-gpu/shader/kernel2s.comp @@ -119,7 +119,9 @@ void main() { start = end; } - if (chunk_n_segs > 0) { + if (chunk_n_segs == 0) { + ItemHeader_write(item_header, ItemHeader(SegChunkRef(0))); + } else { SegChunk_write(seg_chunk_ref, SegChunk(chunk_n_segs, SegChunkRef(0))); seg_chunk_ref.offset += SegChunk_size + Segment_size * chunk_n_segs; } diff --git a/piet-gpu/shader/kernel2s.spv b/piet-gpu/shader/kernel2s.spv index 4f249bbbe82be66b12983c07851eb737ee5e5c5d..f7c27f04f27c45e785ab91f33da2144f4b59923b 100644 GIT binary patch delta 977 zcmZ9K%TH557{$MPD~L%kBoaw*$+Fd^Ha;4Kgq2D{1QQG{jKPEi78v8+)EE{-cXs2p zJQP|L@PhUIsIO92{3WbN%Ff@xeumsM)9;)!XU=>xbDML)(?>yPBJ4YC7FY+rKkJ>< z*&%xt8u zC#jl0N&Nx8xzF1zg|89KbY~J{XOPq&J=+DW=c#JY`6aj-bbbY{2A!wjYS4KGUXQkW zDq&EI?)N@E9+ZnmvZ))(c$yYkiQ3<4X$gFXRt7Aw--EcY_SbRp9E4)e`MXF}pPJi4 zou?{qxmd~`D~xclmvNL)R~Who?Q$0F1$>;LWSvA@Sf`NRcX^ zmOaGR;8P6g5B_PlZ5=X>Nt1(!S24bp#<&Ldum~=_wa_-e(zM>!ZGwHB8WrCtW>23e zR6*11axn2NnsiTm2bQMy_r&*LU#CQI`F#EZcrupz5l#BT*0Dc@RxpWAIF3RziTFR{ zGgz;Au(>a2(!IH_U}^JY_~zf>zD~K~^68al$Kc!ViE|0yDW l!lmh3mnVhx8+;v)qV=JQ3)iXg`}1#sbNJ<{M_akouD{;~ieUf% delta 832 zcmZ9Kxi3Uv6vgj*V=Ig(5SdO?GL~2q5fT*&Aqt@oQAj9=NYo>u5IWOn6vn%wB@!f~rt`8H3 zxR0UAwW4)Vwz}=*D|CLxiz@_O^R817^3EWGKtRKPR W!bzg)-TgmMy;S#-z%