mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-16 06:23:23 +09:00
137 lines
7.0 KiB
Modula-2
137 lines
7.0 KiB
Modula-2
// MobileGL - MobileGL/MG_Backend/DirectVulkan/Renderer/WireDeclines.def
|
|
// Copyright (c) 2025-2026 MobileGL-Dev
|
|
// Licensed under the GNU Lesser General Public License v3.0:
|
|
// https://www.gnu.org/licenses/gpl-3.0.txt
|
|
// https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
// End of Source File Header
|
|
|
|
// P7 wave 2 package B3. THE NAMES OF EVERY WAY THE MAGMA WIRE ARM CAN DECLINE.
|
|
//
|
|
// A DECLINE IS NOT ALWAYS A SKIPPED DRAW. The SetupWireDraw / DispatchWireCompute rows are one
|
|
// per refused draw or dispatch; the Tex* / Shape* / Upload* rows are counted per texture SYNC,
|
|
// which the draw path reaches once per sampled texture and the descriptor resolver, framebuffer
|
|
// attachments, CopyTexSubImage, mipmap generation, CopyImageSubData and texture readback reach
|
|
// on their own (WireDeclineTally.h, above MGL_WIRE_DECLINE_AT).
|
|
//
|
|
// CONTRACT-P7 §0 rule I says a refusal on the wire arm is either a named decline or a named
|
|
// Fatal. Before B3 the draw path had a third shape the rule does not admit: a bare
|
|
// `return false` with no log, no counter and no census entry - roughly twenty of them in
|
|
// SetupWireDraw alone, plus the texture-sync chain behind PrepareWireTextureResources. A draw
|
|
// that took one of those exits left NO trace anywhere, which is precisely why the OpenRA
|
|
// device divergence survived four device windows with client and server logs that were
|
|
// LINE-IDENTICAL between a passing and a failing run.
|
|
//
|
|
// Each row below is one such exit. The name is what the decline logs and what the tally
|
|
// counts, so "which exit did this frame take" is answerable from a counter dump instead of
|
|
// from a bisect. Rows are append-only: the integration lane asserts specific counters moved.
|
|
//
|
|
// EVERY ROW HAS A SITE AND EVERY SITE HAS A LINE. A row with no site is a name that can never
|
|
// be counted - it reads as "this cannot happen here" when it only means "nobody wired it up" -
|
|
// and a site with no line puts the reader back on a bisect. Sites reached through a macro
|
|
// (MGL_WIRE_DECLINE_AT) get both at once; the few that use WireDeclineTally::Count directly do
|
|
// so ONLY because the statement above them already carries the same reason as an _ONCE log.
|
|
// scripts/ci/wire_declines_audit.py holds both halves.
|
|
//
|
|
// MGL_WIRE_DECLINE(Name)
|
|
|
|
// ---- SetupWireDraw, in statement order -------------------------------------------------
|
|
MGL_WIRE_DECLINE(ProgramLinkOrSpirv)
|
|
MGL_WIRE_DECLINE(PointSizeCapability)
|
|
MGL_WIRE_DECLINE(TextureResourcesUnprepared)
|
|
MGL_WIRE_DECLINE(VertexFormatUnsupported)
|
|
MGL_WIRE_DECLINE(VertexAttributeWindow)
|
|
MGL_WIRE_DECLINE(VertexStreamCountZero)
|
|
MGL_WIRE_DECLINE(VertexStreamRead)
|
|
MGL_WIRE_DECLINE(VertexStreamConverter)
|
|
MGL_WIRE_DECLINE(VertexTransientUpload)
|
|
MGL_WIRE_DECLINE(IndexViewMissing)
|
|
MGL_WIRE_DECLINE(IndexTypeWidth)
|
|
MGL_WIRE_DECLINE(IndexWindow)
|
|
MGL_WIRE_DECLINE(IndexStreamRead)
|
|
MGL_WIRE_DECLINE(IndexTransientUpload)
|
|
MGL_WIRE_DECLINE(IndexSliceInvalid)
|
|
MGL_WIRE_DECLINE(UniformBufferBinding)
|
|
MGL_WIRE_DECLINE(NoAttachments)
|
|
MGL_WIRE_DECLINE(PipelineUnavailable)
|
|
MGL_WIRE_DECLINE(CurrentAttributePayload)
|
|
MGL_WIRE_DECLINE(CurrentAttributeUpload)
|
|
MGL_WIRE_DECLINE(BeginRenderPass)
|
|
|
|
// ---- DispatchWireCompute (and DispatchWireComputeIndirect, P8-SV) -------------------------
|
|
MGL_WIRE_DECLINE(ComputeProgramLinkOrSpirv)
|
|
MGL_WIRE_DECLINE(ComputeTextureResourcesUnprepared)
|
|
MGL_WIRE_DECLINE(ComputePipelineUnavailable)
|
|
MGL_WIRE_DECLINE(ComputeUniformBufferBinding)
|
|
|
|
// ---- UniformManager::PrepareWireTextureResources ----------------------------------------
|
|
MGL_WIRE_DECLINE(DescriptorDeclined)
|
|
MGL_WIRE_DECLINE(SamplerLocationAlias)
|
|
MGL_WIRE_DECLINE(SamplerUnitRange)
|
|
|
|
// ---- VkTextureManager::SyncTextureResourceByHandle --------------------------------------
|
|
MGL_WIRE_DECLINE(TexResolveStorage)
|
|
MGL_WIRE_DECLINE(TexViewFormat)
|
|
MGL_WIRE_DECLINE(TexNoApplierRecord)
|
|
MGL_WIRE_DECLINE(TexRecordDeadOrStale)
|
|
MGL_WIRE_DECLINE(TexShapeSync)
|
|
MGL_WIRE_DECLINE(TexUploadPendingLevels)
|
|
MGL_WIRE_DECLINE(TexStorageUsage)
|
|
|
|
// ---- VkTextureManager::UploadPendingWireLevels ------------------------------------------
|
|
// The five `incomplete`/false exits the investigation named, plus the two that leave an
|
|
// entry pending WITHOUT failing (a `continue`) - those are the ones that can starve a draw
|
|
// of its texels while still reporting success, so they are counted separately.
|
|
MGL_WIRE_DECLINE(UploadLevelBeyondChain)
|
|
MGL_WIRE_DECLINE(UploadLevelExtentMismatch)
|
|
MGL_WIRE_DECLINE(UploadEmptyLevel)
|
|
MGL_WIRE_DECLINE(UploadConversion)
|
|
MGL_WIRE_DECLINE(UploadTexelArithmetic)
|
|
MGL_WIRE_DECLINE(UploadRegionOutOfBounds)
|
|
MGL_WIRE_DECLINE(UploadIncomplete)
|
|
MGL_WIRE_DECLINE(UploadFlushFailed)
|
|
|
|
// ---- VkTextureManager::SyncWireTextureShape ---------------------------------------------
|
|
MGL_WIRE_DECLINE(ShapeBufferBacked)
|
|
MGL_WIRE_DECLINE(ShapeViewOfStorage)
|
|
MGL_WIRE_DECLINE(ShapeNoLevels)
|
|
MGL_WIRE_DECLINE(ShapeNoVulkanShape)
|
|
MGL_WIRE_DECLINE(ShapeNoVkFormat)
|
|
MGL_WIRE_DECLINE(ShapeSampleCount)
|
|
MGL_WIRE_DECLINE(ShapePreserveFlushFailed)
|
|
MGL_WIRE_DECLINE(ShapeImageFlagsUnsupported)
|
|
MGL_WIRE_DECLINE(ShapeCreateImageFailed)
|
|
// Appended by the B3 review round: the preserve-copy arm of a reallocation was the one exit in
|
|
// SyncWireTextureShape still leaving no trace at all.
|
|
MGL_WIRE_DECLINE(ShapePreserveCopyFailed)
|
|
|
|
// ---- VulkanRenderer::GenerateWireMipmap (P8-F) -----------------------------------------
|
|
// `mipmap-shader-format-or-shape` was a Fatal on this arm and a decline on the monolith arm; it
|
|
// is the monolith's decline now. Counted once per refused glGenerateMipmap, whose chain is left
|
|
// as it was.
|
|
MGL_WIRE_DECLINE(MipmapShaderFormatOrShape)
|
|
|
|
// ---- VulkanRenderer::DrawWireIndirectNative (P8-D), in statement order -----------------------
|
|
MGL_WIRE_DECLINE(IndirectBufferUnbound)
|
|
MGL_WIRE_DECLINE(IndirectCommandRange)
|
|
MGL_WIRE_DECLINE(IndirectCountRange)
|
|
MGL_WIRE_DECLINE(IndirectIndexStore)
|
|
|
|
// ---- P8-SV -------------------------------------------------------------------------------
|
|
// VulkanRenderer::GenerateWireMipmap: a combined depth/stencil (or stencil-only) chain, which no
|
|
// arm generates (CONTRACT-P7 §3.2). It logged but was never counted, so MGWIRE-DECLINES could
|
|
// not see it. Counted once per refused glGenerateMipmap, whose chain is left as it was.
|
|
MGL_WIRE_DECLINE(MipmapDepthStencilAspect)
|
|
// VulkanRenderer::DispatchWireComputeIndirect, in statement order: the dispatch-indirect store
|
|
// is missing, or the three group-count words lie outside it or are misaligned.
|
|
MGL_WIRE_DECLINE(DispatchIndirectBufferUnbound)
|
|
MGL_WIRE_DECLINE(DispatchIndirectRange)
|
|
|
|
// ---- ProgramFactory::ScreenModuleForDriver ------------------------------------------------
|
|
// One of the bound program's final modules fails SPIR-V validation, so no shader module of it was
|
|
// created (VkProgramObject::invalidSpirvDeclined): SetupWireDraw refuses the draw, and the two
|
|
// dispatch arms the dispatch. A driver handed the module could fault the GPU into device loss.
|
|
// MOBILEGL_MAGMA_ALLOW_INVALID_SPIRV=1 builds the module anyway, and then neither row moves.
|
|
MGL_WIRE_DECLINE(ProgramInvalidSpirv)
|
|
MGL_WIRE_DECLINE(ComputeProgramInvalidSpirv)
|