diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2012-08-19 21:17:58 -0700 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2012-08-19 21:29:29 -0700 |
commit | d75481ed7d89d7c83f61dd943462d2d93a2d824e (patch) | |
tree | 44cea208ba64603b7c51e85492a4537a91ee83d1 | |
parent | 6a1cf7411b3c9a0b6dbba89cde78a42f1507a787 (diff) |
include: Rename error to WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM
The new name is more clearly conveys the error meaning than the old name,
WAFFLE_ERROR_UNSUPPORTED.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r-- | include/waffle/waffle_error.h | 2 | ||||
-rw-r--r-- | src/waffle/api/waffle_error.c | 2 | ||||
-rw-r--r-- | src/waffle/cgl/cgl_config.m | 2 | ||||
-rw-r--r-- | src/waffle/cgl/cgl_context.m | 2 | ||||
-rw-r--r-- | src/waffle/cgl/cgl_display.m | 2 | ||||
-rw-r--r-- | src/waffle/cgl/cgl_window.m | 2 | ||||
-rw-r--r-- | src/waffle/egl/egl_no_native.c | 10 | ||||
-rw-r--r-- | src/waffle/glx/glx_config.c | 10 | ||||
-rw-r--r-- | tests/functional/gl_basic_test.c | 4 |
9 files changed, 18 insertions, 18 deletions
diff --git a/include/waffle/waffle_error.h b/include/waffle/waffle_error.h index 96e8272..1aee820 100644 --- a/include/waffle/waffle_error.h +++ b/include/waffle/waffle_error.h @@ -138,7 +138,7 @@ enum waffle_error { /// when the current platform is GLX. /// - Calling `waffle_dl_sym(WAFFLE_DL_OPENGL_ES2, ...)` when the /// OpenGL ES2 library is not present on the system. - WAFFLE_ERROR_UNSUPPORTED = 0x12, + WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM = 0x12, }; #ifdef __cplusplus diff --git a/src/waffle/api/waffle_error.c b/src/waffle/api/waffle_error.c index d5e4cef..cf865bd 100644 --- a/src/waffle/api/waffle_error.c +++ b/src/waffle/api/waffle_error.c @@ -58,7 +58,7 @@ waffle_error_to_string(int32_t e) CASE(WAFFLE_ERROR_BAD_ATTRIBUTE); CASE(WAFFLE_ERROR_BAD_PARAMETER); CASE(WAFFLE_ERROR_BAD_DISPLAY_MATCH); - CASE(WAFFLE_ERROR_UNSUPPORTED); + CASE(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM); default: return 0; #undef CASE } diff --git a/src/waffle/cgl/cgl_config.m b/src/waffle/cgl/cgl_config.m index 2c4fa6e..90e8333 100644 --- a/src/waffle/cgl/cgl_config.m +++ b/src/waffle/cgl/cgl_config.m @@ -197,7 +197,7 @@ error: static union waffle_native_config* cgl_config_get_native(struct wcore_config *wc_self) { - wcore_error(WAFFLE_ERROR_UNSUPPORTED); + wcore_error(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM); return NULL; } diff --git a/src/waffle/cgl/cgl_context.m b/src/waffle/cgl/cgl_context.m index d10037c..2ecd743 100644 --- a/src/waffle/cgl/cgl_context.m +++ b/src/waffle/cgl/cgl_context.m @@ -104,7 +104,7 @@ fail: static union waffle_native_context* cgl_context_get_native(struct wcore_context *wc_self) { - wcore_error(WAFFLE_ERROR_UNSUPPORTED); + wcore_error(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM); return NULL; } diff --git a/src/waffle/cgl/cgl_display.m b/src/waffle/cgl/cgl_display.m index f70f3e2..aa920ac 100644 --- a/src/waffle/cgl/cgl_display.m +++ b/src/waffle/cgl/cgl_display.m @@ -94,7 +94,7 @@ cgl_display_supports_context_api(struct wcore_display *wc_self, static union waffle_native_display* cgl_display_get_native(struct wcore_display *wc_self) { - wcore_error(WAFFLE_ERROR_UNSUPPORTED); + wcore_error(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM); return NULL; } diff --git a/src/waffle/cgl/cgl_window.m b/src/waffle/cgl/cgl_window.m index 5400697..9be05a2 100644 --- a/src/waffle/cgl/cgl_window.m +++ b/src/waffle/cgl/cgl_window.m @@ -145,7 +145,7 @@ cgl_window_swap_buffers(struct wcore_window *wc_self) static union waffle_native_window* cgl_window_get_native(struct wcore_window *wc_self) { - wcore_error(WAFFLE_ERROR_UNSUPPORTED); + wcore_error(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM); return NULL; } diff --git a/src/waffle/egl/egl_no_native.c b/src/waffle/egl/egl_no_native.c index 63b5f90..512fd57 100644 --- a/src/waffle/egl/egl_no_native.c +++ b/src/waffle/egl/egl_no_native.c @@ -96,27 +96,27 @@ egl_config_check_context_attrs( switch (attrs->context_api) { case WAFFLE_CONTEXT_OPENGL: if (version != 10) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "on EGL, the requested version of OpenGL must be " "the default value 1.0"); return false; } if (!plat->vtbl->dl_can_open(plat, WAFFLE_DL_OPENGL)) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "failed to open the OpenGL library"); return false; } return true; case WAFFLE_CONTEXT_OPENGL_ES1: if (!plat->vtbl->dl_can_open(plat, WAFFLE_DL_OPENGL_ES1)) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "failed to open the OpenGL ES1 library"); return false; } return true; case WAFFLE_CONTEXT_OPENGL_ES2: if (!plat->vtbl->dl_can_open(plat, WAFFLE_DL_OPENGL_ES2)) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "failed to open the OpenGL ES2 library"); return false; } @@ -140,7 +140,7 @@ egl_choose_config( return false; if (attrs->accum_buffer) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "accum buffers do not exist on EGL"); return false; } diff --git a/src/waffle/glx/glx_config.c b/src/waffle/glx/glx_config.c index d3b88a6..2a36400 100644 --- a/src/waffle/glx/glx_config.c +++ b/src/waffle/glx/glx_config.c @@ -63,14 +63,14 @@ glx_config_check_context_attrs(struct glx_display *dpy, switch (attrs->context_api) { case WAFFLE_CONTEXT_OPENGL: if (version != 10 && !dpy->extensions.ARB_create_context) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "GLX_ARB_create_context is required in order to " "request a GL version not equal to the default " "value 1.0"); return false; } else if (version >= 32 && !dpy->extensions.EXT_create_context_es2_profile) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "GLX_EXT_create_context_es2_profile is required " "to create a context with version >= 3.2"); return false; @@ -83,19 +83,19 @@ glx_config_check_context_attrs(struct glx_display *dpy, } return true; case WAFFLE_CONTEXT_OPENGL_ES1: - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "GLX does not support OpenGL ES1"); return false; case WAFFLE_CONTEXT_OPENGL_ES2: if (!dpy->extensions.EXT_create_context_es2_profile) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "GLX_EXT_create_context_es2_profile is required " "to create an OpenGL ES2 context"); return false; } if (!linux_platform_dl_can_open(plat->linux, WAFFLE_DL_OPENGL_ES2)) { - wcore_errorf(WAFFLE_ERROR_UNSUPPORTED, + wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, "failed to open the OpenGL ES2 library"); return false; } diff --git a/tests/functional/gl_basic_test.c b/tests/functional/gl_basic_test.c index b90ecad..db53f4e 100644 --- a/tests/functional/gl_basic_test.c +++ b/tests/functional/gl_basic_test.c @@ -198,7 +198,7 @@ gl_basic_draw(int32_t waffle_context_api, int32_t alpha) config = waffle_config_choose(dpy, config_attrib_list); if (!config) { - if (waffle_error_get_code() == WAFFLE_ERROR_UNSUPPORTED) + if (waffle_error_get_code() == WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM) TEST_SKIP(); else TEST_FAIL(); @@ -210,7 +210,7 @@ gl_basic_draw(int32_t waffle_context_api, int32_t alpha) ctx = waffle_context_create(config, NULL); if (!ctx) { - if (waffle_error_get_code() == WAFFLE_ERROR_UNSUPPORTED) + if (waffle_error_get_code() == WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM) TEST_SKIP(); else TEST_FAIL(); |