Mesa (main): aco: Fix determining whether any culling is enabled.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 1 16:13:52 UTC 2021
Module: Mesa
Branch: main
Commit: 6ca66808b5ab60b3a3177987a17b6a8803cb1d1d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ca66808b5ab60b3a3177987a17b6a8803cb1d1d
Author: Timur Kristóf <timur.kristof at gmail.com>
Date: Fri Oct 1 12:29:24 2021 +0200
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: 182d9b1e6072bec190cf0a52e9d93dbbdbaa850d
Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13129>
---
src/amd/compiler/aco_instruction_selection.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index 80a5673a3d6..534ee215da7 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -9065,7 +9065,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()));
More information about the mesa-commit
mailing list