Translator: PrecisionNote::code states each note's stable degrade code
A precision note's stable code, `metal2vulkan-degrade-` and the note's name in kebab case, was written only in the conformance crate (degradation.rs), which is unpublished. So no published item gave a caller the code to announce a note by, and README.md said the runtime announces each note once with a stable code, which it does not: the runtime records each state's notes when the state is made, exposes them through its getters, and prints and sends none (docs/API.md section 9 says so). - PrecisionNote::code (pipeline/artifact.rs) returns the code, one arm a note, as docs/API.md's catalogue names it. - The conformance crate reads it from there: Degradation::code is its note's code, through Degradation::note, the inverse of from_precision_note. Each kind's doc names its note, not a second copy of the string. - README.md's "Recorded differences" says what is true: the runtime records each state's notes at creation and exposes them with a stable code; the caller announces them. docs/API.md's catalogue lead names PrecisionNote::code. - The signature table takes the method under both crates that export PrecisionNote. The 83 codes are unchanged: each equals the conformance crate's string before this commit (checked by script against its code() table), and every_kind_is_a_catalogued_precision_note still finds each in the catalogue. New tests: every_precision_note_code_is_its_name_in_kebab_case (translator, serde feature: every variant read from the enum's source, its code the kebab rule, no code twice) and every_kind_is_its_notes_kind (conformance: note() takes from_precision_note back for every kind). No translation, runtime or refusal changes; no runtime input changes, so runtime-sources.sha256 stays. Verified: rustfmt --check on the four .rs files; the job named in the handover.
This commit is contained in:
1 parent
aed8b7eba3
commit
333ae1b40f
7 files changed
+377
-213
No files matched your search
+4
-4
@@ -1615,10 +1615,10 @@ A note is never fatal: the work runs on every device. The runtime prints and sen
|
||||
consumer reads them through these items. The translator's own API gives a stage's notes
|
||||
(section 8).
|
||||
|
||||
Each entry below is named by a code, `metal2vulkan-degrade-` and the note's name in kebab case
|
||||
(`PrecisionNote::NativeFma` is `metal2vulkan-degrade-native-fma`), with its category, and says what
|
||||
makes an operation carry the note and what may differ. Each `PrecisionNote`'s rustdoc states its
|
||||
bound.
|
||||
Each entry below is named by a code (`PrecisionNote::code`), `metal2vulkan-degrade-` and the note's
|
||||
name in kebab case (`PrecisionNote::NativeFma` is `metal2vulkan-degrade-native-fma`), with its
|
||||
category, and says what makes an operation carry the note and what may differ. Each
|
||||
`PrecisionNote`'s rustdoc states its bound.
|
||||
|
||||
- `metal2vulkan-degrade-device-rounded-resolve` (precision). `DeviceRoundedResolve`: A multisample
|
||||
color resolve averages through Vulkan's `AVERAGE` mode, which leaves the rounding of the average
|
||||
|
||||
Reference in new issue
Block a user