From: Samuel Pitoiset Date: Wed, 23 Sep 2020 07:00:24 +0000 (+0200) Subject: radv: set KEEP_TOGETHER_ENABLE if necessary on GFX10+ X-Git-Tag: upstream/21.0.0~5147 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6865a6a74cf4b55e289786dfe303c35dacffed3b;p=platform%2Fupstream%2Fmesa.git 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: --- 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