r300/compiler: refactor fragment shader compilation
[mesa.git] / src / mesa / drivers / dri / intel / intel_syncobj.c
index 1286fe929bc150f0d5fa501ebf52344eb38a4715..c2d86432ff9ca0cbd685c479f14a3414683f67a7 100644 (file)
@@ -50,7 +50,7 @@ intel_new_sync_object(GLcontext *ctx, GLuint id)
 {
    struct intel_sync_object *sync;
 
-   sync = _mesa_calloc(sizeof(struct intel_sync_object));
+   sync = calloc(1, sizeof(struct intel_sync_object));
 
    return &sync->Base;
 }
@@ -61,7 +61,7 @@ intel_delete_sync_object(GLcontext *ctx, struct gl_sync_object *s)
    struct intel_sync_object *sync = (struct intel_sync_object *)s;
 
    drm_intel_bo_unreference(sync->bo);
-   _mesa_free(sync);
+   free(sync);
 }
 
 static void
@@ -77,7 +77,7 @@ intel_fence_sync(GLcontext *ctx, struct gl_sync_object *s,
    sync->bo = intel->batch->buf;
    drm_intel_bo_reference(sync->bo);
 
-   intelFlush(ctx);
+   intel_flush(ctx);
 }
 
 /* We ignore the user-supplied timeout.  This is weaselly -- we're allowed to
@@ -114,7 +114,7 @@ static void intel_check_sync(GLcontext *ctx, struct gl_sync_object *s)
 {
    struct intel_sync_object *sync = (struct intel_sync_object *)s;
 
-   if (sync->bo && drm_intel_bo_busy(sync->bo)) {
+   if (sync->bo && !drm_intel_bo_busy(sync->bo)) {
       drm_intel_bo_unreference(sync->bo);
       sync->bo = NULL;
       s->StatusFlag = 1;