aco: Fix determining whether any culling is enabled.

Use 0xB instead of 0x00FFFFFF - this allows to jump over the culling
code when no actual culling is enabled but the ngg_cull_face_is_ccw
flag is set.

Fixes: 182d9b1e60
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13129>
(cherry picked from commit 6ca66808b5)
This commit is contained in:
Timur Kristóf 2021-10-01 12:29:24 +02:00 committed by Dylan Baker
parent 88ace152c4
commit 202f0363ac
2 changed files with 2 additions and 2 deletions

View file

@ -1156,7 +1156,7 @@
"description": "aco: Fix determining whether any culling is enabled.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "182d9b1e6072bec190cf0a52e9d93dbbdbaa850d"
},

View file

@ -8987,7 +8987,7 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
case nir_intrinsic_load_cull_any_enabled_amd: {
Builder::Result cull_any_enabled =
bld.sop2(aco_opcode::s_and_b32, bld.def(s1), bld.def(s1, scc),
get_arg(ctx, ctx->args->ngg_culling_settings), Operand::c32(0x00ffffffu));
get_arg(ctx, ctx->args->ngg_culling_settings), Operand::c32(0xbu));
cull_any_enabled.instr->definitions[1].setNoCSE(true);
bld.copy(Definition(get_ssa_temp(ctx, &instr->dest.ssa)),
bool_to_vector_condition(ctx, cull_any_enabled.def(1).getTemp()));