mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[MG_Backend, docs] (P7): a wire decline's line says decline, not draw, because the texture rows count per sync
Fable review of the B3 rework, nit: MGL_WIRE_DECLINE_AT logged "Magma wire draw declined [Site]" from every site, but the Tex*, Shape* and Upload* rows are reached through SyncTextureResourceByHandle, whose callers are not only the draw/dispatch texture preparation: the descriptor resolver, framebuffer attachments, CopyTexSubImage, mipmap generation and CopyImageSubData each Fatal right after a failed sync, and texture readback falls back to the unbacked shadow. Those counters are per sync, not per draw - a draw sampling three unsyncable textures counts three, a failed attachment sync counts once and is then a Fatal. - WireDeclineTally.h: the line is "Magma wire decline [Site]: ...", and the macro's comment says the texture rows are per sync and names the callers. Disaggregated-only header; no test or script matches the old text (git grep). - magma-b3.md §1.5: says the counters are per sync and that the log lines quoted in §1.3 / §1.5 carry the old wording.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,本包在主机上按计数器确认)
|
||||
|
||||
Reference in New Issue
Block a user