Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.20.2] - 2026-03-12

### Fixed

- **Vulkan: validate WSI query functions in LoadInstance** — `vkGetPhysicalDevice-
SurfaceCapabilitiesKHR`, `vkGetPhysicalDeviceSurfaceFormatsKHR`, and
`vkGetPhysicalDeviceSurfacePresentModesKHR` are now verified during instance
initialization. Previously, if any WSI function failed to load (returned nil),
the error was silent until a later SIGSEGV via goffi nil function pointer call.
Now fails fast with a clear error message.

## [0.20.1] - 2026-03-11

### Fixed
Expand Down
11 changes: 11 additions & 0 deletions hal/vulkan/vk/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ func (c *Commands) LoadInstance(instance Instance) error {
return fmt.Errorf("failed to load critical instance functions")
}

// Verify WSI (Window System Integration) query functions.
// These are required for any surface-based rendering. Platform-specific
// surface creation functions (vkCreate*SurfaceKHR) are optional and
// checked at call sites via Has* methods, but the query functions are
// part of VK_KHR_surface which is always enabled for windowed rendering.
if c.getPhysicalDeviceSurfaceCapabilitiesKHR == nil ||
c.getPhysicalDeviceSurfaceFormatsKHR == nil ||
c.getPhysicalDeviceSurfacePresentModesKHR == nil {
return fmt.Errorf("failed to load WSI query functions (VK_KHR_surface)")
}

return nil
}

Expand Down
Loading