Skip to content

fix(vk-gen): C array params + deterministic output (v0.30.18)#250

Merged
kolkov merged 2 commits into
mainfrom
fix/vk-gen-array-params
Jul 12, 2026
Merged

fix(vk-gen): C array params + deterministic output (v0.30.18)#250
kolkov merged 2 commits into
mainfrom
fix/vk-gen-array-params

Conversation

@kolkov

@kolkov kolkov commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix Vulkan crash: vkCmdSetBlendConstants(const float[4]) generated with wrong CIF (scalar float instead of pointer). C array params decay to pointers in C ABI.
  • Fix CmdSetFragmentShadingRateKHR and CmdSetFragmentShadingRateEnumNV — same array param issue (combinerOps[2])
  • Deterministic const_gen.go output — sorted map keys for extension enums (was 1780+ line noise diffs on every regeneration)
  • Generator now fully idempotent (two runs = 0 diff)

Test plan

  • go build ./... — Windows, Linux, macOS
  • go test ./... — 15/15 pass
  • golangci-lint run — 0 issues
  • gofmt -l . — 0 unformatted
  • vk-gen idempotent (two consecutive runs = 0 diff)
  • Vulkan visual test on Windows (gogpu agent)

kolkov added 2 commits July 12, 2026 11:19
vkCmdSetBlendConstants(const float[4]) was called with SigVoidHandleF32
(scalar float CIF) instead of SigVoidHandlePtr (pointer CIF). C arrays
in function params decay to pointers — generator now detects '[' in
RawXML and classifies as 'ptr' with double-pointer arg pattern.

Also fixes non-deterministic const_gen.go output: extension enum map
keys are now sorted before iteration (Go map order is random).

Fixes Vulkan crash on Windows (CmdSetBlendConstants). Regression from
vk-gen regeneration in v0.30.17 which overwrote manual fix.
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov kolkov merged commit fca0bd7 into main Jul 12, 2026
11 checks passed
@kolkov kolkov deleted the fix/vk-gen-array-params branch July 12, 2026 08:30
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.

1 participant