if (vkResetCommandPool(screen->dev, batch->cmdpool, 0) != VK_SUCCESS)
fprintf(stderr, "vkResetCommandPool failed\n");
batch->submitted = batch->has_work = false;
+ batch->resource_size = 0;
}
void
if (!entry) {
entry = _mesa_set_add(batch->resources, res);
pipe_reference(NULL, &res->base.reference);
- if (stencil)
+ batch->resource_size += res->size;
+ if (stencil) {
pipe_reference(NULL, &stencil->base.reference);
+ batch->resource_size += stencil->size;
+ }
}
/* multiple array entries are fine */
if (res->persistent_maps)
struct util_dynarray zombie_samplers;
struct set *active_queries; /* zink_query objects which were active at some point in this batch */
+
+ VkDeviceSize resource_size;
+
bool has_work;
bool submitted;
bool in_rp; //renderpass is currently active