gallium: add PIPE_CAP_MAX_GS_INVOCATIONS
authorMarek Olšák <marek.olsak@amd.com>
Mon, 6 Aug 2018 12:07:25 +0000 (08:07 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 23 Aug 2018 20:56:17 +0000 (16:56 -0400)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
19 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_get.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/v3d/v3d_screen.c
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/drivers/virgl/virgl_screen.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_extensions.c

index e85246c47786c35b8c2af16ec468adf7f1abc769..a4d71b3a84952e135b0c6bb656a39c8965fab139 100644 (file)
@@ -452,7 +452,8 @@ subpixel precision bias in bits during conservative rasterization.
 * ``PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS``: True is the driver supports
   programmable sample location through ```get_sample_pixel_grid``` and
   ```set_sample_locations```.
-
+* ``PIPE_CAP_MAX_GS_INVOCATIONS``: Maximum supported value of
+  TGSI_PROPERTY_GS_INVOCATIONS.
 
 .. _pipe_capf:
 
index 35707e604458c226420517fe90cd92cc5950f565..e8bc6a5cae84cce07270a90ba984221e931c7e91 100644 (file)
@@ -285,6 +285,9 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
 
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
+
    /* Stream output. */
    case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
    case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
index 7ba0dac658cca6e62da0bceb91d9ecfaa8295731..96d4adaa73df713d75eb4dcc15a32e17e521b358 100644 (file)
@@ -372,6 +372,9 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
                return 0;
 
+       case PIPE_CAP_MAX_GS_INVOCATIONS:
+               return 32;
+
        case PIPE_CAP_CONTEXT_PRIORITY_MASK:
                return screen->priority_mask;
 
index dda7c5baee5485226ce05e8a2cc6afcbddadafa5..6b850064019d94065c9e5b5d768b3c4af8336cfc 100644 (file)
@@ -337,6 +337,9 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
 
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
+
    case PIPE_CAP_MAX_VIEWPORTS:
       return 1;
 
index 261bca907a6321f3c2f0e6888ae5492c37a4df4e..1181f1c0a6e0a38a32ab15b80c5f6a6da020b6ba 100644 (file)
@@ -373,6 +373,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
    }
    /* should only get here on unhandled cases */
    debug_printf("Unexpected PIPE_CAP %d query\n", param);
index 556bd9bbbbe85d38e3f130eb9a3f4ea9d544bb65..fc89bfbc1b26f6ce0a0b0ac40a9f5c488d9f6750 100644 (file)
@@ -240,6 +240,8 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
 
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
    case PIPE_CAP_VENDOR_ID:
       return 0x10de;
    case PIPE_CAP_DEVICE_ID: {
index cea6818bc9afdc37f540f17f012cc2e4c0f454d1..6f3fdf3495147aa8ba21e9665466b38ad0dc4c59 100644 (file)
@@ -294,6 +294,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
 
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
    case PIPE_CAP_VENDOR_ID:
       return 0x10de;
    case PIPE_CAP_DEVICE_ID: {
index daa4edb0dcaa917da39f9e7ddaad25dc6262feec..8c1cd878bd0ab0b1ff340a348de2fc52b9ec71a3 100644 (file)
@@ -267,6 +267,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return class_3d >= GM200_3D_CLASS;
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
    case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
       return class_3d >= GP100_3D_CLASS;
    case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
index 046d68c0b5911c2ad3c7461b75142aac0fa902cb..73e80f2dd4c1d0471fe907472ca309ba29d4eb74 100644 (file)
@@ -262,6 +262,9 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
             return 0;
 
+        case PIPE_CAP_MAX_GS_INVOCATIONS:
+            return 32;
+
         /* SWTCL-only features. */
         case PIPE_CAP_PRIMITIVE_RESTART:
         case PIPE_CAP_USER_VERTEX_BUFFERS:
index ffed69a081ea65738d219df364ae33e6e98953f9..69cfb8028a800c2a3181080f3a77002ddd2522fd 100644 (file)
@@ -376,6 +376,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
                return 8;
 
+       case PIPE_CAP_MAX_GS_INVOCATIONS:
+               return 32;
+
        /* Unsupported features. */
        case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
        case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
index 14bd5c11e4f2a5377e89954102a07d528ec2fd06..d27ce474b054406a9133ac07fbf40c74f5d2a4eb 100644 (file)
@@ -261,6 +261,8 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                return 1024;
        case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
                return 4095;
+       case PIPE_CAP_MAX_GS_INVOCATIONS:
+               return 32;
 
        case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
                return 2048;
index 302bebfc39607eba72e92bbaba5efe547307ec9a..1fe807d81f16848f1ba8caa57503e580df19185d 100644 (file)
@@ -325,6 +325,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
    }
index 19920fc16ec54e4a2dfecbea76fbae9ea7eb9516..884aa595ae9184e09147f542c57ded9b5dd8df97 100644 (file)
@@ -471,6 +471,8 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_PACKED_UNIFORMS:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
    }
 
    debug_printf("Unexpected PIPE_CAP_ query %u\n", param);
index 084f55dab997c3096b390113bd8d61ced3afc259..f6d1f1c5f719b354b9d73e7c7c4262cb4934a7b2 100644 (file)
@@ -362,6 +362,8 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
 
    case PIPE_CAP_VENDOR_ID:
       return 0xFFFFFFFF;
index 28334aeba4ccb14f4934c6e4d2a4455b0bbbcf13..e54e9802ecf392f200067b760670ebf8f6b82533 100644 (file)
@@ -277,6 +277,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                 /* Geometry shader output, unsupported. */
         case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
         case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
+       case PIPE_CAP_MAX_GS_INVOCATIONS:
                 return 0;
 
                 /* Texturing. */
index 646e7fa723196e673e8a50d33783bb02a000d7ad..89ebc84477be721e4d98fc6d39017276cfb46fe6 100644 (file)
@@ -313,6 +313,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                 /* Geometry shader output, unsupported. */
         case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
         case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
+       case PIPE_CAP_MAX_GS_INVOCATIONS:
                 return 0;
 
                 /* Texturing. */
index 7df865eb12304a176ed7680902ccf6ac7757931e..257cc147bf83e82d8a25bf848997706e8238937a 100644 (file)
@@ -308,6 +308,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return 0;
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+      return 32;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
    case PIPE_CAP_DEVICE_ID:
index 9909b2b9ae09eb9b1c1f40eef1e084e13306bbd7..c008f9d66f25c30c154b09c4eb1ba506a4c5fefb 100644 (file)
@@ -815,6 +815,7 @@ enum pipe_cap
    PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS,
    PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE,
    PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS,
+   PIPE_CAP_MAX_GS_INVOCATIONS,
 };
 
 /**
index 0705f25e007076379ac21a7678464360731b8001..ba0e89c700ccd638531258e1601ef1dbbb28d0f7 100644 (file)
@@ -361,6 +361,8 @@ void st_init_limits(struct pipe_screen *screen,
       screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES);
    c->MaxGeometryTotalOutputComponents =
       screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS);
+   c->MaxGeometryShaderInvocations =
+      screen->get_param(screen, PIPE_CAP_MAX_GS_INVOCATIONS);
    c->MaxTessPatchComponents =
       MIN2(screen->get_param(screen, PIPE_CAP_MAX_SHADER_PATCH_VARYINGS),
            MAX_VARYING) * 4;