[Mesa-dev] [PATCH 1/5] include/GL: add mesa_glinterop.h for OpenGL-OpenCL interop (v3)

Emil Velikov emil.l.velikov at gmail.com
Wed Mar 9 15:31:08 UTC 2016


On 8 March 2016 at 22:29, Marek Olšák <maraeo at gmail.com> wrote:

> Actually, I don't see how the version number would make it any better
> for the structures, but returning the version number by
> QueryDeviceInfo would be useful for the caller to know what to expect
> if Mesa version < caller version. The sizes are still useful if Mesa
> version > caller version.
>
If any of this is an issue, then the whole DRI model just won't work ;-)

I'm thinking that the following should work. Please let me know if I'm
loosing the plot.

Caller sets the structure and sets version of the interface it
provides. Then callee first checks if it can work with the provider
version. then proceeds as planned.
Passing around multiple sizes is ugly and error prone to a point. One
gets the order wrong (swaps in_size and out_size) or just the same
sizeof(struct foo) in both places.

Thanks
Emil


More information about the mesa-dev mailing list