Mesa (main): aco: Fix small primitive precision.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 1 16:13:52 UTC 2021


Module: Mesa
Branch: main
Commit: c13a8d20f7b2598dd98e0e9c252617dd55a42523
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c13a8d20f7b2598dd98e0e9c252617dd55a42523

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Thu Sep 30 23:11:05 2021 +0200

aco: Fix small primitive precision.

This is a mistake. It should use ngg_culling_settings
instead of ngg_gs_state.

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 d4fd9794fdc..80a5673a3d6 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -9074,7 +9074,7 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
    case nir_intrinsic_load_cull_small_prim_precision_amd: {
       /* Exponent is 8-bit signed int, move that into a signed 32-bit int. */
       Temp exponent = bld.sop2(aco_opcode::s_ashr_i32, bld.def(s1), bld.def(s1, scc),
-                               get_arg(ctx, ctx->args->ngg_gs_state), Operand::c32(24u));
+                               get_arg(ctx, ctx->args->ngg_culling_settings), Operand::c32(24u));
       /* small_prim_precision = 1.0 * 2^X */
       bld.vop3(aco_opcode::v_ldexp_f32, Definition(get_ssa_temp(ctx, &instr->dest.ssa)),
                Operand::c32(0x3f800000u), Operand(exponent));



More information about the mesa-commit mailing list