gallium: add a cap for supporting 4-offset TG4 opcodes
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 27 Apr 2014 03:44:57 +0000 (23:44 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 8 May 2014 00:40:46 +0000 (20:40 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
14 files changed:
src/gallium/docs/source/screen.rst
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/ilo/ilo_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/include/pipe/p_defines.h

index e22435cd46a1540ebc496939de9732de96c7d8f2..b2922572a5b248ee3a027e7a3a48d405f69ac8c8 100644 (file)
@@ -200,6 +200,8 @@ The integer capabilities:
 * ``PIPE_CAP_SAMPLE_SHADING``: Whether there is support for per-sample
   shading. The context->set_min_samples function will be expected to be
   implemented.
+* ``PIPE_CAP_TEXTURE_GATHER_OFFSETS``: Whether the ``TG4`` instruction can
+  accept 4 offsets.
 
 
 .. _pipe_capf:
index d62d4b61b6f4277d5aa0ffff77e9bd47d557f177..4de3e3f3804775bce8e56a9b646e3abd80f5cb82 100644 (file)
@@ -202,13 +202,14 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_USER_INDEX_BUFFERS:
        case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
        case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
-        case PIPE_CAP_TGSI_VS_LAYER:
+       case PIPE_CAP_TGSI_VS_LAYER:
        case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
        case PIPE_CAP_TEXTURE_GATHER_SM5:
-        case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
-        case PIPE_CAP_FAKE_SW_MSAA:
+       case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
+       case PIPE_CAP_FAKE_SW_MSAA:
        case PIPE_CAP_TEXTURE_QUERY_LOD:
-        case PIPE_CAP_SAMPLE_SHADING:
+       case PIPE_CAP_SAMPLE_SHADING:
+       case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
                return 0;
 
        /* Stream output. */
index 8ee4330494a69aeafd6e8e3edd17fbff6f168894..dfd7a2ee4299c83b1deb8229afb651adc81137d9 100644 (file)
@@ -221,6 +221,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_FAKE_SW_MSAA:
    case PIPE_CAP_TEXTURE_QUERY_LOD:
    case PIPE_CAP_SAMPLE_SHADING:
+   case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
       return 0;
 
    case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
index c8fa686c5e7636429e2027aa5d7e404c6b341a03..0a1c56d51b9d38ed663325b2978b3a306549f72b 100644 (file)
@@ -440,6 +440,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_FAKE_SW_MSAA:
    case PIPE_CAP_TEXTURE_QUERY_LOD:
    case PIPE_CAP_SAMPLE_SHADING:
+   case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
       return 0;
 
    default:
index 98dbab7849779d924517ffd8313da18f5303ed39..e23680251f8585c193d2423adff426c5d36371d9 100644 (file)
@@ -242,6 +242,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
    case PIPE_CAP_TEXTURE_QUERY_LOD:
    case PIPE_CAP_SAMPLE_SHADING:
+   case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
       return 0;
    case PIPE_CAP_FAKE_SW_MSAA:
        return 1;
index 53ca98565ab1ea2004ec80cb4456e94be2deb4c1..7157e0cc57a17bd473ea7c8d90b8c0ab96e22a93 100644 (file)
@@ -136,6 +136,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_FAKE_SW_MSAA:
    case PIPE_CAP_TEXTURE_QUERY_LOD:
    case PIPE_CAP_SAMPLE_SHADING:
+   case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
       return 0;
    case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
index 151d5d29b2694cf73cccb786176df008f4b1bf7f..fcac3c1903aa03d08999241bd9ee4ff0ffc679f4 100644 (file)
@@ -198,6 +198,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_VS_LAYER:
    case PIPE_CAP_TEXTURE_GATHER_SM5:
    case PIPE_CAP_FAKE_SW_MSAA:
+   case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
       return 0;
    case PIPE_CAP_MAX_VIEWPORTS:
       return NV50_MAX_VIEWPORTS;
index 815c34f1759c1c4e3486dca0226d561edc98325c..2166788e00e3608aa4b848e5506702dff1a4205c 100644 (file)
@@ -186,6 +186,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_TEXTURE_QUERY_LOD:
    case PIPE_CAP_SAMPLE_SHADING:
+   case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
       return 1;
    case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
       return 4;
index d570514227b50006c17186e6b2f1510766b7d89a..2c0fc4945dfdfd3f66f58bd2271ba98782f60baa 100644 (file)
@@ -174,6 +174,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_TEXTURE_QUERY_LOD:
         case PIPE_CAP_FAKE_SW_MSAA:
         case PIPE_CAP_SAMPLE_SHADING:
+        case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
             return 0;
 
         /* SWTCL-only features. */
index 0668b27f4aaa57c3b648f760499d8437560a744e..368307c8e9d09c35ee16b8230ceec2a9a9e50cd5 100644 (file)
@@ -314,7 +314,8 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
        case PIPE_CAP_TEXTURE_GATHER_SM5:
        case PIPE_CAP_TEXTURE_QUERY_LOD:
-        case PIPE_CAP_SAMPLE_SHADING:
+       case PIPE_CAP_SAMPLE_SHADING:
+       case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
                return 0;
 
        /* Stream output. */
index 24068e3192d778aae486e1cca0b4a344507773ca..3837c3733b8f93f4c43bd51a49b67152e3fa13e1 100644 (file)
@@ -243,7 +243,8 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_TEXCOORD:
        case PIPE_CAP_FAKE_SW_MSAA:
        case PIPE_CAP_TEXTURE_QUERY_LOD:
-        case PIPE_CAP_SAMPLE_SHADING:
+       case PIPE_CAP_SAMPLE_SHADING:
+       case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
                return 0;
 
        case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
index e7c331967056f60cc8fecfc5088eceb7c3fe5f80..316c512da3987b6ee038f71737b3cedcbe919ae5 100644 (file)
@@ -190,6 +190,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
    case PIPE_CAP_TEXTURE_QUERY_LOD:
    case PIPE_CAP_SAMPLE_SHADING:
+   case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
       return 0;
    case PIPE_CAP_FAKE_SW_MSAA:
       return 1;
index bc914b7af7fe23ca2f4595b740d6cf9a105aae50..458fbd04ce4fea6dabf8d1ddb68e17a1372d1cfb 100644 (file)
@@ -274,6 +274,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_FAKE_SW_MSAA:
    case PIPE_CAP_TEXTURE_QUERY_LOD:
    case PIPE_CAP_SAMPLE_SHADING:
+   case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
       return 0;
    case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
       return 64;
index 6869d695376fdf4fcfec0a352d2298ff817f66c8..4024470dac7cc7cb3c90d4bbc98e19c5d3878bbc 100644 (file)
@@ -557,6 +557,7 @@ enum pipe_cap {
    PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET = 95,
    PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET = 96,
    PIPE_CAP_SAMPLE_SHADING = 97,
+   PIPE_CAP_TEXTURE_GATHER_OFFSETS = 98,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)