diff options
author | Christoph Bumiller <[email protected]> | 2012-05-21 23:46:11 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-05-29 15:01:41 +0200 |
commit | f80c2874eca86a12517fbe2f4c15287edfb4dc89 (patch) | |
tree | cbe6d3abf5a18eaea7348337712da66ee1337614 /src/gallium/include/state_tracker | |
parent | 6404095fbab74a6194081374bd56786d07c5d561 (diff) |
gallium: add st_api feature mask to prevent advertising MS visuals
v2: use a define for the maximum sample count
v3: also test odd sample counts (r300 supports MS3)
While multisample renderbuffers are supported by mesa, MS visuals
are not, so we need a way to tell dri/st not to advertise them even
if the gallium driver does support multisampled surfaces.
Otherwise applications selecting these non-functional visuals would
run into trouble ...
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/include/state_tracker')
-rw-r--r-- | src/gallium/include/state_tracker/st_api.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 3af1dfc6d4d..86ab02d2883 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -70,6 +70,17 @@ enum st_profile_type #define ST_PROFILE_OPENGL_ES2_MASK (1 << ST_PROFILE_OPENGL_ES2) /** + * Optional API/state tracker features. + */ +enum st_api_feature +{ + ST_API_FEATURE_MS_VISUALS /**< support for multisample visuals */ +}; + +/* for feature_mask in st_api */ +#define ST_API_FEATURE_MS_VISUALS_MASK (1 << ST_API_FEATURE_MS_VISUALS) + +/** * New context flags for GL 3.0 and beyond. * * Profile information (core vs. compatibilty for OpenGL 3.2+) is communicated @@ -430,6 +441,11 @@ struct st_api unsigned profile_mask; /** + * The supported optional features. Tested with ST_FEATURE_*_MASK. + */ + unsigned feature_mask; + + /** * Destroy the API. */ void (*destroy)(struct st_api *stapi); |