gallium: remove redundant pipe_context::fence_signalled
authorMarek Olšák <marek.olsak@amd.com>
Fri, 26 Jun 2015 14:34:31 +0000 (16:34 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 5 Jul 2015 13:08:59 +0000 (15:08 +0200)
fence_finish(timeout=0) does the same thing

Reviewed-by: Brian Paul <brianp@vmware.com>
13 files changed:
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/ilo/ilo_screen.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/nouveau/nouveau_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/rbug/rbug_screen.c
src/gallium/drivers/softpipe/sp_fence.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/trace/tr_screen.c
src/gallium/drivers/vc4/vc4_fence.c
src/gallium/include/pipe/p_screen.h

index 7330cd9c788c98df1bcae294d927c6998b8079e6..473823f139072b9fda4c60cab7af2777280cbc8f 100644 (file)
@@ -546,7 +546,6 @@ fd_screen_create(struct fd_device *dev)
        pscreen->get_timestamp = fd_screen_get_timestamp;
 
        pscreen->fence_reference = fd_screen_fence_ref;
-       pscreen->fence_signalled = fd_screen_fence_signalled;
        pscreen->fence_finish = fd_screen_fence_finish;
 
        util_format_s3tc_init();
index 10508ced2bed69503a97bab1291de00900d97b10..dc0004366b164927131f43512bad15358cedf423 100644 (file)
@@ -462,15 +462,6 @@ i915_fence_reference(struct pipe_screen *screen,
    is->iws->fence_reference(is->iws, ptr, fence);
 }
 
-static boolean
-i915_fence_signalled(struct pipe_screen *screen,
-                     struct pipe_fence_handle *fence)
-{
-   struct i915_screen *is = i915_screen(screen);
-
-   return is->iws->fence_signalled(is->iws, fence) == 1;
-}
-
 static boolean
 i915_fence_finish(struct pipe_screen *screen,
                   struct pipe_fence_handle *fence,
@@ -568,7 +559,6 @@ i915_screen_create(struct i915_winsys *iws)
    is->base.context_create = i915_create_context;
 
    is->base.fence_reference = i915_fence_reference;
-   is->base.fence_signalled = i915_fence_signalled;
    is->base.fence_finish = i915_fence_finish;
 
    i915_init_screen_resource_functions(is);
index faebb9279b3376c02cfd0fbca3ca23d198b98277..eb6c0466eb93241d35ce94072a9f837544b4f940 100644 (file)
@@ -673,13 +673,6 @@ ilo_screen_fence_finish(struct pipe_screen *screen,
    return signaled;
 }
 
-static boolean
-ilo_screen_fence_signalled(struct pipe_screen *screen,
-                           struct pipe_fence_handle *fence)
-{
-   return ilo_screen_fence_finish(screen, fence, 0);
-}
-
 /**
  * Create a fence for \p bo.  When \p bo is not NULL, it must be submitted
  * before waited on or checked.
@@ -746,7 +739,6 @@ ilo_screen_create(struct intel_winsys *ws)
    is->base.flush_frontbuffer = NULL;
 
    is->base.fence_reference = ilo_screen_fence_reference;
-   is->base.fence_signalled = ilo_screen_fence_signalled;
    is->base.fence_finish = ilo_screen_fence_finish;
 
    is->base.get_driver_query_info = NULL;
index d3392e7d63d490b2934b8a55bf4ff2ba3b9d25b0..466c5d0cef8d6d0747e209e380f220924f7e5297 100644 (file)
@@ -528,18 +528,6 @@ llvmpipe_fence_reference(struct pipe_screen *screen,
 }
 
 
-/**
- * Has the fence been executed/finished?
- */
-static boolean
-llvmpipe_fence_signalled(struct pipe_screen *screen,
-                         struct pipe_fence_handle *fence)
-{
-   struct lp_fence *f = (struct lp_fence *) fence;
-   return lp_fence_signalled(f);
-}
-
-
 /**
  * Wait for the fence to finish.
  */
@@ -604,7 +592,6 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
    screen->base.context_create = llvmpipe_create_context;
    screen->base.flush_frontbuffer = llvmpipe_flush_frontbuffer;
    screen->base.fence_reference = llvmpipe_fence_reference;
-   screen->base.fence_signalled = llvmpipe_fence_signalled;
    screen->base.fence_finish = llvmpipe_fence_finish;
 
    screen->base.get_timestamp = llvmpipe_get_timestamp;
index 9f77db082ea487bef083ef9ae04c57beae7e1a45..e5b3c159c84215b50dac9c94f1f1b981e6d77f8c 100644 (file)
@@ -67,13 +67,6 @@ nouveau_screen_fence_ref(struct pipe_screen *pscreen,
        nouveau_fence_ref(nouveau_fence(pfence), (struct nouveau_fence **)ptr);
 }
 
-static boolean
-nouveau_screen_fence_signalled(struct pipe_screen *screen,
-                               struct pipe_fence_handle *pfence)
-{
-        return nouveau_fence_signalled(nouveau_fence(pfence));
-}
-
 static boolean
 nouveau_screen_fence_finish(struct pipe_screen *screen,
                            struct pipe_fence_handle *pfence,
@@ -206,7 +199,6 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
        pscreen->get_timestamp = nouveau_screen_get_timestamp;
 
        pscreen->fence_reference = nouveau_screen_fence_ref;
-       pscreen->fence_signalled = nouveau_screen_fence_signalled;
        pscreen->fence_finish = nouveau_screen_fence_finish;
 
        util_format_s3tc_init();
index a7bca915f573eb017bffd2f9c77f360a404464ad..e8accefe1a825f04bcc284f23750e4da441d544a 100644 (file)
@@ -660,14 +660,6 @@ static void r300_fence_reference(struct pipe_screen *screen,
     rws->fence_reference(ptr, fence);
 }
 
-static boolean r300_fence_signalled(struct pipe_screen *screen,
-                                    struct pipe_fence_handle *fence)
-{
-    struct radeon_winsys *rws = r300_screen(screen)->rws;
-
-    return rws->fence_wait(rws, fence, 0);
-}
-
 static boolean r300_fence_finish(struct pipe_screen *screen,
                                  struct pipe_fence_handle *fence,
                                  uint64_t timeout)
@@ -712,7 +704,6 @@ struct pipe_screen* r300_screen_create(struct radeon_winsys *rws)
     r300screen->screen.is_video_format_supported = vl_video_buffer_is_format_supported;
     r300screen->screen.context_create = r300_create_context;
     r300screen->screen.fence_reference = r300_fence_reference;
-    r300screen->screen.fence_signalled = r300_fence_signalled;
     r300screen->screen.fence_finish = r300_fence_finish;
 
     r300_init_screen_resource_functions(r300screen);
index 5dd28df5d5ff7f859debd95654e082f81cd5693e..bcbf0b9537330158e37c505dccf111f572d2761c 100644 (file)
@@ -721,14 +721,6 @@ static void r600_fence_reference(struct pipe_screen *screen,
        rws->fence_reference(ptr, fence);
 }
 
-static boolean r600_fence_signalled(struct pipe_screen *screen,
-                                   struct pipe_fence_handle *fence)
-{
-       struct radeon_winsys *rws = ((struct r600_common_screen*)screen)->ws;
-
-       return rws->fence_wait(rws, fence, 0);
-}
-
 static boolean r600_fence_finish(struct pipe_screen *screen,
                                 struct pipe_fence_handle *fence,
                                 uint64_t timeout)
@@ -874,7 +866,6 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
        rscreen->b.get_timestamp = r600_get_timestamp;
        rscreen->b.fence_finish = r600_fence_finish;
        rscreen->b.fence_reference = r600_fence_reference;
-       rscreen->b.fence_signalled = r600_fence_signalled;
        rscreen->b.resource_destroy = u_resource_destroy_vtbl;
        rscreen->b.resource_from_user_memory = r600_buffer_from_user_memory;
 
index d5a3164e2178511a23839fe7b21891b7c4273a28..7da4e81560a1559b326ede788172e9e28a19048b 100644 (file)
@@ -225,17 +225,6 @@ rbug_screen_fence_reference(struct pipe_screen *_screen,
                            fence);
 }
 
-static boolean
-rbug_screen_fence_signalled(struct pipe_screen *_screen,
-                            struct pipe_fence_handle *fence)
-{
-   struct rbug_screen *rb_screen = rbug_screen(_screen);
-   struct pipe_screen *screen = rb_screen->screen;
-
-   return screen->fence_signalled(screen,
-                                  fence);
-}
-
 static boolean
 rbug_screen_fence_finish(struct pipe_screen *_screen,
                          struct pipe_fence_handle *fence,
@@ -288,7 +277,6 @@ rbug_screen_create(struct pipe_screen *screen)
    rb_screen->base.resource_destroy = rbug_screen_resource_destroy;
    rb_screen->base.flush_frontbuffer = rbug_screen_flush_frontbuffer;
    rb_screen->base.fence_reference = rbug_screen_fence_reference;
-   rb_screen->base.fence_signalled = rbug_screen_fence_signalled;
    rb_screen->base.fence_finish = rbug_screen_fence_finish;
 
    rb_screen->screen = screen;
index c2897ed1ef878772ba89e4f530f0301cadfa85d7..6168236ec96798a2b8399b445244a1fc3af7ef47 100644 (file)
@@ -40,15 +40,6 @@ softpipe_fence_reference(struct pipe_screen *screen,
 }
 
 
-static boolean
-softpipe_fence_signalled(struct pipe_screen *screen,
-                         struct pipe_fence_handle *fence)
-{
-   assert(fence);
-   return TRUE;
-}
-
-
 static boolean
 softpipe_fence_finish(struct pipe_screen *screen,
                       struct pipe_fence_handle *fence,
@@ -64,5 +55,4 @@ softpipe_init_screen_fence_funcs(struct pipe_screen *screen)
 {
    screen->fence_reference = softpipe_fence_reference;
    screen->fence_finish = softpipe_fence_finish;
-   screen->fence_signalled = softpipe_fence_signalled;
 }
index 8eff3d5e337dd637c696dc9cb91239e8a2938517..e2305bec3594055dcc76390128978c137c36c6a4 100644 (file)
@@ -544,15 +544,6 @@ svga_fence_reference(struct pipe_screen *screen,
 }
 
 
-static boolean
-svga_fence_signalled(struct pipe_screen *screen,
-                     struct pipe_fence_handle *fence)
-{
-   struct svga_winsys_screen *sws = svga_screen(screen)->sws;
-   return sws->fence_signalled(sws, fence, 0) == 0;
-}
-
-
 static boolean
 svga_fence_finish(struct pipe_screen *screen,
                   struct pipe_fence_handle *fence,
@@ -650,7 +641,6 @@ svga_screen_create(struct svga_winsys_screen *sws)
    screen->is_format_supported = svga_is_format_supported;
    screen->context_create = svga_context_create;
    screen->fence_reference = svga_fence_reference;
-   screen->fence_signalled = svga_fence_signalled;
    screen->fence_finish = svga_fence_finish;
    screen->get_driver_query_info = svga_get_driver_query_info;
    svgascreen->sws = sws;
index 266626defa88154470ab0ad88514f221e801b10c..1d86a378eeaa3bb06fbc6a38c1684d0a2c39f83b 100644 (file)
@@ -369,29 +369,6 @@ trace_screen_fence_reference(struct pipe_screen *_screen,
 }
 
 
-static boolean
-trace_screen_fence_signalled(struct pipe_screen *_screen,
-                             struct pipe_fence_handle *fence)
-{
-   struct trace_screen *tr_scr = trace_screen(_screen);
-   struct pipe_screen *screen = tr_scr->screen;
-   int result;
-
-   trace_dump_call_begin("pipe_screen", "fence_signalled");
-
-   trace_dump_arg(ptr, screen);
-   trace_dump_arg(ptr, fence);
-
-   result = screen->fence_signalled(screen, fence);
-
-   trace_dump_ret(bool, result);
-
-   trace_dump_call_end();
-
-   return result;
-}
-
-
 static boolean
 trace_screen_fence_finish(struct pipe_screen *_screen,
                           struct pipe_fence_handle *fence,
@@ -503,7 +480,6 @@ trace_screen_create(struct pipe_screen *screen)
    tr_scr->base.resource_get_handle = trace_screen_resource_get_handle;
    tr_scr->base.resource_destroy = trace_screen_resource_destroy;
    tr_scr->base.fence_reference = trace_screen_fence_reference;
-   tr_scr->base.fence_signalled = trace_screen_fence_signalled;
    tr_scr->base.fence_finish = trace_screen_fence_finish;
    tr_scr->base.flush_frontbuffer = trace_screen_flush_frontbuffer;
    tr_scr->base.get_timestamp = trace_screen_get_timestamp;
index f2ee91de61ac36a6e7a57f6e7da4ec8ed8f0ba08..f644bf9a04e46a7d7fca2c5dc1d614cbc9a8eab6 100644 (file)
@@ -59,16 +59,6 @@ vc4_fence_reference(struct pipe_screen *pscreen,
         *p = f;
 }
 
-static boolean
-vc4_fence_signalled(struct pipe_screen *pscreen,
-                    struct pipe_fence_handle *pf)
-{
-        struct vc4_screen *screen = vc4_screen(pscreen);
-        struct vc4_fence *f = (struct vc4_fence *)pf;
-
-        return vc4_wait_seqno(screen, f->seqno, 0);
-}
-
 static boolean
 vc4_fence_finish(struct pipe_screen *pscreen,
                  struct pipe_fence_handle *pf,
@@ -98,6 +88,5 @@ void
 vc4_fence_init(struct vc4_screen *screen)
 {
         screen->base.fence_reference = vc4_fence_reference;
-        screen->base.fence_signalled = vc4_fence_signalled;
         screen->base.fence_finish = vc4_fence_finish;
 }
index 98b2159defe8d11385c91424f96adf14d937301f..0d2658313e50d5a9cb373d50b26ac545e3e564eb 100644 (file)
@@ -211,12 +211,6 @@ struct pipe_screen {
                             struct pipe_fence_handle **ptr,
                             struct pipe_fence_handle *fence );
 
-   /**
-    * Checks whether the fence has been signalled.
-    */
-   boolean (*fence_signalled)( struct pipe_screen *screen,
-                               struct pipe_fence_handle *fence );
-
    /**
     * Wait for the fence to finish.
     * \param timeout  in nanoseconds (may be PIPE_TIMEOUT_INFINITE).