[Mesa-dev] VAAPI encoder and OpenGL

Daniel Gomez daniel at qtec.com
Mon Apr 27 12:29:36 UTC 2020


Adding Boyuan Zhang to the thread.

On Mon, 27 Apr 2020 at 14:00, Daniel Gomez <daniel at qtec.com> wrote:
>
> Hi guys,
>
> We have found a limitation on the usage of the GPU and the encoder
> when you run it simultaneously in a gstreamer pipeline and we would like to
> report it and try to find a solution.
>
> Besides encoding the video frame, the following gstreamer pipeline shows the
> usage of the GPU in two ways:
> 1. OpenGL color conversion.
> 2. Render to the display using OpenGL.
>
> DISPLAY=:0 \
> GST_DEBUG="*:3,GST_TRACER:7" GST_TRACERS="queuelevel"  \
> gst-launch-1.0 videotestsrc ! video/x-raw,format=RGBA ! \
> glupload ! glcolorconvert !  gldownload  ! \
> queue max-size-bytes=279936000 max-size-time=3000000000 leaky=2 ! \
> vaapih264enc ! \
> fakesink \
> videotestsrc ! video/x-raw ! glimagesink sync=false
>
> By running the above pipeline you can see how the encoder queue fills up to the
> maximum and never consumes the incoming data.
>
> Hardware information:
>
> AMD Embedded R-Series RX-421BD Radeon R7
>
> lspci -v -s 00:01.0
> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc.
> [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] (rev 84) (prog-if 00 [VGA
> controller])
> Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon
> R5/R6/R7 Graphics]
> Flags: bus master, fast devsel, latency 0, IRQ 53
> Memory at e0000000 (64-bit, prefetchable) [size=256M]
> Memory at f2000000 (64-bit, prefetchable) [size=8M]
> I/O ports at 5000 [size=256]
> Memory at f2c00000 (32-bit, non-prefetchable) [size=256K]
> Expansion ROM at 000c0000 [disabled] [size=128K]
> Capabilities: [48] Vendor Specific Information: Len=08 <?>
> Capabilities: [50] Power Management version 3
> Capabilities: [58] Express Root Complex Integrated Endpoint, MSI 00
> Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
> Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
> Capabilities: [270] Secondary PCI Express <?>
> Capabilities: [2b0] Address Translation Service (ATS)
> Capabilities: [2c0] Page Request Interface (PRI)
> Capabilities: [2d0] Process Address Space ID (PASID)
> Kernel driver in use: amdgpu
> Kernel modules: amdgpu
>
> DISPLAY=:0 glxinfo -B
> name of display: :0
> display: :0  screen: 0
> direct rendering: Yes
> Extended renderer info (GLX_MESA_query_renderer):
>     Vendor: X.Org (0x1002)
>     Device: AMD Radeon R7 Graphics (CARRIZO, DRM 3.36.0,
> 5.5.0-qtec-standard, LLVM 8.0.0) (0x9874)
>     Version: 19.0.1
>     Accelerated: yes
>     Video memory: 1024MB
>     Unified memory: no
>     Preferred profile: core (0x1)
>     Max core profile version: 4.5
>     Max compat profile version: 4.5
>     Max GLES1 profile version: 1.1
>     Max GLES[23] profile version: 3.2
> OpenGL vendor string: X.Org
> OpenGL renderer string: AMD Radeon R7 Graphics (CARRIZO, DRM 3.36.0,
> 5.5.0-qtec-standard, LLVM 8.0.0)
> OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.1
> OpenGL core profile shading language version string: 4.50
> OpenGL core profile context flags: (none)
> OpenGL core profile profile mask: core profile
>
> OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.0.1
> OpenGL shading language version string: 4.50
> OpenGL context flags: (none)
> OpenGL profile mask: compatibility profile
>
> OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.0.1
> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
>
> Any idea/suggestion why is this happening?
>
> Thanks!
> Daniel


More information about the mesa-dev mailing list