summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c5
-rw-r--r--src/mesa/drivers/x11/xm_api.c7
-rw-r--r--src/mesa/main/context.c5
4 files changed, 5 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 03db8b1c68..ab1cf40387 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -38,7 +38,6 @@
#include "swrast_setup/swrast_setup.h"
#include "tnl/tnl.h"
#include "drivers/common/driverfuncs.h"
-#include "drivers/common/meta.h"
#include "i830_dri.h"
@@ -712,8 +711,6 @@ intelInitContext(struct intel_context *intel,
_swrast_allow_pixel_fog(ctx, GL_FALSE);
_swrast_allow_vertex_fog(ctx, GL_TRUE);
- _mesa_meta_init(ctx);
-
intel->hw_stencil = mesaVis->stencilBits && mesaVis->depthBits == 24;
intel->hw_stipple = 1;
@@ -817,8 +814,6 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
INTEL_FIREVERTICES(intel);
- _mesa_meta_free(&intel->ctx);
-
meta_destroy_metaops(&intel->meta);
intel->vtbl.destroy(intel);
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 1c53c04da7..d4bea86796 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -37,7 +37,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "utils.h"
#include "vblank.h"
#include "drirenderbuffer.h"
-#include "drivers/common/meta.h"
#include "main/context.h"
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
@@ -209,8 +208,6 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
meta_init_metaops(ctx, &radeon->meta);
- _mesa_meta_init(ctx);
-
/* DRI fields */
radeon->dri.context = driContextPriv;
radeon->dri.screen = sPriv;
@@ -306,8 +303,6 @@ void radeonDestroyContext(__DRIcontextPrivate *driContextPriv )
assert(radeon);
- _mesa_meta_free(radeon->glCtx);
-
if (radeon == current) {
radeon_firevertices(radeon);
_mesa_make_current(NULL, NULL, NULL);
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 662c61ae7e..90efd86a6b 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -79,7 +79,6 @@
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
#include "drivers/common/driverfuncs.h"
-#include "drivers/common/meta.h"
/**
* Global X driver lock
@@ -1648,9 +1647,6 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
xmesa_register_swrast_functions( mesaCtx );
_swsetup_Wakeup(mesaCtx);
- if (TEST_META_FUNCS)
- _mesa_meta_init(mesaCtx);
-
return c;
}
@@ -1665,9 +1661,6 @@ void XMesaDestroyContext( XMesaContext c )
FXdestroyContext( XMESA_BUFFER(mesaCtx->DrawBuffer) );
#endif
- if (TEST_META_FUNCS)
- _mesa_meta_free( mesaCtx );
-
_swsetup_DestroyContext( mesaCtx );
_swrast_DestroyContext( mesaCtx );
_tnl_DestroyContext( mesaCtx );
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index f6d4ac4595..4c69e688da 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -149,6 +149,7 @@
#include "version.h"
#include "viewport.h"
#include "vtxfmt.h"
+#include "drivers/common/meta.h"
#include "glapi/glthread.h"
#include "glapi/glapioffsets.h"
#include "glapi/glapitable.h"
@@ -926,6 +927,8 @@ _mesa_initialize_context(GLcontext *ctx,
_mesa_initialize_context_extra(ctx);
#endif
+ _mesa_meta_init(ctx);
+
ctx->FirstTimeCurrent = GL_TRUE;
return GL_TRUE;
@@ -991,6 +994,8 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_make_current(ctx, NULL, NULL);
}
+ _mesa_meta_free(ctx);
+
/* unreference WinSysDraw/Read buffers */
_mesa_reference_framebuffer(&ctx->WinSysDrawBuffer, NULL);
_mesa_reference_framebuffer(&ctx->WinSysReadBuffer, NULL);