mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 15:00:11 +01:00
zink: print the type of shader when dumping
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22692>
This commit is contained in:
parent
d49c7b9582
commit
32dddb90ad
1 changed files with 3 additions and 3 deletions
|
|
@ -3186,13 +3186,13 @@ split_blocks(nir_shader *nir)
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3209,7 +3209,7 @@ zink_shader_spirv_compile(struct zink_screen *screen, struct zink_shader *zs, st
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue