From c1c0311d42382f32c8f8388deb02c2facce8e40a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 31 Jul 2023 12:18:55 +0300 Subject: [PATCH] anv: enable EDS3 ConservativeRasterizationMode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli Part-of: --- src/intel/vulkan/anv_device.c | 2 +- src/intel/vulkan/genX_pipeline.c | 3 --- src/intel/vulkan/gfx8_cmd_buffer.c | 5 ++++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 98d2dc8..1374c20 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -768,10 +768,10 @@ get_features(const struct anv_physical_device *pdevice, .extendedDynamicState3ColorBlendEquation = true, .extendedDynamicState3SampleLocationsEnable = true, .extendedDynamicState3SampleMask = true, + .extendedDynamicState3ConservativeRasterizationMode = true, .extendedDynamicState3RasterizationSamples = false, .extendedDynamicState3AlphaToCoverageEnable = false, - .extendedDynamicState3ConservativeRasterizationMode = false, .extendedDynamicState3ExtraPrimitiveOverestimationSize = false, .extendedDynamicState3ViewportWScalingEnable = false, .extendedDynamicState3ViewportSwizzle = false, diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index a737204..028778e 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -795,9 +795,6 @@ emit_rs_state(struct anv_graphics_pipeline *pipeline, raster.ScissorRectangleEnable = true; - raster.ConservativeRasterizationEnable = - rs && rs->conservative_mode != VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT; - GENX(3DSTATE_SF_pack)(NULL, pipeline->gfx8.sf, &sf); GENX(3DSTATE_RASTER_pack)(NULL, pipeline->gfx8.raster, &raster); } diff --git a/src/intel/vulkan/gfx8_cmd_buffer.c b/src/intel/vulkan/gfx8_cmd_buffer.c index 0cffb41..a0ad411 100644 --- a/src/intel/vulkan/gfx8_cmd_buffer.c +++ b/src/intel/vulkan/gfx8_cmd_buffer.c @@ -509,7 +509,8 @@ genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer) BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_POLYGON_MODE) || BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_LINE_MODE) || BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_DEPTH_CLIP_ENABLE) || - BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_DEPTH_CLAMP_ENABLE)) { + BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_DEPTH_CLAMP_ENABLE) || + BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_CONSERVATIVE_MODE)) { /* Take dynamic primitive topology in to account with * 3DSTATE_RASTER::APIMode * 3DSTATE_RASTER::DXMultisampleRasterizationEnable @@ -568,6 +569,8 @@ genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer) .BackFaceFillMode = genX(vk_to_intel_fillmode)[dyn->rs.polygon_mode], .ViewportZFarClipTestEnable = depth_clip_enable, .ViewportZNearClipTestEnable = depth_clip_enable, + .ConservativeRasterizationEnable = dyn->rs.conservative_mode != + VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, }; GENX(3DSTATE_RASTER_pack)(NULL, raster_dw, &raster); anv_batch_emit_merge(&cmd_buffer->batch, raster_dw, -- 2.7.4