[RFC] Add VDPAU drivers to the server's DRI2 implementation
Kristian Høgsberg
krh at bitplanet.net
Tue Nov 3 18:30:33 PST 2009
2009/11/3 Aaron Plattner <aplattner at nvidia.com>:
> The following changes since commit 412c56ef3332d09efbd861e41c3e985f44729729:
> Maarten Maathuis (1):
> exa: remove some outdated comment
>
> are available in the git repository at:
>
> git://people.freedesktop.org/~aplattner/xserver dri2-vdpau
Hi Aaron,
The series looks good, except for the commit that adds
DRI2CheckDriver() in all the protocol entry points. All these entry
points are useful no matter what driver the client has loaded. The
idea is that the client asks the server for buffers to render into
(using DRI2GetBuffers), does the rendering client side and then copies
from the buffer into the X window (using DRI2CopyRegion). This flow
is the same whether you're rendering OpenGL (which is what
DRI2DriverDRI means; yes, it's badly named...), VDPAU, VAAPI,
cairo-drm, or some other client side driver. So all these entry
points shouldn't depend on the DRI2DriverDRI driver to be present,
they should always get passed through to the DDX driver. If one of
the function pointers are NULL and one of the entry points get called
anyway, it's a client error (if the client is not relying on DRI2 for
getting the bits into the X window, it shouldn't be calling those
entry points), but of course that shouldn't crash the server.
Detecting that the function pointers are NULL from dri2ext.c is a
little tricky though. A lot of the dri2.c entry points don't return
error codes, so maybe we can add a function like your
DRI2CheckDriver(), but instead have it return TRUE if all the required
function pointers are non-NULL.
Did we ever commit the DRI2DriverVDPAU token to the dri2proto module?
I don't see it in the dri2tokens.h header. We should get it in there,
since adding VDPAU in the array of driver names effectively allocates
1 as the DRI2DriverVDPAU value.
> Aaron Plattner (4):
> DRI2: Tie the DRI2 module version to the protocol version.
> DRI2: Return BadMatch if the requested driver has not been initialized.
> DRI2: Allow multiple driver names.
> DRI2: Print names of supported drivers in DRI2ScreenInit.
thanks
Kristian
More information about the xorg-devel
mailing list