diff options
author | nobled <[email protected]> | 2010-08-30 20:23:54 +0000 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-09-08 17:25:01 +0800 |
commit | 8e3b658b7fdc1c2a2b9b6bd942a811adbf1ac4ab (patch) | |
tree | a7863aa7d00182bda0ca9bdf834df3a2ad6bd2ad /src/gallium/state_trackers/dri/drm | |
parent | ecd7ec9d62d2ba919410218f4cf3f69772681f3c (diff) |
st/dri: Add multi-api support
Make st/dri screens capable of creating OpenGL ES and
OpenGL ES2 contexts.
TODO: Figure out the "get_current" problem with multiple
st_api's for real.
(s/API_OPENGLES1/API_OPENGLES/ by Chia-I Wu)
Diffstat (limited to 'src/gallium/state_trackers/dri/drm')
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 93f910a26d6..7a56788184d 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -439,6 +439,14 @@ dri2_init_screen(__DRIscreen * sPriv) if (!configs) goto fail; + sPriv->api_mask = 0; + if (screen->st_api[API_OPENGL]) + sPriv->api_mask |= 1 << __DRI_API_OPENGL; + if (screen->st_api[API_OPENGLES1]) + sPriv->api_mask |= 1 << __DRI_API_GLES; + if (screen->st_api[API_OPENGLES2]) + sPriv->api_mask |= 1 << __DRI_API_GLES2; + screen->auto_fake_front = dri_with_format(sPriv); screen->broken_invalidate = !sPriv->dri2.useInvalidate; |