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 Eric Engestrom
parent 266e8c80b4
commit 4e4604521e
2 changed files with 3 additions and 3 deletions

View File

@ -184,7 +184,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"
},

View File

@ -314,7 +314,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;
@ -328,7 +328,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) {