gallium: add PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION
authorMarek Olšák <marek.olsak@amd.com>
Mon, 15 May 2017 14:30:30 +0000 (16:30 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 17 May 2017 18:28:44 +0000 (20:28 +0200)
for skipping mapped-buffer checking in every GL draw call

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
17 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_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 971dc1feb5096ef1619a3e2c688aa0635c4b25f6..871669c0d98f8ccbd6616c6066b5ee5db6520eae 100644 (file)
@@ -391,6 +391,7 @@ The integer capabilities:
   shader outputs.
 * ``PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX``: Whether a buffer with just
   PIPE_BIND_CONSTANT_BUFFER can be legally passed to set_vertex_buffers.
+* ``PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION``: As the name says.
 
 
 .. _pipe_capf:
index 9f1b44922ad2790cc8553e5b135799bac48458df..bf13184ad61fdb6eab2aa1420a647a9f5a9e04b6 100644 (file)
@@ -255,6 +255,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_BALLOT:
    case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 0;
 
    /* Stream output. */
index cb03bdb96b90196f2615fcd10b38f1d0e20e451e..a00afd3fa4518ccf4c0f7d68bea5ce05e3c35eb6 100644 (file)
@@ -314,6 +314,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_BALLOT:
        case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
        case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+       case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
                return 0;
 
        case PIPE_CAP_MAX_VIEWPORTS:
index ae0a495e9d8080b58b783ecec35b14cf11159d7e..1cf9441ef11792fb8766f4af2f1bdc7fd4bdedbc 100644 (file)
@@ -307,6 +307,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_TGSI_BALLOT:
    case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 0;
 
    case PIPE_CAP_MAX_VIEWPORTS:
index c43f85e86044aa19888cb4e5e730cb0cf3dd50fc..656de49549700a0ee36a813e26c393848455e7f4 100644 (file)
@@ -353,6 +353,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_BALLOT:
    case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 0;
    }
    /* should only get here on unhandled cases */
index b3cd2b69a0ffa1dd2e62a55439e3da1f43d99f63..e8d14bfea41a425214471cee99751c6e8c801c8f 100644 (file)
@@ -96,6 +96,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 1;
    /* nv35 capabilities */
    case PIPE_CAP_DEPTH_BOUNDS_TEST:
index c425b1182b71a6917085bbf4ee53ca0af5224817..59afd14fac2f6618b65f572d79005697b461ccb5 100644 (file)
@@ -201,6 +201,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_TEX_TXF_LZ:
    case PIPE_CAP_TGSI_CLOCK:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 1;
    case PIPE_CAP_SEAMLESS_CUBE_MAP:
       return 1; /* class_3d >= NVA0_3D_CLASS; */
index d2a1292ec5925c324fd5cdaf91ddfbc58be15ac5..e1d0d1c2c4906bb85c36117e9455720cae067bd2 100644 (file)
@@ -250,6 +250,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_CLOCK:
    case PIPE_CAP_COMPUTE:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 1;
    case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
       return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
index 9fa6bcd3924faa82df159e5d9e56d1566bc39b29..3452d92d9dd947426c67c06a38611d7932e27581 100644 (file)
@@ -113,6 +113,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
         case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
         case PIPE_CAP_CLIP_HALFZ:
+        case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
             return 1;
 
         case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
index e4aa8868b93dd6bb75072d98c6e73227c7a09698..fd01672c1d16804fb7fc9cfd53843aca6ed5585a 100644 (file)
@@ -287,6 +287,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_CLEAR_TEXTURE:
        case PIPE_CAP_TGSI_MUL_ZERO_WINS:
        case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+       case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
                return 1;
 
        case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
index c8dfd9652e6d7559f3dd151636e3450f258bf0db..dd962e08e7ad9f777114f5532fe3374e39981883 100644 (file)
@@ -456,6 +456,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_INT64_DIVMOD:
        case PIPE_CAP_TGSI_CLOCK:
        case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+       case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
                return 1;
 
        case PIPE_CAP_TGSI_VOTE:
index 1719972fac92453d37921c5963d19ea5ee158974..878953406853e843b15859bb2829232688fb26d1 100644 (file)
@@ -303,6 +303,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_BALLOT:
    case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
index 7ccb66e478ba66a1aaa5a35404a40d89cb48dc5a..b79d9e9a767cb1a0a2686fc7eb46fe1841d0fe84 100644 (file)
@@ -434,6 +434,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_BALLOT:
    case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 0;
    }
 
index a584a0ab56c032c2c8506a7243fdb70d3f32b222..cdb8165d3db4a2bdac296c98c0ee6a077a9eb8c8 100644 (file)
@@ -338,6 +338,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_BALLOT:
    case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 0660a647de9691104df2d586503180b142ebe1db..18b47ae138487d91aeb3534f8976ab0e193fe67b 100644 (file)
@@ -254,6 +254,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_TGSI_BALLOT:
         case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
        case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+       case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
                 return 0;
 
                 /* Stream output. */
index 0676d75e43f8d9b7a2fb779a882f21e77498ee1f..f1d41ba1d41f642a0fc870f35148ac9f2ad36789 100644 (file)
@@ -262,6 +262,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_DOUBLES:
    case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 0;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
index aafa4f82f5abb6bc801268e4eab2a6b9da272764..769c94f32efc568c50fbf2e5884af0025cdb6dcb 100644 (file)
@@ -771,6 +771,7 @@ enum pipe_cap
    PIPE_CAP_TGSI_BALLOT,
    PIPE_CAP_TGSI_TES_LAYER_VIEWPORT,
    PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX,
+   PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)