llvmpipe: fix wrong assumption on FB fetch shader opacity

In certain cases variant->opaque could be set to true, which
reset command list for tiles fully covered by a triangle
with this shader. This is obviously wrong in presence of
framebuffer fetch.

Signed-off-by: Pavel Asyutchenko <sventeam@yandex.ru>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13252>
This commit is contained in:
Pavel Asyutchenko 2021-09-08 23:21:18 +03:00 committed by Marge Bot
parent 86eb1549ef
commit b1de61dd38
2 changed files with 3 additions and 1 deletions

View File

@ -460,6 +460,7 @@ void nir_tgsi_scan_shader(const struct nir_shader *nir,
info->properties[TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL] =
nir->info.fs.early_fragment_tests | nir->info.fs.post_depth_coverage;
info->properties[TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE] = nir->info.fs.post_depth_coverage;
info->uses_fbfetch = nir->info.fs.uses_fbfetch_output;
if (nir->info.fs.pixel_center_integer) {
info->properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER] =

View File

@ -3627,7 +3627,8 @@ generate_variant(struct llvmpipe_context *lp,
!key->blend.alpha_to_coverage &&
!key->depth.enabled &&
!shader->info.base.uses_kill &&
!shader->info.base.writes_samplemask;
!shader->info.base.writes_samplemask &&
!shader->info.base.uses_fbfetch;
variant->opaque =
no_kill &&