From: Eric Anholt Date: Fri, 18 May 2007 21:14:12 +0000 (-0700) Subject: Merge branch 'master' into i915-unification X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1bdee1853627e08894bd267b8f0ec176a1b5978f;p=mesa.git Merge branch 'master' into i915-unification Conflicts: src/mesa/drivers/dri/common/dri_bufmgr.c src/mesa/drivers/dri/common/dri_drmpool.c src/mesa/drivers/dri/i915tex/intel_batchpool.c src/mesa/drivers/dri/i915tex/intel_buffer_objects.c src/mesa/drivers/dri/i915tex/intel_regions.c src/mesa/drivers/dri/i915tex/intel_screen.c src/mesa/drivers/dri/i915tex/intel_screen.h --- 1bdee1853627e08894bd267b8f0ec176a1b5978f diff --cc src/mesa/drivers/dri/common/dri_bufmgr.c index dd76e8ead65,eaa4fb09c70..154e7841a04 --- a/src/mesa/drivers/dri/common/dri_bufmgr.c +++ b/src/mesa/drivers/dri/common/dri_bufmgr.c @@@ -110,26 -475,25 +110,25 @@@ dri_fence_unreference(dri_fence *fence } void -driBOFence(struct _DriBufferObject *buf, struct _DriFenceObject *fence) +dri_bo_subdata(dri_bo *bo, unsigned long offset, + unsigned long size, const void *data) { - _glthread_LOCK_MUTEX(buf->mutex); - BM_CKFATAL(buf->pool->fence(buf->pool, buf->private, fence)); - _glthread_UNLOCK_MUTEX(buf->mutex); + if (size == 0 || data == NULL) + return; + dri_bo_map(bo, GL_TRUE); + memcpy((unsigned char *)bo->virtual + offset, data, size); + dri_bo_unmap(bo); } - void -driBOValidateList(int fd, drmBOList * list) +dri_bo_get_subdata(dri_bo *bo, unsigned long offset, + unsigned long size, void *data) { - _glthread_LOCK_MUTEX(bmMutex); - BM_CKFATAL(drmBOValidateList(fd, list)); - _glthread_UNLOCK_MUTEX(bmMutex); -} - -void -driPoolTakeDown(struct _DriBufferPool *pool) -{ - pool->takeDown(pool); + if (size == 0 || data == NULL) + return; + dri_bo_map(bo, GL_FALSE); + memcpy(data, (unsigned char *)bo->virtual + offset, size); + dri_bo_unmap(bo); }