summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-09-10 17:11:33 +0300
committerIan Romanick <[email protected]>2013-11-07 17:31:16 -0800
commit17c94de33baf66ad5c264b7a046394c651bc6126 (patch)
tree383fc825320a55bc38e559e8c51364cfb2ca5e69 /src/mesa/drivers/dri/common
parent916bc4491a2a7607bf2bd22aa1a5a537285c89c9 (diff)
mesa/dri: Add basic plumbing for GLX_ARB_robustness reset notification strategy
No drivers advertise the DRI2 extension yet, so no driver should ever see a value other than false for notify_reset. The changes in nouveau use tabs because nouveau seems to have it's own indentation rules. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c7
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index c28b0fc4174..8eb2de20853 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -306,6 +306,7 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
unsigned major_version = 1;
unsigned minor_version = 0;
uint32_t flags = 0;
+ bool notify_reset = false;
assert((num_attribs == 0) || (attribs != NULL));
@@ -344,6 +345,10 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
case __DRI_CTX_ATTRIB_FLAGS:
flags = attribs[i * 2 + 1];
break;
+ case __DRI_CTX_ATTRIB_RESET_STRATEGY:
+ notify_reset = (attribs[i * 2 + 1]
+ != __DRI_CTX_RESET_NO_NOTIFICATION);
+ break;
default:
/* We can't create a context that satisfies the requirements of an
* attribute that we don't understand. Return failure.
@@ -424,7 +429,7 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
if (!screen->driver->CreateContext(mesa_api, modes, context,
major_version, minor_version,
- flags, error, shareCtx) ) {
+ flags, notify_reset, error, shareCtx)) {
free(context);
return NULL;
}
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index 5b56061e299..b3c21651611 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -57,6 +57,7 @@
#include <GL/internal/dri_interface.h>
#include "main/mtypes.h"
#include "xmlconfig.h"
+#include <stdbool.h>
/**
* Extensions.
@@ -87,6 +88,7 @@ struct __DriverAPIRec {
unsigned major_version,
unsigned minor_version,
uint32_t flags,
+ bool notify_reset,
unsigned *error,
void *sharedContextPrivate);