ChanServ changed the topic of #etnaviv to: #etnaviv - the home of the reverse-engineered Vivante GPU driver - Logs https://oftc.irclog.whitequark.org/etnaviv
lynxeye has joined #etnaviv
pcercuei has joined #etnaviv
DavidHeidelberg has quit [Server closed connection]
DavidHeidelberg has joined #etnaviv
BobBeck has quit [Server closed connection]
BobBeck has joined #etnaviv
dv_ has quit [Server closed connection]
dv_ has joined #etnaviv
f_ has quit [Remote host closed the connection]
f_ has joined #etnaviv
f_ has quit [Remote host closed the connection]
f_ has joined #etnaviv
schramm has joined #etnaviv
pivi has quit [Remote host closed the connection]
pivi has joined #etnaviv
<schramm> Hi. We're trying to play video on an i.MX6 with Qt and GStreamer as backend and I guess we're also bitten by this bug: https://bugreports.qt.io/browse/QTBUG-95819
<schramm> My GPU and OpenGL knowledge is limited and I'm trying to understand if fixing this while using etnaviv is possible at all.
<schramm> According to the comments: "It relies on Vivante (the GPU vendor) specific OpenGL extensions that, combined with GStreamer, allow zero-copy video decoding into an OpenGL texture. These are not available when using the reverse-engineered, open-source graphics stack based on Mesa and Etnaviv."
<schramm> And the last question in the comments is still unanswered: "Do you have any ideas how this (zero copy to opengl texture) could be done with OSS drivers?"
<lynxeye> schramm: etnaviv support zero-copy import of dmabuf video buffers via EGL images and GL OES_EGL_image_external, same as all the other open-source drivers. No need for any specialized extensions just for Vivante hardware.
<schramm> lynxeye: Thank you.
<lynxeye> gstreamer glupload has a direct import path to take advantage of that, but the sink need to know how to handle OES external textures for this path to be negotiated. I have no idea what the Qt videonode is doing in that regard.
<lynxeye> A colleague of mine is working on supporting this in the qmlglsink for qt6.
<schramm> Sounds interesting, we're also using QML for video playing. Is his code already available somewhere?
f_ has quit [Remote host closed the connection]
f_ has joined #etnaviv
<lynxeye> schramm: Not yet, but the intention is to upstream the patches, so they should show up as soon as they are working as intended.
bl4ckb0ne has quit [Server closed connection]
bl4ckb0ne has joined #etnaviv
<schramm> lynxeye: Good to hear. Will this then end up in Qt src or GStreamer src? I just stumbled upon GstGLQt6VideoItem and this might also be a workaround for now as far as I understand, but would at least require some code rewriting.
sknebel has quit [Server closed connection]
sknebel has joined #etnaviv
sravn has quit [Server closed connection]
sravn has joined #etnaviv
Surkow has quit [Server closed connection]
Surkow has joined #etnaviv
<cphealy> not that it'
<cphealy> s needed but I can attest to this zero-copy method with etnaviv with Qt plugin. I used to use this architecture and it worked great!
<marex> I've been experimenting with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3418 and gstreamer NV12 playback -> dmabuf -> GPU import
<marex> I noticed I need ETNA_MESA_DEBUG="no_ts" else I get the corruption
<marex> austriancoder: lynxeye: ^ any idea why I need to disable the TS ?
<marex> that's on MX8MM, so GC600
<mntirc> > 4 years ago
<mntirc> wow
<marex> mntirc: I got it mostly going
<marex> mntirc: see the end, there is a hint on how-to
<lynxeye> marex: I don't exactly know how the YUV tiler works, but given that it uses the usual RS kicker, the MC might look at tile status when enabled for the source fetch.
<lynxeye> to avoid this you may need to clear the fast clear bit in TS_MEM_CONFIG before kicking the YUV tiler
<lynxeye> and flush the TS cache before and set ETNA_DIRTY_DERIVE_TS afterwards
<marex> (part of it anyway)
<lynxeye> Yep, that seems mostly right. Just also set TS_MEM_CONFIG to 0 after the TS cache flush.
<marex> lynxeye: nope, that hangs the rendering
<marex> lynxeye: but I think you might be onto something
<marex> sec
<marex> shouldn't I clear the depth/color fast clear bits in ctx->framebuffer.TS_MEM_CONFIG and then write it into TS_MEM_CONFIG ?
<marex> hmmm, seems like any manipulation with TS_MEM_CONFIG causes a hang, hmmm
<lynxeye> nope, just emit TS_MEM_CONFIG 0 and then set both ETNA_DIRTY_TS and ETNA_DIRTY_DERIVE_TS
<lynxeye> the state dirty will make sure the framebuffer TS state is correctly emitted next time it is used
<lynxeye> scratch that, you only need the DIRTY_TS
<marex> ahhh
<lynxeye> DERIVE_TS would only be needed if the RS operation changed the validity of the destination surface TS
<marex> hah
<marex> so yeah, setting dirty DERIVE_TS and emitting TS_MEM_CONFIG 0 did the trick, thanks
<marex> lynxeye: I dumped the patch into the MR so others can use it
<austriancoder> marex: why not just update the MR with your latest version?
<marex> austriancoder: isnt it pushed from your repo ?
<marex> austriancoder: it is backed by your repo on fdo gitlab that is
<austriancoder> marex: you should be able to push -f to it. But I can do it in some minutes.
<marex> austriancoder: better review it so it isn't utter garbage full of bugs
lynxeye has quit [Quit: Leaving.]