It should be unsigned, not enum pipe_flush_flags.
Fixed a build error:
src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error:
invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive]
v2: replace all occurrences of enum pipe_flush_flags by unsigned
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
[olv: document the parameter now that the type is unsigned]
static void
fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
DBG("fence=%p", fence);
static void
galahad_context_flush(struct pipe_context *_pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
*/
extern void i915_flush(struct i915_context *i915,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags);
+ unsigned flags);
#endif
static void i915_flush_pipe( struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags )
+ unsigned flags )
{
struct i915_context *i915 = i915_context(pipe);
enum i915_winsys_flush_flags winsys_flags = I915_FLUSH_ASYNC;
*/
void i915_flush(struct i915_context *i915,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct i915_winsys_batchbuffer *batch = i915->batch;
static void
identity_flush(struct pipe_context *_pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct identity_context *id_pipe = identity_context(_pipe);
struct pipe_context *pipe = id_pipe->pipe;
static void
ilo_flush(struct pipe_context *pipe,
struct pipe_fence_handle **f,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct ilo_context *ilo = ilo_context(pipe);
static void
do_flush( struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
llvmpipe_flush(pipe, fence, __FUNCTION__);
}
*/
static void noop_flush(struct pipe_context *ctx,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
}
static void
nv30_context_flush(struct pipe_context *pipe, struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct nv30_context *nv30 = nv30_context(pipe);
struct nouveau_pushbuf *push = nv30->base.pushbuf;
static void
nv50_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct nouveau_screen *screen = nouveau_screen(pipe->screen);
static void
nvc0_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct nvc0_context *nvc0 = nvc0_context(pipe);
struct nouveau_screen *screen = &nvc0->screen->base;
static void r300_flush_wrapped(struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
r300_flush(pipe,
flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0,
static void r600_flush_from_st(struct pipe_context *ctx,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct r600_context *rctx = (struct r600_context *)ctx;
struct r600_fence **rfence = (struct r600_fence**)fence;
static void r600_flush_from_st(struct pipe_context *ctx,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
radeonsi_flush(ctx, fence,
flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0);
static void
rbug_flush(struct pipe_context *_pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
void
softpipe_flush_wrapped(struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
softpipe_flush(pipe, SP_FLUSH_TEXTURE_CACHE, fence);
}
void
softpipe_flush_wrapped(struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags);
+ unsigned flags);
boolean
softpipe_flush_resource(struct pipe_context *pipe,
static void svga_flush( struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct svga_context *svga = svga_context(pipe);
static INLINE void
trace_context_flush(struct pipe_context *_pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
unsigned width, unsigned height);
/** Flush draw commands
+ *
+ * \param flags bitfield of enum pipe_flush_flags values.
*/
void (*flush)(struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags);
+ unsigned flags);
/**
* Create a view on a texture to be used by a shader stage.
[](event_ptr &ev) { return !ev->signalled(); });
// Flush and fence them.
- pipe->flush(pipe, &fence, (enum pipe_flush_flags)0);
+ pipe->flush(pipe, &fence, 0);
std::for_each(first, last, [&](event_ptr &ev) { ev->fence(fence); });
screen->fence_reference(screen, &fence, NULL);
queued_events.erase(first, last);
struct pipe_fence_handle **fence)
{
struct vg_context *ctx = (struct vg_context *) stctxi;
- enum pipe_flush_flags pipe_flags = 0;
+ unsigned pipe_flags = 0;
if (flags & ST_FLUSH_END_OF_FRAME) {
pipe_flags |= PIPE_FLUSH_END_OF_FRAME;
void st_flush(struct st_context *st,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
FLUSH_VERTICES(st->ctx, 0);
FLUSH_CURRENT(st->ctx, 0);
extern void
st_flush(struct st_context *st,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags);
+ unsigned flags);
extern void
st_finish(struct st_context *st);
struct pipe_fence_handle **fence)
{
struct st_context *st = (struct st_context *) stctxi;
- enum pipe_flush_flags pipe_flags = 0;
+ unsigned pipe_flags = 0;
if (flags & ST_FLUSH_END_OF_FRAME) {
pipe_flags |= PIPE_FLUSH_END_OF_FRAME;