diff options
author | Chia-I Wu <[email protected]> | 2013-05-02 16:25:15 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-05-04 17:32:10 +0800 |
commit | 8c347d4e5762b41320a80acf474284b5c096fd0d (patch) | |
tree | ae5703d362978adaeff35ebc28704ec1b935baf2 /src/gallium | |
parent | cbf3462c35445e8728ec6d58ed264e16705c1254 (diff) |
gallium: fix type of flags in pipe_context::flush()
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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
[olv: document the parameter now that the type is unsigned]
Diffstat (limited to 'src/gallium')
22 files changed, 25 insertions, 23 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c index 4753f58d12d..64c21fedaa9 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.c +++ b/src/gallium/drivers/freedreno/freedreno_context.c @@ -96,7 +96,7 @@ fd_context_render(struct pipe_context *pctx) 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); diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c index 8901b6ab712..a73a3ad44c0 100644 --- a/src/gallium/drivers/galahad/glhd_context.c +++ b/src/gallium/drivers/galahad/glhd_context.c @@ -844,7 +844,7 @@ galahad_context_clear_depth_stencil(struct pipe_context *_pipe, 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; diff --git a/src/gallium/drivers/i915/i915_batch.h b/src/gallium/drivers/i915/i915_batch.h index 5f2b3242f53..ab0f8c8dd29 100644 --- a/src/gallium/drivers/i915/i915_batch.h +++ b/src/gallium/drivers/i915/i915_batch.h @@ -55,6 +55,6 @@ */ extern void i915_flush(struct i915_context *i915, struct pipe_fence_handle **fence, - enum pipe_flush_flags flags); + unsigned flags); #endif diff --git a/src/gallium/drivers/i915/i915_flush.c b/src/gallium/drivers/i915/i915_flush.c index 3db6ca136a8..0dca722d636 100644 --- a/src/gallium/drivers/i915/i915_flush.c +++ b/src/gallium/drivers/i915/i915_flush.c @@ -40,7 +40,7 @@ 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; @@ -71,7 +71,7 @@ void i915_init_flush_functions( struct i915_context *i915 ) */ 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; diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c index d0b67ef3a97..0eff6c926c2 100644 --- a/src/gallium/drivers/identity/id_context.c +++ b/src/gallium/drivers/identity/id_context.c @@ -712,7 +712,7 @@ identity_clear_depth_stencil(struct pipe_context *_pipe, 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; diff --git a/src/gallium/drivers/ilo/ilo_context.c b/src/gallium/drivers/ilo/ilo_context.c index a8c1b1b114c..3a101b47e6f 100644 --- a/src/gallium/drivers/ilo/ilo_context.c +++ b/src/gallium/drivers/ilo/ilo_context.c @@ -77,7 +77,7 @@ ilo_context_post_cp_flush(struct ilo_cp *cp, void *data) 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); diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index fa675eab7e1..a6d7e594cd6 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -103,7 +103,7 @@ static void llvmpipe_destroy( struct pipe_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__); } diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c index 02588d9d79c..ac837b18fe8 100644 --- a/src/gallium/drivers/noop/noop_pipe.c +++ b/src/gallium/drivers/noop/noop_pipe.c @@ -243,7 +243,7 @@ static void noop_blit(struct pipe_context *ctx, */ static void noop_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence, - enum pipe_flush_flags flags) + unsigned flags) { } diff --git a/src/gallium/drivers/nv30/nv30_context.c b/src/gallium/drivers/nv30/nv30_context.c index fc0d719e702..bd05042ca22 100644 --- a/src/gallium/drivers/nv30/nv30_context.c +++ b/src/gallium/drivers/nv30/nv30_context.c @@ -69,7 +69,7 @@ nv30_context_kick_notify(struct nouveau_pushbuf *push) 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; diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c index ce5999aea7a..16697a0c5d6 100644 --- a/src/gallium/drivers/nv50/nv50_context.c +++ b/src/gallium/drivers/nv50/nv50_context.c @@ -34,7 +34,7 @@ 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); diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c index ea36f7b21d5..cd86040ab01 100644 --- a/src/gallium/drivers/nvc0/nvc0_context.c +++ b/src/gallium/drivers/nvc0/nvc0_context.c @@ -34,7 +34,7 @@ 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; diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c index 709fe520f97..3dd3864353c 100644 --- a/src/gallium/drivers/r300/r300_flush.c +++ b/src/gallium/drivers/r300/r300_flush.c @@ -139,7 +139,7 @@ void r300_flush(struct pipe_context *pipe, 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, diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index daadaeb25d8..50fe77b56a8 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -183,7 +183,7 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags) 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; diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index 8a072fda89e..4f4c1448056 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c @@ -161,7 +161,7 @@ void radeonsi_flush(struct pipe_context *ctx, struct pipe_fence_handle **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); diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c index f57db401aea..bf939b9b678 100644 --- a/src/gallium/drivers/rbug/rbug_context.c +++ b/src/gallium/drivers/rbug/rbug_context.c @@ -942,7 +942,7 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe, 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; diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c index 899ac535cbe..a85eaa49e7c 100644 --- a/src/gallium/drivers/softpipe/sp_flush.c +++ b/src/gallium/drivers/softpipe/sp_flush.c @@ -96,7 +96,7 @@ softpipe_flush( struct pipe_context *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); } diff --git a/src/gallium/drivers/softpipe/sp_flush.h b/src/gallium/drivers/softpipe/sp_flush.h index d406103809d..f93ebd91bbc 100644 --- a/src/gallium/drivers/softpipe/sp_flush.h +++ b/src/gallium/drivers/softpipe/sp_flush.h @@ -43,7 +43,7 @@ softpipe_flush(struct pipe_context *pipe, 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, diff --git a/src/gallium/drivers/svga/svga_pipe_flush.c b/src/gallium/drivers/svga/svga_pipe_flush.c index a6048d9b492..d593c781680 100644 --- a/src/gallium/drivers/svga/svga_pipe_flush.c +++ b/src/gallium/drivers/svga/svga_pipe_flush.c @@ -33,7 +33,7 @@ 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); diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index f8637bd599d..962b15e9b2d 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -1287,7 +1287,7 @@ trace_context_clear_depth_stencil(struct pipe_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; diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index da1f5a88a64..d1130bc5182 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -349,10 +349,12 @@ struct pipe_context { 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. diff --git a/src/gallium/state_trackers/clover/core/queue.cpp b/src/gallium/state_trackers/clover/core/queue.cpp index 95b02d7c05f..0b1c494415a 100644 --- a/src/gallium/state_trackers/clover/core/queue.cpp +++ b/src/gallium/state_trackers/clover/core/queue.cpp @@ -53,7 +53,7 @@ _cl_command_queue::flush() { [](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); diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c index ad0e98d3a62..a8518abd322 100644 --- a/src/gallium/state_trackers/vega/vg_manager.c +++ b/src/gallium/state_trackers/vega/vg_manager.c @@ -143,7 +143,7 @@ vg_context_flush(struct st_context_iface *stctxi, unsigned flags, 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; |