Skip to content
Snippets Groups Projects

Add automated graphics verification for VDPAU and VA-API

Merged Ludovico de Nittis requested to merge wip/denittis/t19520 into master
All threads resolved!
  • Add automated graphics verification for VDPAU:

    We use the automated VDPAU check to add an entry in the steam-runtime-system-info report. Also check-vdpau has a new option --verbose that prints additional info about the driver in use.

  • Add automated graphics verification for VA-API

    Add a check similarly to the VDPAU one that we already have.

  • check-va-api.c: Fix config memory leak

I was debating on a few design choices like how to call this new entry in s-r-s-i (I went with graphics-verification), or is using --verbose to print additional info for the helpers good enough? And then, is can_run a wise choice for this check or was it better can_use?

/cc @smcv @jpwhiting

Merge request reports

Pipeline #2987 passed

Pipeline passed for 6c71f6a0 on wip/denittis/t19520

Merged by Ludovico de NittisLudovico de Nittis 4 years ago (Apr 20, 2020 8:06am UTC)

Loading

Pipeline #2988 passed

Pipeline passed for 8234ea56 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 12 commits

    • 62397288...ff514c0a - 9 commits from branch master
    • e982bbd1 - Add automated graphics verification for VDPAU
    • 4ad0f763 - Add automated graphics verification for VA-API
    • c4e50e0b - check-va-api.c: Fix config memory leak

    Compare with previous version

  • This is a sample error when an error occurs:

          "graphics-verification" : {
            "vdpau" : {
              "can-run" : false,
              "additional-info" : "Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory\nvdp_device_create_x11 (display, screen, &device, &vdp_get_proc_address) failed: 1\n"
            },
            "va-api" : {
              "can-run" : false,
              "additional-info" : "libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)\nvaInitialize (va_display, &major_version, &minor_version) failed: unknown libva error (-1)\n"
            }
          }

    This is when there are no errors:

          "graphics-verification" : {
            "vdpau" : {
              "can-run" : true,
              "additional-info" : "G3DVL VDPAU Driver Shared Library version 1.0\n"
            },
            "va-api" : {
              "can-run" : true,
              "additional-info" : "Mesa Gallium driver 20.0.4 for AMD Radeon RX 5700 XT (NAVI10, DRM 3.36.0, 5.6.3-arch1-1, LLVM 9.0.1)\n"
            }
          }
        }

    I'll try this patch with the current master of pressure-vessel and report back the output.

  • At first I didn't correctly install steam-runtime-tools in the pressure vessel folder and it took me way too much to understand that this was indeed the issue.

    Anyway, this is the output when inside a container:

          "graphics-verification" : {
            "vdpau" : {
              "can-run" : true,
              "additional-info" : "G3DVL VDPAU Driver Shared Library version 1.0\n"
            },
            "va-api" : {
              "can-run" : true,
              "additional-info" : "Mesa Gallium driver 20.0.4 for AMD Radeon RX 5700 XT (NAVI10, DRM 3.36.0, 5.6.3-arch1-1, LLVM 9.0.1)\nlibva info: VA-API version 1.7.0\nlibva info: User environment variable requested driver 'radeonsi'\nlibva info: Trying to open /overrides/lib/x86_64-linux-gnu/dri/0/radeonsi_drv_video.so\nlibva info: Trying to open /overrides/lib/x86_64-linux-gnu/dri/1/radeonsi_drv_video.so\nlibva info: Trying to open /overrides/lib/x86_64-linux-gnu/dri/2/radeonsi_drv_video.so\nlibva info: Trying to open /overrides/lib/x86_64-linux-gnu/dri/3/radeonsi_drv_video.so\nlibva info: Trying to open /overrides/lib/x86_64-linux-gnu/dri/4/radeonsi_drv_video.so\nlibva info: Found init function __vaDriverInit_1_7\nlibva info: va_openDriver() returns 0\n"
            }
          }

    VA-API is a bit of a mess, because in stderr it prints all the failed attempts and of course JSON doesn't support multiline strings...

    • Resolved by Ludovico de Nittis

      I was debating on a few design choices like how to call this new entry in s-r-s-i (I went with graphics-verification)

      I was assuming we'd want to implement it as srt_system_info_check_graphics (..., SRT_WINDOW_SYSTEM_X11, SRT_RENDERING_INTERFACE_VA_API, ...)? It's not exactly analogous to GLX or Vulkan, but it's close enough?

      • is_vendor_neutral: assume it always is, like Vulkan
      • get_renderer_string: vaQueryVendorString() and vdp_get_information_string() look suitable
  • added 5 commits

    • eba8b22b - graphics.c: Use "switch" for the rendering_interface
    • e369c5c6 - check-va-api.c: Fix config memory leak
    • 0e23f753 - Add automated graphics verification for VDPAU
    • 70a433a8 - graphics.c: refactor tests
    • 75fbfa1e - Add automated graphics verification for VA-API

    Compare with previous version

  • Simon McVittie
  • Simon McVittie
  • eba8b22b looks fine except for the comments I had, cherry-pick onto master after fixing them if you want.

    e369c5c6 looks fine, cherry-pick onto master if you want.

  • 70a433a8 is great. +194 -577 is my favourite sort of diffstat :-)

  • 75fbfa1e also looks good. So the only thing to address here is a couple of trivial comments on eba8b22b, and then please merge.

  • added 5 commits

    Compare with previous version

  • Ludovico de Nittis resolved all threads

    resolved all threads

  • mentioned in issue #10 (closed)

  • I cherry picked the first two commits onto master and I'm going to merge the rest of this MR now.

  • Ludovico de Nittis enabled an automatic merge when the pipeline for 6c71f6a0 succeeds

    enabled an automatic merge when the pipeline for 6c71f6a0 succeeds

  • mentioned in commit 8234ea56

  • Ludovico de Nittis mentioned in merge request !125 (merged)

    mentioned in merge request !125 (merged)

  • Please register or sign in to reply
    Loading