aco: Fix small primitive precision.

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

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>
This commit is contained in:
Timur Kristóf 2021-09-30 23:11:05 +02:00 committed by Marge Bot
parent fb8f532ea1
commit c13a8d20f7

View file

@ -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));