Add focused render-pass draw inspection and pipeline statistics
Implement focused render-pass profiling on main, reusing existing queries/readback, trace model, friendly naming, and native Vulkan/Wayland UI. Normal captures expose pass selectors and attachment load/store/state metadata; focused capture records bounded draw/pipeline inventory and effective graphics state, optional pass-level pipeline-statistics queries, and explicitly opt-in draw-group timestamps. UI supplies copyable recapture flags rather than pretending offline traces support live profiling. Target passes by per-device creation ordinal, with an optional captured signature guard to reduce accidental mismatches across launches. Enable pipelineStatisticsQuery only when supported and safely negotiated without mutating caller-owned feature structs; otherwise retain inventory and report why counters are unavailable. Initially query/fine-time only primary, inline, single-view, single-subpass legacy render passes. Safely handle application statistics queries, secondary execution, missing dynamic state, query/detail exhaustion, and recording reuse. Unhandled dynamic/pipeline-library state is unknown, not guessed; descriptor-set identities are captured but descriptor contents and shader source are not. Acceptance: inspect draw calls, shader/pipeline identities, viewport/scissor, depth/blend/cull/MSAA state and bound descriptor/vertex/index identities; read real GPU pipeline statistics where eligible; optional bounded draw-group timing clearly distinguished from isolated draw cost; preserve old captures and existing clean UI. Validate deterministic graphics output, both feature-enabling forms and safe unavailable paths, application-query conflicts, supported legacy/render-pass-2 paths, limits, and normal versus focused timing. Test PRK only at login, without authentication or installation edits. Run compiler/tests/Vulkan synchronization validation and inspect GPU-rendered output. No automated reviewer, vendor hardware counters, replay, shader debugger, or automatic commits. Verified core: 24 real-GPU focused graphics cases passed synchronization validation and image-output checks. Coverage includes automatic legacy/Features2 capability enabling without caller-memory mutation, safe opaque-prefix fallback, app-query conflicts inside/outside rendering, counters-off with independent group timing, dynamic viewport/cull/topology state, indirect/count/core/KHR draws, render-pass-2/core/KHR, multiview/subpass/secondary unavailable paths, independent draw/group limits, signature mismatch, recording reuse, and unsupported simultaneous/dynamic-rendering paths. Synthetic oracle measured 15 input vertices, 5 primitives, and 1,048,576 fragment invocations; group timestamps split [2,1,1] calls at scissor/pipeline changes. Feature-chain copies use stable owned allocations, not mutation of const feature nodes. Native Vulkan/Wayland profile view is implemented and GPU-screenshot inspected using captures/focused-graphics.png: pass-wide counters, optional draw-group completion intervals, selectable draw inventory, effective state/resource inspector, and opt-in capture/attachment/shader details. UI interaction tests now verify selecting a draw updates its effective scissor/state, unavailable counters stay unavailable rather than zero, and raw handles remain hidden. Native profile-page rendering and readback passed. Documentation covers recapture flags, selectors, capability fallbacks, bounds and timing semantics; no reviewer was run. PRK integration: baseline plus statistics-only and group-timed login-screen runs each completed 120 presentation intervals with zero validation errors or synchronization hazards reported. Statistics-only produced 120 profiles; its final sample had 20 draw commands, seven pipelines, 3,368 vertex invocations and 5,840,620 fragment invocations, with complete draw inventory. Group capture produced 120 profiles and measured groups, also without final-sample truncation. Median selected-pass intervals were ~9.70 ms (statistics) versus ~13.52 ms (groups), but geometry/fragment counts differed across launches, so that difference is not attributed solely to instrumentation. No login attempted and no installation edits. Final validation passed: formatting/check/build, 40 unit/interaction tests, strict Clippy, all 16 existing transfer/compute GPU cases plus 24 focused graphics cases with synchronization validation, native viewer tests for baseline/focused/unavailable/limited data, genuine and reconstructed old-v1/v2 captures, and git whitespace checks. GPU-output assertions and application-owned query results remained correct. Native tests ran with DISPLAY unset. Final screenshots captures/prk-pass-statistics.png and captures/prk-pass-groups.png were visually inspected; readable counters, selectable draw state and opt-in group timelines are present with no raw-handle clutter. Observed synthetic timing medians varied across separate runs, reinforcing that these comparisons are not calibrated overhead benchmarks. No automated reviewer was run. Work is uncommitted on main; no remaining implementation or validation blocker is known.
Checklist
4 of 4 complete- Implement pass selectors/metadata and safe optional pipeline-statistics capability negotiation, query lifetimes, conflict handling, and unavailable states.
- Capture bounded focused draw/pipeline inventory with effective state and opt-in draw-group timing, preserving normal capture and old traces.
- Verify real graphics output/counters, feature forms, query conflicts, render-pass variants, limits, old traces, baseline versus focused captures, and PRK login with Vulkan validation and visual inspection.
- Expose focused counters, draw groups/state inspection, copyable capture flags and documented limitations in the existing native viewer.
- Area
- Personal tooling
- Project
- Wayrender
- Kind
- Feature
- Task ID
tsk_fug6taph8y- Updated