diff options
author | Chia-I Wu <[email protected]> | 2010-09-08 17:41:43 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-09-08 18:20:44 +0800 |
commit | 444d8408e75bb2bce019769da59802f05c3d5fab (patch) | |
tree | 9913fda53f6727f2d09da92e5f0aaa0b11f9cc34 /src/gallium/state_trackers/dri/common/dri_screen.c | |
parent | 8e3b658b7fdc1c2a2b9b6bd942a811adbf1ac4ab (diff) |
st/dri: Use enum st_api_type internally.
Diffstat (limited to 'src/gallium/state_trackers/dri/common/dri_screen.c')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 853ee1e5fab..9d13d0d52e1 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -344,10 +344,12 @@ dri_destroy_option_cache(struct dri_screen * screen) void dri_destroy_screen_helper(struct dri_screen * screen) { - gl_api api; - for (api = API_OPENGL; api <= API_OPENGLES2; ++api) - if (screen->st_api[api] && screen->st_api[api]->destroy) - screen->st_api[api]->destroy(screen->st_api[api]); + int i; + + for (i = 0; i < ST_API_COUNT; i++) { + if (screen->st_api[i] && screen->st_api[i]->destroy) + screen->st_api[i]->destroy(screen->st_api[i]); + } if (screen->base.screen) screen->base.screen->destroy(screen->base.screen); @@ -381,13 +383,14 @@ dri_init_screen_helper(struct dri_screen *screen, screen->base.get_egl_image = dri_get_egl_image; screen->base.get_param = dri_get_param; - screen->st_api[API_OPENGL] = st_gl_api_create(); - screen->st_api[API_OPENGLES1] = st_gl_api_create_es1(); - screen->st_api[API_OPENGLES2] = st_gl_api_create_es2(); + screen->st_api[ST_API_OPENGL] = st_gl_api_create(); + screen->st_api[ST_API_OPENGL_ES1] = st_gl_api_create_es1(); + screen->st_api[ST_API_OPENGL_ES2] = st_gl_api_create_es2(); + /* no ST_API_OPENVG */ - if (!screen->st_api[API_OPENGL] && - !screen->st_api[API_OPENGLES1] && - !screen->st_api[API_OPENGLES2]) + if (!screen->st_api[ST_API_OPENGL] && + !screen->st_api[ST_API_OPENGL_ES1] && + !screen->st_api[ST_API_OPENGL_ES2]) return NULL; if(pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES)) |