gallium: introduce PIPE_CAP_LOAD_CONSTBUF
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 17 Aug 2017 10:12:42 +0000 (20:12 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 15 Sep 2017 01:42:55 +0000 (11:42 +1000)
Reviewed-by: Marek Olšák <marek.olsak@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 93d94a48e6b948f033157e4c96ed74199e080d9d..bf5b65a2d4c8d483c5151613a6fa8958888a1c5d 100644 (file)
@@ -404,6 +404,8 @@ The integer capabilities:
   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_CAP_LOAD_CONSTBUF``: True if the driver supports TGSI_OPCODE_LOAD use
+  with constant buffers.
 
 
 .. _pipe_capf:
index f400e423de31bfe24259a86e41bfe905c9789710..49c700a3d0f638b6114bf6936c0282866b9927ea 100644 (file)
@@ -263,6 +263,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
 
    /* Stream output. */
index b26f67e4e29ea025ea9688f286fe778d00c90593..425d967015af7a750c79a9dcc223503656e45964 100644 (file)
@@ -324,6 +324,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
        case PIPE_CAP_QUERY_SO_OVERFLOW:
        case PIPE_CAP_MEMOBJ:
+       case PIPE_CAP_LOAD_CONSTBUF:
                return 0;
 
        case PIPE_CAP_MAX_VIEWPORTS:
index e700e294da31c20c684e6784710f2df2cdb8595c..749dc9cb53ec0cf51528e4273353a17b82abd376 100644 (file)
@@ -313,6 +313,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
 
    case PIPE_CAP_MAX_VIEWPORTS:
index dba7ae3d0175bf5c0c33906498d7c97c1e69c0be..482eac3d6c48f62b0ab65b7dc99257f20ab6edc7 100644 (file)
@@ -359,6 +359,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_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
    }
    /* should only get here on unhandled cases */
index 72f886c9114ef8abaea30a3c41454ede7657d255..dc272ecafa62ef7cda27e756660c1a0e9ab69e09 100644 (file)
@@ -223,6 +223,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 0f25cd5fedd7523304b39817548bb5c1ed02b17a..fd100c60e8ed1b04419305f964fac0797e7c0f6b 100644 (file)
@@ -275,6 +275,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index f64ac2625def0cd79fc5bb2e831c0c85d9131c7a..219e0652a5f0c93853a8c23d40ba6234b0f02ac7 100644 (file)
@@ -304,6 +304,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index ff68ffd7bc6550079c2d4158a6779e5db905b72d..3a449f0e9194231561df551a33d069e8d1a1ef4a 100644 (file)
@@ -245,6 +245,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
         case PIPE_CAP_QUERY_SO_OVERFLOW:
         case PIPE_CAP_MEMOBJ:
+        case PIPE_CAP_LOAD_CONSTBUF:
             return 0;
 
         /* SWTCL-only features. */
index 9844add6053e3ad484c85059d88ba88806340e1e..2d1ed765e350b267f3dce8d0639b5bcacfa120c6 100644 (file)
@@ -401,6 +401,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
        case PIPE_CAP_QUERY_SO_OVERFLOW:
        case PIPE_CAP_MEMOBJ:
+       case PIPE_CAP_LOAD_CONSTBUF:
                return 0;
 
        case PIPE_CAP_DOUBLES:
index ca2e055a90eabad9520f143ef1da1d8229285522..262bdc921e548029a4f19b00c5f92b4007ef8477 100644 (file)
@@ -575,6 +575,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_LOAD_CONSTBUF:
                return 0;
 
        case PIPE_CAP_QUERY_BUFFER_OBJECT:
index 2988095eec22b7033dd2ad87a34c6836abe5a957..7e9d9e6592f7b2936b584e24339d1f3113cdd8d6 100644 (file)
@@ -310,6 +310,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_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
index ef3e07ea38f493ab13316c6a72c6f4bd7a9e9f06..bc533cd7ae816523fad9f2e13e75864be52aff76 100644 (file)
@@ -453,6 +453,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
    }
 
index 95046adb5ff05a87e409e2639c919c28e3e27bc7..ee7782d648d32b2881400a1680aea60d4bfa5b13 100644 (file)
@@ -345,6 +345,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index e206456f24ce541d5cacb84acd7b28f91aa4094d..baf2456b191f9e6abf02f153d0def1e5ca92e429 100644 (file)
@@ -264,6 +264,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
         case PIPE_CAP_QUERY_SO_OVERFLOW:
        case PIPE_CAP_MEMOBJ:
+        case PIPE_CAP_LOAD_CONSTBUF:
                 return 0;
 
                 /* Stream output. */
index 68d74adadda8a2c0bc7654aa0771a294ef314934..3c1843e304204d5f76c15281a4e29d6153a19a8d 100644 (file)
@@ -268,6 +268,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
+   case PIPE_CAP_LOAD_CONSTBUF:
       return 0;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
index da7d5da73472a50f4e12c32b4cd0f83b7376132b..1a6e6bd7a707165d1a51a5e120a033b4e8a62a58 100644 (file)
@@ -775,6 +775,7 @@ enum pipe_cap
    PIPE_CAP_NIR_SAMPLERS_AS_DEREF,
    PIPE_CAP_QUERY_SO_OVERFLOW,
    PIPE_CAP_MEMOBJ,
+   PIPE_CAP_LOAD_CONSTBUF,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)