From e00f6a06050a0d19d49f2b6525bbed2e0c28d44f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 18 Apr 2019 13:18:43 -0400 Subject: [PATCH] st/mesa: indicate intel extension support for inner_coverage based on cap MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit if the driver (iris) indicates support for the inner_coverage pipe cap, this will set the necessary states in the driver flags and rasterizer structs Reviewed-by: Marek Olšák Reviewed-by: Kenneth Graunke --- src/mesa/state_tracker/st_atom_rasterizer.c | 2 ++ src/mesa/state_tracker/st_context.c | 1 + src/mesa/state_tracker/st_extensions.c | 1 + 3 files changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index fee992e4c4a..0d7d4c16fa6 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -306,6 +306,8 @@ st_update_rasterizer(struct st_context *st) raster->conservative_raster_mode = PIPE_CONSERVATIVE_RASTER_POST_SNAP; else raster->conservative_raster_mode = PIPE_CONSERVATIVE_RASTER_PRE_SNAP; + } else if (ctx->IntelConservativeRasterization) { + raster->conservative_raster_mode = PIPE_CONSERVATIVE_RASTER_POST_SNAP; } else { raster->conservative_raster_mode = PIPE_CONSERVATIVE_RASTER_OFF; } diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 09d467aa360..41239067084 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -513,6 +513,7 @@ st_init_driver_flags(struct st_context *st) f->NewViewport = ST_NEW_VIEWPORT; f->NewNvConservativeRasterization = ST_NEW_RASTERIZER; f->NewNvConservativeRasterizationParams = ST_NEW_RASTERIZER; + f->NewIntelConservativeRasterization = ST_NEW_RASTERIZER; } diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 3851c4ec6cc..b23bd7c044d 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -772,6 +772,7 @@ void st_init_extensions(struct pipe_screen *screen, { o(ATI_meminfo), PIPE_CAP_QUERY_MEMORY_INFO }, { o(AMD_seamless_cubemap_per_texture), PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE }, { o(ATI_texture_mirror_once), PIPE_CAP_TEXTURE_MIRROR_CLAMP }, + { o(INTEL_conservative_rasterization), PIPE_CAP_CONSERVATIVE_RASTER_INNER_COVERAGE }, { o(MESA_tile_raster_order), PIPE_CAP_TILE_RASTER_ORDER }, { o(NV_compute_shader_derivatives), PIPE_CAP_COMPUTE_SHADER_DERIVATIVES }, { o(NV_conditional_render), PIPE_CAP_CONDITIONAL_RENDER }, -- 2.30.2