Rolling up some exploratory work

The HAL changes are to disable queries that are not supported by AGI.

The text changes are to support variation in a somewhat hacky way.
diff --git a/piet-gpu-hal/src/vulkan.rs b/piet-gpu-hal/src/vulkan.rs
index 5b0dfd6..5fefe0d 100644
--- a/piet-gpu-hal/src/vulkan.rs
+++ b/piet-gpu-hal/src/vulkan.rs
@@ -272,6 +272,7 @@
             choose_compute_device(&self.instance, &devices, surface).ok_or("no suitable device")?;
 
         let mut has_descriptor_indexing = false;
+        /*
         if let Some(ref get_phys_dev_props) = self.get_phys_dev_props {
             let mut descriptor_indexing_features =
                 vk::PhysicalDeviceDescriptorIndexingFeatures::builder();
@@ -287,6 +288,7 @@
                     == vk::TRUE
                 && descriptor_indexing_features.runtime_descriptor_array == vk::TRUE;
         }
+        */
 
         let queue_priorities = [1.0];
         let queue_create_infos = [vk::DeviceQueueCreateInfo::builder()
@@ -1129,11 +1131,12 @@
             &vk::DescriptorSetLayoutCreateInfo::builder()
                 .bindings(&self.bindings)
                 // It might be a slight optimization not to push this if max_textures = 0
+                /*
                 .push_next(
                     &mut vk::DescriptorSetLayoutBindingFlagsCreateInfo::builder()
                         .binding_flags(&self.binding_flags)
                         .build(),
-                ),
+                )*/,
             None,
         )?;
         let descriptor_set_layouts = [descriptor_set_layout];
diff --git a/piet-gpu/bin/android.rs b/piet-gpu/bin/android.rs
index 9004270..e1234d9 100644
--- a/piet-gpu/bin/android.rs
+++ b/piet-gpu/bin/android.rs
@@ -65,7 +65,7 @@
                 }
                 Event::WindowRedrawNeeded => {
                     if let Some(gfx_state) = gfx_state.as_mut() {
-                        for _ in 0..1000 {
+                        for _ in 0..10000 {
                             gfx_state.redraw();
                         }
                     }
diff --git a/piet-gpu/shader/kernel4.comp b/piet-gpu/shader/kernel4.comp
index 76b14dc..7431600 100644
--- a/piet-gpu/shader/kernel4.comp
+++ b/piet-gpu/shader/kernel4.comp
@@ -88,8 +88,8 @@
     uvec2 xy_uint = uvec2(gl_LocalInvocationID.x + TILE_WIDTH_PX * gl_WorkGroupID.x, gl_LocalInvocationID.y + TILE_HEIGHT_PX * gl_WorkGroupID.y);
     vec2 xy = vec2(xy_uint);
     mediump vec4 rgba[CHUNK];
-    //uint blend_stack[MAX_BLEND_STACK][CHUNK];
-    //mediump float blend_alpha_stack[MAX_BLEND_STACK][CHUNK];
+    uint blend_stack[MAX_BLEND_STACK][CHUNK];
+    mediump float blend_alpha_stack[MAX_BLEND_STACK][CHUNK];
     for (uint i = 0; i < CHUNK; i++) {
         rgba[i] = vec4(0.0);
     }
@@ -179,7 +179,6 @@
             }
             cmd_ref.offset += 4 + CmdColor_size;
             break;
-            /*
         case Cmd_LinGrad:
             CmdLinGrad lin = Cmd_LinGrad_read(cmd_alloc, cmd_ref);
             float d = lin.line_x * float(xy.x) + lin.line_y * float(xy.y) + lin.line_c;
@@ -193,7 +192,6 @@
             }
             cmd_ref.offset += 4 + CmdLinGrad_size;
             break;
-            */
         case Cmd_Image:
             CmdImage fill_img = Cmd_Image_read(cmd_alloc, cmd_ref);
             mediump vec4 img[CHUNK] = fillImage(xy_uint, fill_img);
@@ -203,7 +201,6 @@
             }
             cmd_ref.offset += 4 + CmdImage_size;
             break;
-        /*
         case Cmd_BeginClip:
             for (uint k = 0; k < CHUNK; k++) {
                 // We reject any inputs that might overflow in render_ctx.rs.
@@ -226,7 +223,6 @@
             }
             cmd_ref.offset += 4;
             break;
-            */
         case Cmd_Jump:
             cmd_ref = CmdRef(Cmd_Jump_read(cmd_alloc, cmd_ref).new_ref);
             cmd_alloc.offset = cmd_ref.offset;
diff --git a/piet-gpu/shader/kernel4.spv b/piet-gpu/shader/kernel4.spv
index 6ee3f09..8862e81 100644
--- a/piet-gpu/shader/kernel4.spv
+++ b/piet-gpu/shader/kernel4.spv
Binary files differ
diff --git a/piet-gpu/src/test_scenes.rs b/piet-gpu/src/test_scenes.rs
index 53c8ace..354817a 100644
--- a/piet-gpu/src/test_scenes.rs
+++ b/piet-gpu/src/test_scenes.rs
@@ -7,7 +7,7 @@
     Color, FixedGradient, FixedLinearGradient, GradientStop, Text, TextAttribute, TextLayoutBuilder,
 };
 
-use crate::{PicoSvg, RenderContext, Vec2};
+use crate::{PicoSvg, PietGpuRenderContext, RenderContext, Vec2};
 
 const N_CIRCLES: usize = 0;
 
@@ -191,22 +191,26 @@
     println!("flattening and encoding time: {:?}", start.elapsed());
 }
 
-pub fn render_anim_frame(rc: &mut impl RenderContext, i: usize) {
+pub fn render_anim_frame(rc: &mut PietGpuRenderContext, i: usize) {
     rc.fill(
         Rect::new(0.0, 0.0, 1000.0, 1000.0),
         &Color::rgb8(128, 128, 128),
     );
-    let text_size = 60.0 + 40.0 * (0.01 * i as f64).sin();
+    //let text_size = 60.0 + 40.0 * (0.01 * i as f64).sin();
+    let text_size = 80.0;
+    let wdth = 125.0 + 75.0 * (0.01 * i as f32).sin();
+    let wght = 550.0 + 350.0 * (0.01618 * i as f32).sin();
     rc.save().unwrap();
     //rc.transform(Affine::new([0.2, 0.0, 0.0, -0.2, 200.0, 800.0]));
-    let layout = rc
+    let mut layout = rc
         .text()
         .new_text_layout("\u{1f600}\u{1f601}hello piet-gpu text!")
         .default_attribute(TextAttribute::FontSize(text_size))
         .build()
         .unwrap();
+    layout.set_var_params(wght, wdth);
     for i in 0..10 {
-        rc.draw_text(&layout, Point::new(110.0, 400.0 + 100.0 * i as f64));
+        rc.draw_text(&layout, Point::new(10.0, 400.0 + 100.0 * i as f64));
     }
     rc.restore().unwrap();
     let th = (std::f64::consts::PI / 180.0) * (i as f64);
diff --git a/piet-gpu/src/text.rs b/piet-gpu/src/text.rs
index 3d556d4..8a8cfbf 100644
--- a/piet-gpu/src/text.rs
+++ b/piet-gpu/src/text.rs
@@ -2,7 +2,7 @@
 
 use swash::scale::ScaleContext;
 use swash::zeno::{Vector, Verb};
-use swash::{FontRef, GlyphId};
+use swash::{FontRef, GlyphId, Setting};
 
 use piet::kurbo::{Point, Rect, Size};
 use piet::{
@@ -18,7 +18,8 @@
 // This is very much a hack to get things working.
 // On Windows, can set this to "c:\\Windows\\Fonts\\seguiemj.ttf" to get color emoji
 //const FONT_DATA: &[u8] = include_bytes!("../third-party/Roboto-Regular.ttf");
-const FONT_DATA: &[u8] = include_bytes!("c:\\Windows\\Fonts\\seguiemj.ttf");
+//const FONT_DATA: &[u8] = include_bytes!("c:\\Windows\\Fonts\\seguiemj.ttf");
+const FONT_DATA: &[u8] = include_bytes!("c:\\Users/raph/github/Inconsolata/fonts/variable/Inconsolata[wdth,wght].ttf");
 
 #[derive(Clone)]
 pub struct Font {
@@ -37,6 +38,8 @@
     font: Font,
     size: f64,
     glyphs: Vec<Glyph>,
+    wght: f32,
+    wdth: f32,
 }
 
 pub struct PietGpuTextLayoutBuilder {
@@ -123,7 +126,7 @@
         Font { font_ref }
     }
 
-    fn make_path(&self, glyph_id: GlyphId) -> PathEncoder {
+    fn make_path(&self, glyph_id: GlyphId, wght: f32, wdth: f32) -> PathEncoder {
         /*
         let mut encoder = PathEncoder::default();
         self.face.outline_glyph(glyph_id, &mut encoder);
@@ -131,7 +134,16 @@
         */
         // Should the scale context be in the font? In the RenderCtx?
         let mut scale_context = ScaleContext::new();
-        let mut scaler = scale_context.builder(self.font_ref).size(2048.).build();
+        let mut scaler = scale_context.builder(self.font_ref).size(2048.)
+            .variations([Setting {
+                tag: swash::tag_from_str_lossy("wght"),
+                value: wght,
+            }])
+            .variations([Setting {
+                tag: swash::tag_from_str_lossy("wdth"),
+                value: wdth,
+            }])
+        .build();
         let mut encoder = PathEncoder::default();
         if scaler.has_color_outlines() {
             if let Some(outline) = scaler.scale_color_outline(glyph_id) {
@@ -172,6 +184,8 @@
             glyphs,
             font: font.clone(),
             size,
+            wght: 400.0,
+            wdth: 100.0,
         }
     }
 
@@ -184,6 +198,8 @@
         let mut last_x = 0.0;
         ctx.set_fill_mode(FillMode::Nonzero);
         for glyph in &self.glyphs {
+            // This is a hack and it should be set in shaping.
+            let glyph_x = glyph.x * self.wdth * 0.02;
             let transform = match &mut inv_transform {
                 None => {
                     let inv_scale = scale.recip();
@@ -191,19 +207,19 @@
                     inv_transform = Some(Transform {
                         mat: [inv_scale, 0.0, 0.0, -inv_scale],
                         translate: [
-                            -translate[0] * inv_scale - glyph.x,
+                            -translate[0] * inv_scale - glyph_x,
                             translate[1] * inv_scale,
                         ],
                     });
                     let tpos = render_ctx::to_f32_2(pos);
-                    let translate = [tpos[0] + scale * glyph.x, tpos[1]];
+                    let translate = [tpos[0] + scale * glyph_x, tpos[1]];
                     Transform {
                         mat: [scale, 0.0, 0.0, -scale],
                         translate,
                     }
                 }
                 Some(inv) => {
-                    let delta_x = glyph.x - last_x;
+                    let delta_x = glyph_x - last_x;
                     inv.translate[0] -= delta_x;
                     Transform {
                         mat: [1.0, 0.0, 0.0, 1.0],
@@ -211,10 +227,10 @@
                     }
                 }
             };
-            last_x = glyph.x;
+            last_x = glyph_x;
             //println!("{:?}, {:?}", transform.mat, transform.translate);
             ctx.encode_transform(transform);
-            let path = self.font.make_path(glyph.glyph_id);
+            let path = self.font.make_path(glyph.glyph_id, self.wght, self.wdth);
             ctx.append_path_encoder(&path);
             if path.n_colr_layers == 0 {
                 ctx.fill_glyph(0xff_ff_ff_ff);
@@ -226,6 +242,11 @@
             ctx.encode_transform(transform);
         }
     }
+
+    pub fn set_var_params(&mut self, wght: f32, wdth: f32) {
+        self.wght = wght;
+        self.wdth = wdth;
+    }
 }
 
 impl PietGpuTextLayoutBuilder {