Lines Matching defs:shader

99 static void si_dump_shader(struct si_screen *sscreen, struct si_shader *shader, FILE *f)
101 if (shader->shader_log)
102 fwrite(shader->shader_log, shader->shader_log_size, 1, f);
104 si_shader_dump(sscreen, shader, NULL, f, false);
106 if (shader->bo && sscreen->options.dump_shader_binary) {
107 unsigned size = shader->bo->b.b.width0;
108 fprintf(f, "BO: VA=%" PRIx64 " Size=%u\n", shader->bo->gpu_address, size);
111 shader->bo->buf, NULL,
118 sscreen->ws->buffer_unmap(sscreen->ws, shader->bo->buf);
125 /* The shader destroy code assumes a current context for unlinking of
134 struct si_shader *shader;
153 si_dump_shader(sscreen, chunk->shader, f);
171 chunk->shader = current;
185 chunk->shader = &state->program->shader;
240 fprintf(stderr, "radeonsi: replace shader %u by %s\n", num, p);
281 perror("radeonsi: reading shader");
882 /* If the shader is being executed, print its asm instructions, and annotate
886 static void si_print_annotated_shader(struct si_shader *shader, struct ac_wave_info *waves,
889 if (!shader)
892 struct si_screen *screen = shader->selector->screen;
893 gl_shader_stage stage = shader->selector->stage;
894 uint64_t start_addr = shader->bo->gpu_address;
895 uint64_t end_addr = start_addr + shader->bo->b.b.width0;
898 /* See if any wave executes the shader. */
904 return; /* the shader is not being executed */
917 calloc(shader->bo->b.b.width0 / 4, sizeof(struct si_shader_inst));
919 if (shader->prolog) {
920 si_add_split_disasm(screen, &rtld_binaries[0], &shader->prolog->binary, &inst_addr, &num_inst,
921 instructions, stage, shader->wave_size);
923 if (shader->previous_stage) {
924 si_add_split_disasm(screen, &rtld_binaries[1], &shader->previous_stage->binary, &inst_addr,
925 &num_inst, instructions, stage, shader->wave_size);
927 si_add_split_disasm(screen, &rtld_binaries[3], &shader->binary, &inst_addr, &num_inst,
928 instructions, stage, shader->wave_size);
929 if (shader->epilog) {
930 si_add_split_disasm(screen, &rtld_binaries[4], &shader->epilog->binary, &inst_addr, &num_inst,
931 instructions, stage, shader->wave_size);
935 si_get_shader_name(shader));
976 si_print_annotated_shader(sctx->shader.vs.current, waves, num_waves, f);
977 si_print_annotated_shader(sctx->shader.tcs.current, waves, num_waves, f);
978 si_print_annotated_shader(sctx->shader.tes.current, waves, num_waves, f);
979 si_print_annotated_shader(sctx->shader.gs.current, waves, num_waves, f);
980 si_print_annotated_shader(sctx->shader.ps.current, waves, num_waves, f);
1041 si_dump_gfx_shader(sctx, &sctx->shader.vs, log);
1042 si_dump_gfx_shader(sctx, &sctx->shader.tcs, log);
1043 si_dump_gfx_shader(sctx, &sctx->shader.tes, log);
1044 si_dump_gfx_shader(sctx, &sctx->shader.gs, log);
1045 si_dump_gfx_shader(sctx, &sctx->shader.ps, log);
1050 si_dump_gfx_descriptors(sctx, &sctx->shader.vs, log);
1051 si_dump_gfx_descriptors(sctx, &sctx->shader.tcs, log);
1052 si_dump_gfx_descriptors(sctx, &sctx->shader.tes, log);
1053 si_dump_gfx_descriptors(sctx, &sctx->shader.gs, log);
1054 si_dump_gfx_descriptors(sctx, &sctx->shader.ps, log);