panfrost: Allow pixels using discard to be killed
info.fs.sidefx considers discard() to be a side effect. That definition is... dubious at best. It certainly isn't the definition needed for forward pixel kill. The only reason pixels couldn't be killed by FPK is if the shader has side effects in the sense of writing to memory. Use that more precise condition so FPK works more often. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Closes: #5607 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16984>
This commit is contained in:

committed by
Marge Bot

parent
96e7e92f0d
commit
c43882ad54
@@ -3325,7 +3325,7 @@ panfrost_emit_draw(void *out,
|
||||
cfg.zs_update_operation = kill.zs_update;
|
||||
|
||||
cfg.allow_forward_pixel_to_kill = pan_allow_forward_pixel_to_kill(ctx, fs);
|
||||
cfg.allow_forward_pixel_to_be_killed = !fs->info.fs.sidefx;
|
||||
cfg.allow_forward_pixel_to_be_killed = !fs->info.writes_global;
|
||||
|
||||
/* Mask of render targets that may be written. A render
|
||||
* target may be written if the fragment shader writes
|
||||
|
@@ -238,7 +238,7 @@ pan_shader_prepare_bifrost_rsd(const struct pan_shader_info *info,
|
||||
info->fs.writes_coverage || info->fs.can_discard;
|
||||
|
||||
rsd->properties.allow_forward_pixel_to_be_killed =
|
||||
!info->fs.sidefx;
|
||||
!info->writes_global;
|
||||
|
||||
#if PAN_ARCH >= 7
|
||||
rsd->properties.shader_wait_dependency_6 = info->bifrost.wait_6;
|
||||
|
Reference in New Issue
Block a user