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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38129>
This commit is contained in:
Yiwei Zhang 2025-10-29 00:54:24 -07:00 committed by Marge Bot
parent 00b8fad3d3
commit 763d2418b8
2 changed files with 10 additions and 1131 deletions

File diff suppressed because it is too large Load diff

View file

@ -2044,8 +2044,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 ||