diff options
author | Ian Romanick <[email protected]> | 2011-12-13 15:46:20 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-12-23 08:49:50 -0800 |
commit | d18152028e1825c05c7de33acacee3336350a096 (patch) | |
tree | cbfe88a4d0c18ff5e1c2d5ec4a4cf9eaf74875f2 /src/gallium/include/state_tracker | |
parent | 358ecff1ea0fa8432fd46bd3deeb8d2d694b5550 (diff) |
st-api: Have context_create explain why creation failed
This won't be used in the client-side libGL, but the xserver has to
generate a different protocol error depending on the reason context
creation failed.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/include/state_tracker')
-rw-r--r-- | src/gallium/include/state_tracker/st_api.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 3267cb25ef0..da49dc80fca 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -80,6 +80,19 @@ enum st_profile_type #define ST_CONTEXT_FLAG_ROBUST_ACCESS (1 << 2) /** + * Reasons that context creation might fail. + */ +enum st_context_error { + ST_CONTEXT_SUCCESS = 0, + ST_CONTEXT_ERROR_NO_MEMORY, + ST_CONTEXT_ERROR_BAD_API, + ST_CONTEXT_ERROR_BAD_VERSION, + ST_CONTEXT_ERROR_BAD_FLAG, + ST_CONTEXT_ERROR_UNKNOWN_ATTRIBUTE, + ST_CONTEXT_ERROR_UNKNOWN_FLAG +}; + +/** * Used in st_context_iface->teximage. */ enum st_texture_type { @@ -434,6 +447,7 @@ struct st_api struct st_context_iface *(*create_context)(struct st_api *stapi, struct st_manager *smapi, const struct st_context_attribs *attribs, + enum st_context_error *error, struct st_context_iface *stsharei); /** |