static void dump_resources(spvc_compiler compiler, spvc_resources resources)
{
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_UNIFORM_BUFFER, "UBO");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_STORAGE_BUFFER, "SSBO");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_PUSH_CONSTANT, "Push");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_SEPARATE_SAMPLERS, "Samplers");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_SEPARATE_IMAGE, "Image");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_SAMPLED_IMAGE, "Combined image samplers");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_STAGE_INPUT, "Stage input");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_STAGE_OUTPUT, "Stage output");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_STORAGE_IMAGE, "Storage image");
	dump_resource_list(compiler, resources, SPVC_RESOURCE_TYPE_SUBPASS_INPUT, "Subpass input");
}
Exemple #2
0
static void
dump_context(htsbuf_queue_t *out, es_context_t *ec)
{
  hts_mutex_lock(&ec->ec_mutex);

  htsbuf_qprintf(out, "\n--- %s ------------------------\n", ec->ec_id);

  htsbuf_qprintf(out, "  Loaded from %s\n", ec->ec_path);

  htsbuf_qprintf(out, "  Memory usage, current: %zd bytes, max: %zd\n",
                 ec->ec_mem_active, ec->ec_mem_peak);

  htsbuf_qprintf(out, "  Attached permanent resources:\n");
  dump_resource_list(out, &ec->ec_resources_permanent);

  hts_mutex_unlock(&ec->ec_mutex);
}