diff options
author | Rhys Perry <[email protected]> | 2018-04-07 16:15:00 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-04-30 21:13:53 -0600 |
commit | fffe5e2d14f807cd6b778d91e1aaea3a73434547 (patch) | |
tree | 38c51f65d09b65e9486422102c8c4830f230c5c6 /src/gallium/include | |
parent | 4580617509d1ba48a7806227533a07e1c495ca81 (diff) |
gallium: add initial support for conservative rasterization
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 20 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 8 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index c4ae0532060..6b2f33b9e37 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -607,6 +607,17 @@ enum pipe_reset_status /** + * Conservative rasterization modes. + */ +enum pipe_conservative_raster_mode +{ + PIPE_CONSERVATIVE_RASTER_OFF, + PIPE_CONSERVATIVE_RASTER_POST_SNAP, + PIPE_CONSERVATIVE_RASTER_PRE_SNAP, +}; + + +/** * resource_get_handle flags. */ /* Requires pipe_context::flush_resource before external use. */ @@ -795,6 +806,12 @@ enum pipe_cap PIPE_CAP_FENCE_SIGNAL, PIPE_CAP_CONSTBUF0_FLAGS, PIPE_CAP_PACKED_UNIFORMS, + PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES, + PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES, + PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES, + PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES, + PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS, + PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE, }; /** @@ -834,6 +851,9 @@ enum pipe_capf PIPE_CAPF_MAX_POINT_WIDTH_AA, PIPE_CAPF_MAX_TEXTURE_ANISOTROPY, PIPE_CAPF_MAX_TEXTURE_LOD_BIAS, + PIPE_CAPF_MIN_CONSERVATIVE_RASTER_DILATE, + PIPE_CAPF_MAX_CONSERVATIVE_RASTER_DILATE, + PIPE_CAPF_CONSERVATIVE_RASTER_DILATE_GRANULARITY, }; /** Shader caps not specific to any single stage */ diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 4dce399f848..db9fa1a8e9f 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -113,6 +113,7 @@ struct pipe_rasterizer_state unsigned line_smooth:1; unsigned line_stipple_enable:1; unsigned line_last_pixel:1; + unsigned conservative_raster_mode:2; /**< PIPE_CONSERVATIVE_RASTER_x */ /** * Use the first vertex of a primitive as the provoking vertex for @@ -123,6 +124,12 @@ struct pipe_rasterizer_state unsigned half_pixel_center:1; unsigned bottom_edge_rule:1; + /* + * Conservative rasterization subpixel precision bias in bits + */ + unsigned subpixel_precision_x:4; + unsigned subpixel_precision_y:4; + /** * When true, rasterization is disabled and no pixels are written. * This only makes sense with the Stream Out functionality. @@ -186,6 +193,7 @@ struct pipe_rasterizer_state float offset_units; float offset_scale; float offset_clamp; + float conservative_raster_dilate; }; |