Files
MobileGL/docs/archive/notes/p5b/p5b-results/f1-v1.md
T

19 KiB
Raw Blame History

f1-v1 — clear family, framebuffer copies, mipmaps

Base: f5676103 (c0b); branch p5b/f1, tree /home/swung/w7/p5b-f1.

Implementation and proof

All eleven slots move C → B. The client calls BeforeReadOnlyVerb() before EmitAndWait; frontend framebuffer/texture publications remain ahead of the verb. No opcode, carrier, generator, backend or monolith implementation changed. Copy/mipmap records dispatch on the apply thread through the existing codec arms. Rule D remains: GL arguments travel verbatim beside resource handles, and backend barrier-pulled reads remain.

Slot What crosses Proof
ClearBufferfi Null bound-draw handle, DepthStencil kind, depth/stencil values, drawbuffer index RemoteF1.ClearBufferfiFieldsCross; DirectGLES.Split.F1.F1WireScenario.ClearBufferfiPixels
ClearBufferfv Null bound-draw handle, kind, Float/Int/Uint value class, drawbuffer index, exact color bits (or scalar depth/stencil) RemoteF1.ClearBufferfvFieldsCross; DirectGLES.Split.F1.F1WireScenario.ClearBufferfvPixels
ClearBufferiv Null bound-draw handle, kind, Float/Int/Uint value class, drawbuffer index, exact color bits (or scalar depth/stencil) RemoteF1.ClearBufferivFieldsCross; DirectGLES.Split.F1.F1WireScenario.ClearBufferivPixels
ClearBufferuiv Null bound-draw handle, kind, Float/Int/Uint value class, drawbuffer index, exact color bits (or scalar depth/stencil) RemoteF1.ClearBufferuivFieldsCross; DirectGLES.Split.F1.F1WireScenario.ClearBufferuivPixels
ClearNamedFramebufferfi Named framebuffer handle, DepthStencil kind, depth/stencil values, drawbuffer index RemoteF1.ClearNamedFramebufferfiFieldsCross; DirectGLES.Split.F1.F1WireScenario.ClearNamedFramebufferfiPixels
ClearNamedFramebufferfv Named framebuffer handle, kind, Float/Int/Uint value class, drawbuffer index, exact color bits (or scalar depth/stencil) RemoteF1.ClearNamedFramebufferfvFieldsCross; DirectGLES.Split.F1.F1WireScenario.ClearNamedFramebufferfvPixels
ClearNamedFramebufferiv Named framebuffer handle, kind, Float/Int/Uint value class, drawbuffer index, exact color bits (or scalar depth/stencil) RemoteF1.ClearNamedFramebufferivFieldsCross; DirectGLES.Split.F1.F1WireScenario.ClearNamedFramebufferivPixels
ClearNamedFramebufferuiv Named framebuffer handle, kind, Float/Int/Uint value class, drawbuffer index, exact color bits (or scalar depth/stencil) RemoteF1.ClearNamedFramebufferuivFieldsCross; DirectGLES.Split.F1.F1WireScenario.ClearNamedFramebufferuivPixels
CopyTexImage2D Bound destination texture handle, GL target, level, source rectangle, image format or sub-image offsets and discriminator RemoteF1.CopyTexImage2DFieldsCross; DirectGLES.Split.F1.F1WireScenario.CopyTexImage2DPixels
CopyTexSubImage2D Bound destination texture handle, GL target, level, source rectangle, image format or sub-image offsets and discriminator RemoteF1.CopyTexSubImage2DFieldsCross; DirectGLES.Split.F1.F1WireScenario.CopyTexSubImage2DPixels
GenerateMipmap Bound texture handle, GL target, base level and level count RemoteF1.GenerateMipmapFieldsCross; DirectGLES.Split.F1.F1WireScenario.GenerateMipmapPixels

The pixel cases require a live split session and an advancing emitted ordinal. Integer and float clears are read back from matching attachment types; fi checks both packed depth and stencil; the named variants clear the bound named framebuffer. Copies read back the destination, and mip generation reads level 2 after clearing only level 0. Four additional RemoteF1.UnboundNamed{fv,iv,uiv,fi}RefusesByName cases assert each exact refusal string.

Executed negative controls

/home/swung/w7/p5b-f1-red.log: 26/26 fail, with their own failure strings; all mutations reverted before the final gate. Each new test carries a matching “Red once” source comment.

  • ClearBufferfiFieldsCross: red once by zeroing the clear values; asserted F1.ClearBufferfi.fields.
  • ClearBufferfvFieldsCross: red once by zeroing the clear values; asserted F1.ClearBufferfv.fields.
  • ClearBufferivFieldsCross: red once by zeroing the clear values; asserted F1.ClearBufferiv.fields.
  • ClearBufferuivFieldsCross: red once by zeroing the clear values; asserted F1.ClearBufferuiv.fields.
  • ClearNamedFramebufferfiFieldsCross: red once by zeroing the clear values; asserted F1.ClearNamedFramebufferfi.fields.
  • ClearNamedFramebufferfvFieldsCross: red once by zeroing the clear values; asserted F1.ClearNamedFramebufferfv.fields.
  • ClearNamedFramebufferivFieldsCross: red once by zeroing the clear values; asserted F1.ClearNamedFramebufferiv.fields.
  • ClearNamedFramebufferuivFieldsCross: red once by zeroing the clear values; asserted F1.ClearNamedFramebufferuiv.fields.
  • CopyTexImage2DFieldsCross: red once by incrementing the emitted copy level; asserted F1.CopyTexImage2D.fields.
  • CopyTexSubImage2DFieldsCross: red once by incrementing the emitted copy level; asserted F1.CopyTexSubImage2D.fields.
  • GenerateMipmapFieldsCross: red once by incrementing the emitted base level; asserted F1.GenerateMipmap.fields.
  • ClearBufferfiPixels: red once by zeroing the clear values; asserted F1.ClearBufferfi.pixels.
  • ClearBufferfvPixels: red once by zeroing the clear values; asserted F1.ClearBufferfv.pixels.
  • ClearBufferivPixels: red once by zeroing the clear values; asserted F1.ClearBufferiv.pixels.
  • ClearBufferuivPixels: red once by zeroing the clear values; asserted F1.ClearBufferuiv.pixels.
  • ClearNamedFramebufferfiPixels: red once by zeroing the clear values; asserted F1.ClearNamedFramebufferfi.pixels.
  • ClearNamedFramebufferfvPixels: red once by zeroing the clear values; asserted F1.ClearNamedFramebufferfv.pixels.
  • ClearNamedFramebufferivPixels: red once by zeroing the clear values; asserted F1.ClearNamedFramebufferiv.pixels.
  • ClearNamedFramebufferuivPixels: red once by zeroing the clear values; asserted F1.ClearNamedFramebufferuiv.pixels.
  • CopyTexImage2DPixels: red once by omitting the copy sink call; asserted F1.CopyTexImage2D.pixels.
  • CopyTexSubImage2DPixels: red once by omitting the copy sink call; asserted F1.CopyTexSubImage2D.pixels.
  • GenerateMipmapPixels: red once by omitting the mipmap sink call; asserted F1.GenerateMipmap.pixels.
  • Each of the four unbound named-clear controls: red once by disabling the handle refusal; the required exact Fatal{UnmigratedVerb, "ClearNamedFramebuffer<suffix>+UNBOUND"} disappears.

Census: original 1,149-entry registry

Command: bash ~/w7/p5b-c0b-census.sh ~/w7/p5b-f1 ~/w7/p5b-f1-census-logs. Evidence: that directory’s results.json, per-entry .out/.log; summary /home/swung/w7/p5b-f1-census.log. Compared by name with /home/swung/w7/p5b-c0b-census-logs/results.json.

Baseline 432 passed / 185 skipped / 505 aborted / 27 failed → 460 passed / 185 skipped / 473 aborted / 31 failed. All 34 bare f1 first-slot aborts → 0. Exactly those 34 entries change: 28 pass, 2 reach the qualified unbound refusal, 4 reach assertions. No other original entry changes status or normalized Fatal.

Entry Previous first slot New first blocker/result
DirectGLES.DepthStencilReadbackMatrixScenario.CopyTexImageFromADepthAttachmentSurvivesAReadBack CopyTexImage2D FAIL: 3072/3072 copied depth values wrong, first word 0x0 (DepthStencilReadbackMatrixScenario.cpp:568)
DirectGLES.ForcedDepthStencilEmulation.DepthStencilReadbackMatrixScenario.CopyTexImageFromADepthAttachmentSurvivesAReadBack CopyTexImage2D FAIL: 3072/3072 copied depth values wrong, first word 0x0 (DepthStencilReadbackMatrixScenario.cpp:568)
DirectGLES.IntegerBorderColorScenario.ANegativeBorderOnAnUnsignedFormatClampsToTheFormatsMaximum ClearBufferiv PASS
DirectGLES.IntegerBorderColorScenario.ASignedIntegerBorderIsClampedToTheFormatsRepresentableRange ClearBufferiv PASS
DirectGLES.IntegerBorderColorScenario.AnOversizedUnsignedBorderIsClampedToTheFormatsMaximum ClearBufferiv PASS
DirectGLES.IntegerBorderColorScenario.InsideTexelsAreUnaffectedByTheBorderColour ClearBufferiv PASS
DirectGLES.IntegerBorderColorScenario.SamplerParameterIivBorderColourSurvivesToAnIntegerSampler ClearBufferiv PASS
DirectGLES.IntegerBorderColorScenario.TexParameterIivBorderColourSurvivesToAnIntegerSampler ClearBufferiv PASS
DirectGLES.P4aFinalFixScenario.AFramebufferDeletedAfterADsaClearLeavesItsAttachmentIntact ClearNamedFramebufferfv Fatal{UnmigratedVerb, "ClearNamedFramebufferfv+UNBOUND"}
DirectGLES.P4aFinalFixScenario.GenerateMipmapAcrossAnUnrelatedDraw GenerateMipmap PASS
DirectGLES.P4aFinalFixScenario.GenerateMipmapImmediately GenerateMipmap PASS
DirectGLES.SampledSetStalenessScenario.AQueuedClearIsMaterialisedWhenAFilterChangeCompletesTheTexture ClearBufferfv PASS
DirectGLES.SampledSetStalenessScenario.AQueuedClearIsMaterialisedWhenASamplerObjectCompletesTheTexture ClearBufferfv PASS
DirectGLES.SwizzleAccessRoutineScenario.EveryAccessRoutineFetchesTheSameTexelUnderTheIdentitySwizzle ClearBufferuiv PASS
DirectGLES.SwizzleAccessRoutineScenario.EveryAccessRoutineSeesAReversedSwizzle ClearBufferuiv PASS
DirectGLES.SwizzleAccessRoutineScenario.EveryAccessRoutineSeesConstantSwizzleSources ClearBufferuiv PASS
DirectGLES.SwizzleAccessRoutineScenario.RepeatedProgramBuildsKeepFetchingTheSameTexel ClearBufferuiv PASS
DirectGLES.TextureParamsWithoutASamplerViewScenario.AReadAttachmentOnlyTexturesDepthStencilModeReachesTheDriver ClearBufferfi FAIL: applied DepthStencilMode=0, expected GL_STENCIL_INDEX (6401) (TextureParamsWithoutASamplerViewScenario.cpp:437)
DirectGLES.ViewportArrayScenario.EachViewportIndexUsesItsOwnDepthRange ClearBufferfv PASS
DirectVulkan.DepthStencilReadbackMatrixScenario.CopyTexImageFromADepthAttachmentSurvivesAReadBack CopyTexImage2D FAIL: 3072/3072 copied depth values wrong, first word 0x0 (DepthStencilReadbackMatrixScenario.cpp:568)
DirectVulkan.IntegerBorderColorScenario.ANegativeBorderOnAnUnsignedFormatClampsToTheFormatsMaximum ClearBufferiv PASS
DirectVulkan.IntegerBorderColorScenario.ASignedIntegerBorderIsClampedToTheFormatsRepresentableRange ClearBufferiv PASS
DirectVulkan.IntegerBorderColorScenario.AnOversizedUnsignedBorderIsClampedToTheFormatsMaximum ClearBufferiv PASS
DirectVulkan.IntegerBorderColorScenario.InsideTexelsAreUnaffectedByTheBorderColour ClearBufferiv PASS
DirectVulkan.IntegerBorderColorScenario.SamplerParameterIivBorderColourSurvivesToAnIntegerSampler ClearBufferiv PASS
DirectVulkan.IntegerBorderColorScenario.TexParameterIivBorderColourSurvivesToAnIntegerSampler ClearBufferiv PASS
DirectVulkan.P4aFinalFixScenario.AFramebufferDeletedAfterADsaClearLeavesItsAttachmentIntact ClearNamedFramebufferfv Fatal{UnmigratedVerb, "ClearNamedFramebufferfv+UNBOUND"}
DirectVulkan.SampledSetStalenessScenario.AQueuedClearIsMaterialisedWhenAFilterChangeCompletesTheTexture ClearBufferfv PASS
DirectVulkan.SampledSetStalenessScenario.AQueuedClearIsMaterialisedWhenASamplerObjectCompletesTheTexture ClearBufferfv PASS
DirectVulkan.SwizzleAccessRoutineScenario.EveryAccessRoutineFetchesTheSameTexelUnderTheIdentitySwizzle ClearBufferuiv PASS
DirectVulkan.SwizzleAccessRoutineScenario.EveryAccessRoutineSeesAReversedSwizzle ClearBufferuiv PASS
DirectVulkan.SwizzleAccessRoutineScenario.EveryAccessRoutineSeesConstantSwizzleSources ClearBufferuiv PASS
DirectVulkan.SwizzleAccessRoutineScenario.RepeatedProgramBuildsKeepFetchingTheSameTexel ClearBufferuiv PASS
DirectVulkan.ViewportArrayScenario.EachViewportIndexUsesItsOwnDepthRange ClearBufferfv PASS

Rulings and overturn conditions

  1. Unbound named clears remain named refusals. The census’s DSA-delete scenario is actually unbound (it binds framebuffer 0 before the call), on both backends. The bound named case crosses and renders in the new pixel cases. No server rebind workaround: Espryt’s barrier-pulled binding would undo it. Overturn with an integrator-authorized handle-keyed backend binding path (P7/P3b/P4b); the contract’s optional stretch is not required to report this next blocker.
  2. Depth-copy wrong-answer failures are next-round work. All three measured variants now execute the copy and reach CopyTexImageFromADepthAttachmentSurvivesAReadBack; all 3072 values read as zero. Color image/sub-image copy pixel controls pass. No claim that depth copies render correctly; fixes outside the granted emitter/sink boundary are requested from the integrator. Overturn by a depth-copy/readback fix making those same assertions pass.
  3. Read-attachment-only depth/stencil inspection remains a next blocker. AReadAttachmentOnlyTexturesDepthStencilModeReachesTheDriver reaches its inspection assertion; it is no longer stopped at ClearBufferfi. The focused fi test verifies both actual depth and stencil values. Overturn with a fix to the applied-mode observation/state path, validated against that scenario.
  4. No mip-storage re-derivation was needed. Both measured mip cases pass, as does a generated-level pixel control. Existing generate-mipmap-storage and generate-mipmap-cpu-fallback refusals remain intact. Overturn if a measured format reaches them; only the descriptor-derived storage site is granted, CPU writeback still needs P8/P9.
  5. No +RENDERBUFFER refusal is added to framebuffer-sourced copies. The source is the read framebuffer, which may legitimately have a renderbuffer attachment. The contract’s explicit resource-endpoint CopyImageSubData+RENDERBUFFER refusal belongs to i1, not f1. Overturn only by a contract revision for these two slots.
  6. Existing codec arms suffice. Clear (57), generate_mipmap (54), framebuffer copy (76) already decode their PODs and invoke the corresponding sinks; live peer cases prove fields survive that path. No codec layout changes were necessary. Overturn with a newly measured payload shape requiring a contract change.
  7. Partition arithmetic is additive. f1 moves 11 slots; counts on this base are A=2/B=16/C=53. The old global C==64 assertion becomes B+C==69, retaining all per-owner asserts. Integrator must add the other packages’ counts in the shared RemoteClient partition test.

Expanded census and newly exposed companion blockers

After registering the split-only source, the normal split-build backend registries also discover 22 controls. /home/swung/w7/p5b-f1-final-census-logs/results.json records 478 passed / 185 skipped / 477 aborted / 31 failed over 1,171 entries. Restricted to the original 1,149 names, the result remains 460/185/473/31. The 22 added entries contribute 18 passes and four named refusals.

The four DirectVulkan.F1WireScenario.ClearNamedFramebuffer{fv,iv,uiv,fi}Pixels entries hit their corresponding +UNBOUND refusal even though the application has bound that framebuffer: the server applier has no matching BoundFramebuffer handle at this point. The exact contract predicate prevents a silent clear of an unproven binding. This is a newly measured publication/capability-path gap; it is not evidence that those applications used unbound DSA. Vulkan advertises consumer mask 0x1f7f (resource subsystem 0x80 absent), while PipeFill has dependency gates for texture/framebuffer publications. DirectGLES passes all eleven focused controls; Vulkan passes the other seven. Integrator request: resolve the bound-framebuffer publication/capability dependency for Magma or revise the contract before relaxing the sink predicate. Overturn with these four existing controls passing while the four deliberately unbound unit controls still refuse exactly. No emitter bypass of the R-8 mirror gate was introduced.

Gate and landing

f1 implementation commit 7ffa4998; merged the moved integrator head 37fc4fdb (P5 x2 wire-ledger/control changes) as fe5ac006, without conflicts. Commit identity checked: Swung0x48 <swung0x48@outlook.com>. No attribution trailers. The merge only imports integrator-owned changes; f1’s own diff is the five assigned source/test files.

Pre-merge quick gate: builds 4/4; unit 1817 × 3 / split 2099 (2084 + 15); integration-split 33/33, two expected skips (22 + 11); push integration-gpu 1128/1128. G2 all-label pull/push names: 0 diff. G14: 0 removed / 43 added vs the P5 name baseline, matching c0b. G1: 0/0/0/0, .text 10806611 → 10806611 (+0), 27814 defined symbols unchanged. Generators green. Both p3a/p4a untouched-region checks against ff2994d9 HEAD green after the merge.

The first integration-split pass exposed missing private log paths for the eleven new entries; the f1-only registration now supplies a unique absolute path for each. Final rerun: 33/33 including SplitLogPaths.PrivateAndDistinct.

Post-merge gate on fe5ac006: builds 4/4; unit 1817/1817 × 3, split 2101/2101 (2084 + f1’s 15 + x2’s 2); integration-split 33/33, two expected skips; push integration-gpu 1128/1128. G2 0 diff, G14 0 removed / 43 added; G1 0/0/0/0, .text +0; generators and both purity checks green.

Post-merge census: /home/swung/w7/p5b-f1-merged-census-logs/results.json, 478/185/477/31 over 1,171 entries, zero status or normalized-Fatal differences from the pre-merge expanded census. Original-name projection remains 460/185/473/31.

Final integrator head check: feat/disaggregated=37fc4fdb is an ancestor of fe5ac006. Worktree clean, submodule links off.

Retained evidence and tools

All paths below are under /home/swung/w7/:

  • p5b-f1-{census-logs,final-census-logs,merged-census-logs}/: manifests, per-entry outputs/logs and results for the original, expanded and post-merge censuses, respectively.
  • p5b-f1-census.log, p5b-f1-final-census.log, p5b-f1-merged-census.log: census summaries.
  • p5b-f1-gate.log, p5b-f1-merged-gate.log: pre/post-merge builds, generators, G1 and all unit lanes.
  • p5b-f1-accept.log (initial private-log registration failure, superseded), p5b-f1-isplit-final.log (fixed), p5b-f1-merged-accept.log (all green).
  • p5b-f1-igpu-push.log, p5b-f1-isplit.log: final post-merge integration output.
  • p5b-f1-unit-linux.log, p5b-f1-unit-push.log, p5b-f1-unit-verify.log, p5b-f1-unit-split.log: final per-lane unit output.
  • p5b-f1-build-linux.log, p5b-f1-build-push.log, p5b-f1-build-verify.log, p5b-f1-build-split.log: final build output.
  • p5b-f1-symbols.md, p5b-f1-p3a-purity.log, p5b-f1-p4a-purity.log.
  • p5b-f1-names-linux.txt, p5b-f1-names-push.txt, p5b-f1-names-split.txt: sorted all-label registrations.
  • p5b-f1-red.log: every new control fails its own diagnostic after the intentional production mutations; all restored.
  • p5b-f1-final-client.log: 23 field/partition/refusal controls green after moving the old unmigrated control to the GetTexImage tail.
  • p5b-f1-submodlinks.sh, notes/tools/p5b-f1-gate.sh, notes/tools/p5b-f1-accept.sh: reproducible local helpers.

Uncited temporary configure/intermediate-build/test logs were deleted individually. No devices, LFS downloads or other package worktrees were modified.