*/
boolean
llvmpipe_flush_texture(struct pipe_context *pipe,
- struct pipe_texture *texture,
+ struct pipe_resource *texture,
unsigned face,
unsigned level,
unsigned flush_flags,
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)) {
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);
}