ac/nir/cull: fix line position w culling

Fixes: db0e9d3cab ("ac/nir/ngg: support line culling")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8950
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22867>
(cherry picked from commit 1ba2460e61)
This commit is contained in:
Qiang Yu 2023-05-05 11:04:35 +08:00 committed by Dylan Baker
parent 8e5873161f
commit 60ea1c9036
2 changed files with 3 additions and 3 deletions

View File

@ -4494,7 +4494,7 @@
"description": "ac/nir/cull: fix line position w culling",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "db0e9d3caba348d4edbbe6f883fe1ceb8ddad2c8",
"notes": null

View File

@ -313,7 +313,7 @@ ac_nir_cull_line(nir_builder *b,
void *state)
{
nir_ssa_def *accepted = initially_accepted;
accepted = nir_iand(b, accepted, nir_inot(b, w_info->any_w_negative));
accepted = nir_iand(b, accepted, nir_inot(b, w_info->all_w_negative));
nir_ssa_def *bbox_accepted = NULL;
@ -327,7 +327,7 @@ ac_nir_cull_line(nir_builder *b,
nir_ssa_def *prim_invisible =
cull_small_primitive_line(b, pos, bbox_min, bbox_max, prim_outside_view);
bbox_accepted = nir_inot(b, prim_invisible);
bbox_accepted = nir_ior(b, nir_inot(b, prim_invisible), w_info->any_w_negative);
/* for caller which need to react when primitive is accepted */
if (accept_func) {