diff options
Diffstat (limited to 'lib/mesa/src')
-rw-r--r-- | lib/mesa/src/egl/drivers/dri2/egl_dri2.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/mesa/drivers/dri/i915/intel_buffer_objects.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/mesa/drivers/dri/i915/intel_context.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/mesa/drivers/dri/i965/brw_context.c | 6 | ||||
-rw-r--r-- | lib/mesa/src/mesa/drivers/dri/i965/intel_buffer_objects.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/mesa/drivers/dri/r200/radeon_buffer_objects.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/mesa/main/atifragshader.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/mesa/main/bufferobj.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/mesa/main/bufferobj.h | 4 | ||||
-rw-r--r-- | lib/mesa/src/mesa/state_tracker/st_cb_bufferobjects.c | 3 | ||||
-rw-r--r-- | lib/mesa/src/util/ralloc.c | 1 |
12 files changed, 20 insertions, 10 deletions
diff --git a/lib/mesa/src/egl/drivers/dri2/egl_dri2.c b/lib/mesa/src/egl/drivers/dri2/egl_dri2.c index 10b434269..26aea6e22 100644 --- a/lib/mesa/src/egl/drivers/dri2/egl_dri2.c +++ b/lib/mesa/src/egl/drivers/dri2/egl_dri2.c @@ -236,6 +236,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, case __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE: srgb = value != 0; + if (!disp->Extensions.KHR_gl_colorspace && srgb) + return NULL; break; default: diff --git a/lib/mesa/src/mesa/drivers/dri/i915/intel_buffer_objects.c b/lib/mesa/src/mesa/drivers/dri/i915/intel_buffer_objects.c index ef06743ed..e67609649 100644 --- a/lib/mesa/src/mesa/drivers/dri/i915/intel_buffer_objects.c +++ b/lib/mesa/src/mesa/drivers/dri/i915/intel_buffer_objects.c @@ -99,7 +99,7 @@ intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj) _mesa_align_free(intel_obj->sys_buffer); drm_intel_bo_unreference(intel_obj->buffer); - free(intel_obj); + _mesa_delete_buffer_object(ctx, obj); } diff --git a/lib/mesa/src/mesa/drivers/dri/i915/intel_context.c b/lib/mesa/src/mesa/drivers/dri/i915/intel_context.c index c78010322..fcc5a22db 100644 --- a/lib/mesa/src/mesa/drivers/dri/i915/intel_context.c +++ b/lib/mesa/src/mesa/drivers/dri/i915/intel_context.c @@ -426,6 +426,8 @@ intelInitContext(struct intel_context *intel, return false; } + driContextSetFlags(&intel->ctx, flags); + driContextPriv->driverPrivate = intel; intel->driContext = driContextPriv; diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_context.c b/lib/mesa/src/mesa/drivers/dri/i965/brw_context.c index 2e7b7ed46..b8f40d7fe 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_context.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_context.c @@ -151,8 +151,10 @@ intel_viewport(struct gl_context *ctx) __DRIcontext *driContext = brw->driContext; if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) { - dri2InvalidateDrawable(driContext->driDrawablePriv); - dri2InvalidateDrawable(driContext->driReadablePriv); + if (driContext->driDrawablePriv) + dri2InvalidateDrawable(driContext->driDrawablePriv); + if (driContext->driReadablePriv) + dri2InvalidateDrawable(driContext->driReadablePriv); } } diff --git a/lib/mesa/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/lib/mesa/src/mesa/drivers/dri/i965/intel_buffer_objects.c index ff05b5cd0..f2d68a006 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/intel_buffer_objects.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/intel_buffer_objects.c @@ -167,7 +167,7 @@ brw_delete_buffer(struct gl_context * ctx, struct gl_buffer_object *obj) _mesa_buffer_unmap_all_mappings(ctx, obj); drm_intel_bo_unreference(intel_obj->buffer); - free(intel_obj); + _mesa_delete_buffer_object(ctx, obj); } diff --git a/lib/mesa/src/mesa/drivers/dri/r200/radeon_buffer_objects.c b/lib/mesa/src/mesa/drivers/dri/r200/radeon_buffer_objects.c index d9d4f5ffc..2b76305dd 100644 --- a/lib/mesa/src/mesa/drivers/dri/r200/radeon_buffer_objects.c +++ b/lib/mesa/src/mesa/drivers/dri/r200/radeon_buffer_objects.c @@ -71,7 +71,7 @@ radeonDeleteBufferObject(struct gl_context * ctx, radeon_bo_unref(radeon_obj->bo); } - free(radeon_obj); + _mesa_delete_buffer_object(ctx, obj); } diff --git a/lib/mesa/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/lib/mesa/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c index d9d4f5ffc..2b76305dd 100644 --- a/lib/mesa/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c +++ b/lib/mesa/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c @@ -71,7 +71,7 @@ radeonDeleteBufferObject(struct gl_context * ctx, radeon_bo_unref(radeon_obj->bo); } - free(radeon_obj); + _mesa_delete_buffer_object(ctx, obj); } diff --git a/lib/mesa/src/mesa/main/atifragshader.c b/lib/mesa/src/mesa/main/atifragshader.c index 935ba05b7..3ddc51d60 100644 --- a/lib/mesa/src/mesa/main/atifragshader.c +++ b/lib/mesa/src/mesa/main/atifragshader.c @@ -293,7 +293,7 @@ _mesa_DeleteFragmentShaderATI(GLuint id) prog->RefCount--; if (prog->RefCount <= 0) { assert(prog != &DummyShader); - free(prog); + _mesa_delete_ati_fragment_shader(ctx, prog); } } } diff --git a/lib/mesa/src/mesa/main/bufferobj.c b/lib/mesa/src/mesa/main/bufferobj.c index e17b41ce5..9fb008e45 100644 --- a/lib/mesa/src/mesa/main/bufferobj.c +++ b/lib/mesa/src/mesa/main/bufferobj.c @@ -412,7 +412,7 @@ _mesa_new_buffer_object(struct gl_context *ctx, GLuint name) * * Default callback for the \c dd_function_table::DeleteBuffer() hook. */ -static void +void _mesa_delete_buffer_object(struct gl_context *ctx, struct gl_buffer_object *bufObj) { diff --git a/lib/mesa/src/mesa/main/bufferobj.h b/lib/mesa/src/mesa/main/bufferobj.h index b5d73aec0..57f805281 100644 --- a/lib/mesa/src/mesa/main/bufferobj.h +++ b/lib/mesa/src/mesa/main/bufferobj.h @@ -110,6 +110,10 @@ _mesa_initialize_buffer_object(struct gl_context *ctx, GLuint name); extern void +_mesa_delete_buffer_object(struct gl_context *ctx, + struct gl_buffer_object *bufObj); + +extern void _mesa_reference_buffer_object_(struct gl_context *ctx, struct gl_buffer_object **ptr, struct gl_buffer_object *bufObj); diff --git a/lib/mesa/src/mesa/state_tracker/st_cb_bufferobjects.c b/lib/mesa/src/mesa/state_tracker/st_cb_bufferobjects.c index db254c214..157d974a0 100644 --- a/lib/mesa/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/lib/mesa/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -83,8 +83,7 @@ st_bufferobj_free(struct gl_context *ctx, struct gl_buffer_object *obj) if (st_obj->buffer) pipe_resource_reference(&st_obj->buffer, NULL); - free(st_obj->Base.Label); - free(st_obj); + _mesa_delete_buffer_object(ctx, obj); } diff --git a/lib/mesa/src/util/ralloc.c b/lib/mesa/src/util/ralloc.c index 01719c888..643df7662 100644 --- a/lib/mesa/src/util/ralloc.c +++ b/lib/mesa/src/util/ralloc.c @@ -293,6 +293,7 @@ ralloc_adopt(const void *new_ctx, void *old_ctx) /* Connect the two lists together; parent them to new_ctx; make old_ctx empty. */ child->next = new_info->child; + child->parent = new_info; new_info->child = old_info->child; old_info->child = NULL; } |