zink: pool descriptors per batch
[mesa.git] / src / gallium / drivers / zink / zink_batch.c
index 45466af5699f2617d5200faf04c1c8c405f0f294..474421081bfa87956146c4aa788d1e5b6ec2960a 100644 (file)
@@ -13,6 +13,8 @@
 static void
 reset_batch(struct zink_screen *screen, struct zink_batch *batch)
 {
+   batch->descs_left = ZINK_BATCH_DESC_SIZE;
+
    // cmdbuf hasn't been submitted before
    if (!batch->fence)
       return;
@@ -41,6 +43,9 @@ reset_batch(struct zink_screen *screen, struct zink_batch *batch)
       vkDestroySampler(screen->dev, *samp, NULL);
    }
    util_dynarray_clear(&batch->zombie_samplers);
+
+   if (vkResetDescriptorPool(screen->dev, batch->descpool, 0) != VK_SUCCESS)
+      fprintf(stderr, "vkResetDescriptorPool failed\n");
 }
 
 void