gallium: add PIPE_CAP_NIR_SAMPLERS_AS_DEREF
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sun, 25 Jun 2017 16:31:11 +0000 (18:31 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 31 Jul 2017 12:55:29 +0000 (14:55 +0200)
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 32da22885d6f69e9d6946c8e3784847ab44c6c30..ee7accba5e966ec62c764b226a110c2856a4a1dc 100644 (file)
@@ -396,6 +396,8 @@ The integer capabilities:
   ``TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE`` is supported.
 * ``PIPE_CAP_BINDLESS_TEXTURE``: Whether bindless texture operations are
   supported.
+* ``PIPE_CAP_NIR_SAMPLERS_AS_DEREF``: Whether NIR tex instructions should
+  reference texture and sampler as NIR derefs instead of by indices.
 
 
 .. _pipe_capf:
index 129b0cd6c77887b7737ed31e5f02e3d0c77fa54d..0e3d5d84cf219834344b7429061ada6d272e9a86 100644 (file)
@@ -260,6 +260,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
 
    /* Stream output. */
index a915d65ee0b55ae1cc1ba3066e88edbe7bdbc8cd..c5772d25ce834cace8db4ebfdf7924b5afa2b115 100644 (file)
@@ -321,6 +321,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
        case PIPE_CAP_POST_DEPTH_COVERAGE:
        case PIPE_CAP_BINDLESS_TEXTURE:
+       case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
                return 0;
 
        case PIPE_CAP_MAX_VIEWPORTS:
index 4ad98e2a08e121aa642b79eb37d7ef5085701532..3a0dade81f6fd00749e8667807455f2588e43b92 100644 (file)
@@ -310,6 +310,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
    case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
 
    case PIPE_CAP_MAX_VIEWPORTS:
index e98e30d50a253286a2bf7c9c41245a39fbfe7d95..08edc087d28e8b1d332be86b87349b2f745c8aad 100644 (file)
@@ -356,6 +356,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
    }
    /* should only get here on unhandled cases */
index a352ff555c4a678a77dd9c9fe8baa0ce1004b61c..570a5d459a21482c8b0558635d315be939d70f27 100644 (file)
@@ -220,6 +220,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 78e11cf5bea186a945de9bd991c65cb2d665bd7a..fbda514fa3eb30da50277ce4d7e29df301445dc4 100644 (file)
@@ -272,6 +272,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 8bbe403021274882168c773aa65afda4597cd4ca..6a7a57538e26d668be097dc835b534b4d421e464 100644 (file)
@@ -301,6 +301,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_INT64_DIVMOD:
    case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 5cdb24871c3f19fec989ca1d5b9c1ff9a284cc24..a994a05b5dc910073bc0c49d58520e38c8949902 100644 (file)
@@ -242,6 +242,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
         case PIPE_CAP_POST_DEPTH_COVERAGE:
         case PIPE_CAP_BINDLESS_TEXTURE:
+        case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
             return 0;
 
         /* SWTCL-only features. */
index f0ea4095762869b7548005ac827af1edcb248d89..f09e46833f2fff40c2f3e79d0e577b74b2163850 100644 (file)
@@ -398,6 +398,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
        case PIPE_CAP_POST_DEPTH_COVERAGE:
        case PIPE_CAP_BINDLESS_TEXTURE:
+       case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
                return 0;
 
        case PIPE_CAP_DOUBLES:
index 067efb963a3ba97e26065bdf694c299861091684..f44a102e83ce9e15b0bd7e283079b941db6d175d 100644 (file)
@@ -511,6 +511,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_BINDLESS_TEXTURE:
        case PIPE_CAP_QUERY_TIMESTAMP:
        case PIPE_CAP_QUERY_TIME_ELAPSED:
+       case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
                return 1;
 
        case PIPE_CAP_INT64:
index 5c96a14c80cabeb253d9989df9ace48b9069a3f1..6ed2ce12b5e34426ecfd5b095161e9ba442cf795 100644 (file)
@@ -306,6 +306,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
index 77223c9c91753e931a3fff789fdeb5b0fe2d6947..fd849db38c777be32ee4abfb96f094d707d2a927 100644 (file)
@@ -450,6 +450,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
    }
 
index 952ae0c77a5b8185e15253b16452e8b89dac282a..f44f5832a199375a518501e4d955bbe5d010b08c 100644 (file)
@@ -339,6 +339,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index f3b47ca8903e0a563015f8f8f1818e5c4d3e0752..f5e913a87ded119a63a9c628c1061545f672c044 100644 (file)
@@ -261,6 +261,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
         case PIPE_CAP_POST_DEPTH_COVERAGE:
         case PIPE_CAP_BINDLESS_TEXTURE:
+        case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
                 return 0;
 
                 /* Stream output. */
index 5df08407d7b17d66aaa0bff0c36d0f5be1e65382..e155b4a7bf0319a04b805a453aea9dcfd7deadeb 100644 (file)
@@ -265,6 +265,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
+   case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
       return 0;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
index 2ccdf44bfe288b60810e7b5bbd935b5ea0e5128e..b39612f10fb4bcb8c34096ec6f4b12f6d76bd42c 100644 (file)
@@ -780,6 +780,7 @@ enum pipe_cap
    PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION,
    PIPE_CAP_POST_DEPTH_COVERAGE,
    PIPE_CAP_BINDLESS_TEXTURE,
+   PIPE_CAP_NIR_SAMPLERS_AS_DEREF,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)