summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-02-06 17:13:07 +0100
committerMarek Olšák <[email protected]>2016-02-09 21:19:51 +0100
commit17fe3fa312d26db58b1c441519a92cd029e03727 (patch)
tree541ad34310aed5f08acd145122ee408764d7dd5d /src/mesa
parentd611fce23dce77e674a3fca6e7ed555570efbedb (diff)
gallium: pass the robust buffer access context flag to drivers
radeonsi will not do bounds checking for loads if this is not set. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_manager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index c16fa0b0c72..84b65369d80 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -636,6 +636,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
struct pipe_context *pipe;
struct gl_config mode;
gl_api api;
+ unsigned ctx_flags = 0;
if (!(stapi->profile_mask & (1 << attribs->profile)))
return NULL;
@@ -659,7 +660,10 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
break;
}
- pipe = smapi->screen->context_create(smapi->screen, NULL, 0);
+ if (attribs->flags & ST_CONTEXT_FLAG_ROBUST_ACCESS)
+ ctx_flags |= PIPE_CONTEXT_ROBUST_BUFFER_ACCESS;
+
+ pipe = smapi->screen->context_create(smapi->screen, NULL, ctx_flags);
if (!pipe) {
*error = ST_CONTEXT_ERROR_NO_MEMORY;
return NULL;