mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
st/mesa: added st_print_current_vertex_program(), for debugging
This commit is contained in:
parent
2786343896
commit
6792969cbc
2 changed files with 27 additions and 0 deletions
|
|
@ -1285,3 +1285,26 @@ st_destroy_program_variants(struct st_context *st)
|
|||
_mesa_HashWalk(st->ctx->Shared->ShaderObjects,
|
||||
destroy_shader_program_variants_cb, st);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For debugging, print/dump the current vertex program.
|
||||
*/
|
||||
void
|
||||
st_print_current_vertex_program(void)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (ctx->VertexProgram._Current) {
|
||||
struct st_vertex_program *stvp =
|
||||
(struct st_vertex_program *) ctx->VertexProgram._Current;
|
||||
struct st_vp_variant *stv;
|
||||
|
||||
debug_printf("Vertex program %u\n", stvp->Base.Base.Id);
|
||||
|
||||
for (stv = stvp->variants; stv; stv = stv->next) {
|
||||
debug_printf("variant %p\n", stv);
|
||||
tgsi_dump(stv->tgsi.tokens, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,4 +315,8 @@ extern void
|
|||
st_destroy_program_variants(struct st_context *st);
|
||||
|
||||
|
||||
extern void
|
||||
st_print_current_vertex_program(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue