Skip to content

Apple's open-source XNU kernel on Android phones: its own loader and drivers, Metal on the Adreno. Runs from RAM; a reboot gives the phone back to Android.

C

air: say which of the two variants is right, and why it is not a toss-up

vcvkkfb583604baa6
diff --git a/tools/mesa/ir3-round-default.patch b/tools/mesa/ir3-round-default.patch
index 548fd8e..6156c94 100644
--- a/tools/mesa/ir3-round-default.patch
+++ b/tools/mesa/ir3-round-default.patch
@@ -54,8 +54,22 @@ is pack_half_2x16, and nir_lower_mediump.c says of it "pack_half rounding is
undefined". Where nothing is required, setting ROUND_EVEN changes behaviour
without correcting it -- permitted either way, and not part of the argument here.
If that is unwelcome, the narrower change is to set the default only when the
-source is an integer type, which is where the requirement lives; the measurements
-above would be unaffected.
+source is an integer type; the measurements above would be unaffected. I would
+not choose it, and the reason is worth stating rather than leaving the two
+looking equivalent.
+
+Of everything that reaches this branch, pack_half is the only destination with no
+requirement behind it. f2f32 and b2f are exact, so the mode cannot change them.
+i2f and u2f require round-to-nearest-even, and are measured above. And plain
+nir_op_f2f16 reaches it too -- f2f16_rtne and f2f16_rtz are taken by the two
+cases above, so an f32 -> f16 narrowing with no declared mode lands here and
+truncates by exactly the same mechanism, in an API that asks for RTE. The
+narrower change would leave that one unfixed while fixing its neighbours, which
+is a worse place to stop than either end.
+
+That last one is reasoning from the mechanism and is NOT measured here: this
+port's harness packs every half result into a float4, so it cannot reach an
+f2f16 either. It is offered as a thing to check, not as a result.
The block is byte-identical in Mesa 26.2.5, the newest release at the time of
writing, checked by extracting that one file from archive.mesa3d.org, so this is