Skip to content

Quote text fields in pipeline statistics CSV - #1099

Open
nschlaepfer wants to merge 1 commit into
ItsNotRexed:mainfrom
nschlaepfer:codex/quote-pipeline-statistics-csv
Open

nschlaepfer wants to merge 1 commit into
ItsNotRexed:mainfrom
nschlaepfer:codex/quote-pipeline-statistics-csv

Conversation

@nschlaepfer

Copy link
Copy Markdown
Contributor

vk_pipeline_check --stats wrote shader and statistic names directly into CSV. For a shader named vs_constant,variant, the checker successfully compiled the pipeline and recorded six NVIDIA counters. A CSV reader parsed each as five fields, so shader_stats.py dropped that shader during its join with the disassembly listings.

The writer now quotes text containing a comma, double quote, CR or LF and doubles quotes inside quoted fields. The header, four field names, numeric formatting and ordinary rows stay byte-identical. On Windows the file keeps CRLF record endings and preserves line breaks inside fields exactly as supplied.

Verification

AI-assisted. Only synthetic fixtures were used for the published checks.

Coordination claim.

@kapitche

Copy link
Copy Markdown
Contributor

Tested 04c574f on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51): pass

@quackottu quackottu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 04c574f on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass

  • Build ok. ctest: 100% tests passed, 0 tests failed out of 51 (gameinput disabled, no SDL3).
  • pipeline_stats_csv (new here): passed under ctest.
  • 44 test programs exit 0 with 0 validation messages.
  • Same on main, not from this PR: d3d12_clear_test (NVIDIA 0.5 tie rounding, #521), vk_binary_occlusion_test (needs an input file), and the 3 VUID-vkCreateDevice-ppEnabledExtensionNames-01387 in d3d12_fence_timing_test/d3d12_vulkan_device_test (#1027).

@AGInformatique81 AGInformatique81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integration check on Windows 11 build 26300 and NVIDIA RTX 2060 (driver 32.0.16.2124), with MSVC 19.52. I replayed 04c574f3 onto current main d0835dd9 with #4576 (b82cb5e4). The older commit needed a local conflict resolution around the CMake test registrations and the header includes. Its CSV implementation and test files were carried over as written.

The pipeline_stats_csv round-trip test and vk_pipeline_check_cli both passed. On the GPU, a hand-written compute module whose index name contains a comma produced five rows with the full name in the first column. With a named-pipe reader disconnecting after the stream opened, the same pipeline compiled and the checker returned exit 1 with #4576's destination diagnostic. This verifies the two fixes together. Synthetic inputs only. AI-assisted with Codex.

@Flyander Flyander left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSV escaping helper and its synthetic round-trip coverage look sound on this head. Approval covers the CSV change; the already-reported merge conflict with #1096 still needs resolving before this can merge.

This was referenced Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants