Merge branch 'master' into i915-unification
authorEric Anholt <eric@anholt.net>
Fri, 18 May 2007 21:14:12 +0000 (14:14 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 18 May 2007 21:14:12 +0000 (14:14 -0700)
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

1  2 
src/mesa/drivers/dri/Makefile.template
src/mesa/drivers/dri/common/dri_bufmgr.c
src/mesa/drivers/dri/i915tex/intel_context.c
src/mesa/drivers/dri/i915tex/intel_screen.c

index dd76e8ead6556a4e5dd4389e6bfcfaf0c3d5d4cb,eaa4fb09c70a8054cf2327a292ac8a545a7d5e43..154e7841a04d6af73861c8c333414e97514b901c
@@@ -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);
  }