panfrost: Fix discard behaviour on Bifrost
Set zs_update_operation to FORCE_LATE, as we don't want to update depth if the fragment is discarded. Set pixel_kill_operation to WEAK_EARLY to match the blob. Reviewed-and-tested-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8235>
This commit is contained in:
@@ -82,6 +82,9 @@ pan_prepare_bifrost_props(struct panfrost_shader_state *state,
|
||||
if (state->writes_depth || state->writes_stencil) {
|
||||
state->properties.bifrost.zs_update_operation = MALI_PIXEL_KILL_FORCE_LATE;
|
||||
state->properties.bifrost.pixel_kill_operation = MALI_PIXEL_KILL_FORCE_LATE;
|
||||
} else if (state->can_discard) {
|
||||
state->properties.bifrost.zs_update_operation = MALI_PIXEL_KILL_FORCE_LATE;
|
||||
state->properties.bifrost.pixel_kill_operation = MALI_PIXEL_KILL_WEAK_EARLY;
|
||||
} else {
|
||||
state->properties.bifrost.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
|
||||
state->properties.bifrost.pixel_kill_operation = MALI_PIXEL_KILL_FORCE_EARLY;
|
||||
|
||||
Reference in New Issue
Block a user