summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri2.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-04-29 17:52:02 +0200
committerMarek Olšák <[email protected]>2015-05-12 19:38:45 +0200
commitf1c42475a589531919194c95b97e7558b448eb5c (patch)
tree3eb3ed68cdc04d19bad5a06acea05ea158ecf928 /src/gallium/state_trackers/dri/dri2.c
parenta0ad18580335d2255d4e1bf222886418c8e2302e (diff)
st/dri: add support for create_context_robustness GLX and EGL extensions
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri/dri2.c')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 8b6fe67dc91..792d5651698 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1399,6 +1399,10 @@ static __DRI2fenceExtension dri2FenceExtension = {
.server_wait_sync = dri2_server_wait_sync
};
+static const __DRIrobustnessExtension dri2Robustness = {
+ .base = { __DRI2_ROBUSTNESS, 1 }
+};
+
/*
* Backend function init_screen.
*/
@@ -1414,6 +1418,18 @@ static const __DRIextension *dri_screen_extensions[] = {
NULL
};
+static const __DRIextension *dri_robust_screen_extensions[] = {
+ &driTexBufferExtension.base,
+ &dri2FlushExtension.base,
+ &dri2ImageExtension.base,
+ &dri2RendererQueryExtension.base,
+ &dri2ConfigQueryExtension.base,
+ &dri2ThrottleExtension.base,
+ &dri2FenceExtension.base,
+ &dri2Robustness.base,
+ NULL
+};
+
/**
* This is the driver specific part of the createNewScreen entry point.
*
@@ -1467,7 +1483,12 @@ dri2_init_screen(__DRIscreen * sPriv)
}
}
- sPriv->extensions = dri_screen_extensions;
+ if (pscreen->get_param(pscreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY)) {
+ sPriv->extensions = dri_robust_screen_extensions;
+ screen->has_reset_status_query = true;
+ }
+ else
+ sPriv->extensions = dri_screen_extensions;
/* dri_init_screen_helper checks pscreen for us */