From fffe5e2d14f807cd6b778d91e1aaea3a73434547 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Sat, 7 Apr 2018 16:15:00 -0600 Subject: gallium: add initial support for conservative rasterization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Brian Paul Reviewed-by: Marek Olšák --- src/gallium/docs/source/cso/rasterizer.rst | 23 +++++++++++++++++++++++ src/gallium/docs/source/screen.rst | 18 ++++++++++++++++++ 2 files changed, 41 insertions(+) (limited to 'src/gallium/docs') diff --git a/src/gallium/docs/source/cso/rasterizer.rst b/src/gallium/docs/source/cso/rasterizer.rst index 616e4511a2d..4dabcc032f5 100644 --- a/src/gallium/docs/source/cso/rasterizer.rst +++ b/src/gallium/docs/source/cso/rasterizer.rst @@ -340,3 +340,26 @@ clip_plane_enable If any clip distance output is written, those half-spaces for which no clip distance is written count as disabled; i.e. user clip planes and shader clip distances cannot be mixed, and clip distances take precedence. + +conservative_raster_mode + The conservative rasterization mode. For PIPE_CONSERVATIVE_RASTER_OFF, + conservative rasterization is disabled. For IPE_CONSERVATIVE_RASTER_POST_SNAP + or PIPE_CONSERVATIVE_RASTER_PRE_SNAP, conservative rasterization is nabled. + When conservative rasterization is enabled, the polygon smooth, line mooth, + point smooth and line stipple settings are ignored. + With the post-snap mode, unlike the pre-snap mode, fragments are never + generated for degenerate primitives. Degenerate primitives, when rasterized, + are considered back-facing and the vertex attributes and depth are that of + the provoking vertex. + If the post-snap mode is used with an unsupported primitive, the pre-snap + mode is used, if supported. Behavior is similar for the pre-snap mode. + If the pre-snap mode is used, fragments are generated with respect to the primitive + before vertex snapping. + +conservative_raster_dilate + The amount of dilation during conservative rasterization. + +subpixel_precision_x + A bias added to the horizontal subpixel precision during conservative rasterization. +subpixel_precision_y + A bias added to the vertical subpixel precision during conservative rasterization. diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 3837360fb40..5bc6ee99f08 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -420,6 +420,18 @@ The integer capabilities: by the driver, and the driver can throw assertion failures. * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed uniforms as opposed to padding to vec4s. +* ``PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES``: Whether the + PIPE_CONSERVATIVE_RASTER_POST_SNAP mode is supported for triangles. +* ``PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES``: Whether the +PIPE_CONSERVATIVE_RASTER_POST_SNAP mode is supported for points and lines. +* ``PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES``: Whether the +PIPE_CONSERVATIVE_RASTER_PRE_SNAP mode is supported for triangles. +* ``PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES``: Whether the +PIPE_CONSERVATIVE_RASTER_PRE_SNAP mode is supported for points and lines. +* ``PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE``: Whether PIPE_CAP_POST_DEPTH_COVERAGE +works with conservative rasterization. +* ``PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS``: The maximum +subpixel precision bias in bits during conservative rasterization. .. _pipe_capf: @@ -437,6 +449,12 @@ The floating-point capabilities are: applied to anisotropically filtered textures. * ``PIPE_CAPF_MAX_TEXTURE_LOD_BIAS``: The maximum :term:`LOD` bias that may be applied to filtered textures. +* ``PIPE_CAPF_MIN_CONSERVATIVE_RASTER_DILATE``: The minimum conservative rasterization + dilation. +* ``PIPE_CAPF_MAX_CONSERVATIVE_RASTER_DILATE``: The maximum conservative rasterization + dilation. +* ``PIPE_CAPF_CONSERVATIVE_RASTER_DILATE_GRANULARITY``: The conservative rasterization + dilation granularity for values relative to the minimum dilation. .. _pipe_shader_cap: -- cgit v1.2.3