diff options
author | Rhys Perry <[email protected]> | 2018-04-27 08:43:00 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-04-30 21:13:53 -0600 |
commit | 97f5f399ef79d72dc7bb6e7fe7b35c10b9000855 (patch) | |
tree | b8e0ad95781382381cfca566338d28c47342510d /src/mesa/state_tracker/st_atom_rasterizer.c | |
parent | fffe5e2d14f807cd6b778d91e1aaea3a73434547 (diff) |
st/mesa: add support for nvidia conservative rasterization extensions
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom_rasterizer.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index 1be072e6e39..0383b8ac4ad 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -298,5 +298,20 @@ st_update_rasterizer(struct st_context *st) raster->clip_plane_enable = ctx->Transform.ClipPlanesEnabled; raster->clip_halfz = (ctx->Transform.ClipDepthMode == GL_ZERO_TO_ONE); + /* ST_NEW_RASTERIZER */ + if (ctx->ConservativeRasterization) { + if (ctx->ConservativeRasterMode == GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV) + raster->conservative_raster_mode = PIPE_CONSERVATIVE_RASTER_POST_SNAP; + else + raster->conservative_raster_mode = PIPE_CONSERVATIVE_RASTER_PRE_SNAP; + } else { + raster->conservative_raster_mode = PIPE_CONSERVATIVE_RASTER_OFF; + } + + raster->conservative_raster_dilate = ctx->ConservativeRasterDilate; + + raster->subpixel_precision_x = ctx->SubpixelPrecisionBias[0]; + raster->subpixel_precision_y = ctx->SubpixelPrecisionBias[1]; + cso_set_rasterizer(st->cso_context, raster); } |