So I've hit a bit of a init ordering issue that I'm not sure how best to solve,
Just some background: In order for the virt GPU and the UI layer (SDL or GTK etc) to interact properly over OpenGL use, I have created and OpenGL provider in the console, and the UI layer can register callbacks for a single GL provider (only one makes sense really) when it starts up. This is mainly to be used for context management and swap buffers management. Now in the virtio GPU I'd was going to use a virtio feature to say whether the qemu hw can support the 3D renderer, dependant on whether it was linked with the virgl renderer and whether the current UI was GL capable. I also have the virtio gpu code checking in its update_display callback whether the first console has acquired a GL backend. Now the problem: The virtio hw is initialised before the console layers. So the feature bits are all set at that point, before the UI ever registers a GL interface layer. So is there a method to modify the advertised feature bits later in the setup sequence before the guest is started? Can I call something from the update display callback? Otherwise I was thinking I would need something in my config space on top of feature bits to say the hw is actually 3d capable. Dave.
