From a3c2f78c3de404dffec4febb76790f42e9ae3d3c Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 20 Jan 2023 11:39:27 +0100 Subject: [PATCH] radeonsi: respect smoothing_enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When this was last changed, the smoothing_enabled flag seems to have been forgotten about, breaking line-smoothing (and probably also polygon smoothing). Fixes: 4147add280e ("radeonsi: update db_eqaa even if msaa is disabled") Reviewed-by: Marek Olšák Part-of: (cherry picked from commit 9f4f131f2e9403f8757be33b3a5c10bcbe9b7644) Conflicts: src/amd/ci/radeonsi-raven-fails.txt src/amd/ci/radeonsi-stoney-fails.txt --- .pick_status.json | 2 +- src/amd/ci/radeonsi-stoney-fails.txt | 2 +- src/gallium/drivers/radeonsi/si_state.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e063525608b..613a55c57df 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -148,7 +148,7 @@ "description": "radeonsi: respect smoothing_enabled", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "4147add280e408c68d7910c6cadd860cf92bf5f3" }, diff --git a/src/amd/ci/radeonsi-stoney-fails.txt b/src/amd/ci/radeonsi-stoney-fails.txt index 6de5daf28c3..a4354819ac0 100644 --- a/src/amd/ci/radeonsi-stoney-fails.txt +++ b/src/amd/ci/radeonsi-stoney-fails.txt @@ -235,4 +235,4 @@ spec@khr_texture_compression_astc@miptree-gles srgb-fp@sRGB decode full precisio spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb-fp,Fail spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb-fp@sRGB decode full precision,Fail spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp,Fail -spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp@sRGB decode full precision,Fail \ No newline at end of file +spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp@sRGB decode full precision,Fail diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index b9a9b8949ed..9129d417271 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3804,7 +3804,8 @@ static void si_emit_msaa_config(struct si_context *sctx) unsigned sc_line_cntl = 0; unsigned sc_aa_config = 0; - if (coverage_samples > 1 && rs->multisample_enable) { + if (coverage_samples > 1 && (rs->multisample_enable || + sctx->smoothing_enabled)) { /* distance from the pixel center, indexed by log2(nr_samples) */ static unsigned max_dist[] = { 0, /* unused */ @@ -3826,7 +3827,8 @@ static void si_emit_msaa_config(struct si_context *sctx) S_028BE0_COVERED_CENTROID_IS_CENTER(sctx->gfx_level >= GFX10_3); } - if (sctx->framebuffer.nr_samples > 1) { + if (sctx->framebuffer.nr_samples > 1 || + sctx->smoothing_enabled) { if (sctx->framebuffer.state.zsbuf) { z_samples = sctx->framebuffer.state.zsbuf->texture->nr_samples; z_samples = MAX2(1, z_samples);