aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorElie Tournier <[email protected]>2018-09-06 10:46:32 +0100
committerMarek Olšák <[email protected]>2018-09-10 15:30:17 -0400
commit9179c745f646a85274b7a295ee3577e48f8d0d3f (patch)
tree3715cbca0d75df6a1c45bd7bb6fbf9c7a3aca633 /src/mesa
parentf6e09db2e613c215257b80f40957d580165b5ddf (diff)
gallium: Correctly handle no config context creation
This patch fixes the following Piglit test: spec@egl_mesa_configless_context@basic It also fixes few test in a virgl guest. v2: Evaluate the value of no_config (Ilia) Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Elie Tournier <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_manager.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index a3f00228942..400af939b29 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -835,6 +835,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
struct st_context *shared_ctx = (struct st_context *) shared_stctxi;
struct st_context *st;
struct pipe_context *pipe;
+ struct gl_config* mode_ptr;
struct gl_config mode;
gl_api api;
bool no_error = false;
@@ -894,7 +895,13 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
}
st_visual_to_context_mode(&attribs->visual, &mode);
- st = st_create_context(api, pipe, &mode, shared_ctx,
+
+ if (attribs->visual.no_config)
+ mode_ptr = NULL;
+ else
+ mode_ptr = &mode;
+
+ st = st_create_context(api, pipe, mode_ptr, shared_ctx,
&attribs->options, no_error);
if (!st) {
*error = ST_CONTEXT_ERROR_NO_MEMORY;