}
static void
-zink_shader_dump(void *words, size_t size, const char *file)
+zink_shader_dump(const struct zink_shader *zs, void *words, size_t size, const char *file)
{
FILE *fp = fopen(file, "wb");
if (fp) {
fwrite(words, 1, size, fp);
fclose(fp);
- fprintf(stderr, "wrote '%s'...\n", file);
+ fprintf(stderr, "wrote %s shader '%s'...\n", _mesa_shader_stage_to_string(zs->info.stage), file);
}
}
char buf[256];
static int i;
snprintf(buf, sizeof(buf), "dump%02d.spv", i++);
- zink_shader_dump(spirv->words, spirv->num_words * sizeof(uint32_t), buf);
+ zink_shader_dump(zs, spirv->words, spirv->num_words * sizeof(uint32_t), buf);
}
sci.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT;