gallium: introduce PIPE_CAP_FENCE_SIGNAL v2
authorAndres Rodriguez <andresx7@gmail.com>
Wed, 4 Oct 2017 21:30:23 +0000 (17:30 -0400)
committerAndres Rodriguez <andresx7@gmail.com>
Tue, 30 Jan 2018 20:13:49 +0000 (15:13 -0500)
Protects semaphore signaling functionality required by GL_EXT_semaphore.

v2: s/semaphore/fence

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
18 files changed:
src/gallium/docs/source/screen.rst
src/gallium/drivers/etnaviv/etnaviv_screen.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/radeonsi/si_get.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/swr/swr_screen.cpp
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/drivers/virgl/virgl_screen.c
src/gallium/include/pipe/p_defines.h

index 4475aac4a70e6c9a6c83922db369d4c0a094a429..c33facb79b6f888983fb67a21cbb34d9ab630eb0 100644 (file)
@@ -412,6 +412,8 @@ The integer capabilities:
   priorities, this returns a bitmask of PIPE_CONTEXT_PRIORITY_x for the
   supported priority levels.  A driver that does not support prioritized
   contexts can return 0.
+* ``PIPE_CAP_FENCE_SIGNAL``: True if the driver supports signaling semaphores
+  using fence_server_signal().
 
 
 .. _pipe_capf:
index c72793920abe4ad6ef704d550f2e9a3812ae134d..d5d1f4fdad2cb920d86170aafc4a8af0d37593fb 100644 (file)
@@ -266,6 +266,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
 
    /* Stream output. */
index b68685989ca5e6e78e8c3a39182ebce9478f7625..438817d0034ee7ad41ca45dd90d9e6f1a1ed8f02 100644 (file)
@@ -336,6 +336,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_TILE_RASTER_ORDER:
        case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
        case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
+       case PIPE_CAP_FENCE_SIGNAL:
                return 0;
 
        case PIPE_CAP_CONTEXT_PRIORITY_MASK:
index 804d1245b4ee372749b50b35f582dd4795025a47..ac3621f814978fb582f917600c133644d87b87e1 100644 (file)
@@ -324,6 +324,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
 
    case PIPE_CAP_MAX_VIEWPORTS:
index 0977f06f37d07d9c5c831517e043b6b21ce5f45d..b46ea06775dfa487931382d7e6283218e613cc54 100644 (file)
@@ -359,6 +359,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
    }
    /* should only get here on unhandled cases */
index 4fecce8eff681eae445e67c8aa90c245fe09bca8..07d8c9c98b1e3350af0fcf11413b6f600d298b79 100644 (file)
@@ -226,6 +226,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 08b074b58f95b30d58b58c21a8eb2b282f1dc65f..4c13d04eb75da0780623b60e1bfd9f79f91c010d 100644 (file)
@@ -278,6 +278,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 0d5582c8e47776f6578242fb50b68ee24a92869d..7ba8086a53381f314ec69ec218e971df1935028d 100644 (file)
@@ -307,6 +307,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index fa00a170c7b32313d4a682ec29c217ff5fbd6546..e0ae57c58580469cb5ffff31598b4865b1b57be3 100644 (file)
@@ -248,6 +248,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
         case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
         case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+        case PIPE_CAP_FENCE_SIGNAL:
             return 0;
 
         /* SWTCL-only features. */
index bd2cd884cb995237327fb2dbd7bd2d093a5ce854..6c021e568d811bc128b018823f7002b8458c1927 100644 (file)
@@ -409,6 +409,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TILE_RASTER_ORDER:
        case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
        case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+       case PIPE_CAP_FENCE_SIGNAL:
                return 0;
 
        case PIPE_CAP_DOUBLES:
index e38565c81aa1ba1ea6ac1217cad873ef8c8e4376..2b1b6dd2e7d06e445a16ef5e83f054fd6f0bce9b 100644 (file)
@@ -270,6 +270,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_TILE_RASTER_ORDER:
        case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
        case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+       case PIPE_CAP_FENCE_SIGNAL:
                return 0;
 
        case PIPE_CAP_NATIVE_FENCE_FD:
index 676d199618bf3412e91aa9e976126f8fd41c6043..b44c2fc82583bbf9f9b0c3d1c8882b116214fe84 100644 (file)
@@ -464,7 +464,6 @@ static struct pipe_context *si_pipe_create_context(struct pipe_screen *screen,
 /*
  * pipe_screen
  */
-
 static void si_destroy_screen(struct pipe_screen* pscreen)
 {
        struct si_screen *sscreen = (struct si_screen *)pscreen;
index 22cf8f1dbda11f08f7953856e8650ef66b5ac048..b790d3e7571b11c49005734535ff39fa39214b02 100644 (file)
@@ -311,6 +311,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
index b8fecbbf67a8503235a447ce72d96d0b33030e6b..4a6a0a9c5e899b8312089c208f3252f4c33f6b8e 100644 (file)
@@ -454,6 +454,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
    }
 
index 839179a3043d316672c87a1d6b80b30220bcd9bd..888b62f8b08c8f4ef53cdda9ae8c69be1a2fdbe0 100644 (file)
@@ -344,6 +344,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 7b05f4c9b0b3d754ce3b25a5ca21e93eec774425..ccf4b3c8fa6657192b89021db2984f9daeb72b43 100644 (file)
@@ -286,6 +286,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
         case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
         case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+        case PIPE_CAP_FENCE_SIGNAL:
                 return 0;
 
                 /* Stream output. */
index b16a2e26d8f99de3a672f95a3f1fc293cbbca7f5..ca73b90e0fda9fd3a78bd9befe2dc1fd4fe5fa19 100644 (file)
@@ -268,6 +268,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
    case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
    case PIPE_CAP_CONTEXT_PRIORITY_MASK:
+   case PIPE_CAP_FENCE_SIGNAL:
       return 0;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
index 60546f55d984c465a3168b8559b52e313129bc00..ef8f0b47bb7d58162de4532913563efb254e0ea3 100644 (file)
@@ -792,6 +792,7 @@ enum pipe_cap
    PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES,
    PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET,
    PIPE_CAP_CONTEXT_PRIORITY_MASK,
+   PIPE_CAP_FENCE_SIGNAL,
 };
 
 /**