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
14 changes: 12 additions & 2 deletions .github/workflows/generated-bindings-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/v_vulkan_bindings
ref: 2700e4f4c58e9e625657b80f4f44b0584d7c6096
ref: 336e513f7ac4b3c5260f9dabe808b6f54e6a7491
path: generator
- uses: prantlf/setup-v-action@92f20bea50d2c9931a28c96bb4997a3c7357baf0 # v4
if: matrix.v-channel == 'stable'
Expand Down Expand Up @@ -208,6 +208,12 @@ jobs:
-check \
-cflags "-I$VMODULES/antono2/vulkan -I$VULKAN_SDK/include -I$VULKAN_SDK/include/volk" \
generator/test/main.c.v
v \
-new-compiler \
-d vulkan_xlib \
-check \
-cflags "-I$VMODULES/antono2/vulkan -I$VULKAN_SDK/include -I$VULKAN_SDK/include/volk" \
generator/test/main.c.v
- name: Compile smoke test and ergonomic unit tests
id: compile
if: matrix.v-channel == 'stable' || steps.setup_v_source.outcome == 'success'
Expand All @@ -231,6 +237,10 @@ jobs:
v "${v_flags[@]}" run generator/test
fi
v "${v_flags[@]}" test ergonomic
if [[ "${{ runner.os }}" == Linux && "${{ matrix.v-channel }}" == stable ]]; then
v -d vulkan_xlib -cc "${{ matrix.compiler }}" \
-o "$RUNNER_TEMP/vulkan-xlib-smoke" ci/platform_xlib
fi
- name: Validate TinyCC loader and ergonomic API
if: runner.os == 'Linux' && matrix.v-channel == 'stable'
shell: bash
Expand All @@ -244,7 +254,7 @@ jobs:
shell: bash
run: |
if [[ "${{ matrix.v-channel }}" == v3 ]]; then
echo "::warning::The required strict V3 frontend passed, but its advisory C backend still emits platform-specific callback types on unsupported hosts."
echo "::warning::The required strict V3 frontend passed, but full V3 C compilation remains advisory."
else
echo "::warning::The moving V master compatibility lane failed; stable V 0.5.2 remains authoritative."
fi
Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ still support every command, extension, and feature an application requests.
Current V master selects V3 by default and can fall back to its V 0.5.2
compatibility compiler. CI therefore requires the pinned strict
`-new-compiler` frontend to parse and type-check the public module. Its full C
backend remains advisory while it emits unused platform-only Vulkan callback
types on unsupported hosts. The unpinned moving-master lane is also advisory
backend remains advisory while compiler compatibility is being verified.
The unpinned moving-master lane is also advisory
so an unrelated upstream compiler regression cannot block Vulkan maintenance.

## Install
Expand All @@ -78,6 +78,21 @@ vk.load_instance_commands(instance)
vk.load_device_commands(device)
```

### Platform extensions

Enable a platform extension when building code that uses its raw types or
commands. The V flag also enables the matching Vulkan C header macro:

```sh
v -d vulkan_xlib run your_app.v
```

For XCB or Wayland, use `vulkan_xcb` or `vulkan_wayland` instead. Other flags
follow the registry platform names, such as `vulkan_win32`, `vulkan_android`,
and `vulkan_metal`. Install the native headers for the selected platform.
Extension name and spec-version constants are available without these flags,
so applications can still query extension support before selecting a backend.

### Historical Vulkan versions

The original tags from `v1.3.290` through `v1.4.335` are preserved exactly as
Expand Down
12 changes: 12 additions & 0 deletions ci/platform_xlib/main.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module main

import antono2.vulkan as vk

fn accept_xlib_surface(info &vk.XlibSurfaceCreateInfoKHR) {
_ = info
}

fn main() {
assert vk.khr_xlib_surface_spec_version > 0
accept_xlib_surface(unsafe { nil })
}
Loading
Loading