Account path tags correctly
diff --git a/piet-gpu/src/encoder.rs b/piet-gpu/src/encoder.rs
index 0314003..338c01c 100644
--- a/piet-gpu/src/encoder.rs
+++ b/piet-gpu/src/encoder.rs
@@ -200,6 +200,11 @@
         self.transform_stream.len()
     }
 
+    /// The number of tags in the path stream.
+    pub(crate) fn n_pathtag(&self) -> usize {
+        self.tag_stream.len()
+    }
+
     pub(crate) fn encode_glyph(&mut self, glyph: &GlyphEncoder) {
         self.tag_stream.extend(&glyph.tag_stream);
         self.pathseg_stream.extend(&glyph.pathseg_stream);
diff --git a/piet-gpu/src/lib.rs b/piet-gpu/src/lib.rs
index ad13c24..f045d65 100644
--- a/piet-gpu/src/lib.rs
+++ b/piet-gpu/src/lib.rs
@@ -96,6 +96,7 @@
     n_drawobj: usize,
     n_paths: usize,
     n_pathseg: usize,
+    n_pathtag: usize,
 
     // Keep a reference to the image so that it is not destroyed.
     _bg_image: Image,
@@ -256,6 +257,7 @@
             n_drawobj: 0,
             n_paths: 0,
             n_pathseg: 0,
+            n_pathtag: 0,
             _bg_image: bg_image,
             gradient_bufs,
             gradients,
@@ -280,6 +282,7 @@
         self.n_transform = render_ctx.n_transform();
         self.n_drawobj = render_ctx.n_drawobj();
         self.n_pathseg = render_ctx.n_pathseg() as usize;
+        self.n_pathtag = render_ctx.n_pathtag();
 
         // These constants depend on encoding and may need to be updated.
         // Perhaps we can plumb these from piet-gpu-derive?
@@ -345,7 +348,7 @@
             &self.element_bindings[buf_ix],
             self.n_transform as u64,
             self.n_paths as u32,
-            self.n_pathseg as u32,
+            self.n_pathtag as u32,
             self.n_drawobj as u64,
         );
         cmd_buf.write_timestamp(&query_pool, 1);
diff --git a/piet-gpu/src/render_ctx.rs b/piet-gpu/src/render_ctx.rs
index d13a888..2c5ee73 100644
--- a/piet-gpu/src/render_ctx.rs
+++ b/piet-gpu/src/render_ctx.rs
@@ -125,6 +125,10 @@
         self.new_encoder.n_pathseg()
     }
 
+    pub fn n_pathtag(&self) -> usize {
+        self.new_encoder.n_pathtag()
+    }
+
     pub fn n_transform(&self) -> usize {
         self.new_encoder.n_transform()
     }