Using

export LIBVA_MESSAGING_LEVEL=2; export LIBVA_DRIVER_NAME=radeonsi; gdb --directory . --directory ../libva-2.17.0 --directory ../mesa-22.3.6 --args /usr/bin/vainfo

I've stepped through vainfo and focused on va_openDriver() which
eventually leads to:

(gdb) n
libva info: Found init function __vaDriverInit_1_17
502                     struct VADriverVTable *vtable = ctx->vtable;
(gdb) n
503                     struct VADriverVTableVPP *vtable_vpp =
ctx->vtable_vpp;
(gdb) n
504                     struct VADriverVTableProt *vtable_prot =
ctx->vtable_prot;
(gdb) n
507                     if (!vtable) {
(gdb) n
508                         vtable = calloc(1, sizeof(*vtable));
(gdb) n
509                         if (!vtable)
(gdb) n
512                     ctx->vtable = vtable;
(gdb) n
514                     if (!vtable_vpp) {
(gdb) n
515                         vtable_vpp = calloc(1, sizeof(*vtable_vpp));
(gdb) n
516                         if (vtable_vpp)
(gdb) n
517                             vtable_vpp->version =
VA_DRIVER_VTABLE_VPP_VERSION;
(gdb) n
521                     ctx->vtable_vpp = vtable_vpp;
(gdb) n
523                     if (!vtable_prot) {
(gdb) n
524                         vtable_prot = calloc(1, sizeof(*vtable_prot));
(gdb) n
525                         if (vtable_prot)
(gdb) n
526                             vtable_prot->version =
VA_DRIVER_VTABLE_PROT_VERSION;
(gdb) n
530                     ctx->vtable_prot = vtable_prot;
(gdb) n
532                     if (init_func && VA_STATUS_SUCCESS == vaStatus)
(gdb) n
533                         vaStatus = (*init_func)(ctx);
(gdb) s
535                     if (VA_STATUS_SUCCESS == vaStatus) {
(gdb) p vaStatus
$4 = 2
(gdb) n
583                         va_errorMessage(dpy, "%s init failed\n",
driver_path);

Reply via email to