diff options
author | Neil Roberts <[email protected]> | 2014-03-07 18:05:47 +0000 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2014-03-12 14:40:47 -0700 |
commit | 551d459af421a2eb937e9e16301bb64da4624f89 (patch) | |
tree | ba2399deac65bbb2ce5d913d3936db145ff632a6 /src/mesa/drivers/dri | |
parent | 4b17dff3e5128bef67ea79d20624e878c3b48729 (diff) |
Add the EGL_MESA_configless_context extension
This extension provides a way for an application to render to multiple
surfaces with different buffer formats without having to use multiple
contexts. An EGLContext can be created without an EGLConfig by passing
EGL_NO_CONFIG_MESA. In that case there are no restrictions on the surfaces
that can be used with the context apart from that they must be using the same
EGLDisplay.
_mesa_initialze_context can now take a NULL gl_config which will mark the
context as ‘configless’. It will memset the visual to zero in that case.
Previously the i965 and i915 drivers were explicitly creating a zeroed visual
whenever 0 is passed for the EGLConfig. Mesa needs to be aware that the
context is configless because it affects the initial value to use for
glDrawBuffer. The first time the context is bound it will set the initial
value for configless contexts depending on whether the framebuffer used is
double-buffered.
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 0cb1fea523b..a6057d3334e 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -410,7 +410,6 @@ intelInitContext(struct intel_context *intel, __DRIscreen *sPriv = driContextPriv->driScreenPriv; struct intel_screen *intelScreen = sPriv->driverPrivate; int bo_reuse_mode; - struct gl_config visual; /* Can't rely on invalidate events, fall back to glViewport hack */ if (!driContextPriv->driScreenPriv->dri2.useInvalidate) @@ -418,11 +417,6 @@ intelInitContext(struct intel_context *intel, else functions->Viewport = intel_viewport; - if (mesaVis == NULL) { - memset(&visual, 0, sizeof visual); - mesaVis = &visual; - } - intel->intelScreen = intelScreen; if (!_mesa_initialize_context(&intel->ctx, api, mesaVis, shareCtx, diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index c9719f5bde6..de58d515ddb 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -584,7 +584,6 @@ brwCreateContext(gl_api api, struct intel_screen *screen = sPriv->driverPrivate; const struct brw_device_info *devinfo = screen->devinfo; struct dd_function_table functions; - struct gl_config visual; /* Only allow the __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag if the kernel * provides us with context reset notifications. @@ -651,11 +650,6 @@ brwCreateContext(gl_api api, struct gl_context *ctx = &brw->ctx; - if (mesaVis == NULL) { - memset(&visual, 0, sizeof visual); - mesaVis = &visual; - } - if (!_mesa_initialize_context(ctx, api, mesaVis, shareCtx, &functions)) { *dri_ctx_error = __DRI_CTX_ERROR_NO_MEMORY; fprintf(stderr, "%s: failed to init mesa context\n", __FUNCTION__); |