Commit f6ccd594 authored by Marek Olšák's avatar Marek Olšák

gallium: add PIPE_CAP_MAX_GS_INVOCATIONS

Tested-by: Dieter Nützel's avatarDieter Nützel <Dieter@nuetzel-hh.de>
parent 8c71b70f
...@@ -452,7 +452,8 @@ subpixel precision bias in bits during conservative rasterization. ...@@ -452,7 +452,8 @@ subpixel precision bias in bits during conservative rasterization.
* ``PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS``: True is the driver supports * ``PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS``: True is the driver supports
programmable sample location through ```get_sample_pixel_grid``` and programmable sample location through ```get_sample_pixel_grid``` and
```set_sample_locations```. ```set_sample_locations```.
* ``PIPE_CAP_MAX_GS_INVOCATIONS``: Maximum supported value of
TGSI_PROPERTY_GS_INVOCATIONS.
.. _pipe_capf: .. _pipe_capf:
......
...@@ -285,6 +285,9 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) ...@@ -285,6 +285,9 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
/* Stream output. */ /* Stream output. */
case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS: case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME: case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
......
...@@ -372,6 +372,9 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) ...@@ -372,6 +372,9 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_CONTEXT_PRIORITY_MASK: case PIPE_CAP_CONTEXT_PRIORITY_MASK:
return screen->priority_mask; return screen->priority_mask;
......
...@@ -337,6 +337,9 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap) ...@@ -337,6 +337,9 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_MAX_VIEWPORTS: case PIPE_CAP_MAX_VIEWPORTS:
return 1; return 1;
......
...@@ -373,6 +373,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) ...@@ -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_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
} }
/* should only get here on unhandled cases */ /* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param); debug_printf("Unexpected PIPE_CAP %d query\n", param);
......
...@@ -240,6 +240,8 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) ...@@ -240,6 +240,8 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_VENDOR_ID: case PIPE_CAP_VENDOR_ID:
return 0x10de; return 0x10de;
case PIPE_CAP_DEVICE_ID: { case PIPE_CAP_DEVICE_ID: {
......
...@@ -294,6 +294,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) ...@@ -294,6 +294,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_VENDOR_ID: case PIPE_CAP_VENDOR_ID:
return 0x10de; return 0x10de;
case PIPE_CAP_DEVICE_ID: { case PIPE_CAP_DEVICE_ID: {
......
...@@ -267,6 +267,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) ...@@ -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_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return class_3d >= GM200_3D_CLASS; return class_3d >= GM200_3D_CLASS;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES: case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
return class_3d >= GP100_3D_CLASS; return class_3d >= GP100_3D_CLASS;
case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE: case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
......
...@@ -262,6 +262,9 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param) ...@@ -262,6 +262,9 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
/* SWTCL-only features. */ /* SWTCL-only features. */
case PIPE_CAP_PRIMITIVE_RESTART: case PIPE_CAP_PRIMITIVE_RESTART:
case PIPE_CAP_USER_VERTEX_BUFFERS: case PIPE_CAP_USER_VERTEX_BUFFERS:
......
...@@ -376,6 +376,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param) ...@@ -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: case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
return 8; return 8;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
/* Unsupported features. */ /* Unsupported features. */
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
......
...@@ -261,6 +261,8 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) ...@@ -261,6 +261,8 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 1024; return 1024;
case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
return 4095; return 4095;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE: case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
return 2048; return 2048;
......
...@@ -325,6 +325,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) ...@@ -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_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT: case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
return 4; return 4;
} }
......
...@@ -471,6 +471,8 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param) ...@@ -471,6 +471,8 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_PACKED_UNIFORMS: case PIPE_CAP_PACKED_UNIFORMS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
} }
debug_printf("Unexpected PIPE_CAP_ query %u\n", param); debug_printf("Unexpected PIPE_CAP_ query %u\n", param);
......
...@@ -362,6 +362,8 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param) ...@@ -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_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_VENDOR_ID: case PIPE_CAP_VENDOR_ID:
return 0xFFFFFFFF; return 0xFFFFFFFF;
......
...@@ -277,6 +277,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) ...@@ -277,6 +277,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
/* Geometry shader output, unsupported. */ /* Geometry shader output, unsupported. */
case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES: case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 0; return 0;
/* Texturing. */ /* Texturing. */
......
...@@ -313,6 +313,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) ...@@ -313,6 +313,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
/* Geometry shader output, unsupported. */ /* Geometry shader output, unsupported. */
case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES: case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 0; return 0;
/* Texturing. */ /* Texturing. */
......
...@@ -308,6 +308,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param) ...@@ -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_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0; return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
case PIPE_CAP_VENDOR_ID: case PIPE_CAP_VENDOR_ID:
return 0x1af4; return 0x1af4;
case PIPE_CAP_DEVICE_ID: case PIPE_CAP_DEVICE_ID:
......
...@@ -815,6 +815,7 @@ enum pipe_cap ...@@ -815,6 +815,7 @@ enum pipe_cap
PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS, PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS,
PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE, PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE,
PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS, PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS,
PIPE_CAP_MAX_GS_INVOCATIONS,
}; };
/** /**
......
...@@ -361,6 +361,8 @@ void st_init_limits(struct pipe_screen *screen, ...@@ -361,6 +361,8 @@ void st_init_limits(struct pipe_screen *screen,
screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES); screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES);
c->MaxGeometryTotalOutputComponents = c->MaxGeometryTotalOutputComponents =
screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS); screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS);
c->MaxGeometryShaderInvocations =
screen->get_param(screen, PIPE_CAP_MAX_GS_INVOCATIONS);
c->MaxTessPatchComponents = c->MaxTessPatchComponents =
MIN2(screen->get_param(screen, PIPE_CAP_MAX_SHADER_PATCH_VARYINGS), MIN2(screen->get_param(screen, PIPE_CAP_MAX_SHADER_PATCH_VARYINGS),
MAX_VARYING) * 4; MAX_VARYING) * 4;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment