diff options
author | Adam Jackson <[email protected]> | 2018-08-07 16:55:37 -0400 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2018-11-07 12:38:05 -0500 |
commit | 16f1023037908a683c62521af4d44e28023f2630 (patch) | |
tree | 012bb55162844f2e7cffdb9c641754144e57120c /src/intel/Android.dev.mk | |
parent | f7fae7f64e126d0a92bc1f5f875164f77232364d (diff) |
glx: Demand success from CreateContext requests (v2)
GLXCreate{,New}Context, like most X resource creation requests, does not
emit a reply and therefore is emitted into the X stream asynchronously.
However, unlike most resource creation requests, the GLXContext we
return is a handle to library state instead of an XID. So if context
creation fails for any reason - say, the server doesn't support indirect
contexts - then we will fail in strange places for strange reasons.
We could make every GLX entrypoint robust against half-created contexts,
or we could just verify that context creation worked. Reuse the
__glXIsDirect code to do this, as a cheap way of verifying that the
XID is real.
glXCreateContextAttribsARB solves this by using the _checked version of
the xcb command, so effectively this change makes the classic context
creation paths as robust as CreateContextAttribs.
v2: Better use of Bool, check that error != NULL first (Olivier Fourdan)
Signed-off-by: Adam Jackson <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/intel/Android.dev.mk')
0 files changed, 0 insertions, 0 deletions