Mesa (10.0): dri: Allow __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS in driCreateContextAttribs

Ian Romanick idr at kemper.freedesktop.org
Thu Nov 28 16:56:14 UTC 2013


Module: Mesa
Branch: 10.0
Commit: 93dfd0522f1d7dcd908380ca6b12cff72b8a2be7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=93dfd0522f1d7dcd908380ca6b12cff72b8a2be7

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Nov 20 09:09:50 2013 -0800

dri: Allow __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS in driCreateContextAttribs

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reported-by: Zhenyu Wang <zhenyuw at linux.intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: "10.0" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 73e9aa9e3f73d69ce4f0b68e74702d67842a230c)

---

 src/mesa/drivers/dri/common/dri_util.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 44e47f9..0bce77e 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;
     }




More information about the mesa-commit mailing list