So, I've had a chat with Gerry Boland (former primary developer of QtMir) and while this is not entirely straightforward to adapt QtMir to it does look feasible.
The relevant changes would be in MirSurfaceItem. Excerpts of the relevant IRC log:
to provide shaders, need to implement QSGMaterial somehow - https://doc.qt.io/qt-5/qsgsimplematerialshader.html
and then use it in https://doc.qt.io/qt-5/qsggeometrynode.html#setMaterial
https://codereview.qt-project.org/#/c/70577/7/lib/yuv_video_node.cpp looks vaguely appropriate.
YUVAVideoMaterial is an implementation of QSGMaterial, whose createShader() implementation returns that handy QSGMaterialShader
I think that's a good template to follow
QtMir would need to have a
QSGMaterialthat also derived from
mir::graphics::gl::Program, and took the necessary shader fragments and smushed them into the shader source it returns.
Provide that as the
mir::graphics::gl::ProgramFactoryand then the
Texturewill supply you with the appropriate