fix(profiling): count AMD and Intel driver CPU samples #1013
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1013
Loading…
Reference in a new issue
No description provided.
Delete branch "NitnekLeBorgne/Longshot-contributions:fix/vkprof-amd-intel-20261116"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: fix · Risk: low · Tested on: Linux and native Windows CLI, authored game-free CPU-profile fixtures · Needs: none for the offline fixture regression; real profiling remains untested
Why
The offline Vulkan CPU profiler can omit AMD and Intel user-mode driver samples that occur under a renderer replay frame. The same authored active sample counts for NVIDIA, but reports zero running CPU samples for the affected Windows driver module names. This can make the offline report misleading; it is not a measured runtime or frame-rate claim.
How to reproduce
Seen on: Linux, synthetic profile stacks with a renderer replay frame; no game, hardware capture or GPU.
Settings and switches: none; default CLI and authored one-sample captures.
Steps: run
python -I -B tests/test_vkprof_drivers.py -v. The tests construct profiles with known AMD/Intel module leaves and invoke the actual vkprof CLI. The retained initial RED has four failing vendor subcases, followed by a separate amdxx64 RED/GREEN slice.Expected: these active driver samples count as running under the renderer frame.
Actual: on the pinned baseline: zero running samples / 0.0%, while the NVIDIA control counts. The candidate reports the expected 100% for the authored one-active-sample case. Those percentages describe synthetic CPU sample accounting, not GPU utilization or a benchmark.
What changed
Recognize the five exact Windows modules already listed in the project's CPU categories: amdvlk64.dll, amdxc64.dll, amdxx64.dll, igvk64.dll and igxelpicd64.dll.
scripts/vkprof.py: narrowly extend user-mode driver recognition.tests/test_vkprof_drivers.py: seven methods, including vendor cases, NVIDIA/renderer, waiting ntdll, Linux driver and exact-name controls.No changes to prof.py, cpu_categories.py, game/runtime input, capture format or switches.
Measurements
Verdict: the authored missing-vendor accounting regression is fixed with no new failure in the default game-free runner comparison. Existing environment/baseline failures remain; this is not a green CI claim.
Hardware: Linux x86-64, six logical CPUs; no GPU or GPU driver used. No physical Windows driver was exercised.
Scene: authored profile stacks, not a game scene.
Method: real CLI regression receipts, then one complete normal runner execution per exact source pin; shared baseline reused, not rerun for this candidate. No timing median or performance claim.
How to reproduce:
python -I -B tests/test_vkprof_drivers.py -vandpython -I -B tests/run_all.py --jobs 3, with isolated HOME/XDG/TMP and the recorded dependency environment.d9486a0846bcf4872578Both full runner exits are 1. All existing statuses and skip reasons are unchanged; the added module passes. Twenty failure logs match the original narrow normalization. The strict signature comparator remains false because two missing-Tooling diagnostics contain checkout-specific absolute sibling paths; a separately retained exact path-only comparison matches these messages. The missing dependency is disclosed, not characterized as an upstream code defect. No test or tool was hidden to manufacture skips.
Existing failed checks:
tests/test_appimage_player_build.py,tests/test_bake_portability.py,tests/test_bug_report.py,tests/test_crash_dialog.py,tests/test_crt_options.py,tests/test_env_on.py,tests/test_guest_imported.py,tests/test_hardware_report.py,tests/test_lift_cleanup_error.py,tests/test_link_skip.py,tests/test_linux_update.py,tests/test_make_game_cache.py,tests/test_missing_nup.py,tests/test_mods_size_table.py,tests/test_options_budget_once.py,tests/test_pending_guest_import.py,tests/test_pipeline_tour.py,tests/test_readback_late.py,tests/test_run_all_changed.py,tests/test_vk_occlusion_queries.py,tests/test_vk_pgo.py,tests/test_walk_key.pyThe 92 default skips and their retained reasons
nx2/test_bc_storage_views.py: needs a Windows Vulkan devicenx2/test_coop_spirv.py: not found here: spirv_headers, spirv_valnx2/test_default_point_size.py: not found here: spirv_headers, spirv_valnx2/test_depth_sample_types.py: not found here: spirv_headers, spirv_valnx2/test_dll.py: needs a full game build (work/build/longshot_game.dll) and Unicornnx2/test_draw_parameters.py: not found here: spirv_headers, spirv_valnx2/test_image_arrays.py: not found here: spirv_headers, spirv_valnx2/test_insn.py: needs the game's modules (work/dump) and Unicornnx2/test_leaf.py: needs the game's modules (work/dump) and Unicornnx2/test_mesh_first_types.py: not found here: spirv_headersnx2/test_nup_codec.py: not found here: zstandardnx2/test_nup_read_name.py: not found here: zstandardnx2/test_nup_stand_in.py: not found here: zstandardnx2/test_nup_verify.py: not found here: zstandardnx2/test_spirv_struct_identity.py: not found here: spirv_headers, spirv_valnx2/test_texture_init_barrier.py: not found here: vulkan_headersnx2/test_texture_phi_dominance.py: not found here: spirv_headers, spirv_valnx2/test_unsigned_image_types.py: not found here: spirv_headers, spirv_valtests/test_antilag.py: not found here: vulkan_headerstests/test_bake_mimo.py: not found here: spirv_headerstests/test_capture_dimensions.py: not found here: vulkan_headerstests/test_capture_readback_visibility.py: not found here: vulkan_headerstests/test_capture_resources.py: not found here: vulkan_headerstests/test_coverage_run.py: cover.py run hooks the Windows game (report and compare are checked by test_coverage_report.py)tests/test_dav1d_av1.py: not found here: dav1dtests/test_draw_stream_visibility.py: not found here: vulkan_headerstests/test_dummy_views.py: not found here: vulkan_headerstests/test_dump_readback.py: not found here: vulkan_headerstests/test_exclusive_marks.py: not found here: clangtests/test_fallback_pipeline_state.py: not found here: vulkan_headerstests/test_framegen_resources.py: not found here: vulkan_headerstests/test_framelog_sink.py: not found here: vulkan_headerstests/test_fs_path_utf8.py: native Windows filesystem conversion APIstests/test_fsr3_release_frees.py: not found here: vulkan_headerstests/test_fsr3_shaders.py: not found here: glslang, spirv_valtests/test_fsr4_tune.py: not found here: spirv_valtests/test_fsr_image_retirement.py: not found here: vulkan_headerstests/test_fsr_uniform_ownership.py: not found here: vulkan_headerstests/test_host_shaders.py: not found here: glslangtests/test_image_view_retry.py: not found here: vulkan_headerstests/test_import_buffer_binding.py: not found here: vulkan_headerstests/test_import_reach.py: not found here: vulkan_headerstests/test_inline_write_order.py: not found here: vulkan_headerstests/test_linux_preflight.py: not found here: clangtests/test_log_batch.py: the Windows log writer: SRW locks and threadstests/test_lost_wait_said.py: not found here: vulkan_headerstests/test_low_vram_texture_mips.py: not found here: vulkan_headerstests/test_lower_depbar.py: not found here: clang++tests/test_lower_lds_after_sts.py: not found here: clang++tests/test_lower_register_markers.py: not found here: clang++tests/test_mesh_unreachable_outputs.py: not found here: spirv_headers, spirv_valtests/test_native_float_atomic_add.py: not found here: spirv_headers, spirv_valtests/test_native_suatom.py: not found here: clang++tests/test_native_zstd.py: not found here: zstandardtests/test_nonuniform_image_arrays.py: not found here: spirv_headers, spirv_valtests/test_nvn_null_pool.py: not found here: clangtests/test_nvn_tex_builder_guard.py: not found here: clangtests/test_parallel_init_order.py: not found here: vulkan_headerstests/test_pcache_header_read.py: not found here: vulkan_headerstests/test_pipeline_state_portable.py: not found here: vulkan_headerstests/test_pipeline_states.py: not found here: vulkan_headerstests/test_portable_builder_home.py: Windows portable Builder home and Windows path semantics; native .NET fixture on Windowstests/test_portable_builder_startup.py: Windows Builder startup (a win-x64 self-contained program)tests/test_portable_setup_paths.py: Windows native setup MAX_PATH contracttests/test_portable_setup_start.py: Windows setup startup contracttests/test_portable_setup_transaction.py: Windows setup directory transactionstests/test_precompile_compute_guard.py: Windows structured exceptionstests/test_present_aspect_vulkan.py: needs a Vulkan 1.3 device for offscreen transfer/readbacktests/test_present_source_crop.py: not found here: vulkan_headerstests/test_program_answer_domains.py: not found here: vulkan_headers, clang++tests/test_prompt_speed.py: not found here: zstandardtests/test_recorder_own_idle.py: not found here: vulkan_headerstests/test_recorder_sync.py: not found here: vulkan_headerstests/test_recording_admission.py: not found here: vulkan_headerstests/test_replay_write_order.py: not found here: vulkan_headerstests/test_sampler_admission.py: not found here: vulkan_headerstests/test_setup_runtime.py: Windows setup uses Win32 file APIstests/test_setup_runtime_paths.py: Windows setup entry pathstests/test_shader_module_guard.py: Windows structured exceptionstests/test_split_giants.py: not found here: clangtests/test_system_header_cache.py: not found here: clangtests/test_taau_typed_dispatch.py: not found here: vulkan_headerstests/test_texel_buffer_ownership.py: not found here: vulkan_headerstests/test_texture_staging_publication.py: not found here: vulkan_headerstests/test_ui_record.py: not found here: vulkan_headerstests/test_ui_texture_upload.py: not found here: vulkan_headerstests/test_vendor_fixes.py: not found here: vulkan_headerstests/test_vendor_translation.py: not found here: spirv_headers, spirv_valtests/test_vulkan_clear_mip.py: not found here: vulkan_headerstests/test_vulkan_copy_span.py: not found here: vulkan_headerstests/test_vulkan_copy_span_gpu_compile.py: not found here: vulkan_headerstests/test_wb_diff_observations_gpu.py: not found here: vulkan_headersFlags and settings
None. No switch, default, menu row or capture-format change.
Testing
Additional native Windows check: CPython 3.14.7, exact head above,
python -I -B tests/test_vkprof_drivers.py -v: seven fixture methods pass, native exit 0. Synthetic samples only; no GPU or real driver profile was used.Tested: seven focused methods after actual failing-before-fix receipts; default complete runner on the exact candidate and shared baseline, unchanged sources/modes and owned-process absence. AGENTS.md was never materialized; two unchanged source-check methods additionally pass with its public blob read only in memory. Source-only qualification is not literal exact-tree or hosted-CI equivalence. The unchanged gpu/build-shadertool.bat has its declared LF-to-CRLF checkout conversion; candidate production/test files match their Git blobs.
Not tested: real Windows driver-stack profiles, GPU/game profiles, or performance. No game behavior is changed or claimed validated.
Must be tested:
None for the offline fixture regression: the native Windows replay is complete. This was automated CLI execution over SSH, not a manual GUI check or a real driver-profile/performance measurement. No game/GPU gate is introduced.
Risks
Exact module names intentionally avoid broad substring matches; future driver names remain outside this narrow list. Synthetic accounting does not establish which driver consumes CPU on real hardware.
Compatibility: no runtime ABI, save, settings, package or capture-format change; existing NVIDIA/Linux/wait behavior retains controls.
Readiness provenance
Pinned once on main
d9486a0846for this batch. A later unrelated main advance is not claimed executed or used as a reason to discard this exact comparison. Public ownership review covered the 230 open PR file lists in the retained snapshot; none touched either candidate path, with relevant deltas to be checked again before publication. This description is not a maintainer approval or merge claim.Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).Assisted-by:/Co-Authored-By:trailers.When it applies
mainand passing here.Windows qualification caveats: Native CPython 3.14.7 used a new independent copy of an existing pinned-dependency runtime, not a venv or a replacement product runner. Each candidate used its own full frozen-head public Git-blob export (2652 tree entries; 2651 files materialized;
AGENTS.mdkept opaque and never materialized). Production/test SHA-256 and all exported file bytes were verified before/after; Git modes remain metadata, not a claim of POSIX permission semantics on NTFS. Normal public test sources and commands were unchanged. Full stdout/stderr and exact native executable/argv/cwd/exit records are retained. A post-test harness assertion exited 1 because five CPython encoding bytecode cache files appeared only in the new owned runtime copy; independent readback confirmed no existing runtime file changed, the original runtime stayed byte-identical, and all test invocations exited 0. No full Windows suite, real compiler, game, GUI, hosted CI or publication qualification is claimed. Existing Linux full-suite results above are unchanged and are not transferred to Windows.WIP: fix(profiling): count AMD and Intel driver CPU samplesto fix(profiling): count AMD and Intel driver CPU samplesCode-only review of
bcf4872578; informational findings, with final approval left to another reviewer.No introduced correctness defect found in this narrow offline-profiler change. The five exact module names agree with the existing driver categories. They enter the existing running/inclusive/self accounting path without changing sample totals, thread selection, NVIDIA/Linux handling or the capture format. The added CLI fixtures exercise the actual reporting path, include non-driver and exact-name negative controls, and would detect removing the newly recognized names.
The PR reports synthetic regression checks on Linux and native Windows, with existing full-suite failures and skips disclosed. Real driver captures remain untested, so this establishes sample-accounting behavior rather than a CPU-utilization or performance result. No game run is needed for this script-only change. A future mixed active/wait sample fixture would strengthen percentage-denominator coverage; it is not a merge blocker for this one-line recognition change.
Reviewed the full diff, surrounding profiler/symbol-loading code, existing CPU categories, reported testing, and current feedback/overlap inventory. No active competing work claim or overlapping open PR was found in those sources. I ran no tests, builds or PR code, and made no source changes.
Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.