ir3: Use round-to-nearest-even for fquantize2f16

We're supposed to map a floating-point value too large to be represented
as fp16 to infinity, however round-to-zero naturally rounds it down to
the largest representable fp16 number instead. The blob emits a bunch of
fixup code to work around this, but instead we can just do what all the
other drivers seem to do and use round-to-nearest-even instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10897>
This commit is contained in:
Connor Abbott 2021-05-19 18:18:52 +02:00 committed by Marge Bot
parent ea266412b6
commit de9f2170cc
2 changed files with 1 additions and 11 deletions

View file

@ -158,16 +158,6 @@ dEQP-VK.renderpass2.dedicated_allocation.attachment_allocation.input_output.7,Fa
dEQP-VK.renderpass2.suballocation.attachment_allocation.input_output.7,Fail
dEQP-VK.spirv_assembly.instruction.compute.opcopymemory.array,Fail
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/3208
dEQP-VK.spirv_assembly.instruction.compute.opquantize.infinities,Fail
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/3208
dEQP-VK.spirv_assembly.instruction.graphics.opquantize.round_to_inf_frag,Fail
dEQP-VK.spirv_assembly.instruction.graphics.opquantize.round_to_inf_tesse,Fail
dEQP-VK.spirv_assembly.instruction.graphics.opquantize.round_to_inf_vert,Fail
dEQP-VK.spirv_assembly.instruction.graphics.opquantize.round_to_negative_inf_geom,Fail
dEQP-VK.spirv_assembly.instruction.graphics.opquantize.round_to_negative_inf_tessc,Fail
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_geom,Fail
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_geom,Fail
dEQP-VK.spirv_assembly.instruction.spirv1p4.opcopylogical.nested_arrays_different_inner_stride,Fail

View file

@ -392,7 +392,7 @@ emit_alu(struct ir3_context *ctx, nir_alu_instr *alu)
case nir_op_fquantize2f16:
dst[0] = create_cov(ctx,
create_cov(ctx, src[0], 32, nir_op_f2f16_rtz),
create_cov(ctx, src[0], 32, nir_op_f2f16_rtne),
16, nir_op_f2f32);
break;
case nir_op_f2b1: