mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
panfrost: remove incorrect usage of MALI_PIXEL_KILL_STRONG_EARLY
On bifrost, zs_update_operation=STRONG_EARLY, is equivalent to
WEAK_EARLY except that it may test/update without waiting for pixel
dependencies if it can prove that the test will pass.
STRONG_EARLY no longer exists on valhall, and the value 2 is reserved.
Even on bifrost, all of our current uses of STRONG_EARLY are
incorrect. For color preload, the shader skips ATEST, so FORCE_EARLY is
required. In the no-FS case, ATEST is skipped by definition (because
there is no shader), so FORCE_EARLY is required.
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 519643bbe0 ("panfrost: Adjust the renderer state definition")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32954>
This commit is contained in:
parent
4b741338ac
commit
79517d8a65
7 changed files with 7 additions and 9 deletions
|
|
@ -465,7 +465,7 @@ pan_merge_empty_fs(struct mali_renderer_state_packed *rsd)
|
|||
cfg.properties.shader_modifies_coverage = true;
|
||||
cfg.properties.allow_forward_pixel_to_kill = true;
|
||||
cfg.properties.allow_forward_pixel_to_be_killed = true;
|
||||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
|
||||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
|
||||
/* Alpha isn't written so these are vacuous */
|
||||
cfg.multisample_misc.overdraw_alpha0 = true;
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ pan_preload_emit_rsd(const struct pan_preload_shader_data *preload_shader,
|
|||
cfg.properties.pixel_kill_operation = MALI_PIXEL_KILL_FORCE_LATE;
|
||||
} else {
|
||||
/* Skipping ATEST requires forcing Z/S */
|
||||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
|
||||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
cfg.properties.pixel_kill_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
}
|
||||
|
||||
|
|
@ -1190,7 +1190,7 @@ pan_preload_emit_dcd(struct pan_fb_preload_cache *cache, struct pan_pool *pool,
|
|||
cfg.blend_count = 0;
|
||||
} else {
|
||||
/* Skipping ATEST requires forcing Z/S */
|
||||
cfg.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
|
||||
cfg.zs_update_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
cfg.pixel_kill_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
|
||||
cfg.blend = blend.gpu;
|
||||
|
|
|
|||
|
|
@ -356,7 +356,6 @@
|
|||
|
||||
<enum name="Pixel Kill">
|
||||
<value name="Force Early" value="0"/>
|
||||
<value name="Strong Early" value="1"/>
|
||||
<value name="Weak Early" value="2"/>
|
||||
<value name="Force Late" value="3"/>
|
||||
</enum>
|
||||
|
|
|
|||
|
|
@ -373,7 +373,6 @@
|
|||
|
||||
<enum name="Pixel Kill">
|
||||
<value name="Force Early" value="0"/>
|
||||
<value name="Strong Early" value="1"/>
|
||||
<value name="Weak Early" value="2"/>
|
||||
<value name="Force Late" value="3"/>
|
||||
</enum>
|
||||
|
|
|
|||
|
|
@ -1540,7 +1540,7 @@ prepare_dcd(struct panvk_cmd_buffer *cmdbuf)
|
|||
cfg.allow_forward_pixel_to_kill = true;
|
||||
cfg.allow_forward_pixel_to_be_killed = true;
|
||||
cfg.pixel_kill_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
cfg.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
|
||||
cfg.zs_update_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
cfg.overdraw_alpha0 = true;
|
||||
cfg.overdraw_alpha1 = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ panvk_draw_prepare_fs_rsd(struct panvk_cmd_buffer *cmdbuf,
|
|||
cfg.properties.depth_source = MALI_DEPTH_SOURCE_FIXED_FUNCTION;
|
||||
cfg.properties.allow_forward_pixel_to_kill = true;
|
||||
cfg.properties.allow_forward_pixel_to_be_killed = true;
|
||||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
|
||||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
}
|
||||
|
||||
bool msaa = dyns->ms.rasterization_samples > 1;
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ cmd_emit_dcd(struct panvk_cmd_buffer *cmdbuf, struct pan_fb_info *fbinfo,
|
|||
|
||||
if (key->aspects == VK_IMAGE_ASPECT_COLOR_BIT) {
|
||||
/* Skipping ATEST requires forcing Z/S */
|
||||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
|
||||
cfg.properties.zs_update_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
cfg.properties.pixel_kill_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
} else {
|
||||
/* Writing Z/S requires late updates */
|
||||
|
|
@ -620,7 +620,7 @@ cmd_emit_dcd(struct panvk_cmd_buffer *cmdbuf, struct pan_fb_info *fbinfo,
|
|||
pan_pack(&dcds[dcd_idx], DRAW, cfg) {
|
||||
if (key->aspects == VK_IMAGE_ASPECT_COLOR_BIT) {
|
||||
/* Skipping ATEST requires forcing Z/S */
|
||||
cfg.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
|
||||
cfg.zs_update_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
cfg.pixel_kill_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
|
||||
cfg.blend = bds.gpu;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue