st/mesa: indicate intel extension support for inner_coverage based on cap
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 18 Apr 2019 17:18:43 +0000 (13:18 -0400)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 23 Apr 2019 23:36:16 +0000 (16:36 -0700)
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 <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/state_tracker/st_atom_rasterizer.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_extensions.c

index fee992e4c4a6fe2203d0befdb0a1d20d2a5a35ff..0d7d4c16fa629946bd3d7df5c9fedee6a9c67c73 100644 (file)
@@ -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;
    }
index 09d467aa36046477b3044e2cff3a1ea2b75f239f..4123906708432325bab0e3f530a11b2fdcafe466 100644 (file)
@@ -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;
 }
 
 
index 3851c4ec6cca7732eb607689c356d28a49813a35..b23bd7c044de84809dedf449e28e6f6f4eb761df 100644 (file)
@@ -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               },