#include <libsync.h> /* Requires Android or libdrm-2.4.72 */
-#include "main/imports.h"
+#include "util/os_file.h"
#include "brw_context.h"
#include "intel_batchbuffer.h"
assert(!fence->batch_bo);
assert(!fence->signalled);
- fence->batch_bo = brw->batch.bo;
+ fence->batch_bo = brw->batch.batch.bo;
brw_bo_reference(fence->batch_bo);
if (intel_batchbuffer_flush(brw) < 0) {
}
static struct gl_sync_object *
-brw_gl_new_sync(struct gl_context *ctx, GLuint id)
+brw_gl_new_sync(struct gl_context *ctx)
{
struct brw_gl_sync *sync;
struct brw_gl_sync *sync = (struct brw_gl_sync *) _sync;
brw_fence_finish(&sync->fence);
+ free(sync->gl.Label);
free(sync);
}
goto fail;
} else {
/* Import the sync fd as an in-fence. */
- fence->sync_fd = dup(fd);
+ fence->sync_fd = os_dupfd_cloexec(fd);
}
assert(fence->sync_fd != -1);
brw_dri_get_fence_fd_locked(struct brw_fence *fence)
{
assert(fence->type == BRW_FENCE_TYPE_SYNC_FD);
- return dup(fence->sync_fd);
+ return os_dupfd_cloexec(fence->sync_fd);
}
static int