mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
Adapt to updated libdrm.
This commit is contained in:
parent
4239cfd534
commit
fc4bc6fc97
8 changed files with 13 additions and 18 deletions
|
|
@ -86,7 +86,7 @@ bmError(int val, const char *file, const char *function, int line)
|
|||
}
|
||||
|
||||
DriFenceObject *
|
||||
driFenceBuffers(int fd, char *name, int shareable)
|
||||
driFenceBuffers(int fd, char *name, unsigned flags)
|
||||
{
|
||||
DriFenceObject *fence = (DriFenceObject *) malloc(sizeof(*fence));
|
||||
int ret;
|
||||
|
|
@ -99,7 +99,7 @@ driFenceBuffers(int fd, char *name, int shareable)
|
|||
fence->name = name;
|
||||
fence->fd = fd;
|
||||
_glthread_INIT_MUTEX(fence->mutex);
|
||||
ret = drmFenceBuffers(fd, shareable, &fence->fence);
|
||||
ret = drmFenceBuffers(fd, flags, &fence->fence);
|
||||
_glthread_UNLOCK_MUTEX(bmMutex);
|
||||
if (ret) {
|
||||
free(fence);
|
||||
|
|
@ -135,9 +135,10 @@ void
|
|||
driFenceFinish(DriFenceObject * fence, unsigned type, int lazy)
|
||||
{
|
||||
int ret;
|
||||
unsigned flags = (lazy) ? DRM_FENCE_FLAG_WAIT_LAZY : 0;
|
||||
|
||||
_glthread_LOCK_MUTEX(fence->mutex);
|
||||
ret = drmFenceWait(fence->fd, &fence->fence, type, lazy, GL_FALSE);
|
||||
ret = drmFenceWait(fence->fd, flags, &fence->fence, type);
|
||||
_glthread_UNLOCK_MUTEX(fence->mutex);
|
||||
BM_CKFATAL(ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ struct _DriBufferObject;
|
|||
struct _DriBufferPool;
|
||||
|
||||
extern struct _DriFenceObject *driFenceBuffers(int fd, char *name,
|
||||
int shareable);
|
||||
unsigned flags);
|
||||
|
||||
extern void driFenceReference(struct _DriFenceObject *fence);
|
||||
|
||||
|
|
|
|||
|
|
@ -77,13 +77,6 @@ intel_dump_batchbuffer(GLuint offset, GLuint * ptr, GLuint count)
|
|||
fprintf(stderr, "END BATCH\n\n\n");
|
||||
}
|
||||
|
||||
void
|
||||
dbatch(struct intel_context *intel)
|
||||
{
|
||||
intel_dump_batchbuffer(0, intel->batch->map,
|
||||
intel->batch->ptr - intel->batch->map);
|
||||
}
|
||||
|
||||
void
|
||||
intel_batchbuffer_reset(struct intel_batchbuffer *batch)
|
||||
{
|
||||
|
|
@ -225,7 +218,7 @@ do_flush_locked(struct intel_batchbuffer *batch,
|
|||
|
||||
|
||||
batch->last_fence = driFenceBuffers(batch->intel->driFd,
|
||||
"Batch fence", GL_FALSE);
|
||||
"Batch fence", 0);
|
||||
|
||||
/*
|
||||
* User space fencing.
|
||||
|
|
|
|||
|
|
@ -154,11 +154,11 @@ pool_checkFree(BPool * p, int wait)
|
|||
|
||||
if (!signaled) {
|
||||
if (wait) {
|
||||
driFenceFinish(buf->fence, DRM_FENCE_EXE, 1);
|
||||
driFenceFinish(buf->fence, DRM_FENCE_TYPE_EXE, 1);
|
||||
signaled = 1;
|
||||
}
|
||||
else {
|
||||
signaled = driFenceSignaled(buf->fence, DRM_FENCE_EXE);
|
||||
signaled = driFenceSignaled(buf->fence, DRM_FENCE_TYPE_EXE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
|
|||
}
|
||||
intel = (struct intel_context *) ctx;
|
||||
if (intel->last_swap_fence) {
|
||||
driFenceFinish(intel->last_swap_fence, DRM_FENCE_EXE, GL_TRUE);
|
||||
driFenceFinish(intel->last_swap_fence, DRM_FENCE_TYPE_EXE, GL_TRUE);
|
||||
driFenceUnReference(intel->last_swap_fence);
|
||||
intel->last_swap_fence = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ intelFinish(GLcontext * ctx)
|
|||
intelFlush(ctx);
|
||||
if (intel->batch->last_fence) {
|
||||
driFenceFinish(intel->batch->last_fence,
|
||||
DRM_FENCE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE);
|
||||
DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE);
|
||||
driFenceUnReference(intel->batch->last_fence);
|
||||
intel->batch->last_fence = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ do_blit_drawpixels(GLcontext * ctx,
|
|||
UNLOCK_HARDWARE(intel);
|
||||
|
||||
if (intel->driDrawable->numClipRects)
|
||||
driFenceFinish(fence, DRM_FENCE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE);
|
||||
driFenceFinish(fence, DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE);
|
||||
|
||||
driFenceUnReference(fence);
|
||||
|
||||
|
|
|
|||
|
|
@ -281,7 +281,8 @@ do_blit_readpixels(GLcontext * ctx,
|
|||
UNLOCK_HARDWARE(intel);
|
||||
|
||||
if (intel->driDrawable->numClipRects)
|
||||
driFenceFinish(fence, DRM_FENCE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE);
|
||||
driFenceFinish(fence, DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW,
|
||||
GL_FALSE);
|
||||
|
||||
driFenceUnReference(fence);
|
||||
if (INTEL_DEBUG & DEBUG_PIXEL)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue