gallium: fix type of flags in pipe_context::flush()
authorChia-I Wu <olvaffe@gmail.com>
Thu, 2 May 2013 08:25:15 +0000 (16:25 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 4 May 2013 09:32:10 +0000 (17:32 +0800)
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]

25 files changed:
src/gallium/drivers/freedreno/freedreno_context.c
src/gallium/drivers/galahad/glhd_context.c
src/gallium/drivers/i915/i915_batch.h
src/gallium/drivers/i915/i915_flush.c
src/gallium/drivers/identity/id_context.c
src/gallium/drivers/ilo/ilo_context.c
src/gallium/drivers/llvmpipe/lp_context.c
src/gallium/drivers/noop/noop_pipe.c
src/gallium/drivers/nv30/nv30_context.c
src/gallium/drivers/nv50/nv50_context.c
src/gallium/drivers/nvc0/nvc0_context.c
src/gallium/drivers/r300/r300_flush.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/radeonsi/radeonsi_pipe.c
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/softpipe/sp_flush.c
src/gallium/drivers/softpipe/sp_flush.h
src/gallium/drivers/svga/svga_pipe_flush.c
src/gallium/drivers/trace/tr_context.c
src/gallium/include/pipe/p_context.h
src/gallium/state_trackers/clover/core/queue.cpp
src/gallium/state_trackers/vega/vg_manager.c
src/mesa/state_tracker/st_cb_flush.c
src/mesa/state_tracker/st_cb_flush.h
src/mesa/state_tracker/st_manager.c

index 4753f58d12d3cae1cdca282f94638abd14d3e5b7..64c21fedaa926362408faf35e621bfdbea8fa00b 100644 (file)
@@ -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);
 
index 8901b6ab712fa8116d6741972e00fb6954c4e976..a73a3ad44c0bba3908ea6ee7f78ee45f83482dc5 100644 (file)
@@ -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;
index 5f2b3242f5305e284cca2a347b315739db94d5bf..ab0f8c8dd29447473219b247c534beaf10f37dad 100644 (file)
@@ -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
index 3db6ca136a80d0ef5515865a2694b659b0d0a2f9..0dca722d63659940833cfded681d909a6e33329a 100644 (file)
@@ -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;
 
index d0b67ef3a975b70c8aa39dd42c986cc41043309f..0eff6c926c229a72b3dfaf0fc05c96723929318e 100644 (file)
@@ -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;
index a8c1b1b114c9d08eb2f53208cb86bfbc6257e5df..3a101b47e6f3c5c1f1c2bcefa72b551d9ada9b00 100644 (file)
@@ -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);
 
index fa675eab7e1ad5969ca1800b3d7a34a38d0e01e2..a6d7e594cd6dd92815df7917e4fbc82c48caa2cd 100644 (file)
@@ -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__);
 }
index 02588d9d79c30d769729eeab302bc3390c3a6a17..ac837b18fe8f40b229471ebc57628ebdd6857007 100644 (file)
@@ -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)
 {
 }
 
index fc0d719e7021224da7b10eb95040ffc9514549ed..bd05042ca22954b8047b3fd13e9d2a8fc123c1cc 100644 (file)
@@ -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;
index ce5999aea7ab72d8e139251566c9518c1724eed3..16697a0c5d653c3f994835a0c8911aacdbbd2311 100644 (file)
@@ -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);
 
index ea36f7b21d5defe921c6266bb10df625e27c1719..cd86040ab01279fbc6d8ec1fa235cbfabfe2df7c 100644 (file)
@@ -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;
index 709fe520f97967c6a543f4c90da6fc9c0a9d9d1b..3dd3864353c9000446584b78d9b4af7996ded532 100644 (file)
@@ -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,
index daadaeb25d871b34d1c890fa0bfe137f2d396a97..50fe77b56a805d9feb7837b815180b088b814d45 100644 (file)
@@ -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;
index 8a072fda89ed583e7a7f3c84d867d4cf1ead272e..4f4c1448056c8805550497bb652152e4252b3b50 100644 (file)
@@ -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);
index f57db401aea766ef368b19b9209f88ff79e0572e..bf939b9b6780091221e37e86c86f684d630c7354 100644 (file)
@@ -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;
index 899ac535cbe664637ee7a22aa16fcab4c7f782f5..a85eaa49e7c78eeaa79c7f2cf0117e95ef8c77a7 100644 (file)
@@ -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);
 }
index d406103809d80864e8b8eaac972b7f2c07b12167..f93ebd91bbc7ae82c149847a91772071e1e0beed 100644 (file)
@@ -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,
index a6048d9b49230ab813d7a2a44d53c95a97ebf904..d593c781680bdc2d1959abed95c8624c2a8c7db2 100644 (file)
@@ -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);
 
index f8637bd599d26a4c26f11403a4badf0864d4d85a..962b15e9b2d00dff1de6862a5bfdf6bb8c01753d 100644 (file)
@@ -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;
index da1f5a88a6425ce4669cc4782a379343e6fe580b..d1130bc5182f120ca4c0cc8a42dde351f2137d4f 100644 (file)
@@ -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.
index 95b02d7c05f29c261b2fbd79c77a8536d6ab8f60..0b1c494415a660cce395e71f612bcbcb0a15d4d5 100644 (file)
@@ -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);
index ad0e98d3a62986f4432541f99c89df588ff37aa1..a8518abd3222dd70a58c5966b3caaa1c9ce21cd3 100644 (file)
@@ -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;
index b11004718f6d259acfe433deb8599e14c36d6627..f428e0af9062006ca341c095a68cd4c3ff13d45e 100644 (file)
@@ -77,7 +77,7 @@ display_front_buffer(struct st_context *st)
 
 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);
index 003e2a2a940177842b0e2558ab78c2a7d7153264..cb5c62e8781eb9238ac29b20387deeef8dc915c2 100644 (file)
@@ -42,7 +42,7 @@ st_init_flush_functions(struct dd_function_table *functions);
 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);
index ff52aa1f9b5a7b020b646f72d14a30dda368c490..5561af6c7fc013ab518c78faf9b60fe6245f54b8 100644 (file)
@@ -453,7 +453,7 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
                  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;