Squashed commit of the following:
[mesa.git] / src / gallium / drivers / llvmpipe / lp_flush.c
index 636d72a9bb8f0f7a80cb0a46e0cee9013c9f69c4..f1533f8f70cb5cf66473ae3e8e4b3c75bd3d0722 100644 (file)
@@ -103,7 +103,7 @@ llvmpipe_flush( struct pipe_context *pipe,
  */
 boolean
 llvmpipe_flush_texture(struct pipe_context *pipe,
-                       struct pipe_texture *texture,
+                       struct pipe_resource *texture,
                        unsigned face,
                        unsigned level,
                        unsigned flush_flags,
@@ -111,10 +111,9 @@ llvmpipe_flush_texture(struct pipe_context *pipe,
                        boolean cpu_access,
                        boolean do_not_flush)
 {
-   struct pipe_fence_handle *last_fence = NULL;
    unsigned referenced;
 
-   referenced = pipe->is_texture_referenced(pipe, texture, face, level);
+   referenced = pipe->is_resource_referenced(pipe, texture, face, level);
 
    if ((referenced & PIPE_REFERENCED_FOR_WRITE) ||
        ((referenced & PIPE_REFERENCED_FOR_READ) && !read_only)) {
@@ -142,7 +141,7 @@ llvmpipe_flush_texture(struct pipe_context *pipe,
 
          pipe->flush(pipe, flush_flags, &fence);
 
-         if (last_fence) {
+         if (fence) {
             pipe->screen->fence_finish(pipe->screen, fence, 0);
             pipe->screen->fence_reference(pipe->screen, &fence, NULL);
          }