diff options
author | Ian Romanick <[email protected]> | 2012-09-10 17:31:24 +0300 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-11-07 17:40:05 -0800 |
commit | 7b140d1bdaf07badebdc5ac222ab4ff4d182ebec (patch) | |
tree | 90cb97e5013624b082fd6944a45453651ab78389 /src/gallium/state_trackers/dri | |
parent | 17c94de33baf66ad5c264b7a046394c651bc6126 (diff) |
mesa/dri: Move context flag validation down into the drivers
Soon some drivers will support a different set of flags than other
drivers. If some flags have to be filtered in the driver, we might as
well filter all of them in the driver.
The changes in nouveau use tabs because nouveau seems to have it's own
indentation rules.
v2: Fix some rebase failures noticed by Ken (returning the wrong types,
etc.).
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_context.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c index 5cfd1edfc81..988e28ea244 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.c +++ b/src/gallium/state_trackers/dri/common/dri_context.c @@ -101,6 +101,11 @@ dri_create_context(gl_api api, const struct gl_config * visual, goto fail; } + if (flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE)) { + *error = __DRI_CTX_ERROR_UNKNOWN_FLAG; + goto fail; + } + if (notify_reset) { *error = __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE; goto fail; |