Module: Mesa Branch: master Commit: 9ef23e428bd18c412499471b4e3550a489b72c3f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ef23e428bd18c412499471b4e3550a489b72c3f
Author: Icecream95 <[email protected]> Date: Wed Dec 23 23:30:24 2020 +1300 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8235> --- src/gallium/drivers/panfrost/pan_assemble.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_assemble.c b/src/gallium/drivers/panfrost/pan_assemble.c index fc645dcd953..48dcd0fe3d5 100644 --- a/src/gallium/drivers/panfrost/pan_assemble.c +++ b/src/gallium/drivers/panfrost/pan_assemble.c @@ -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; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
