mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
panfrost: Do not evaluate_per_sample for non-MSAA
Enabling evaluate_per_sample in non-MSAA cases might cause issues and
hangs for subsequent ZS cases.
Therefore, only enable the flag when MSAA is active.
Fixes: 26d339ef8a ("panfrost: Generate Valhall Malloc IDVS jobs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
This commit is contained in:
parent
959403cd87
commit
46256f3e39
4 changed files with 9 additions and 5 deletions
|
|
@ -1196,7 +1196,8 @@ csf_emit_draw_state(struct panfrost_batch *batch,
|
|||
|
||||
/* Also use per-sample shading if required by the shader
|
||||
*/
|
||||
cfg.evaluate_per_sample |= fs->info.fs.sample_shading;
|
||||
cfg.evaluate_per_sample |=
|
||||
(fs->info.fs.sample_shading && rast->multisample);
|
||||
|
||||
/* Unlike Bifrost, alpha-to-coverage must be included in
|
||||
* this identically-named flag. Confusing, isn't it?
|
||||
|
|
|
|||
|
|
@ -593,7 +593,8 @@ jm_emit_tiler_draw(struct mali_draw_packed *out, struct panfrost_batch *batch,
|
|||
|
||||
/* Also use per-sample shading if required by the shader
|
||||
*/
|
||||
cfg.evaluate_per_sample |= fs->info.fs.sample_shading;
|
||||
cfg.evaluate_per_sample |=
|
||||
(fs->info.fs.sample_shading && rast->multisample);
|
||||
|
||||
/* Unlike Bifrost, alpha-to-coverage must be included in
|
||||
* this identically-named flag. Confusing, isn't it?
|
||||
|
|
|
|||
|
|
@ -1526,7 +1526,8 @@ prepare_dcd(struct panvk_cmd_buffer *cmdbuf)
|
|||
|
||||
cfg.pixel_kill_operation = earlyzs.kill;
|
||||
cfg.zs_update_operation = earlyzs.update;
|
||||
cfg.evaluate_per_sample = fs->info.fs.sample_shading;
|
||||
cfg.evaluate_per_sample = fs->info.fs.sample_shading &&
|
||||
(dyns->ms.rasterization_samples > 1);
|
||||
} else {
|
||||
cfg.allow_forward_pixel_to_kill = true;
|
||||
cfg.allow_forward_pixel_to_be_killed = true;
|
||||
|
|
|
|||
|
|
@ -251,6 +251,7 @@ panvk_draw_prepare_fs_rsd(struct panvk_cmd_buffer *cmdbuf,
|
|||
|
||||
pan_pack(rsd, RENDERER_STATE, cfg) {
|
||||
bool alpha_to_coverage = dyns->ms.alpha_to_coverage_enable;
|
||||
bool msaa = dyns->ms.rasterization_samples > 1;
|
||||
|
||||
if (fs) {
|
||||
pan_shader_prepare_rsd(fs_info, fs_code, &cfg);
|
||||
|
|
@ -282,7 +283,8 @@ panvk_draw_prepare_fs_rsd(struct panvk_cmd_buffer *cmdbuf,
|
|||
|
||||
cfg.properties.pixel_kill_operation = earlyzs.kill;
|
||||
cfg.properties.zs_update_operation = earlyzs.update;
|
||||
cfg.multisample_misc.evaluate_per_sample = fs->info.fs.sample_shading;
|
||||
cfg.multisample_misc.evaluate_per_sample =
|
||||
(fs->info.fs.sample_shading && msaa);
|
||||
} else {
|
||||
cfg.properties.depth_source = MALI_DEPTH_SOURCE_FIXED_FUNCTION;
|
||||
cfg.properties.allow_forward_pixel_to_kill = true;
|
||||
|
|
@ -290,7 +292,6 @@ panvk_draw_prepare_fs_rsd(struct panvk_cmd_buffer *cmdbuf,
|
|||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
}
|
||||
|
||||
bool msaa = dyns->ms.rasterization_samples > 1;
|
||||
cfg.multisample_misc.multisample_enable = msaa;
|
||||
cfg.multisample_misc.sample_mask =
|
||||
msaa ? dyns->ms.sample_mask : UINT16_MAX;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue