14a49301eSmrg/**************************************************************************
24a49301eSmrg *
3af69d88dSmrg * Copyright 2007 VMware, Inc.
44a49301eSmrg * All Rights Reserved.
54a49301eSmrg *
64a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a
74a49301eSmrg * copy of this software and associated documentation files (the
84a49301eSmrg * "Software"), to deal in the Software without restriction, including
94a49301eSmrg * without limitation the rights to use, copy, modify, merge, publish,
104a49301eSmrg * distribute, sub license, and/or sell copies of the Software, and to
114a49301eSmrg * permit persons to whom the Software is furnished to do so, subject to
124a49301eSmrg * the following conditions:
134a49301eSmrg *
144a49301eSmrg * The above copyright notice and this permission notice (including the
154a49301eSmrg * next paragraph) shall be included in all copies or substantial portions
164a49301eSmrg * of the Software.
174a49301eSmrg *
184a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
194a49301eSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
204a49301eSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21af69d88dSmrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
224a49301eSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
234a49301eSmrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
244a49301eSmrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
254a49301eSmrg *
264a49301eSmrg **************************************************************************/
274a49301eSmrg
284a49301eSmrg#ifndef SP_FLUSH_H
294a49301eSmrg#define SP_FLUSH_H
304a49301eSmrg
313464ebd5Sriastradh#include "pipe/p_compiler.h"
323464ebd5Sriastradh
334a49301eSmrgstruct pipe_context;
344a49301eSmrgstruct pipe_fence_handle;
354a49301eSmrg
363464ebd5Sriastradh#define SP_FLUSH_TEXTURE_CACHE  0x2
373464ebd5Sriastradh
383464ebd5Sriastradhvoid
393464ebd5Sriastradhsoftpipe_flush(struct pipe_context *pipe,
403464ebd5Sriastradh               unsigned flags,
413464ebd5Sriastradh               struct pipe_fence_handle **fence);
423464ebd5Sriastradh
433464ebd5Sriastradhvoid
44af69d88dSmrgsoftpipe_flush_wrapped(struct pipe_context *pipe,
45af69d88dSmrg                       struct pipe_fence_handle **fence,
46af69d88dSmrg                       unsigned flags);
473464ebd5Sriastradh
483464ebd5Sriastradhboolean
493464ebd5Sriastradhsoftpipe_flush_resource(struct pipe_context *pipe,
503464ebd5Sriastradh                        struct pipe_resource *texture,
513464ebd5Sriastradh                        unsigned level,
523464ebd5Sriastradh                        int layer,
533464ebd5Sriastradh                        unsigned flush_flags,
543464ebd5Sriastradh                        boolean read_only,
553464ebd5Sriastradh                        boolean cpu_access,
563464ebd5Sriastradh                        boolean do_not_block);
574a49301eSmrg
5801e04c3fSmrgvoid softpipe_texture_barrier(struct pipe_context *pipe, unsigned flags);
5901e04c3fSmrgvoid softpipe_memory_barrier(struct pipe_context *pipe, unsigned flags);
604a49301eSmrg#endif
61