DRI2: If the SDK supports it, use the DRI2GetBuffersWithFormat interfaces
If DRI2INFOREC_VERSION is defined in the server's dri2.h and has a
value greater than 1, compile to use the CreateBuffer and
DestroyBuffer interfaces. The format parameter parameter to
CreateBuffer is assumed to be the bits-per-pixel of the buffer.
Signed-off-by: Ian Romanick <email address hidden>
Reviewed-by: Kristian Høgsberg <email address hidden>
(cherry picked from commit 5d6f4f6eb7a4dcbe1ce5a134d882e56f958ed2ba)
If a virtual display with width > 2048 is used, the first time
an XV buffer is needed will result in a BadAlloc error message,
but the next time X would crash.
Signed-off-by: Eric Anholt <email address hidden>
(cherry picked from commit d7ca870e1ce251d42e3689a8e1e7d080ab1325fb)