A pass-start read takes the copy cleared by MoltenVK's clear command, which is Metal's clear
What: on MoltenVK (DriverFact::ColorClearIsMetals) a draw that samples a colour its pass clears, after a memory barrier at the pass's start, split the pass again (attachment_read_splits, a second render pass instance, the render-pass-split notice) instead of reading a copy of the attachment cleared to the clear before the pass (attachment_read_clears). Texture::cleared_copy refused a clear whose device-color-conversion note the load operation withholds (ColorTarget::withheld_clear), because the copy is cleared by vkCmdClearColorImage and only the load operation was measured to store Metal's texel there. Since876cfd1402every clear of a normalized channel off a whole code is in question (the spec's rule), so the pass-start clears of the lanes and the conformance cases became withheld on MoltenVK and split. The driver's clear command is measured to store Metal's texel too, so the fact now covers it: - Texture::cleared_copy takes a withheld clear (no note owed: the clear command's texel is the load operation's, Metal's). - A memoryless attachment's backing cleared after the first instance, and an attachment the first instance leaves out cleared before the pass by the clear command (cleared_ahead), owe no note either; the same clear by a render pass of the attachment alone, or as sample planes, still announces it. - DriverFact::ColorClearIsMetals, ColorTarget::withheld_clear, texture/attached_reads.rs and docs/API.md's device-color-conversion entry say so. Elsewhere withheld_clear is None (the note is announced as the pass is laid out), so nothing changes on other drivers. Why, measured on the M3 Max (macOS 27.0.1, MoltenVK 1.4.2): - The cause, by a probe of each condition of cleared_copy over 22,482 runs of attachment_reads::a_draw_after_a_barrier_at_the_pass_start_reads_the_clear on development at1571c220d7: every run failed the same way, (cleared copies, splits, begun) = (0, 1, 2), with withheld_clear Some([200, 40, 120, 160] / 255) the only condition that refused (not load, not timing). - The clear command: each of the 71 colour clears Metal was measured with (renders.rs COLOR_CLEARS: ties of 8-, 10- and 16-bit unorm and snorm channels, sRGB, packed 16-bit, half and small floats, shared exponents, NaNs) by a plain fill of a whole 1x1 texture, which is vkCmdClearColorImage of the load operation's clear value (blit_fill.rs): 71 of 71 Metal's bytes, and equal to the load operation's 71. runtime_lane::renders::clears_are_the_device_s_conversion_of_the_clear_value now checks this on a driver with the fact. Ran on the M3 Max (macOS 27.0.1, MoltenVK 1.4.2) at this change over693fd3f96d, under --cfg m2v_gpu: the whole validation suite, 3398 of 3400 passed (attachment_reads and renders among them); the two failures are the runtime-sources pin, which the landing sets, and degrade_notices::a_creation_s_notices_and_messages_reach_the_sink_on_the_asking_thread at device creation (creation_heard_checked), before any pass is recorded. conformance cost --check over the whole set: no gated count and no ceiling moved (the pass-start-barrier cases read the cleared copy again, as recorded); conformance replay of the 14 pass-start-barrier cases: rc 0, each difference an accepted one. On this base only driver_facts.rs merged (beside ClearedDepthAtStandardPositions); the other five files are unchanged since693fd3f96d. RUNTIME: the runtime's pass-start reads on MoltenVK change (a cleared copy instead of a split). (cherry picked from commit 25063af705d28d07b7332cc1b35a5cf1beedc6bb)
This commit is contained in:
1 parent
6d7f59365a
commit
2ef8af3abe
6 files changed
+98
-45
No files matched your search
+5
-2
@@ -3804,8 +3804,11 @@ bound.
|
||||
measured exception: not for a clear by the load operation of an attachment the pass's render area
|
||||
covers on a driver whose load operation clears as Metal's `Clear` load action does
|
||||
(`DriverFact::ColorClearIsMetals`: MoltenVK on the Apple9 GPUs under macOS 27, measured on the M3
|
||||
Max); a clear made before the pass, of an attachment its first instance leaves out, is announced
|
||||
there too. Also a plain color fill (`BlitCommandEncoder::fill_texture_color` without a pixel
|
||||
Max), nor for the same clear by that driver's clear command of a whole level and layer (an
|
||||
attachment the pass's first instance leaves out, cleared before the pass; a memoryless
|
||||
attachment's backing; the copy a draw sampling the attachment after a memory barrier at the
|
||||
pass's start reads), measured to store Metal's bytes too; the same clear made otherwise there (a
|
||||
render pass of the attachment alone, or its sample planes) is announced. Also a plain color fill (`BlitCommandEncoder::fill_texture_color` without a pixel
|
||||
format) of a texture of such a format the device renders, which the device's clear of the color
|
||||
writes, to a color whose conversion is in question against Metal's fill packing (a normalized
|
||||
channel's scaled value off a whole code, an sRGB channel inside its range, a value a half, small
|
||||
|
||||
Reference in new issue
Block a user