From: Ian Romanick Date: Wed, 20 Nov 2013 17:09:50 +0000 (-0800) Subject: dri: Allow __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS in driCreateContextAttribs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73e9aa9e3f73d69ce4f0b68e74702d67842a230c;p=mesa.git dri: Allow __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS in driCreateContextAttribs Signed-off-by: Ian Romanick Reported-by: Zhenyu Wang Reviewed-by: Matt Turner Reviewed-by: Kenneth Graunke Cc: "10.0" --- diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 44e47f94f82..0bce77ea9c7 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -407,8 +407,10 @@ driCreateContextAttribs(__DRIscreen *screen, int api, mesa_api = API_OPENGL_CORE; } - if ((flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE)) - != 0) { + const uint32_t allowed_flags = (__DRI_CTX_FLAG_DEBUG + | __DRI_CTX_FLAG_FORWARD_COMPATIBLE + | __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS); + if (flags & ~allowed_flags) { *error = __DRI_CTX_ERROR_UNKNOWN_FLAG; return NULL; }