mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
panvk: set allow_forward_pixel_to_be_killed for draws
Setting this flag is valid as long as the fragment shader doesn't have any side effects on v7+. v6 requires an extra check for earlyzs. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38522>
This commit is contained in:
parent
a071e91725
commit
43c06b5a7a
2 changed files with 7 additions and 0 deletions
|
|
@ -2034,6 +2034,8 @@ prepare_dcd(struct panvk_cmd_buffer *cmdbuf,
|
|||
!(rt_read & rt_written) && !alpha_to_coverage &&
|
||||
!cmdbuf->state.gfx.cb.info.any_dest_read;
|
||||
|
||||
cfg.allow_forward_pixel_to_be_killed = !fs->info.writes_global;
|
||||
|
||||
bool writes_zs = writes_z || writes_s;
|
||||
bool zs_always_passes = ds_test_always_passes(cmdbuf);
|
||||
bool oq = cmdbuf->state.gfx.occlusion_query.mode !=
|
||||
|
|
|
|||
|
|
@ -323,6 +323,11 @@ panvk_draw_prepare_fs_rsd(struct panvk_cmd_buffer *cmdbuf,
|
|||
pan_earlyzs_get(fs->fs.earlyzs_lut, writes_zs || oq,
|
||||
alpha_to_coverage, zs_always_passes, zs_read);
|
||||
|
||||
/* early ZS check for FPK is performed by HW on v7+ */
|
||||
cfg.properties.allow_forward_pixel_to_be_killed =
|
||||
!fs->info.writes_global &&
|
||||
((PAN_ARCH > 6) || earlyzs.kill != MALI_PIXEL_KILL_FORCE_LATE);
|
||||
|
||||
cfg.properties.pixel_kill_operation = earlyzs.kill;
|
||||
cfg.properties.zs_update_operation = earlyzs.update;
|
||||
cfg.multisample_misc.evaluate_per_sample =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue