diff --git a/MobileGL/MG_Backend/DirectVulkan/Renderer/WireDeclineTally.h b/MobileGL/MG_Backend/DirectVulkan/Renderer/WireDeclineTally.h index 0c90010b..74f868ec 100644 --- a/MobileGL/MG_Backend/DirectVulkan/Renderer/WireDeclineTally.h +++ b/MobileGL/MG_Backend/DirectVulkan/Renderer/WireDeclineTally.h @@ -150,11 +150,19 @@ private: // Every decline goes through this: the tally moves ALWAYS, the log line is once per site. // `return MGL_WIRE_DECLINE_FALSE(Site, "why", ...)` reads as the statement it replaces. +// +// A DECLINE IS NOT ALWAYS A SKIPPED DRAW, so the line does not say "draw". The Tex*, Shape* and +// Upload* rows are counted per texture SYNC: SyncTextureResourceByHandle is reached from the +// draw/dispatch texture preparation, but also from the descriptor resolver, framebuffer +// attachments, CopyTexSubImage, mipmap generation and CopyImageSubData - each of which Fatals +// right after a failed sync - and from texture readback, which falls back to the unbacked +// shadow. A draw that samples three unsyncable textures counts three; a failed attachment +// sync counts once and is then a Fatal, not a skipped draw. #define MGL_WIRE_DECLINE_AT(site, fmt, ...) \ do { \ ::MobileGL::MG_Backend::DirectVulkan::WireDeclineTally::Count( \ ::MobileGL::MG_Backend::DirectVulkan::WireDeclineSite::site); \ - MGLOG_E_ONCE("Magma wire draw declined [" #site "]: " fmt, ##__VA_ARGS__); \ + MGLOG_E_ONCE("Magma wire decline [" #site "]: " fmt, ##__VA_ARGS__); \ } while (0) } // namespace MobileGL::MG_Backend::DirectVulkan diff --git a/docs/Disaggregated/notes/p7/magma-b3.md b/docs/Disaggregated/notes/p7/magma-b3.md index c6076208..c11f046a 100644 --- a/docs/Disaggregated/notes/p7/magma-b3.md +++ b/docs/Disaggregated/notes/p7/magma-b3.md @@ -127,6 +127,13 @@ OpenRA / DirectVulkan / `MOBILEGL_TRANSPORT=inproc` / lavapipe:retrace `PASS s 先撞上 `Fatal{UnmigratedVerb, "Magma:framebuffer-resource"}`——那是 framebuffer 路径自己的具名 Fatal, 不是本表的出口,所以把强制收窄到只命中被采样的 1×1 源纹理。) +**修正轮(fable 复审 nit):`Tex*` / `Shape*` / `Upload*` 计数是「每次纹理同步」,不是「每个 draw」。** +`SyncTextureResourceByHandle` 除了 draw/dispatch 的纹理准备,还从描述符解析、framebuffer 附件、 +`CopyTexSubImage`、mipmap 生成、`CopyImageSubData`(这几处同步失败后立刻具名 Fatal)以及纹理回读(退回 unbacked 影子) +进来:一个采样三张不可同步纹理的 draw 计三次;附件同步失败计一次,随后是 Fatal,不是被跳过的 draw。 +所以 `MGL_WIRE_DECLINE_AT` 的日志行从 `Magma wire draw declined [Site]` 改为 **`Magma wire decline [Site]`** +(`WireDeclineTally.h` 宏上的注释写明同样的事)。§1.3 与上面引用的日志是改名前的原样。 + --- ## 2. 机制(裁判 H1,本包在主机上按计数器确认)