gallium: introduce PIPE_CAP_MEMOBJ
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 3 Aug 2017 03:54:45 +0000 (13:54 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 3 Aug 2017 03:57:16 +0000 (13:57 +1000)
This can be used to guard support for EXT_memory_object and related
extensions.

v2: update gallium docs

v3 (Timothy Arceri):
 - add cap to nv50

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.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 5c5c7909f0d46c281f0796ce76a4f4f694a8c27b..be14ddd0c0df30f347c8ddf6597c2940e03d63d3 100644 (file)
@@ -403,6 +403,7 @@ The integer capabilities:
   ``PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE`` query types are supported. Note that
   for a driver that does not support multiple output streams (i.e.,
   ``PIPE_CAP_MAX_VERTEX_STREAMS`` is 1), both query types are identical.
+* ``PIPE_CAP_MEMOBJ``: Whether operations on memory objects are supported.
 
 
 .. _pipe_capf:
index 65aab838682131312e3dba1bdd668132900f52f4..9aca90642c3797e0a7bdeb522963e53879a3bb15 100644 (file)
@@ -262,6 +262,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
 
    /* Stream output. */
index 2a1b1e7be1f73712e82717c25900b0c329e531f8..b26f67e4e29ea025ea9688f286fe778d00c90593 100644 (file)
@@ -323,6 +323,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_BINDLESS_TEXTURE:
        case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
        case PIPE_CAP_QUERY_SO_OVERFLOW:
+       case PIPE_CAP_MEMOBJ:
                return 0;
 
        case PIPE_CAP_MAX_VIEWPORTS:
index f16141b9b8b3269dc755556c32958df7920281ab..e700e294da31c20c684e6784710f2df2cdb8595c 100644 (file)
@@ -312,6 +312,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
 
    case PIPE_CAP_MAX_VIEWPORTS:
index fc4441f04e198621a0681d9323b570fdbb06ecd4..6c64133b90c4a6bf4587d25658b02f57262df00e 100644 (file)
@@ -358,6 +358,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
    }
    /* should only get here on unhandled cases */
index 0b2e35b67a48b802f51152c62e9bd4e7a2fbca54..72f886c9114ef8abaea30a3c41454ede7657d255 100644 (file)
@@ -222,6 +222,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 8862967a9c3e3cdc8576c6a991739b93c16bff9a..0f25cd5fedd7523304b39817548bb5c1ed02b17a 100644 (file)
@@ -274,6 +274,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 3b3b38174dfe13bbf66aedc14e546917b449b019..f64ac2625def0cd79fc5bb2e831c0c85d9131c7a 100644 (file)
@@ -303,6 +303,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 7d82608e70e4a48fb82cdda17de0a32d639656d1..ff68ffd7bc6550079c2d4158a6779e5db905b72d 100644 (file)
@@ -244,6 +244,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_BINDLESS_TEXTURE:
         case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
         case PIPE_CAP_QUERY_SO_OVERFLOW:
+        case PIPE_CAP_MEMOBJ:
             return 0;
 
         /* SWTCL-only features. */
index e7e299985139c8e87d8cebe93747750552f28341..9263659be328d5840ffe3bb387e45f0e928645bd 100644 (file)
@@ -400,6 +400,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_BINDLESS_TEXTURE:
        case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
        case PIPE_CAP_QUERY_SO_OVERFLOW:
+       case PIPE_CAP_MEMOBJ:
                return 0;
 
        case PIPE_CAP_DOUBLES:
index ae87d7feeca006251145d9dd847df717628ad221..b32a77dcc4688a79214cf4b5fb8637e46617021a 100644 (file)
@@ -605,6 +605,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_UMA:
        case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
        case PIPE_CAP_POST_DEPTH_COVERAGE:
+       case PIPE_CAP_MEMOBJ:
                return 0;
 
        case PIPE_CAP_QUERY_BUFFER_OBJECT:
index 5b387bbfc57a6d9b4d6ad6b8e84f514138477108..0feef2189a78468e903db3493de38cfb2d9012d5 100644 (file)
@@ -308,6 +308,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
index 9849fe375916ed1185f824f9ad374b6aab5b0b31..ef3e07ea38f493ab13316c6a72c6f4bd7a9e9f06 100644 (file)
@@ -452,6 +452,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
    }
 
index 1013403147947921a1462a17b66f7c983a818047..3287bc6feeb073ab19acb5e86b00e37b5fcdcba3 100644 (file)
@@ -341,6 +341,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 8a5c0fdee8841b7b59d2397b89a207f112563de5..e206456f24ce541d5cacb84acd7b28f91aa4094d 100644 (file)
@@ -263,6 +263,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_BINDLESS_TEXTURE:
         case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
         case PIPE_CAP_QUERY_SO_OVERFLOW:
+       case PIPE_CAP_MEMOBJ:
                 return 0;
 
                 /* Stream output. */
index d23df42b988975f9e185c4ad60ee527bc95e7fcb..68d74adadda8a2c0bc7654aa0771a294ef314934 100644 (file)
@@ -267,6 +267,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
+   case PIPE_CAP_MEMOBJ:
       return 0;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
index 5a5b03c6ca713c4cecc0788b96a9b064658065d9..2b315e99c28c8143694ead2a174ba85335a8327f 100644 (file)
@@ -783,6 +783,7 @@ enum pipe_cap
    PIPE_CAP_BINDLESS_TEXTURE,
    PIPE_CAP_NIR_SAMPLERS_AS_DEREF,
    PIPE_CAP_QUERY_SO_OVERFLOW,
+   PIPE_CAP_MEMOBJ,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)