panvk: fix sample shading of internal blend shader for MSAA

Align with gallium side. When fixed-function blending is not available,
the internal blend shader is used. This is handled by a single ST_TILE
in the blend shader with the current sample ID, which requires sample
shading enablement.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
(cherry picked from commit 763d2418b8)

CI fails removed from cherry-pick as the file doesn't exist on stable,
and the main branch change has only removals.

Conflicts:
	src/panfrost/ci/panfrost-g925-fails.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38268>
This commit is contained in:
Yiwei Zhang 2025-10-29 00:54:24 -07:00 committed by Dylan Baker
parent 1dadb38d7b
commit 4482281292
2 changed files with 11 additions and 3 deletions

View file

@ -24,7 +24,7 @@
"description": "panvk: fix sample shading of internal blend shader for MSAA",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -2043,8 +2043,16 @@ prepare_dcd(struct panvk_cmd_buffer *cmdbuf,
cfg.pixel_kill_operation = (enum mali_pixel_kill)earlyzs->kill;
cfg.zs_update_operation = (enum mali_pixel_kill)earlyzs->update;
cfg.evaluate_per_sample = fs->info.fs.sample_shading &&
(dyns->ms.rasterization_samples > 1);
/* Use per-sample shading if required by API. Also use it when a
* blend shader is used with multisampling, as this is handled by a
* single ST_TILE in the blend shader with the current sample ID,
* requiring per-sample shading.
*/
cfg.evaluate_per_sample =
(fs->info.fs.sample_shading ||
cmdbuf->state.gfx.cb.info.needs_shader) &&
(dyns->ms.rasterization_samples > 1);
cfg.shader_modifies_coverage = fs->info.fs.writes_coverage ||
fs->info.fs.can_discard ||