From 6865a6a74cf4b55e289786dfe303c35dacffed3b Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 23 Sep 2020 09:00:24 +0200 Subject: [PATCH] radv: set KEEP_TOGETHER_ENABLE if necessary on GFX10+ Ported from RadeonSI and PAL. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_pipeline.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index e56b0ec..8f89d0b 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1707,6 +1707,12 @@ radv_pipeline_init_raster_state(struct radv_pipeline *pipeline, S_028814_POLY_OFFSET_FRONT_ENABLE(raster_info->depthBiasEnable ? 1 : 0) | S_028814_POLY_OFFSET_BACK_ENABLE(raster_info->depthBiasEnable ? 1 : 0) | S_028814_POLY_OFFSET_PARA_ENABLE(raster_info->depthBiasEnable ? 1 : 0); + + if (pipeline->device->physical_device->rad_info.chip_class >= GFX10) { + /* It should also be set if PERPENDICULAR_ENDCAP_ENA is set. */ + pipeline->graphics.pa_su_sc_mode_cntl |= + S_028814_KEEP_TOGETHER_ENABLE(raster_info->polygonMode != VK_POLYGON_MODE_FILL); + } } static void -- 2.7.4