From da56df9d722a2eb8223434d130436bcb6ea47188 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 16 Apr 2007 16:04:12 +0200 Subject: Make sure we are locked when creating drm buffer objects. Don't place buffer objects on unfenced list when newly created. Fix a buffer object wait-for-idle deadlock. --- src/mesa/drivers/dri/common/dri_bufmgr.c | 12 +++++++++--- src/mesa/drivers/dri/common/dri_drmpool.c | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/dri/common') diff --git a/src/mesa/drivers/dri/common/dri_bufmgr.c b/src/mesa/drivers/dri/common/dri_bufmgr.c index 65d6545965..eaa4fb09c7 100644 --- a/src/mesa/drivers/dri/common/dri_bufmgr.c +++ b/src/mesa/drivers/dri/common/dri_bufmgr.c @@ -190,11 +190,16 @@ driBOKernel(struct _DriBufferObject *buf) void driBOWaitIdle(struct _DriBufferObject *buf, int lazy) { - assert(buf->private != NULL); + struct _DriBufferPool *pool; + void *priv; _glthread_LOCK_MUTEX(buf->mutex); - BM_CKFATAL(buf->pool->waitIdle(buf->pool, buf->private, lazy)); + pool = buf->pool; + priv = buf->private; _glthread_UNLOCK_MUTEX(buf->mutex); + + assert(priv != NULL); + BM_CKFATAL(buf->pool->waitIdle(pool, priv, lazy)); } void * @@ -296,7 +301,8 @@ driBOData(struct _DriBufferObject *buf, pool->destroy(pool, buf->private); if (!flags) flags = buf->flags; - buf->private = pool->create(pool, size, flags, 0, buf->alignment); + buf->private = pool->create(pool, size, flags, DRM_BO_HINT_DONT_FENCE, + buf->alignment); if (!buf->private) BM_CKFATAL(-ENOMEM); BM_CKFATAL(pool->map(pool, buf->private, diff --git a/src/mesa/drivers/dri/common/dri_drmpool.c b/src/mesa/drivers/dri/common/dri_drmpool.c index b5b324be50..878a148b39 100644 --- a/src/mesa/drivers/dri/common/dri_drmpool.c +++ b/src/mesa/drivers/dri/common/dri_drmpool.c @@ -185,7 +185,7 @@ pool_setstatic(struct _DriBufferPool *pool, unsigned long offset, return NULL; ret = drmBOCreate(pool->fd, offset, size, 0, NULL, drm_bo_type_fake, - flags, 0, buf); + flags, DRM_BO_HINT_DONT_FENCE, buf); if (ret) { free(buf); -- cgit v1.2.3 From bb372f1c9bc08e8b0dca983cb4ba36b2f2f039fb Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 16 May 2007 15:34:22 -0700 Subject: Initial implementation of MESA_texture_array Shadow sampling from texture arrays is still not implemented. Everything else should be there, though. --- src/mesa/drivers/dri/common/extension_helper.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/mesa/drivers/dri/common') diff --git a/src/mesa/drivers/dri/common/extension_helper.h b/src/mesa/drivers/dri/common/extension_helper.h index c798496425..10f75edaaa 100644 --- a/src/mesa/drivers/dri/common/extension_helper.h +++ b/src/mesa/drivers/dri/common/extension_helper.h @@ -440,6 +440,13 @@ static const char Color4ubVertex3fvSUN_names[] = ""; #endif +#if defined(need_GL_EXT_texture_array) +static const char FramebufferTextureLayerEXT_names[] = + "iiiii\0" /* Parameter signature */ + "glFramebufferTextureLayerEXT\0" + ""; +#endif + #if defined(need_GL_SGIX_list_priority) static const char GetListParameterivSGIX_names[] = "iip\0" /* Parameter signature */ @@ -5479,6 +5486,13 @@ static const struct dri_extension_function GL_EXT_texture3D_functions[] = { }; #endif +#if defined(need_GL_EXT_texture_array) +static const struct dri_extension_function GL_EXT_texture_array_functions[] = { + { FramebufferTextureLayerEXT_names, FramebufferTextureLayerEXT_remap_index, -1 }, + { NULL, 0, 0 } +}; +#endif + #if defined(need_GL_EXT_texture_object) static const struct dri_extension_function GL_EXT_texture_object_functions[] = { { PrioritizeTextures_names, -1, 331 }, -- cgit v1.2.3