aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Davidson <colrdavidson@gmail.com>2024-11-20 15:51:08 -0800
committerColin Davidson <colrdavidson@gmail.com>2024-11-20 15:51:08 -0800
commitd60fb5a44e4d2e371562fd38947f8125b06bceb9 (patch)
tree4e924ee102c2af7b30d29017ab716ed00c51ab26
parentf3ab14b8ccb45d0fef8a96937635bdf0943ce7d6 (diff)
parent3229f4668dfaa5f43a374bc549f42661b002699d (diff)
update to master
-rw-r--r--.github/workflows/ci.yml10
-rw-r--r--.github/workflows/nightly.yml1
-rw-r--r--.gitignore3
-rw-r--r--base/runtime/core.odin12
-rw-r--r--base/runtime/core_builtin.odin63
-rw-r--r--base/runtime/print.odin12
-rw-r--r--bin/RAD-LICENSE19
-rw-r--r--bin/radlink.exebin0 -> 1288296 bytes
-rw-r--r--build.bat44
-rwxr-xr-xbuild_odin.sh16
-rw-r--r--core/c/frontend/tokenizer/tokenizer.odin2
-rw-r--r--core/c/libc/README.md4
-rw-r--r--core/c/libc/locale.odin133
-rw-r--r--core/c/libc/stdatomic.odin2
-rw-r--r--core/compress/zlib/doc.odin3
-rw-r--r--core/container/bit_array/bit_array.odin41
-rw-r--r--core/crypto/_chacha20/simd128/chacha20_simd128.odin2
-rw-r--r--core/crypto/_sha3/sp800_185.odin14
-rw-r--r--core/dynlib/lib.odin10
-rw-r--r--core/dynlib/lib_js.odin8
-rw-r--r--core/dynlib/lib_unix.odin30
-rw-r--r--core/dynlib/lib_windows.odin8
-rw-r--r--core/encoding/cbor/cbor.odin2
-rw-r--r--core/encoding/cbor/unmarshal.odin25
-rw-r--r--core/encoding/hxa/read.odin2
-rw-r--r--core/encoding/ini/ini.odin1
-rw-r--r--core/encoding/json/marshal.odin6
-rw-r--r--core/encoding/json/unmarshal.odin62
-rw-r--r--core/fmt/fmt.odin14
-rw-r--r--core/image/general.odin12
-rw-r--r--core/io/util.odin2
-rw-r--r--core/math/linalg/general.odin6
-rw-r--r--core/math/math_sincos.odin12
-rw-r--r--core/math/rand/rand.odin79
-rw-r--r--core/mem/allocators.odin334
-rw-r--r--core/mem/mem.odin4
-rw-r--r--core/mem/mutex_allocator.odin2
-rw-r--r--core/mem/tracking_allocator.odin2
-rw-r--r--core/mem/virtual/virtual_posix.odin10
-rw-r--r--core/net/socket_darwin.odin5
-rw-r--r--core/net/socket_freebsd.odin5
-rw-r--r--core/net/socket_linux.odin37
-rw-r--r--core/net/socket_windows.odin5
-rw-r--r--core/odin/ast/ast.odin23
-rw-r--r--core/odin/ast/clone.odin3
-rw-r--r--core/odin/parser/parser.odin47
-rw-r--r--core/odin/tokenizer/tokenizer.odin2
-rw-r--r--core/os/os2/allocators.odin2
-rw-r--r--core/os/os2/dir_linux.odin2
-rw-r--r--core/os/os2/dir_windows.odin10
-rw-r--r--core/os/os2/errors_linux.odin2
-rw-r--r--core/os/os2/errors_posix.odin2
-rw-r--r--core/os/os2/errors_windows.odin4
-rw-r--r--core/os/os2/file_util.odin2
-rw-r--r--core/os/os2/file_windows.odin6
-rw-r--r--core/os/os2/path_posix.odin2
-rw-r--r--core/os/os2/pipe.odin37
-rw-r--r--core/os/os2/pipe_linux.odin26
-rw-r--r--core/os/os2/pipe_posix.odin27
-rw-r--r--core/os/os2/pipe_windows.odin12
-rw-r--r--core/os/os2/process.odin356
-rw-r--r--core/os/os2/process_linux.odin2
-rw-r--r--core/os/os2/process_posix.odin3
-rw-r--r--core/os/os2/process_posix_other.odin1
-rw-r--r--core/os/os2/process_windows.odin40
-rw-r--r--core/os/os2/stat_windows.odin15
-rw-r--r--core/os/os_darwin.odin6
-rw-r--r--core/os/os_freebsd.odin7
-rw-r--r--core/os/os_haiku.odin6
-rw-r--r--core/os/os_linux.odin19
-rw-r--r--core/os/os_netbsd.odin6
-rw-r--r--core/os/os_openbsd.odin6
-rw-r--r--core/path/filepath/match.odin7
-rw-r--r--core/path/filepath/path_unix.odin37
-rw-r--r--core/reflect/reflect.odin102
-rw-r--r--core/reflect/types.odin32
-rw-r--r--core/simd/x86/sse2.odin4
-rw-r--r--core/slice/map.odin8
-rw-r--r--core/slice/slice.odin166
-rw-r--r--core/strconv/strconv.odin3
-rw-r--r--core/strings/strings.odin2
-rw-r--r--core/sys/darwin/Foundation/NSApplication.odin10
-rw-r--r--core/sys/darwin/mach_darwin.odin514
-rw-r--r--core/sys/info/cpu_intel.odin47
-rw-r--r--core/sys/info/platform_darwin.odin16
-rw-r--r--core/sys/linux/bits.odin127
-rw-r--r--core/sys/linux/constants.odin25
-rw-r--r--core/sys/linux/sys.odin25
-rw-r--r--core/sys/linux/types.odin23
-rw-r--r--core/sys/posix/arpa_inet.odin1
-rw-r--r--core/sys/posix/dirent.odin87
-rw-r--r--core/sys/posix/dlfcn.odin12
-rw-r--r--core/sys/posix/errno.odin183
-rw-r--r--core/sys/posix/fcntl.odin152
-rw-r--r--core/sys/posix/fnmatch.odin11
-rw-r--r--core/sys/posix/glob.odin36
-rw-r--r--core/sys/posix/grp.odin5
-rw-r--r--core/sys/posix/iconv.odin1
-rw-r--r--core/sys/posix/langinfo.odin89
-rw-r--r--core/sys/posix/libgen.odin8
-rw-r--r--core/sys/posix/limits.odin98
-rw-r--r--core/sys/posix/locale.odin94
-rw-r--r--core/sys/posix/monetary.odin1
-rw-r--r--core/sys/posix/net_if.odin5
-rw-r--r--core/sys/posix/netdb.odin39
-rw-r--r--core/sys/posix/netinet_in.odin93
-rw-r--r--core/sys/posix/netinet_tcp.odin5
-rw-r--r--core/sys/posix/poll.odin24
-rw-r--r--core/sys/posix/posix.odin7
-rw-r--r--core/sys/posix/pthread.odin111
-rw-r--r--core/sys/posix/pwd.odin15
-rw-r--r--core/sys/posix/sched.odin5
-rw-r--r--core/sys/posix/setjmp.odin6
-rw-r--r--core/sys/posix/setjmp_libc.odin11
-rw-r--r--core/sys/posix/signal.odin298
-rw-r--r--core/sys/posix/signal_libc.odin145
-rw-r--r--core/sys/posix/stdio.odin173
-rw-r--r--core/sys/posix/stdio_libc.odin207
-rw-r--r--core/sys/posix/stdlib.odin79
-rw-r--r--core/sys/posix/stdlib_libc.odin101
-rw-r--r--core/sys/posix/string.odin15
-rw-r--r--core/sys/posix/string_libc.odin30
-rw-r--r--core/sys/posix/sys_ipc.odin29
-rw-r--r--core/sys/posix/sys_mman.odin30
-rw-r--r--core/sys/posix/sys_msg.odin53
-rw-r--r--core/sys/posix/sys_resource.odin18
-rw-r--r--core/sys/posix/sys_select.odin7
-rw-r--r--core/sys/posix/sys_sem.odin53
-rw-r--r--core/sys/posix/sys_shm.odin47
-rw-r--r--core/sys/posix/sys_socket.odin227
-rw-r--r--core/sys/posix/sys_stat.odin187
-rw-r--r--core/sys/posix/sys_statvfs.odin26
-rw-r--r--core/sys/posix/sys_time.odin5
-rw-r--r--core/sys/posix/sys_times.odin5
-rw-r--r--core/sys/posix/sys_uio.odin5
-rw-r--r--core/sys/posix/sys_un.odin10
-rw-r--r--core/sys/posix/sys_utsname.odin16
-rw-r--r--core/sys/posix/sys_wait.odin75
-rw-r--r--core/sys/posix/termios.odin17
-rw-r--r--core/sys/posix/time.odin15
-rw-r--r--core/sys/posix/ulimit.odin5
-rw-r--r--core/sys/posix/unistd.odin412
-rw-r--r--core/sys/posix/unistd_libc.odin153
-rw-r--r--core/sys/posix/utime.odin5
-rw-r--r--core/sys/posix/wordexp.odin24
-rw-r--r--core/sys/unix/pthread_darwin.odin96
-rw-r--r--core/sys/unix/pthread_freebsd.odin122
-rw-r--r--core/sys/unix/pthread_haiku.odin71
-rw-r--r--core/sys/unix/pthread_linux.odin124
-rw-r--r--core/sys/unix/pthread_netbsd.odin102
-rw-r--r--core/sys/unix/pthread_openbsd.odin74
-rw-r--r--core/sys/unix/pthread_unix.odin127
-rw-r--r--core/sys/unix/unix.odin8
-rw-r--r--core/sys/wasm/js/dom.odin2
-rw-r--r--core/sys/wasm/js/events.odin4
-rw-r--r--core/sys/wasm/js/odin.js49
-rw-r--r--core/sys/windows/icu.odin14
-rw-r--r--core/sys/windows/kernel32.odin8
-rw-r--r--core/sys/windows/types.odin17
-rw-r--r--core/sys/windows/user32.odin61
-rw-r--r--core/sys/windows/ux_theme.odin2
-rw-r--r--core/sys/windows/winerror.odin14
-rw-r--r--core/testing/signal_handler_libc.odin21
-rw-r--r--core/testing/signal_handler_posix.odin22
-rw-r--r--core/testing/signal_handler_windows.odin6
-rw-r--r--core/text/scanner/scanner.odin2
-rw-r--r--core/thread/thread_unix.odin70
-rw-r--r--core/time/datetime/constants.odin45
-rw-r--r--core/time/datetime/datetime.odin6
-rw-r--r--core/time/time.odin4
-rw-r--r--core/time/time_linux.odin6
-rw-r--r--core/time/timezone/tz_unix.odin89
-rw-r--r--core/time/timezone/tz_windows.odin311
-rw-r--r--core/time/timezone/tzdate.odin341
-rw-r--r--core/time/timezone/tzif.odin652
-rw-r--r--core/unicode/utf16/utf16.odin14
-rw-r--r--core/unicode/utf8/utf8string/string.odin2
-rw-r--r--examples/README.md4
-rw-r--r--examples/all/all_main.odin2
-rw-r--r--examples/all/all_posix.odin4
-rw-r--r--examples/all/all_vendor.odin4
-rw-r--r--examples/demo/demo.odin23
-rw-r--r--examples/demo/demo.rc75
-rw-r--r--misc/emblem.icobin0 -> 3638 bytes
-rw-r--r--misc/odin.manifest8
-rw-r--r--misc/odin.rc79
-rw-r--r--misc/sourcefile.icobin0 -> 3638 bytes
-rw-r--r--odin.rdibin0 -> 6593532 bytes
-rw-r--r--src/big_int.cpp17
-rw-r--r--src/bug_report.cpp37
-rw-r--r--src/build_cpuid.cpp35
-rw-r--r--src/build_settings.cpp48
-rw-r--r--src/cached.cpp109
-rw-r--r--src/check_builtin.cpp29
-rw-r--r--src/check_decl.cpp11
-rw-r--r--src/check_expr.cpp116
-rw-r--r--src/check_stmt.cpp17
-rw-r--r--src/check_type.cpp68
-rw-r--r--src/checker.cpp43
-rw-r--r--src/docs_format.cpp3
-rw-r--r--src/docs_writer.cpp18
-rw-r--r--src/exact_value.cpp1
-rw-r--r--src/gb/gb.h6
-rw-r--r--src/linker.cpp89
-rw-r--r--src/llvm_abi.cpp21
-rw-r--r--src/llvm_backend.hpp4
-rw-r--r--src/llvm_backend_debug.cpp11
-rw-r--r--src/llvm_backend_expr.cpp89
-rw-r--r--src/llvm_backend_general.cpp198
-rw-r--r--src/llvm_backend_proc.cpp5
-rw-r--r--src/llvm_backend_stmt.cpp21
-rw-r--r--src/llvm_backend_type.cpp28
-rw-r--r--src/llvm_backend_utility.cpp20
-rw-r--r--src/main.cpp956
-rw-r--r--src/parser.cpp59
-rw-r--r--src/parser.hpp3
-rw-r--r--src/string.cpp31
-rw-r--r--src/types.cpp118
-rw-r--r--src/unicode.cpp13
-rw-r--r--tests/benchmark/bytes/benchmark_bytes.odin8
-rw-r--r--tests/core/crypto/test_core_crypto_sha3_variants.odin17
-rw-r--r--tests/core/encoding/cbor/test_core_cbor.odin54
-rw-r--r--tests/core/normal.odin1
-rw-r--r--tests/core/odin/test_file_tags.odin16
-rw-r--r--tests/core/os/os2/dir.odin32
-rw-r--r--tests/core/os/os2/process.odin25
-rw-r--r--tests/core/runtime/test_core_runtime.odin24
-rw-r--r--tests/core/slice/test_core_slice.odin35
-rw-r--r--tests/core/sys/posix/posix.odin63
-rw-r--r--tests/core/sys/posix/structs.odin2
-rw-r--r--tests/core/sys/posix/structs/structs.c26
-rw-r--r--tests/core/sys/posix/structs/structs.odin30
-rw-r--r--tests/core/time/test_core_time.odin226
-rw-r--r--vendor/box2d/box2d.odin2
-rw-r--r--vendor/glfw/bindings/bindings.odin14
-rw-r--r--vendor/lua/5.2/lua.odin2
-rw-r--r--vendor/miniaudio/common_unix.odin14
-rw-r--r--vendor/raylib/raylib.odin12
-rw-r--r--vendor/raylib/raymath.odin4
-rw-r--r--vendor/raylib/rlgl/rlgl.odin1
-rw-r--r--vendor/stb/lib/darwin/stb_sprintf.abin0 -> 47224 bytes
-rw-r--r--vendor/stb/lib/stb_sprintf.libbin0 -> 25212 bytes
-rw-r--r--vendor/stb/sprintf/stb_sprintf.odin2
-rw-r--r--vendor/stb/src/build.bat3
-rw-r--r--vendor/vulkan/_gen/create_vulkan_odin_wrapper.py17
-rw-r--r--vendor/vulkan/_gen/vk_icd.h22
-rw-r--r--vendor/vulkan/_gen/vk_layer.h22
-rw-r--r--vendor/vulkan/_gen/vk_platform.h2
-rw-r--r--vendor/vulkan/_gen/vulkan_core.h3725
-rw-r--r--vendor/vulkan/_gen/vulkan_ios.h3
-rw-r--r--vendor/vulkan/_gen/vulkan_macos.h3
-rw-r--r--vendor/vulkan/_gen/vulkan_metal.h16
-rw-r--r--vendor/vulkan/_gen/vulkan_video_codec_av1std.h392
-rw-r--r--vendor/vulkan/_gen/vulkan_video_codec_av1std_decode.h109
-rw-r--r--vendor/vulkan/_gen/vulkan_video_codec_h264std.h6
-rw-r--r--vendor/vulkan/_gen/vulkan_video_codec_h264std_decode.h6
-rw-r--r--vendor/vulkan/_gen/vulkan_video_codec_h264std_encode.h147
-rw-r--r--vendor/vulkan/_gen/vulkan_video_codec_h265std.h15
-rw-r--r--vendor/vulkan/_gen/vulkan_video_codec_h265std_decode.h6
-rw-r--r--vendor/vulkan/_gen/vulkan_video_codec_h265std_encode.h157
-rw-r--r--vendor/vulkan/_gen/vulkan_wayland.h3
-rw-r--r--vendor/vulkan/_gen/vulkan_win32.h11
-rw-r--r--vendor/vulkan/core.odin198
-rw-r--r--vendor/vulkan/enums.odin798
-rw-r--r--vendor/vulkan/procedures.odin375
-rw-r--r--vendor/vulkan/structs.odin2107
-rw-r--r--vendor/wgpu/examples/glfw/Makefile4
-rw-r--r--vendor/wgpu/examples/glfw/build.bat2
-rw-r--r--vendor/wgpu/examples/glfw/os_js.odin3
-rw-r--r--vendor/wgpu/examples/glfw/web/index.html2
-rw-r--r--vendor/wgpu/examples/sdl2/Makefile4
-rw-r--r--vendor/wgpu/examples/sdl2/build.bat2
-rw-r--r--vendor/wgpu/examples/sdl2/os_js.odin3
-rw-r--r--vendor/wgpu/examples/sdl2/web/index.html2
-rw-r--r--vendor/wgpu/wgpu.js10
-rw-r--r--vendor/wgpu/wgpu.odin59
276 files changed, 15752 insertions, 4460 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 421b5c586..41f548119 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -36,6 +36,8 @@ jobs:
./odin test tests/core/speed.odin -file -all-packages -vet -strict-style -disallow-do -o:speed -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true
./odin test tests/vendor -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true
(cd tests/issues; ./run.sh)
+ ./odin check tests/benchmark -vet -strict-style -no-entry-point
+
build_freebsd:
name: FreeBSD Build, Check, and Test
runs-on: ubuntu-latest
@@ -64,6 +66,7 @@ jobs:
./odin test tests/core/speed.odin -file -all-packages -vet -strict-style -disallow-do -o:speed -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true
./odin test tests/vendor -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true
(cd tests/issues; ./run.sh)
+ ./odin check tests/benchmark -vet -strict-style -no-entry-point
ci:
strategy:
fail-fast: false
@@ -128,6 +131,8 @@ jobs:
cd tests/issues
./run.sh
+ - name: Check benchmarks
+ run: ./odin check tests/benchmark -vet -strict-style -no-entry-point
- name: Odin check examples/all for Linux i386
run: ./odin check examples/all -vet -strict-style -disallow-do -target:linux_i386
if: matrix.os == 'ubuntu-latest'
@@ -203,6 +208,11 @@ jobs:
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
odin test tests/internal -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true
+ - name: Check benchmarks
+ shell: cmd
+ run: |
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
+ odin check tests/benchmark -vet -strict-style -no-entry-point
- name: Odin documentation tests
shell: cmd
run: |
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 6243d1922..314711efb 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -38,6 +38,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
+ include-hidden-files: true
name: windows_artifacts
path: dist
build_linux:
diff --git a/.gitignore b/.gitignore
index 553e16005..32e5f5b0f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -266,6 +266,9 @@ bin/
*.exe
*.obj
*.pdb
+*.res
+desktop.ini
+Thumbs.db
# - Linux/MacOS
odin
diff --git a/base/runtime/core.odin b/base/runtime/core.odin
index a5a3a4d8c..e47f3ecbc 100644
--- a/base/runtime/core.odin
+++ b/base/runtime/core.odin
@@ -171,14 +171,6 @@ Type_Info_Simd_Vector :: struct {
elem_size: int,
count: int,
}
-Type_Info_Relative_Pointer :: struct {
- pointer: ^Type_Info, // ^T
- base_integer: ^Type_Info,
-}
-Type_Info_Relative_Multi_Pointer :: struct {
- pointer: ^Type_Info, // [^]T
- base_integer: ^Type_Info,
-}
Type_Info_Matrix :: struct {
elem: ^Type_Info,
elem_size: int,
@@ -241,8 +233,6 @@ Type_Info :: struct {
Type_Info_Map,
Type_Info_Bit_Set,
Type_Info_Simd_Vector,
- Type_Info_Relative_Pointer,
- Type_Info_Relative_Multi_Pointer,
Type_Info_Matrix,
Type_Info_Soa_Pointer,
Type_Info_Bit_Field,
@@ -275,8 +265,6 @@ Typeid_Kind :: enum u8 {
Map,
Bit_Set,
Simd_Vector,
- Relative_Pointer,
- Relative_Multi_Pointer,
Matrix,
Soa_Pointer,
Bit_Field,
diff --git a/base/runtime/core_builtin.odin b/base/runtime/core_builtin.odin
index 67d249d11..d28dadd02 100644
--- a/base/runtime/core_builtin.odin
+++ b/base/runtime/core_builtin.odin
@@ -6,6 +6,39 @@ import "base:intrinsics"
Maybe :: union($T: typeid) {T}
+/*
+Recovers the containing/parent struct from a pointer to one of its fields.
+Works by "walking back" to the struct's starting address using the offset between the field and the struct.
+
+Inputs:
+- ptr: Pointer to the field of a container struct
+- T: The type of the container struct
+- field_name: The name of the field in the `T` struct
+
+Returns:
+- A pointer to the container struct based on a pointer to a field in it
+
+Example:
+ package container_of
+ import "base:runtime"
+
+ Node :: struct {
+ value: int,
+ prev: ^Node,
+ next: ^Node,
+ }
+
+ main :: proc() {
+ node: Node
+ field_ptr := &node.next
+ container_struct_ptr: ^Node = runtime.container_of(field_ptr, Node, "next")
+ assert(container_struct_ptr == &node)
+ assert(uintptr(field_ptr) - uintptr(container_struct_ptr) == size_of(node.value) + size_of(node.prev))
+ }
+
+Output:
+ ^Node
+*/
@(builtin, require_results)
container_of :: #force_inline proc "contextless" (ptr: $P/^$Field_Type, $T: typeid, $field_name: string) -> ^T
where intrinsics.type_has_field(T, field_name),
@@ -350,12 +383,23 @@ _make_dynamic_array_len_cap :: proc(array: ^Raw_Dynamic_Array, size_of_elem, ali
return
}
-// `make_map` allocates and initializes a map. Like `new`, the first argument is a type, not a value.
+// `make_map` initializes a map with an allocator. Like `new`, the first argument is a type, not a value.
// Unlike `new`, `make`'s return value is the same as the type of its argument, not a pointer to it.
//
// Note: Prefer using the procedure group `make`.
@(builtin, require_results)
-make_map :: proc($T: typeid/map[$K]$E, #any_int capacity: int = 1<<MAP_MIN_LOG2_CAPACITY, allocator := context.allocator, loc := #caller_location) -> (m: T, err: Allocator_Error) #optional_allocator_error {
+make_map :: proc($T: typeid/map[$K]$E, allocator := context.allocator, loc := #caller_location) -> (m: T) {
+ m.allocator = allocator
+ return m
+}
+
+// `make_map_cap` initializes a map with an allocator and allocates space using `capacity`.
+// Like `new`, the first argument is a type, not a value.
+// Unlike `new`, `make`'s return value is the same as the type of its argument, not a pointer to it.
+//
+// Note: Prefer using the procedure group `make`.
+@(builtin, require_results)
+make_map_cap :: proc($T: typeid/map[$K]$E, #any_int capacity: int, allocator := context.allocator, loc := #caller_location) -> (m: T, err: Allocator_Error) #optional_allocator_error {
make_map_expr_error_loc(loc, capacity)
context.allocator = allocator
@@ -392,6 +436,7 @@ make :: proc{
make_dynamic_array_len,
make_dynamic_array_len_cap,
make_map,
+ make_map_cap,
make_multi_pointer,
make_soa_slice,
@@ -894,19 +939,7 @@ map_upsert :: proc(m: ^$T/map[$K]$V, key: K, value: V, loc := #caller_location)
@builtin
card :: proc "contextless" (s: $S/bit_set[$E; $U]) -> int {
- when size_of(S) == 1 {
- return int(intrinsics.count_ones(transmute(u8)s))
- } else when size_of(S) == 2 {
- return int(intrinsics.count_ones(transmute(u16)s))
- } else when size_of(S) == 4 {
- return int(intrinsics.count_ones(transmute(u32)s))
- } else when size_of(S) == 8 {
- return int(intrinsics.count_ones(transmute(u64)s))
- } else when size_of(S) == 16 {
- return int(intrinsics.count_ones(transmute(u128)s))
- } else {
- #panic("Unhandled card bit_set size")
- }
+ return int(intrinsics.count_ones(transmute(intrinsics.type_bit_set_underlying_type(S))s))
}
diff --git a/base/runtime/print.odin b/base/runtime/print.odin
index 45f6f01ef..c28fd593d 100644
--- a/base/runtime/print.odin
+++ b/base/runtime/print.odin
@@ -486,18 +486,6 @@ print_type :: #force_no_inline proc "contextless" (ti: ^Type_Info) {
print_u64(u64(info.count))
print_byte(']')
print_type(info.elem)
-
- case Type_Info_Relative_Pointer:
- print_string("#relative(")
- print_type(info.base_integer)
- print_string(") ")
- print_type(info.pointer)
-
- case Type_Info_Relative_Multi_Pointer:
- print_string("#relative(")
- print_type(info.base_integer)
- print_string(") ")
- print_type(info.pointer)
case Type_Info_Matrix:
print_string("matrix[")
diff --git a/bin/RAD-LICENSE b/bin/RAD-LICENSE
new file mode 100644
index 000000000..1a1ccbcd2
--- /dev/null
+++ b/bin/RAD-LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2024 Epic Games Tools
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the “Software”), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE. \ No newline at end of file
diff --git a/bin/radlink.exe b/bin/radlink.exe
new file mode 100644
index 000000000..bb2fd206e
--- /dev/null
+++ b/bin/radlink.exe
Binary files differ
diff --git a/build.bat b/build.bat
index b458c0c67..55c71ca9f 100644
--- a/build.bat
+++ b/build.bat
@@ -19,12 +19,12 @@ if "%VSCMD_ARG_TGT_ARCH%" neq "x64" (
)
)
-for /f "usebackq tokens=1,2 delims=,=- " %%i in (`wmic os get LocalDateTime /value`) do @if %%i==LocalDateTime (
- set CURR_DATE_TIME=%%j
+for /f %%i in ('powershell get-date -format "{yyyyMMdd}"') do (
+ set CURR_DATE_TIME=%%i
)
-
set curr_year=%CURR_DATE_TIME:~0,4%
set curr_month=%CURR_DATE_TIME:~4,2%
+set curr_day=%CURR_DATE_TIME:~6,2%
:: Make sure this is a decent name and not generic
set exe_name=odin.exe
@@ -45,7 +45,19 @@ if "%2" == "1" (
set nightly=0
)
-set odin_version_raw="dev-%curr_year%-%curr_month%"
+if %release_mode% equ 0 (
+ set V1=%curr_year%
+ set V2=%curr_month%
+ set V3=%curr_day%
+) else (
+ set V1=%curr_year%
+ set V2=%curr_month%
+ set V3=0
+)
+set V4=0
+set odin_version_full="%V1%.%V2%.%V3%.%V4%"
+set odin_version_raw="dev-%V1%-%V2%"
+
set compiler_flags= -nologo -Oi -TP -fp:precise -Gm- -MP -FC -EHsc- -GR- -GF
rem Parse source code as utf-8 even on shift-jis and other codepages
@@ -53,18 +65,30 @@ rem See https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-a
set compiler_flags= %compiler_flags% /utf-8
set compiler_defines= -DODIN_VERSION_RAW=\"%odin_version_raw%\"
+rem fileversion is defined as {Major,Minor,Build,Private: u16} so a bit limited
+set rc_flags=-nologo ^
+-DV1=%V1% -DV2=%V2% -DV3=%V3% -DV4=%V4% ^
+-DVF=%odin_version_full% -DNIGHTLY=%nightly%
+
+where /Q git.exe || goto skip_git_hash
if not exist .git\ goto skip_git_hash
for /f "tokens=1,2" %%i IN ('git show "--pretty=%%cd %%h" "--date=format:%%Y-%%m" --no-patch --no-notes HEAD') do (
set odin_version_raw=dev-%%i
set GIT_SHA=%%j
)
-if %ERRORLEVEL% equ 0 set compiler_defines=%compiler_defines% -DGIT_SHA=\"%GIT_SHA%\"
+if %ERRORLEVEL% equ 0 (
+ set compiler_defines=%compiler_defines% -DGIT_SHA=\"%GIT_SHA%\"
+ set rc_flags=%rc_flags% -DGIT_SHA=%GIT_SHA% -DVP=%odin_version_raw%:%GIT_SHA%
+) else (
+ set rc_flags=%rc_flags% -DVP=%odin_version_raw%
+)
:skip_git_hash
if %nightly% equ 1 set compiler_defines=%compiler_defines% -DNIGHTLY
if %release_mode% EQU 0 ( rem Debug
set compiler_flags=%compiler_flags% -Od -MDd -Z7
+ set rc_flags=%rc_flags% -D_DEBUG
) else ( rem Release
set compiler_flags=%compiler_flags% -O2 -MT -Z7
set compiler_defines=%compiler_defines% -DNO_ARRAY_BOUNDS_CHECK
@@ -82,6 +106,8 @@ set libs= ^
kernel32.lib ^
Synchronization.lib ^
bin\llvm\windows\LLVM-C.lib
+set odin_res=misc\odin.res
+set odin_rc=misc\odin.rc
rem DO NOT TOUCH!
rem THIS TILDE STUFF IS FOR DEVELOPMENT ONLY!
@@ -93,7 +119,7 @@ if %tilde_backend% EQU 1 (
rem DO NOT TOUCH!
-set linker_flags= -incremental:no -opt:ref -subsystem:console
+set linker_flags= -incremental:no -opt:ref -subsystem:console -MANIFEST:EMBED
if %release_mode% EQU 0 ( rem Debug
set linker_flags=%linker_flags% -debug /NATVIS:src\odin_compiler.natvis
@@ -102,19 +128,21 @@ if %release_mode% EQU 0 ( rem Debug
)
set compiler_settings=%compiler_includes% %compiler_flags% %compiler_warnings% %compiler_defines%
-set linker_settings=%libs% %linker_flags%
+set linker_settings=%libs% %odin_res% %linker_flags%
del *.pdb > NUL 2> NUL
del *.ilk > NUL 2> NUL
+rc %rc_flags% %odin_rc%
cl %compiler_settings% "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name%
+mt -nologo -inputresource:%exe_name%;#1 -manifest misc\odin.manifest -outputresource:%exe_name%;#1 -validate_manifest -identity:"odin, processorArchitecture=amd64, version=%odin_version_full%, type=win32"
if %errorlevel% neq 0 goto end_of_build
call build_vendor.bat
if %errorlevel% neq 0 goto end_of_build
rem If the demo doesn't run for you and your CPU is more than a decade old, try -microarch:native
-if %release_mode% EQU 0 odin run examples/demo -vet -strict-style -- Hellope World
+if %release_mode% EQU 0 odin run examples/demo -vet -strict-style -resource:examples/demo/demo.rc -- Hellope World
rem Many non-compiler devs seem to run debug build but don't realize.
if %release_mode% EQU 0 echo: & echo Debug compiler built. Note: run "build.bat release" if you want a faster, release mode compiler.
diff --git a/build_odin.sh b/build_odin.sh
index f283dc441..42ed2834f 100755
--- a/build_odin.sh
+++ b/build_odin.sh
@@ -130,7 +130,7 @@ build_odin() {
EXTRAFLAGS="-O3"
;;
release-native)
- if [ "$OS_ARCH" = "arm64" ]; then
+ if [ "$OS_ARCH" = "arm64" ] || [ "$OS_ARCH" = "aarch64" ]; then
# Use preferred flag for Arm (ie arm64 / aarch64 / etc)
EXTRAFLAGS="-O3 -mcpu=native"
else
@@ -152,9 +152,7 @@ build_odin() {
}
run_demo() {
- if [ $# -eq 0 ] || [ "$1" = "debug" ]; then
- ./odin run examples/demo -vet -strict-style -- Hellope World
- fi
+ ./odin run examples/demo -vet -strict-style -- Hellope World
}
if [ $# -eq 0 ]; then
@@ -166,14 +164,20 @@ if [ $# -eq 0 ]; then
elif [ $# -eq 1 ]; then
case $1 in
report)
- [ ! -f "./odin" ] && build_odin debug
+ if [ ! -f "./odin" ]; then
+ build_odin debug
+ run_demo
+ fi
./odin report
;;
+ debug)
+ build_odin debug
+ run_demo
+ ;;
*)
build_odin $1
;;
esac
- run_demo
else
error "Too many arguments!"
fi
diff --git a/core/c/frontend/tokenizer/tokenizer.odin b/core/c/frontend/tokenizer/tokenizer.odin
index 2415e06a0..558077717 100644
--- a/core/c/frontend/tokenizer/tokenizer.odin
+++ b/core/c/frontend/tokenizer/tokenizer.odin
@@ -291,7 +291,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool {
n -= 1
}
- if x > max || 0xd800 <= x && x <= 0xe000 {
+ if x > max || 0xd800 <= x && x <= 0xdfff {
error_offset(t, offset, "escape sequence is an invalid Unicode code point")
return false
}
diff --git a/core/c/libc/README.md b/core/c/libc/README.md
index 95053b963..08e789757 100644
--- a/core/c/libc/README.md
+++ b/core/c/libc/README.md
@@ -14,7 +14,7 @@ The following is a mostly-complete projection of the C11 standard library as def
| `<inttypes.h>` | Fully projected |
| `<iso646.h>` | Not applicable, use Odin's operators |
| `<limits.h>` | Not projected |
-| `<locale.h>` | Not projected |
+| `<locale.h>` | Fully projected |
| `<math.h>` | Mostly projected, see [limitations](#Limitations) |
| `<setjmp.h>` | Fully projected |
| `<signal.h>` | Fully projected |
@@ -70,4 +70,4 @@ with the following copyright.
```
Copyright 2021 Dale Weiler <weilercdale@gmail.com>.
-``` \ No newline at end of file
+```
diff --git a/core/c/libc/locale.odin b/core/c/libc/locale.odin
new file mode 100644
index 000000000..371d755c5
--- /dev/null
+++ b/core/c/libc/locale.odin
@@ -0,0 +1,133 @@
+package libc
+
+import "core:c"
+
+when ODIN_OS == .Windows {
+ foreign import libc "system:libucrt.lib"
+} else when ODIN_OS == .Darwin {
+ foreign import libc "system:System.framework"
+} else {
+ foreign import libc "system:c"
+}
+
+// locale.h - category macros
+
+foreign libc {
+ /*
+ Sets the components of an object with the type lconv with the values appropriate for the
+ formatting of numeric quantities (monetary and otherwise) according to the rules of the current
+ locale.
+
+ Returns: a pointer to the lconv structure, might be invalidated by subsequent calls to localeconv() and setlocale()
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/localeconv.html ]]
+ */
+ localeconv :: proc() -> ^lconv ---
+
+ /*
+ Selects the appropriate piece of the global locale, as specified by the category and locale arguments,
+ and can be used to change or query the entire global locale or portions thereof.
+
+ Returns: the current locale if `locale` is `nil`, the set locale otherwise
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/setlocale.html ]]
+ */
+ @(link_name=LSETLOCALE)
+ setlocale :: proc(category: Locale_Category, locale: cstring) -> cstring ---
+}
+
+Locale_Category :: enum c.int {
+ ALL = LC_ALL,
+ COLLATE = LC_COLLATE,
+ CTYPE = LC_CTYPE,
+ MESSAGES = LC_MESSAGES,
+ MONETARY = LC_MONETARY,
+ NUMERIC = LC_NUMERIC,
+ TIME = LC_TIME,
+}
+
+when ODIN_OS == .NetBSD {
+ @(private) LSETLOCALE :: "__setlocale50"
+} else {
+ @(private) LSETLOCALE :: "setlocale"
+}
+
+when ODIN_OS == .Windows {
+ lconv :: struct {
+ decimal_point: cstring,
+ thousand_sep: cstring,
+ grouping: cstring,
+ int_curr_symbol: cstring,
+ currency_symbol: cstring,
+ mon_decimal_points: cstring,
+ mon_thousands_sep: cstring,
+ mon_grouping: cstring,
+ positive_sign: cstring,
+ negative_sign: cstring,
+ int_frac_digits: c.char,
+ frac_digits: c.char,
+ p_cs_precedes: c.char,
+ p_sep_by_space: c.char,
+ n_cs_precedes: c.char,
+ n_sep_by_space: c.char,
+ p_sign_posn: c.char,
+ n_sign_posn: c.char,
+ _W_decimal_point: [^]u16 `fmt:"s,0"`,
+ _W_thousands_sep: [^]u16 `fmt:"s,0"`,
+ _W_int_curr_symbol: [^]u16 `fmt:"s,0"`,
+ _W_currency_symbol: [^]u16 `fmt:"s,0"`,
+ _W_mon_decimal_point: [^]u16 `fmt:"s,0"`,
+ _W_mon_thousands_sep: [^]u16 `fmt:"s,0"`,
+ _W_positive_sign: [^]u16 `fmt:"s,0"`,
+ _W_negative_sign: [^]u16 `fmt:"s,0"`,
+ }
+} else {
+ lconv :: struct {
+ decimal_point: cstring,
+ thousand_sep: cstring,
+ grouping: cstring,
+ int_curr_symbol: cstring,
+ currency_symbol: cstring,
+ mon_decimal_points: cstring,
+ mon_thousands_sep: cstring,
+ mon_grouping: cstring,
+ positive_sign: cstring,
+ negative_sign: cstring,
+ int_frac_digits: c.char,
+ frac_digits: c.char,
+ p_cs_precedes: c.char,
+ p_sep_by_space: c.char,
+ n_cs_precedes: c.char,
+ n_sep_by_space: c.char,
+ p_sign_posn: c.char,
+ n_sign_posn: c.char,
+ _int_p_cs_precedes: c.char,
+ _int_n_cs_precedes: c.char,
+ _int_p_sep_by_space: c.char,
+ _int_n_sep_by_space: c.char,
+ _int_p_sign_posn: c.char,
+ _int_n_sign_posn: c.char,
+ }
+}
+
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Windows {
+
+ LC_ALL :: 0
+ LC_COLLATE :: 1
+ LC_CTYPE :: 2
+ LC_MESSAGES :: 6
+ LC_MONETARY :: 3
+ LC_NUMERIC :: 4
+ LC_TIME :: 5
+
+} else when ODIN_OS == .Linux {
+
+ LC_CTYPE :: 0
+ LC_NUMERIC :: 1
+ LC_TIME :: 2
+ LC_COLLATE :: 3
+ LC_MONETARY :: 4
+ LC_MESSAGES :: 5
+ LC_ALL :: 6
+
+}
diff --git a/core/c/libc/stdatomic.odin b/core/c/libc/stdatomic.odin
index 8dc243b78..43a0e51df 100644
--- a/core/c/libc/stdatomic.odin
+++ b/core/c/libc/stdatomic.odin
@@ -235,7 +235,7 @@ atomic_compare_exchange_weak :: #force_inline proc(object, expected: ^$T, desire
return ok
}
-atomic_compare_exchange_weak_explicit :: #force_inline proc(object, expected: ^$T, desited: T, success, failure: memory_order) -> bool {
+atomic_compare_exchange_weak_explicit :: #force_inline proc(object, expected: ^$T, desired: T, success, failure: memory_order) -> bool {
assert(failure != .release)
assert(failure != .acq_rel)
diff --git a/core/compress/zlib/doc.odin b/core/compress/zlib/doc.odin
index 0a5b4eb40..6ae537a87 100644
--- a/core/compress/zlib/doc.odin
+++ b/core/compress/zlib/doc.odin
@@ -13,6 +13,7 @@ Example:
package main
import "core:bytes"
+ import "core:compress/zlib"
import "core:fmt"
main :: proc() {
@@ -36,7 +37,7 @@ Example:
buf: bytes.Buffer
// We can pass ", true" to inflate a raw DEFLATE stream instead of a ZLIB wrapped one.
- err := inflate(input=ODIN_DEMO, buf=&buf, expected_output_size=OUTPUT_SIZE)
+ err := zlib.inflate(input=ODIN_DEMO, buf=&buf, expected_output_size=OUTPUT_SIZE)
defer bytes.buffer_destroy(&buf)
if err != nil {
diff --git a/core/container/bit_array/bit_array.odin b/core/container/bit_array/bit_array.odin
index 9a76dc78f..85b941d12 100644
--- a/core/container/bit_array/bit_array.odin
+++ b/core/container/bit_array/bit_array.odin
@@ -259,6 +259,7 @@ Inputs:
unsafe_unset :: proc(b: ^Bit_Array, bit: int) #no_bounds_check {
b.bits[bit >> INDEX_SHIFT] &~= 1 << uint(bit & INDEX_MASK)
}
+
/*
A helper function to create a Bit Array with optional bias, in case your smallest index is non-zero (including negative).
@@ -276,22 +277,50 @@ Returns:
- ba: Allocates a bit_Array, backing data is set to `max-min / 64` indices, rounded up (eg 65 - 0 allocates for [2]u64).
*/
create :: proc(max_index: int, min_index: int = 0, allocator := context.allocator) -> (res: ^Bit_Array, ok: bool) #optional_ok {
- context.allocator = allocator
size_in_bits := max_index - min_index
if size_in_bits < 0 { return {}, false }
+ res = new(Bit_Array, allocator)
+ ok = init(res, max_index, min_index, allocator)
+ res.free_pointer = true
+
+ if !ok { free(res, allocator) }
+
+ return
+}
+
+/*
+A helper function to initialize a Bit Array with optional bias, in case your smallest index is non-zero (including negative).
+
+The range of bits created by this procedure is `min_index..<max_index`, and the
+array will be able to expand beyond `max_index` if needed.
+
+*Allocates (`make(ba.bits)`)*
+
+Inputs:
+- max_index: maximum starting index
+- min_index: minimum starting index (used as a bias)
+- allocator: (default is context.allocator)
+*/
+init :: proc(res: ^Bit_Array, max_index: int, min_index: int = 0, allocator := context.allocator) -> (ok: bool) {
+ size_in_bits := max_index - min_index
+
+ if size_in_bits < 0 { return false }
+
legs := size_in_bits >> INDEX_SHIFT
- if size_in_bits & INDEX_MASK > 0 {legs+=1}
- bits, err := make([dynamic]u64, legs)
- ok = err == mem.Allocator_Error.None
- res = new(Bit_Array)
+ if size_in_bits & INDEX_MASK > 0 { legs += 1 }
+
+ bits, err := make([dynamic]u64, legs, allocator)
+ ok = err == nil
+
res.bits = bits
res.bias = min_index
res.length = max_index - min_index
- res.free_pointer = true
+ res.free_pointer = false
return
}
+
/*
Sets all values in the Bit_Array to zero.
diff --git a/core/crypto/_chacha20/simd128/chacha20_simd128.odin b/core/crypto/_chacha20/simd128/chacha20_simd128.odin
index 2f91ac52a..fe0d0d518 100644
--- a/core/crypto/_chacha20/simd128/chacha20_simd128.odin
+++ b/core/crypto/_chacha20/simd128/chacha20_simd128.odin
@@ -51,7 +51,7 @@ _ROT_16: simd.u32x4 : {16, 16, 16, 16}
when ODIN_ENDIAN == .Big {
@(private = "file")
- _increment_counter :: #force_inline proc "contextless" (ctx: ^Context) -> simd.u32x4 {
+ _increment_counter :: #force_inline proc "contextless" (ctx: ^_chacha20.Context) -> simd.u32x4 {
// In the Big Endian case, the low and high portions in the vector
// are flipped, so the 64-bit addition can't be done with a simple
// vector add.
diff --git a/core/crypto/_sha3/sp800_185.odin b/core/crypto/_sha3/sp800_185.odin
index f32398d5c..a96f78cc1 100644
--- a/core/crypto/_sha3/sp800_185.odin
+++ b/core/crypto/_sha3/sp800_185.odin
@@ -81,16 +81,18 @@ bytepad :: proc(ctx: ^Context, x_strings: [][]byte, w: int) {
// 2. while len(z) mod 8 ≠ 0:
// z = z || 0
- // 3. while (len(z)/8) mod w ≠ 0:
+ // 3. while (len(z)/8) mod w != 0:
// z = z || 00000000
z_len := u128(z_hi) << 64 | u128(z_lo)
z_rem := int(z_len % u128(w))
- pad := _PAD[:w - z_rem]
+ if z_rem != 0 {
+ pad := _PAD[:w - z_rem]
- // We just add the padding to the state, instead of returning z.
- //
- // 4. return z.
- update(ctx, pad)
+ // We just add the padding to the state, instead of returning z.
+ //
+ // 4. return z.
+ update(ctx, pad)
+ }
}
encode_string :: #force_inline proc(ctx: ^Context, s: []byte) -> (u64, u64) {
diff --git a/core/dynlib/lib.odin b/core/dynlib/lib.odin
index 09e16002d..84675a560 100644
--- a/core/dynlib/lib.odin
+++ b/core/dynlib/lib.odin
@@ -37,8 +37,8 @@ Example:
fmt.println("The library %q was successfully loaded", LIBRARY_PATH)
}
*/
-load_library :: proc(path: string, global_symbols := false) -> (library: Library, did_load: bool) {
- return _load_library(path, global_symbols)
+load_library :: proc(path: string, global_symbols := false, allocator := context.temp_allocator) -> (library: Library, did_load: bool) {
+ return _load_library(path, global_symbols, allocator)
}
/*
@@ -98,8 +98,8 @@ Example:
}
}
*/
-symbol_address :: proc(library: Library, symbol: string) -> (ptr: rawptr, found: bool) #optional_ok {
- return _symbol_address(library, symbol)
+symbol_address :: proc(library: Library, symbol: string, allocator := context.temp_allocator) -> (ptr: rawptr, found: bool) #optional_ok {
+ return _symbol_address(library, symbol, allocator)
}
/*
@@ -174,4 +174,4 @@ initialize_symbols :: proc(
// Returns an error message for the last failed procedure call.
last_error :: proc() -> string {
return _last_error()
-} \ No newline at end of file
+}
diff --git a/core/dynlib/lib_js.odin b/core/dynlib/lib_js.odin
index 698cfee9c..b99143ba0 100644
--- a/core/dynlib/lib_js.odin
+++ b/core/dynlib/lib_js.odin
@@ -2,7 +2,9 @@
#+private
package dynlib
-_load_library :: proc(path: string, global_symbols := false) -> (Library, bool) {
+import "base:runtime"
+
+_load_library :: proc(path: string, global_symbols: bool, allocator: runtime.Allocator) -> (Library, bool) {
return nil, false
}
@@ -10,10 +12,10 @@ _unload_library :: proc(library: Library) -> bool {
return false
}
-_symbol_address :: proc(library: Library, symbol: string) -> (ptr: rawptr, found: bool) {
+_symbol_address :: proc(library: Library, symbol: string, allocator: runtime.Allocator) -> (ptr: rawptr, found: bool) {
return nil, false
}
_last_error :: proc() -> string {
return ""
-} \ No newline at end of file
+}
diff --git a/core/dynlib/lib_unix.odin b/core/dynlib/lib_unix.odin
index f467d730d..337bf496d 100644
--- a/core/dynlib/lib_unix.odin
+++ b/core/dynlib/lib_unix.odin
@@ -2,28 +2,38 @@
#+private
package dynlib
-import "core:os"
+import "base:runtime"
-_load_library :: proc(path: string, global_symbols := false) -> (Library, bool) {
- flags := os.RTLD_NOW
+import "core:strings"
+import "core:sys/posix"
+
+_load_library :: proc(path: string, global_symbols: bool, allocator: runtime.Allocator) -> (Library, bool) {
+ flags := posix.RTLD_Flags{.NOW}
if global_symbols {
- flags |= os.RTLD_GLOBAL
+ flags += {.GLOBAL}
}
- lib := os.dlopen(path, flags)
+
+ cpath := strings.clone_to_cstring(path, allocator)
+ defer delete(cpath, allocator)
+
+ lib := posix.dlopen(cpath, flags)
return Library(lib), lib != nil
}
_unload_library :: proc(library: Library) -> bool {
- return os.dlclose(rawptr(library))
+ return posix.dlclose(posix.Symbol_Table(library)) == 0
}
-_symbol_address :: proc(library: Library, symbol: string) -> (ptr: rawptr, found: bool) {
- ptr = os.dlsym(rawptr(library), symbol)
+_symbol_address :: proc(library: Library, symbol: string, allocator: runtime.Allocator) -> (ptr: rawptr, found: bool) {
+ csymbol := strings.clone_to_cstring(symbol, allocator)
+ defer delete(csymbol, allocator)
+
+ ptr = posix.dlsym(posix.Symbol_Table(library), csymbol)
found = ptr != nil
return
}
_last_error :: proc() -> string {
- err := os.dlerror()
+ err := string(posix.dlerror())
return "unknown" if err == "" else err
-} \ No newline at end of file
+}
diff --git a/core/dynlib/lib_windows.odin b/core/dynlib/lib_windows.odin
index 6c41a1a75..928a1510d 100644
--- a/core/dynlib/lib_windows.odin
+++ b/core/dynlib/lib_windows.odin
@@ -2,11 +2,13 @@
#+private
package dynlib
+import "base:runtime"
+
import win32 "core:sys/windows"
import "core:strings"
import "core:reflect"
-_load_library :: proc(path: string, global_symbols := false, allocator := context.temp_allocator) -> (Library, bool) {
+_load_library :: proc(path: string, global_symbols: bool, allocator: runtime.Allocator) -> (Library, bool) {
// NOTE(bill): 'global_symbols' is here only for consistency with POSIX which has RTLD_GLOBAL
wide_path := win32.utf8_to_wstring(path, allocator)
defer free(wide_path, allocator)
@@ -19,7 +21,7 @@ _unload_library :: proc(library: Library) -> bool {
return bool(ok)
}
-_symbol_address :: proc(library: Library, symbol: string, allocator := context.temp_allocator) -> (ptr: rawptr, found: bool) {
+_symbol_address :: proc(library: Library, symbol: string, allocator: runtime.Allocator) -> (ptr: rawptr, found: bool) {
c_str := strings.clone_to_cstring(symbol, allocator)
defer delete(c_str, allocator)
ptr = win32.GetProcAddress(cast(win32.HMODULE)library, c_str)
@@ -31,4 +33,4 @@ _last_error :: proc() -> string {
err := win32.System_Error(win32.GetLastError())
err_msg := reflect.enum_string(err)
return "unknown" if err_msg == "" else err_msg
-} \ No newline at end of file
+}
diff --git a/core/encoding/cbor/cbor.odin b/core/encoding/cbor/cbor.odin
index 692be0020..8eb829ed3 100644
--- a/core/encoding/cbor/cbor.odin
+++ b/core/encoding/cbor/cbor.odin
@@ -563,7 +563,7 @@ to_json :: proc(val: Value, allocator := context.allocator) -> (json.Value, mem.
case: return false
}
}
- return false
+ return true
}
if keys_all_strings(v) {
diff --git a/core/encoding/cbor/unmarshal.odin b/core/encoding/cbor/unmarshal.odin
index bf27171f4..c39255d9d 100644
--- a/core/encoding/cbor/unmarshal.odin
+++ b/core/encoding/cbor/unmarshal.odin
@@ -442,9 +442,6 @@ _unmarshal_array :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header
loc := #caller_location,
) -> (out_of_space: bool, err: Unmarshal_Error) {
for idx: uintptr = 0; length == -1 || idx < uintptr(length); idx += 1 {
- elem_ptr := rawptr(uintptr(da.data) + idx*uintptr(elemt.size))
- elem := any{elem_ptr, elemt.id}
-
hdr := _decode_header(d.reader) or_return
// Double size if out of capacity.
@@ -459,6 +456,10 @@ _unmarshal_array :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header
if !ok { return false, .Out_Of_Memory }
}
+ // Set ptr after potential resizes to avoid invalidation.
+ elem_ptr := rawptr(uintptr(da.data) + idx*uintptr(elemt.size))
+ elem := any{elem_ptr, elemt.id}
+
err = _unmarshal_value(d, elem, hdr, allocator=allocator, loc=loc)
if length == -1 && err == .Break { break }
if err != nil { return }
@@ -509,7 +510,7 @@ _unmarshal_array :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header
raw := (^mem.Raw_Dynamic_Array)(v.data)
raw.data = raw_data(data)
raw.len = 0
- raw.cap = length
+ raw.cap = scap
raw.allocator = context.allocator
_ = assign_array(d, raw, t.elem, length) or_return
@@ -627,7 +628,8 @@ _unmarshal_map :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header,
unknown := length == -1
fields := reflect.struct_fields_zipped(ti.id)
- for idx := 0; idx < len(fields) && (unknown || idx < length); idx += 1 {
+ idx := 0
+ for ; idx < len(fields) && (unknown || idx < length); idx += 1 {
// Decode key, keys can only be strings.
key: string
if keyv, kerr := decode_key(d, v, context.temp_allocator); unknown && kerr == .Break {
@@ -662,6 +664,8 @@ _unmarshal_map :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header,
// Skips unused map entries.
if use_field_idx < 0 {
+ val := err_conv(_decode_from_decoder(d, allocator=context.temp_allocator)) or_return
+ destroy(val, context.temp_allocator)
continue
}
}
@@ -672,6 +676,17 @@ _unmarshal_map :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header,
fany := any{ptr, field.type.id}
_unmarshal_value(d, fany, _decode_header(r) or_return) or_return
}
+
+ // If there are fields left in the map that did not get decoded into the struct, decode and discard them.
+ if !unknown {
+ for _ in idx..<length {
+ key := err_conv(_decode_from_decoder(d, allocator=context.temp_allocator)) or_return
+ destroy(key, context.temp_allocator)
+ val := err_conv(_decode_from_decoder(d, allocator=context.temp_allocator)) or_return
+ destroy(val, context.temp_allocator)
+ }
+ }
+
return
case reflect.Type_Info_Map:
diff --git a/core/encoding/hxa/read.odin b/core/encoding/hxa/read.odin
index 5c8503229..a679946f8 100644
--- a/core/encoding/hxa/read.odin
+++ b/core/encoding/hxa/read.odin
@@ -117,7 +117,7 @@ read :: proc(data: []byte, filename := "<input>", print_error := false, allocato
layer.name = read_name(r) or_return
layer.components = read_value(r, u8) or_return
type := read_value(r, Layer_Data_Type) or_return
- if type > max(type) {
+ if type > max(Layer_Data_Type) {
if r.print_error {
fmt.eprintf("HxA Error: file '%s' has layer data type %d. Maximum value is %d\n",
r.filename, u8(type), u8(max(Layer_Data_Type)))
diff --git a/core/encoding/ini/ini.odin b/core/encoding/ini/ini.odin
index 2bb7996a3..c32b1deb5 100644
--- a/core/encoding/ini/ini.odin
+++ b/core/encoding/ini/ini.odin
@@ -154,6 +154,7 @@ write_section :: proc(w: io.Writer, name: string, n_written: ^int = nil) -> (n:
io.write_byte (w, '[', &n) or_return
io.write_string(w, name, &n) or_return
io.write_byte (w, ']', &n) or_return
+ io.write_byte (w, '\n', &n) or_return
return
}
diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin
index 009bf7ade..f0f0927a1 100644
--- a/core/encoding/json/marshal.odin
+++ b/core/encoding/json/marshal.odin
@@ -192,12 +192,6 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err:
case runtime.Type_Info_Simd_Vector:
return .Unsupported_Type
-
- case runtime.Type_Info_Relative_Pointer:
- return .Unsupported_Type
-
- case runtime.Type_Info_Relative_Multi_Pointer:
- return .Unsupported_Type
case runtime.Type_Info_Matrix:
return .Unsupported_Type
diff --git a/core/encoding/json/unmarshal.odin b/core/encoding/json/unmarshal.odin
index 738e20c68..ea33badae 100644
--- a/core/encoding/json/unmarshal.odin
+++ b/core/encoding/json/unmarshal.odin
@@ -172,20 +172,33 @@ assign_float :: proc(val: any, f: $T) -> bool {
@(private)
-unmarshal_string_token :: proc(p: ^Parser, val: any, str: string, ti: ^reflect.Type_Info) -> bool {
+unmarshal_string_token :: proc(p: ^Parser, val: any, str: string, ti: ^reflect.Type_Info) -> (ok: bool, err: Error) {
val := val
switch &dst in val {
case string:
dst = str
- return true
+ return true, nil
case cstring:
if str == "" {
- dst = strings.clone_to_cstring("", p.allocator)
+ a_err: runtime.Allocator_Error
+ dst, a_err = strings.clone_to_cstring("", p.allocator)
+ #partial switch a_err {
+ case nil:
+ // okay
+ case .Out_Of_Memory:
+ err = .Out_Of_Memory
+ case:
+ err = .Invalid_Allocator
+ }
+ if err != nil {
+ return
+ }
} else {
// NOTE: This is valid because 'clone_string' appends a NUL terminator
dst = cstring(raw_data(str))
}
- return true
+ ok = true
+ return
}
#partial switch variant in ti.variant {
@@ -193,31 +206,37 @@ unmarshal_string_token :: proc(p: ^Parser, val: any, str: string, ti: ^reflect.T
for name, i in variant.names {
if name == str {
assign_int(val, variant.values[i])
- return true
+ return true, nil
}
}
// TODO(bill): should this be an error or not?
- return true
+ return true, nil
case reflect.Type_Info_Integer:
- i := strconv.parse_i128(str) or_return
+ i, pok := strconv.parse_i128(str)
+ if !pok {
+ return false, nil
+ }
if assign_int(val, i) {
- return true
+ return true, nil
}
if assign_float(val, i) {
- return true
+ return true, nil
}
case reflect.Type_Info_Float:
- f := strconv.parse_f64(str) or_return
+ f, pok := strconv.parse_f64(str)
+ if !pok {
+ return false, nil
+ }
if assign_int(val, f) {
- return true
+ return true, nil
}
if assign_float(val, f) {
- return true
+ return true, nil
}
}
- return false
+ return false, nil
}
@@ -304,7 +323,7 @@ unmarshal_value :: proc(p: ^Parser, v: any) -> (err: Unmarshal_Error) {
case .Ident:
advance_token(p)
if p.spec == .MJSON {
- if unmarshal_string_token(p, any{v.data, ti.id}, token.text, ti) {
+ if unmarshal_string_token(p, any{v.data, ti.id}, token.text, ti) or_return {
return nil
}
}
@@ -312,13 +331,18 @@ unmarshal_value :: proc(p: ^Parser, v: any) -> (err: Unmarshal_Error) {
case .String:
advance_token(p)
- str := unquote_string(token, p.spec, p.allocator) or_return
- if unmarshal_string_token(p, any{v.data, ti.id}, str, ti) {
- return nil
+ str := unquote_string(token, p.spec, p.allocator) or_return
+ dest := any{v.data, ti.id}
+ if !(unmarshal_string_token(p, dest, str, ti) or_return) {
+ delete(str, p.allocator)
+ return UNSUPPORTED_TYPE
}
- delete(str, p.allocator)
- return UNSUPPORTED_TYPE
+ switch destv in dest {
+ case string, cstring:
+ case: delete(str, p.allocator)
+ }
+ return nil
case .Open_Brace:
return unmarshal_object(p, v, .Close_Brace)
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin
index 0d11ad8a9..49e9f2e6d 100644
--- a/core/fmt/fmt.odin
+++ b/core/fmt/fmt.odin
@@ -1531,7 +1531,7 @@ fmt_pointer :: proc(fi: ^Info, p: rawptr, verb: rune) {
case 'o': _fmt_int(fi, u, 8, false, 8*size_of(rawptr), __DIGITS_UPPER)
case 'i', 'd': _fmt_int(fi, u, 10, false, 8*size_of(rawptr), __DIGITS_UPPER)
case 'z': _fmt_int(fi, u, 12, false, 8*size_of(rawptr), __DIGITS_UPPER)
- case 'x': _fmt_int(fi, u, 16, false, 8*size_of(rawptr), __DIGITS_UPPER)
+ case 'x': _fmt_int(fi, u, 16, false, 8*size_of(rawptr), __DIGITS_LOWER)
case 'X': _fmt_int(fi, u, 16, false, 8*size_of(rawptr), __DIGITS_UPPER)
case:
@@ -3002,18 +3002,6 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
case runtime.Type_Info_Bit_Set:
fmt_bit_set(fi, v, verb = verb)
- case runtime.Type_Info_Relative_Pointer:
- ptr := reflect.relative_pointer_to_absolute_raw(v.data, info.base_integer.id)
- absolute_ptr := any{ptr, info.pointer.id}
-
- fmt_value(fi, absolute_ptr, verb)
-
- case runtime.Type_Info_Relative_Multi_Pointer:
- ptr := reflect.relative_pointer_to_absolute_raw(v.data, info.base_integer.id)
- absolute_ptr := any{ptr, info.pointer.id}
-
- fmt_value(fi, absolute_ptr, verb)
-
case runtime.Type_Info_Matrix:
fmt_matrix(fi, v, verb, info)
diff --git a/core/image/general.odin b/core/image/general.odin
index 17a8f35ea..c4a884071 100644
--- a/core/image/general.odin
+++ b/core/image/general.odin
@@ -23,7 +23,15 @@ register :: proc(kind: Which_File_Type, loader: Loader_Proc, destroyer: Destroy_
load_from_bytes :: proc(data: []byte, options := Options{}, allocator := context.allocator) -> (img: ^Image, err: Error) {
loader := _internal_loaders[which(data)]
if loader == nil {
- return nil, .Unsupported_Format
+
+ // Check if there is at least one loader, otherwise panic to let the user know about misuse.
+ for a_loader in _internal_loaders {
+ if a_loader != nil {
+ return nil, .Unsupported_Format
+ }
+ }
+
+ panic("image.load called when no image loaders are registered. Register a loader by first importing a subpackage (eg: `import \"core:image/png\"`), or with image.register")
}
return loader(data, options, allocator)
}
@@ -185,7 +193,7 @@ which_bytes :: proc(data: []byte) -> Which_File_Type {
return .HDR
case s[:4] == "\x38\x42\x50\x53":
return .PSD
- case s[:4] != "\x53\x80\xF6\x34" && s[88:92] == "PICT":
+ case s[:4] == "\x53\x80\xF6\x34" && s[88:92] == "PICT":
return .PIC
case s[:4] == "\x69\x63\x6e\x73":
return .ICNS
diff --git a/core/io/util.odin b/core/io/util.odin
index e65a69fb3..296be7bc0 100644
--- a/core/io/util.odin
+++ b/core/io/util.odin
@@ -225,7 +225,7 @@ write_escaped_rune :: proc(w: Writer, r: rune, quote: byte, html_safe := false,
} else {
write_byte(w, '\\', &n) or_return
write_byte(w, 'U', &n) or_return
- for s := 24; s >= 0; s -= 4 {
+ for s := 28; s >= 0; s -= 4 {
write_byte(w, DIGITS_LOWER[c>>uint(s) & 0xf], &n) or_return
}
}
diff --git a/core/math/linalg/general.odin b/core/math/linalg/general.odin
index 7587ad63f..f82d75bff 100644
--- a/core/math/linalg/general.odin
+++ b/core/math/linalg/general.odin
@@ -53,15 +53,15 @@ vector_dot :: proc "contextless" (a, b: $T/[$N]$E) -> (c: E) where IS_NUMERIC(E)
}
@(require_results)
quaternion64_dot :: proc "contextless" (a, b: $T/quaternion64) -> (c: f16) {
- return a.w*a.w + a.x*b.x + a.y*b.y + a.z*b.z
+ return a.w*b.w + a.x*b.x + a.y*b.y + a.z*b.z
}
@(require_results)
quaternion128_dot :: proc "contextless" (a, b: $T/quaternion128) -> (c: f32) {
- return a.w*a.w + a.x*b.x + a.y*b.y + a.z*b.z
+ return a.w*b.w + a.x*b.x + a.y*b.y + a.z*b.z
}
@(require_results)
quaternion256_dot :: proc "contextless" (a, b: $T/quaternion256) -> (c: f64) {
- return a.w*a.w + a.x*b.x + a.y*b.y + a.z*b.z
+ return a.w*b.w + a.x*b.x + a.y*b.y + a.z*b.z
}
dot :: proc{scalar_dot, vector_dot, quaternion64_dot, quaternion128_dot, quaternion256_dot}
diff --git a/core/math/math_sincos.odin b/core/math/math_sincos.odin
index b616f410d..9b4d3de40 100644
--- a/core/math/math_sincos.odin
+++ b/core/math/math_sincos.odin
@@ -189,12 +189,12 @@ sincos_f64 :: proc "contextless" (x: f64) -> (sin, cos: f64) #no_bounds_check {
// sin coefficients
@(private="file")
_sin := [?]f64{
- 0h3de5d8fd1fd19ccd, // 1.58962301576546568060e-10
- 0hbe5ae5e5a9291f5d, // -2.50507477628578072866e-8
- 0h3ec71de3567d48a1, // 2.75573136213857245213e-6
- 0hbf2a01a019bfdf03, // -1.98412698295895385996e-4
- 0h3f8111111110f7d0, // 8.33333333332211858878e-3
- 0hbfc5555555555548, // -1.66666666666666307295e-1
+ 0h3de5d8fd1fd19ccd, // 1.58962301576546568060e-10
+ 0hbe5ae5e5a9291f5d, // -2.50507477628578072866e-8
+ 0h3ec71de3567d48a1, // 2.75573136213857245213e-6
+ 0hbf2a01a019bfdf03, // -1.98412698295895385996e-4
+ 0h3f8111111110f7d0, // 8.33333333332211858878e-3
+ 0hbfc5555555555548, // -1.66666666666666307295e-1
}
// cos coefficients
diff --git a/core/math/rand/rand.odin b/core/math/rand/rand.odin
index 61301cf8a..474277e84 100644
--- a/core/math/rand/rand.odin
+++ b/core/math/rand/rand.odin
@@ -670,20 +670,69 @@ choice :: proc(array: $T/[]$E, gen := context.random_generator) -> (res: E) {
@(require_results)
-choice_enum :: proc($T: typeid, gen := context.random_generator) -> T
- where
- intrinsics.type_is_enum(T),
- size_of(T) <= 8,
- len(T) == cap(T) /* Only allow contiguous enum types */ \
-{
- when intrinsics.type_is_unsigned(intrinsics.type_core_type(T)) &&
- u64(max(T)) > u64(max(i64)) {
- i := uint64(gen) % u64(len(T))
- i += u64(min(T))
- return T(i)
+choice_enum :: proc($T: typeid, gen := context.random_generator) -> T where intrinsics.type_is_enum(T) {
+ when size_of(T) <= 8 && len(T) == cap(T) {
+ when intrinsics.type_is_unsigned(intrinsics.type_core_type(T)) &&
+ u64(max(T)) > u64(max(i64)) {
+ i := uint64(gen) % u64(len(T))
+ i += u64(min(T))
+ return T(i)
+ } else {
+ i := int63_max(i64(len(T)), gen)
+ i += i64(min(T))
+ return T(i)
+ }
} else {
- i := int63_max(i64(len(T)), gen)
- i += i64(min(T))
- return T(i)
+ values := runtime.type_info_base(type_info_of(T)).variant.(runtime.Type_Info_Enum).values
+ return T(choice(values))
+ }
+}
+
+/*
+Returns a random *set* bit from the provided `bit_set`.
+
+Inputs:
+- set: The `bit_set` to choose a random set bit from
+
+Returns:
+- res: The randomly selected bit, or the zero value if `ok` is `false`
+- ok: Whether the bit_set was not empty and thus `res` is actually a random set bit
+
+Example:
+ import "core:math/rand"
+ import "core:fmt"
+
+ choice_bit_set_example :: proc() {
+ Flags :: enum {
+ A,
+ B = 10,
+ C,
+ }
+
+ fmt.println(rand.choice_bit_set(bit_set[Flags]{}))
+ fmt.println(rand.choice_bit_set(bit_set[Flags]{.B}))
+ fmt.println(rand.choice_bit_set(bit_set[Flags]{.B, .C}))
+ fmt.println(rand.choice_bit_set(bit_set[0..<15]{5, 1, 4}))
}
-} \ No newline at end of file
+
+Possible Output:
+ A false
+ B true
+ C true
+ 5 true
+*/
+@(require_results)
+choice_bit_set :: proc(set: $T/bit_set[$E], gen := context.random_generator) -> (res: E, ok: bool) {
+ total_set := card(set)
+ if total_set == 0 {
+ return {}, false
+ }
+
+ core_set := transmute(intrinsics.type_bit_set_underlying_type(T))set
+
+ for target := int_max(total_set, gen); target > 0; target -= 1 {
+ core_set &= core_set - 1
+ }
+
+ return E(intrinsics.count_trailing_zeros(core_set)), true
+}
diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin
index d729b902c..13d509f1e 100644
--- a/core/mem/allocators.odin
+++ b/core/mem/allocators.odin
@@ -14,16 +14,16 @@ but an attempt to allocate memory is not an error.
nil_allocator :: proc() -> Allocator {
return Allocator{
procedure = nil_allocator_proc,
- data = nil,
+ data = nil,
}
}
nil_allocator_proc :: proc(
- allocator_data: rawptr,
- mode: Allocator_Mode,
+ allocator_data: rawptr,
+ mode: Allocator_Mode,
size, alignment: int,
- old_memory: rawptr,
- old_size: int,
+ old_memory: rawptr,
+ old_size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
return nil, nil
@@ -41,7 +41,7 @@ not be allocated, and an attempt to allocate memory is an error.
panic_allocator :: proc() -> Allocator {
return Allocator{
procedure = panic_allocator_proc,
- data = nil,
+ data = nil,
}
}
@@ -157,10 +157,10 @@ This procedure returns a pointer to the newly allocated memory region.
*/
@(require_results)
arena_alloc :: proc(
- a: ^Arena,
+ a: ^Arena,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := arena_alloc_bytes(a, size, alignment, loc)
return raw_data(bytes), err
@@ -175,10 +175,10 @@ This procedure returns a slice of the newly allocated memory region.
*/
@(require_results)
arena_alloc_bytes :: proc(
- a: ^Arena,
+ a: ^Arena,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
bytes, err := arena_alloc_bytes_non_zeroed(a, size, alignment, loc)
if bytes != nil {
@@ -197,10 +197,10 @@ memory region.
*/
@(require_results)
arena_alloc_non_zeroed :: proc(
- a: ^Arena,
+ a: ^Arena,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := arena_alloc_bytes_non_zeroed(a, size, alignment, loc)
return raw_data(bytes), err
@@ -216,10 +216,10 @@ memory region.
*/
@(require_results)
arena_alloc_bytes_non_zeroed :: proc(
- a: ^Arena,
+ a: ^Arena,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> ([]byte, Allocator_Error) {
if a.data == nil {
panic("Arena is not initialized", loc)
@@ -244,11 +244,11 @@ arena_free_all :: proc(a: ^Arena) {
arena_allocator_proc :: proc(
allocator_data: rawptr,
- mode: Allocator_Mode,
- size: int,
- alignment: int,
- old_memory: rawptr,
- old_size: int,
+ mode: Allocator_Mode,
+ size: int,
+ alignment: int,
+ old_memory: rawptr,
+ old_size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
arena := cast(^Arena)allocator_data
@@ -398,10 +398,10 @@ returns a pointer to the allocated memory region.
*/
@(require_results)
scratch_alloc :: proc(
- s: ^Scratch,
+ s: ^Scratch,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := scratch_alloc_bytes(s, size, alignment, loc)
return raw_data(bytes), err
@@ -416,10 +416,10 @@ returns a slice of the allocated memory region.
*/
@(require_results)
scratch_alloc_bytes :: proc(
- s: ^Scratch,
+ s: ^Scratch,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
bytes, err := scratch_alloc_bytes_non_zeroed(s, size, alignment, loc)
if bytes != nil {
@@ -437,10 +437,10 @@ This procedure returns a pointer to the allocated memory region.
*/
@(require_results)
scratch_alloc_non_zeroed :: proc(
- s: ^Scratch,
+ s: ^Scratch,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := scratch_alloc_bytes_non_zeroed(s, size, alignment, loc)
return raw_data(bytes), err
@@ -455,10 +455,10 @@ This procedure returns a slice of the allocated memory region.
*/
@(require_results)
scratch_alloc_bytes_non_zeroed :: proc(
- s: ^Scratch,
+ s: ^Scratch,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
if s.data == nil {
DEFAULT_BACKING_SIZE :: 4 * Megabyte
@@ -477,7 +477,7 @@ scratch_alloc_bytes_non_zeroed :: proc(
offset = 0
}
start := uintptr(raw_data(s.data))
- ptr := align_forward_uintptr(offset+start, uintptr(alignment))
+ ptr := align_forward_uintptr(offset+start, uintptr(alignment))
s.prev_allocation = rawptr(ptr)
s.curr_offset = int(offset) + size
return byte_slice(rawptr(ptr), size), nil
@@ -574,12 +574,12 @@ This procedure returns the pointer to the resized memory region.
*/
@(require_results)
scratch_resize :: proc(
- s: ^Scratch,
+ s: ^Scratch,
old_memory: rawptr,
- old_size: int,
- size: int,
+ old_size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> (rawptr, Allocator_Error) {
bytes, err := scratch_resize_bytes(s, byte_slice(old_memory, old_size), size, alignment, loc)
return raw_data(bytes), err
@@ -603,11 +603,11 @@ This procedure returns the slice of the resized memory region.
*/
@(require_results)
scratch_resize_bytes :: proc(
- s: ^Scratch,
+ s: ^Scratch,
old_data: []byte,
- size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> ([]byte, Allocator_Error) {
bytes, err := scratch_resize_bytes_non_zeroed(s, old_data, size, alignment, loc)
if bytes != nil && size > len(old_data) {
@@ -634,12 +634,12 @@ This procedure returns the pointer to the resized memory region.
*/
@(require_results)
scratch_resize_non_zeroed :: proc(
- s: ^Scratch,
+ s: ^Scratch,
old_memory: rawptr,
- old_size: int,
- size: int,
+ old_size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> (rawptr, Allocator_Error) {
bytes, err := scratch_resize_bytes_non_zeroed(s, byte_slice(old_memory, old_size), size, alignment, loc)
return raw_data(bytes), err
@@ -663,11 +663,11 @@ This procedure returns the slice of the resized memory region.
*/
@(require_results)
scratch_resize_bytes_non_zeroed :: proc(
- s: ^Scratch,
+ s: ^Scratch,
old_data: []byte,
- size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> ([]byte, Allocator_Error) {
old_memory := raw_data(old_data)
old_size := len(old_data)
@@ -678,8 +678,8 @@ scratch_resize_bytes_non_zeroed :: proc(
}
scratch_init(s, DEFAULT_BACKING_SIZE)
}
- begin := uintptr(raw_data(s.data))
- end := begin + uintptr(len(s.data))
+ begin := uintptr(raw_data(s.data))
+ end := begin + uintptr(len(s.data))
old_ptr := uintptr(old_memory)
if begin <= old_ptr && old_ptr < end && old_ptr+uintptr(size) < end {
s.curr_offset = int(old_ptr-begin)+size
@@ -695,11 +695,11 @@ scratch_resize_bytes_non_zeroed :: proc(
}
scratch_allocator_proc :: proc(
- allocator_data: rawptr,
- mode: Allocator_Mode,
+ allocator_data: rawptr,
+ mode: Allocator_Mode,
size, alignment: int,
- old_memory: rawptr,
- old_size: int,
+ old_memory: rawptr,
+ old_size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
s := (^Scratch)(allocator_data)
@@ -735,10 +735,10 @@ scratch_allocator_proc :: proc(
Stack allocator data.
*/
Stack :: struct {
- data: []byte,
+ data: []byte,
prev_offset: int,
curr_offset: int,
- peak_used: int,
+ peak_used: int,
}
/*
@@ -769,7 +769,7 @@ previous allocation header.
stack_allocator :: proc(stack: ^Stack) -> Allocator {
return Allocator{
procedure = stack_allocator_proc,
- data = stack,
+ data = stack,
}
}
@@ -780,18 +780,18 @@ This procedure initializes the stack allocator with a backing buffer specified
by `data` parameter.
*/
stack_init :: proc(s: ^Stack, data: []byte) {
- s.data = data
+ s.data = data
s.prev_offset = 0
s.curr_offset = 0
- s.peak_used = 0
+ s.peak_used = 0
}
@(deprecated="prefer 'mem.stack_init'")
init_stack :: proc(s: ^Stack, data: []byte) {
- s.data = data
+ s.data = data
s.prev_offset = 0
s.curr_offset = 0
- s.peak_used = 0
+ s.peak_used = 0
}
/*
@@ -803,10 +803,10 @@ procedure returns the pointer to the allocated memory.
*/
@(require_results)
stack_alloc :: proc(
- s: ^Stack,
+ s: ^Stack,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> (rawptr, Allocator_Error) {
bytes, err := stack_alloc_bytes(s, size, alignment, loc)
return raw_data(bytes), err
@@ -821,10 +821,10 @@ procedure returns the slice of the allocated memory.
*/
@(require_results)
stack_alloc_bytes :: proc(
- s: ^Stack,
+ s: ^Stack,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> ([]byte, Allocator_Error) {
bytes, err := stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
if bytes != nil {
@@ -842,10 +842,10 @@ zero-initialized. This procedure returns the pointer to the allocated memory.
*/
@(require_results)
stack_alloc_non_zeroed :: proc(
- s: ^Stack,
+ s: ^Stack,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> (rawptr, Allocator_Error) {
bytes, err := stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
return raw_data(bytes), err
@@ -860,10 +860,10 @@ zero-initialized. This procedure returns the slice of the allocated memory.
*/
@(require_results)
stack_alloc_bytes_non_zeroed :: proc(
- s: ^Stack,
+ s: ^Stack,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location
+ loc := #caller_location
) -> ([]byte, Allocator_Error) {
if s.data == nil {
panic("Stack allocation on an uninitialized stack allocator", loc)
@@ -896,7 +896,7 @@ If the freeing does is an out of order freeing, the `.Invalid_Pointer` error
is returned.
*/
stack_free :: proc(
- s: ^Stack,
+ s: ^Stack,
old_memory: rawptr,
loc := #caller_location,
) -> (Allocator_Error) {
@@ -953,12 +953,12 @@ This procedure returns the pointer to the resized memory region.
*/
@(require_results)
stack_resize :: proc(
- s: ^Stack,
+ s: ^Stack,
old_memory: rawptr,
- old_size: int,
- size: int,
+ old_size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := stack_resize_bytes(s, byte_slice(old_memory, old_size), size, alignment)
return raw_data(bytes), err
@@ -982,11 +982,11 @@ This procedure returns the slice of the resized memory region.
*/
@(require_results)
stack_resize_bytes :: proc(
- s: ^Stack,
+ s: ^Stack,
old_data: []byte,
- size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
bytes, err := stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
if bytes != nil {
@@ -1017,12 +1017,12 @@ This procedure returns the pointer to the resized memory region.
*/
@(require_results)
stack_resize_non_zeroed :: proc(
- s: ^Stack,
+ s: ^Stack,
old_memory: rawptr,
- old_size: int,
- size: int,
+ old_size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := stack_resize_bytes_non_zeroed(s, byte_slice(old_memory, old_size), size, alignment)
return raw_data(bytes), err
@@ -1046,11 +1046,11 @@ This procedure returns the slice of the resized memory region.
*/
@(require_results)
stack_resize_bytes_non_zeroed :: proc(
- s: ^Stack,
+ s: ^Stack,
old_data: []byte,
- size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
old_memory := raw_data(old_data)
old_size := len(old_data)
@@ -1063,8 +1063,8 @@ stack_resize_bytes_non_zeroed :: proc(
if size == 0 {
return nil, nil
}
- start := uintptr(raw_data(s.data))
- end := start + uintptr(len(s.data))
+ start := uintptr(raw_data(s.data))
+ end := start + uintptr(len(s.data))
curr_addr := uintptr(old_memory)
if !(start <= curr_addr && curr_addr < end) {
panic("Out of bounds memory address passed to stack allocator (resize)")
@@ -1097,11 +1097,11 @@ stack_resize_bytes_non_zeroed :: proc(
stack_allocator_proc :: proc(
allocator_data: rawptr,
- mode: Allocator_Mode,
- size: int,
- alignment: int,
- old_memory: rawptr,
- old_size: int,
+ mode: Allocator_Mode,
+ size: int,
+ alignment: int,
+ old_memory: rawptr,
+ old_size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
s := cast(^Stack)allocator_data
@@ -1200,10 +1200,10 @@ returns a pointer to the allocated memory region.
*/
@(require_results)
small_stack_alloc :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := small_stack_alloc_bytes(s, size, alignment, loc)
return raw_data(bytes), err
@@ -1218,10 +1218,10 @@ returns a slice of the allocated memory region.
*/
@(require_results)
small_stack_alloc_bytes :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
bytes, err := small_stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
if bytes != nil {
@@ -1239,10 +1239,10 @@ procedure returns a pointer to the allocated memory region.
*/
@(require_results)
small_stack_alloc_non_zeroed :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := small_stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
return raw_data(bytes), err
@@ -1257,10 +1257,10 @@ procedure returns a slice of the allocated memory region.
*/
@(require_results)
small_stack_alloc_bytes_non_zeroed :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
if s.data == nil {
panic("Small stack is not initialized", loc)
@@ -1289,7 +1289,7 @@ by `alignment`. The allocated memory is not explicitly zero-initialized. This
procedure returns a slice of the allocated memory region.
*/
small_stack_free :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
old_memory: rawptr,
loc := #caller_location,
) -> Allocator_Error {
@@ -1341,12 +1341,12 @@ This procedure returns the pointer to the resized memory region.
*/
@(require_results)
small_stack_resize :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
old_memory: rawptr,
- old_size: int,
- size: int,
+ old_size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := small_stack_resize_bytes(s, byte_slice(old_memory, old_size), size, alignment, loc)
return raw_data(bytes), err
@@ -1370,11 +1370,11 @@ This procedure returns the slice of the resized memory region.
*/
@(require_results)
small_stack_resize_bytes :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
old_data: []byte,
- size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
bytes, err := small_stack_resize_bytes_non_zeroed(s, old_data, size, alignment, loc)
if bytes != nil {
@@ -1405,12 +1405,12 @@ This procedure returns the pointer to the resized memory region.
*/
@(require_results)
small_stack_resize_non_zeroed :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
old_memory: rawptr,
- old_size: int,
- size: int,
+ old_size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := small_stack_resize_bytes_non_zeroed(s, byte_slice(old_memory, old_size), size, alignment, loc)
return raw_data(bytes), err
@@ -1434,18 +1434,18 @@ This procedure returns the slice of the resized memory region.
*/
@(require_results)
small_stack_resize_bytes_non_zeroed :: proc(
- s: ^Small_Stack,
+ s: ^Small_Stack,
old_data: []byte,
- size: int,
+ size: int,
alignment := DEFAULT_ALIGNMENT,
- loc := #caller_location,
+ loc := #caller_location,
) -> ([]byte, Allocator_Error) {
if s.data == nil {
panic("Small stack is not initialized", loc)
}
old_memory := raw_data(old_data)
- old_size := len(old_data)
- alignment := alignment
+ old_size := len(old_data)
+ alignment := alignment
alignment = clamp(alignment, 1, 8*size_of(Stack_Allocation_Header{}.padding)/2)
if old_memory == nil {
return small_stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
@@ -1453,8 +1453,8 @@ small_stack_resize_bytes_non_zeroed :: proc(
if size == 0 {
return nil, nil
}
- start := uintptr(raw_data(s.data))
- end := start + uintptr(len(s.data))
+ start := uintptr(raw_data(s.data))
+ end := start + uintptr(len(s.data))
curr_addr := uintptr(old_memory)
if !(start <= curr_addr && curr_addr < end) {
// panic("Out of bounds memory address passed to stack allocator (resize)");
@@ -1476,11 +1476,11 @@ small_stack_resize_bytes_non_zeroed :: proc(
}
small_stack_allocator_proc :: proc(
- allocator_data: rawptr,
- mode: Allocator_Mode,
- size, alignment: int,
- old_memory: rawptr,
- old_size: int,
+ allocator_data: rawptr,
+ mode: Allocator_Mode,
+ size, alignment: int,
+ old_memory: rawptr,
+ old_size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
s := cast(^Small_Stack)allocator_data
@@ -1514,17 +1514,17 @@ small_stack_allocator_proc :: proc(
/* Preserved for compatibility */
-Dynamic_Pool :: Dynamic_Arena
-DYNAMIC_POOL_BLOCK_SIZE_DEFAULT :: DYNAMIC_ARENA_BLOCK_SIZE_DEFAULT
+Dynamic_Pool :: Dynamic_Arena
+DYNAMIC_POOL_BLOCK_SIZE_DEFAULT :: DYNAMIC_ARENA_BLOCK_SIZE_DEFAULT
DYNAMIC_POOL_OUT_OF_BAND_SIZE_DEFAULT :: DYNAMIC_ARENA_OUT_OF_BAND_SIZE_DEFAULT
-dynamic_pool_allocator_proc :: dynamic_arena_allocator_proc
-dynamic_pool_free_all :: dynamic_arena_free_all
-dynamic_pool_reset :: dynamic_arena_reset
-dynamic_pool_alloc_bytes :: dynamic_arena_alloc_bytes
-dynamic_pool_alloc :: dynamic_arena_alloc
-dynamic_pool_init :: dynamic_arena_init
-dynamic_pool_allocator :: dynamic_arena_allocator
-dynamic_pool_destroy :: dynamic_arena_destroy
+dynamic_pool_allocator_proc :: dynamic_arena_allocator_proc
+dynamic_pool_free_all :: dynamic_arena_free_all
+dynamic_pool_reset :: dynamic_arena_reset
+dynamic_pool_alloc_bytes :: dynamic_arena_alloc_bytes
+dynamic_pool_alloc :: dynamic_arena_alloc
+dynamic_pool_init :: dynamic_arena_init
+dynamic_pool_allocator :: dynamic_arena_allocator
+dynamic_pool_destroy :: dynamic_arena_destroy
/*
Default block size for dynamic arena.
@@ -1540,16 +1540,16 @@ DYNAMIC_ARENA_OUT_OF_BAND_SIZE_DEFAULT :: 6554
Dynamic arena allocator data.
*/
Dynamic_Arena :: struct {
- block_size: int,
- out_band_size: int,
- alignment: int,
- unused_blocks: [dynamic]rawptr,
- used_blocks: [dynamic]rawptr,
+ block_size: int,
+ out_band_size: int,
+ alignment: int,
+ unused_blocks: [dynamic]rawptr,
+ used_blocks: [dynamic]rawptr,
out_band_allocations: [dynamic]rawptr,
- current_block: rawptr,
- current_pos: rawptr,
- bytes_left: int,
- block_allocator: Allocator,
+ current_block: rawptr,
+ current_pos: rawptr,
+ bytes_left: int,
+ block_allocator: Allocator,
}
/*
@@ -1565,17 +1565,17 @@ dynamic_arena_init :: proc(
pool: ^Dynamic_Arena,
block_allocator := context.allocator,
array_allocator := context.allocator,
- block_size := DYNAMIC_ARENA_BLOCK_SIZE_DEFAULT,
- out_band_size := DYNAMIC_ARENA_OUT_OF_BAND_SIZE_DEFAULT,
- alignment := DEFAULT_ALIGNMENT,
+ block_size := DYNAMIC_ARENA_BLOCK_SIZE_DEFAULT,
+ out_band_size := DYNAMIC_ARENA_OUT_OF_BAND_SIZE_DEFAULT,
+ alignment := DEFAULT_ALIGNMENT,
) {
- pool.block_size = block_size
- pool.out_band_size = out_band_size
- pool.alignment = alignment
- pool.block_allocator = block_allocator
+ pool.block_size = block_size
+ pool.out_band_size = out_band_size
+ pool.alignment = alignment
+ pool.block_allocator = block_allocator
pool.out_band_allocations.allocator = array_allocator
- pool.unused_blocks.allocator = array_allocator
- pool.used_blocks.allocator = array_allocator
+ pool.unused_blocks.allocator = array_allocator
+ pool.used_blocks.allocator = array_allocator
}
/*
@@ -1783,10 +1783,10 @@ This procedure returns the pointer to the resized memory region.
*/
@(require_results)
dynamic_arena_resize :: proc(
- a: ^Dynamic_Arena,
+ a: ^Dynamic_Arena,
old_memory: rawptr,
- old_size: int,
- size: int,
+ old_size: int,
+ size: int,
loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := dynamic_arena_resize_bytes(a, byte_slice(old_memory, old_size), size, loc)
@@ -1811,9 +1811,9 @@ This procedure returns the slice of the resized memory region.
*/
@(require_results)
dynamic_arena_resize_bytes :: proc(
- a: ^Dynamic_Arena,
+ a: ^Dynamic_Arena,
old_data: []byte,
- size: int,
+ size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
bytes, err := dynamic_arena_resize_bytes_non_zeroed(a, old_data, size, loc)
@@ -1845,10 +1845,10 @@ This procedure returns the pointer to the resized memory region.
*/
@(require_results)
dynamic_arena_resize_non_zeroed :: proc(
- a: ^Dynamic_Arena,
+ a: ^Dynamic_Arena,
old_memory: rawptr,
- old_size: int,
- size: int,
+ old_size: int,
+ size: int,
loc := #caller_location,
) -> (rawptr, Allocator_Error) {
bytes, err := dynamic_arena_resize_bytes_non_zeroed(a, byte_slice(old_memory, old_size), size, loc)
@@ -1873,9 +1873,9 @@ This procedure returns the slice of the resized memory region.
*/
@(require_results)
dynamic_arena_resize_bytes_non_zeroed :: proc(
- a: ^Dynamic_Arena,
+ a: ^Dynamic_Arena,
old_data: []byte,
- size: int,
+ size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
old_memory := raw_data(old_data)
@@ -1892,11 +1892,11 @@ dynamic_arena_resize_bytes_non_zeroed :: proc(
dynamic_arena_allocator_proc :: proc(
allocator_data: rawptr,
- mode: Allocator_Mode,
- size: int,
- alignment: int,
- old_memory: rawptr,
- old_size: int,
+ mode: Allocator_Mode,
+ size: int,
+ alignment: int,
+ old_memory: rawptr,
+ old_size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
arena := (^Dynamic_Arena)(allocator_data)
@@ -2048,7 +2048,7 @@ buddy_block_find_best :: proc(head, tail: ^Buddy_Block, size: uint) -> ^Buddy_Bl
// to pick the buddy as it "bounces around" less
best_block = buddy
}
- if (block.size <= buddy.size) {
+ if block.size <= buddy.size {
block = buddy_block_next(buddy)
if (block < tail) {
// Delay the buddy block for the next iteration
@@ -2072,8 +2072,8 @@ buddy_block_find_best :: proc(head, tail: ^Buddy_Block, size: uint) -> ^Buddy_Bl
The buddy allocator data.
*/
Buddy_Allocator :: struct {
- head: ^Buddy_Block,
- tail: ^Buddy_Block,
+ head: ^Buddy_Block,
+ tail: ^Buddy_Block,
alignment: uint,
}
@@ -2234,11 +2234,11 @@ buddy_allocator_free_all :: proc(b: ^Buddy_Allocator) {
}
buddy_allocator_proc :: proc(
- allocator_data: rawptr,
- mode: Allocator_Mode,
+ allocator_data: rawptr,
+ mode: Allocator_Mode,
size, alignment: int,
- old_memory: rawptr,
- old_size: int,
+ old_memory: rawptr,
+ old_size: int,
loc := #caller_location,
) -> ([]byte, Allocator_Error) {
b := (^Buddy_Allocator)(allocator_data)
diff --git a/core/mem/mem.odin b/core/mem/mem.odin
index 67ed56c39..ccbc77798 100644
--- a/core/mem/mem.odin
+++ b/core/mem/mem.odin
@@ -461,10 +461,12 @@ Check if a pointer is aligned.
This procedure checks whether a pointer `x` is aligned to a boundary specified
by `align`, and returns `true` if the pointer is aligned, and false otherwise.
+
+The specified alignment must be a power of 2.
*/
is_aligned :: proc "contextless" (x: rawptr, align: int) -> bool {
p := uintptr(x)
- return (p & (1<<uintptr(align) - 1)) == 0
+ return (p & (uintptr(align) - 1)) == 0
}
/*
diff --git a/core/mem/mutex_allocator.odin b/core/mem/mutex_allocator.odin
index b8062bca1..7361016c3 100644
--- a/core/mem/mutex_allocator.odin
+++ b/core/mem/mutex_allocator.odin
@@ -1,4 +1,4 @@
-#+build !freestanding
+#+build !freestanding, wasm32, wasm64p32
package mem
import "core:sync"
diff --git a/core/mem/tracking_allocator.odin b/core/mem/tracking_allocator.odin
index 5da38e62f..cf780de3f 100644
--- a/core/mem/tracking_allocator.odin
+++ b/core/mem/tracking_allocator.odin
@@ -1,4 +1,4 @@
-#+build !freestanding
+#+build !freestanding, wasm32, wasm64p32
package mem
import "base:runtime"
diff --git a/core/mem/virtual/virtual_posix.odin b/core/mem/virtual/virtual_posix.odin
index 105849774..c3d6a9095 100644
--- a/core/mem/virtual/virtual_posix.odin
+++ b/core/mem/virtual/virtual_posix.odin
@@ -6,17 +6,13 @@ import "core:sys/posix"
// Define non-posix needed flags:
when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD {
- MAP_ANONYMOUS :: 0x1000 /* allocated from memory, swap space */
-
- MADV_FREE :: 5 /* pages unneeded, discard contents */
+ MADV_FREE :: 5 /* pages unneeded, discard contents */
} else when ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD {
- MAP_ANONYMOUS :: 0x1000
-
- MADV_FREE :: 6
+ MADV_FREE :: 6
}
_reserve :: proc "contextless" (size: uint) -> (data: []byte, err: Allocator_Error) {
- flags := posix.Map_Flags{ .PRIVATE } + transmute(posix.Map_Flags)i32(MAP_ANONYMOUS)
+ flags := posix.Map_Flags{ .ANONYMOUS, .PRIVATE }
result := posix.mmap(nil, size, {}, flags)
if result == posix.MAP_FAILED {
return nil, .Out_Of_Memory
diff --git a/core/net/socket_darwin.odin b/core/net/socket_darwin.odin
index ec9255c3b..27927e973 100644
--- a/core/net/socket_darwin.odin
+++ b/core/net/socket_darwin.odin
@@ -88,8 +88,8 @@ _dial_tcp_from_endpoint :: proc(endpoint: Endpoint, options := default_tcp_optio
sockaddr := _endpoint_to_sockaddr(endpoint)
res := os.connect(os.Socket(skt), (^os.SOCKADDR)(&sockaddr), i32(sockaddr.len))
if res != nil {
- err = Dial_Error(os.is_platform_error(res) or_else -1)
- return
+ close(skt)
+ return {}, Dial_Error(os.is_platform_error(res) or_else -1)
}
return
@@ -120,6 +120,7 @@ _listen_tcp :: proc(interface_endpoint: Endpoint, backlog := 1000) -> (skt: TCP_
family := family_from_endpoint(interface_endpoint)
sock := create_socket(family, .TCP) or_return
skt = sock.(TCP_Socket)
+ defer if err != nil { close(skt) }
// NOTE(tetra): This is so that if we crash while the socket is open, we can
// bypass the cooldown period, and allow the next run of the program to
diff --git a/core/net/socket_freebsd.odin b/core/net/socket_freebsd.odin
index 0f3a85cbb..3a3774007 100644
--- a/core/net/socket_freebsd.odin
+++ b/core/net/socket_freebsd.odin
@@ -114,8 +114,8 @@ _dial_tcp_from_endpoint :: proc(endpoint: Endpoint, options := default_tcp_optio
sockaddr := _endpoint_to_sockaddr(endpoint)
errno := freebsd.connect(cast(Fd)socket, &sockaddr, cast(freebsd.socklen_t)sockaddr.len)
if errno != nil {
- err = cast(Dial_Error)errno
- return
+ close(socket)
+ return {}, cast(Dial_Error)errno
}
return
@@ -137,6 +137,7 @@ _listen_tcp :: proc(interface_endpoint: Endpoint, backlog := 1000) -> (socket: T
family := family_from_endpoint(interface_endpoint)
new_socket := create_socket(family, .TCP) or_return
socket = new_socket.(TCP_Socket)
+ defer if err != nil { close(socket) }
bind(socket, interface_endpoint) or_return
diff --git a/core/net/socket_linux.odin b/core/net/socket_linux.odin
index a3853874a..b7816b0b6 100644
--- a/core/net/socket_linux.odin
+++ b/core/net/socket_linux.odin
@@ -147,7 +147,8 @@ _dial_tcp_from_endpoint :: proc(endpoint: Endpoint, options := default_tcp_optio
addr := _unwrap_os_addr(endpoint)
errno = linux.connect(linux.Fd(os_sock), &addr)
if errno != .NONE {
- return cast(TCP_Socket) os_sock, Dial_Error(errno)
+ close(cast(TCP_Socket) os_sock)
+ return {}, Dial_Error(errno)
}
// NOTE(tetra): Not vital to succeed; error ignored
no_delay: b32 = cast(b32) options.no_delay
@@ -166,40 +167,48 @@ _bind :: proc(sock: Any_Socket, endpoint: Endpoint) -> (Network_Error) {
}
@(private)
-_listen_tcp :: proc(endpoint: Endpoint, backlog := 1000) -> (TCP_Socket, Network_Error) {
+_listen_tcp :: proc(endpoint: Endpoint, backlog := 1000) -> (socket: TCP_Socket, err: Network_Error) {
errno: linux.Errno
assert(backlog > 0 && i32(backlog) < max(i32))
+
// Figure out the address family and address of the endpoint
ep_family := _unwrap_os_family(family_from_endpoint(endpoint))
ep_address := _unwrap_os_addr(endpoint)
+
// Create TCP socket
os_sock: linux.Fd
os_sock, errno = linux.socket(ep_family, .STREAM, {.CLOEXEC}, .TCP)
if errno != .NONE {
- // TODO(flysand): should return invalid file descriptor here casted as TCP_Socket
- return {}, Create_Socket_Error(errno)
+ err = Create_Socket_Error(errno)
+ return
}
+ socket = cast(TCP_Socket)os_sock
+ defer if err != nil { close(socket) }
+
// NOTE(tetra): This is so that if we crash while the socket is open, we can
// bypass the cooldown period, and allow the next run of the program to
// use the same address immediately.
//
// TODO(tetra, 2022-02-15): Confirm that this doesn't mean other processes can hijack the address!
do_reuse_addr: b32 = true
- errno = linux.setsockopt(os_sock, linux.SOL_SOCKET, linux.Socket_Option.REUSEADDR, &do_reuse_addr)
- if errno != .NONE {
- return cast(TCP_Socket) os_sock, Listen_Error(errno)
+ if errno = linux.setsockopt(os_sock, linux.SOL_SOCKET, linux.Socket_Option.REUSEADDR, &do_reuse_addr); errno != .NONE {
+ err = Listen_Error(errno)
+ return
}
+
// Bind the socket to endpoint address
- errno = linux.bind(os_sock, &ep_address)
- if errno != .NONE {
- return cast(TCP_Socket) os_sock, Bind_Error(errno)
+ if errno = linux.bind(os_sock, &ep_address); errno != .NONE {
+ err = Bind_Error(errno)
+ return
}
+
// Listen on bound socket
- errno = linux.listen(os_sock, cast(i32) backlog)
- if errno != .NONE {
- return cast(TCP_Socket) os_sock, Listen_Error(errno)
+ if errno = linux.listen(os_sock, cast(i32) backlog); errno != .NONE {
+ err = Listen_Error(errno)
+ return
}
- return cast(TCP_Socket) os_sock, nil
+
+ return
}
@(private)
diff --git a/core/net/socket_windows.odin b/core/net/socket_windows.odin
index 20f17619d..747d5cab3 100644
--- a/core/net/socket_windows.odin
+++ b/core/net/socket_windows.odin
@@ -80,8 +80,8 @@ _dial_tcp_from_endpoint :: proc(endpoint: Endpoint, options := default_tcp_optio
sockaddr := _endpoint_to_sockaddr(endpoint)
res := win.connect(win.SOCKET(socket), &sockaddr, size_of(sockaddr))
if res < 0 {
- err = Dial_Error(win.WSAGetLastError())
- return
+ close(socket)
+ return {}, Dial_Error(win.WSAGetLastError())
}
if options.no_delay {
@@ -107,6 +107,7 @@ _listen_tcp :: proc(interface_endpoint: Endpoint, backlog := 1000) -> (socket: T
family := family_from_endpoint(interface_endpoint)
sock := create_socket(family, .TCP) or_return
socket = sock.(TCP_Socket)
+ defer if err != nil { close(socket) }
// NOTE(tetra): While I'm not 100% clear on it, my understanding is that this will
// prevent hijacking of the server's endpoint by other applications.
diff --git a/core/odin/ast/ast.odin b/core/odin/ast/ast.odin
index d67eb31f3..f62feec8c 100644
--- a/core/odin/ast/ast.odin
+++ b/core/odin/ast/ast.odin
@@ -776,17 +776,18 @@ Dynamic_Array_Type :: struct {
Struct_Type :: struct {
using node: Expr,
- tok_pos: tokenizer.Pos,
- poly_params: ^Field_List,
- align: ^Expr,
- field_align: ^Expr,
- where_token: tokenizer.Token,
- where_clauses: []^Expr,
- is_packed: bool,
- is_raw_union: bool,
- is_no_copy: bool,
- fields: ^Field_List,
- name_count: int,
+ tok_pos: tokenizer.Pos,
+ poly_params: ^Field_List,
+ align: ^Expr,
+ min_field_align: ^Expr,
+ max_field_align: ^Expr,
+ where_token: tokenizer.Token,
+ where_clauses: []^Expr,
+ is_packed: bool,
+ is_raw_union: bool,
+ is_no_copy: bool,
+ fields: ^Field_List,
+ name_count: int,
}
Union_Type_Kind :: enum u8 {
diff --git a/core/odin/ast/clone.odin b/core/odin/ast/clone.odin
index b0a1673b2..67f7ffa95 100644
--- a/core/odin/ast/clone.odin
+++ b/core/odin/ast/clone.odin
@@ -316,7 +316,8 @@ clone_node :: proc(node: ^Node) -> ^Node {
case ^Struct_Type:
r.poly_params = auto_cast clone(r.poly_params)
r.align = clone(r.align)
- r.field_align = clone(r.field_align)
+ r.min_field_align = clone(r.min_field_align)
+ r.max_field_align = clone(r.max_field_align)
r.fields = auto_cast clone(r.fields)
case ^Union_Type:
r.poly_params = auto_cast clone(r.poly_params)
diff --git a/core/odin/parser/parser.odin b/core/odin/parser/parser.odin
index d42766bde..5a7440339 100644
--- a/core/odin/parser/parser.odin
+++ b/core/odin/parser/parser.odin
@@ -2610,9 +2610,10 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
case .Struct:
tok := expect_token(p, .Struct)
- poly_params: ^ast.Field_List
- align: ^ast.Expr
- field_align: ^ast.Expr
+ poly_params: ^ast.Field_List
+ align: ^ast.Expr
+ min_field_align: ^ast.Expr
+ max_field_align: ^ast.Expr
is_packed: bool
is_raw_union: bool
is_no_copy: bool
@@ -2645,10 +2646,21 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
}
align = parse_expr(p, true)
case "field_align":
- if field_align != nil {
+ if min_field_align != nil {
+ error(p, tag.pos, "duplicate struct tag '#%s'", tag.text)
+ }
+ warn(p, tag.pos, "#field_align has been deprecated in favour of #min_field_align")
+ min_field_align = parse_expr(p, true)
+ case "min_field_align":
+ if min_field_align != nil {
error(p, tag.pos, "duplicate struct tag '#%s'", tag.text)
}
- field_align = parse_expr(p, true)
+ min_field_align = parse_expr(p, true)
+ case "max_field_align":
+ if max_field_align != nil {
+ error(p, tag.pos, "duplicate struct tag '#%s'", tag.text)
+ }
+ max_field_align = parse_expr(p, true)
case "raw_union":
if is_raw_union {
error(p, tag.pos, "duplicate struct tag '#%s'", tag.text)
@@ -2689,16 +2701,17 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
close := expect_closing_brace_of_field_list(p)
st := ast.new(ast.Struct_Type, tok.pos, end_pos(close))
- st.poly_params = poly_params
- st.align = align
- st.field_align = field_align
- st.is_packed = is_packed
- st.is_raw_union = is_raw_union
- st.is_no_copy = is_no_copy
- st.fields = fields
- st.name_count = name_count
- st.where_token = where_token
- st.where_clauses = where_clauses
+ st.poly_params = poly_params
+ st.align = align
+ st.min_field_align = min_field_align
+ st.max_field_align = max_field_align
+ st.is_packed = is_packed
+ st.is_raw_union = is_raw_union
+ st.is_no_copy = is_no_copy
+ st.fields = fields
+ st.name_count = name_count
+ st.where_token = where_token
+ st.where_clauses = where_clauses
return st
case .Union:
@@ -3683,6 +3696,8 @@ parse_value_decl :: proc(p: ^Parser, names: []^ast.Expr, docs: ^ast.Comment_Grou
}
}
+ end := p.prev_tok
+
if p.expr_level >= 0 {
end: ^ast.Expr
if !is_mutable && len(values) > 0 {
@@ -3702,7 +3717,7 @@ parse_value_decl :: proc(p: ^Parser, names: []^ast.Expr, docs: ^ast.Comment_Grou
}
}
- decl := ast.new(ast.Value_Decl, names[0].pos, end_pos(p.prev_tok))
+ decl := ast.new(ast.Value_Decl, names[0].pos, end_pos(end))
decl.docs = docs
decl.names = names
decl.type = type
diff --git a/core/odin/tokenizer/tokenizer.odin b/core/odin/tokenizer/tokenizer.odin
index c3a30581c..d4da82c56 100644
--- a/core/odin/tokenizer/tokenizer.odin
+++ b/core/odin/tokenizer/tokenizer.odin
@@ -331,7 +331,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool {
n -= 1
}
- if x > max || 0xd800 <= x && x <= 0xe000 {
+ if x > max || 0xd800 <= x && x <= 0xdfff {
error(t, offset, "escape sequence is an invalid Unicode code point")
return false
}
diff --git a/core/os/os2/allocators.odin b/core/os/os2/allocators.odin
index a205cae48..864532850 100644
--- a/core/os/os2/allocators.odin
+++ b/core/os/os2/allocators.odin
@@ -62,8 +62,8 @@ TEMP_ALLOCATOR_GUARD_END :: proc(temp: runtime.Arena_Temp, loc := #caller_locati
@(deferred_out=TEMP_ALLOCATOR_GUARD_END)
TEMP_ALLOCATOR_GUARD :: #force_inline proc(loc := #caller_location) -> (runtime.Arena_Temp, runtime.Source_Code_Location) {
- tmp := temp_allocator_temp_begin(loc)
global_default_temp_allocator_index = (global_default_temp_allocator_index+1)%MAX_TEMP_ARENA_COUNT
+ tmp := temp_allocator_temp_begin(loc)
return tmp, loc
}
diff --git a/core/os/os2/dir_linux.odin b/core/os/os2/dir_linux.odin
index 6a097e192..f26b4fc79 100644
--- a/core/os/os2/dir_linux.odin
+++ b/core/os/os2/dir_linux.odin
@@ -13,7 +13,7 @@ _read_directory_iterator :: proc(it: ^Read_Directory_Iterator) -> (fi: File_Info
@(require_results)
_read_directory_iterator_create :: proc(f: ^File) -> (Read_Directory_Iterator, Error) {
- return {}, nil
+ return {}, .Unsupported
}
_read_directory_iterator_destroy :: proc(it: ^Read_Directory_Iterator) {
diff --git a/core/os/os2/dir_windows.odin b/core/os/os2/dir_windows.odin
index 09990aeec..f71e7e763 100644
--- a/core/os/os2/dir_windows.odin
+++ b/core/os/os2/dir_windows.odin
@@ -16,28 +16,25 @@ find_data_to_file_info :: proc(base_path: string, d: ^win32.WIN32_FIND_DATAW, al
}
path := concatenate({base_path, `\`, win32_utf16_to_utf8(d.cFileName[:], temp_allocator()) or_else ""}, allocator) or_return
+ handle := win32.HANDLE(_open_internal(path, {.Read}, 0o666) or_else 0)
+ defer win32.CloseHandle(handle)
fi.fullpath = path
fi.name = basename(path)
fi.size = i64(d.nFileSizeHigh)<<32 + i64(d.nFileSizeLow)
- fi.type, fi.mode = _file_type_mode_from_file_attributes(d.dwFileAttributes, nil, d.dwReserved0)
+ fi.type, fi.mode = _file_type_mode_from_file_attributes(d.dwFileAttributes, handle, d.dwReserved0)
fi.creation_time = time.unix(0, win32.FILETIME_as_unix_nanoseconds(d.ftCreationTime))
fi.modification_time = time.unix(0, win32.FILETIME_as_unix_nanoseconds(d.ftLastWriteTime))
fi.access_time = time.unix(0, win32.FILETIME_as_unix_nanoseconds(d.ftLastAccessTime))
-
- handle := win32.HANDLE(_open_internal(path, {.Read}, 0o666) or_else 0)
- defer win32.CloseHandle(handle)
-
if file_id_info: win32.FILE_ID_INFO; handle != nil && win32.GetFileInformationByHandleEx(handle, .FileIdInfo, &file_id_info, size_of(file_id_info)) {
#assert(size_of(fi.inode) == size_of(file_id_info.FileId))
#assert(size_of(fi.inode) == 16)
runtime.mem_copy_non_overlapping(&fi.inode, &file_id_info.FileId, 16)
}
-
return
}
@@ -137,5 +134,6 @@ _read_directory_iterator_destroy :: proc(it: ^Read_Directory_Iterator) {
return
}
file_info_delete(it.impl.prev_fi, file_allocator())
+ delete(it.impl.path, file_allocator())
win32.FindClose(it.impl.find_handle)
}
diff --git a/core/os/os2/errors_linux.odin b/core/os/os2/errors_linux.odin
index 09492110d..a7556c306 100644
--- a/core/os/os2/errors_linux.odin
+++ b/core/os/os2/errors_linux.odin
@@ -162,6 +162,8 @@ _get_platform_error :: proc(errno: linux.Errno) -> Error {
return .Invalid_File
case .ENOMEM:
return .Out_Of_Memory
+ case .ENOSYS:
+ return .Unsupported
}
return Platform_Error(i32(errno))
diff --git a/core/os/os2/errors_posix.odin b/core/os/os2/errors_posix.odin
index 59f0ba5f1..0b5876c0b 100644
--- a/core/os/os2/errors_posix.odin
+++ b/core/os/os2/errors_posix.odin
@@ -26,6 +26,8 @@ _get_platform_error :: proc() -> Error {
return .Invalid_File
case .ENOMEM:
return .Out_Of_Memory
+ case .ENOSYS:
+ return .Unsupported
case:
return Platform_Error(errno)
}
diff --git a/core/os/os2/errors_windows.odin b/core/os/os2/errors_windows.odin
index 56acd503f..404560f98 100644
--- a/core/os/os2/errors_windows.odin
+++ b/core/os/os2/errors_windows.odin
@@ -55,13 +55,15 @@ _get_platform_error :: proc() -> Error {
case win32.ERROR_NEGATIVE_SEEK:
return .Invalid_Offset
+ case win32.ERROR_BROKEN_PIPE:
+ return .Broken_Pipe
+
case
win32.ERROR_BAD_ARGUMENTS,
win32.ERROR_INVALID_PARAMETER,
win32.ERROR_NOT_ENOUGH_MEMORY,
win32.ERROR_NO_MORE_FILES,
win32.ERROR_LOCK_VIOLATION,
- win32.ERROR_BROKEN_PIPE,
win32.ERROR_CALL_NOT_IMPLEMENTED,
win32.ERROR_INSUFFICIENT_BUFFER,
win32.ERROR_INVALID_NAME,
diff --git a/core/os/os2/file_util.odin b/core/os/os2/file_util.odin
index 963544985..8af46fab3 100644
--- a/core/os/os2/file_util.odin
+++ b/core/os/os2/file_util.odin
@@ -164,7 +164,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d
}
@(require_results)
-write_entire_file :: proc(name: string, data: []byte, perm: int, truncate := true) -> Error {
+write_entire_file :: proc(name: string, data: []byte, perm: int = 0o644, truncate := true) -> Error {
flags := O_WRONLY|O_CREATE
if truncate {
flags |= O_TRUNC
diff --git a/core/os/os2/file_windows.odin b/core/os/os2/file_windows.odin
index 511935d74..b91a1bc3b 100644
--- a/core/os/os2/file_windows.odin
+++ b/core/os/os2/file_windows.odin
@@ -50,9 +50,9 @@ init_std_files :: proc() {
}
@(fini)
fini_std_files :: proc() {
- close(stdin)
- close(stdout)
- close(stderr)
+ _destroy((^File_Impl)(stdin.impl))
+ _destroy((^File_Impl)(stdout.impl))
+ _destroy((^File_Impl)(stderr.impl))
}
diff --git a/core/os/os2/path_posix.odin b/core/os/os2/path_posix.odin
index 6f358c58d..5ffdac28e 100644
--- a/core/os/os2/path_posix.odin
+++ b/core/os/os2/path_posix.odin
@@ -40,7 +40,7 @@ _mkdir_all :: proc(path: string, perm: int) -> Error {
internal_mkdir_all :: proc(path: string, perm: int) -> Error {
dir, file := filepath.split(path)
- if file != path {
+ if file != path && dir != "/" {
if len(dir) > 1 && dir[len(dir) - 1] == '/' {
dir = dir[:len(dir) - 1]
}
diff --git a/core/os/os2/pipe.odin b/core/os/os2/pipe.odin
index 9254d6f8e..5d3e8368e 100644
--- a/core/os/os2/pipe.odin
+++ b/core/os/os2/pipe.odin
@@ -1,6 +1,43 @@
package os2
+/*
+Create an anonymous pipe.
+
+This procedure creates an anonymous pipe, returning two ends of the pipe, `r`
+and `w`. The file `r` is the readable end of the pipe. The file `w` is a
+writeable end of the pipe.
+
+Pipes are used as an inter-process communication mechanism, to communicate
+between a parent and a child process. The child uses one end of the pipe to
+write data, and the parent uses the other end to read from the pipe
+(or vice-versa). When a parent passes one of the ends of the pipe to the child
+process, that end of the pipe needs to be closed by the parent, before any data
+is attempted to be read.
+
+Although pipes look like files and is compatible with most file APIs in package
+os2, the way it's meant to be read is different. Due to asynchronous nature of
+the communication channel, the data may not be present at the time of a read
+request. The other scenario is when a pipe has no data because the other end
+of the pipe was closed by the child process.
+*/
@(require_results)
pipe :: proc() -> (r, w: ^File, err: Error) {
return _pipe()
}
+
+/*
+Check if the pipe has any data.
+
+This procedure checks whether a read-end of the pipe has data that can be
+read, and returns `true`, if the pipe has readable data, and `false` if the
+pipe is empty. This procedure does not block the execution of the current
+thread.
+
+**Note**: If the other end of the pipe was closed by the child process, the
+`.Broken_Pipe`
+can be returned by this procedure. Handle these errors accordingly.
+*/
+@(require_results)
+pipe_has_data :: proc(r: ^File) -> (ok: bool, err: Error) {
+ return _pipe_has_data(r)
+}
diff --git a/core/os/os2/pipe_linux.odin b/core/os/os2/pipe_linux.odin
index ac3382bc3..852674c69 100644
--- a/core/os/os2/pipe_linux.odin
+++ b/core/os/os2/pipe_linux.odin
@@ -15,3 +15,29 @@ _pipe :: proc() -> (r, w: ^File, err: Error) {
return
}
+
+@(require_results)
+_pipe_has_data :: proc(r: ^File) -> (ok: bool, err: Error) {
+ if r == nil || r.impl == nil {
+ return false, nil
+ }
+ fd := linux.Fd((^File_Impl)(r.impl).fd)
+ poll_fds := []linux.Poll_Fd {
+ linux.Poll_Fd {
+ fd = fd,
+ events = {.IN, .HUP},
+ },
+ }
+ n, errno := linux.poll(poll_fds, 0)
+ if n != 1 || errno != nil {
+ return false, _get_platform_error(errno)
+ }
+ pipe_events := poll_fds[0].revents
+ if pipe_events >= {.IN} {
+ return true, nil
+ }
+ if pipe_events >= {.HUP} {
+ return false, .Broken_Pipe
+ }
+ return false, nil
+} \ No newline at end of file
diff --git a/core/os/os2/pipe_posix.odin b/core/os/os2/pipe_posix.odin
index 487e32aea..df9425339 100644
--- a/core/os/os2/pipe_posix.odin
+++ b/core/os/os2/pipe_posix.odin
@@ -44,3 +44,30 @@ _pipe :: proc() -> (r, w: ^File, err: Error) {
return
}
+@(require_results)
+_pipe_has_data :: proc(r: ^File) -> (ok: bool, err: Error) {
+ if r == nil || r.impl == nil {
+ return false, nil
+ }
+ fd := __fd(r)
+ poll_fds := []posix.pollfd {
+ posix.pollfd {
+ fd = fd,
+ events = {.IN, .HUP},
+ },
+ }
+ n := posix.poll(raw_data(poll_fds), u32(len(poll_fds)), 0)
+ if n < 0 {
+ return false, _get_platform_error()
+ } else if n != 1 {
+ return false, nil
+ }
+ pipe_events := poll_fds[0].revents
+ if pipe_events >= {.IN} {
+ return true, nil
+ }
+ if pipe_events >= {.HUP} {
+ return false, .Broken_Pipe
+ }
+ return false, nil
+}
diff --git a/core/os/os2/pipe_windows.odin b/core/os/os2/pipe_windows.odin
index ee93fb683..d6dc47c9c 100644
--- a/core/os/os2/pipe_windows.odin
+++ b/core/os/os2/pipe_windows.odin
@@ -15,3 +15,15 @@ _pipe :: proc() -> (r, w: ^File, err: Error) {
return new_file(uintptr(p[0]), ""), new_file(uintptr(p[1]), ""), nil
}
+@(require_results)
+_pipe_has_data :: proc(r: ^File) -> (ok: bool, err: Error) {
+ if r == nil || r.impl == nil {
+ return false, nil
+ }
+ handle := win32.HANDLE((^File_Impl)(r.impl).fd)
+ bytes_available: u32
+ if !win32.PeekNamedPipe(handle, nil, 0, nil, &bytes_available, nil) {
+ return false, _get_platform_error()
+ }
+ return bytes_available > 0, nil
+} \ No newline at end of file
diff --git a/core/os/os2/process.odin b/core/os/os2/process.odin
index ce65987b0..5b5a6e844 100644
--- a/core/os/os2/process.odin
+++ b/core/os/os2/process.odin
@@ -1,16 +1,17 @@
package os2
import "base:runtime"
+
import "core:time"
/*
- In procedures that explicitly state this as one of the allowed values,
- specifies an infinite timeout.
+In procedures that explicitly state this as one of the allowed values,
+specifies an infinite timeout.
*/
TIMEOUT_INFINITE :: time.MIN_DURATION // Note(flysand): Any negative duration will be treated as infinity
/*
- Arguments to the current process.
+Arguments to the current process.
*/
args := get_args()
@@ -24,17 +25,17 @@ get_args :: proc() -> []string {
}
/*
- Exit the current process.
+Exit the current process.
*/
exit :: proc "contextless" (code: int) -> ! {
_exit(code)
}
/*
- Obtain the UID of the current process.
+Obtain the UID of the current process.
- **Note(windows)**: Windows doesn't follow the posix permissions model, so
- the function simply returns -1.
+**Note(windows)**: Windows doesn't follow the posix permissions model, so
+the function simply returns -1.
*/
@(require_results)
get_uid :: proc() -> int {
@@ -42,15 +43,15 @@ get_uid :: proc() -> int {
}
/*
- Obtain the effective UID of the current process.
-
- The effective UID is typically the same as the UID of the process. In case
- the process was run by a user with elevated permissions, the process may
- lower the privilege to perform some tasks without privilege. In these cases
- the real UID of the process and the effective UID are different.
-
- **Note(windows)**: Windows doesn't follow the posix permissions model, so
- the function simply returns -1.
+Obtain the effective UID of the current process.
+
+The effective UID is typically the same as the UID of the process. In case
+the process was run by a user with elevated permissions, the process may
+lower the privilege to perform some tasks without privilege. In these cases
+the real UID of the process and the effective UID are different.
+
+**Note(windows)**: Windows doesn't follow the posix permissions model, so
+the function simply returns -1.
*/
@(require_results)
get_euid :: proc() -> int {
@@ -58,10 +59,10 @@ get_euid :: proc() -> int {
}
/*
- Obtain the GID of the current process.
-
- **Note(windows)**: Windows doesn't follow the posix permissions model, so
- the function simply returns -1.
+Obtain the GID of the current process.
+
+**Note(windows)**: Windows doesn't follow the posix permissions model, so
+the function simply returns -1.
*/
@(require_results)
get_gid :: proc() -> int {
@@ -69,15 +70,15 @@ get_gid :: proc() -> int {
}
/*
- Obtain the effective GID of the current process.
-
- The effective GID is typically the same as the GID of the process. In case
- the process was run by a user with elevated permissions, the process may
- lower the privilege to perform some tasks without privilege. In these cases
- the real GID of the process and the effective GID are different.
-
- **Note(windows)**: Windows doesn't follow the posix permissions model, so
- the function simply returns -1.
+Obtain the effective GID of the current process.
+
+The effective GID is typically the same as the GID of the process. In case
+the process was run by a user with elevated permissions, the process may
+lower the privilege to perform some tasks without privilege. In these cases
+the real GID of the process and the effective GID are different.
+
+**Note(windows)**: Windows doesn't follow the posix permissions model, so
+the function simply returns -1.
*/
@(require_results)
get_egid :: proc() -> int {
@@ -85,7 +86,7 @@ get_egid :: proc() -> int {
}
/*
- Obtain the ID of the current process.
+Obtain the ID of the current process.
*/
@(require_results)
get_pid :: proc() -> int {
@@ -93,13 +94,13 @@ get_pid :: proc() -> int {
}
/*
- Obtain the ID of the parent process.
+Obtain the ID of the parent process.
- **Note(windows)**: Windows does not mantain strong relationships between
- parent and child processes. This function returns the ID of the process
- that has created the current process. In case the parent has died, the ID
- returned by this function can identify a non-existent or a different
- process.
+**Note(windows)**: Windows does not mantain strong relationships between
+parent and child processes. This function returns the ID of the process
+that has created the current process. In case the parent has died, the ID
+returned by this function can identify a non-existent or a different
+process.
*/
@(require_results)
get_ppid :: proc() -> int {
@@ -107,7 +108,7 @@ get_ppid :: proc() -> int {
}
/*
- Obtain ID's of all processes running in the system.
+Obtain ID's of all processes running in the system.
*/
@(require_results)
process_list :: proc(allocator: runtime.Allocator) -> ([]int, Error) {
@@ -115,9 +116,9 @@ process_list :: proc(allocator: runtime.Allocator) -> ([]int, Error) {
}
/*
- Bit set specifying which fields of the `Process_Info` struct need to be
- obtained by the `process_info()` procedure. Each bit corresponds to a
- field in the `Process_Info` struct.
+Bit set specifying which fields of the `Process_Info` struct need to be
+obtained by the `process_info()` procedure. Each bit corresponds to a
+field in the `Process_Info` struct.
*/
Process_Info_Fields :: bit_set[Process_Info_Field]
Process_Info_Field :: enum {
@@ -134,8 +135,8 @@ Process_Info_Field :: enum {
ALL_INFO :: Process_Info_Fields{.Executable_Path, .PPid, .Priority, .Command_Line, .Command_Args, .Environment, .Username, .Working_Dir}
/*
- Contains information about the process as obtained by the `process_info()`
- procedure.
+Contains information about the process as obtained by the `process_info()`
+procedure.
*/
Process_Info :: struct {
// The information about a process the struct contains. `pid` is always
@@ -162,19 +163,19 @@ Process_Info :: struct {
}
/*
- Obtain information about a process.
+Obtain information about a process.
- This procedure obtains an information, specified by `selection` parameter of
- a process given by `pid`.
+This procedure obtains an information, specified by `selection` parameter of
+a process given by `pid`.
- Use `free_process_info` to free the memory allocated by this procedure. The
- `free_process_info` procedure needs to be called, even if this procedure
- returned an error, as some of the fields may have been allocated.
+Use `free_process_info` to free the memory allocated by this procedure. The
+`free_process_info` procedure needs to be called, even if this procedure
+returned an error, as some of the fields may have been allocated.
- **Note**: The resulting information may or may contain the fields specified
- by the `selection` parameter. Always check whether the returned
- `Process_Info` struct has the required fields before checking the error code
- returned by this procedure.
+**Note**: The resulting information may or may contain the fields specified
+by the `selection` parameter. Always check whether the returned
+`Process_Info` struct has the required fields before checking the error code
+returned by this procedure.
*/
@(require_results)
process_info_by_pid :: proc(pid: int, selection: Process_Info_Fields, allocator: runtime.Allocator) -> (Process_Info, Error) {
@@ -182,20 +183,20 @@ process_info_by_pid :: proc(pid: int, selection: Process_Info_Fields, allocator:
}
/*
- Obtain information about a process.
+Obtain information about a process.
- This procedure obtains information, specified by `selection` parameter
- about a process that has been opened by the application, specified in
- the `process` parameter.
+This procedure obtains information, specified by `selection` parameter
+about a process that has been opened by the application, specified in
+the `process` parameter.
- Use `free_process_info` to free the memory allocated by this procedure. The
- `free_process_info` procedure needs to be called, even if this procedure
- returned an error, as some of the fields may have been allocated.
+Use `free_process_info` to free the memory allocated by this procedure. The
+`free_process_info` procedure needs to be called, even if this procedure
+returned an error, as some of the fields may have been allocated.
- **Note**: The resulting information may or may contain the fields specified
- by the `selection` parameter. Always check whether the returned
- `Process_Info` struct has the required fields before checking the error code
- returned by this procedure.
+**Note**: The resulting information may or may contain the fields specified
+by the `selection` parameter. Always check whether the returned
+`Process_Info` struct has the required fields before checking the error code
+returned by this procedure.
*/
@(require_results)
process_info_by_handle :: proc(process: Process, selection: Process_Info_Fields, allocator: runtime.Allocator) -> (Process_Info, Error) {
@@ -203,19 +204,19 @@ process_info_by_handle :: proc(process: Process, selection: Process_Info_Fields,
}
/*
- Obtain information about the current process.
+Obtain information about the current process.
- This procedure obtains the information, specified by `selection` parameter
- about the currently running process.
+This procedure obtains the information, specified by `selection` parameter
+about the currently running process.
- Use `free_process_info` to free the memory allocated by this procedure. The
- `free_process_info` procedure needs to be called, even if this procedure
- returned an error, as some of the fields may have been allocated.
+Use `free_process_info` to free the memory allocated by this procedure. The
+`free_process_info` procedure needs to be called, even if this procedure
+returned an error, as some of the fields may have been allocated.
- **Note**: The resulting information may or may contain the fields specified
- by the `selection` parameter. Always check whether the returned
- `Process_Info` struct has the required fields before checking the error code
- returned by this procedure.
+**Note**: The resulting information may or may contain the fields specified
+by the `selection` parameter. Always check whether the returned
+`Process_Info` struct has the required fields before checking the error code
+returned by this procedure.
*/
@(require_results)
current_process_info :: proc(selection: Process_Info_Fields, allocator: runtime.Allocator) -> (Process_Info, Error) {
@@ -223,7 +224,7 @@ current_process_info :: proc(selection: Process_Info_Fields, allocator: runtime.
}
/*
- Obtain information about the specified process.
+Obtain information about the specified process.
*/
process_info :: proc {
process_info_by_pid,
@@ -232,11 +233,11 @@ process_info :: proc {
}
/*
- Free the information about the process.
+Free the information about the process.
- This procedure frees the memory occupied by process info using the provided
- allocator. The allocator needs to be the same allocator that was supplied
- to the `process_info` function.
+This procedure frees the memory occupied by process info using the provided
+allocator. The allocator needs to be the same allocator that was supplied
+to the `process_info` function.
*/
free_process_info :: proc(pi: Process_Info, allocator: runtime.Allocator) {
delete(pi.executable_path, allocator)
@@ -254,13 +255,13 @@ free_process_info :: proc(pi: Process_Info, allocator: runtime.Allocator) {
}
/*
- Represents a process handle.
+Represents a process handle.
- When a process dies, the OS is free to re-use the pid of that process. The
- `Process` struct represents a handle to the process that will refer to a
- specific process, even after it has died.
+When a process dies, the OS is free to re-use the pid of that process. The
+`Process` struct represents a handle to the process that will refer to a
+specific process, even after it has died.
- **Note(linux)**: The `handle` will be referring to pidfd.
+**Note(linux)**: The `handle` will be referring to pidfd.
*/
Process :: struct {
pid: int,
@@ -276,13 +277,13 @@ Process_Open_Flag :: enum {
}
/*
- Open a process handle using it's pid.
+Open a process handle using it's pid.
- This procedure obtains a process handle of a process specified by `pid`.
- This procedure can be subject to race conditions. See the description of
- `Process`.
+This procedure obtains a process handle of a process specified by `pid`.
+This procedure can be subject to race conditions. See the description of
+`Process`.
- Use `process_close()` function to close the process handle.
+Use `process_close()` function to close the process handle.
*/
@(require_results)
process_open :: proc(pid: int, flags := Process_Open_Flags {}) -> (Process, Error) {
@@ -322,32 +323,140 @@ Process_Desc :: struct {
}
/*
- Create a new process and obtain its handle.
-
- This procedure creates a new process, with a given command and environment
- strings as parameters. Use `environ()` to inherit the environment of the
- current process.
-
- The `desc` parameter specifies the description of how the process should
- be created. It contains information such as the command line, the
- environment of the process, the starting directory and many other options.
- Most of the fields in the struct can be set to `nil` or an empty value.
-
- Use `process_close` to close the handle to the process. Note, that this
- is not the same as terminating the process. One can terminate the process
- and not close the handle, in which case the handle would be leaked. In case
- the function returns an error, an invalid handle is returned.
-
- This procedure is not thread-safe. It may alter the inheritance properties
- of file handles in an unpredictable manner. In case multiple threads change
- handle inheritance properties, make sure to serialize all those calls.
+Create a new process and obtain its handle.
+
+This procedure creates a new process, with a given command and environment
+strings as parameters. Use `environ()` to inherit the environment of the
+current process.
+
+The `desc` parameter specifies the description of how the process should
+be created. It contains information such as the command line, the
+environment of the process, the starting directory and many other options.
+Most of the fields in the struct can be set to `nil` or an empty value.
+
+Use `process_close` to close the handle to the process. Note, that this
+is not the same as terminating the process. One can terminate the process
+and not close the handle, in which case the handle would be leaked. In case
+the function returns an error, an invalid handle is returned.
+
+This procedure is not thread-safe. It may alter the inheritance properties
+of file handles in an unpredictable manner. In case multiple threads change
+handle inheritance properties, make sure to serialize all those calls.
*/
@(require_results)
-process_start :: proc(desc := Process_Desc {}) -> (Process, Error) {
+process_start :: proc(desc: Process_Desc) -> (Process, Error) {
return _process_start(desc)
}
/*
+Execute the process and capture stdout and stderr streams.
+
+This procedure creates a new process, with a given command and environment
+strings as parameters, and waits until the process finishes execution. While
+the process is running, this procedure accumulates the output of its stdout
+and stderr streams and returns byte slices containing the captured data from
+the streams.
+
+This procedure expects that `stdout` and `stderr` fields of the `desc` parameter
+are left at default, i.e. a `nil` value. You can not capture stdout/stderr and
+redirect it to a file at the same time.
+
+This procedure does not free `stdout` and `stderr` slices before an error is
+returned. Make sure to call `delete` on these slices.
+*/
+@(require_results)
+process_exec :: proc(
+ desc: Process_Desc,
+ allocator: runtime.Allocator,
+ loc := #caller_location,
+) -> (
+ state: Process_State,
+ stdout: []byte,
+ stderr: []byte,
+ err: Error,
+) {
+ assert(desc.stdout == nil, "Cannot redirect stdout when it's being captured", loc)
+ assert(desc.stderr == nil, "Cannot redirect stderr when it's being captured", loc)
+
+ stdout_r, stdout_w := pipe() or_return
+ defer close(stdout_r)
+ stderr_r, stderr_w := pipe() or_return
+ defer close(stderr_r)
+
+ process: Process
+ {
+ // NOTE(flysand): Make sure the write-ends are closed, regardless
+ // of the outcome. This makes read-ends readable on our side.
+ defer close(stdout_w)
+ defer close(stderr_w)
+ desc := desc
+ desc.stdout = stdout_w
+ desc.stderr = stderr_w
+ process = process_start(desc) or_return
+ }
+
+ {
+ stdout_b: [dynamic]byte
+ stdout_b.allocator = allocator
+ defer stdout = stdout_b[:]
+
+ stderr_b: [dynamic]byte
+ stderr_b.allocator = allocator
+ defer stderr = stderr_b[:]
+
+ buf: [1024]u8 = ---
+
+ stdout_done, stderr_done, has_data: bool
+ for err == nil && (!stdout_done || !stderr_done) {
+ n := 0
+
+ if !stdout_done {
+ has_data, err = pipe_has_data(stdout_r)
+ if has_data {
+ n, err = read(stdout_r, buf[:])
+ }
+
+ switch err {
+ case nil:
+ _, err = append(&stdout_b, ..buf[:n])
+ case .EOF, .Broken_Pipe:
+ stdout_done = true
+ err = nil
+ }
+ }
+
+ if err == nil && !stderr_done {
+ n = 0
+ has_data, err = pipe_has_data(stderr_r)
+ if has_data {
+ n, err = read(stderr_r, buf[:])
+ }
+
+ switch err {
+ case nil:
+ _, err = append(&stderr_b, ..buf[:n])
+ case .EOF, .Broken_Pipe:
+ stderr_done = true
+ err = nil
+ }
+ }
+ }
+ }
+
+ if err != nil {
+ state, _ = process_wait(process, timeout=0)
+ if !state.exited {
+ _ = process_kill(process)
+ state, _ = process_wait(process)
+ }
+ return
+ }
+
+ state, err = process_wait(process)
+ return
+}
+
+/*
The state of the process after it has finished execution.
*/
Process_State :: struct {
@@ -371,17 +480,17 @@ Process_State :: struct {
}
/*
- Wait for a process event.
+Wait for a process event.
- This procedure blocks the execution until the process has exited or the
- timeout (if specified) has reached zero. If the timeout is `TIMEOUT_INFINITE`,
- no timeout restriction is imposed and the procedure can block indefinately.
+This procedure blocks the execution until the process has exited or the
+timeout (if specified) has reached zero. If the timeout is `TIMEOUT_INFINITE`,
+no timeout restriction is imposed and the procedure can block indefinately.
- If the timeout has expired, the `General_Error.Timeout` is returned as
- the error.
+If the timeout has expired, the `General_Error.Timeout` is returned as
+the error.
- If an error is returned for any other reason, other than timeout, the
- process state is considered undetermined.
+If an error is returned for any other reason, other than timeout, the
+process state is considered undetermined.
*/
@(require_results)
process_wait :: proc(process: Process, timeout := TIMEOUT_INFINITE) -> (Process_State, Error) {
@@ -389,12 +498,12 @@ process_wait :: proc(process: Process, timeout := TIMEOUT_INFINITE) -> (Process_
}
/*
- Close the handle to a process.
+Close the handle to a process.
- This procedure closes the handle associated with a process. It **does not**
- terminate a process, in case it was running. In case a termination is
- desired, kill the process first, wait for the process to finish,
- then close the handle.
+This procedure closes the handle associated with a process. It **does not**
+terminate a process, in case it was running. In case a termination is
+desired, kill the process first, wait for the process to finish,
+then close the handle.
*/
@(require_results)
process_close :: proc(process: Process) -> (Error) {
@@ -402,10 +511,9 @@ process_close :: proc(process: Process) -> (Error) {
}
/*
- Terminate a process.
-
- This procedure terminates a process, specified by it's handle, `process`.
+Terminate a process.
+This procedure terminates a process, specified by it's handle, `process`.
*/
@(require_results)
process_kill :: proc(process: Process) -> (Error) {
diff --git a/core/os/os2/process_linux.odin b/core/os/os2/process_linux.odin
index ea5ee41b1..7eb4dfa44 100644
--- a/core/os/os2/process_linux.odin
+++ b/core/os/os2/process_linux.odin
@@ -523,7 +523,7 @@ _process_start :: proc(desc: Process_Desc) -> (process: Process, err: Error) {
write_errno_to_parent_and_abort :: proc(parent_fd: linux.Fd, errno: linux.Errno) -> ! {
error_byte: [1]u8 = { u8(errno) }
linux.write(parent_fd, error_byte[:])
- intrinsics.trap()
+ linux.exit(126)
}
stdin_fd: linux.Fd
diff --git a/core/os/os2/process_posix.odin b/core/os/os2/process_posix.odin
index 5ac6babc1..b54374cec 100644
--- a/core/os/os2/process_posix.odin
+++ b/core/os/os2/process_posix.odin
@@ -163,7 +163,7 @@ _process_start :: proc(desc: Process_Desc) -> (process: Process, err: Error) {
#assert(len(posix.Errno) < max(u8))
errno := u8(posix.errno())
posix.write(parent_fd, &errno, 1)
- runtime.trap()
+ posix.exit(126)
}
null := posix.open("/dev/null", {.RDWR})
@@ -223,7 +223,6 @@ _process_start :: proc(desc: Process_Desc) -> (process: Process, err: Error) {
return
}
- process.pid = int(pid)
process, _ = _process_open(int(pid), {})
return
}
diff --git a/core/os/os2/process_posix_other.odin b/core/os/os2/process_posix_other.odin
index 77dbfa7eb..65da3e9e2 100644
--- a/core/os/os2/process_posix_other.odin
+++ b/core/os/os2/process_posix_other.odin
@@ -15,6 +15,7 @@ _process_list :: proc(allocator: runtime.Allocator) -> (list: []int, err: Error)
}
_process_open :: proc(pid: int, flags: Process_Open_Flags) -> (process: Process, err: Error) {
+ process.pid = pid
err = .Unsupported
return
}
diff --git a/core/os/os2/process_windows.odin b/core/os/os2/process_windows.odin
index 0c32373f3..1984cbfdf 100644
--- a/core/os/os2/process_windows.odin
+++ b/core/os/os2/process_windows.odin
@@ -442,7 +442,7 @@ _process_start :: proc(desc: Process_Desc) -> (process: Process, err: Error) {
stderr_handle = win32.HANDLE((^File_Impl)(desc.stderr.impl).fd)
}
if desc.stdin != nil {
- stdin_handle = win32.HANDLE((^File_Impl)(desc.stderr.impl).fd)
+ stdin_handle = win32.HANDLE((^File_Impl)(desc.stdin.impl).fd)
}
working_dir_w := (win32_utf8_to_wstring(desc.working_dir, temp_allocator()) or_else nil) if len(desc.working_dir) > 0 else nil
@@ -650,26 +650,30 @@ _build_command_line :: proc(command: []string, allocator: runtime.Allocator) ->
strings.write_byte(&builder, ' ')
}
j := 0
- strings.write_byte(&builder, '"')
- for j < len(arg) {
- backslashes := 0
- for j < len(arg) && arg[j] == '\\' {
- backslashes += 1
+ if strings.contains_any(arg, "()[]{}^=;!'+,`~\" ") {
+ strings.write_byte(&builder, '"')
+ for j < len(arg) {
+ backslashes := 0
+ for j < len(arg) && arg[j] == '\\' {
+ backslashes += 1
+ j += 1
+ }
+ if j == len(arg) {
+ _write_byte_n_times(&builder, '\\', 2*backslashes)
+ break
+ } else if arg[j] == '"' {
+ _write_byte_n_times(&builder, '\\', 2*backslashes+1)
+ strings.write_byte(&builder, arg[j])
+ } else {
+ _write_byte_n_times(&builder, '\\', backslashes)
+ strings.write_byte(&builder, arg[j])
+ }
j += 1
}
- if j == len(arg) {
- _write_byte_n_times(&builder, '\\', 2*backslashes)
- break
- } else if arg[j] == '"' {
- _write_byte_n_times(&builder, '\\', 2*backslashes+1)
- strings.write_byte(&builder, '"')
- } else {
- _write_byte_n_times(&builder, '\\', backslashes)
- strings.write_byte(&builder, arg[j])
- }
- j += 1
+ strings.write_byte(&builder, '"')
+ } else {
+ strings.write_string(&builder, arg)
}
- strings.write_byte(&builder, '"')
}
return strings.to_string(builder)
}
diff --git a/core/os/os2/stat_windows.odin b/core/os/os2/stat_windows.odin
index 8ed2a6fed..0a019e9da 100644
--- a/core/os/os2/stat_windows.odin
+++ b/core/os/os2/stat_windows.odin
@@ -200,22 +200,21 @@ _file_type_mode_from_file_attributes :: proc(file_attributes: win32.DWORD, h: wi
} else {
mode |= 0o666
}
+
is_sym := false
if file_attributes & win32.FILE_ATTRIBUTE_REPARSE_POINT == 0 {
is_sym = false
} else {
is_sym = ReparseTag == win32.IO_REPARSE_TAG_SYMLINK || ReparseTag == win32.IO_REPARSE_TAG_MOUNT_POINT
}
+
if is_sym {
type = .Symlink
- } else {
- if file_attributes & win32.FILE_ATTRIBUTE_DIRECTORY != 0 {
- type = .Directory
- mode |= 0o111
- }
- if h != nil {
- type = file_type(h)
- }
+ } else if file_attributes & win32.FILE_ATTRIBUTE_DIRECTORY != 0 {
+ type = .Directory
+ mode |= 0o111
+ } else if h != nil {
+ type = file_type(h)
}
return
}
diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin
index 371485a47..b09a41fbf 100644
--- a/core/os/os_darwin.odin
+++ b/core/os/os_darwin.odin
@@ -1061,7 +1061,7 @@ absolute_path_from_handle :: proc(fd: Handle) -> (path: string, err: Error) {
}
@(require_results)
-absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
+absolute_path_from_relative :: proc(rel: string, allocator := context.allocator) -> (path: string, err: Error) {
rel := rel
if rel == "" {
rel = "."
@@ -1076,9 +1076,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
}
defer _unix_free(rawptr(path_ptr))
- path = strings.clone(string(path_ptr))
-
- return path, nil
+ return strings.clone(string(path_ptr), allocator)
}
access :: proc(path: string, mask: int) -> bool {
diff --git a/core/os/os_freebsd.odin b/core/os/os_freebsd.odin
index f617cf973..837e79f4d 100644
--- a/core/os/os_freebsd.odin
+++ b/core/os/os_freebsd.odin
@@ -789,7 +789,7 @@ absolute_path_from_handle :: proc(fd: Handle) -> (string, Error) {
}
@(require_results)
-absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
+absolute_path_from_relative :: proc(rel: string, allocator := context.allocator) -> (path: string, err: Error) {
rel := rel
if rel == "" {
rel = "."
@@ -804,10 +804,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
}
defer _unix_free(rawptr(path_ptr))
-
- path = strings.clone(string(path_ptr))
-
- return path, nil
+ return strings.clone(string(path_ptr), allocator)
}
access :: proc(path: string, mask: int) -> (bool, Error) {
diff --git a/core/os/os_haiku.odin b/core/os/os_haiku.odin
index 0d2c334be..4ad370724 100644
--- a/core/os/os_haiku.odin
+++ b/core/os/os_haiku.odin
@@ -431,7 +431,7 @@ absolute_path_from_handle :: proc(fd: Handle) -> (string, Error) {
}
@(require_results)
-absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
+absolute_path_from_relative :: proc(rel: string, allocator := context.allocator) -> (path: string, err: Error) {
rel := rel
if rel == "" {
rel = "."
@@ -447,9 +447,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
defer _unix_free(path_ptr)
path_cstr := cstring(path_ptr)
- path = strings.clone(string(path_cstr))
-
- return path, nil
+ return strings.clone(string(path_cstr), allocator)
}
access :: proc(path: string, mask: int) -> (bool, Error) {
diff --git a/core/os/os_linux.odin b/core/os/os_linux.odin
index 8c8cd7f73..e023ce7cb 100644
--- a/core/os/os_linux.odin
+++ b/core/os/os_linux.odin
@@ -242,10 +242,13 @@ F_SETFL: int : 4 /* Set file flags */
// NOTE(zangent): These are OS specific!
// Do not mix these up!
-RTLD_LAZY :: 0x001
-RTLD_NOW :: 0x002
-RTLD_BINDING_MASK :: 0x3
-RTLD_GLOBAL :: 0x100
+RTLD_LAZY :: 0x0001
+RTLD_NOW :: 0x0002
+RTLD_BINDING_MASK :: 0x0003
+RTLD_GLOBAL :: 0x0100
+RTLD_NOLOAD :: 0x0004
+RTLD_DEEPBIND :: 0x0008
+RTLD_NODELETE :: 0x1000
socklen_t :: c.int
@@ -487,7 +490,7 @@ foreign libc {
@(link_name="free") _unix_free :: proc(ptr: rawptr) ---
@(link_name="realloc") _unix_realloc :: proc(ptr: rawptr, size: c.size_t) -> rawptr ---
- @(link_name="execvp") _unix_execvp :: proc(path: cstring, argv: [^]cstring) -> int ---
+ @(link_name="execvp") _unix_execvp :: proc(path: cstring, argv: [^]cstring) -> c.int ---
@(link_name="getenv") _unix_getenv :: proc(cstring) -> cstring ---
@(link_name="putenv") _unix_putenv :: proc(cstring) -> c.int ---
@(link_name="setenv") _unix_setenv :: proc(key: cstring, value: cstring, overwrite: c.int) -> c.int ---
@@ -914,7 +917,7 @@ absolute_path_from_handle :: proc(fd: Handle) -> (string, Error) {
}
@(require_results)
-absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
+absolute_path_from_relative :: proc(rel: string, allocator := context.allocator) -> (path: string, err: Error) {
rel := rel
if rel == "" {
rel = "."
@@ -929,9 +932,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
}
defer _unix_free(rawptr(path_ptr))
- path = strings.clone(string(path_ptr))
-
- return path, nil
+ return strings.clone(string(path_ptr), allocator)
}
access :: proc(path: string, mask: int) -> (bool, Error) {
diff --git a/core/os/os_netbsd.odin b/core/os/os_netbsd.odin
index 493527803..e3ba760a4 100644
--- a/core/os/os_netbsd.odin
+++ b/core/os/os_netbsd.odin
@@ -844,7 +844,7 @@ absolute_path_from_handle :: proc(fd: Handle) -> (path: string, err: Error) {
}
@(require_results)
-absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
+absolute_path_from_relative :: proc(rel: string, allocator := context.allocator) -> (path: string, err: Error) {
rel := rel
if rel == "" {
rel = "."
@@ -859,9 +859,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
}
defer _unix_free(rawptr(path_ptr))
- path = strings.clone(string(path_ptr))
-
- return path, nil
+ return strings.clone(string(path_ptr), allocator)
}
access :: proc(path: string, mask: int) -> (bool, Error) {
diff --git a/core/os/os_openbsd.odin b/core/os/os_openbsd.odin
index 62872d9dc..3c377968c 100644
--- a/core/os/os_openbsd.odin
+++ b/core/os/os_openbsd.odin
@@ -758,7 +758,7 @@ absolute_path_from_handle :: proc(fd: Handle) -> (string, Error) {
}
@(require_results)
-absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
+absolute_path_from_relative :: proc(rel: string, allocator := context.allocator) -> (path: string, err: Error) {
rel := rel
if rel == "" {
rel = "."
@@ -773,9 +773,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Error) {
}
defer _unix_free(rawptr(path_ptr))
- path = strings.clone(string(path_ptr))
-
- return path, nil
+ return strings.clone(string(path_ptr), allocator)
}
access :: proc(path: string, mask: int) -> (bool, Error) {
diff --git a/core/path/filepath/match.odin b/core/path/filepath/match.odin
index 7eb72b9a7..003f8046d 100644
--- a/core/path/filepath/match.odin
+++ b/core/path/filepath/match.odin
@@ -246,6 +246,13 @@ glob :: proc(pattern: string, allocator := context.allocator) -> (matches: []str
if err != .None {
return
}
+ defer {
+ for s in m {
+ delete(s)
+ }
+ delete(m)
+ }
+
dmatches := make([dynamic]string, 0, 0)
for d in m {
dmatches, err = _glob(d, file, &dmatches)
diff --git a/core/path/filepath/path_unix.odin b/core/path/filepath/path_unix.odin
index a18dc739e..35b98a7ae 100644
--- a/core/path/filepath/path_unix.odin
+++ b/core/path/filepath/path_unix.odin
@@ -1,14 +1,10 @@
#+build linux, darwin, freebsd, openbsd, netbsd
package filepath
-when ODIN_OS == .Darwin {
- foreign import libc "system:System.framework"
-} else {
- foreign import libc "system:c"
-}
-
import "base:runtime"
+
import "core:strings"
+import "core:sys/posix"
SEPARATOR :: '/'
SEPARATOR_STRING :: `/`
@@ -28,11 +24,11 @@ abs :: proc(path: string, allocator := context.allocator) -> (string, bool) {
rel = "."
}
rel_cstr := strings.clone_to_cstring(rel, context.temp_allocator)
- path_ptr := realpath(rel_cstr, nil)
+ path_ptr := posix.realpath(rel_cstr, nil)
if path_ptr == nil {
- return "", __error()^ == 0
+ return "", posix.errno() == nil
}
- defer _unix_free(rawptr(path_ptr))
+ defer posix.free(path_ptr)
path_str := strings.clone(string(path_ptr), allocator)
return path_str, true
@@ -48,26 +44,3 @@ join :: proc(elems: []string, allocator := context.allocator) -> (joined: string
}
return "", nil
}
-
-@(private)
-foreign libc {
- realpath :: proc(path: cstring, resolved_path: [^]byte = nil) -> cstring ---
- @(link_name="free") _unix_free :: proc(ptr: rawptr) ---
-
-}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD {
- @(private)
- foreign libc {
- @(link_name="__error") __error :: proc() -> ^i32 ---
- }
-} else when ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD {
- @(private)
- foreign libc {
- @(link_name="__errno") __error :: proc() -> ^i32 ---
- }
-} else {
- @(private)
- foreign libc {
- @(link_name="__errno_location") __error :: proc() -> ^i32 ---
- }
-}
diff --git a/core/reflect/reflect.odin b/core/reflect/reflect.odin
index c04afb380..7f79acb77 100644
--- a/core/reflect/reflect.odin
+++ b/core/reflect/reflect.odin
@@ -31,8 +31,6 @@ Type_Info_Enum :: runtime.Type_Info_Enum
Type_Info_Map :: runtime.Type_Info_Map
Type_Info_Bit_Set :: runtime.Type_Info_Bit_Set
Type_Info_Simd_Vector :: runtime.Type_Info_Simd_Vector
-Type_Info_Relative_Pointer :: runtime.Type_Info_Relative_Pointer
-Type_Info_Relative_Multi_Pointer :: runtime.Type_Info_Relative_Multi_Pointer
Type_Info_Matrix :: runtime.Type_Info_Matrix
Type_Info_Soa_Pointer :: runtime.Type_Info_Soa_Pointer
Type_Info_Bit_Field :: runtime.Type_Info_Bit_Field
@@ -67,8 +65,6 @@ Type_Kind :: enum {
Map,
Bit_Set,
Simd_Vector,
- Relative_Pointer,
- Relative_Multi_Pointer,
Matrix,
Soa_Pointer,
Bit_Field,
@@ -80,35 +76,33 @@ type_kind :: proc(T: typeid) -> Type_Kind {
ti := type_info_of(T)
if ti != nil {
switch _ in ti.variant {
- case Type_Info_Named: return .Named
- case Type_Info_Integer: return .Integer
- case Type_Info_Rune: return .Rune
- case Type_Info_Float: return .Float
- case Type_Info_Complex: return .Complex
- case Type_Info_Quaternion: return .Quaternion
- case Type_Info_String: return .String
- case Type_Info_Boolean: return .Boolean
- case Type_Info_Any: return .Any
- case Type_Info_Type_Id: return .Type_Id
- case Type_Info_Pointer: return .Pointer
- case Type_Info_Multi_Pointer: return .Multi_Pointer
- case Type_Info_Procedure: return .Procedure
- case Type_Info_Array: return .Array
- case Type_Info_Enumerated_Array: return .Enumerated_Array
- case Type_Info_Dynamic_Array: return .Dynamic_Array
- case Type_Info_Slice: return .Slice
- case Type_Info_Parameters: return .Tuple
- case Type_Info_Struct: return .Struct
- case Type_Info_Union: return .Union
- case Type_Info_Enum: return .Enum
- case Type_Info_Map: return .Map
- case Type_Info_Bit_Set: return .Bit_Set
- case Type_Info_Simd_Vector: return .Simd_Vector
- case Type_Info_Relative_Pointer: return .Relative_Pointer
- case Type_Info_Relative_Multi_Pointer: return .Relative_Multi_Pointer
- case Type_Info_Matrix: return .Matrix
- case Type_Info_Soa_Pointer: return .Soa_Pointer
- case Type_Info_Bit_Field: return .Bit_Field
+ case Type_Info_Named: return .Named
+ case Type_Info_Integer: return .Integer
+ case Type_Info_Rune: return .Rune
+ case Type_Info_Float: return .Float
+ case Type_Info_Complex: return .Complex
+ case Type_Info_Quaternion: return .Quaternion
+ case Type_Info_String: return .String
+ case Type_Info_Boolean: return .Boolean
+ case Type_Info_Any: return .Any
+ case Type_Info_Type_Id: return .Type_Id
+ case Type_Info_Pointer: return .Pointer
+ case Type_Info_Multi_Pointer: return .Multi_Pointer
+ case Type_Info_Procedure: return .Procedure
+ case Type_Info_Array: return .Array
+ case Type_Info_Enumerated_Array: return .Enumerated_Array
+ case Type_Info_Dynamic_Array: return .Dynamic_Array
+ case Type_Info_Slice: return .Slice
+ case Type_Info_Parameters: return .Tuple
+ case Type_Info_Struct: return .Struct
+ case Type_Info_Union: return .Union
+ case Type_Info_Enum: return .Enum
+ case Type_Info_Map: return .Map
+ case Type_Info_Bit_Set: return .Bit_Set
+ case Type_Info_Simd_Vector: return .Simd_Vector
+ case Type_Info_Matrix: return .Matrix
+ case Type_Info_Soa_Pointer: return .Soa_Pointer
+ case Type_Info_Bit_Field: return .Bit_Field
}
}
@@ -723,6 +717,27 @@ enum_name_from_value_any :: proc(value: any) -> (name: string, ok: bool) {
return
}
+/*
+Returns whether the value given has a defined name in the enum type.
+*/
+@(require_results)
+enum_value_has_name :: proc(value: $T) -> bool where intrinsics.type_is_enum(T) {
+ when len(T) == cap(T) {
+ return value >= min(T) && value <= max(T)
+ } else {
+ if value < min(T) || value > max(T) {
+ return false
+ }
+
+ for valid_value in T {
+ if valid_value == value {
+ return true
+ }
+ }
+
+ return false
+ }
+}
@@ -1468,21 +1483,6 @@ as_string :: proc(a: any) -> (value: string, valid: bool) {
}
@(require_results)
-relative_pointer_to_absolute :: proc(a: any) -> rawptr {
- if a == nil { return nil }
- a := a
- ti := runtime.type_info_core(type_info_of(a.id))
- a.id = ti.id
-
- #partial switch info in ti.variant {
- case Type_Info_Relative_Pointer:
- return relative_pointer_to_absolute_raw(a.data, info.base_integer.id)
- }
- return nil
-}
-
-
-@(require_results)
relative_pointer_to_absolute_raw :: proc(data: rawptr, base_integer_id: typeid) -> rawptr {
_handle :: proc(ptr: ^$T) -> rawptr where intrinsics.type_is_integer(T) {
if ptr^ == 0 {
@@ -1543,10 +1543,6 @@ as_pointer :: proc(a: any) -> (value: rawptr, valid: bool) {
case cstring: value = rawptr(v)
case: valid = false
}
-
- case Type_Info_Relative_Pointer:
- valid = true
- value = relative_pointer_to_absolute_raw(a.data, info.base_integer.id)
}
return
@@ -1656,8 +1652,6 @@ equal :: proc(a, b: any, including_indirect_array_recursion := false, recursion_
Type_Info_Bit_Set,
Type_Info_Enum,
Type_Info_Simd_Vector,
- Type_Info_Relative_Pointer,
- Type_Info_Relative_Multi_Pointer,
Type_Info_Soa_Pointer,
Type_Info_Matrix:
return runtime.memory_compare(a.data, b.data, t.size) == 0
diff --git a/core/reflect/types.odin b/core/reflect/types.odin
index 4f0674dc8..cb31a27e2 100644
--- a/core/reflect/types.odin
+++ b/core/reflect/types.odin
@@ -158,14 +158,6 @@ are_types_identical :: proc(a, b: ^Type_Info) -> bool {
case Type_Info_Simd_Vector:
y := b.variant.(Type_Info_Simd_Vector) or_return
return x.count == y.count && x.elem == y.elem
-
- case Type_Info_Relative_Pointer:
- y := b.variant.(Type_Info_Relative_Pointer) or_return
- return x.base_integer == y.base_integer && x.pointer == y.pointer
-
- case Type_Info_Relative_Multi_Pointer:
- y := b.variant.(Type_Info_Relative_Multi_Pointer) or_return
- return x.base_integer == y.base_integer && x.pointer == y.pointer
case Type_Info_Matrix:
y := b.variant.(Type_Info_Matrix) or_return
@@ -392,18 +384,6 @@ is_simd_vector :: proc(info: ^Type_Info) -> bool {
_, ok := type_info_base(info).variant.(Type_Info_Simd_Vector)
return ok
}
-@(require_results)
-is_relative_pointer :: proc(info: ^Type_Info) -> bool {
- if info == nil { return false }
- _, ok := type_info_base(info).variant.(Type_Info_Relative_Pointer)
- return ok
-}
-@(require_results)
-is_relative_multi_pointer :: proc(info: ^Type_Info) -> bool {
- if info == nil { return false }
- _, ok := type_info_base(info).variant.(Type_Info_Relative_Multi_Pointer)
- return ok
-}
@(require_results)
@@ -736,18 +716,6 @@ write_type_writer :: #force_no_inline proc(w: io.Writer, ti: ^Type_Info, n_writt
io.write_i64(w, i64(info.count), 10, &n) or_return
io.write_byte(w, ']', &n) or_return
write_type(w, info.elem, &n) or_return
-
- case Type_Info_Relative_Pointer:
- io.write_string(w, "#relative(", &n) or_return
- write_type(w, info.base_integer, &n) or_return
- io.write_string(w, ") ", &n) or_return
- write_type(w, info.pointer, &n) or_return
-
- case Type_Info_Relative_Multi_Pointer:
- io.write_string(w, "#relative(", &n) or_return
- write_type(w, info.base_integer, &n) or_return
- io.write_string(w, ") ", &n) or_return
- write_type(w, info.pointer, &n) or_return
case Type_Info_Matrix:
if info.layout == .Row_Major {
diff --git a/core/simd/x86/sse2.odin b/core/simd/x86/sse2.odin
index aaddbe6b4..4c231c377 100644
--- a/core/simd/x86/sse2.odin
+++ b/core/simd/x86/sse2.odin
@@ -240,7 +240,7 @@ _mm_sll_epi64 :: #force_inline proc "c" (a, count: __m128i) -> __m128i {
}
@(require_results, enable_target_feature="sse2")
_mm_srai_epi16 :: #force_inline proc "c" (a: __m128i, $IMM8: u32) -> __m128i {
- return transmute(__m128i)psraiw(transmute(i16x8)a. IMM8)
+ return transmute(__m128i)psraiw(transmute(i16x8)a, IMM8)
}
@(require_results, enable_target_feature="sse2")
_mm_sra_epi16 :: #force_inline proc "c" (a, count: __m128i) -> __m128i {
@@ -262,7 +262,7 @@ _mm_srli_si128 :: #force_inline proc "c" (a: __m128i, $IMM8: u32) -> __m128i {
}
@(require_results, enable_target_feature="sse2")
_mm_srli_epi16 :: #force_inline proc "c" (a: __m128i, $IMM8: u32) -> __m128i {
- return transmute(__m128i)psrliw(transmute(i16x8)a. IMM8)
+ return transmute(__m128i)psrliw(transmute(i16x8)a, IMM8)
}
@(require_results, enable_target_feature="sse2")
_mm_srl_epi16 :: #force_inline proc "c" (a, count: __m128i) -> __m128i {
diff --git a/core/slice/map.odin b/core/slice/map.odin
index 545ba8305..c68488d26 100644
--- a/core/slice/map.odin
+++ b/core/slice/map.odin
@@ -48,11 +48,11 @@ map_entries :: proc(m: $M/map[$K]$V, allocator := context.allocator) -> (entries
return
}
-map_entry_infos :: proc(m: $M/map[$K]$V, allocator := context.allocator) -> (entries: []Map_Entry_Info(K, V)) #no_bounds_check {
+map_entry_infos :: proc(m: $M/map[$K]$V, allocator := context.allocator) -> (entries: []Map_Entry_Info(K, V), err: runtime.Allocator_Error) #no_bounds_check {
m := m
rm := (^runtime.Raw_Map)(&m)
- info := type_info_base(type_info_of(M)).variant.(Type_Info_Map)
+ info := runtime.type_info_base(type_info_of(M)).variant.(runtime.Type_Info_Map)
if info.map_info != nil {
entries = make(type_of(entries), len(m), allocator) or_return
@@ -61,8 +61,8 @@ map_entry_infos :: proc(m: $M/map[$K]$V, allocator := context.allocator) -> (ent
entry_index := 0
for bucket_index in 0..<map_cap {
if hash := hs[bucket_index]; runtime.map_hash_is_valid(hash) {
- key := runtime.map_cell_index_dynamic(ks, &info.map_info.ks, bucket_index)
- value := runtime.map_cell_index_dynamic(vs, &info.map_info.vs, bucket_index)
+ key := runtime.map_cell_index_dynamic(ks, info.map_info.ks, bucket_index)
+ value := runtime.map_cell_index_dynamic(vs, info.map_info.vs, bucket_index)
entries[entry_index].hash = hash
entries[entry_index].key = (^K)(key)^
entries[entry_index].value = (^V)(value)^
diff --git a/core/slice/slice.odin b/core/slice/slice.odin
index 99ad15547..c31edf281 100644
--- a/core/slice/slice.odin
+++ b/core/slice/slice.odin
@@ -37,6 +37,17 @@ to_bytes :: proc "contextless" (s: []$T) -> []byte {
}
/*
+ Turns a byte slice into a type.
+*/
+@(require_results)
+to_type :: proc(buf: []u8, $T: typeid) -> (T, bool) #optional_ok {
+ if len(buf) < size_of(T) {
+ return {}, false
+ }
+ return intrinsics.unaligned_load((^T)(raw_data(buf))), true
+}
+
+/*
Turn a slice of one type, into a slice of another type.
Only converts the type and length of the slice itself.
@@ -96,9 +107,37 @@ contains :: proc(array: $T/[]$E, value: E) -> bool where intrinsics.type_is_comp
return found
}
+/*
+Searches the given slice for the given element in O(n) time.
+
+If you need a custom search condition, see `linear_search_proc`
+
+Inputs:
+- array: The slice to search in.
+- key: The element to search for.
+
+Returns:
+- index: The index `i`, such that `array[i]` is the first occurrence of `key` in `array`, or -1 if `key` is not present in `array`.
+
+Example:
+ index: int
+ found: bool
+
+ a := []i32{10, 10, 10, 20}
+
+ index, found = linear_search_reverse(a, 10)
+ assert(index == 0 && found == true)
+
+ index, found = linear_search_reverse(a, 30)
+ assert(index == -1 && found == false)
+
+ // Note that `index == 1`, since it is relative to `a[2:]`
+ index, found = linear_search_reverse(a[2:], 20)
+ assert(index == 1 && found == true)
+*/
@(require_results)
linear_search :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool)
- where intrinsics.type_is_comparable(T) #no_bounds_check {
+ where intrinsics.type_is_comparable(T) {
for x, i in array {
if x == key {
return i, true
@@ -107,8 +146,18 @@ linear_search :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool)
return -1, false
}
+/*
+Searches the given slice for the first element satisfying predicate `f` in O(n) time.
+
+Inputs:
+- array: The slice to search in.
+- f: The search condition.
+
+Returns:
+- index: The index `i`, such that `array[i]` is the first `x` in `array` for which `f(x) == true`, or -1 if such `x` does not exist.
+*/
@(require_results)
-linear_search_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, found: bool) #no_bounds_check {
+linear_search_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, found: bool) {
for x, i in array {
if f(x) {
return i, true
@@ -118,22 +167,88 @@ linear_search_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, f
}
/*
- Binary search searches the given slice for the given element.
- If the slice is not sorted, the returned index is unspecified and meaningless.
+Searches the given slice for the given element in O(n) time, starting from the
+slice end.
+
+If you need a custom search condition, see `linear_search_reverse_proc`
+
+Inputs:
+- array: The slice to search in.
+- key: The element to search for.
- If the value is found then the returned int is the index of the matching element.
- If there are multiple matches, then any one of the matches could be returned.
+Returns:
+- index: The index `i`, such that `array[i]` is the last occurrence of `key` in `array`, or -1 if `key` is not present in `array`.
- If the value is not found then the returned int is the index where a matching
- element could be inserted while maintaining sorted order.
+Example:
+ index: int
+ found: bool
+
+ a := []i32{10, 10, 10, 20}
+
+ index, found = linear_search_reverse(a, 20)
+ assert(index == 3 && found == true)
- # Examples
+ index, found = linear_search_reverse(a, 10)
+ assert(index == 2 && found == true)
+ index, found = linear_search_reverse(a, 30)
+ assert(index == -1 && found == false)
+
+ // Note that `index == 1`, since it is relative to `a[2:]`
+ index, found = linear_search_reverse(a[2:], 20)
+ assert(index == 1 && found == true)
+*/
+@(require_results)
+linear_search_reverse :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool)
+ where intrinsics.type_is_comparable(T) {
+ #reverse for x, i in array {
+ if x == key {
+ return i, true
+ }
+ }
+ return -1, false
+}
+
+/*
+Searches the given slice for the last element satisfying predicate `f` in O(n)
+time, starting from the slice end.
+
+Inputs:
+- array: The slice to search in.
+- f: The search condition.
+
+Returns:
+- index: The index `i`, such that `array[i]` is the last `x` in `array` for which `f(x) == true`, or -1 if such `x` does not exist.
+*/
+@(require_results)
+linear_search_reverse_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, found: bool) {
+ #reverse for x, i in array {
+ if f(x) {
+ return i, true
+ }
+ }
+ return -1, false
+}
+
+/*
+Searches the given slice for the given element.
+If the slice is not sorted, the returned index is unspecified and meaningless.
+
+If the value is found then the returned int is the index of the matching element.
+If there are multiple matches, then any one of the matches could be returned.
+
+If the value is not found then the returned int is the index where a matching
+element could be inserted while maintaining sorted order.
+
+For slices of more complex types see: `binary_search_by`
+
+Example:
+ /*
Looks up a series of four elements. The first is found, with a
uniquely determined position; the second and third are not
found; the fourth could match any position in `[1, 4]`.
+ */
- ```
index: int
found: bool
@@ -150,9 +265,6 @@ linear_search_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, f
index, found = slice.binary_search(s, 1)
assert(index >= 1 && index <= 4 && found == true)
- ```
-
- For slices of more complex types see: binary_search_by
*/
@(require_results)
binary_search :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool)
@@ -161,21 +273,21 @@ binary_search :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool)
}
/*
- Binary search searches the given slice for the given element.
- If the slice is not sorted, the returned index is unspecified and meaningless.
+Searches the given slice for the given element.
+If the slice is not sorted, the returned index is unspecified and meaningless.
- If the value is found then the returned int is the index of the matching element.
- If there are multiple matches, then any one of the matches could be returned.
+If the value is found then the returned int is the index of the matching element.
+If there are multiple matches, then any one of the matches could be returned.
- If the value is not found then the returned int is the index where a matching
- element could be inserted while maintaining sorted order.
+If the value is not found then the returned int is the index where a matching
+element could be inserted while maintaining sorted order.
- The array elements and key may be different types. This allows the filter procedure
- to compare keys against a slice of structs, one struct value at a time.
+The array elements and key may be different types. This allows the filter procedure
+to compare keys against a slice of structs, one struct value at a time.
- Returns:
- index: int
- found: bool
+Returns:
+- index: int
+- found: bool
*/
@(require_results)
@@ -359,6 +471,12 @@ is_empty :: proc(a: $T/[]$E) -> bool {
return len(a) == 0
}
+// Gets the byte size of the backing data
+@(require_results)
+size :: proc "contextless" (a: $T/[]$E) -> int {
+ return len(a) * size_of(E)
+}
+
@(require_results)
diff --git a/core/strconv/strconv.odin b/core/strconv/strconv.odin
index b1155c22f..26a737bd1 100644
--- a/core/strconv/strconv.odin
+++ b/core/strconv/strconv.odin
@@ -1121,6 +1121,7 @@ parse_f64_prefix :: proc(str: string) -> (value: f64, nr: int, ok: bool) {
break trunc_block
}
f := f64(mantissa)
+ f_abs := f
if neg {
f = -f
}
@@ -1132,7 +1133,7 @@ parse_f64_prefix :: proc(str: string) -> (value: f64, nr: int, ok: bool) {
f *= pow10[exp-22]
exp = 22
}
- if f > 1e15 || f < 1e-15 {
+ if f_abs > 1e15 || f_abs < 1e-15 {
break trunc_block
}
return f * pow10[exp], nr, true
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index dbc84f8b7..af93ff33c 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -752,7 +752,7 @@ cut :: proc(s: string, rune_offset := int(0), rune_length := int(0)) -> (res: st
count += 1
}
- if rune_length <= 1 {
+ if rune_length < 1 {
return s
}
diff --git a/core/sys/darwin/Foundation/NSApplication.odin b/core/sys/darwin/Foundation/NSApplication.odin
index 7191f6d07..254da75ad 100644
--- a/core/sys/darwin/Foundation/NSApplication.odin
+++ b/core/sys/darwin/Foundation/NSApplication.odin
@@ -108,6 +108,16 @@ Application_setMainMenu :: proc "c" (self: ^Application, menu: ^Menu) {
msgSend(nil, self, "setMainMenu:", menu)
}
+@(objc_type=Application, objc_name="mainWindow")
+Application_mainWindow :: proc "c" (self: ^Application) -> ^Window {
+ return msgSend(^Window, self, "mainWindow")
+}
+
+@(objc_type=Application, objc_name="keyWindow")
+Application_keyWindow :: proc "c" (self: ^Application) -> ^Window {
+ return msgSend(^Window, self, "keyWindow")
+}
+
@(objc_type=Application, objc_name="windows")
Application_windows :: proc "c" (self: ^Application) -> ^Array {
return msgSend(^Array, self, "windows")
diff --git a/core/sys/darwin/mach_darwin.odin b/core/sys/darwin/mach_darwin.odin
index 1e728fe78..01affa6e8 100644
--- a/core/sys/darwin/mach_darwin.odin
+++ b/core/sys/darwin/mach_darwin.odin
@@ -3,17 +3,18 @@ package darwin
foreign import mach "system:System.framework"
import "core:c"
+import "base:intrinsics"
// NOTE(tetra): Unclear whether these should be aligned 16 or not.
// However all other sync primitives are aligned for robustness.
// I cannot currently align these though.
// See core/sys/unix/pthread_linux.odin/pthread_t.
-mach_port_t :: distinct i32
+mach_port_t :: distinct c.uint
task_t :: mach_port_t
semaphore_t :: distinct u64
-kern_return_t :: distinct u64
+kern_return_t :: distinct c.int
thread_act_t :: distinct u64
thread_state_t :: distinct ^u32
thread_list_t :: [^]thread_act_t
@@ -37,11 +38,6 @@ MACH_MSGH_BITS_COMPLEX :: 0x80000000
MACH_PORT_RIGHT_SEND :: 0
MACH_PORT_RIGHT_RECEIVE :: 1
-VM_PROT_NONE :: 0
-VM_PROT_READ :: 1
-VM_PROT_WRITE :: 2
-VM_PROT_EXECUTE :: 4
-
VM_INHERIT_SHARE :: 0
VM_INHERIT_COPY :: 1
VM_INHERIT_NONE :: 2
@@ -58,6 +54,27 @@ ARM_THREAD_STATE64 :: 6
mach_msg_option_t :: distinct i32
name_t :: distinct cstring
+vm_map_t :: mach_port_t
+mem_entry_name_port_t :: mach_port_t
+ipc_space_t :: mach_port_t
+thread_t :: mach_port_t
+
+vm_size_t :: distinct c.uintptr_t
+
+vm_address_t :: vm_offset_t
+vm_offset_t :: distinct c.uintptr_t
+
+// NOTE(beau): typedefed to int in the original headers
+boolean_t :: b32
+
+vm_prot_t :: distinct c.int
+
+vm_inherit_t :: distinct c.uint
+
+mach_port_name_t :: distinct c.uint
+
+sync_policy_t :: distinct c.int
+
mach_msg_port_descriptor_t :: struct {
name: mach_port_t,
_: u32,
@@ -257,20 +274,489 @@ foreign mach {
task_info :: proc(task: task_t, flavor: i32, info: task_info_t, count: ^u32) -> kern_return_t ---
task_terminate :: proc(task: task_t) -> kern_return_t ---
+ semaphore_create :: proc(task: task_t, semaphore: ^semaphore_t, policy: Sync_Policy, value: c.int) -> Kern_Return ---
+ semaphore_destroy :: proc(task: task_t, semaphore: semaphore_t) -> Kern_Return ---
+
+ semaphore_signal :: proc(semaphore: semaphore_t) -> Kern_Return ---
+ semaphore_signal_all :: proc(semaphore: semaphore_t) -> Kern_Return ---
+ semaphore_signal_thread :: proc(semaphore: semaphore_t, thread: thread_t) -> Kern_Return ---
+
+ semaphore_wait :: proc(semaphore: semaphore_t) -> Kern_Return ---
+
thread_get_state :: proc(thread: thread_act_t, flavor: i32, thread_state: thread_state_t, old_state_count: ^u32) -> kern_return_t ---
thread_info :: proc(thread: thread_act_t, flavor: u32, thread_info: ^thread_identifier_info, info_count: ^u32) -> kern_return_t ---
bootstrap_register2 :: proc(bp: mach_port_t, service_name: name_t, sp: mach_port_t, flags: u64) -> kern_return_t ---
bootstrap_look_up :: proc(bp: mach_port_t, service_name: name_t, sp: ^mach_port_t) -> kern_return_t ---
- semaphore_create :: proc(task: task_t, semaphore: ^semaphore_t, policy, value: c.int) -> kern_return_t ---
- semaphore_destroy :: proc(task: task_t, semaphore: semaphore_t) -> kern_return_t ---
+ vm_map :: proc(
+ target_task: vm_map_t,
+ address: ^vm_address_t,
+ size: vm_size_t,
+ mask: vm_address_t,
+ flags: VM_Flags,
+ object: mem_entry_name_port_t,
+ offset: vm_offset_t,
+ copy: boolean_t,
+ cur_protection,
+ max_protection: VM_Prot_Flags,
+ inheritance: VM_Inherit,
+ ) -> Kern_Return ---
+
+ mach_make_memory_entry :: proc(
+ target_task: vm_map_t,
+ size: ^vm_size_t,
+ offset: vm_offset_t,
+ permission: VM_Prot_Flags,
+ object_handle: ^mem_entry_name_port_t,
+ parent_entry: mem_entry_name_port_t,
+ ) -> Kern_Return ---
+}
+
+
+
+Kern_Return :: enum kern_return_t {
+ Success,
+
+ /* Specified address is not currently valid.
+ */
+ Invalid_Address,
+
+ /* Specified memory is valid, but does not permit the
+ * required forms of access.
+ */
+ Protection_Failure,
+
+ /* The address range specified is already in use, or
+ * no address range of the size specified could be
+ * found.
+ */
+ No_Space,
+
+ /* The function requested was not applicable to this
+ * type of argument, or an argument is invalid
+ */
+ Invalid_Argument,
+
+ /* The function could not be performed. A catch-all.
+ */
+ Failure,
+
+ /* A system resource could not be allocated to fulfill
+ * this request. This failure may not be permanent.
+ */
+ Resource_Shortage,
+
+ /* The task in question does not hold receive rights
+ * for the port argument.
+ */
+ Not_Receiver,
+
+ /* Bogus access restriction.
+ */
+ No_Access,
+
+ /* During a page fault, the target address refers to a
+ * memory object that has been destroyed. This
+ * failure is permanent.
+ */
+ Memory_Failure,
+
+ /* During a page fault, the memory object indicated
+ * that the data could not be returned. This failure
+ * may be temporary; future attempts to access this
+ * same data may succeed, as defined by the memory
+ * object.
+ */
+ Memory_Error,
+
+ /* The receive right is already a member of the portset.
+ */
+ Already_In_Set,
+
+ /* The receive right is not a member of a port set.
+ */
+ Not_In_Set,
+
+ /* The name already denotes a right in the task.
+ */
+ Name_Exists,
+
+ /* The operation was aborted. Ipc code will
+ * catch this and reflect it as a message error.
+ */
+ Aborted,
+
+ /* The name doesn't denote a right in the task.
+ */
+ Invalid_Name,
+
+ /* Target task isn't an active task.
+ */
+ Invalid_Task,
+
+ /* The name denotes a right, but not an appropriate right.
+ */
+ Invalid_Right,
+
+ /* A blatant range error.
+ */
+ Invalid_Value,
+
+ /* Operation would overflow limit on user-references.
+ */
+ URefs_Overflow,
+
+ /* The supplied (port) capability is improper.
+ */
+ Invalid_Capability,
+
+ /* The task already has send or receive rights
+ * for the port under another name.
+ */
+ Right_Exists,
+
+ /* Target host isn't actually a host.
+ */
+ Invalid_Host,
+
+ /* An attempt was made to supply "precious" data
+ * for memory that is already present in a
+ * memory object.
+ */
+ Memory_Present,
+
+ /* A page was requested of a memory manager via
+ * memory_object_data_request for an object using
+ * a MEMORY_OBJECT_COPY_CALL strategy, with the
+ * VM_PROT_WANTS_COPY flag being used to specify
+ * that the page desired is for a copy of the
+ * object, and the memory manager has detected
+ * the page was pushed into a copy of the object
+ * while the kernel was walking the shadow chain
+ * from the copy to the object. This error code
+ * is delivered via memory_object_data_error
+ * and is handled by the kernel (it forces the
+ * kernel to restart the fault). It will not be
+ * seen by users.
+ */
+ Memory_Data_Moved,
+
+ /* A strategic copy was attempted of an object
+ * upon which a quicker copy is now possible.
+ * The caller should retry the copy using
+ * vm_object_copy_quickly. This error code
+ * is seen only by the kernel.
+ */
+ Memory_Restart_Copy,
+
+ /* An argument applied to assert processor set privilege
+ * was not a processor set control port.
+ */
+ Invalid_Processor_Set,
+
+ /* The specified scheduling attributes exceed the thread's
+ * limits.
+ */
+ Policy_Limit,
+
+ /* The specified scheduling policy is not currently
+ * enabled for the processor set.
+ */
+ Invalid_Policy,
+
+ /* The external memory manager failed to initialize the
+ * memory object.
+ */
+ Invalid_Object,
+
+ /* A thread is attempting to wait for an event for which
+ * there is already a waiting thread.
+ */
+ Already_Waiting,
+
+ /* An attempt was made to destroy the default processor
+ * set.
+ */
+ Default_Set,
+
+ /* An attempt was made to fetch an exception port that is
+ * protected, or to abort a thread while processing a
+ * protected exception.
+ */
+ Exception_Protected,
+
+ /* A ledger was required but not supplied.
+ */
+ Invalid_Ledger,
+
+ /* The port was not a memory cache control port.
+ */
+ Invalid_Memory_Control,
+
+ /* An argument supplied to assert security privilege
+ * was not a host security port.
+ */
+ Invalid_Security,
+
+ /* thread_depress_abort was called on a thread which
+ * was not currently depressed.
+ */
+ Not_Depressed,
+
+ /* Object has been terminated and is no longer available
+ */
+ Terminated,
+
+ /* Lock set has been destroyed and is no longer available.
+ */
+ Lock_Set_Destroyed,
+
+ /* The thread holding the lock terminated before releasing
+ * the lock
+ */
+ Lock_Unstable,
+
+ /* The lock is already owned by another thread
+ */
+ Lock_Owned,
+
+ /* The lock is already owned by the calling thread
+ */
+ Lock_Owned_Self,
+
+ /* Semaphore has been destroyed and is no longer available.
+ */
+ Semaphore_Destroyed,
+
+ /* Return from RPC indicating the target server was
+ * terminated before it successfully replied
+ */
+ Rpc_Server_Terminated,
+
+ /* Terminate an orphaned activation.
+ */
+ RPC_Terminate_Orphan,
+
+ /* Allow an orphaned activation to continue executing.
+ */
+ RPC_Continue_Orphan,
+
+ /* Empty thread activation (No thread linked to it)
+ */
+ Not_Supported,
+
+ /* Remote node down or inaccessible.
+ */
+ Node_Down,
+
+ /* A signalled thread was not actually waiting. */
+ Not_Waiting,
+
+ /* Some thread-oriented operation (semaphore_wait) timed out
+ */
+ Operation_Timed_Out,
+
+ /* During a page fault, indicates that the page was rejected
+ * as a result of a signature check.
+ */
+ Codesign_Error,
+
+ /* The requested property cannot be changed at this time.
+ */
+ Policy_Static,
+
+ /* The provided buffer is of insufficient size for the requested data.
+ */
+ Insufficient_Buffer_Size,
+
+ /* Denied by security policy
+ */
+ Denied,
+
+ /* The KC on which the function is operating is missing
+ */
+ Missing_KC,
+
+ /* The KC on which the function is operating is invalid
+ */
+ Invalid_KC,
+
+ /* A search or query operation did not return a result
+ */
+ Not_Found,
+
+ /* Maximum return value allowable
+ */
+ Return_Max = 0x100,
+}
+
+/*
+ * VM allocation flags:
+ *
+ * VM_FLAGS_FIXED
+ * (really the absence of VM_FLAGS_ANYWHERE)
+ * Allocate new VM region at the specified virtual address, if possible.
+ *
+ * VM_FLAGS_ANYWHERE
+ * Allocate new VM region anywhere it would fit in the address space.
+ *
+ * VM_FLAGS_PURGABLE
+ * Create a purgable VM object for that new VM region.
+ *
+ * VM_FLAGS_4GB_CHUNK
+ * The new VM region will be chunked up into 4GB sized pieces.
+ *
+ * VM_FLAGS_NO_PMAP_CHECK
+ * (for DEBUG kernel config only, ignored for other configs)
+ * Do not check that there is no stale pmap mapping for the new VM region.
+ * This is useful for kernel memory allocations at bootstrap when building
+ * the initial kernel address space while some memory is already in use.
+ *
+ * VM_FLAGS_OVERWRITE
+ * The new VM region can replace existing VM regions if necessary
+ * (to be used in combination with VM_FLAGS_FIXED).
+ *
+ * VM_FLAGS_NO_CACHE
+ * Pages brought in to this VM region are placed on the speculative
+ * queue instead of the active queue. In other words, they are not
+ * cached so that they will be stolen first if memory runs low.
+ */
+
+@(private="file")
+LOG2 :: intrinsics.constant_log2
+
+VM_Flag :: enum c.int {
+ Anywhere,
+ Purgable,
+ _4GB_Chunk,
+ Random_Addr,
+ No_Cache,
+ Resilient_Codesign,
+ Resilient_Media,
+ Permanent,
+
+ // NOTE(beau): log 2 of the bit we want in the bit set so we get that bit in
+ // the bit set
+
+ TPRO = LOG2(0x1000),
+ Overwrite = LOG2(0x4000),/* delete any existing mappings first */
+
+ Superpage_Size_Any = LOG2(0x10000),
+ Superpage_Size_2MB = LOG2(0x20000),
+ __Superpage3 = LOG2(0x40000),
+
+ Return_Data_Addr = LOG2(0x100000),
+ Return_4K_Data_Addr = LOG2(0x800000),
+
+ Alias_Mask1 = 24,
+ Alias_Mask2,
+ Alias_Mask3,
+ Alias_Mask4,
+ Alias_Mask5,
+ Alias_Mask6,
+ Alias_Mask7,
+ Alias_Mask8,
+
+ HW = TPRO,
+}
+
+VM_Flags :: distinct bit_set[VM_Flag; c.int]
+VM_FLAGS_FIXED :: VM_Flags{}
+
+/*
+ * VM_FLAGS_SUPERPAGE_MASK
+ * 3 bits that specify whether large pages should be used instead of
+ * base pages (!=0), as well as the requested page size.
+ */
+VM_FLAGS_SUPERPAGE_MASK :: VM_Flags {
+ .Superpage_Size_Any,
+ .Superpage_Size_2MB,
+ .__Superpage3,
+}
+
+// 0xFF000000
+VM_FLAGS_ALIAS_MASK :: VM_Flags {
+ .Alias_Mask1,
+ .Alias_Mask2,
+ .Alias_Mask3,
+ .Alias_Mask4,
+ .Alias_Mask5,
+ .Alias_Mask6,
+ .Alias_Mask7,
+ .Alias_Mask8,
+}
+
+VM_GET_FLAGS_ALIAS :: proc(flags: VM_Flags) -> c.int {
+ return transmute(c.int)(flags & VM_FLAGS_ALIAS_MASK) >> 24
+}
+// NOTE(beau): no need for VM_SET_FLAGS_ALIAS, just mask in things from
+// VM_Flag.Alias_Mask*
+
+/* These are the flags that we accept from user-space */
+VM_FLAGS_USER_ALLOCATE :: VM_Flags {
+ .Anywhere,
+ .Purgable,
+ ._4GB_Chunk,
+ .Random_Addr,
+ .No_Cache,
+ .Permanent,
+ .Overwrite,
+} | VM_FLAGS_FIXED | VM_FLAGS_SUPERPAGE_MASK | VM_FLAGS_ALIAS_MASK
+
+VM_FLAGS_USER_MAP :: VM_Flags {
+ .Return_4K_Data_Addr,
+ .Return_Data_Addr,
+} | VM_FLAGS_USER_ALLOCATE
+
+VM_FLAGS_USER_REMAP :: VM_Flags {
+ .Anywhere,
+ .Random_Addr,
+ .Overwrite,
+ .Return_Data_Addr,
+ .Resilient_Codesign,
+ .Resilient_Media,
+} | VM_FLAGS_FIXED
+
+VM_FLAGS_SUPERPAGE_NONE :: VM_Flags{} /* no superpages, if all bits are 0 */
+
+/*
+ * Protection values, defined as bits within the vm_prot_t type
+ */
+
+VM_Prot :: enum vm_prot_t {
+ Read,
+ Write,
+ Execute,
+}
+
+VM_Prot_Flags :: distinct bit_set[VM_Prot; vm_prot_t]
+
+VM_PROT_NONE :: VM_Prot_Flags{}
+VM_PROT_DEFAULT :: VM_Prot_Flags{.Read, .Write}
+VM_PROT_ALL :: VM_Prot_Flags{.Read, .Write, .Execute}
+
+/*
+ * Enumeration of valid values for vm_inherit_t.
+ */
+
+VM_Inherit :: enum vm_inherit_t {
+ Share,
+ Copy,
+ None,
+ Donate_Copy,
+
+ Default = Copy,
+ Last_Valid = None,
+}
+
+Sync_Policy :: enum sync_policy_t {
+ Fifo,
+ Fixed_Priority,
+ Reversed,
+ Order_Mask,
- semaphore_signal :: proc(semaphore: semaphore_t) -> kern_return_t ---
- semaphore_signal_all :: proc(semaphore: semaphore_t) -> kern_return_t ---
- semaphore_signal_thread :: proc(semaphore: semaphore_t, thread: thread_act_t) -> kern_return_t ---
-
- semaphore_wait :: proc(semaphore: semaphore_t) -> kern_return_t ---
+ Lifo = Fifo | Reversed,
}
mach_vm_trunc_page :: proc(v: u64) -> u64 {
diff --git a/core/sys/info/cpu_intel.odin b/core/sys/info/cpu_intel.odin
index d6fa98507..95b53dda0 100644
--- a/core/sys/info/cpu_intel.odin
+++ b/core/sys/info/cpu_intel.odin
@@ -28,6 +28,23 @@ CPU_Feature :: enum u64 {
ssse3, // Supplemental streaming SIMD extension 3
sse41, // Streaming SIMD extension 4 and 4.1
sse42, // Streaming SIMD extension 4 and 4.2
+
+ avx512bf16, // Vector Neural Network Instructions supporting bfloat16
+ avx512bitalg, // Bit Algorithms
+ avx512bw, // Byte and Word instructions
+ avx512cd, // Conflict Detection instructions
+ avx512dq, // Doubleword and Quadword instructions
+ avx512er, // Exponential and Reciprocal instructions
+ avx512f, // Foundation
+ avx512fp16, // Vector 16-bit float instructions
+ avx512ifma, // Integer Fused Multiply Add
+ avx512pf, // Prefetch instructions
+ avx512vbmi, // Vector Byte Manipulation Instructions
+ avx512vbmi2, // Vector Byte Manipulation Instructions 2
+ avx512vl, // Vector Length extensions
+ avx512vnni, // Vector Neural Network Instructions
+ avx512vp2intersect, // Vector Pair Intersection to a Pair of Mask Registers
+ avx512vpopcntdq, // Vector Population Count for Doubleword and Quadword
}
CPU_Features :: distinct bit_set[CPU_Feature; u64]
@@ -82,9 +99,11 @@ init_cpu_features :: proc "c" () {
//
// See: crbug.com/375968
os_supports_avx := false
+ os_supports_avx512 := false
if .os_xsave in set && is_set(26, ecx1) {
eax, _ := xgetbv(0)
os_supports_avx = is_set(1, eax) && is_set(2, eax)
+ os_supports_avx512 = is_set(5, eax) && is_set(6, eax) && is_set(7, eax)
}
if os_supports_avx {
try_set(&set, .avx, 28, ecx1)
@@ -94,11 +113,37 @@ init_cpu_features :: proc "c" () {
return
}
- _, ebx7, _, _ := cpuid(7, 0)
+ _, ebx7, ecx7, edx7 := cpuid(7, 0)
try_set(&set, .bmi1, 3, ebx7)
if os_supports_avx {
try_set(&set, .avx2, 5, ebx7)
}
+ if os_supports_avx512 {
+ try_set(&set, .avx512f, 16, ebx7)
+ try_set(&set, .avx512dq, 17, ebx7)
+ try_set(&set, .avx512ifma, 21, ebx7)
+ try_set(&set, .avx512pf, 26, ebx7)
+ try_set(&set, .avx512er, 27, ebx7)
+ try_set(&set, .avx512cd, 28, ebx7)
+ try_set(&set, .avx512bw, 30, ebx7)
+
+ // XMM/YMM are also required for 128/256-bit instructions
+ if os_supports_avx {
+ try_set(&set, .avx512vl, 31, ebx7)
+ }
+
+ try_set(&set, .avx512vbmi, 1, ecx7)
+ try_set(&set, .avx512vbmi2, 6, ecx7)
+ try_set(&set, .avx512vnni, 11, ecx7)
+ try_set(&set, .avx512bitalg, 12, ecx7)
+ try_set(&set, .avx512vpopcntdq, 14, ecx7)
+
+ try_set(&set, .avx512vp2intersect, 8, edx7)
+ try_set(&set, .avx512fp16, 23, edx7)
+
+ eax7_1, _, _, _ := cpuid(7, 1)
+ try_set(&set, .avx512bf16, 5, eax7_1)
+ }
try_set(&set, .bmi2, 8, ebx7)
try_set(&set, .erms, 9, ebx7)
try_set(&set, .rdseed, 18, ebx7)
diff --git a/core/sys/info/platform_darwin.odin b/core/sys/info/platform_darwin.odin
index 493f038f0..97a2199ab 100644
--- a/core/sys/info/platform_darwin.odin
+++ b/core/sys/info/platform_darwin.odin
@@ -494,6 +494,10 @@ macos_release_map: map[string]Darwin_To_Release = {
"21G816" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 0}}},
"21G920" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 1}}},
"21G1974" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 2}}},
+ "21H1015" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 3}}},
+ "21H1123" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 4}}},
+ "21H1222" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 5}}},
+ "21H1320" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 6}}},
// MacOS Ventura
"22A380" = {{22, 1, 0}, "macOS", {"Ventura", {13, 0, 0}}},
@@ -513,6 +517,15 @@ macos_release_map: map[string]Darwin_To_Release = {
"22G120" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 0}}},
"22G313" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 1}}},
"22G320" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 2}}},
+ "22G436" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 3}}},
+ "22G513" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 4}}},
+ "22G621" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 5}}},
+ "22G630" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 6}}},
+ "22G720" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 7}}},
+ "22G820" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 8}}},
+ "22G830" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 9}}},
+ "22H123" = {{22, 6, 0}, "macOS", {"Ventura", {13, 7, 0}}},
+ "22H221" = {{22, 6, 0}, "macOS", {"Ventura", {13, 7, 1}}},
// MacOS Sonoma
"23A344" = {{23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}},
@@ -531,9 +544,12 @@ macos_release_map: map[string]Darwin_To_Release = {
"23G80" = {{23, 6, 0}, "macOS", {"Sonoma", {14, 6, 0}}},
"23G93" = {{23, 6, 0}, "macOS", {"Sonoma", {14, 6, 1}}},
"23H124" = {{23, 6, 0}, "macOS", {"Sonoma", {14, 7, 0}}},
+ "23H222" = {{23, 6, 0}, "macOS", {"Sonoma", {14, 7, 1}}},
// MacOS Sequoia
"24A335" = {{24, 0, 0}, "macOS", {"Sequoia", {15, 0, 0}}},
+ "24A348" = {{24, 0, 0}, "macOS", {"Sequoia", {15, 0, 1}}},
+ "24B83" = {{24, 1, 0}, "macOS", {"Sequoia", {15, 1, 0}}},
}
@(private)
diff --git a/core/sys/linux/bits.odin b/core/sys/linux/bits.odin
index 8a4a6dd7a..9ce2e206e 100644
--- a/core/sys/linux/bits.odin
+++ b/core/sys/linux/bits.odin
@@ -152,66 +152,43 @@ Errno :: enum i32 {
RDONLY flag is not present, because it has the value of 0, i.e. it is the
default, unless WRONLY or RDWR is specified.
*/
-when ODIN_ARCH != .arm64 && ODIN_ARCH != .arm32 {
- Open_Flags_Bits :: enum {
- WRONLY = 0,
- RDWR = 1,
- CREAT = 6,
- EXCL = 7,
- NOCTTY = 8,
- TRUNC = 9,
- APPEND = 10,
- NONBLOCK = 11,
- DSYNC = 12,
- ASYNC = 13,
- DIRECT = 14,
- LARGEFILE = 15,
- DIRECTORY = 16,
- NOFOLLOW = 17,
- NOATIME = 18,
- CLOEXEC = 19,
- PATH = 21,
- }
- // https://github.com/torvalds/linux/blob/7367539ad4b0f8f9b396baf02110962333719a48/include/uapi/asm-generic/fcntl.h#L19
- #assert(1 << uint(Open_Flags_Bits.WRONLY) == 0o0000000_1)
- #assert(1 << uint(Open_Flags_Bits.RDWR) == 0o0000000_2)
- #assert(1 << uint(Open_Flags_Bits.CREAT) == 0o00000_100)
- #assert(1 << uint(Open_Flags_Bits.EXCL) == 0o00000_200)
- #assert(1 << uint(Open_Flags_Bits.NOCTTY) == 0o00000_400)
- #assert(1 << uint(Open_Flags_Bits.TRUNC) == 0o0000_1000)
- #assert(1 << uint(Open_Flags_Bits.APPEND) == 0o0000_2000)
- #assert(1 << uint(Open_Flags_Bits.NONBLOCK) == 0o0000_4000)
- #assert(1 << uint(Open_Flags_Bits.DSYNC) == 0o000_10000)
- #assert(1 << uint(Open_Flags_Bits.ASYNC) == 0o000_20000)
- #assert(1 << uint(Open_Flags_Bits.DIRECT) == 0o000_40000)
- #assert(1 << uint(Open_Flags_Bits.LARGEFILE) == 0o00_100000)
- #assert(1 << uint(Open_Flags_Bits.DIRECTORY) == 0o00_200000)
- #assert(1 << uint(Open_Flags_Bits.NOFOLLOW) == 0o00_400000)
- #assert(1 << uint(Open_Flags_Bits.NOATIME) == 0o0_1000000)
- #assert(1 << uint(Open_Flags_Bits.CLOEXEC) == 0o0_2000000)
- #assert(1 << uint(Open_Flags_Bits.PATH) == 0o_10000000)
-
-} else {
- Open_Flags_Bits :: enum {
- WRONLY = 0,
- RDWR = 1,
- CREAT = 6,
- EXCL = 7,
- NOCTTY = 8,
- TRUNC = 9,
- APPEND = 10,
- NONBLOCK = 11,
- DSYNC = 12,
- ASYNC = 13,
- DIRECTORY = 14,
- NOFOLLOW = 15,
- DIRECT = 16,
- LARGEFILE = 17,
- NOATIME = 18,
- CLOEXEC = 19,
- PATH = 21,
- }
-}
+Open_Flags_Bits :: enum {
+ WRONLY = 0,
+ RDWR = 1,
+ CREAT = 6,
+ EXCL = 7,
+ NOCTTY = 8,
+ TRUNC = 9,
+ APPEND = 10,
+ NONBLOCK = 11,
+ DSYNC = 12,
+ ASYNC = 13,
+ DIRECT = 14,
+ LARGEFILE = 15,
+ DIRECTORY = 16,
+ NOFOLLOW = 17,
+ NOATIME = 18,
+ CLOEXEC = 19,
+ PATH = 21,
+}
+// https://github.com/torvalds/linux/blob/7367539ad4b0f8f9b396baf02110962333719a48/include/uapi/asm-generic/fcntl.h#L19
+#assert(1 << uint(Open_Flags_Bits.WRONLY) == 0o0000000_1)
+#assert(1 << uint(Open_Flags_Bits.RDWR) == 0o0000000_2)
+#assert(1 << uint(Open_Flags_Bits.CREAT) == 0o00000_100)
+#assert(1 << uint(Open_Flags_Bits.EXCL) == 0o00000_200)
+#assert(1 << uint(Open_Flags_Bits.NOCTTY) == 0o00000_400)
+#assert(1 << uint(Open_Flags_Bits.TRUNC) == 0o0000_1000)
+#assert(1 << uint(Open_Flags_Bits.APPEND) == 0o0000_2000)
+#assert(1 << uint(Open_Flags_Bits.NONBLOCK) == 0o0000_4000)
+#assert(1 << uint(Open_Flags_Bits.DSYNC) == 0o000_10000)
+#assert(1 << uint(Open_Flags_Bits.ASYNC) == 0o000_20000)
+#assert(1 << uint(Open_Flags_Bits.DIRECT) == 0o000_40000)
+#assert(1 << uint(Open_Flags_Bits.LARGEFILE) == 0o00_100000)
+#assert(1 << uint(Open_Flags_Bits.DIRECTORY) == 0o00_200000)
+#assert(1 << uint(Open_Flags_Bits.NOFOLLOW) == 0o00_400000)
+#assert(1 << uint(Open_Flags_Bits.NOATIME) == 0o0_1000000)
+#assert(1 << uint(Open_Flags_Bits.CLOEXEC) == 0o0_2000000)
+#assert(1 << uint(Open_Flags_Bits.PATH) == 0o_10000000)
/*
Bits for FD_Flags bitset
@@ -542,6 +519,36 @@ Fd_Poll_Events_Bits :: enum {
RDHUP = 13,
}
+Inotify_Init_Bits :: enum {
+ NONBLOCK = 11,
+ CLOEXEC = 19,
+}
+
+Inotify_Event_Bits :: enum u32 {
+ ACCESS = 0,
+ MODIFY = 1,
+ ATTRIB = 2,
+ CLOSE_WRITE = 3,
+ CLOSE_NOWRITE = 4,
+ OPEN = 5,
+ MOVED_FROM = 6,
+ MOVED_TO = 7,
+ CREATE = 8,
+ DELETE = 9,
+ DELETE_SELF = 10,
+ MOVE_SELF = 11,
+ UNMOUNT = 13,
+ Q_OVERFLOW = 14,
+ IGNORED = 15,
+ ONLYDIR = 24,
+ DONT_FOLLOW = 25,
+ EXCL_UNLINK = 26,
+ MASK_CREATE = 28,
+ MASK_ADD = 29,
+ ISDIR = 30,
+ ONESHOT = 31,
+}
+
/*
Bits for Mem_Protection bitfield
*/
diff --git a/core/sys/linux/constants.odin b/core/sys/linux/constants.odin
index 129444d0f..b3bbcafb3 100644
--- a/core/sys/linux/constants.odin
+++ b/core/sys/linux/constants.odin
@@ -135,6 +135,31 @@ STATX_BASIC_STATS :: Statx_Mask {
.BLOCKS,
}
+IN_ALL_EVENTS :: Inotify_Event_Mask {
+ .ACCESS,
+ .MODIFY,
+ .ATTRIB,
+ .CLOSE_WRITE,
+ .CLOSE_NOWRITE,
+ .OPEN,
+ .MOVED_FROM,
+ .MOVED_TO,
+ .CREATE,
+ .DELETE,
+ .DELETE_SELF,
+ .MOVE_SELF,
+}
+
+IN_CLOSE :: Inotify_Event_Mask {
+ .CLOSE_WRITE,
+ .CLOSE_NOWRITE,
+}
+
+IN_MOVE :: Inotify_Event_Mask {
+ .MOVED_FROM,
+ .MOVED_TO,
+}
+
/*
Tell `shmget` to create a new key
*/
diff --git a/core/sys/linux/sys.odin b/core/sys/linux/sys.odin
index c5894d78b..690902f07 100644
--- a/core/sys/linux/sys.odin
+++ b/core/sys/linux/sys.odin
@@ -2536,11 +2536,30 @@ waitid :: proc "contextless" (id_type: Id_Type, id: Id, sig_info: ^Sig_Info, opt
// TODO(flysand): ioprio_get
-// TODO(flysand): inotify_init
+inotify_init :: proc "contextless" () -> (Fd, Errno) {
+ when ODIN_ARCH == .arm64 || ODIN_ARCH == .riscv64 {
+ ret := syscall(SYS_inotify_init1, 0)
+ return errno_unwrap(ret, Fd)
+ } else {
+ ret := syscall(SYS_inotify_init)
+ return errno_unwrap(ret, Fd)
+ }
+}
-// TODO(flysand): inotify_add_watch
+inotify_init1 :: proc "contextless" (flags: Inotify_Init_Flags) -> (Fd, Errno) {
+ ret := syscall(SYS_inotify_init1, transmute(i32)flags)
+ return errno_unwrap(ret, Fd)
+}
+
+inotify_add_watch :: proc "contextless" (fd: Fd, pathname: cstring, mask: Inotify_Event_Mask) -> (Wd, Errno) {
+ ret := syscall(SYS_inotify_add_watch, fd, transmute(uintptr) pathname, transmute(u32) mask)
+ return errno_unwrap(ret, Wd)
+}
-// TODO(flysand): inotify_rm_watch
+inotify_rm_watch :: proc "contextless" (fd: Fd, wd: Wd) -> (Errno) {
+ ret := syscall(SYS_inotify_rm_watch, fd, wd)
+ return Errno(-ret)
+}
// TODO(flysand): migrate_pages
diff --git a/core/sys/linux/types.odin b/core/sys/linux/types.odin
index 0e5b8218b..42d5cc988 100644
--- a/core/sys/linux/types.odin
+++ b/core/sys/linux/types.odin
@@ -31,6 +31,11 @@ Id :: distinct uint
Fd :: distinct i32
/*
+ Represents a watch descriptor.
+*/
+Wd :: distinct i32
+
+/*
Type for PID file descriptors.
*/
Pid_FD :: distinct i32
@@ -343,6 +348,18 @@ Poll_Fd :: struct {
revents: Fd_Poll_Events,
}
+Inotify_Init_Flags :: bit_set[Inotify_Init_Bits; i32]
+
+Inotify_Event :: struct {
+ wd: Wd,
+ mask: Inotify_Event_Mask,
+ cookie: u32,
+ len: u32,
+ name: [0]u8,
+}
+
+Inotify_Event_Mask :: bit_set[Inotify_Event_Bits; u32]
+
/*
Specifies protection for memory pages.
*/
@@ -1136,6 +1153,12 @@ when ODIN_ARCH == .arm32 {
eflags: uint,
rsp: uint,
ss: uint,
+ fs_base: uint,
+ gs_base: uint,
+ ds: uint,
+ es: uint,
+ fs: uint,
+ gs: uint,
}
// All floating point state
_Arch_User_FP_Regs :: struct {
diff --git a/core/sys/posix/arpa_inet.odin b/core/sys/posix/arpa_inet.odin
index 7e950c4be..d3592dd80 100644
--- a/core/sys/posix/arpa_inet.odin
+++ b/core/sys/posix/arpa_inet.odin
@@ -1,3 +1,4 @@
+#+build darwin, linux, freebsd, openbsd, netbsd
package posix
import "core:c"
diff --git a/core/sys/posix/dirent.odin b/core/sys/posix/dirent.odin
index bbb5416c5..bf32be8cf 100644
--- a/core/sys/posix/dirent.odin
+++ b/core/sys/posix/dirent.odin
@@ -1,3 +1,4 @@
+#+build darwin, linux, freebsd, openbsd, netbsd
package posix
import "core:c"
@@ -29,12 +30,12 @@ foreign lib {
panic(string(posix.strerror(posix.errno())))
}
defer posix.free(list)
-
+
entries := list[:ret]
- for entry in entries {
- log.info(entry)
- posix.free(entry)
- }
+ for entry in entries {
+ log.info(entry)
+ posix.free(entry)
+ }
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/scandir.html ]]
*/
@@ -54,15 +55,6 @@ foreign lib {
closedir :: proc(dirp: DIR) -> result ---
/*
- Return a file descriptor referring to the same directory as the dirp argument.
-
- // TODO: this is a macro on NetBSD?
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html ]]
- */
- dirfd :: proc(dirp: DIR) -> FD ---
-
- /*
Equivalent to the opendir() function except that the directory is specified by a file descriptor
rather than by a name.
The file offset associated with the file descriptor at the time of the call determines
@@ -89,16 +81,16 @@ foreign lib {
Returns nil when the end is reached or an error occurred (which sets errno).
Example:
- posix.set_errno(.NONE)
- entry := posix.readdir(dirp)
- if entry == nil {
- if errno := posix.errno(); errno != .NONE {
- panic(string(posix.strerror(errno)))
- } else {
- fmt.println("end of directory stream")
- }
- } else {
- fmt.println(entry)
+ posix.set_errno(.NONE)
+ entry := posix.readdir(dirp)
+ if entry == nil {
+ if errno := posix.errno(); errno != .NONE {
+ panic(string(posix.strerror(errno)))
+ } else {
+ fmt.println("end of directory stream")
+ }
+ } else {
+ fmt.println(entry)
}
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html ]]
@@ -160,11 +152,36 @@ when ODIN_OS == .NetBSD {
@(private) LSCANDIR :: "__scandir30"
@(private) LOPENDIR :: "__opendir30"
@(private) LREADDIR :: "__readdir30"
+
+ /*
+ Return a file descriptor referring to the same directory as the dirp argument.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html ]]
+ */
+ dirfd :: proc "c" (dirp: DIR) -> FD {
+ _dirdesc :: struct {
+ dd_fd: FD,
+
+ // more stuff...
+ }
+
+ return (^_dirdesc)(dirp).dd_fd
+ }
+
} else {
@(private) LALPHASORT :: "alphasort" + INODE_SUFFIX
@(private) LSCANDIR :: "scandir" + INODE_SUFFIX
@(private) LOPENDIR :: "opendir" + INODE_SUFFIX
@(private) LREADDIR :: "readdir" + INODE_SUFFIX
+
+ foreign lib {
+ /*
+ Return a file descriptor referring to the same directory as the dirp argument.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html ]]
+ */
+ dirfd :: proc(dirp: DIR) -> FD ---
+ }
}
when ODIN_OS == .Darwin {
@@ -193,13 +210,21 @@ when ODIN_OS == .Darwin {
} else when ODIN_OS == .NetBSD {
dirent :: struct {
- d_ino: ino_t, /* [PSX] file number of entry */
- d_reclen: c.uint16_t, /* length of this record */
- d_namelen: c.uint16_t, /* length of string in d_name */
- d_type: D_Type, /* file type */
- d_name: [512]c.char `fmt:"s,0"`, /* [PSX] entry name */
+ d_ino: ino_t, /* [PSX] file number of entry */
+ d_reclen: c.uint16_t, /* length of this record */
+ d_namelen: c.uint16_t, /* length of string in d_name */
+ d_type: D_Type, /* file type */
+ d_name: [512]c.char `fmt:"s,0"`, /* [PSX] entry name */
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ dirent :: struct {
+ d_ino: u64, /* [PSX] file number of entry */
+ d_off: i64, /* directory offset of the next entry */
+ d_reclen: u16, /* length of this record */
+ d_type: D_Type, /* file type */
+ d_name: [256]c.char `fmt:"s,0"`, /* [PSX] entry name */
+ }
+
}
diff --git a/core/sys/posix/dlfcn.odin b/core/sys/posix/dlfcn.odin
index 0ddc41337..e84b29d79 100644
--- a/core/sys/posix/dlfcn.odin
+++ b/core/sys/posix/dlfcn.odin
@@ -1,3 +1,4 @@
+#+build darwin, linux, freebsd, openbsd, netbsd
package posix
import "core:c"
@@ -111,7 +112,14 @@ when ODIN_OS == .Darwin {
RTLD_LOCAL :: RTLD_Flags{RTLD_Flag_Bits(log2(_RTLD_LOCAL))}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ RTLD_LAZY :: 0x001
+ RTLD_NOW :: 0x002
+ RTLD_GLOBAL :: 0x100
+
+ _RTLD_LOCAL :: 0
+ RTLD_LOCAL :: RTLD_Flags{}
+
}
diff --git a/core/sys/posix/errno.odin b/core/sys/posix/errno.odin
index 4ef10aadf..9bc77f12e 100644
--- a/core/sys/posix/errno.odin
+++ b/core/sys/posix/errno.odin
@@ -1,3 +1,4 @@
+#+build windows, darwin, linux, freebsd, openbsd, netbsd
package posix
import "core:c"
@@ -141,7 +142,7 @@ when ODIN_OS == .Darwin {
EMLINK :: 31
EPIPE :: 32
EAGAIN :: 35
- EWOULDBLOCK :: 35
+ EWOULDBLOCK :: EAGAIN
EINPROGRESS :: 36
EALREADY :: 37
ENOTSOCK :: 38
@@ -151,7 +152,7 @@ when ODIN_OS == .Darwin {
ENOPROTOOPT :: 42
EPROTONOSUPPORT :: 43
ENOTSUP :: 45
- EOPNOTSUPP :: 45
+ EOPNOTSUPP :: ENOTSUP
EAFNOSUPPORT :: 47
EADDRINUSE :: 48
EADDRNOTAVAIL :: 49
@@ -220,7 +221,7 @@ when ODIN_OS == .Darwin {
EMLINK :: 31
EPIPE :: 32
EAGAIN :: 35
- EWOULDBLOCK :: 35
+ EWOULDBLOCK :: EAGAIN
EINPROGRESS :: 36
EALREADY :: 37
ENOTSOCK :: 38
@@ -230,7 +231,7 @@ when ODIN_OS == .Darwin {
ENOPROTOOPT :: 42
EPROTONOSUPPORT :: 43
ENOTSUP :: 45
- EOPNOTSUPP :: 45
+ EOPNOTSUPP :: ENOTSUP
EAFNOSUPPORT :: 47
EADDRINUSE :: 48
EADDRNOTAVAIL :: 49
@@ -301,7 +302,7 @@ when ODIN_OS == .Darwin {
EMLINK :: 31
EPIPE :: 32
EAGAIN :: 35
- EWOULDBLOCK :: 35
+ EWOULDBLOCK :: EAGAIN
EINPROGRESS :: 36
EALREADY :: 37
ENOTSOCK :: 38
@@ -311,7 +312,7 @@ when ODIN_OS == .Darwin {
ENOPROTOOPT :: 42
EPROTONOSUPPORT :: 43
ENOTSUP :: 45
- EOPNOTSUPP :: 45
+ EOPNOTSUPP :: ENOTSUP
EAFNOSUPPORT :: 47
EADDRINUSE :: 48
EADDRNOTAVAIL :: 49
@@ -367,7 +368,173 @@ when ODIN_OS == .Darwin {
ETIME :: -1
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+ EPERM :: 1
+ ENOENT :: 2
+ ESRCH :: 3
+ EINTR :: 4
+ EIO :: 5
+ ENXIO :: 6
+ E2BIG :: 7
+ ENOEXEC :: 8
+ EBADF :: 9
+ ECHILD :: 10
+ EAGAIN :: 11
+ EWOULDBLOCK :: EAGAIN
+ ENOMEM :: 12
+ EACCES :: 13
+ EFAULT :: 14
+ EBUSY :: 16
+ EEXIST :: 17
+ EXDEV :: 18
+ ENODEV :: 19
+ ENOTDIR :: 20
+ EISDIR :: 21
+ EINVAL :: 22
+ ENFILE :: 23
+ EMFILE :: 24
+ ENOTTY :: 25
+ ETXTBSY :: 26
+ EFBIG :: 27
+ ENOSPC :: 28
+ ESPIPE :: 29
+ EROFS :: 30
+ EMLINK :: 31
+ EPIPE :: 32
+
+ EDEADLK :: 35
+ ENAMETOOLONG :: 36
+ ENOLCK :: 37
+ ENOSYS :: 38
+ ENOTEMPTY :: 39
+ ELOOP :: 40
+ ENOMSG :: 42
+ EIDRM :: 43
+
+ ENOSTR :: 60
+ ENODATA :: 61
+ ETIME :: 62
+ ENOSR :: 63
+
+ ENOLINK :: 67
+
+ EPROTO :: 71
+ EMULTIHOP :: 72
+ EBADMSG :: 74
+ EOVERFLOW :: 75
+
+ ENOTSOCK :: 88
+ EDESTADDRREQ :: 89
+ EMSGSIZE :: 90
+ EPROTOTYPE :: 91
+ ENOPROTOOPT :: 92
+ EPROTONOSUPPORT :: 93
+
+ EOPNOTSUPP :: 95
+ ENOTSUP :: EOPNOTSUPP
+ EAFNOSUPPORT :: 97
+ EADDRINUSE :: 98
+ EADDRNOTAVAIL :: 99
+ ENETDOWN :: 100
+ ENETUNREACH :: 101
+ ENETRESET :: 102
+ ECONNABORTED :: 103
+ ECONNRESET :: 104
+ ENOBUFS :: 105
+ EISCONN :: 106
+ ENOTCONN :: 107
+
+ ETIMEDOUT :: 110
+ ECONNREFUSED :: 111
+
+ EHOSTUNREACH :: 113
+ EALREADY :: 114
+ EINPROGRESS :: 115
+ ESTALE :: 116
+
+ EDQUOT :: 122
+ ECANCELED :: 125
+
+ EOWNERDEAD :: 130
+ ENOTRECOVERABLE :: 131
+} else when ODIN_OS == .Windows {
+ E2BIG :: 7
+ EACCES :: 13
+ EADDRINUSE :: 100
+ EADDRNOTAVAIL :: 101
+ EAFNOSUPPORT :: 102
+ EAGAIN :: 11
+ EALREADY :: 103
+ EBADF :: 9
+ EBADMSG :: 104
+ EBUSY :: 16
+ ECANCELED :: 105
+ ECHILD :: 10
+ ECONNABORTED :: 106
+ ECONNREFUSED :: 107
+ ECONNRESET :: 108
+ EDEADLK :: 36
+ EDESTADDRREQ :: 109
+ EDQUOT :: -1 // NOTE: not defined
+ EEXIST :: 17
+ EFAULT :: 14
+ EFBIG :: 27
+ EHOSTUNREACH :: 110
+ EIDRM :: 111
+ EINPROGRESS :: 112
+ EINTR :: 4
+ EINVAL :: 22
+ EIO :: 5
+ EISCONN :: 113
+ EISDIR :: 21
+ ELOOP :: 114
+ EMFILE :: 24
+ EMLINK :: 31
+ EMSGSIZE :: 115
+ EMULTIHOP :: -1 // NOTE: not defined
+ ENAMETOOLONG :: 38
+ ENETDOWN :: 116
+ ENETRESET :: 117
+ ENETUNREACH :: 118
+ ENFILE :: 23
+ ENOBUFS :: 119
+ ENODATA :: 120
+ ENODEV :: 19
+ ENOENT :: 2
+ ENOEXEC :: 8
+ ENOLCK :: 39
+ ENOLINK :: 121
+ ENOMEM :: 12
+ ENOMSG :: 122
+ ENOPROTOOPT :: 123
+ ENOSPC :: 28
+ ENOSR :: 124
+ ENOSTR :: 125
+ ENOSYS :: 40
+ ENOTCONN :: 126
+ ENOTDIR :: 20
+ ENOTEMPTY :: 41
+ ENOTRECOVERABLE :: 127
+ ENOTSOCK :: 128
+ ENOTSUP :: 129
+ ENOTTY :: 25
+ ENXIO :: 6
+ EOPNOTSUPP :: 130
+ EOVERFLOW :: 132
+ EOWNERDEAD :: 133
+ EPERM :: 1
+ EPIPE :: 32
+ EPROTO :: 134
+ EPROTONOSUPPORT :: 135
+ EPROTOTYPE :: 136
+ EROFS :: 30
+ ESPIPE :: 29
+ ESRCH :: 3
+ ESTALE :: -1 // NOTE: not defined
+ ETIME :: 137
+ ETIMEDOUT :: 138
+ ETXTBSY :: 139
+ EWOULDBLOCK :: 140
+ EXDEV :: 18
}
diff --git a/core/sys/posix/fcntl.odin b/core/sys/posix/fcntl.odin
index ca030a9a5..d948af600 100644
--- a/core/sys/posix/fcntl.odin
+++ b/core/sys/posix/fcntl.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, openbsd, freebsd, netbsd
package posix
import "core:c"
@@ -92,9 +93,6 @@ Lock_Type :: enum c.short {
WRLCK = F_WRLCK,
}
-// Assertions made to unify this bit set.
-#assert(O_RDONLY == 0)
-
O_Flag_Bits :: enum c.int {
// Sets FD_CLOEXEC on the file descriptor.
CLOEXEC = log2(O_CLOEXEC),
@@ -107,11 +105,11 @@ O_Flag_Bits :: enum c.int {
// If terminal device, do not make it the controlling terminal for the process.
NOCTTY = log2(O_NOCTTY),
// Don't follow symbolic links, fail with errno ELOOP.
- NOFOLLOW = log2(O_NOFOLOW),
+ NOFOLLOW = log2(O_NOFOLLOW),
// If exists and regular, truncate the length to 0.
TRUNC = log2(O_TRUNC),
- // NOTE: use with `posix.O_TTY_INIT + { .OTHER_FLAG, .OTHER_FLAG }`, unfortunately can't be in
+ // NOTE: use with `posix.O_TTY_INIT + { .OTHER_FLAG, .OTHER_FLAG }`, unfortunately can't be in
// this bit set enum because it is 0 on some platforms and a value on others.
// TTY_INIT = O_TTY_INIT,
@@ -123,7 +121,8 @@ O_Flag_Bits :: enum c.int {
NONBLOCK = log2(O_NONBLOCK),
// Write I/O shall complete as defined by synchronized I/O file integrity completion.
SYNC = log2(O_SYNC),
- // NOTE: use with `posix.O_RSYNC + { .OTHER_FLAG, .OTHER_FLAG }`, unfortunately can't be in
+
+ // NOTE: use with `posix.O_RSYNC + { .OTHER_FLAG, .OTHER_FLAG }`, unfortunately can't be in
// this bit set enum because it is 0 on some platforms and a value on others.
// RSYNC = O_RSYNC,
@@ -135,11 +134,10 @@ O_Flag_Bits :: enum c.int {
WRONLY = log2(O_WRONLY),
// Reading only.
// RDONLY = 0, // Default
-
}
+
O_Flags :: bit_set[O_Flag_Bits; c.int]
-// A mask of all the access mode bits.
O_ACCMODE :: O_Flags{ .EXEC, .RDWR, .WRONLY }
AT_Flag_Bits :: enum c.int {
@@ -152,8 +150,8 @@ AT_Flags :: bit_set[AT_Flag_Bits; c.int]
when ODIN_OS == .Darwin {
- off_t :: distinct c.int64_t
- pid_t :: distinct c.int32_t
+ off_t :: distinct c.int64_t
+ pid_t :: distinct c.int32_t
F_DUPFD :: 0
F_DUPFD_CLOEXEC :: 67
@@ -178,7 +176,7 @@ when ODIN_OS == .Darwin {
O_DIRECTORY :: 0x00100000
O_EXCL :: 0x00000800
O_NOCTTY :: 0x00020000
- O_NOFOLOW :: 0x00000100
+ O_NOFOLLOW :: 0x00000100
O_TRUNC :: 0x00000400
_O_TTY_INIT :: 0
@@ -189,16 +187,16 @@ when ODIN_OS == .Darwin {
O_NONBLOCK :: 0x00000004
O_SYNC :: 0x0080
- _O_RSYNC :: 0
- O_RSYNC :: O_Flags{}
+ _O_RSYNC :: 0
+ O_RSYNC :: O_Flags{}
- O_EXEC :: 0x40000000
- O_RDONLY :: 0
- O_RDWR :: 0x0002
- O_WRONLY :: 0x0001
+ O_EXEC :: 0x40000000
+ O_RDONLY :: 0
+ O_RDWR :: 0x0002
+ O_WRONLY :: 0x0001
_O_SEARCH :: O_EXEC | O_DIRECTORY
- O_SEARCH :: O_Flags{ .EXEC, .DIRECTORY }
+ O_SEARCH :: O_Flags{.EXEC, .DIRECTORY}
AT_FDCWD: FD: -2
@@ -217,8 +215,8 @@ when ODIN_OS == .Darwin {
} else when ODIN_OS == .FreeBSD {
- off_t :: distinct c.int64_t
- pid_t :: distinct c.int32_t
+ off_t :: distinct c.int64_t
+ pid_t :: distinct c.int32_t
F_DUPFD :: 0
F_DUPFD_CLOEXEC :: 17
@@ -243,7 +241,7 @@ when ODIN_OS == .Darwin {
O_DIRECTORY :: 0x00020000
O_EXCL :: 0x0800
O_NOCTTY :: 0x8000
- O_NOFOLOW :: 0x0100
+ O_NOFOLLOW :: 0x0100
O_TRUNC :: 0x0400
_O_TTY_INIT :: 0x00080000
@@ -256,10 +254,10 @@ when ODIN_OS == .Darwin {
_O_RSYNC :: 0
O_RSYNC :: O_Flags{} // NOTE: not defined in headers
- O_EXEC :: 0x00040000
- O_RDONLY :: 0
- O_RDWR :: 0x0002
- O_WRONLY :: 0x0001
+ O_EXEC :: 0x00040000
+ O_RDONLY :: 0
+ O_RDWR :: 0x0002
+ O_WRONLY :: 0x0001
_O_SEARCH :: O_EXEC
O_SEARCH :: O_Flags{ .EXEC }
@@ -282,8 +280,8 @@ when ODIN_OS == .Darwin {
} else when ODIN_OS == .NetBSD {
- off_t :: distinct c.int64_t
- pid_t :: distinct c.int32_t
+ off_t :: distinct c.int64_t
+ pid_t :: distinct c.int32_t
F_DUPFD :: 0
F_DUPFD_CLOEXEC :: 12
@@ -308,7 +306,7 @@ when ODIN_OS == .Darwin {
O_DIRECTORY :: 0x0020000
O_EXCL :: 0x0800
O_NOCTTY :: 0x8000
- O_NOFOLOW :: 0x0100
+ O_NOFOLLOW :: 0x0100
O_TRUNC :: 0x0400
_O_TTY_INIT :: 0
@@ -319,14 +317,14 @@ when ODIN_OS == .Darwin {
O_NONBLOCK :: 0x0004
O_SYNC :: 0x0080
- _O_RSYNC :: 0x0002
- O_RSYNC :: O_Flags{O_Flag_Bits(log2(_O_RSYNC))}
+ _O_RSYNC :: 0x0002
+ O_RSYNC :: O_Flags{O_Flag_Bits(log2(_O_RSYNC))}
- O_EXEC :: 0x04000000
- O_RDONLY :: 0
- O_RDWR :: 0x0002
- O_WRONLY :: 0x0001
+ O_EXEC :: 0x04000000
+ O_RDONLY :: 0
+ O_RDWR :: 0x0002
+ O_WRONLY :: 0x0001
_O_SEARCH :: 0x00800000
O_SEARCH :: O_Flags{O_Flag_Bits(log2(_O_SEARCH))}
@@ -347,8 +345,8 @@ when ODIN_OS == .Darwin {
}
} else when ODIN_OS == .OpenBSD {
- off_t :: distinct c.int64_t
- pid_t :: distinct c.int32_t
+ off_t :: distinct c.int64_t
+ pid_t :: distinct c.int32_t
F_DUPFD :: 0
F_DUPFD_CLOEXEC :: 10
@@ -373,7 +371,7 @@ when ODIN_OS == .Darwin {
O_DIRECTORY :: 0x20000
O_EXCL :: 0x0800
O_NOCTTY :: 0x8000
- O_NOFOLOW :: 0x0100
+ O_NOFOLLOW :: 0x0100
O_TRUNC :: 0x0400
_O_TTY_INIT :: 0
@@ -384,13 +382,13 @@ when ODIN_OS == .Darwin {
O_NONBLOCK :: 0x0004
O_SYNC :: 0x0080
- _O_RSYNC :: O_SYNC
- O_RSYNC :: O_Flags{ .SYNC }
+ _O_RSYNC :: O_SYNC
+ O_RSYNC :: O_Flags{.SYNC}
- O_EXEC :: 0x04000000 // NOTE: not defined in the headers
- O_RDONLY :: 0
- O_RDWR :: 0x0002
- O_WRONLY :: 0x0001
+ O_EXEC :: 0x04000000 // NOTE: not defined in the headers
+ O_RDONLY :: 0
+ O_RDWR :: 0x0002
+ O_WRONLY :: 0x0001
_O_SEARCH :: 0
O_SEARCH :: O_Flags{} // NOTE: not defined in the headers
@@ -410,6 +408,70 @@ when ODIN_OS == .Darwin {
l_whence: c.short, /* [PSX] flag (Whence) of starting offset */
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ off_t :: distinct c.int64_t
+ pid_t :: distinct c.int
+
+ F_DUPFD :: 0
+ F_GETFD :: 1
+ F_SETFD :: 2
+ F_GETFL :: 3
+ F_SETFL :: 4
+ F_GETLK :: 5
+ F_SETLK :: 6
+ F_SETLKW :: 7
+ F_SETOWN :: 8
+ F_GETOWN :: 9
+ F_RDLCK :: 0
+ F_UNLCK :: 2
+ F_WRLCK :: 1
+
+ F_DUPFD_CLOEXEC :: 1030
+
+ FD_CLOEXEC :: 1
+
+ O_CREAT :: 0o0_000_100
+ O_EXCL :: 0o0_000_200
+ O_NOCTTY :: 0o0_000_400
+ O_TRUNC :: 0o0_001_000
+ O_DIRECTORY :: 0o0_200_000
+ O_NOFOLLOW :: 0o0_400_000
+ O_CLOEXEC :: 0o2_000_000
+
+ _O_TTY_INIT :: 0
+ O_TTY_INIT :: O_Flags{}
+
+ O_APPEND :: 0o0_002_000
+ O_NONBLOCK :: 0o0_004_000
+ O_DSYNC :: 0o0_010_000
+ O_SYNC :: 0o4_010_000
+
+ _O_RSYNC :: 0
+ O_RSYNC :: O_Flags{}
+
+ O_EXEC :: 0x04000000 // NOTE: not defined in the headers
+
+ O_RDONLY :: 0
+ O_WRONLY :: 0o1
+ O_RDWR :: 0o2
+
+ _O_SEARCH :: 0
+ O_SEARCH :: O_Flags{}
+
+ AT_FDCWD: FD: -100
+
+ AT_EACCESS :: 0x200
+ AT_SYMLINK_NOFOLLOW :: 0x100
+ AT_SYMLINK_FOLLOW :: 0x400
+ AT_REMOVEDIR :: 0x200
+
+ flock :: struct {
+ l_type: Lock_Type, /* [PSX] type of lock. */
+ l_whence: c.short, /* [PSX] flag (Whence) of starting offset. */
+ l_start: off_t, /* [PSX] relative offset in bytes. */
+ l_len: off_t, /* [PSX] size; if 0 then until EOF. */
+ l_pid: pid_t, /* [PSX] process ID of the process holding the lock. */
+ }
+
}
diff --git a/core/sys/posix/fnmatch.odin b/core/sys/posix/fnmatch.odin
index 9e54972e7..2d582705c 100644
--- a/core/sys/posix/fnmatch.odin
+++ b/core/sys/posix/fnmatch.odin
@@ -1,3 +1,4 @@
+#+build darwin, linux, openbsd, freebsd, netbsd
package posix
import "core:c"
@@ -53,6 +54,12 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
FNM_PERIOD :: 0x04
FNM_NOESCAPE :: 0x01
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ FNM_NOMATCH :: 1
+
+ FNM_PATHNAME :: 0x01
+ FNM_NOESCAPE :: 0x02
+ FNM_PERIOD :: 0x04
+
}
diff --git a/core/sys/posix/glob.odin b/core/sys/posix/glob.odin
index 4f41d83db..7c8009a59 100644
--- a/core/sys/posix/glob.odin
+++ b/core/sys/posix/glob.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -112,7 +113,7 @@ when ODIN_OS == .Darwin {
glob_t :: struct {
gl_pathc: c.size_t, /* [PSX] count of paths matched by pattern */
- gl_matchc: c.size_t, /* count of paths matching pattern */
+ gl_matchc: c.size_t, /* count of paths matching pattern */
gl_offs: c.size_t, /* [PSX] slots to reserve at the beginning of gl_pathv */
gl_flags: Glob_Flags, /* copy of flags parameter to glob */
gl_pathv: [^]cstring `fmt:"v,gl_pathc"`, /* [PSX] pointer to list of matched pathnames */
@@ -144,7 +145,7 @@ when ODIN_OS == .Darwin {
glob_t :: struct {
gl_pathc: c.size_t, /* [PSX] count of paths matched by pattern */
- gl_matchc: c.size_t, /* count of paths matching pattern */
+ gl_matchc: c.size_t, /* count of paths matching pattern */
gl_offs: c.size_t, /* [PSX] slots to reserve at the beginning of gl_pathv */
gl_flags: Glob_Flags, /* copy of flags parameter to glob */
gl_pathv: [^]cstring `fmt:"v,gl_pathc"`, /* [PSX] pointer to list of matched pathnames */
@@ -174,6 +175,33 @@ when ODIN_OS == .Darwin {
GLOB_NOMATCH :: -3
GLOB_NOSPACE :: -1
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ glob_t :: struct {
+ gl_pathc: c.size_t, /* [PSX] count of paths matched by pattern */
+ gl_pathv: [^]cstring `fmt:"v,gl_pathc"`, /* [PSX] pointer to list of matched pathnames */
+ gl_offs: c.size_t, /* [PSX] slots to reserve at the beginning of gl_pathv */
+ gl_flags: Glob_Flags, /* copy of flags parameter to glob */
+
+ // Non-standard alternate file system access functions:
+
+ gl_closedir: proc "c" (dirp: DIR),
+ gl_readdir: proc "c" (dirp: DIR) -> ^dirent,
+ gl_opendir: proc "c" (path: cstring) -> DIR,
+ gl_lstat: proc "c" (path: cstring, buf: ^stat_t) -> result,
+ gl_stat: proc "c" (path: cstring, buf: ^stat_t) -> result,
+ }
+
+ GLOB_ERR :: 1 << 0
+ GLOB_MARK :: 1 << 1
+ GLOB_NOSORT :: 1 << 2
+ GLOB_DOOFFS :: 1 << 3
+ GLOB_NOCHECK :: 1 << 4
+ GLOB_APPEND :: 1 << 5
+ GLOB_NOESCAPE :: 1 << 6
+
+ GLOB_NOSPACE :: 1
+ GLOB_ABORTED :: 2
+ GLOB_NOMATCH :: 3
+
}
diff --git a/core/sys/posix/grp.odin b/core/sys/posix/grp.odin
index c8a39de6a..956ed148b 100644
--- a/core/sys/posix/grp.odin
+++ b/core/sys/posix/grp.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -114,7 +115,7 @@ foreign lib {
getgrnam_r :: proc(name: cstring, grp: ^group, buffer: [^]byte, bufsize: c.size_t, result: ^^group) -> Errno ---
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
gid_t :: distinct c.uint32_t
@@ -125,6 +126,4 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
gr_mem: [^]cstring, /* [PSX] group members */
}
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/iconv.odin b/core/sys/posix/iconv.odin
index 59248890f..f7447be9e 100644
--- a/core/sys/posix/iconv.odin
+++ b/core/sys/posix/iconv.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
diff --git a/core/sys/posix/langinfo.odin b/core/sys/posix/langinfo.odin
index 24ecc917a..3c001aee0 100644
--- a/core/sys/posix/langinfo.odin
+++ b/core/sys/posix/langinfo.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -238,7 +239,7 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD {
ABDAY_4 :: 16
ABDAY_5 :: 17
ABDAY_6 :: 18
- ABDAY_7 :: 19
+ ABDAY_7 :: 19
MON_1 :: 20
MON_2 :: 21
@@ -278,7 +279,91 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD {
YESEXPR :: 47
NOEXPR :: 49
- CRNCYSTR :: 50
+ CRNCYSTR :: 50
+
+} else when ODIN_OS == .Linux {
+
+ // NOTE: declared with `_t` so we can enumerate the real `nl_info`.
+ nl_item_t :: distinct c.int
+
+ // NOTE: All these values are set in an enum on the Linux implementation.
+ // Some depend on locale.h contants (bits/locale.h to be precise).
+
+ // NOTE: ABDAY_1 is set to LC_TIME << 16 (LC_TIME is 2) on the enum group of
+ // the Linux implementation.
+ ABDAY_1 :: 0x20_000
+ ABDAY_2 :: 0x20_001
+ ABDAY_3 :: 0x20_002
+ ABDAY_4 :: 0x20_003
+ ABDAY_5 :: 0x20_004
+ ABDAY_6 :: 0x20_005
+ ABDAY_7 :: 0x20_006
+
+ DAY_1 :: 0x20_007
+ DAY_2 :: 0x20_008
+ DAY_3 :: 0x20_009
+ DAY_4 :: 0x20_00A
+ DAY_5 :: 0x20_00B
+ DAY_6 :: 0x20_00C
+ DAY_7 :: 0x20_00D
+
+ ABMON_1 :: 0x20_00E
+ ABMON_2 :: 0x20_010
+ ABMON_3 :: 0x20_011
+ ABMON_4 :: 0x20_012
+ ABMON_5 :: 0x20_013
+ ABMON_6 :: 0x20_014
+ ABMON_7 :: 0x20_015
+ ABMON_8 :: 0x20_016
+ ABMON_9 :: 0x20_017
+ ABMON_10 :: 0x20_018
+ ABMON_11 :: 0x20_019
+ ABMON_12 :: 0x20_01A
+
+ MON_1 :: 0x20_01B
+ MON_2 :: 0x20_01C
+ MON_3 :: 0x20_01D
+ MON_4 :: 0x20_01E
+ MON_5 :: 0x20_020
+ MON_6 :: 0x20_021
+ MON_7 :: 0x20_022
+ MON_8 :: 0x20_023
+ MON_9 :: 0x20_024
+ MON_10 :: 0x20_025
+ MON_11 :: 0x20_026
+ MON_12 :: 0x20_027
+
+ AM_STR :: 0x20_028
+ PM_STR :: 0x20_029
+
+ D_T_FMT :: 0x20_02A
+ D_FMT :: 0x20_02B
+ T_FMT :: 0x20_02C
+ T_FMT_AMPM :: 0x20_02D
+
+ ERA :: 0x20_02E
+ ERA_D_FMT :: 0x20_030
+ ALT_DIGITS :: 0x20_031
+ ERA_D_T_FMT :: 0x20_032
+ ERA_T_FMT :: 0x20_033
+
+ // NOTE: CODESET is the 16th member of the enum group starting with value
+ // LC_CTYPE << 16, LC_CTYPE is 0.
+ CODESET :: 0x0F
+
+ // NOTE: CRNCYSTR is the 16th member of the enum group starting with value
+ // LC_MONETARY << 16, LC_MONETARY is 4.
+ CRNCYSTR :: 0x40_00F
+
+ // NOTE: RADIXCHAR is the 1st member of the enum group starting with value
+ // LC_NUMERIC << 16, LC_NUMERIC is 1.
+ RADIXCHAR :: 0x10_000
+ THOUSEP :: 0x10_001
+
+ // NOTE: YESEXPR is the 1st member of the enum group starting with value
+ // LC_MESSAGES << 16, LC_MESSAGES is 5.
+ YESEXPR :: 0x50_000
+ NOEXPR :: 0x50_001
} else {
#panic("posix is unimplemented for the current target")
diff --git a/core/sys/posix/libgen.odin b/core/sys/posix/libgen.odin
index 99506797e..69176a557 100644
--- a/core/sys/posix/libgen.odin
+++ b/core/sys/posix/libgen.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
when ODIN_OS == .Darwin {
@@ -56,6 +57,7 @@ foreign lib {
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/basename.html ]]
*/
+ @(link_name=LBASENAME)
basename :: proc(path: cstring) -> cstring ---
/*
@@ -72,3 +74,9 @@ foreign lib {
*/
dirname :: proc(path: cstring) -> cstring ---
}
+
+when ODIN_OS == .Linux {
+ @(private) LBASENAME :: "__xpg_basename"
+} else {
+ @(private) LBASENAME :: "basename"
+}
diff --git a/core/sys/posix/limits.odin b/core/sys/posix/limits.odin
index 7bb561215..6680986ad 100644
--- a/core/sys/posix/limits.odin
+++ b/core/sys/posix/limits.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
// limits.h - implementation-defined constants
@@ -454,6 +455,99 @@ when ODIN_OS == .Darwin {
NL_TEXTMAX :: 255
NZERO :: 20
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ // A definition of one of the symbolic constants in the following list shall be omitted from
+ // <limits.h> on specific implementations where the corresponding value is equal to or greater
+ // than the stated minimum, but is unspecified.
+ //
+ // This indetermination might depend on the amount of available memory space on a specific
+ // instance of a specific implementation. The actual value supported by a specific instance shall
+ // be provided by the sysconf() function.
+
+ // AIO_LISTIO_MAX :: sysconf(._AIO_LISTIO_MAX)
+ // AIO_MAX :: sysconf(._AIO_MAX)
+ // AIO_PRIO_DELTA_MAX :: sysconf(._AIO_PRIO_DELTA_MAX)
+ ARG_MAX :: 131_072
+ // ATEXIT_MAX :: sysconf(._ATEXIT_MAX)
+ // CHILD_MAX :: sysconf(._POSIX_ARG_MAX)
+ // DELAYTIMER_MAX :: sysconf(._DELAYTIMER_MAX)
+ // HOST_NAME_MAX :: sysconf(._HOST_NAME_MAX)
+ // IOV_MAX :: sysconf(._XOPEN_IOV_MAX)
+ // LOGIN_NAME_MAX :: sysconf(._LOGIN_NAME_MAX)
+ // MQ_OPEN_MAX :: sysconf(._MQ_OPEN_MAX)
+ // MQ_PRIO_MAX :: sysconf(._MQ_PRIO_MAX)
+ // PAGESIZE :: PAGE_SIZE
+ // PAGE_SIZE :: sysconf(._PAGE_SIZE)
+ PTHREAD_DESTRUCTOR_ITERATIONS :: 4
+ // PTHREAD_KEYS_MAX :: sysconf(._PTHREAD_KEYS_MAX)
+ // PTHREAD_STACK_MIN :: sysconf(._PTHREAD_STACK_MIN)
+ // RTSIG_MAX :: sysconf(._RTSIG_MAX)
+ // SEM_NSEMS_MAX :: sysconf(._SEM_NSEMS_MAX)
+ // SEM_VALUE_MAX :: sysconf(._SEM_VALUE_MAX)
+ // SIGQUEUE_MAX :: sysconf(._SIGQUEUE_MAX)
+ // SS_REPL_MAX :: sysconf(._SS_REPL_MAX)
+ // STREAM_MAX :: sysconf(._STREAM_MAX)
+ // SYMLOOP_MAX :: sysconf(._SYSLOOP_MAX)
+ // TIMER_MAX :: sysconf(._TIMER_MAX)
+ // TRACE_EVENT_NAME_MAX :: sysconf(._TRACE_EVENT_NAME_MAX)
+ // TRACE_NAME_MAX :: sysconf(._TRACE_NAME_MAX)
+ // TRACE_SYS_MAX :: sysconf(._TRACE_SYS_MAX)
+ // TRACE_USER_EVENT_MAX :: sysconf(._TRACE_USER_EVENT_MAX)
+ // TTY_NAME_MAX :: sysconf(._TTY_NAME_MAX)
+ // TZNAME_MAX :: sysconf(._TZNAME_MAX)
+
+ // The values in the following list may be constants within an implementation or may vary from
+ // one pathname to another.
+ // For example, file systems or directories may have different characteristics.
+ //
+ // A definition of one of the symbolic constants in the following list shall be omitted from the
+ // <limits.h> header on specific implementations where the corresponding value is equal to or
+ // greater than the stated minimum, but where the value can vary depending on the file to which
+ // it is applied.
+ // The actual value supported for a specific pathname shall be provided by the pathconf() function.
+
+ // FILESIZEBITS :: pathconf(".", ._FILESIZEBITS)
+ LINK_MAX :: 127
+ MAX_CANON :: 255
+ MAX_INPUT :: 255
+ NAME_MAX :: 255
+ PATH_MAX :: 4096
+ PIPE_BUF :: 4096
+ // POSIX_ALLOC_SIZE_MIN :: sysconf(._POSIX_ALLOC_SIZE_MIN)
+ // POSIX_REC_INCR_XFER_SIZE :: sysconf(._POSIX_REC_INCR_XFER_SIZE)
+ // POSIX_REC_MAX_XFER_SIZE :: sysconf(._POSIX_REC_MAX_XFER_SIZE)
+ // POSIX_REC_MIN_XFER_SIZE :: sysconf(._POSIX_REC_MIN_XFER_SIZE)
+ // POSIX_REC_XFER_ALIGN :: sysconf(._POSIX_REC_XFER_ALIGN)
+ // SYMLINK_MAX :: pathconf(".", ._SYMLINK_MAX)
+
+
+ // The magnitude limitations in the following list shall be fixed by specific implementations.
+ // An application should assume that the value of the symbolic constant defined by <limits.h>
+ // in a specific implementation is the minimum that pertains whenever the application is run
+ // under that implementation.
+ // A specific instance of a specific implementation may increase the value relative to that
+ // supplied by <limits.h> for that implementation.
+ // The actual value supported by a specific instance shall be provided by the sysconf() function.
+
+ BC_BASE_MAX :: 99
+ BC_DIM_MAX :: 2048
+ BC_SCALE_MAX :: 99
+ BC_STRING_MAX :: 1000
+ CHARCLASS_NAME_MAX :: 14
+ COLL_WEIGHTS_MAX :: 2
+ EXPR_NEST_MAX :: 32
+ // LINE_MAX :: sysconf(._LINE_MAX)
+ // NGROUPS_MAX :: sysconf(._NGROUPS_MAX)
+ RE_DUP_MAX :: 255
+
+ // Other limits.
+
+ NL_ARGMAX :: 9
+ NL_LANGMAX :: 32 // 14 on glibc, 32 on musl
+ NL_MSGMAX :: 32_767
+ NL_SETMAX :: 255
+ NL_TEXTMAX :: 2048 // 255 on glibc, 2048 on musl
+ NZERO :: 20
+
}
diff --git a/core/sys/posix/locale.odin b/core/sys/posix/locale.odin
index 1f2a336b5..5b8d7c216 100644
--- a/core/sys/posix/locale.odin
+++ b/core/sys/posix/locale.odin
@@ -1,93 +1,11 @@
+#+build windows, linux, darwin, netbsd, openbsd, freebsd
package posix
-import "core:c"
+import "core:c/libc"
-when ODIN_OS == .Darwin {
- foreign import lib "system:System.framework"
-} else {
- foreign import lib "system:c"
-}
+localeconv :: libc.localeconv
+setlocale :: libc.setlocale
-// locale.h - category macros
+lconv :: libc.lconv
-foreign lib {
- /*
- Sets the components of an object with the type lconv with the values appropriate for the
- formatting of numeric quantities (monetary and otherwise) according to the rules of the current
- locale.
-
- Returns: a pointer to the lconv structure, might be invalidated by subsequent calls to localeconv() and setlocale()
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/localeconv.html ]]
- */
- localeconv :: proc() -> ^lconv ---
-
- /*
- Selects the appropriate piece of the global locale, as specified by the category and locale arguments,
- and can be used to change or query the entire global locale or portions thereof.
-
- Returns: the current locale if `locale` is `nil`, the set locale otherwise
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/setlocale.html ]]
- */
- @(link_name=LSETLOCALE)
- setlocale :: proc(category: Locale_Category, locale: cstring) -> cstring ---
-}
-
-Locale_Category :: enum c.int {
- ALL = LC_ALL,
- COLLATE = LC_COLLATE,
- CTYPE = LC_CTYPE,
- MESSAGES = LC_MESSAGES,
- MONETARY = LC_MONETARY,
- NUMERIC = LC_NUMERIC,
- TIME = LC_TIME,
-}
-
-when ODIN_OS == .NetBSD {
- @(private) LSETLOCALE :: "__setlocale50"
-} else {
- @(private) LSETLOCALE :: "setlocale"
-}
-
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
-
- // NOTE: All of these fields are standard ([PSX]).
- lconv :: struct {
- decimal_point: cstring,
- thousand_sep: cstring,
- grouping: cstring,
- int_curr_symbol: cstring,
- currency_symbol: cstring,
- mon_decimal_points: cstring,
- mon_thousands_sep: cstring,
- mon_grouping: cstring,
- positive_sign: cstring,
- negative_sign: cstring,
- int_frac_digits: c.char,
- frac_digits: c.char,
- p_cs_precedes: c.char,
- p_sep_by_space: c.char,
- n_cs_precedes: c.char,
- n_sep_by_space: c.char,
- p_sign_posn: c.char,
- n_sign_posn: c.char,
- int_p_cs_precedes: c.char,
- int_n_cs_precedes: c.char,
- int_p_sep_by_space: c.char,
- int_n_sep_by_space: c.char,
- int_p_sign_posn: c.char,
- int_n_sign_posn: c.char,
- }
-
- LC_ALL :: 0
- LC_COLLATE :: 1
- LC_CTYPE :: 2
- LC_MESSAGES :: 6
- LC_MONETARY :: 3
- LC_NUMERIC :: 4
- LC_TIME :: 5
-
-} else {
- #panic("posix is unimplemented for the current target")
-}
+Locale_Category :: libc.Locale_Category
diff --git a/core/sys/posix/monetary.odin b/core/sys/posix/monetary.odin
index b4f0c31ee..ee342e211 100644
--- a/core/sys/posix/monetary.odin
+++ b/core/sys/posix/monetary.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
diff --git a/core/sys/posix/net_if.odin b/core/sys/posix/net_if.odin
index aaeb5088a..774d11b72 100644
--- a/core/sys/posix/net_if.odin
+++ b/core/sys/posix/net_if.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -44,7 +45,7 @@ foreign lib {
if_freenameindex :: proc(ptr: ^if_nameindex_t) ---
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
// NOTE: `_t` suffix added due to name conflict.
@@ -55,6 +56,4 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
IF_NAMESIZE :: 16
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/netdb.odin b/core/sys/posix/netdb.odin
index 7570f9a22..79e13a140 100644
--- a/core/sys/posix/netdb.odin
+++ b/core/sys/posix/netdb.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -318,7 +319,7 @@ Info_Errno :: enum c.int {
OVERFLOW = EAI_OVERFLOW,
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
hostent :: struct {
h_name: cstring, /* [PSX] official name of host */
@@ -412,9 +413,28 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
NI_NUMERICSERV :: 2
NI_NUMERICSCOPE :: 32
NI_DGRAM :: 16
+
+ } else when ODIN_OS == .Linux {
+
+ AI_PASSIVE :: 0x001
+ AI_CANONNAME :: 0x002
+ AI_NUMERICHOST :: 0x004
+ AI_NUMERICSERV :: 0x400
+ AI_V4MAPPED :: 0x008
+ AI_ALL :: 0x010
+ AI_ADDRCONFIG :: 0x020
+
+ NI_NOFQDN :: 4
+ NI_NUMERICHOST :: 1
+ NI_NAMEREQD :: 8
+ NI_NUMERICSERV :: 2
+ NI_NUMERICSCOPE :: 0x100
+ NI_DGRAM :: 16
+
}
when ODIN_OS == .OpenBSD {
+
EAI_AGAIN :: -3
EAI_BADFLAGS :: -1
EAI_FAIL :: -4
@@ -425,7 +445,22 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
EAI_SOCKTYPE :: -7
EAI_SYSTEM :: -11
EAI_OVERFLOW :: -14
+
+ } else when ODIN_OS == .Linux {
+
+ EAI_AGAIN :: -3
+ EAI_BADFLAGS :: -1
+ EAI_FAIL :: -4
+ EAI_FAMILY :: -6
+ EAI_MEMORY :: -10
+ EAI_NONAME :: -2
+ EAI_SERVICE :: -8
+ EAI_SOCKTYPE :: -7
+ EAI_SYSTEM :: -11
+ EAI_OVERFLOW :: -12
+
} else {
+
EAI_AGAIN :: 2
EAI_BADFLAGS :: 3
EAI_FAIL :: 4
@@ -438,6 +473,4 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
EAI_OVERFLOW :: 14
}
-}else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/netinet_in.odin b/core/sys/posix/netinet_in.odin
index 3926c5288..a2cf904ce 100644
--- a/core/sys/posix/netinet_in.odin
+++ b/core/sys/posix/netinet_in.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -30,7 +31,7 @@ Protocol :: enum c.int {
UDP = IPPROTO_UDP,
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
in_addr :: struct {
s_addr: in_addr_t, /* [PSX] big endian address */
@@ -44,26 +45,68 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
},
}
- sockaddr_in :: struct {
- sin_len: c.uint8_t,
- sin_family: sa_family_t, /* [PSX] AF_INET (but a smaller size) */
- sin_port: in_port_t, /* [PSX] port number */
- sin_addr: in_addr, /* [PSX] IP address */
- sin_zero: [8]c.char,
- }
-
- sockaddr_in6 :: struct {
- sin6_len: c.uint8_t,
- sin6_family: sa_family_t, /* [PSX] AF_INET6 (but a smaller size) */
- sin6_port: in_port_t, /* [PSX] port number */
- sin6_flowinfo: c.uint32_t, /* [PSX] IPv6 traffic class and flow information */
- sin6_addr: in6_addr, /* [PSX] IPv6 address */
- sin6_scope_id: c.uint32_t, /* [PSX] set of interfaces for a scope */
- }
+ when ODIN_OS == .Linux {
+
+ sockaddr_in :: struct {
+ sin_family: sa_family_t, /* [PSX] AF_INET (but a smaller size) */
+ sin_port: in_port_t, /* [PSX] port number */
+ sin_addr: in_addr, /* [PSX] IP address */
+ sin_zero: [8]c.char,
+ }
+
+ sockaddr_in6 :: struct {
+ sin6_family: sa_family_t, /* [PSX] AF_INET6 (but a smaller size) */
+ sin6_port: in_port_t, /* [PSX] port number */
+ sin6_flowinfo: u32be, /* [PSX] IPv6 traffic class and flow information */
+ sin6_addr: in6_addr, /* [PSX] IPv6 address */
+ sin6_scope_id: c.uint32_t, /* [PSX] set of interfaces for a scope */
+ }
+
+ ipv6_mreq :: struct {
+ ipv6mr_multiaddr: in6_addr, /* [PSX] IPv6 multicast address */
+ ipv6mr_interface: c.uint, /* [PSX] interface index */
+ }
+
+ IPV6_MULTICAST_IF :: 17
+ IPV6_UNICAST_HOPS :: 16
+ IPV6_MULTICAST_HOPS :: 18
+ IPV6_MULTICAST_LOOP :: 19
+ IPV6_JOIN_GROUP :: 20
+ IPV6_LEAVE_GROUP :: 21
+ IPV6_V6ONLY :: 26
+
+ } else {
+
+ sockaddr_in :: struct {
+ sin_len: c.uint8_t,
+ sin_family: sa_family_t, /* [PSX] AF_INET (but a smaller size) */
+ sin_port: in_port_t, /* [PSX] port number */
+ sin_addr: in_addr, /* [PSX] IP address */
+ sin_zero: [8]c.char,
+ }
+
+ sockaddr_in6 :: struct {
+ sin6_len: c.uint8_t,
+ sin6_family: sa_family_t, /* [PSX] AF_INET6 (but a smaller size) */
+ sin6_port: in_port_t, /* [PSX] port number */
+ sin6_flowinfo: c.uint32_t, /* [PSX] IPv6 traffic class and flow information */
+ sin6_addr: in6_addr, /* [PSX] IPv6 address */
+ sin6_scope_id: c.uint32_t, /* [PSX] set of interfaces for a scope */
+ }
+
+ ipv6_mreq :: struct {
+ ipv6mr_multiaddr: in6_addr, /* [PSX] IPv6 multicast address */
+ ipv6mr_interface: c.uint, /* [PSX] interface index */
+ }
+
+ IPV6_JOIN_GROUP :: 12
+ IPV6_LEAVE_GROUP :: 13
+ IPV6_MULTICAST_HOPS :: 10
+ IPV6_MULTICAST_IF :: 9
+ IPV6_MULTICAST_LOOP :: 11
+ IPV6_UNICAST_HOPS :: 4
+ IPV6_V6ONLY :: 27
- ipv6_mreq :: struct {
- ipv6mr_multiaddr: in6_addr, /* [PSX] IPv6 multicast address */
- ipv6mr_interface: c.uint, /* [PSX] interface index */
}
IPPROTO_IP :: 0
@@ -76,14 +119,6 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
INADDR_ANY :: 0x00000000
INADDR_BROADCAST :: 0xFFFFFFFF
- IPV6_JOIN_GROUP :: 12
- IPV6_LEAVE_GROUP :: 13
- IPV6_MULTICAST_HOPS :: 10
- IPV6_MULTICAST_IF :: 9
- IPV6_MULTICAST_LOOP :: 11
- IPV6_UNICAST_HOPS :: 4
- IPV6_V6ONLY :: 27
-
IN6_IS_ADDR_UNSPECIFIED :: #force_inline proc "contextless" (a: in6_addr) -> b32 {
return a.s6_addr == 0
}
@@ -194,6 +229,4 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
)
}
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/netinet_tcp.odin b/core/sys/posix/netinet_tcp.odin
index ecd084b38..b1da12f5e 100644
--- a/core/sys/posix/netinet_tcp.odin
+++ b/core/sys/posix/netinet_tcp.odin
@@ -1,11 +1,10 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
// netinet/tcp.h - definitions for the Internet Transmission Control Protocol (TCP)
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
TCP_NODELAY :: 0x01
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/poll.odin b/core/sys/posix/poll.odin
index 3e825e009..9c3b8b081 100644
--- a/core/sys/posix/poll.odin
+++ b/core/sys/posix/poll.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "base:intrinsics"
@@ -72,7 +73,24 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
POLLHUP :: 0x0010
POLLNVAL :: 0x0020
-} else {
- #panic("posix is unimplemented for the current target")
-}
+} else when ODIN_OS == .Linux {
+
+ pollfd :: struct {
+ fd: FD, /* [PSX] the following descriptor being polled */
+ events: Poll_Event, /* [PSX] the input event flags */
+ revents: Poll_Event, /* [PSX] the output event flags */
+ }
+ POLLIN :: 0x0001
+ POLLRDNORM :: 0x0040
+ POLLRDBAND :: 0x0080
+ POLLPRI :: 0x0002
+ POLLOUT :: 0x0004
+ POLLWRNORM :: 0x0100
+ POLLWRBAND :: 0x0200
+
+ POLLERR :: 0x0008
+ POLLHUP :: 0x0010
+ POLLNVAL :: 0x0020
+
+}
diff --git a/core/sys/posix/posix.odin b/core/sys/posix/posix.odin
index 5cb4122a6..d56217407 100644
--- a/core/sys/posix/posix.odin
+++ b/core/sys/posix/posix.odin
@@ -1,5 +1,7 @@
/*
-Bindings for most POSIX APIs.
+Raw bindings for most POSIX APIs.
+
+Targets glibc and musl compatibility.
APIs that have been left out are due to not being useful,
being fully replaced (and better) by other Odin packages,
@@ -9,6 +11,9 @@ The struct fields that are cross-platform are documented with `[PSX]`.
Accessing these fields on one target should be the same on others.
Other fields are implementation specific.
+The parts of POSIX that Windows implements are also supported here, but
+other symbols are undefined on Windows targets.
+
Most macros have been reimplemented in Odin with inlined functions.
Unimplemented headers:
diff --git a/core/sys/posix/pthread.odin b/core/sys/posix/pthread.odin
index e264f6f6c..490064da6 100644
--- a/core/sys/posix/pthread.odin
+++ b/core/sys/posix/pthread.odin
@@ -1,10 +1,11 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
when ODIN_OS == .Darwin {
foreign import lib "system:System.framework"
-} else when ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD {
+} else when ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .Linux {
foreign import lib "system:pthread"
} else {
foreign import lib "system:c"
@@ -354,12 +355,16 @@ Thread_Scope :: enum c.int {
}
Cancel_State :: enum c.int {
+ // Cancel takes place at next cancellation point.
ENABLE = PTHREAD_CANCEL_ENABLE,
+ // Cancel postponed.
DISABLE = PTHREAD_CANCEL_DISABLE,
}
Cancel_Type :: enum c.int {
+ // Cancel waits until cancellation point.
DEFERRED = PTHREAD_CANCEL_DEFERRED,
+ // Cancel occurs immediately.
ASYNCHRONOUS = PTHREAD_CANCEL_ASYNCHRONOUS,
}
@@ -371,6 +376,12 @@ when ODIN_OS == .Darwin {
PTHREAD_CANCEL_DISABLE :: 0x00
PTHREAD_CANCEL_ENABLE :: 0x01
+ // PTHREAD_CANCEL_ASYNCHRONOUS :: 1
+ // PTHREAD_CANCEL_DEFERRED :: 0
+ //
+ // PTHREAD_CANCEL_DISABLE :: 1
+ // PTHREAD_CANCEL_ENABLE :: 0
+
PTHREAD_CANCELED :: rawptr(uintptr(1))
PTHREAD_CREATE_DETACHED :: 2
@@ -398,6 +409,16 @@ when ODIN_OS == .Darwin {
pthread_key_t :: distinct c.ulong
+ pthread_mutex_t :: struct {
+ __sig: c.long,
+ __opaque: [56]c.char,
+ }
+
+ pthread_cond_t :: struct {
+ __sig: c.long,
+ __opaque: [40]c.char,
+ }
+
sched_param :: struct {
sched_priority: c.int, /* [PSX] process or thread execution scheduling priority */
_: [4]c.char,
@@ -423,18 +444,28 @@ when ODIN_OS == .Darwin {
PTHREAD_PRIO_NONE :: 0
PTHREAD_PRIO_PROTECT :: 2
- PTHREAD_PROCESS_SHARED :: 0
- PTHREAD_PROCESS_PRIVATE :: 1
+ PTHREAD_PROCESS_SHARED :: 1
+ PTHREAD_PROCESS_PRIVATE :: 0
PTHREAD_SCOPE_PROCESS :: 0
PTHREAD_SCOPE_SYSTEM :: 2
pthread_t :: distinct u64
- pthread_attr_t :: distinct rawptr
+ pthread_attr_t :: struct #align(8) {
+ _: [8]byte,
+ }
pthread_key_t :: distinct c.int
+ pthread_mutex_t :: struct #align(8) {
+ _: [8]byte,
+ }
+
+ pthread_cond_t :: struct #align(8) {
+ _: [8]byte,
+ }
+
sched_param :: struct {
sched_priority: c.int, /* [PSX] process or thread execution scheduling priority */
}
@@ -475,6 +506,14 @@ when ODIN_OS == .Darwin {
pthread_key_t :: distinct c.int
+ pthread_cond_t :: struct #align(8) {
+ _: [40]byte,
+ }
+
+ pthread_mutex_t :: struct #align(8) {
+ _: [48]byte,
+ }
+
sched_param :: struct {
sched_priority: c.int, /* [PSX] process or thread execution scheduling priority */
}
@@ -505,14 +544,68 @@ when ODIN_OS == .Darwin {
PTHREAD_SCOPE_PROCESS :: 0
PTHREAD_SCOPE_SYSTEM :: 0x2
- pthread_t :: distinct rawptr
- pthread_attr_t :: distinct rawptr
- pthread_key_t :: distinct c.int
+ pthread_t :: distinct rawptr
+ pthread_attr_t :: distinct rawptr
+ pthread_key_t :: distinct c.int
+ pthread_mutex_t :: distinct rawptr
+ pthread_cond_t :: distinct rawptr
sched_param :: struct {
sched_priority: c.int, /* [PSX] process or thread execution scheduling priority */
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ PTHREAD_CANCEL_DEFERRED :: 0
+ PTHREAD_CANCEL_ASYNCHRONOUS :: 1
+
+ PTHREAD_CANCEL_ENABLE :: 0
+ PTHREAD_CANCEL_DISABLE :: 1
+
+ PTHREAD_CANCELED :: rawptr(~uintptr(0))
+
+ PTHREAD_CREATE_JOINABLE :: 0
+ PTHREAD_CREATE_DETACHED :: 1
+
+ PTHREAD_INHERIT_SCHED :: 0
+ PTHREAD_EXPLICIT_SCHED :: 1
+
+ PTHREAD_PRIO_NONE :: 0
+ PTHREAD_PRIO_INHERIT :: 1
+ PTHREAD_PRIO_PROTECT :: 2
+
+ PTHREAD_PROCESS_PRIVATE :: 0
+ PTHREAD_PROCESS_SHARED :: 1
+
+ PTHREAD_SCOPE_SYSTEM :: 0
+ PTHREAD_SCOPE_PROCESS :: 1
+
+ pthread_t :: distinct c.ulong
+
+ pthread_attr_t :: struct #raw_union {
+ __size: [56]c.char, // NOTE: may be smaller depending on libc or arch, but never larger.
+ __align: c.long,
+ }
+
+ pthread_key_t :: distinct c.uint
+
+ pthread_cond_t :: struct {
+ __size: [40]c.char, // NOTE: may be smaller depending on libc or arch, but never larger.
+ __align: c.long,
+ }
+
+ pthread_mutex_t :: struct {
+ __size: [32]c.char, // NOTE: may be smaller depending on libc or arch, but never larger.
+ __align: c.long,
+ }
+
+ sched_param :: struct {
+ sched_priority: c.int, /* [PSX] process or thread execution scheduling priority */
+
+ // NOTE: may be smaller depending on libc or arch, but never larger.
+ __reserved1: c.int,
+ __reserved2: [4]c.long,
+ __reserved3: c.int,
+ }
+
}
diff --git a/core/sys/posix/pwd.odin b/core/sys/posix/pwd.odin
index 546d58309..33cbcd7c5 100644
--- a/core/sys/posix/pwd.odin
+++ b/core/sys/posix/pwd.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -163,6 +164,16 @@ when ODIN_OS == .Darwin || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
pw_fields: c.int,
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ passwd :: struct {
+ pw_name: cstring, /* [PSX] user name */
+ pw_passwd: cstring, /* encrypted password */
+ pw_uid: uid_t, /* [PSX] user uid */
+ pw_gid: gid_t, /* [PSX] user gid */
+ pw_gecos: cstring, /* Real name. */
+ pw_dir: cstring, /* Home directory. */
+ pw_shell: cstring, /* Shell program. */
+ }
+
}
diff --git a/core/sys/posix/sched.odin b/core/sys/posix/sched.odin
index 6623ba6e6..e91178b09 100644
--- a/core/sys/posix/sched.odin
+++ b/core/sys/posix/sched.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -94,12 +95,10 @@ when ODIN_OS == .Darwin {
SCHED_RR :: 3
SCHED_OTHER :: 2
-} else when ODIN_OS == .NetBSD {
+} else when ODIN_OS == .NetBSD || ODIN_OS == .Linux {
SCHED_OTHER :: 0
SCHED_FIFO :: 1
SCHED_RR :: 2
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/setjmp.odin b/core/sys/posix/setjmp.odin
index cb1dad184..926dbd3ad 100644
--- a/core/sys/posix/setjmp.odin
+++ b/core/sys/posix/setjmp.odin
@@ -1,7 +1,7 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
-import "core:c/libc"
when ODIN_OS == .Darwin {
foreign import lib "system:System.framework"
@@ -43,12 +43,8 @@ foreign lib {
sigsetjmp :: proc(env: ^sigjmp_buf, savemask: b32) -> c.int ---
}
-jmp_buf :: libc.jmp_buf
sigjmp_buf :: distinct jmp_buf
-longjmp :: libc.longjmp
-setjmp :: libc.setjmp
-
when ODIN_OS == .NetBSD {
@(private) LSIGSETJMP :: "__sigsetjmp14"
@(private) LSIGLONGJMP :: "__siglongjmp14"
diff --git a/core/sys/posix/setjmp_libc.odin b/core/sys/posix/setjmp_libc.odin
new file mode 100644
index 000000000..a69dff09f
--- /dev/null
+++ b/core/sys/posix/setjmp_libc.odin
@@ -0,0 +1,11 @@
+#+build windows, linux, darwin, netbsd, openbsd, freebsd
+package posix
+
+import "core:c/libc"
+
+// setjmp.h - stack environment declarations
+
+jmp_buf :: libc.jmp_buf
+
+longjmp :: libc.longjmp
+setjmp :: libc.setjmp
diff --git a/core/sys/posix/signal.odin b/core/sys/posix/signal.odin
index c35494185..4ba4e9943 100644
--- a/core/sys/posix/signal.odin
+++ b/core/sys/posix/signal.odin
@@ -1,9 +1,9 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "base:intrinsics"
import "core:c"
-import "core:c/libc"
when ODIN_OS == .Darwin {
foreign import lib "system:System.framework"
@@ -14,31 +14,6 @@ when ODIN_OS == .Darwin {
// signal.h - signals
foreign lib {
- // LIBC:
-
- /*
- Set a signal handler.
-
- func can either be:
- - `auto_cast posix.SIG_DFL` setting the default handler for that specific signal
- - `auto_cast posix.SIG_IGN` causing the specific signal to be ignored
- - a custom signal handler
-
- Returns: SIG_ERR (setting errno), the last value of func on success
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/signal.html ]]
- */
- signal :: proc(sig: Signal, func: proc "c" (Signal)) -> proc "c" (Signal) ---
-
- /*
- Raises a signal, calling its handler and then returning.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/raise.html ]]
- */
- raise :: proc(sig: Signal) -> result ---
-
- // POSIX:
-
/*
Raise a signal to the process/group specified by pid.
@@ -227,72 +202,6 @@ sigval :: struct #raw_union {
sigval_ptr: rawptr, /* [PSX] pointer signal value */
}
-Signal :: enum c.int {
- NONE,
-
- // LIBC:
-
- // Process abort signal.
- SIGABRT = SIGABRT,
- // Erronous arithemtic operation.
- SIGFPE = SIGFPE,
- // Illegal instruction.
- SIGILL = SIGILL,
- // Terminal interrupt signal.
- SIGINT = SIGINT,
- // Invalid memory reference.
- SIGSEGV = SIGSEGV,
- // Termination signal.
- SIGTERM = SIGTERM,
-
- // POSIX:
-
- // Process abort signal.
- SIGALRM = SIGALRM,
- // Access to an undefined portion of a memory object.
- SIGBUS = SIGBUS,
- // Child process terminated, stopped, or continued.
- SIGCHLD = SIGCHLD,
- // Continue execution, if stopped.
- SIGCONT = SIGCONT,
- // Hangup.
- SIGHUP = SIGHUP,
- // Kill (cannot be caught or ignored).
- SIGKILL = SIGKILL,
- // Write on a pipe with no one to read it.
- SIGPIPE = SIGPIPE,
- // Terminal quit signal.
- SIGQUIT = SIGQUIT,
- // Stop executing (cannot be caught or ignored).
- SIGSTOP = SIGSTOP,
- // Terminal stop process.
- SIGTSTP = SIGTSTP,
- // Background process attempting read.
- SIGTTIN = SIGTTIN,
- // Background process attempting write.
- SIGTTOU = SIGTTOU,
- // User-defined signal 1.
- SIGUSR1 = SIGUSR1,
- // User-defined signal 2.
- SIGUSR2 = SIGUSR2,
- // Pollable event.
- SIGPOLL = SIGPOLL,
- // Profiling timer expired.
- SIGPROF = SIGPROF,
- // Bad system call.
- SIGSYS = SIGSYS,
- // Trace/breakpoint trap.
- SIGTRAP = SIGTRAP,
- // High bandwidth data is available at a socket.
- SIGURG = SIGURG,
- // Virtual timer expired.
- SIGVTALRM = SIGVTALRM,
- // CPU time limit exceeded.
- SIGXCPU = SIGXCPU,
- // File size limit exceeded.
- SIGXFSZ = SIGXFSZ,
-}
-
ILL_Code :: enum c.int {
// Illegal opcode.
ILLOPC = ILL_ILLOPC,
@@ -434,20 +343,6 @@ Sig :: enum c.int {
SETMASK = SIG_SETMASK,
}
-// Request for default signal handling.
-SIG_DFL :: libc.SIG_DFL
-// Return value from signal() in case of error.
-SIG_ERR :: libc.SIG_ERR
-// Request that signal be ignored.
-SIG_IGN :: libc.SIG_IGN
-
-SIGABRT :: libc.SIGABRT
-SIGFPE :: libc.SIGFPE
-SIGILL :: libc.SIGILL
-SIGINT :: libc.SIGINT
-SIGSEGV :: libc.SIGSEGV
-SIGTERM :: libc.SIGTERM
-
when ODIN_OS == .NetBSD {
@(private) LSIGPROCMASK :: "__sigprocmask14"
@(private) LSIGACTION :: "__sigaction_siginfo"
@@ -480,11 +375,6 @@ when ODIN_OS == .Darwin {
uid_t :: distinct c.uint32_t
sigset_t :: distinct c.uint32_t
- // MOTE: unimplemented on darwin.
- //
- // SIGRTMIN ::
- // SIGRTMAX ::
-
SIGHUP :: 1
SIGQUIT :: 3
SIGTRAP :: 5
@@ -625,11 +515,6 @@ when ODIN_OS == .Darwin {
__bits: [4]c.uint32_t,
}
- // MOTE: unimplemented on darwin.
- //
- // SIGRTMIN :: 65
- // SIGRTMAX :: 126
-
SIGHUP :: 1
SIGQUIT :: 3
SIGTRAP :: 5
@@ -794,11 +679,6 @@ when ODIN_OS == .Darwin {
__bits: [4]c.uint32_t,
}
- // MOTE: unimplemented on darwin.
- //
- // SIGRTMIN :: 33
- // SIGRTMAX :: 63
-
SIGHUP :: 1
SIGQUIT :: 3
SIGTRAP :: 5
@@ -1126,6 +1006,178 @@ when ODIN_OS == .Darwin {
SI_ASYNCIO :: -4 // NOTE: not implemented
SI_MESGQ :: -5 // NOTE: not implemented
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ // Request that signal be held
+ SIG_HOLD :: rawptr(uintptr(2))
+
+ uid_t :: distinct c.uint32_t
+ sigset_t :: struct {
+ __val: [1024/(8 * size_of(c.ulong))]c.ulong,
+ }
+
+ SIGHUP :: 1
+ SIGQUIT :: 3
+ SIGTRAP :: 5
+ SIGBUS :: 7
+ SIGKILL :: 9
+ SIGUSR1 :: 10
+ SIGUSR2 :: 12
+ SIGPIPE :: 13
+ SIGALRM :: 14
+ SIGCHLD :: 17
+ SIGCONT :: 18
+ SIGSTOP :: 19
+ SIGTSTP :: 20
+ SIGTTIN :: 21
+ SIGTTOU :: 22
+ SIGURG :: 23
+ SIGXCPU :: 24
+ SIGXFSZ :: 25
+ SIGVTALRM :: 26
+ SIGPROF :: 27
+ SIGPOLL :: 29
+ SIGSYS :: 31
+
+ // NOTE: this is actually defined as `sigaction`, but due to the function with the same name
+ // `_t` has been added.
+
+ sigaction_t :: struct {
+ using _: struct #raw_union {
+ sa_handler: proc "c" (Signal), /* [PSX] signal-catching function or one of the SIG_IGN or SIG_DFL */
+ sa_sigaction: proc "c" (Signal, ^siginfo_t, rawptr), /* [PSX] signal-catching function */
+ },
+ sa_mask: sigset_t, /* [PSX] set of signals to be blocked during execution of the signal handling function */
+ sa_flags: SA_Flags, /* [PSX] special flags */
+ sa_restorer: proc "c" (),
+ }
+
+ SIG_BLOCK :: 0
+ SIG_UNBLOCK :: 1
+ SIG_SETMASK :: 2
+
+ SA_NOCLDSTOP :: 1
+ SA_NOCLDWAIT :: 2
+ SA_SIGINFO :: 4
+ SA_ONSTACK :: 0x08000000
+ SA_RESTART :: 0x10000000
+ SA_NODEFER :: 0x40000000
+ SA_RESETHAND :: 0x80000000
+
+ SS_ONSTACK :: 1
+ SS_DISABLE :: 2
+
+ when ODIN_ARCH == .arm64 {
+ MINSIGSTKSZ :: 6144
+ SIGSTKSZ :: 12288
+ } else {
+ MINSIGSTKSZ :: 2048
+ SIGSTKSZ :: 8192
+ }
+
+ stack_t :: struct {
+ ss_sp: rawptr, /* [PSX] stack base or pointer */
+ ss_flags: SS_Flags, /* [PSX] flags */
+ ss_size: c.size_t, /* [PSX] stack size */
+ }
+
+ @(private)
+ __SI_MAX_SIZE :: 128
+
+ when size_of(int) == 8 {
+ @(private)
+ _pad0 :: struct {
+ _pad0: c.int,
+ }
+ @(private)
+ __SI_PAD_SIZE :: (__SI_MAX_SIZE / size_of(c.int)) - 4
+
+ } else {
+ @(private)
+ _pad0 :: struct {}
+ @(private)
+ __SI_PAD_SIZE :: (__SI_MAX_SIZE / size_of(c.int)) - 3
+ }
+
+ siginfo_t :: struct #align(8) {
+ si_signo: Signal, /* [PSX] signal number */
+ si_errno: Errno, /* [PSX] errno value associated with this signal */
+ si_code: struct #raw_union { /* [PSX] specific more detailed codes per signal */
+ ill: ILL_Code,
+ fpe: FPE_Code,
+ segv: SEGV_Code,
+ bus: BUS_Code,
+ trap: TRAP_Code,
+ chld: CLD_Code,
+ poll: POLL_Code,
+ any: Any_Code,
+ },
+ __pad0: _pad0,
+ using _sifields: struct #raw_union {
+ _pad: [__SI_PAD_SIZE]c.int,
+
+ using _: struct {
+ si_pid: pid_t, /* [PSX] sending process ID */
+ si_uid: uid_t, /* [PSX] real user ID of sending process */
+ using _: struct #raw_union {
+ si_status: c.int, /* [PSX] exit value or signal */
+ si_value: sigval, /* [PSX] signal value */
+ },
+ },
+ using _: struct {
+ si_addr: rawptr, /* [PSX] address of faulting instruction */
+ },
+ using _: struct {
+ si_band: c.long, /* [PSX] band event for SIGPOLL */
+ },
+ },
+ }
+
+ ILL_ILLOPC :: 1
+ ILL_ILLOPN :: 2
+ ILL_ILLADR :: 3
+ ILL_ILLTRP :: 4
+ ILL_PRVOPC :: 5
+ ILL_PRVREG :: 6
+ ILL_COPROC :: 7
+ ILL_BADSTK :: 8
+
+ FPE_INTDIV :: 1
+ FPE_INTOVF :: 2
+ FPE_FLTDIV :: 3
+ FPE_FLTOVF :: 4
+ FPE_FLTUND :: 5
+ FPE_FLTRES :: 6
+ FPE_FLTINV :: 7
+ FPE_FLTSUB :: 8
+
+ SEGV_MAPERR :: 1
+ SEGV_ACCERR :: 2
+
+ BUS_ADRALN :: 1
+ BUS_ADRERR :: 2
+ BUS_OBJERR :: 3
+
+ TRAP_BRKPT :: 1
+ TRAP_TRACE :: 2
+
+ CLD_EXITED :: 1
+ CLD_KILLED :: 2
+ CLD_DUMPED :: 3
+ CLD_TRAPPED :: 4
+ CLD_STOPPED :: 5
+ CLD_CONTINUED :: 6
+
+ POLL_IN :: 1
+ POLL_OUT :: 2
+ POLL_MSG :: 3
+ POLL_ERR :: 4
+ POLL_PRI :: 5
+ POLL_HUP :: 6
+
+ SI_USER :: 0
+ SI_QUEUE :: -1
+ SI_TIMER :: -2
+ SI_MESGQ :: -3
+ SI_ASYNCIO :: -4
}
diff --git a/core/sys/posix/signal_libc.odin b/core/sys/posix/signal_libc.odin
new file mode 100644
index 000000000..aef22da29
--- /dev/null
+++ b/core/sys/posix/signal_libc.odin
@@ -0,0 +1,145 @@
+#+build linux, windows, darwin, netbsd, openbsd, freebsd
+package posix
+
+import "base:intrinsics"
+
+import "core:c"
+import "core:c/libc"
+
+when ODIN_OS == .Windows {
+ foreign import lib "system:libucrt.lib"
+} else when ODIN_OS == .Darwin {
+ foreign import lib "system:System.framework"
+} else {
+ foreign import lib "system:c"
+}
+
+// signal.h - signals
+
+foreign lib {
+ /*
+ Set a signal handler.
+
+ func can either be:
+ - `auto_cast posix.SIG_DFL` setting the default handler for that specific signal
+ - `auto_cast posix.SIG_IGN` causing the specific signal to be ignored
+ - a custom signal handler
+
+ Returns: SIG_ERR (setting errno), the last value of func on success
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/signal.html ]]
+ */
+ signal :: proc(sig: Signal, func: proc "c" (Signal)) -> proc "c" (Signal) ---
+
+ /*
+ Raises a signal, calling its handler and then returning.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/raise.html ]]
+ */
+ raise :: proc(sig: Signal) -> result ---
+}
+
+Signal :: enum c.int {
+ NONE,
+
+ // LIBC:
+
+ // Process abort signal.
+ SIGABRT = SIGABRT,
+ // Erronous arithemtic operation.
+ SIGFPE = SIGFPE,
+ // Illegal instruction.
+ SIGILL = SIGILL,
+ // Terminal interrupt signal.
+ SIGINT = SIGINT,
+ // Invalid memory reference.
+ SIGSEGV = SIGSEGV,
+ // Termination signal.
+ SIGTERM = SIGTERM,
+
+ // POSIX:
+
+ // Process abort signal.
+ SIGALRM = SIGALRM,
+ // Access to an undefined portion of a memory object.
+ SIGBUS = SIGBUS,
+ // Child process terminated, stopped, or continued.
+ SIGCHLD = SIGCHLD,
+ // Continue execution, if stopped.
+ SIGCONT = SIGCONT,
+ // Hangup.
+ SIGHUP = SIGHUP,
+ // Kill (cannot be caught or ignored).
+ SIGKILL = SIGKILL,
+ // Write on a pipe with no one to read it.
+ SIGPIPE = SIGPIPE,
+ // Terminal quit signal.
+ SIGQUIT = SIGQUIT,
+ // Stop executing (cannot be caught or ignored).
+ SIGSTOP = SIGSTOP,
+ // Terminal stop process.
+ SIGTSTP = SIGTSTP,
+ // Background process attempting read.
+ SIGTTIN = SIGTTIN,
+ // Background process attempting write.
+ SIGTTOU = SIGTTOU,
+ // User-defined signal 1.
+ SIGUSR1 = SIGUSR1,
+ // User-defined signal 2.
+ SIGUSR2 = SIGUSR2,
+ // Pollable event.
+ SIGPOLL = SIGPOLL,
+ // Profiling timer expired.
+ SIGPROF = SIGPROF,
+ // Bad system call.
+ SIGSYS = SIGSYS,
+ // Trace/breakpoint trap.
+ SIGTRAP = SIGTRAP,
+ // High bandwidth data is available at a socket.
+ SIGURG = SIGURG,
+ // Virtual timer expired.
+ SIGVTALRM = SIGVTALRM,
+ // CPU time limit exceeded.
+ SIGXCPU = SIGXCPU,
+ // File size limit exceeded.
+ SIGXFSZ = SIGXFSZ,
+}
+
+// Request for default signal handling.
+SIG_DFL :: libc.SIG_DFL
+// Return value from signal() in case of error.
+SIG_ERR :: libc.SIG_ERR
+// Request that signal be ignored.
+SIG_IGN :: libc.SIG_IGN
+
+SIGABRT :: libc.SIGABRT
+SIGFPE :: libc.SIGFPE
+SIGILL :: libc.SIGILL
+SIGINT :: libc.SIGINT
+SIGSEGV :: libc.SIGSEGV
+SIGTERM :: libc.SIGTERM
+
+when ODIN_OS == .Windows {
+ SIGALRM :: -1
+ SIGBUS :: -1
+ SIGCHLD :: -1
+ SIGCONT :: -1
+ SIGHUP :: -1
+ SIGKILL :: -1
+ SIGPIPE :: -1
+ SIGQUIT :: -1
+ SIGSTOP :: -1
+ SIGTSTP :: -1
+ SIGTTIN :: -1
+ SIGTTOU :: -1
+ SIGUSR1 :: -1
+ SIGUSR2 :: -1
+ SIGPOLL :: -1
+ SIGPROF :: -1
+ SIGSYS :: -1
+ SIGTRAP :: -1
+ SIGURG :: -1
+ SIGVTALRM :: -1
+ SIGXCPU :: -1
+ SIGXFSZ :: -1
+}
diff --git a/core/sys/posix/stdio.odin b/core/sys/posix/stdio.odin
index de716f8d7..24464dfd8 100644
--- a/core/sys/posix/stdio.odin
+++ b/core/sys/posix/stdio.odin
@@ -1,7 +1,7 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
-import "core:c/libc"
when ODIN_OS == .Darwin {
foreign import lib "system:System.framework"
@@ -33,16 +33,6 @@ foreign lib {
dprintf :: proc(fildse: FD, format: cstring, #c_vararg args: ..any) -> c.int ---
/*
- Equivalent to fprintf but output is written to s, it is the user's responsibility to
- ensure there is enough space.
-
- Return: number of bytes written, negative (setting errno) on failure
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/dprintf.html ]]
- */
- sprintf :: proc(s: [^]byte, format: cstring, #c_vararg args: ..any) -> c.int ---
-
- /*
Associate a stream with a file descriptor.
Returns: nil (setting errno) on failure, the stream on success
@@ -116,34 +106,6 @@ foreign lib {
open_memstream :: proc(bufp: ^[^]byte, sizep: ^c.size_t) -> ^FILE ---
/*
- Equivalent to getc but unaffected by locks.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getc_unlocked.html ]]
- */
- getc_unlocked :: proc(stream: ^FILE) -> c.int ---
-
- /*
- Equivalent to getchar but unaffected by locks.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getc_unlocked.html ]]
- */
- getchar_unlocked :: proc() -> c.int ---
-
- /*
- Equivalent to putc but unaffected by locks.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getc_unlocked.html ]]
- */
- putc_unlocked :: proc(ch: c.int, stream: ^FILE) -> c.int ---
-
- /*
- Equivalent to putchar but unaffected by locks.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getc_unlocked.html ]]
- */
- putchar_unlocked :: proc(ch: c.int) -> c.int ---
-
- /*
Read a delimited record from the stream.
Returns: the number of bytes written or -1 on failure/EOF
@@ -182,60 +144,6 @@ foreign lib {
getline :: proc(lineptr: ^cstring, n: ^c.size_t, stream: ^FILE) -> c.ssize_t ---
/*
- Get a string from the stdin stream.
-
- It is up to the user to make sure s is big enough.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/gets.html ]]
- */
- gets :: proc(s: [^]byte) -> cstring ---
-
- /*
- Create a name for a temporary file.
-
- Returns: an allocated cstring that needs to be freed, nil on failure
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/tempnam.html ]]
- */
- tempnam :: proc(dir: cstring, pfx: cstring) -> cstring ---
-
- /*
- Executes the command specified, creating a pipe and returning a pointer to a stream that can
- read or write from/to the pipe.
-
- Returns: nil (setting errno) on failure or a pointer to the stream
-
- Example:
- fp := posix.popen("ls *", "r")
- if fp == nil {
- /* Handle error */
- }
-
- path: [1024]byte
- for posix.fgets(raw_data(path[:]), len(path), fp) != nil {
- posix.printf("%s", &path)
- }
-
- status := posix.pclose(fp)
- if status == -1 {
- /* Error reported by pclose() */
- } else {
- /* Use functions described under wait() to inspect `status` in order
- to determine success/failure of the command executed by popen() */
- }
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/popen.html ]]
- */
- popen :: proc(command: cstring, mode: cstring) -> ^FILE ---
-
- /*
- Closes a pipe stream to or from a process.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/pclose.html ]]
- */
- pclose :: proc(stream: ^FILE) -> c.int ---
-
- /*
Equivalent to rename but relative directories are resolved from their respective fds.
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/renameat.html ]]
@@ -243,76 +151,6 @@ foreign lib {
renameat :: proc(oldfd: FD, old: cstring, newfd: FD, new: cstring) -> result ---
}
-clearerr :: libc.clearerr
-fclose :: libc.fclose
-feof :: libc.feof
-ferror :: libc.ferror
-fflush :: libc.fflush
-fgetc :: libc.fgetc
-fgetpos :: libc.fgetpos
-fgets :: libc.fgets
-fopen :: libc.fopen
-fprintf :: libc.fprintf
-fputc :: libc.fputc
-fread :: libc.fread
-freopen :: libc.freopen
-fscanf :: libc.fscanf
-fseek :: libc.fseek
-fsetpos :: libc.fsetpos
-ftell :: libc.ftell
-fwrite :: libc.fwrite
-getc :: libc.getc
-getchar :: libc.getchar
-perror :: libc.perror
-printf :: libc.printf
-putc :: libc.puts
-putchar :: libc.putchar
-puts :: libc.puts
-remove :: libc.remove
-rename :: libc.rename
-rewind :: libc.rewind
-scanf :: libc.scanf
-setbuf :: libc.setbuf
-setvbuf :: libc.setvbuf
-snprintf :: libc.snprintf
-sscanf :: libc.sscanf
-tmpfile :: libc.tmpfile
-tmpnam :: libc.tmpnam
-vfprintf :: libc.vfprintf
-vfscanf :: libc.vfscanf
-vprintf :: libc.vprintf
-vscanf :: libc.vscanf
-vsnprintf :: libc.vsnprintf
-vsprintf :: libc.vsprintf
-vsscanf :: libc.vsscanf
-ungetc :: libc.ungetc
-
-to_stream :: libc.to_stream
-
-Whence :: libc.Whence
-FILE :: libc.FILE
-fpos_t :: libc.fpos_t
-
-BUFSIZ :: libc.BUFSIZ
-
-_IOFBF :: libc._IOFBF
-_IOLBF :: libc._IOLBF
-_IONBF :: libc._IONBF
-
-SEEK_CUR :: libc.SEEK_CUR
-SEEK_END :: libc.SEEK_END
-SEEK_SET :: libc.SEEK_SET
-
-FILENAME_MAX :: libc.FILENAME_MAX
-FOPEN_MAX :: libc.FOPEN_MAX
-TMP_MAX :: libc.TMP_MAX
-
-EOF :: libc.EOF
-
-stderr := libc.stderr
-stdin := libc.stdin
-stdout := libc.stdout
-
when ODIN_OS == .Darwin {
L_ctermid :: 1024
@@ -327,6 +165,11 @@ when ODIN_OS == .Darwin {
P_tmpdir :: "/tmp/"
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ L_ctermid :: 20 // 20 on musl, 9 on glibc
+ L_tmpnam :: 20
+
+ P_tmpdir :: "/tmp/"
+
}
diff --git a/core/sys/posix/stdio_libc.odin b/core/sys/posix/stdio_libc.odin
new file mode 100644
index 000000000..fbd949b2c
--- /dev/null
+++ b/core/sys/posix/stdio_libc.odin
@@ -0,0 +1,207 @@
+#+build linux, windows, linux, darwin, netbsd, openbsd, freebsd
+package posix
+
+import "core:c"
+import "core:c/libc"
+
+when ODIN_OS == .Windows {
+ foreign import lib {
+ "system:libucrt.lib",
+ "system:legacy_stdio_definitions.lib",
+ }
+} else when ODIN_OS == .Darwin {
+ foreign import lib "system:System.framework"
+} else {
+ foreign import lib "system:c"
+}
+
+// stdio.h - standard buffered input/output
+
+when ODIN_OS == .Windows {
+ @(private) LGETC_UNLOCKED :: "_getc_nolock"
+ @(private) LGETCHAR_UNLOCKED :: "_getchar_nolock"
+ @(private) LPUTC_UNLOCKED :: "_putc_nolock"
+ @(private) LPUTCHAR_UNLOCKED :: "_putchar_nolock"
+ @(private) LTEMPNAM :: "_tempnam"
+ @(private) LPOPEN :: "_popen"
+ @(private) LPCLOSE :: "_pclose"
+} else {
+ @(private) LGETC_UNLOCKED :: "getc_unlocked"
+ @(private) LGETCHAR_UNLOCKED :: "getchar_unlocked"
+ @(private) LPUTC_UNLOCKED :: "putc_unlocked"
+ @(private) LPUTCHAR_UNLOCKED :: "putchar_unlocked"
+ @(private) LTEMPNAM :: "tempnam"
+ @(private) LPOPEN :: "popen"
+ @(private) LPCLOSE :: "pclose"
+}
+
+foreign lib {
+ /*
+ Equivalent to fprintf but output is written to s, it is the user's responsibility to
+ ensure there is enough space.
+
+ Return: number of bytes written, negative (setting errno) on failure
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/dprintf.html ]]
+ */
+ sprintf :: proc(s: [^]byte, format: cstring, #c_vararg args: ..any) -> c.int ---
+
+ /*
+ Equivalent to getc but unaffected by locks.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getc_unlocked.html ]]
+ */
+ @(link_name=LGETC_UNLOCKED)
+ getc_unlocked :: proc(stream: ^FILE) -> c.int ---
+
+ /*
+ Equivalent to getchar but unaffected by locks.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getc_unlocked.html ]]
+ */
+ @(link_name=LGETCHAR_UNLOCKED)
+ getchar_unlocked :: proc() -> c.int ---
+
+ /*
+ Equivalent to putc but unaffected by locks.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getc_unlocked.html ]]
+ */
+ @(link_name=LPUTC_UNLOCKED)
+ putc_unlocked :: proc(ch: c.int, stream: ^FILE) -> c.int ---
+
+ /*
+ Equivalent to putchar but unaffected by locks.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getc_unlocked.html ]]
+ */
+ @(link_name=LPUTCHAR_UNLOCKED)
+ putchar_unlocked :: proc(ch: c.int) -> c.int ---
+
+ /*
+ Get a string from the stdin stream.
+
+ It is up to the user to make sure s is big enough.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/gets.html ]]
+ */
+ gets :: proc(s: [^]byte) -> cstring ---
+
+ /*
+ Create a name for a temporary file.
+
+ Returns: an allocated cstring that needs to be freed, nil on failure
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/tempnam.html ]]
+ */
+ @(link_name=LTEMPNAM)
+ tempnam :: proc(dir: cstring, pfx: cstring) -> cstring ---
+
+ /*
+ Executes the command specified, creating a pipe and returning a pointer to a stream that can
+ read or write from/to the pipe.
+
+ Returns: nil (setting errno) on failure or a pointer to the stream
+
+ Example:
+ fp := posix.popen("ls *", "r")
+ if fp == nil {
+ /* Handle error */
+ }
+
+ path: [1024]byte
+ for posix.fgets(raw_data(path[:]), len(path), fp) != nil {
+ posix.printf("%s", &path)
+ }
+
+ status := posix.pclose(fp)
+ if status == -1 {
+ /* Error reported by pclose() */
+ } else {
+ /* Use functions described under wait() to inspect `status` in order
+ to determine success/failure of the command executed by popen() */
+ }
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/popen.html ]]
+ */
+ @(link_name=LPOPEN)
+ popen :: proc(command: cstring, mode: cstring) -> ^FILE ---
+
+ /*
+ Closes a pipe stream to or from a process.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/pclose.html ]]
+ */
+ @(link_name=LPCLOSE)
+ pclose :: proc(stream: ^FILE) -> c.int ---
+}
+
+clearerr :: libc.clearerr
+fclose :: libc.fclose
+feof :: libc.feof
+ferror :: libc.ferror
+fflush :: libc.fflush
+fgetc :: libc.fgetc
+fgetpos :: libc.fgetpos
+fgets :: libc.fgets
+fopen :: libc.fopen
+fprintf :: libc.fprintf
+fputc :: libc.fputc
+fread :: libc.fread
+freopen :: libc.freopen
+fscanf :: libc.fscanf
+fseek :: libc.fseek
+fsetpos :: libc.fsetpos
+ftell :: libc.ftell
+fwrite :: libc.fwrite
+getc :: libc.getc
+getchar :: libc.getchar
+perror :: libc.perror
+printf :: libc.printf
+putc :: libc.puts
+putchar :: libc.putchar
+puts :: libc.puts
+remove :: libc.remove
+rename :: libc.rename
+rewind :: libc.rewind
+scanf :: libc.scanf
+setbuf :: libc.setbuf
+setvbuf :: libc.setvbuf
+snprintf :: libc.snprintf
+sscanf :: libc.sscanf
+tmpfile :: libc.tmpfile
+tmpnam :: libc.tmpnam
+vfprintf :: libc.vfprintf
+vfscanf :: libc.vfscanf
+vprintf :: libc.vprintf
+vscanf :: libc.vscanf
+vsnprintf :: libc.vsnprintf
+vsprintf :: libc.vsprintf
+vsscanf :: libc.vsscanf
+ungetc :: libc.ungetc
+
+to_stream :: libc.to_stream
+
+Whence :: libc.Whence
+FILE :: libc.FILE
+fpos_t :: libc.fpos_t
+
+BUFSIZ :: libc.BUFSIZ
+
+_IOFBF :: libc._IOFBF
+_IOLBF :: libc._IOLBF
+_IONBF :: libc._IONBF
+
+SEEK_CUR :: libc.SEEK_CUR
+SEEK_END :: libc.SEEK_END
+SEEK_SET :: libc.SEEK_SET
+
+FILENAME_MAX :: libc.FILENAME_MAX
+FOPEN_MAX :: libc.FOPEN_MAX
+TMP_MAX :: libc.TMP_MAX
+
+EOF :: libc.EOF
+
+stderr := libc.stderr
+stdin := libc.stdin
+stdout := libc.stdout
diff --git a/core/sys/posix/stdlib.odin b/core/sys/posix/stdlib.odin
index a1e2eab50..640c70b5a 100644
--- a/core/sys/posix/stdlib.odin
+++ b/core/sys/posix/stdlib.odin
@@ -1,9 +1,9 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "base:intrinsics"
import "core:c"
-import "core:c/libc"
when ODIN_OS == .Darwin {
foreign import lib "system:System.framework"
@@ -11,56 +11,6 @@ when ODIN_OS == .Darwin {
foreign import lib "system:c"
}
-// stdlib.h - standard library definitions
-
-atof :: libc.atof
-atoi :: libc.atoi
-atol :: libc.atol
-atoll :: libc.atoll
-strtod :: libc.strtod
-strtof :: libc.strtof
-strtol :: libc.strtol
-strtoll :: libc.strtoll
-strtoul :: libc.strtoul
-strtoull :: libc.strtoull
-
-rand :: libc.rand
-srand :: libc.srand
-
-calloc :: libc.calloc
-malloc :: libc.malloc
-realloc :: libc.realloc
-
-abort :: libc.abort
-atexit :: libc.atexit
-at_quick_exit :: libc.at_quick_exit
-exit :: libc.exit
-_Exit :: libc._Exit
-getenv :: libc.getenv
-quick_exit :: libc.quick_exit
-system :: libc.system
-
-bsearch :: libc.bsearch
-qsort :: libc.qsort
-
-abs :: libc.abs
-labs :: libc.labs
-llabs :: libc.llabs
-div :: libc.div
-ldiv :: libc.ldiv
-lldiv :: libc.lldiv
-
-mblen :: libc.mblen
-mbtowc :: libc.mbtowc
-wctomb :: libc.wctomb
-
-mbstowcs :: libc.mbstowcs
-wcstombs :: libc.wcstombs
-
-free :: #force_inline proc(ptr: $T) where intrinsics.type_is_pointer(T) || intrinsics.type_is_multi_pointer(T) || T == cstring {
- libc.free(rawptr(ptr))
-}
-
foreign lib {
/*
Takes a pointer to a radix-64 representation, in which the first digit is the least significant,
@@ -343,21 +293,6 @@ foreign lib {
unlockpt :: proc(fildes: FD) -> result ---
/*
- Uses the string argument to set environment variable values.
-
- Returns: 0 on success, non-zero (setting errno) on failure
-
- Example:
- if posix.putenv("HOME=/usr/home") != 0 {
- fmt.panicf("putenv failure: %v", posix.strerror(posix.errno()))
- }
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/putenv.html ]]
- */
- @(link_name=LPUTENV)
- putenv :: proc(string: cstring) -> c.int ---
-
- /*
Updates or add a variable in the environment of the calling process.
Example:
@@ -427,23 +362,11 @@ foreign lib {
setkey :: proc(key: [^]byte) ---
}
-EXIT_FAILURE :: libc.EXIT_FAILURE
-EXIT_SUCCESS :: libc.EXIT_SUCCESS
-
-RAND_MAX :: libc.RAND_MAX
-MB_CUR_MAX :: libc.MB_CUR_MAX
-
-div_t :: libc.div_t
-ldiv_t :: libc.ldiv_t
-lldiv_t :: libc.lldiv_t
-
when ODIN_OS == .NetBSD {
- @(private) LPUTENV :: "__putenv50"
@(private) LINITSTATE :: "__initstate60"
@(private) LSRANDOM :: "__srandom60"
@(private) LUNSETENV :: "__unsetenv13"
} else {
- @(private) LPUTENV :: "putenv"
@(private) LINITSTATE :: "initstate"
@(private) LSRANDOM :: "srandom"
@(private) LUNSETENV :: "unsetenv"
diff --git a/core/sys/posix/stdlib_libc.odin b/core/sys/posix/stdlib_libc.odin
new file mode 100644
index 000000000..fa4d925b2
--- /dev/null
+++ b/core/sys/posix/stdlib_libc.odin
@@ -0,0 +1,101 @@
+#+build linux, windows, darwin, netbsd, openbsd, freebsd
+package posix
+
+import "base:intrinsics"
+
+import "core:c"
+import "core:c/libc"
+
+when ODIN_OS == .Windows {
+ foreign import lib "system:libucrt.lib"
+} else when ODIN_OS == .Darwin {
+ foreign import lib "system:System.framework"
+} else {
+ foreign import lib "system:c"
+}
+
+// stdlib.h - standard library definitions
+
+atof :: libc.atof
+atoi :: libc.atoi
+atol :: libc.atol
+atoll :: libc.atoll
+strtod :: libc.strtod
+strtof :: libc.strtof
+strtol :: libc.strtol
+strtoll :: libc.strtoll
+strtoul :: libc.strtoul
+strtoull :: libc.strtoull
+
+rand :: libc.rand
+srand :: libc.srand
+
+calloc :: libc.calloc
+malloc :: libc.malloc
+realloc :: libc.realloc
+
+abort :: libc.abort
+atexit :: libc.atexit
+at_quick_exit :: libc.at_quick_exit
+exit :: libc.exit
+_Exit :: libc._Exit
+getenv :: libc.getenv
+quick_exit :: libc.quick_exit
+system :: libc.system
+
+bsearch :: libc.bsearch
+qsort :: libc.qsort
+
+abs :: libc.abs
+labs :: libc.labs
+llabs :: libc.llabs
+div :: libc.div
+ldiv :: libc.ldiv
+lldiv :: libc.lldiv
+
+mblen :: libc.mblen
+mbtowc :: libc.mbtowc
+wctomb :: libc.wctomb
+
+mbstowcs :: libc.mbstowcs
+wcstombs :: libc.wcstombs
+
+free :: #force_inline proc(ptr: $T) where intrinsics.type_is_pointer(T) || intrinsics.type_is_multi_pointer(T) || T == cstring {
+ libc.free(rawptr(ptr))
+}
+
+foreign lib {
+
+ /*
+ Uses the string argument to set environment variable values.
+
+ Returns: 0 on success, non-zero (setting errno) on failure
+
+ Example:
+ if posix.putenv("HOME=/usr/home") != 0 {
+ fmt.panicf("putenv failure: %v", posix.strerror(posix.errno()))
+ }
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/putenv.html ]]
+ */
+ @(link_name=LPUTENV)
+ putenv :: proc(string: cstring) -> c.int ---
+}
+
+EXIT_FAILURE :: libc.EXIT_FAILURE
+EXIT_SUCCESS :: libc.EXIT_SUCCESS
+
+RAND_MAX :: libc.RAND_MAX
+MB_CUR_MAX :: libc.MB_CUR_MAX
+
+div_t :: libc.div_t
+ldiv_t :: libc.ldiv_t
+lldiv_t :: libc.lldiv_t
+
+when ODIN_OS == .Windows {
+ @(private) LPUTENV :: "_putenv"
+} else when ODIN_OS == .NetBSD {
+ @(private) LPUTENV :: "__putenv50"
+} else {
+ @(private) LPUTENV :: "putenv"
+}
diff --git a/core/sys/posix/string.odin b/core/sys/posix/string.odin
index d22f49a96..96b6a9007 100644
--- a/core/sys/posix/string.odin
+++ b/core/sys/posix/string.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -14,16 +15,6 @@ when ODIN_OS == .Darwin {
foreign lib {
/*
- Map the error number to a locale-dependent error message string.
-
- Returns: a string that may be invalidated by subsequent calls
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html ]]
- */
- @(link_name="strerror")
- _strerror :: proc(errnum: Errno) -> cstring ---
-
- /*
Map the error number to a locale-dependent error message string and put it in the buffer.
Returns: ERANGE if the buffer is not big enough
@@ -41,7 +32,3 @@ foreign lib {
*/
strsignal :: proc(sig: Signal) -> cstring ---
}
-
-strerror :: #force_inline proc "contextless" (errnum: Maybe(Errno) = nil) -> cstring {
- return _strerror(errnum.? or_else errno())
-}
diff --git a/core/sys/posix/string_libc.odin b/core/sys/posix/string_libc.odin
new file mode 100644
index 000000000..336352cbc
--- /dev/null
+++ b/core/sys/posix/string_libc.odin
@@ -0,0 +1,30 @@
+#+build linux, windows, darwin, netbsd, openbsd, freebsd
+package posix
+
+when ODIN_OS == .Windows {
+ foreign import lib "system:libucrt.lib"
+} else when ODIN_OS == .Darwin {
+ foreign import lib "system:System.framework"
+} else {
+ foreign import lib "system:c"
+}
+
+// string.h - string operations
+
+// NOTE: most of the symbols in this header are not useful in Odin and have been left out.
+
+foreign lib {
+ /*
+ Map the error number to a locale-dependent error message string.
+
+ Returns: a string that may be invalidated by subsequent calls
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html ]]
+ */
+ @(link_name="strerror")
+ _strerror :: proc(errnum: Errno) -> cstring ---
+}
+
+strerror :: #force_inline proc "contextless" (errnum: Maybe(Errno) = nil) -> cstring {
+ return _strerror(errnum.? or_else errno())
+}
diff --git a/core/sys/posix/sys_ipc.odin b/core/sys/posix/sys_ipc.odin
index f8778ee15..0f7ec06c5 100644
--- a/core/sys/posix/sys_ipc.odin
+++ b/core/sys/posix/sys_ipc.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -84,6 +85,30 @@ when ODIN_OS == .Darwin {
IPC_SET :: 1
IPC_STAT :: 2
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ key_t :: distinct c.int32_t
+
+ ipc_perm :: struct {
+ __ipc_perm_key: key_t,
+ uid: uid_t, /* [PSX] owner's user ID */
+ gid: gid_t, /* [PSX] owner's group ID */
+ cuid: uid_t, /* [PSX] creator's user ID */
+ cgid: gid_t, /* [PSX] creator's group ID */
+ mode: mode_t, /* [PSX] read/write perms */
+ __ipc_perm_seq: c.int,
+ __pad1: c.long,
+ __pad2: c.long,
+ }
+
+ IPC_CREAT :: 0o01000
+ IPC_EXCL :: 0o02000
+ IPC_NOWAIT :: 0o04000
+
+ IPC_PRIVATE :: key_t(0)
+
+ IPC_RMID :: 0
+ IPC_SET :: 1
+ IPC_STAT :: 2
+
}
diff --git a/core/sys/posix/sys_mman.odin b/core/sys/posix/sys_mman.odin
index 217d321ac..0594672ae 100644
--- a/core/sys/posix/sys_mman.odin
+++ b/core/sys/posix/sys_mman.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -115,12 +116,14 @@ Prot_Flag_Bits :: enum c.int {
Prot_Flags :: bit_set[Prot_Flag_Bits; c.int]
Map_Flag_Bits :: enum c.int {
+ // Map anonymous memory.
+ ANONYMOUS = log2(MAP_ANONYMOUS),
// Interpret addr exactly.
- FIXED = log2(MAP_FIXED),
+ FIXED = log2(MAP_FIXED),
// Changes are private.
- PRIVATE = log2(MAP_PRIVATE),
+ PRIVATE = log2(MAP_PRIVATE),
// Changes are shared.
- SHARED = log2(MAP_SHARED),
+ SHARED = log2(MAP_SHARED),
}
Map_Flags :: bit_set[Map_Flag_Bits; c.int]
@@ -163,18 +166,19 @@ when ODIN_OS == .NetBSD {
@(private) LMSYNC :: "msync"
}
-when ODIN_OS == .Darwin || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
PROT_EXEC :: 0x04
_PROT_NONE :: 0x00
PROT_READ :: 0x01
PROT_WRITE :: 0x02
- MAP_FIXED :: 0x0010
- MAP_PRIVATE :: 0x0002
- MAP_SHARED :: 0x0001
+ MAP_FIXED :: 0x0010
+ MAP_PRIVATE :: 0x0002
+ MAP_SHARED :: 0x0001
+ MAP_ANONYMOUS :: 0x0020 when ODIN_OS == .Linux else 0x1000
- when ODIN_OS == .Darwin {
+ when ODIN_OS == .Darwin || ODIN_OS == .Linux {
MS_INVALIDATE :: 0x0002
_MS_SYNC :: 0x0010
} else when ODIN_OS == .NetBSD {
@@ -184,6 +188,7 @@ when ODIN_OS == .Darwin || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
MS_INVALIDATE :: 0x0004
_MS_SYNC :: 0x0002
}
+
MS_ASYNC :: 0x0001
MS_SYNC :: Sync_Flags{Sync_Flags_Bits(log2(_MS_SYNC))}
@@ -205,9 +210,10 @@ when ODIN_OS == .Darwin || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
PROT_READ :: 0x01
PROT_WRITE :: 0x02
- MAP_FIXED :: 0x0010
- MAP_PRIVATE :: 0x0002
- MAP_SHARED :: 0x0001
+ MAP_FIXED :: 0x0010
+ MAP_PRIVATE :: 0x0002
+ MAP_SHARED :: 0x0001
+ MAP_ANONYMOUS :: 0x1000
MS_ASYNC :: 0x0001
MS_INVALIDATE :: 0x0002
@@ -224,6 +230,4 @@ when ODIN_OS == .Darwin || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
POSIX_MADV_SEQUENTIAL :: 2
POSIX_MADV_WILLNEED :: 3
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/sys_msg.odin b/core/sys/posix/sys_msg.odin
index a8b86e501..0e78777f9 100644
--- a/core/sys/posix/sys_msg.odin
+++ b/core/sys/posix/sys_msg.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -64,28 +65,22 @@ when ODIN_OS == .Darwin {
MSG_NOERROR :: 0o10000
- // NOTE: this is #pragma pack(4)
-
- msqid_ds :: struct #align(4) {
- msg_perm: ipc_perm, /* [PSX] operation permission structure */
+ msqid_ds :: struct #max_field_align(4) {
+ msg_perm: ipc_perm, /* [PSX] operation permission structure */
msg_first: c.int32_t,
msg_last: c.int32_t,
msg_cbytes: msglen_t,
- msg_qnum: msgqnum_t, /* [PSX] number of messages currently on queue */
- msg_qbytes: msglen_t, /* [PSX] maximum number of bytes allowed on queue */
- msg_lspid: pid_t, /* [PSX] process ID of last msgsnd() */
- msg_lrpid: pid_t, /* [PSX] process ID of last msgrcv() */
- msg_stime: time_t, /* [PSX] time of last msgsnd() */
+ msg_qnum: msgqnum_t, /* [PSX] number of messages currently on queue */
+ msg_qbytes: msglen_t, /* [PSX] maximum number of bytes allowed on queue */
+ msg_lspid: pid_t, /* [PSX] process ID of last msgsnd() */
+ msg_lrpid: pid_t, /* [PSX] process ID of last msgrcv() */
+ msg_stime: time_t, /* [PSX] time of last msgsnd() */
msg_pad1: c.int32_t,
- using _: struct #align(4) {
- msg_rtime: time_t, /* [PSX] time of last msgrcv() */
- msg_pad2: c.int32_t,
- using _: struct #align(4) {
- msg_ctime: time_t, /* [PSX] time of last change */
- msg_pad3: c.int32_t,
- msg_pad4: [4]c.int32_t,
- },
- },
+ msg_rtime: time_t, /* [PSX] time of last msgrcv() */
+ msg_pad2: c.int32_t,
+ msg_ctime: time_t, /* [PSX] time of last change */
+ msg_pad3: c.int32_t,
+ msg_pad4: [4]c.int32_t,
}
} else when ODIN_OS == .FreeBSD {
@@ -156,6 +151,24 @@ when ODIN_OS == .Darwin {
msg_pad4: [4]c.long,
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ msgqnum_t :: distinct c.ulong
+ msglen_t :: distinct c.ulong
+
+ MSG_NOERROR :: 0o10000
+
+ msqid_ds :: struct {
+ msg_perm: ipc_perm, /* [PSX] operation permission structure */
+ msg_stime: time_t, /* [PSX] time of last msgsnd() */
+ msg_rtime: time_t, /* [PSX] time of last msgrcv() */
+ msg_ctime: time_t, /* [PSX] time of last change */
+ msg_cbytes: c.ulong,
+ msg_qnum: msgqnum_t, /* [PSX] number of messages currently on queue */
+ msg_qbytes: msglen_t, /* [PSX] maximum number of bytes allowed on queue */
+ msg_lspid: pid_t, /* [PSX] process ID of last msgsnd() */
+ msg_lrpid: pid_t, /* [PSX] process ID of last msgrcv() */
+ __unused: [2]c.ulong,
+ }
+
}
diff --git a/core/sys/posix/sys_resource.odin b/core/sys/posix/sys_resource.odin
index 6716d60c3..9af2a929b 100644
--- a/core/sys/posix/sys_resource.odin
+++ b/core/sys/posix/sys_resource.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -95,7 +96,7 @@ when ODIN_OS == .NetBSD {
@(private) LGETRUSAGE :: "getrusage"
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
PRIO_PROCESS :: 0
PRIO_PGRP :: 1
@@ -103,7 +104,7 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
rlim_t :: distinct c.uint64_t
- RLIM_INFINITY :: (rlim_t(1) << 63) - 1
+ RLIM_INFINITY :: ~rlim_t(0) when ODIN_OS == .Linux else (rlim_t(1) << 63) - 1
RLIM_SAVED_MAX :: RLIM_INFINITY
RLIM_SAVED_CUR :: RLIM_INFINITY
@@ -143,10 +144,15 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
RLIMIT_CPU :: 0
RLIMIT_DATA :: 2
RLIMIT_FSIZE :: 1
- RLIMIT_NOFILE :: 8
+ RLIMIT_NOFILE :: 7 when ODIN_OS == .Linux else 8
RLIMIT_STACK :: 3
- RLIMIT_AS :: 5 when ODIN_OS == .Darwin || ODIN_OS == .OpenBSD else 10
-} else {
- #panic("posix is unimplemented for the current target")
+ when ODIN_OS == .Linux {
+ RLIMIT_AS :: 9
+ } else when ODIN_OS == .Darwin || ODIN_OS == .OpenBSD {
+ RLIMIT_AS :: 5
+ } else {
+ RLIMIT_AS :: 10
+ }
+
}
diff --git a/core/sys/posix/sys_select.odin b/core/sys/posix/sys_select.odin
index 3392e02bc..2058ee777 100644
--- a/core/sys/posix/sys_select.odin
+++ b/core/sys/posix/sys_select.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "base:intrinsics"
@@ -55,7 +56,7 @@ when ODIN_OS == .NetBSD {
LSELECT :: "select"
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
suseconds_t :: distinct (c.int32_t when ODIN_OS == .Darwin || ODIN_OS == .NetBSD else c.long)
@@ -72,7 +73,7 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
// NOTE: this seems correct for FreeBSD but they do use a set backed by the long type themselves (thus the align change).
@(private)
- ALIGN :: align_of(c.long) when ODIN_OS == .FreeBSD else align_of(c.int32_t)
+ ALIGN :: align_of(c.long) when ODIN_OS == .FreeBSD || ODIN_OS == .Linux else align_of(c.int32_t)
fd_set :: struct #align(ALIGN) {
fds_bits: [(FD_SETSIZE / __NFDBITS) when (FD_SETSIZE % __NFDBITS) == 0 else (FD_SETSIZE / __NFDBITS) + 1]c.int32_t,
@@ -115,6 +116,4 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
intrinsics.mem_zero(_p, size_of(fd_set))
}
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/sys_sem.odin b/core/sys/posix/sys_sem.odin
index 3fcde325b..6b695e766 100644
--- a/core/sys/posix/sys_sem.odin
+++ b/core/sys/posix/sys_sem.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -79,19 +80,15 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
SETALL :: 9
when ODIN_OS == .Darwin {
- // NOTE: this is #pragma pack(4)
-
- semid_ds :: struct #align(4) {
- sem_perm: ipc_perm, /* [PSX] operation permission structure */
- sem_base: c.int32_t, /* 32 bit base ptr for semaphore set */
- sem_nsems: c.ushort, /* [PSX] number of semaphores in set */
- sem_otime: time_t, /* [PSX] last semop() */
+ semid_ds :: struct #max_field_align(4) {
+ sem_perm: ipc_perm, /* [PSX] operation permission structure */
+ sem_base: c.int32_t, /* 32 bit base ptr for semaphore set */
+ sem_nsems: c.ushort, /* [PSX] number of semaphores in set */
+ sem_otime: time_t, /* [PSX] last semop() */
sem_pad1: c.int32_t,
- using _: struct #align(4) {
- sem_ctime: time_t, /* [PSX] last time changed by semctl() */
- sem_pad2: c.int32_t,
- sem_pad3: [4]c.int32_t,
- },
+ sem_ctime: time_t, /* [PSX] last time changed by semctl() */
+ sem_pad2: c.int32_t,
+ sem_pad3: [4]c.int32_t,
}
} else when ODIN_OS == .FreeBSD {
semid_ds :: struct {
@@ -127,6 +124,34 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
sem_flg: c.short, /* [PSX] operation flags */
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ SEM_UNDO :: 0x1000 // undo the operation on exit
+
+ // Commands for `semctl'.
+ GETPID :: 11
+ GETVAL :: 12
+ GETALL :: 13
+ GETNCNT :: 14
+ GETZCNT :: 15
+ SETVAL :: 16
+ SETALL :: 17
+
+ semid_ds :: struct {
+ sem_perm: ipc_perm, // [PSX] operation permission structure
+ sem_otime: time_t, // [PSX] last semop()
+ __sem_otime_high: c.ulong,
+ sem_ctime: time_t, // [PSX] last time changed by semctl()
+ __sem_ctime_high: c.ulong,
+ sem_nsems: c.ulong, // [PSX] number of semaphores in set
+ __glibc_reserved3: c.ulong,
+ __glibc_reserved4: c.ulong,
+ }
+
+ sembuf :: struct {
+ sem_num: c.ushort, /* [PSX] semaphore number */
+ sem_op: c.short, /* [PSX] semaphore operation */
+ sem_flg: c.short, /* [PSX] operation flags */
+ }
+
}
diff --git a/core/sys/posix/sys_shm.odin b/core/sys/posix/sys_shm.odin
index 3bc883ce4..8f3c56b9c 100644
--- a/core/sys/posix/sys_shm.odin
+++ b/core/sys/posix/sys_shm.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -67,20 +68,16 @@ when ODIN_OS == .Darwin {
shmatt_t :: distinct c.ushort
- // NOTE: this is #pragma pack(4)
-
- shmid_ds :: struct #align(4) {
- shm_perm: ipc_perm, /* [PSX] operation permission structure */
- shm_segsz: c.size_t, /* [PSX] size of segment in bytes */
- shm_lpid: pid_t, /* [PSX] process ID of last shared memory operation */
- shm_cpid: pid_t, /* [PSX] process ID of creator */
- shm_nattch: shmatt_t, /* [PSX] number of current attaches */
- using _: struct #align(4) {
- shm_atime: time_t, /* [PSX] time of last shmat() */
- shm_dtime: time_t, /* [PSX] time of last shmdt() */
- shm_ctime: time_t, /* [PSX] time of last change by shmctl() */
- shm_internal: rawptr,
- },
+ shmid_ds :: struct #max_field_align(4) {
+ shm_perm: ipc_perm, /* [PSX] operation permission structure */
+ shm_segsz: c.size_t, /* [PSX] size of segment in bytes */
+ shm_lpid: pid_t, /* [PSX] process ID of last shared memory operation */
+ shm_cpid: pid_t, /* [PSX] process ID of creator */
+ shm_nattch: shmatt_t, /* [PSX] number of current attaches */
+ shm_atime: time_t, /* [PSX] time of last shmat() */
+ shm_dtime: time_t, /* [PSX] time of last shmdt() */
+ shm_ctime: time_t, /* [PSX] time of last change by shmctl() */
+ shm_internal: rawptr,
}
} else when ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD {
@@ -141,6 +138,24 @@ when ODIN_OS == .Darwin {
_shm_internal: rawptr,
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ SHM_RDONLY :: 0o10000
+ SHM_RND :: 0o20000
+
+ SHMLBA :: 4096
+
+ shmatt_t :: distinct c.ulong
+
+ shmid_ds :: struct {
+ shm_perm: ipc_perm, /* [PSX] operation permission structure */
+ shm_segsz: c.size_t, /* [PSX] size of segment in bytes */
+ shm_atime: time_t, /* [PSX] time of last shmat() */
+ shm_dtime: time_t, /* [PSX] time of last shmdt() */
+ shm_ctime: time_t, /* [PSX] time of last change by shmctl() */
+ shm_cpid: pid_t, /* [PSX] process ID of creator */
+ shm_lpid: pid_t, /* [PSX] process ID of last shared memory operation */
+ shm_nattch: shmatt_t, /* [PSX] number of current attaches */
+ _: [2]c.ulong,
+ }
}
diff --git a/core/sys/posix/sys_socket.odin b/core/sys/posix/sys_socket.odin
index 36c3c1467..4dd6074a3 100644
--- a/core/sys/posix/sys_socket.odin
+++ b/core/sys/posix/sys_socket.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -47,6 +48,12 @@ foreign libc {
addr.sun_family = .UNIX
copy(addr.sun_path[:], "/somepath\x00")
+ /*
+ unlink the socket before binding in case
+ of previous runs not cleaning up the socket
+ */
+ posix.unlink("/somepath")
+
if posix.bind(sfd, (^posix.sockaddr)(&addr), size_of(addr)) != .OK {
/* Handle error */
}
@@ -321,16 +328,25 @@ when ODIN_OS == .NetBSD {
@(private) LSOCKET :: "socket"
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
socklen_t :: distinct c.uint
- _sa_family_t :: distinct c.uint8_t
+ when ODIN_OS == .Linux {
+ _sa_family_t :: distinct c.ushort
+
+ sockaddr :: struct {
+ sa_family: sa_family_t, /* [PSX] address family */
+ sa_data: [14]c.char, /* [PSX] socket address */
+ }
+ } else {
+ _sa_family_t :: distinct c.uint8_t
- sockaddr :: struct {
- sa_len: c.uint8_t, /* total length */
- sa_family: sa_family_t, /* [PSX] address family */
- sa_data: [14]c.char, /* [PSX] socket address */
+ sockaddr :: struct {
+ sa_len: c.uint8_t, /* total length */
+ sa_family: sa_family_t, /* [PSX] address family */
+ sa_data: [14]c.char, /* [PSX] socket address */
+ }
}
@@ -339,6 +355,11 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
_SS_PAD1SIZE :: 6
@(private)
_SS_PAD2SIZE :: 240
+ } else when ODIN_OS == .Linux {
+ @(private)
+ _SS_SIZE :: 128
+ @(private)
+ _SS_PADSIZE :: _SS_SIZE - size_of(c.uint16_t) - size_of(c.uint64_t)
} else {
@(private)
_SS_MAXSIZE :: 128
@@ -350,28 +371,52 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
_SS_PAD2SIZE :: _SS_MAXSIZE - size_of(c.uint8_t) - size_of(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE
}
- sockaddr_storage :: struct {
- ss_len: c.uint8_t, /* address length */
- ss_family: sa_family_t, /* [PSX] address family */
- __ss_pad1: [_SS_PAD1SIZE]c.char,
- __ss_align: c.int64_t, /* force structure storage alignment */
- __ss_pad2: [_SS_PAD2SIZE]c.char,
- }
+ when ODIN_OS == .Linux {
+ sockaddr_storage :: struct {
+ ss_family: sa_family_t, /* [PSX] address family */
+ __ss_padding: [_SS_PADSIZE]c.char,
+ __ss_align: c.uint64_t, /* force structure storage alignment */
+ }
- msghdr :: struct {
- msg_name: rawptr, /* [PSX] optional address */
- msg_namelen: socklen_t, /* [PSX] size of address */
- msg_iov: [^]iovec, /* [PSX] scatter/gather array */
- msg_iovlen: c.int, /* [PSX] members in msg_iov */
- msg_control: rawptr, /* [PSX] ancillary data */
- msg_controllen: socklen_t, /* [PSX] ancillary data buffer length */
- msg_flags: Msg_Flags, /* [PSX] flags on received message */
- }
+ msghdr :: struct {
+ msg_name: rawptr, /* [PSX] optional address */
+ msg_namelen: socklen_t, /* [PSX] size of address */
+ msg_iov: [^]iovec, /* [PSX] scatter/gather array */
+ msg_iovlen: c.size_t, /* [PSX] members in msg_iov */
+ msg_control: rawptr, /* [PSX] ancillary data */
+ msg_controllen: c.size_t, /* [PSX] ancillary data buffer length */
+ msg_flags: Msg_Flags, /* [PSX] flags on received message */
+ }
+
+ cmsghdr :: struct {
+ cmsg_len: c.size_t, /* [PSX] data byte count, including cmsghdr */
+ cmsg_level: c.int, /* [PSX] originating protocol */
+ cmsg_type: c.int, /* [PSX] protocol-specific type */
+ }
+ } else {
+ sockaddr_storage :: struct {
+ ss_len: c.uint8_t, /* address length */
+ ss_family: sa_family_t, /* [PSX] address family */
+ __ss_pad1: [_SS_PAD1SIZE]c.char,
+ __ss_align: c.int64_t, /* force structure storage alignment */
+ __ss_pad2: [_SS_PAD2SIZE]c.char,
+ }
- cmsghdr :: struct {
- cmsg_len: socklen_t, /* [PSX] data byte count, including cmsghdr */
- cmsg_level: c.int, /* [PSX] originating protocol */
- cmsg_type: c.int, /* [PSX] protocol-specific type */
+ msghdr :: struct {
+ msg_name: rawptr, /* [PSX] optional address */
+ msg_namelen: socklen_t, /* [PSX] size of address */
+ msg_iov: [^]iovec, /* [PSX] scatter/gather array */
+ msg_iovlen: c.int, /* [PSX] members in msg_iov */
+ msg_control: rawptr, /* [PSX] ancillary data */
+ msg_controllen: socklen_t, /* [PSX] ancillary data buffer length */
+ msg_flags: Msg_Flags, /* [PSX] flags on received message */
+ }
+
+ cmsghdr :: struct {
+ cmsg_len: socklen_t, /* [PSX] data byte count, including cmsghdr */
+ cmsg_level: c.int, /* [PSX] originating protocol */
+ cmsg_type: c.int, /* [PSX] protocol-specific type */
+ }
}
SCM_RIGHTS :: 0x01
@@ -421,57 +466,90 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
SOCK_STREAM :: 1
// Options to be accessed at socket level, not protocol level.
- SOL_SOCKET :: 0xffff
-
- SO_ACCEPTCONN :: 0x0002
- SO_BROADCAST :: 0x0020
- SO_DEBUG :: 0x0001
- SO_DONTROUTE :: 0x0010
- SO_ERROR :: 0x1007
- SO_KEEPALIVE :: 0x0008
- SO_OOBINLINE :: 0x0100
- SO_RCVBUF :: 0x1002
- SO_RCVLOWAT :: 0x1004
- SO_REUSEADDR :: 0x0004
- SO_SNDBUF :: 0x1001
- SO_SNDLOWAT :: 0x1003
- SO_TYPE :: 0x1008
-
- when ODIN_OS == .Darwin {
- SO_LINGER :: 0x1080
- SO_RCVTIMEO :: 0x1006
- SO_SNDTIMEO :: 0x1005
- } else when ODIN_OS == .FreeBSD {
- SO_LINGER :: 0x0080
- SO_RCVTIMEO :: 0x1006
- SO_SNDTIMEO :: 0x1005
- } else when ODIN_OS == .NetBSD {
- SO_LINGER :: 0x0080
- SO_RCVTIMEO :: 0x100c
- SO_SNDTIMEO :: 0x100b
- } else when ODIN_OS == .OpenBSD {
- SO_LINGER :: 0x0080
- SO_RCVTIMEO :: 0x1006
- SO_SNDTIMEO :: 0x1005
+ when ODIN_OS == .Linux {
+ SOL_SOCKET :: 1
+
+ SO_ACCEPTCONN :: 30
+ SO_BROADCAST :: 6
+ SO_DEBUG :: 1
+ SO_DONTROUTE :: 5
+ SO_ERROR :: 4
+ SO_KEEPALIVE :: 9
+ SO_OOBINLINE :: 10
+ SO_RCVBUF :: 8
+ SO_RCVLOWAT :: 18
+ SO_REUSEADDR :: 2
+ SO_SNDBUF :: 7
+ SO_SNDLOWAT :: 19
+ SO_TYPE :: 3
+ SO_LINGER :: 13
+
+ SO_RCVTIMEO :: 66
+ SO_SNDTIMEO :: 67
+ } else {
+ SOL_SOCKET :: 0xffff
+
+ SO_ACCEPTCONN :: 0x0002
+ SO_BROADCAST :: 0x0020
+ SO_DEBUG :: 0x0001
+ SO_DONTROUTE :: 0x0010
+ SO_ERROR :: 0x1007
+ SO_KEEPALIVE :: 0x0008
+ SO_OOBINLINE :: 0x0100
+ SO_RCVBUF :: 0x1002
+ SO_RCVLOWAT :: 0x1004
+ SO_REUSEADDR :: 0x0004
+ SO_SNDBUF :: 0x1001
+ SO_SNDLOWAT :: 0x1003
+ SO_TYPE :: 0x1008
+
+ when ODIN_OS == .Darwin {
+ SO_LINGER :: 0x1080
+ SO_RCVTIMEO :: 0x1006
+ SO_SNDTIMEO :: 0x1005
+ } else when ODIN_OS == .FreeBSD {
+ SO_LINGER :: 0x0080
+ SO_RCVTIMEO :: 0x1006
+ SO_SNDTIMEO :: 0x1005
+ } else when ODIN_OS == .NetBSD {
+ SO_LINGER :: 0x0080
+ SO_RCVTIMEO :: 0x100c
+ SO_SNDTIMEO :: 0x100b
+ } else when ODIN_OS == .OpenBSD {
+ SO_LINGER :: 0x0080
+ SO_RCVTIMEO :: 0x1006
+ SO_SNDTIMEO :: 0x1005
+ }
}
// The maximum backlog queue length for listen().
SOMAXCONN :: 128
- MSG_CTRUNC :: 0x20
- MSG_DONTROUTE :: 0x4
- MSG_EOR :: 0x8
- MSG_OOB :: 0x1
- MSG_PEEK :: 0x2
- MSG_TRUNC :: 0x10
- MSG_WAITALL :: 0x40
-
- when ODIN_OS == .Darwin {
- MSG_NOSIGNAL :: 0x80000
- } else when ODIN_OS == .FreeBSD {
- MSG_NOSIGNAL :: 0x00020000
- } else when ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
- MSG_NOSIGNAL :: 0x0400
+ when ODIN_OS == .Linux {
+ MSG_CTRUNC :: 0x008
+ MSG_DONTROUTE :: 0x004
+ MSG_EOR :: 0x080
+ MSG_OOB :: 0x001
+ MSG_PEEK :: 0x002
+ MSG_TRUNC :: 0x020
+ MSG_WAITALL :: 0x100
+ MSG_NOSIGNAL :: 0x4000
+ } else {
+ MSG_CTRUNC :: 0x20
+ MSG_DONTROUTE :: 0x4
+ MSG_EOR :: 0x8
+ MSG_OOB :: 0x1
+ MSG_PEEK :: 0x2
+ MSG_TRUNC :: 0x10
+ MSG_WAITALL :: 0x40
+
+ when ODIN_OS == .Darwin {
+ MSG_NOSIGNAL :: 0x80000
+ } else when ODIN_OS == .FreeBSD {
+ MSG_NOSIGNAL :: 0x00020000
+ } else when ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+ MSG_NOSIGNAL :: 0x0400
+ }
}
AF_INET :: 2
@@ -483,13 +561,12 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
AF_INET6 :: 28
} else when ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
AF_INET6 :: 24
+ } else when ODIN_OS == .Linux {
+ AF_INET6 :: 10
}
SHUT_RD :: 0
SHUT_RDWR :: 2
SHUT_WR :: 1
-} else {
- #panic("posix is unimplemented for the current target")
}
-
diff --git a/core/sys/posix/sys_stat.odin b/core/sys/posix/sys_stat.odin
index dd66d7d14..61b98ef35 100644
--- a/core/sys/posix/sys_stat.odin
+++ b/core/sys/posix/sys_stat.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -280,20 +281,20 @@ when ODIN_OS == .Darwin {
ino_t :: distinct c.uint64_t
stat_t :: struct {
- st_dev: dev_t, /* [XSI] ID of device containing file */
- st_mode: mode_t, /* [XSI] mode of file */
- st_nlink: nlink_t, /* [XSI] number of hard links */
- st_ino: ino_t, /* [XSI] file serial number */
- st_uid: uid_t, /* [XSI] user ID of the file */
- st_gid: gid_t, /* [XSI] group ID of the file */
- st_rdev: dev_t, /* [XSI] device ID */
- st_atim: timespec, /* [XSI] time of last access */
- st_mtim: timespec, /* [XSI] time of last data modification */
- st_ctim: timespec, /* [XSI] time of last status change */
+ st_dev: dev_t, /* [PSX] ID of device containing file */
+ st_mode: mode_t, /* [PSX] mode of file */
+ st_nlink: nlink_t, /* [PSX] number of hard links */
+ st_ino: ino_t, /* [PSX] file serial number */
+ st_uid: uid_t, /* [PSX] user ID of the file */
+ st_gid: gid_t, /* [PSX] group ID of the file */
+ st_rdev: dev_t, /* [PSX] device ID */
+ st_atim: timespec, /* [PSX] time of last access */
+ st_mtim: timespec, /* [PSX] time of last data modification */
+ st_ctim: timespec, /* [PSX] time of last status change */
st_birthtimespec: timespec, /* time of file creation(birth) */
- st_size: off_t, /* [XSI] file size, in bytes */
- st_blocks: blkcnt_t, /* [XSI] blocks allocated for file */
- st_blksize: blksize_t, /* [XSI] optimal blocksize for I/O */
+ st_size: off_t, /* [PSX] file size, in bytes */
+ st_blocks: blkcnt_t, /* [PSX] blocks allocated for file */
+ st_blksize: blksize_t, /* [PSX] optimal blocksize for I/O */
st_flags: c.uint32_t, /* user defined flags for file */
st_gen: c.uint32_t, /* file generation number */
st_lspare: c.int32_t, /* RESERVED */
@@ -314,47 +315,47 @@ when ODIN_OS == .Darwin {
when ODIN_ARCH == .i386 {
stat_t :: struct {
- st_dev: dev_t, /* [XSI] ID of device containing file */
- st_ino: ino_t, /* [XSI] file serial number */
- st_nlink: nlink_t, /* [XSI] number of hard links */
- st_mode: mode_t, /* [XSI] mode of file */
+ st_dev: dev_t, /* [PSX] ID of device containing file */
+ st_ino: ino_t, /* [PSX] file serial number */
+ st_nlink: nlink_t, /* [PSX] number of hard links */
+ st_mode: mode_t, /* [PSX] mode of file */
st_padding0: c.int16_t,
- st_uid: uid_t, /* [XSI] user ID of the file */
- st_gid: gid_t, /* [XSI] group ID of the file */
+ st_uid: uid_t, /* [PSX] user ID of the file */
+ st_gid: gid_t, /* [PSX] group ID of the file */
st_padding1: c.int32_t,
- st_rdev: dev_t, /* [XSI] device ID */
+ st_rdev: dev_t, /* [PSX] device ID */
st_atim_ext: c.int32_t,
- st_atim: timespec, /* [XSI] time of last access */
+ st_atim: timespec, /* [PSX] time of last access */
st_mtim_ext: c.int32_t,
- st_mtim: timespec, /* [XSI] time of last data modification */
+ st_mtim: timespec, /* [PSX] time of last data modification */
st_ctim_ext: c.int32_t,
- st_ctim: timespec, /* [XSI] time of last status change */
+ st_ctim: timespec, /* [PSX] time of last status change */
st_birthtimespec: timespec, /* time of file creation(birth) */
- st_size: off_t, /* [XSI] file size, in bytes */
- st_blocks: blkcnt_t, /* [XSI] blocks allocated for file */
- st_blksize: blksize_t, /* [XSI] optimal blocksize for I/O */
+ st_size: off_t, /* [PSX] file size, in bytes */
+ st_blocks: blkcnt_t, /* [PSX] blocks allocated for file */
+ st_blksize: blksize_t, /* [PSX] optimal blocksize for I/O */
st_flags: c.uint32_t, /* user defined flags for file */
st_gen: c.uint64_t,
st_spare: [10]c.uint64_t,
}
} else {
stat_t :: struct {
- st_dev: dev_t, /* [XSI] ID of device containing file */
- st_ino: ino_t, /* [XSI] file serial number */
- st_nlink: nlink_t, /* [XSI] number of hard links */
- st_mode: mode_t, /* [XSI] mode of file */
+ st_dev: dev_t, /* [PSX] ID of device containing file */
+ st_ino: ino_t, /* [PSX] file serial number */
+ st_nlink: nlink_t, /* [PSX] number of hard links */
+ st_mode: mode_t, /* [PSX] mode of file */
st_padding0: c.int16_t,
- st_uid: uid_t, /* [XSI] user ID of the file */
- st_gid: gid_t, /* [XSI] group ID of the file */
+ st_uid: uid_t, /* [PSX] user ID of the file */
+ st_gid: gid_t, /* [PSX] group ID of the file */
st_padding1: c.int32_t,
- st_rdev: dev_t, /* [XSI] device ID */
- st_atim: timespec, /* [XSI] time of last access */
- st_mtim: timespec, /* [XSI] time of last data modification */
- st_ctim: timespec, /* [XSI] time of last status change */
+ st_rdev: dev_t, /* [PSX] device ID */
+ st_atim: timespec, /* [PSX] time of last access */
+ st_mtim: timespec, /* [PSX] time of last data modification */
+ st_ctim: timespec, /* [PSX] time of last status change */
st_birthtimespec: timespec, /* time of file creation(birth) */
- st_size: off_t, /* [XSI] file size, in bytes */
- st_blocks: blkcnt_t, /* [XSI] blocks allocated for file */
- st_blksize: blksize_t, /* [XSI] optimal blocksize for I/O */
+ st_size: off_t, /* [PSX] file size, in bytes */
+ st_blocks: blkcnt_t, /* [PSX] blocks allocated for file */
+ st_blksize: blksize_t, /* [PSX] optimal blocksize for I/O */
st_flags: c.uint32_t, /* user defined flags for file */
st_gen: c.uint64_t,
st_spare: [10]c.uint64_t,
@@ -374,20 +375,20 @@ when ODIN_OS == .Darwin {
ino_t :: distinct c.uint64_t
stat_t :: struct {
- st_dev: dev_t, /* [XSI] ID of device containing file */
- st_mode: mode_t, /* [XSI] mode of file */
- st_ino: ino_t, /* [XSI] file serial number */
- st_nlink: nlink_t, /* [XSI] number of hard links */
- st_uid: uid_t, /* [XSI] user ID of the file */
- st_gid: gid_t, /* [XSI] group ID of the file */
- st_rdev: dev_t, /* [XSI] device ID */
- st_atim: timespec, /* [XSI] time of last access */
- st_mtim: timespec, /* [XSI] time of last data modification */
- st_ctim: timespec, /* [XSI] time of last status change */
+ st_dev: dev_t, /* [PSX] ID of device containing file */
+ st_mode: mode_t, /* [PSX] mode of file */
+ st_ino: ino_t, /* [PSX] file serial number */
+ st_nlink: nlink_t, /* [PSX] number of hard links */
+ st_uid: uid_t, /* [PSX] user ID of the file */
+ st_gid: gid_t, /* [PSX] group ID of the file */
+ st_rdev: dev_t, /* [PSX] device ID */
+ st_atim: timespec, /* [PSX] time of last access */
+ st_mtim: timespec, /* [PSX] time of last data modification */
+ st_ctim: timespec, /* [PSX] time of last status change */
st_birthtimespec: timespec, /* time of file creation(birth) */
- st_size: off_t, /* [XSI] file size, in bytes */
- st_blocks: blkcnt_t, /* [XSI] blocks allocated for file */
- st_blksize: blksize_t, /* [XSI] optimal blocksize for I/O */
+ st_size: off_t, /* [PSX] file size, in bytes */
+ st_blocks: blkcnt_t, /* [PSX] blocks allocated for file */
+ st_blksize: blksize_t, /* [PSX] optimal blocksize for I/O */
st_flags: c.uint32_t, /* user defined flags for file */
st_gen: c.uint64_t,
st_spare: [2]c.uint32_t,
@@ -406,19 +407,19 @@ when ODIN_OS == .Darwin {
ino_t :: distinct c.uint64_t
stat_t :: struct {
- st_mode: mode_t, /* [XSI] mode of file */
- st_dev: dev_t, /* [XSI] ID of device containing file */
- st_ino: ino_t, /* [XSI] file serial number */
- st_nlink: nlink_t, /* [XSI] number of hard links */
- st_uid: uid_t, /* [XSI] user ID of the file */
- st_gid: gid_t, /* [XSI] group ID of the file */
- st_rdev: dev_t, /* [XSI] device ID */
- st_atim: timespec, /* [XSI] time of last access */
- st_mtim: timespec, /* [XSI] time of last data modification */
- st_ctim: timespec, /* [XSI] time of last status change */
- st_size: off_t, /* [XSI] file size, in bytes */
- st_blocks: blkcnt_t, /* [XSI] blocks allocated for file */
- st_blksize: blksize_t, /* [XSI] optimal blocksize for I/O */
+ st_mode: mode_t, /* [PSX] mode of file */
+ st_dev: dev_t, /* [PSX] ID of device containing file */
+ st_ino: ino_t, /* [PSX] file serial number */
+ st_nlink: nlink_t, /* [PSX] number of hard links */
+ st_uid: uid_t, /* [PSX] user ID of the file */
+ st_gid: gid_t, /* [PSX] group ID of the file */
+ st_rdev: dev_t, /* [PSX] device ID */
+ st_atim: timespec, /* [PSX] time of last access */
+ st_mtim: timespec, /* [PSX] time of last data modification */
+ st_ctim: timespec, /* [PSX] time of last status change */
+ st_size: off_t, /* [PSX] file size, in bytes */
+ st_blocks: blkcnt_t, /* [PSX] blocks allocated for file */
+ st_blksize: blksize_t, /* [PSX] optimal blocksize for I/O */
st_flags: c.uint32_t, /* user defined flags for file */
st_gen: c.int32_t,
st_birthtimespec: timespec,
@@ -427,6 +428,58 @@ when ODIN_OS == .Darwin {
UTIME_NOW :: -2
UTIME_OMIT :: -1
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ dev_t :: distinct u64
+ _mode_t :: distinct c.uint
+ blkcnt_t :: distinct i64
+
+ when ODIN_ARCH == .arm64 || ODIN_ARCH == .riscv64 {
+ nlink_t :: distinct c.uint
+ blksize_t :: distinct c.int
+ } else {
+ nlink_t :: distinct c.size_t
+ blksize_t :: distinct c.long
+ }
+
+ ino_t :: distinct u64
+
+ when ODIN_ARCH == .amd64 {
+ stat_t :: struct {
+ st_dev: dev_t, /* [PSX] ID of device containing file */
+ st_ino: ino_t, /* [PSX] file serial number */
+ st_nlink: nlink_t, /* [PSX] number of hard links */
+ st_mode: mode_t, /* [PSX] mode of file */
+ st_uid: uid_t, /* [PSX] user ID of the file */
+ st_gid: gid_t, /* [PSX] group ID of the file */
+ _pad0: c.uint,
+ st_rdev: dev_t, /* [PSX] device ID */
+ st_size: off_t, /* [PSX] file size, in bytes */
+ st_blksize: blksize_t, /* [PSX] optimal blocksize for I/O */
+ st_blocks: blkcnt_t, /* [PSX] blocks allocated for file */
+ st_atim: timespec, /* [PSX] time of last access */
+ st_mtim: timespec, /* [PSX] time of last data modification */
+ st_ctim: timespec, /* [PSX] time of last status change */
+ __unused: [3]c.long,
+ }
+ } else {
+ stat_t :: struct {
+ st_dev: dev_t, /* [PSX] ID of device containing file */
+ st_ino: ino_t, /* [PSX] file serial number */
+ st_mode: mode_t, /* [PSX] mode of file */
+ st_nlink: nlink_t, /* [PSX] number of hard links */
+ st_uid: uid_t, /* [PSX] user ID of the file */
+ st_gid: gid_t, /* [PSX] group ID of the file */
+ st_rdev: dev_t, /* [PSX] device ID */
+ __pad: c.ulonglong,
+ st_size: off_t, /* [PSX] file size, in bytes */
+ st_blksize: blksize_t, /* [PSX] optimal blocksize for I/O */
+ __pad2: c.int,
+ st_blocks: blkcnt_t, /* [PSX] blocks allocated for file */
+ st_atim: timespec, /* [PSX] time of last access */
+ st_mtim: timespec, /* [PSX] time of last data modification */
+ st_ctim: timespec, /* [PSX] time of last status change */
+ __unused: [2]c.uint,
+ }
+ }
}
diff --git a/core/sys/posix/sys_statvfs.odin b/core/sys/posix/sys_statvfs.odin
index eb6c16806..47c810135 100644
--- a/core/sys/posix/sys_statvfs.odin
+++ b/core/sys/posix/sys_statvfs.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -130,6 +131,27 @@ when ODIN_OS == .Darwin || ODIN_OS == .OpenBSD {
ST_RDONLY :: 0x00000001
ST_NOSUID :: 0x00000008
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ fsblkcnt_t :: distinct c.uint64_t
+
+ statvfs_t :: struct {
+ f_bsize: c.ulong, /* [PSX] file system block size */
+ f_frsize: c.ulong, /* [PSX] fundamental file system block size */
+ f_blocks: fsblkcnt_t, /* [PSX] total number of blocks on file system in units of f_frsize */
+ f_bfree: fsblkcnt_t, /* [PSX] total number of free blocks */
+ f_bavail: fsblkcnt_t, /* [PSX] number of free blocks available to non-privileged process */
+ f_files: fsblkcnt_t, /* [PSX] total number of file serial numbers */
+ f_ffree: fsblkcnt_t, /* [PSX] total number of free file serial numbers */
+ f_favail: fsblkcnt_t, /* [PSX] number of file serial numbers available to non-privileged process */
+ f_fsid: c.ulong, /* [PSX] file system ID */
+ _: [2*size_of(c.int)-size_of(c.long)]byte,
+ f_flag: VFS_Flags, /* [PSX] bit mask of f_flag values */
+ f_namemax: c.ulong, /* [PSX] maximum filename length */
+ f_type: c.uint,
+ __reserved: [5]c.int,
+ }
+
+ ST_RDONLY :: 0x00000001
+ ST_NOSUID :: 0x00000002
}
diff --git a/core/sys/posix/sys_time.odin b/core/sys/posix/sys_time.odin
index 093fdd688..3036352aa 100644
--- a/core/sys/posix/sys_time.odin
+++ b/core/sys/posix/sys_time.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -66,7 +67,7 @@ when ODIN_OS == .NetBSD {
@(private) LUTIMES :: "utimes"
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
itimerval :: struct {
it_interval: timeval, /* [PSX] timer interval */
@@ -77,6 +78,4 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
ITIMER_VIRTUAL :: 1
ITIMER_PROF :: 2
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/sys_times.odin b/core/sys/posix/sys_times.odin
index 685ced515..113e3f963 100644
--- a/core/sys/posix/sys_times.odin
+++ b/core/sys/posix/sys_times.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
when ODIN_OS == .Darwin {
@@ -24,7 +25,7 @@ when ODIN_OS == .NetBSD {
@(private) LTIMES :: "times"
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
tms :: struct {
tms_utime: clock_t, /* [PSX] user CPU time */
@@ -33,6 +34,4 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
tms_cstime: clock_t, /* [PSX] terminated children system CPU time */
}
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/sys_uio.odin b/core/sys/posix/sys_uio.odin
index 01664e576..a0ad2934e 100644
--- a/core/sys/posix/sys_uio.odin
+++ b/core/sys/posix/sys_uio.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -30,13 +31,11 @@ foreign libc {
writev :: proc(fildes: FD, iov: [^]iovec, iovcnt: c.int) -> c.ssize_t ---
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
iovec :: struct {
iov_base: rawptr, /* [PSX] base address of I/O memory region */
iov_len: c.size_t, /* [PSX] size of the region iov_base points to */
}
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/sys_un.odin b/core/sys/posix/sys_un.odin
index 146882051..ca5c4ee31 100644
--- a/core/sys/posix/sys_un.odin
+++ b/core/sys/posix/sys_un.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -12,6 +13,11 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
sun_path: [104]c.char, /* [PSX] socket pathname */
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ sockaddr_un :: struct {
+ sun_family: sa_family_t, /* [PSX] address family */
+ sun_path: [108]c.char, /* [PSX] socket pathname */
+ }
+
}
diff --git a/core/sys/posix/sys_utsname.odin b/core/sys/posix/sys_utsname.odin
index 803f40ffd..64930160f 100644
--- a/core/sys/posix/sys_utsname.odin
+++ b/core/sys/posix/sys_utsname.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -50,6 +51,17 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
machine: [_SYS_NAMELEN]c.char `fmt:"s,0"`, /* [PSX] hardware type */
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ @(private)
+ _SYS_NAMELEN :: 65
+
+ utsname :: struct {
+ sysname: [_SYS_NAMELEN]c.char `fmt:"s,0"`, /* [PSX] name of OS */
+ nodename: [_SYS_NAMELEN]c.char `fmt:"s,0"`, /* [PSX] name of this network node */
+ release: [_SYS_NAMELEN]c.char `fmt:"s,0"`, /* [PSX] release level */
+ version: [_SYS_NAMELEN]c.char `fmt:"s,0"`, /* [PSX] version level */
+ machine: [_SYS_NAMELEN]c.char `fmt:"s,0"`, /* [PSX] hardware type */
+ __domainname: [_SYS_NAMELEN]c.char `fmt:"s,0"`,
+ }
}
diff --git a/core/sys/posix/sys_wait.odin b/core/sys/posix/sys_wait.odin
index 8421c8bfd..812bd8c62 100644
--- a/core/sys/posix/sys_wait.odin
+++ b/core/sys/posix/sys_wait.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -124,11 +125,11 @@ WIFCONTINUED :: #force_inline proc "contextless" (x: c.int) -> bool {
idtype_t :: enum c.int {
// Wait for any children and `id` is ignored.
- P_ALL,
+ P_ALL = _P_ALL,
// Wait for any child wiith a process group ID equal to `id`.
- P_PID,
+ P_PID = _P_PID,
// Wait for any child with a process group ID equal to `id`.
- P_PGID,
+ P_PGID = _P_PGID,
}
Wait_Flag_Bits :: enum c.int {
@@ -166,6 +167,10 @@ when ODIN_OS == .Darwin {
WNOWAIT :: 0x00000020
WSTOPPED :: 0x00000008
+ _P_ALL :: 0
+ _P_PID :: 1
+ _P_PGID :: 2
+
@(private)
_WSTATUS :: #force_inline proc "contextless" (x: c.int) -> c.int {
return x & 0o177
@@ -221,6 +226,10 @@ when ODIN_OS == .Darwin {
WNOWAIT :: 8
WSTOPPED :: 2
+ _P_ALL :: 7
+ _P_PID :: 0
+ _P_PGID :: 2
+
@(private)
_WSTATUS :: #force_inline proc "contextless" (x: c.int) -> c.int {
return x & 0o177
@@ -275,6 +284,10 @@ when ODIN_OS == .Darwin {
WNOWAIT :: 0x00010000
WSTOPPED :: 0x00000002
+ _P_ALL :: 0
+ _P_PID :: 1
+ _P_PGID :: 2
+
@(private)
_WSTATUS :: #force_inline proc "contextless" (x: c.int) -> c.int {
return x & 0o177
@@ -330,6 +343,10 @@ when ODIN_OS == .Darwin {
WNOWAIT :: 0x00010000
WSTOPPED :: 0x00000002
+ _P_ALL :: 0
+ _P_PID :: 2
+ _P_PGID :: 1
+
@(private)
_WSTATUS :: #force_inline proc "contextless" (x: c.int) -> c.int {
return x & 0o177
@@ -375,6 +392,54 @@ when ODIN_OS == .Darwin {
return (x & _WCONTINUED) == _WCONTINUED
}
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ id_t :: distinct c.uint
+
+ WCONTINUED :: 8
+ WNOHANG :: 1
+ WUNTRACED :: 2
+
+ WEXITED :: 4
+ WNOWAIT :: 0x1000000
+ WSTOPPED :: 2
+
+ _P_ALL :: 0
+ _P_PID :: 1
+ _P_PGID :: 2
+
+ @(private)
+ _WIFEXITED :: #force_inline proc "contextless" (x: c.int) -> bool {
+ return _WTERMSIG(x) == nil
+ }
+
+ @(private)
+ _WEXITSTATUS :: #force_inline proc "contextless" (x: c.int) -> c.int {
+ return (x & 0xff00) >> 8
+ }
+
+ @(private)
+ _WIFSIGNALED :: #force_inline proc "contextless" (x: c.int) -> bool {
+ return (x & 0xffff) - 1 < 0xff
+ }
+
+ @(private)
+ _WTERMSIG :: #force_inline proc "contextless" (x: c.int) -> Signal {
+ return Signal(x & 0x7f)
+ }
+
+ @(private)
+ _WIFSTOPPED :: #force_inline proc "contextless" (x: c.int) -> bool {
+ return ((x & 0xffff) * 0x10001) >> 8 > 0x7f00
+ }
+
+ @(private)
+ _WSTOPSIG :: #force_inline proc "contextless" (x: c.int) -> Signal {
+ return Signal(_WEXITSTATUS(x))
+ }
+
+ @(private)
+ _WIFCONTINUED :: #force_inline proc "contextless" (x: c.int) -> bool {
+ return x == 0xffff
+ }
}
diff --git a/core/sys/posix/termios.odin b/core/sys/posix/termios.odin
index c73936d58..0c07eceb9 100644
--- a/core/sys/posix/termios.odin
+++ b/core/sys/posix/termios.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -152,7 +153,7 @@ CControl_Flag_Bits :: enum tcflag_t {
CControl_Flags :: bit_set[CControl_Flag_Bits; tcflag_t]
// character size mask
-CSIZE :: CControl_Flags{ .CS6, .CS7, .CS8 }
+CSIZE :: transmute(CControl_Flags)tcflag_t(_CSIZE)
COutput_Flag_Bits :: enum tcflag_t {
OPOST = log2(OPOST), /* enable following output processing */
@@ -181,17 +182,17 @@ COutput_Flag_Bits :: enum tcflag_t {
COutput_Flags :: bit_set[COutput_Flag_Bits; tcflag_t]
// \n delay mask
-NLDLY :: COutput_Flags{ .NL1, COutput_Flag_Bits(9) }
+NLDLY :: transmute(COutput_Flags)tcflag_t(_NLDLY)
// \r delay mask
-CRDLY :: COutput_Flags{ .CR1, .CR2, .CR3 }
+CRDLY :: transmute(COutput_Flags)tcflag_t(_CRDLY)
// horizontal tab delay mask
-TABDLY :: COutput_Flags{ .TAB1, .TAB3, COutput_Flag_Bits(2) }
+TABDLY :: transmute(COutput_Flags)tcflag_t(_TABDLY)
// \b delay mask
-BSDLY :: COutput_Flags{ .BS1 }
+BSDLY :: transmute(COutput_Flags)tcflag_t(_BSDLY)
// vertical tab delay mask
-VTDLY :: COutput_Flags{ .VT1 }
+VTDLY :: transmute(COutput_Flags)tcflag_t(_VTDLY)
// form feed delay mask
-FFDLY :: COutput_Flags{ .FF1 }
+FFDLY :: transmute(COutput_Flags)tcflag_t(_FFDLY)
speed_t :: enum _speed_t {
B0 = B0,
@@ -596,6 +597,4 @@ when ODIN_OS == .Darwin {
TCOOFF :: 0
TCOON :: 1
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/time.odin b/core/sys/posix/time.odin
index 5c6ebcf2f..f9c51c63c 100644
--- a/core/sys/posix/time.odin
+++ b/core/sys/posix/time.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -229,6 +230,16 @@ when ODIN_OS == .Darwin {
getdate_err: Errno = .ENOSYS // NOTE: looks like it's not a thing on OpenBSD.
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ clockid_t :: distinct c.int
+
+ CLOCK_MONOTONIC :: 1
+ CLOCK_PROCESS_CPUTIME_ID :: 2
+ CLOCK_REALTIME :: 0
+ CLOCK_THREAD_CPUTIME_ID :: 3
+
+ foreign lib {
+ getdate_err: Errno
+ }
}
diff --git a/core/sys/posix/ulimit.odin b/core/sys/posix/ulimit.odin
index 067b83271..0f87641fa 100644
--- a/core/sys/posix/ulimit.odin
+++ b/core/sys/posix/ulimit.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -31,13 +32,11 @@ Ulimit_Cmd :: enum c.int {
SETFSIZE = UL_SETFSIZE,
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
UL_GETFSIZE :: 1
UL_SETFSIZE :: 2
// NOTE: I don't think OpenBSD implements this API.
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/unistd.odin b/core/sys/posix/unistd.odin
index 15dbb576f..0526b3235 100644
--- a/core/sys/posix/unistd.odin
+++ b/core/sys/posix/unistd.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -12,19 +13,6 @@ when ODIN_OS == .Darwin {
foreign lib {
/*
- Checks the file named by the pathname pointed to by the path argument for
- accessibility according to the bit pattern contained in amode.
-
- Example:
- if (posix.access("/tmp/myfile", posix.F_OK) != .OK) {
- fmt.printfln("/tmp/myfile access check failed: %v", posix.strerror(posix.errno()))
- }
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html ]]
- */
- access :: proc(path: cstring, amode: Mode_Flags = F_OK) -> result ---
-
- /*
Equivalent to `access` but relative paths are resolved based on `fd`.
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html ]]
@@ -43,18 +31,6 @@ foreign lib {
alarm :: proc(seconds: c.uint) -> c.uint ---
/*
- Causes the directory named by path to become the current working directory.
-
- Example:
- if (posix.chdir("/tmp") == .OK) {
- fmt.println("changed current directory to /tmp")
- }
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html ]]
- */
- chdir :: proc(path: cstring) -> result ---
-
- /*
Equivalent to chdir but instead of a path the fildes is resolved to a directory.
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html ]]
@@ -205,15 +181,6 @@ foreign lib {
dup2 :: proc(fildes, fildes2: FD) -> FD ---
/*
- Exits but, shall not call functions registered with atexit() nor any registered signal handlers.
- Open streams shall not be flushed.
- Whether open streams are closed (without flushing) is implementation-defined. Finally, the calling process shall be terminated with the consequences described below.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/_exit.html ]]
- */
- _exit :: proc(status: c.int) -> ! ---
-
- /*
The exec family of functions shall replace the current process image with a new process image.
The new image shall be constructed from a regular, executable file called the new process image file.
There shall be no return from a successful exec,
@@ -393,44 +360,6 @@ foreign lib {
ftruncate :: proc(fildes: FD, length: off_t) -> result ---
/*
- Places an absolute pathname of the current working directory into buf.
-
- Returns: buf as a cstring on success, nil (setting errno) on failure
-
- Example:
- size: int
- path_max := posix.pathconf(".", ._PATH_MAX)
- if path_max == -1 {
- size = 1024
- } else if path_max > 10240 {
- size = 10240
- } else {
- size = int(path_max)
- }
-
- buf: [dynamic]byte
- cwd: cstring
- for ; cwd == nil; size *= 2 {
- if err := resize(&buf, size); err != nil {
- fmt.panicf("allocation failure: %v", err)
- }
-
- cwd = posix.getcwd(raw_data(buf), len(buf))
- if cwd == nil {
- errno := posix.errno()
- if errno != .ERANGE {
- fmt.panicf("getcwd failure: %v", posix.strerror(errno))
- }
- }
- }
-
- fmt.println(path_max, cwd)
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html ]]
- */
- getcwd :: proc(buf: [^]c.char, size: c.size_t) -> cstring ---
-
- /*
Returns the effective group ID of the calling process.
Returns: the ID, no failure is defined
@@ -830,13 +759,6 @@ foreign lib {
readlinkat :: proc(fd: FD, path: cstring, buf: [^]byte, bufsize: c.size_t) -> c.ssize_t ---
/*
- Remove an (empty) directory.
-
- ]] More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html ]]
- */
- rmdir :: proc(path: cstring) -> result ---
-
- /*
Set the effective group ID.
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/setegid.html ]]
@@ -913,13 +835,6 @@ foreign lib {
sleep :: proc(seconds: c.uint) -> c.uint ---
/*
- Copy nbyte bytes, from src, to dest, exchanging adjecent bytes.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/swab.html ]]
- */
- swab :: proc(src: [^]byte, dest: [^]byte, nbytes: c.ssize_t) ---
-
- /*
Schedule file system updates.
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/sync.html ]]
@@ -959,13 +874,6 @@ foreign lib {
ttyname_r :: proc(fildes: FD, name: [^]byte, namesize: c.size_t) -> Errno ---
/*
- Remove a directory entry.
-
- [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html ]]
- */
- unlink :: proc(path: cstring) -> result ---
-
- /*
Equivalent to unlink or rmdir (if flag is .REMOVEDIR) but relative paths are relative to the dir fd.
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html ]]
@@ -973,20 +881,6 @@ foreign lib {
unlinkat :: proc(fd: FD, path: cstring, flag: AT_Flags) -> result ---
}
-STDERR_FILENO :: 2
-STDIN_FILENO :: 0
-STDOUT_FILENO :: 1
-
-Mode_Flag_Bits :: enum c.int {
- X_OK = log2(X_OK),
- W_OK = log2(W_OK),
- R_OK = log2(R_OK),
-}
-Mode_Flags :: bit_set[Mode_Flag_Bits; c.int]
-
-#assert(_F_OK == 0)
-F_OK :: Mode_Flags{}
-
CS :: enum c.int {
_PATH = _CS_PATH,
_POSIX_V6_ILP32_OFF32_CFLAGS = _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
@@ -1181,20 +1075,20 @@ when ODIN_OS == .Darwin {
F_TLOCK :: 2
F_ULOCK :: 0
- _CS_PATH :: 1
- _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 2
- _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 3
- _CS_POSIX_V6_ILP32_OFF32_LIBS :: 4
- _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 5
- _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 6
- _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 7
- _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 8
- _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 9
- _CS_POSIX_V6_LP64_OFF64_LIBS :: 10
- _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 11
- _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 12
- _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 13
- _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 14
+ _CS_PATH :: 1
+ _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 2
+ _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 3
+ _CS_POSIX_V6_ILP32_OFF32_LIBS :: 4
+ _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 5
+ _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 6
+ _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 7
+ _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 8
+ _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 9
+ _CS_POSIX_V6_LP64_OFF64_LIBS :: 10
+ _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 11
+ _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 12
+ _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 13
+ _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 14
_PC_LINK_MAX :: 1
_PC_MAX_CANON :: 2
@@ -1362,20 +1256,20 @@ when ODIN_OS == .Darwin {
F_TLOCK :: 2
F_ULOCK :: 0
- _CS_PATH :: 1
- _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 2
- _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 3
- _CS_POSIX_V6_ILP32_OFF32_LIBS :: 4
- _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 5
- _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 6
- _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 7
- _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 8
- _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 9
- _CS_POSIX_V6_LP64_OFF64_LIBS :: 10
- _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 11
- _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 12
- _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 13
- _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 14
+ _CS_PATH :: 1
+ _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 2
+ _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 3
+ _CS_POSIX_V6_ILP32_OFF32_LIBS :: 4
+ _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 5
+ _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 6
+ _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 7
+ _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 8
+ _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 9
+ _CS_POSIX_V6_LP64_OFF64_LIBS :: 10
+ _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 11
+ _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 12
+ _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 13
+ _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 14
_PC_LINK_MAX :: 1
_PC_MAX_CANON :: 2
@@ -1543,20 +1437,20 @@ when ODIN_OS == .Darwin {
F_TLOCK :: 2
F_ULOCK :: 0
- _CS_PATH :: 1
- _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 2
- _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 3
- _CS_POSIX_V6_ILP32_OFF32_LIBS :: 4
- _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 5
- _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 6
- _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 7
- _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 8
- _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 9
- _CS_POSIX_V6_LP64_OFF64_LIBS :: 10
- _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 11
- _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 12
- _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 13
- _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 14
+ _CS_PATH :: 1
+ _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 2
+ _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 3
+ _CS_POSIX_V6_ILP32_OFF32_LIBS :: 4
+ _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 5
+ _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 6
+ _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 7
+ _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 8
+ _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 9
+ _CS_POSIX_V6_LP64_OFF64_LIBS :: 10
+ _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 11
+ _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 12
+ _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 13
+ _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 14
_PC_LINK_MAX :: 1
_PC_MAX_CANON :: 2
@@ -1655,7 +1549,6 @@ when ODIN_OS == .Darwin {
_SC_TTY_NAME_MAX :: 68
_SC_HOST_NAME_MAX :: 69
- _SC_PASS_MAX :: 70
_SC_REGEXP :: 71
_SC_SHELL :: 72
_SC_SYMLOOP_MAX :: 73
@@ -1729,20 +1622,20 @@ when ODIN_OS == .Darwin {
F_TLOCK :: 2
F_ULOCK :: 0
- _CS_PATH :: 1
- _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 2
- _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 3
- _CS_POSIX_V6_ILP32_OFF32_LIBS :: 4
- _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 5
- _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 6
- _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 7
- _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 8
- _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 9
- _CS_POSIX_V6_LP64_OFF64_LIBS :: 10
- _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 11
- _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 12
- _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 13
- _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 14
+ _CS_PATH :: 1
+ _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 2
+ _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 3
+ _CS_POSIX_V6_ILP32_OFF32_LIBS :: 4
+ _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 5
+ _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 6
+ _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 7
+ _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 8
+ _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 9
+ _CS_POSIX_V6_LP64_OFF64_LIBS :: 10
+ _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 11
+ _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 12
+ _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 13
+ _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 14
_PC_LINK_MAX :: 1
_PC_MAX_CANON :: 2
@@ -1911,7 +1804,192 @@ when ODIN_OS == .Darwin {
_POSIX_VDISABLE :: '\377'
-} else {
- #panic("posix is unimplemented for the current target")
-}
+} else when ODIN_OS == .Linux {
+
+ _F_OK :: 0
+ X_OK :: 1
+ W_OK :: 2
+ R_OK :: 4
+
+ F_LOCK :: 1
+ F_TEST :: 3
+ F_TLOCK :: 2
+ F_ULOCK :: 0
+ _CS_PATH :: 1
+ _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 2
+
+ _CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 1116
+ _CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 1117
+ _CS_POSIX_V6_ILP32_OFF32_LIBS :: 1118
+ _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 1120
+ _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 1121
+ _CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 1122
+ _CS_POSIX_V6_LP64_OFF64_CFLAGS :: 1124
+ _CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 1125
+ _CS_POSIX_V6_LP64_OFF64_LIBS :: 1126
+ _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 1128
+ _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 1129
+ _CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 1130
+
+ _PC_LINK_MAX :: 1
+ _PC_MAX_CANON :: 2
+ _PC_MAX_INPUT :: 3
+ _PC_NAME_MAX :: 4
+ _PC_PATH_MAX :: 5
+ _PC_PIPE_BUF :: 6
+ _PC_CHOWN_RESTRICTED :: 7
+ _PC_NO_TRUNC :: 8
+ _PC_VDISABLE :: 9
+ _PC_SYNC_IO :: 10
+ _PC_ASYNC_IO :: 11
+ _PC_PRIO_IO :: 12
+ _PC_FILESIZEBITS :: 14
+ _PC_REC_INCR_XFER_SIZE :: 15
+ _PC_REC_MAX_XFER_SIZE :: 16
+ _PC_REC_MIN_XFER_SIZE :: 17
+ _PC_REC_XFER_ALIGN :: 18
+ _PC_ALLOC_SIZE_MIN :: 19
+ _PC_SYMLINK_MAX :: 20
+ _PC_2_SYMLINK :: 21
+
+ _SC_ARG_MAX :: 1
+ _SC_CHILD_MAX :: 2
+ _SC_CLK_TCK :: 3
+ _SC_NGROUPS_MAX :: 4
+ _SC_OPEN_MAX :: 5
+ _SC_STREAM_MAX :: 6
+ _SC_TZNAME_MAX :: 7
+ _SC_JOB_CONTROL :: 8
+ _SC_SAVED_IDS :: 9
+ _SC_REALTIME_SIGNALS :: 10
+ _SC_PRIORITY_SCHEDULING :: 11
+ _SC_TIMERS :: 12
+ _SC_ASYNCHRONOUS_IO :: 13
+ _SC_PRIORITIZED_IO :: 14
+ _SC_SYNCHRONIZED_IO :: 15
+ _SC_FSYNC :: 16
+ _SC_MAPPED_FILES :: 17
+ _SC_MEMLOCK :: 18
+ _SC_MEMLOCK_RANGE :: 19
+ _SC_MEMORY_PROTECTION :: 20
+ _SC_MESSAGE_PASSING :: 21
+ _SC_SEMAPHORES :: 22
+ _SC_SHARED_MEMORY_OBJECTS :: 23
+ _SC_AIO_LISTIO_MAX :: 24
+ _SC_AIO_MAX :: 25
+ _SC_AIO_PRIO_DELTA_MAX :: 26
+ _SC_DELAYTIMER_MAX :: 27
+ _SC_MQ_OPEN_MAX :: 28
+ _SC_MQ_PRIO_MAX :: 29
+ _SC_VERSION :: 30
+ _SC_PAGESIZE :: 31
+ _SC_PAGE_SIZE :: _SC_PAGESIZE
+ _SC_RTSIG_MAX :: 32
+ _SC_SEM_NSEMS_MAX :: 33
+ _SC_SEM_VALUE_MAX :: 34
+ _SC_SIGQUEUE_MAX :: 35
+ _SC_TIMER_MAX :: 36
+ _SC_BC_BASE_MAX :: 37
+ _SC_BC_DIM_MAX :: 38
+ _SC_BC_SCALE_MAX :: 39
+ _SC_BC_STRING_MAX :: 40
+ _SC_COLL_WEIGHTS_MAX :: 41
+ _SC_EXPR_NEST_MAX :: 43
+ _SC_LINE_MAX :: 44
+ _SC_RE_DUP_MAX :: 45
+ _SC_2_VERSION :: 47
+ _SC_2_C_BIND :: 48
+ _SC_2_C_DEV :: 49
+ _SC_2_FORT_DEV :: 50
+ _SC_2_FORT_RUN :: 51
+ _SC_2_SW_DEV :: 52
+ _SC_2_LOCALEDEF :: 53
+
+ _SC_IOV_MAX :: 62
+ _SC_THREADS :: 69
+ _SC_THREAD_SAFE_FUNCTIONS :: 70
+ _SC_GETGR_R_SIZE_MAX :: 71
+ _SC_GETPW_R_SIZE_MAX :: 72
+ _SC_LOGIN_NAME_MAX :: 73
+ _SC_TTY_NAME_MAX :: 74
+ _SC_THREAD_DESTRUCTOR_ITERATIONS :: 75
+ _SC_THREAD_KEYS_MAX :: 76
+ _SC_THREAD_STACK_MIN :: 77
+ _SC_THREAD_THREADS_MAX :: 78
+ _SC_THREAD_ATTR_STACKADDR :: 79
+ _SC_THREAD_ATTR_STACKSIZE :: 80
+ _SC_THREAD_PRIORITY_SCHEDULING :: 81
+ _SC_THREAD_PRIO_INHERIT :: 82
+ _SC_THREAD_PRIO_PROTECT :: 83
+ _SC_THREAD_PROCESS_SHARED :: 84
+ _SC_NPROCESSORS_CONF :: 85
+ _SC_NPROCESSORS_ONLN :: 86
+ _SC_PHYS_PAGES :: 87
+ _SC_AVPHYS_PAGES :: 88
+ _SC_ATEXIT_MAX :: 89
+ _SC_PASS_MAX :: 90
+ _SC_XOPEN_VERSION :: 91
+ _SC_XOPEN_UNIX :: 92
+ _SC_XOPEN_CRYPT :: 93
+ _SC_XOPEN_ENH_I18N :: 94
+ _SC_XOPEN_SHM :: 95
+ _SC_2_CHAR_TERM :: 96
+ _SC_2_UPE :: 97
+
+ _SC_XOPEN_LEGACY :: 129
+ _SC_XOPEN_REALTIME :: 130
+ _SC_XOPEN_REALTIME_THREADS :: 131
+ _SC_ADVISORY_INFO :: 132
+ _SC_BARRIERS :: 133
+ _SC_CLOCK_SELECTION :: 137
+ _SC_CPUTIME :: 138
+ _SC_THREAD_CPUTIME :: 139
+ _SC_MONOTONIC_CLOCK :: 149
+ _SC_READER_WRITER_LOCKS :: 153
+ _SC_SPIN_LOCKS :: 154
+ _SC_REGEXP :: 155
+ _SC_SHELL :: 157
+ _SC_SPAWN :: 159
+ _SC_SPORADIC_SERVER :: 160
+ _SC_THREAD_SPORADIC_SERVER :: 161
+ _SC_TIMEOUTS :: 164
+ _SC_TYPED_MEMORY_OBJECTS :: 165
+ _SC_2_PBS :: 168
+ _SC_2_PBS_ACCOUNTING :: 169
+ _SC_2_PBS_LOCATE :: 170
+ _SC_2_PBS_MESSAGE :: 171
+ _SC_2_PBS_TRACK :: 172
+ _SC_SYMLOOP_MAX :: 173
+ _SC_2_PBS_CHECKPOINT :: 174
+ _SC_V6_ILP32_OFF32 :: 175
+ _SC_V6_ILP32_OFFBIG :: 176
+ _SC_V6_LP64_OFF64 :: 177
+ _SC_V6_LPBIG_OFFBIG :: 178
+ _SC_HOST_NAME_MAX :: 179
+ _SC_TRACE :: 180
+ _SC_TRACE_EVENT_FILTER :: 181
+ _SC_TRACE_INHERIT :: 182
+ _SC_TRACE_LOG :: 183
+
+ _SC_IPV6 :: 234
+ _SC_RAW_SOCKETS :: 235
+ _SC_V7_ILP32_OFF32 :: 236
+ _SC_V7_ILP32_OFFBIG :: 237
+ _SC_V7_LP64_OFF64 :: 238
+ _SC_V7_LPBIG_OFFBIG :: 239
+ _SC_SS_REPL_MAX :: 240
+ _SC_TRACE_EVENT_NAME_MAX :: 241
+ _SC_TRACE_NAME_MAX :: 242
+ _SC_TRACE_SYS_MAX :: 243
+ _SC_TRACE_USER_EVENT_MAX :: 244
+ _SC_XOPEN_STREAMS :: 245
+ _SC_THREAD_ROBUST_PRIO_INHERIT :: 246
+ _SC_THREAD_ROBUST_PRIO_PROTECT :: 247
+
+ // NOTE: Not implemented.
+ _SC_XOPEN_UUCP :: 0
+ // NOTE: Not implemented.
+ _POSIX_VDISABLE :: 0
+
+}
diff --git a/core/sys/posix/unistd_libc.odin b/core/sys/posix/unistd_libc.odin
new file mode 100644
index 000000000..bbfe3d59d
--- /dev/null
+++ b/core/sys/posix/unistd_libc.odin
@@ -0,0 +1,153 @@
+#+build linux, windows, darwin, netbsd, openbsd, freebsd
+package posix
+
+import "core:c"
+
+when ODIN_OS == .Windows {
+ foreign import lib "system:libucrt.lib"
+} else when ODIN_OS == .Darwin {
+ foreign import lib "system:System.framework"
+} else {
+ foreign import lib "system:c"
+}
+
+// unistd.h - standard symbolic constants and types
+
+foreign lib {
+ /*
+ Checks the file named by the pathname pointed to by the path argument for
+ accessibility according to the bit pattern contained in amode.
+
+ Example:
+ if (posix.access("/tmp/myfile", posix.F_OK) != .OK) {
+ fmt.printfln("/tmp/myfile access check failed: %v", posix.strerror(posix.errno()))
+ }
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html ]]
+ */
+ @(link_name=LACCESS)
+ access :: proc(path: cstring, amode: Mode_Flags = F_OK) -> result ---
+
+ /*
+ Causes the directory named by path to become the current working directory.
+
+ Example:
+ if (posix.chdir("/tmp") == .OK) {
+ fmt.println("changed current directory to /tmp")
+ }
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html ]]
+ */
+ @(link_name=LCHDIR)
+ chdir :: proc(path: cstring) -> result ---
+
+ /*
+ Exits but, shall not call functions registered with atexit() nor any registered signal handlers.
+ Open streams shall not be flushed.
+ Whether open streams are closed (without flushing) is implementation-defined. Finally, the calling process shall be terminated with the consequences described below.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/_exit.html ]]
+ */
+ _exit :: proc(status: c.int) -> ! ---
+
+ /*
+ Places an absolute pathname of the current working directory into buf.
+
+ Returns: buf as a cstring on success, nil (setting errno) on failure
+
+ Example:
+ size: int
+ path_max := posix.pathconf(".", ._PATH_MAX)
+ if path_max == -1 {
+ size = 1024
+ } else if path_max > 10240 {
+ size = 10240
+ } else {
+ size = int(path_max)
+ }
+
+ buf: [dynamic]byte
+ cwd: cstring
+ for ; cwd == nil; size *= 2 {
+ if err := resize(&buf, size); err != nil {
+ fmt.panicf("allocation failure: %v", err)
+ }
+
+ cwd = posix.getcwd(raw_data(buf), len(buf))
+ if cwd == nil {
+ errno := posix.errno()
+ if errno != .ERANGE {
+ fmt.panicf("getcwd failure: %v", posix.strerror(errno))
+ }
+ }
+ }
+
+ fmt.println(path_max, cwd)
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html ]]
+ */
+ @(link_name=LGETCWD)
+ getcwd :: proc(buf: [^]c.char, size: c.size_t) -> cstring ---
+
+ /*
+ Remove an (empty) directory.
+
+ ]] More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html ]]
+ */
+ @(link_name=LRMDIR)
+ rmdir :: proc(path: cstring) -> result ---
+
+ /*
+ Copy nbyte bytes, from src, to dest, exchanging adjecent bytes.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/swab.html ]]
+ */
+ @(link_name=LSWAB)
+ swab :: proc(src: [^]byte, dest: [^]byte, nbytes: c.ssize_t) ---
+
+ /*
+ Remove a directory entry.
+
+ [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html ]]
+ */
+ @(link_name=LUNLINK)
+ unlink :: proc(path: cstring) -> result ---
+}
+
+when ODIN_OS == .Windows {
+ @(private) LACCESS :: "_access"
+ @(private) LCHDIR :: "_chdir"
+ @(private) LGETCWD :: "_getcwd"
+ @(private) LRMDIR :: "_rmdir"
+ @(private) LSWAB :: "_swab"
+ @(private) LUNLINK :: "_unlink"
+} else {
+ @(private) LACCESS :: "access"
+ @(private) LCHDIR :: "chdir"
+ @(private) LGETCWD :: "getcwd"
+ @(private) LRMDIR :: "rmdir"
+ @(private) LSWAB :: "swab"
+ @(private) LUNLINK :: "unlink"
+}
+
+STDERR_FILENO :: 2
+STDIN_FILENO :: 0
+STDOUT_FILENO :: 1
+
+Mode_Flag_Bits :: enum c.int {
+ X_OK = log2(X_OK),
+ W_OK = log2(W_OK),
+ R_OK = log2(R_OK),
+}
+Mode_Flags :: bit_set[Mode_Flag_Bits; c.int]
+
+#assert(_F_OK == 0)
+F_OK :: Mode_Flags{}
+
+when ODIN_OS == .Windows {
+ _F_OK :: 0
+ X_OK :: 1
+ W_OK :: 2
+ R_OK :: 4
+ #assert(W_OK|R_OK == 6)
+}
diff --git a/core/sys/posix/utime.odin b/core/sys/posix/utime.odin
index 591a6db06..e884eb1a3 100644
--- a/core/sys/posix/utime.odin
+++ b/core/sys/posix/utime.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
when ODIN_OS == .Darwin {
@@ -24,13 +25,11 @@ when ODIN_OS == .NetBSD {
@(private) LUTIME :: "utime"
}
-when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD {
+when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
utimbuf :: struct {
actime: time_t, /* [PSX] access time (seconds since epoch) */
modtime: time_t, /* [PSX] modification time (seconds since epoch) */
}
-} else {
- #panic("posix is unimplemented for the current target")
}
diff --git a/core/sys/posix/wordexp.odin b/core/sys/posix/wordexp.odin
index d730db0f7..a9e6f39a7 100644
--- a/core/sys/posix/wordexp.odin
+++ b/core/sys/posix/wordexp.odin
@@ -1,3 +1,4 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
package posix
import "core:c"
@@ -102,6 +103,25 @@ when ODIN_OS == .Darwin {
WRDE_NOSPACE :: 4
WRDE_SYNTAX :: 6
-} else {
- #panic("posix is unimplemented for the current target")
+} else when ODIN_OS == .Linux {
+
+ wordexp_t :: struct {
+ we_wordc: c.size_t, /* [PSX] count of words matched by words */
+ we_wordv: [^]cstring, /* [PSX] pointer to list of expanded words */
+ we_offs: c.size_t, /* [PSX] slots to reserve at the beginning of we_wordv */
+ }
+
+ WRDE_DOOFFS :: 1 << 0 /* Insert PWORDEXP->we_offs NULLs. */
+ WRDE_APPEND :: 1 << 1 /* Append to results of a previous call. */
+ WRDE_NOCMD :: 1 << 2 /* Don't do command substitution. */
+ WRDE_REUSE :: 1 << 3 /* Reuse storage in PWORDEXP. */
+ WRDE_SHOWERR :: 1 << 4 /* Don't redirect stderr to /dev/null. */
+ WRDE_UNDEF :: 1 << 5 /* Error for expanding undefined variables. */
+
+ WRDE_NOSPACE :: 1
+ WRDE_BADCHAR :: 2
+ WRDE_BADVAL :: 3
+ WRDE_CMDSUB :: 4
+ WRDE_SYNTAX :: 5
+
}
diff --git a/core/sys/unix/pthread_darwin.odin b/core/sys/unix/pthread_darwin.odin
deleted file mode 100644
index eb2cc4c9f..000000000
--- a/core/sys/unix/pthread_darwin.odin
+++ /dev/null
@@ -1,96 +0,0 @@
-#+build darwin
-package unix
-
-import "core:c"
-
-// NOTE(tetra): No 32-bit Macs.
-// Source: _pthread_types.h on my Mac.
-PTHREAD_SIZE :: 8176
-PTHREAD_ATTR_SIZE :: 56
-PTHREAD_MUTEXATTR_SIZE :: 8
-PTHREAD_MUTEX_SIZE :: 56
-PTHREAD_CONDATTR_SIZE :: 8
-PTHREAD_COND_SIZE :: 40
-PTHREAD_ONCE_SIZE :: 8
-PTHREAD_RWLOCK_SIZE :: 192
-PTHREAD_RWLOCKATTR_SIZE :: 16
-
-pthread_t :: distinct u64
-
-pthread_attr_t :: struct {
- sig: c.long,
- _: [PTHREAD_ATTR_SIZE] c.char,
-}
-
-pthread_cond_t :: struct {
- sig: c.long,
- _: [PTHREAD_COND_SIZE] c.char,
-}
-
-pthread_condattr_t :: struct {
- sig: c.long,
- _: [PTHREAD_CONDATTR_SIZE] c.char,
-}
-
-pthread_mutex_t :: struct {
- sig: c.long,
- _: [PTHREAD_MUTEX_SIZE] c.char,
-}
-
-pthread_mutexattr_t :: struct {
- sig: c.long,
- _: [PTHREAD_MUTEXATTR_SIZE] c.char,
-}
-
-pthread_once_t :: struct {
- sig: c.long,
- _: [PTHREAD_ONCE_SIZE] c.char,
-}
-
-pthread_rwlock_t :: struct {
- sig: c.long,
- _: [PTHREAD_RWLOCK_SIZE] c.char,
-}
-
-pthread_rwlockattr_t :: struct {
- sig: c.long,
- _: [PTHREAD_RWLOCKATTR_SIZE] c.char,
-}
-
-SCHED_OTHER :: 1 // Avoid if you are writing portable software.
-SCHED_FIFO :: 4
-SCHED_RR :: 2 // Round robin.
-
-SCHED_PARAM_SIZE :: 4
-
-sched_param :: struct {
- sched_priority: c.int,
- _: [SCHED_PARAM_SIZE] c.char,
-}
-
-// Source: https://github.com/apple/darwin-libpthread/blob/03c4628c8940cca6fd6a82957f683af804f62e7f/pthread/pthread.h#L138
-PTHREAD_CREATE_JOINABLE :: 1
-PTHREAD_CREATE_DETACHED :: 2
-PTHREAD_INHERIT_SCHED :: 1
-PTHREAD_EXPLICIT_SCHED :: 2
-PTHREAD_PROCESS_SHARED :: 1
-PTHREAD_PROCESS_PRIVATE :: 2
-
-
-PTHREAD_MUTEX_NORMAL :: 0
-PTHREAD_MUTEX_RECURSIVE :: 1
-PTHREAD_MUTEX_ERRORCHECK :: 2
-
-PTHREAD_CANCEL_ENABLE :: 0
-PTHREAD_CANCEL_DISABLE :: 1
-PTHREAD_CANCEL_DEFERRED :: 0
-PTHREAD_CANCEL_ASYNCHRONOUS :: 1
-
-foreign import pthread "system:System.framework"
-
-@(default_calling_convention="c")
-foreign pthread {
- pthread_setcancelstate :: proc (state: c.int, old_state: ^c.int) -> c.int ---
- pthread_setcanceltype :: proc (type: c.int, old_type: ^c.int) -> c.int ---
- pthread_cancel :: proc (thread: pthread_t) -> c.int ---
-}
diff --git a/core/sys/unix/pthread_freebsd.odin b/core/sys/unix/pthread_freebsd.odin
deleted file mode 100644
index 38fe7db55..000000000
--- a/core/sys/unix/pthread_freebsd.odin
+++ /dev/null
@@ -1,122 +0,0 @@
-#+build freebsd
-package unix
-
-import "core:c"
-
-pthread_t :: distinct u64
-// pthread_t :: struct #align(16) { x: u64 }
-
-PTHREAD_COND_T_SIZE :: 8
-
-PTHREAD_MUTEXATTR_T_SIZE :: 8
-PTHREAD_CONDATTR_T_SIZE :: 8
-PTHREAD_RWLOCKATTR_T_SIZE :: 8
-PTHREAD_BARRIERATTR_T_SIZE :: 8
-
-// WARNING: The sizes of these things are different yet again
-// on non-X86!
-when size_of(int) == 8 {
- PTHREAD_ATTR_T_SIZE :: 8
- PTHREAD_MUTEX_T_SIZE :: 8
- PTHREAD_RWLOCK_T_SIZE :: 8
- PTHREAD_BARRIER_T_SIZE :: 8
-} else when size_of(int) == 4 { // TODO
- PTHREAD_ATTR_T_SIZE :: 32
- PTHREAD_MUTEX_T_SIZE :: 32
- PTHREAD_RWLOCK_T_SIZE :: 44
- PTHREAD_BARRIER_T_SIZE :: 20
-}
-
-pthread_cond_t :: struct #align(16) {
- _: [PTHREAD_COND_T_SIZE] c.char,
-}
-pthread_mutex_t :: struct #align(16) {
- _: [PTHREAD_MUTEX_T_SIZE] c.char,
-}
-pthread_rwlock_t :: struct #align(16) {
- _: [PTHREAD_RWLOCK_T_SIZE] c.char,
-}
-pthread_barrier_t :: struct #align(16) {
- _: [PTHREAD_BARRIER_T_SIZE] c.char,
-}
-
-pthread_attr_t :: struct #align(16) {
- _: [PTHREAD_ATTR_T_SIZE] c.char,
-}
-pthread_condattr_t :: struct #align(16) {
- _: [PTHREAD_CONDATTR_T_SIZE] c.char,
-}
-pthread_mutexattr_t :: struct #align(16) {
- _: [PTHREAD_MUTEXATTR_T_SIZE] c.char,
-}
-pthread_rwlockattr_t :: struct #align(16) {
- _: [PTHREAD_RWLOCKATTR_T_SIZE] c.char,
-}
-pthread_barrierattr_t :: struct #align(16) {
- _: [PTHREAD_BARRIERATTR_T_SIZE] c.char,
-}
-
-PTHREAD_MUTEX_ERRORCHECK :: 1
-PTHREAD_MUTEX_RECURSIVE :: 2
-PTHREAD_MUTEX_NORMAL :: 3
-
-
-PTHREAD_CREATE_JOINABLE :: 0
-PTHREAD_CREATE_DETACHED :: 1
-PTHREAD_INHERIT_SCHED :: 4
-PTHREAD_EXPLICIT_SCHED :: 0
-PTHREAD_PROCESS_PRIVATE :: 0
-PTHREAD_PROCESS_SHARED :: 1
-
-SCHED_FIFO :: 1
-SCHED_OTHER :: 2
-SCHED_RR :: 3 // Round robin.
-
-
-sched_param :: struct {
- sched_priority: c.int,
-}
-
-_usem :: struct {
- _has_waiters: u32,
- _count: u32,
- _flags: u32,
-}
-_usem2 :: struct {
- _count: u32,
- _flags: u32,
-}
-sem_t :: struct {
- _magic: u32,
- _kern: _usem2,
- _padding: u32,
-}
-
-PTHREAD_CANCEL_ENABLE :: 0
-PTHREAD_CANCEL_DISABLE :: 1
-PTHREAD_CANCEL_DEFERRED :: 0
-PTHREAD_CANCEL_ASYNCHRONOUS :: 2
-
-foreign import "system:pthread"
-
-@(default_calling_convention="c")
-foreign pthread {
- // create named semaphore.
- // used in process-shared semaphores.
- sem_open :: proc(name: cstring, flags: c.int) -> ^sem_t ---
-
- sem_init :: proc(sem: ^sem_t, pshared: c.int, initial_value: c.uint) -> c.int ---
- sem_destroy :: proc(sem: ^sem_t) -> c.int ---
- sem_post :: proc(sem: ^sem_t) -> c.int ---
- sem_wait :: proc(sem: ^sem_t) -> c.int ---
- sem_trywait :: proc(sem: ^sem_t) -> c.int ---
- // sem_timedwait :: proc(sem: ^sem_t, timeout: time.TimeSpec) -> c.int ---
-
- // NOTE: unclear whether pthread_yield is well-supported on Linux systems,
- // see https://linux.die.net/man/3/pthread_yield
- pthread_yield :: proc() ---
-
- pthread_setcancelstate :: proc (state: c.int, old_state: ^c.int) -> c.int ---
- pthread_setcanceltype :: proc (type: c.int, old_type: ^c.int) -> c.int ---
- pthread_cancel :: proc (thread: pthread_t) -> c.int ---
-}
diff --git a/core/sys/unix/pthread_haiku.odin b/core/sys/unix/pthread_haiku.odin
deleted file mode 100644
index 1278f34fe..000000000
--- a/core/sys/unix/pthread_haiku.odin
+++ /dev/null
@@ -1,71 +0,0 @@
-package unix
-
-import "core:c"
-
-pthread_t :: distinct rawptr
-pthread_attr_t :: distinct rawptr
-pthread_mutex_t :: distinct rawptr
-pthread_mutexattr_t :: distinct rawptr
-pthread_cond_t :: distinct rawptr
-pthread_condattr_t :: distinct rawptr
-pthread_rwlock_t :: distinct rawptr
-pthread_rwlockattr_t :: distinct rawptr
-pthread_barrier_t :: distinct rawptr
-pthread_barrierattr_t :: distinct rawptr
-pthread_spinlock_t :: distinct rawptr
-
-pthread_key_t :: distinct c.int
-pthread_once_t :: struct {
- state: c.int,
- mutex: pthread_mutex_t,
-}
-
-PTHREAD_MUTEX_DEFAULT :: 0
-PTHREAD_MUTEX_NORMAL :: 1
-PTHREAD_MUTEX_ERRORCHECK :: 2
-PTHREAD_MUTEX_RECURSIVE :: 3
-
-PTHREAD_DETACHED :: 0x1
-PTHREAD_SCOPE_SYSTEM :: 0x2
-PTHREAD_INHERIT_SCHED :: 0x4
-PTHREAD_NOFLOAT :: 0x8
-
-PTHREAD_CREATE_DETACHED :: PTHREAD_DETACHED
-PTHREAD_CREATE_JOINABLE :: 0
-PTHREAD_SCOPE_PROCESS :: 0
-PTHREAD_EXPLICIT_SCHED :: 0
-
-SCHED_FIFO :: 1
-SCHED_RR :: 2
-SCHED_SPORADIC :: 3
-SCHED_OTHER :: 4
-
-sched_param :: struct {
- sched_priority: c.int,
-}
-
-sem_t :: distinct rawptr
-
-PTHREAD_CANCEL_ENABLE :: 0
-PTHREAD_CANCEL_DISABLE :: 1
-PTHREAD_CANCEL_DEFERRED :: 0
-PTHREAD_CANCEL_ASYNCHRONOUS :: 2
-
-foreign import libc "system:c"
-
-@(default_calling_convention="c")
-foreign libc {
- sem_open :: proc(name: cstring, flags: c.int) -> ^sem_t ---
-
- sem_init :: proc(sem: ^sem_t, pshared: c.int, initial_value: c.uint) -> c.int ---
- sem_destroy :: proc(sem: ^sem_t) -> c.int ---
- sem_post :: proc(sem: ^sem_t) -> c.int ---
- sem_wait :: proc(sem: ^sem_t) -> c.int ---
- sem_trywait :: proc(sem: ^sem_t) -> c.int ---
-
- pthread_yield :: proc() ---
-
- pthread_setcancelstate :: proc (state: c.int, old_state: ^c.int) -> c.int ---
- pthread_setcanceltype :: proc (type: c.int, old_type: ^c.int) -> c.int ---
- pthread_cancel :: proc (thread: pthread_t) -> c.int ---
-}
diff --git a/core/sys/unix/pthread_linux.odin b/core/sys/unix/pthread_linux.odin
deleted file mode 100644
index d67add24b..000000000
--- a/core/sys/unix/pthread_linux.odin
+++ /dev/null
@@ -1,124 +0,0 @@
-#+build linux
-package unix
-
-import "core:c"
-
-// TODO(tetra): For robustness, I'd like to mark this with align 16.
-// I cannot currently do this.
-// And at the time of writing there is a bug with putting it
-// as the only field in a struct.
-pthread_t :: distinct u64
-// pthread_t :: struct #align(16) { x: u64 };
-
-// NOTE(tetra): Got all the size constants from pthreadtypes-arch.h on my
-// Linux machine.
-
-PTHREAD_COND_T_SIZE :: 48
-
-PTHREAD_MUTEXATTR_T_SIZE :: 4
-PTHREAD_CONDATTR_T_SIZE :: 4
-PTHREAD_RWLOCKATTR_T_SIZE :: 8
-PTHREAD_BARRIERATTR_T_SIZE :: 4
-
-// WARNING: The sizes of these things are different yet again
-// on non-X86!
-when size_of(int) == 8 {
- PTHREAD_ATTR_T_SIZE :: 56
- PTHREAD_MUTEX_T_SIZE :: 40
- PTHREAD_RWLOCK_T_SIZE :: 56
- PTHREAD_BARRIER_T_SIZE :: 32
-} else when size_of(int) == 4 {
- PTHREAD_ATTR_T_SIZE :: 32
- PTHREAD_MUTEX_T_SIZE :: 32
- PTHREAD_RWLOCK_T_SIZE :: 44
- PTHREAD_BARRIER_T_SIZE :: 20
-}
-
-pthread_cond_t :: struct #align(16) {
- _: [PTHREAD_COND_T_SIZE] c.char,
-}
-pthread_mutex_t :: struct #align(16) {
- _: [PTHREAD_MUTEX_T_SIZE] c.char,
-}
-pthread_rwlock_t :: struct #align(16) {
- _: [PTHREAD_RWLOCK_T_SIZE] c.char,
-}
-pthread_barrier_t :: struct #align(16) {
- _: [PTHREAD_BARRIER_T_SIZE] c.char,
-}
-
-pthread_attr_t :: struct #align(16) {
- _: [PTHREAD_ATTR_T_SIZE] c.char,
-}
-pthread_condattr_t :: struct #align(16) {
- _: [PTHREAD_CONDATTR_T_SIZE] c.char,
-}
-pthread_mutexattr_t :: struct #align(16) {
- _: [PTHREAD_MUTEXATTR_T_SIZE] c.char,
-}
-pthread_rwlockattr_t :: struct #align(16) {
- _: [PTHREAD_RWLOCKATTR_T_SIZE] c.char,
-}
-pthread_barrierattr_t :: struct #align(16) {
- _: [PTHREAD_BARRIERATTR_T_SIZE] c.char,
-}
-
-PTHREAD_MUTEX_NORMAL :: 0
-PTHREAD_MUTEX_RECURSIVE :: 1
-PTHREAD_MUTEX_ERRORCHECK :: 2
-
-
-// TODO(tetra, 2019-11-01): Maybe make `enum c.int`s for these?
-PTHREAD_CREATE_JOINABLE :: 0
-PTHREAD_CREATE_DETACHED :: 1
-PTHREAD_INHERIT_SCHED :: 0
-PTHREAD_EXPLICIT_SCHED :: 1
-PTHREAD_PROCESS_PRIVATE :: 0
-PTHREAD_PROCESS_SHARED :: 1
-
-SCHED_OTHER :: 0
-SCHED_FIFO :: 1
-SCHED_RR :: 2 // Round robin.
-
-sched_param :: struct {
- sched_priority: c.int,
-}
-
-sem_t :: struct #align(16) {
- _: [SEM_T_SIZE] c.char,
-}
-
-when size_of(int) == 8 {
- SEM_T_SIZE :: 32
-} else when size_of(int) == 4 {
- SEM_T_SIZE :: 16
-}
-
-PTHREAD_CANCEL_ENABLE :: 0
-PTHREAD_CANCEL_DISABLE :: 1
-PTHREAD_CANCEL_DEFERRED :: 0
-PTHREAD_CANCEL_ASYNCHRONOUS :: 1
-
-foreign import "system:pthread"
-
-@(default_calling_convention="c")
-foreign pthread {
- // create named semaphore.
- // used in process-shared semaphores.
- sem_open :: proc(name: cstring, flags: c.int) -> ^sem_t ---
-
- sem_init :: proc(sem: ^sem_t, pshared: c.int, initial_value: c.uint) -> c.int ---
- sem_destroy :: proc(sem: ^sem_t) -> c.int ---
- sem_post :: proc(sem: ^sem_t) -> c.int ---
- sem_wait :: proc(sem: ^sem_t) -> c.int ---
- sem_trywait :: proc(sem: ^sem_t) -> c.int ---
- // sem_timedwait :: proc(sem: ^sem_t, timeout: time.TimeSpec) -> c.int ---;
-
- // NOTE: unclear whether pthread_yield is well-supported on Linux systems,
- // see https://linux.die.net/man/3/pthread_yield
- pthread_yield :: proc() -> c.int ---
-
- pthread_setcancelstate :: proc (state: c.int, old_state: ^c.int) -> c.int ---
- pthread_setcanceltype :: proc (type: c.int, old_type: ^c.int) -> c.int ---
- pthread_cancel :: proc (thread: pthread_t) -> c.int ---
-}
diff --git a/core/sys/unix/pthread_netbsd.odin b/core/sys/unix/pthread_netbsd.odin
deleted file mode 100644
index 9107f1139..000000000
--- a/core/sys/unix/pthread_netbsd.odin
+++ /dev/null
@@ -1,102 +0,0 @@
-package unix
-
-import "core:c"
-
-pthread_t :: distinct rawptr
-
-SEM_T_SIZE :: 8
-
-PTHREAD_CONDATTR_T_SIZE :: 16
-PTHREAD_MUTEXATTR_T_SIZE :: 16
-PTHREAD_RWLOCKATTR_T_SIZE :: 16
-PTHREAD_BARRIERATTR_T_SIZE :: 16
-
-PTHREAD_COND_T_SIZE :: 40
-PTHREAD_MUTEX_T_SIZE :: 48
-PTHREAD_RWLOCK_T_SIZE :: 64
-PTHREAD_BARRIER_T_SIZE :: 48
-PTHREAD_ATTR_T_SIZE :: 16
-
-pthread_cond_t :: struct #align(8) {
- _: [PTHREAD_COND_T_SIZE] c.char,
-}
-
-pthread_mutex_t :: struct #align(8) {
- _: [PTHREAD_MUTEX_T_SIZE] c.char,
-}
-
-pthread_rwlock_t :: struct #align(8) {
- _: [PTHREAD_RWLOCK_T_SIZE] c.char,
-}
-
-pthread_barrier_t :: struct #align(8) {
- _: [PTHREAD_BARRIER_T_SIZE] c.char,
-}
-
-pthread_attr_t :: struct #align(8) {
- _: [PTHREAD_ATTR_T_SIZE] c.char,
-}
-
-pthread_condattr_t :: struct #align(8) {
- _: [PTHREAD_CONDATTR_T_SIZE] c.char,
-}
-
-pthread_mutexattr_t :: struct #align(8) {
- _: [PTHREAD_MUTEXATTR_T_SIZE] c.char,
-}
-
-pthread_rwlockattr_t :: struct #align(8) {
- _: [PTHREAD_RWLOCKATTR_T_SIZE] c.char,
-}
-
-pthread_barrierattr_t :: struct #align(8) {
- _: [PTHREAD_BARRIERATTR_T_SIZE] c.char,
-}
-
-PTHREAD_MUTEX_NORMAL :: 0
-PTHREAD_MUTEX_ERRORCHECK :: 1
-PTHREAD_MUTEX_RECURSIVE :: 2
-
-PTHREAD_CREATE_JOINABLE :: 0
-PTHREAD_CREATE_DETACHED :: 1
-PTHREAD_INHERIT_SCHED :: 0
-PTHREAD_EXPLICIT_SCHED :: 1
-PTHREAD_PROCESS_PRIVATE :: 0
-PTHREAD_PROCESS_SHARED :: 1
-
-SCHED_NONE :: -1
-SCHED_OTHER :: 0
-SCHED_FIFO :: 1
-SCHED_RR :: 3
-
-sched_param :: struct {
- sched_priority: c.int,
-}
-
-sem_t :: struct #align(16) {
- _: [SEM_T_SIZE] c.char,
-}
-
-PTHREAD_CANCEL_ENABLE :: 0
-PTHREAD_CANCEL_DISABLE :: 1
-PTHREAD_CANCEL_DEFERRED :: 0
-PTHREAD_CANCEL_ASYNCHRONOUS :: 1
-
-foreign import "system:pthread"
-
-@(default_calling_convention="c")
-foreign pthread {
- sem_open :: proc(name: cstring, flags: c.int) -> ^sem_t ---
-
- sem_init :: proc(sem: ^sem_t, pshared: c.int, initial_value: c.uint) -> c.int ---
- sem_destroy :: proc(sem: ^sem_t) -> c.int ---
- sem_post :: proc(sem: ^sem_t) -> c.int ---
- sem_wait :: proc(sem: ^sem_t) -> c.int ---
- sem_trywait :: proc(sem: ^sem_t) -> c.int ---
-
- pthread_yield :: proc() ---
-
- pthread_setcancelstate :: proc (state: c.int, old_state: ^c.int) -> c.int ---
- pthread_setcanceltype :: proc (type: c.int, old_type: ^c.int) -> c.int ---
- pthread_cancel :: proc (thread: pthread_t) -> c.int ---
-}
diff --git a/core/sys/unix/pthread_openbsd.odin b/core/sys/unix/pthread_openbsd.odin
deleted file mode 100644
index 2c6d9e598..000000000
--- a/core/sys/unix/pthread_openbsd.odin
+++ /dev/null
@@ -1,74 +0,0 @@
-#+build openbsd
-package unix
-
-import "core:c"
-
-pthread_t :: distinct rawptr
-pthread_attr_t :: distinct rawptr
-pthread_mutex_t :: distinct rawptr
-pthread_mutexattr_t :: distinct rawptr
-pthread_cond_t :: distinct rawptr
-pthread_condattr_t :: distinct rawptr
-pthread_rwlock_t :: distinct rawptr
-pthread_rwlockattr_t :: distinct rawptr
-pthread_barrier_t :: distinct rawptr
-pthread_barrierattr_t :: distinct rawptr
-pthread_spinlock_t :: distinct rawptr
-
-pthread_key_t :: distinct c.int
-pthread_once_t :: struct {
- state: c.int,
- mutex: pthread_mutex_t,
-}
-
-PTHREAD_MUTEX_ERRORCHECK :: 1
-PTHREAD_MUTEX_RECURSIVE :: 2
-PTHREAD_MUTEX_NORMAL :: 3
-PTHREAD_MUTEX_STRICT_NP :: 4
-
-PTHREAD_DETACHED :: 0x1
-PTHREAD_SCOPE_SYSTEM :: 0x2
-PTHREAD_INHERIT_SCHED :: 0x4
-PTHREAD_NOFLOAT :: 0x8
-
-PTHREAD_CREATE_DETACHED :: PTHREAD_DETACHED
-PTHREAD_CREATE_JOINABLE :: 0
-PTHREAD_SCOPE_PROCESS :: 0
-PTHREAD_EXPLICIT_SCHED :: 0
-
-SCHED_FIFO :: 1
-SCHED_OTHER :: 2
-SCHED_RR :: 3
-
-sched_param :: struct {
- sched_priority: c.int,
-}
-
-sem_t :: distinct rawptr
-
-PTHREAD_CANCEL_ENABLE :: 0
-PTHREAD_CANCEL_DISABLE :: 1
-PTHREAD_CANCEL_DEFERRED :: 0
-PTHREAD_CANCEL_ASYNCHRONOUS :: 2
-
-foreign import libc "system:c"
-
-@(default_calling_convention="c")
-foreign libc {
- sem_open :: proc(name: cstring, flags: c.int) -> ^sem_t ---
-
- sem_init :: proc(sem: ^sem_t, pshared: c.int, initial_value: c.uint) -> c.int ---
- sem_destroy :: proc(sem: ^sem_t) -> c.int ---
- sem_post :: proc(sem: ^sem_t) -> c.int ---
- sem_wait :: proc(sem: ^sem_t) -> c.int ---
- sem_trywait :: proc(sem: ^sem_t) -> c.int ---
- //sem_timedwait :: proc(sem: ^sem_t, timeout: time.TimeSpec) -> c.int ---
-
- // NOTE: unclear whether pthread_yield is well-supported on Linux systems,
- // see https://linux.die.net/man/3/pthread_yield
- pthread_yield :: proc() ---
-
- pthread_setcancelstate :: proc (state: c.int, old_state: ^c.int) -> c.int ---
- pthread_setcanceltype :: proc (type: c.int, old_type: ^c.int) -> c.int ---
- pthread_cancel :: proc (thread: pthread_t) -> c.int ---
-}
diff --git a/core/sys/unix/pthread_unix.odin b/core/sys/unix/pthread_unix.odin
deleted file mode 100644
index 43c4866ed..000000000
--- a/core/sys/unix/pthread_unix.odin
+++ /dev/null
@@ -1,127 +0,0 @@
-#+build linux, darwin, freebsd, openbsd, netbsd, haiku
-package unix
-
-foreign import "system:pthread"
-
-import "core:c"
-
-timespec :: struct {
- tv_sec: i64,
- tv_nsec: i64,
-}
-
-//
-// On success, these functions return 0.
-//
-
-@(default_calling_convention="c")
-foreign pthread {
- pthread_create :: proc(t: ^pthread_t, attrs: ^pthread_attr_t, routine: proc(data: rawptr) -> rawptr, arg: rawptr) -> c.int ---
-
- // retval is a pointer to a location to put the return value of the thread proc.
- pthread_join :: proc(t: pthread_t, retval: ^rawptr) -> c.int ---
-
- pthread_kill :: proc(t: pthread_t, sig: c.int) -> c.int ---
-
- pthread_self :: proc() -> pthread_t ---
-
- pthread_equal :: proc(a, b: pthread_t) -> b32 ---
-
- pthread_detach :: proc(t: pthread_t) -> c.int ---
-
- sched_get_priority_min :: proc(policy: c.int) -> c.int ---
- sched_get_priority_max :: proc(policy: c.int) -> c.int ---
-
- // NOTE: POSIX says this can fail with OOM.
- pthread_attr_init :: proc(attrs: ^pthread_attr_t) -> c.int ---
-
- pthread_attr_destroy :: proc(attrs: ^pthread_attr_t) -> c.int ---
-
- pthread_attr_getschedparam :: proc(attrs: ^pthread_attr_t, param: ^sched_param) -> c.int ---
- pthread_attr_setschedparam :: proc(attrs: ^pthread_attr_t, param: ^sched_param) -> c.int ---
-
- // states: PTHREAD_CREATE_DETACHED, PTHREAD_CREATE_JOINABLE
- pthread_attr_setdetachstate :: proc(attrs: ^pthread_attr_t, detach_state: c.int) -> c.int ---
-
- // NOTE(tetra, 2019-11-06): WARNING: Different systems have different alignment requirements.
- // For maximum usefulness, use the OS's page size.
- // ALSO VERY MAJOR WARNING: `stack_ptr` must be the LAST byte of the stack on systems
- // where the stack grows downwards, which is the common case, so far as I know.
- // On systems where it grows upwards, give the FIRST byte instead.
- // ALSO SLIGHTLY LESS MAJOR WARNING: Using this procedure DISABLES automatically-provided
- // guard pages. If you are using this procedure, YOU must set them up manually.
- // If you forget to do this, you WILL get stack corruption bugs if you do not EXTREMELY
- // know what you are doing!
- pthread_attr_setstack :: proc(attrs: ^pthread_attr_t, stack_ptr: rawptr, stack_size: u64) -> c.int ---
- pthread_attr_getstack :: proc(attrs: ^pthread_attr_t, stack_ptr: ^rawptr, stack_size: ^u64) -> c.int ---
-
- pthread_sigmask :: proc(how: c.int, set: rawptr, oldset: rawptr) -> c.int ---
-
- sched_yield :: proc() -> c.int ---
-}
-
-// NOTE: Unimplemented in Haiku.
-when ODIN_OS != .Haiku {
- foreign pthread {
- // scheds: PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED
- pthread_attr_setinheritsched :: proc(attrs: ^pthread_attr_t, sched: c.int) -> c.int ---
-
- pthread_attr_getschedpolicy :: proc(t: ^pthread_attr_t, policy: ^c.int) -> c.int ---
- pthread_attr_setschedpolicy :: proc(t: ^pthread_attr_t, policy: c.int) -> c.int ---
- }
-}
-
-@(default_calling_convention="c")
-foreign pthread {
- // NOTE: POSIX says this can fail with OOM.
- pthread_cond_init :: proc(cond: ^pthread_cond_t, attrs: ^pthread_condattr_t) -> c.int ---
-
- pthread_cond_destroy :: proc(cond: ^pthread_cond_t) -> c.int ---
-
- pthread_cond_signal :: proc(cond: ^pthread_cond_t) -> c.int ---
-
- // same as signal, but wakes up _all_ threads that are waiting
- pthread_cond_broadcast :: proc(cond: ^pthread_cond_t) -> c.int ---
-
-
- // assumes the mutex is pre-locked
- pthread_cond_wait :: proc(cond: ^pthread_cond_t, mutex: ^pthread_mutex_t) -> c.int ---
- pthread_cond_timedwait :: proc(cond: ^pthread_cond_t, mutex: ^pthread_mutex_t, timeout: ^timespec) -> c.int ---
-
- pthread_condattr_init :: proc(attrs: ^pthread_condattr_t) -> c.int ---
- pthread_condattr_destroy :: proc(attrs: ^pthread_condattr_t) -> c.int ---
-
- // p-shared = "process-shared" - i.e: is this condition shared among multiple processes?
- // values: PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED
- pthread_condattr_setpshared :: proc(attrs: ^pthread_condattr_t, value: c.int) -> c.int ---
- pthread_condattr_getpshared :: proc(attrs: ^pthread_condattr_t, result: ^c.int) -> c.int ---
-
-}
-
-@(default_calling_convention="c")
-foreign pthread {
- // NOTE: POSIX says this can fail with OOM.
- pthread_mutex_init :: proc(mutex: ^pthread_mutex_t, attrs: ^pthread_mutexattr_t) -> c.int ---
-
- pthread_mutex_destroy :: proc(mutex: ^pthread_mutex_t) -> c.int ---
-
- pthread_mutex_trylock :: proc(mutex: ^pthread_mutex_t) -> c.int ---
-
- pthread_mutex_lock :: proc(mutex: ^pthread_mutex_t) -> c.int ---
-
- pthread_mutex_timedlock :: proc(mutex: ^pthread_mutex_t, timeout: ^timespec) -> c.int ---
-
- pthread_mutex_unlock :: proc(mutex: ^pthread_mutex_t) -> c.int ---
-
-
- pthread_mutexattr_init :: proc(attrs: ^pthread_mutexattr_t) -> c.int ---
- pthread_mutexattr_destroy :: proc(attrs: ^pthread_mutexattr_t) -> c.int ---
- pthread_mutexattr_settype :: proc(attrs: ^pthread_mutexattr_t, type: c.int) -> c.int ---
-
- // p-shared = "process-shared" - i.e: is this mutex shared among multiple processes?
- // values: PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED
- pthread_mutexattr_setpshared :: proc(attrs: ^pthread_mutexattr_t, value: c.int) -> c.int ---
- pthread_mutexattr_getpshared :: proc(attrs: ^pthread_mutexattr_t, result: ^c.int) -> c.int ---
-
- pthread_testcancel :: proc () ---
-}
diff --git a/core/sys/unix/unix.odin b/core/sys/unix/unix.odin
new file mode 100644
index 000000000..e9f58e554
--- /dev/null
+++ b/core/sys/unix/unix.odin
@@ -0,0 +1,8 @@
+package unix
+
+import "core:c"
+
+timespec :: struct {
+ secs: i64,
+ nsecs: c.long,
+}
diff --git a/core/sys/wasm/js/dom.odin b/core/sys/wasm/js/dom.odin
index ffc58a9a3..902dfc941 100644
--- a/core/sys/wasm/js/dom.odin
+++ b/core/sys/wasm/js/dom.odin
@@ -20,6 +20,8 @@ foreign dom_lib {
device_pixel_ratio :: proc() -> f64 ---
window_set_scroll :: proc(x, y: f64) ---
+
+ set_element_style :: proc(id: string, key: string, value: string) ---
}
get_element_value_string :: proc "contextless" (id: string, buf: []byte) -> string {
diff --git a/core/sys/wasm/js/events.odin b/core/sys/wasm/js/events.odin
index 905b3eba9..ffa3a1202 100644
--- a/core/sys/wasm/js/events.odin
+++ b/core/sys/wasm/js/events.odin
@@ -186,8 +186,8 @@ Key_Location :: enum u8 {
Numpad = 3,
}
-KEYBOARD_MAX_KEY_SIZE :: 16
-KEYBOARD_MAX_CODE_SIZE :: 16
+KEYBOARD_MAX_KEY_SIZE :: 32
+KEYBOARD_MAX_CODE_SIZE :: 32
GAMEPAD_MAX_ID_SIZE :: 64
GAMEPAD_MAX_MAPPING_SIZE :: 64
diff --git a/core/sys/wasm/js/odin.js b/core/sys/wasm/js/odin.js
index bf002da74..07a77952c 100644
--- a/core/sys/wasm/js/odin.js
+++ b/core/sys/wasm/js/odin.js
@@ -1259,13 +1259,26 @@ class WebGLInterface {
};
-function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory, eventQueue, event_temp) {
+function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
const MAX_INFO_CONSOLE_LINES = 512;
let infoConsoleLines = new Array();
let currentLine = {};
currentLine[false] = "";
currentLine[true] = "";
let prevIsError = false;
+
+ let event_temp = {};
+
+ const onEventReceived = (event_data, data, callback) => {
+ event_temp.data = event_data;
+
+ const exports = wasmMemoryInterface.exports;
+ const odin_ctx = exports.default_context_ptr();
+
+ exports.odin_dom_do_event_callback(data, callback, odin_ctx);
+
+ event_temp.data = null;
+ };
const writeToConsole = (line, isError) => {
if (!line) {
@@ -1535,8 +1548,8 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory, ev
wmi.storeInt(off(W, W), e.key.length)
wmi.storeInt(off(W, W), e.code.length)
- wmi.storeString(off(16, 1), e.key);
- wmi.storeString(off(16, 1), e.code);
+ wmi.storeString(off(32, 1), e.key);
+ wmi.storeString(off(32, 1), e.code);
} else if (e.type === 'scroll') {
wmi.storeF64(off(8, 8), window.scrollX);
wmi.storeF64(off(8, 8), window.scrollY);
@@ -1594,7 +1607,7 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory, ev
event_data.event = e;
event_data.name_code = name_code;
- eventQueue.push({event_data: event_data, data: data, callback: callback});
+ onEventReceived(event_data, data, callback);
};
wasmMemoryInterface.listenerMap[{data: data, callback: callback}] = listener;
element.addEventListener(name, listener, !!use_capture);
@@ -1611,7 +1624,7 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory, ev
event_data.event = e;
event_data.name_code = name_code;
- eventQueue.push({event_data: event_data, data: data, callback: callback});
+ onEventReceived(event_data, data, callback);
};
wasmMemoryInterface.listenerMap[{data: data, callback: callback}] = listener;
element.addEventListener(name, listener, !!use_capture);
@@ -1802,6 +1815,16 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory, ev
}
},
+ set_element_style: (id_ptr, id_len, key_ptr, key_len, value_ptr, value_len) => {
+ let id = wasmMemoryInterface.loadString(id_ptr, id_len);
+ let key = wasmMemoryInterface.loadString(key_ptr, key_len);
+ let value = wasmMemoryInterface.loadString(value_ptr, value_len);
+ let element = getElement(id);
+ if (element) {
+ element.style[key] = value;
+ }
+ },
+
get_element_key_f64: (id_ptr, id_len, key_ptr, key_len) => {
let id = wasmMemoryInterface.loadString(id_ptr, id_len);
let key = wasmMemoryInterface.loadString(key_ptr, key_len);
@@ -1905,10 +1928,7 @@ async function runWasm(wasmPath, consoleElement, extraForeignImports, wasmMemory
}
wasmMemoryInterface.setIntSize(intSize);
- let eventQueue = new Array();
- let event_temp = {};
-
- let imports = odinSetupDefaultImports(wasmMemoryInterface, consoleElement, wasmMemoryInterface.memory, eventQueue, event_temp);
+ let imports = odinSetupDefaultImports(wasmMemoryInterface, consoleElement, wasmMemoryInterface.memory);
let exports = {};
if (extraForeignImports !== undefined) {
@@ -1933,7 +1953,7 @@ async function runWasm(wasmPath, consoleElement, extraForeignImports, wasmMemory
exports._start();
- // Define a `@export step :: proc(current_type: f64) -> (keep_going: bool) {`
+ // Define a `@export step :: proc(delta_time: f64) -> (keep_going: bool) {`
// in your app and it will get called every frame.
// return `false` to stop the execution of the module.
if (exports.step) {
@@ -1948,14 +1968,7 @@ async function runWasm(wasmPath, consoleElement, extraForeignImports, wasmMemory
const dt = (currTimeStamp - prevTimeStamp)*0.001;
prevTimeStamp = currTimeStamp;
- while (eventQueue.length > 0) {
- let e = eventQueue.shift()
- event_temp.data = e.event_data;
- exports.odin_dom_do_event_callback(e.data, e.callback, odin_ctx);
- }
- event_temp.data = null;
-
- if (!exports.step(currTimeStamp*0.001, odin_ctx)) {
+ if (!exports.step(dt, odin_ctx)) {
exports._end();
return;
}
diff --git a/core/sys/windows/icu.odin b/core/sys/windows/icu.odin
new file mode 100644
index 000000000..6ed8c9b40
--- /dev/null
+++ b/core/sys/windows/icu.odin
@@ -0,0 +1,14 @@
+#+build windows
+package sys_windows
+
+foreign import "system:icu.lib"
+
+UError :: enum i32 {
+ U_ZERO_ERROR = 0,
+}
+
+@(default_calling_convention="system")
+foreign icu {
+ ucal_getWindowsTimeZoneID :: proc(id: wstring, len: i32, winid: wstring, winidCapacity: i32, status: ^UError) -> i32 ---
+ ucal_getDefaultTimeZone :: proc(result: wstring, cap: i32, status: ^UError) -> i32 ---
+}
diff --git a/core/sys/windows/kernel32.odin b/core/sys/windows/kernel32.odin
index 2771581e6..8be50bceb 100644
--- a/core/sys/windows/kernel32.odin
+++ b/core/sys/windows/kernel32.odin
@@ -381,6 +381,14 @@ foreign kernel32 {
nDefaultTimeOut: DWORD,
lpSecurityAttributes: LPSECURITY_ATTRIBUTES,
) -> HANDLE ---
+ PeekNamedPipe :: proc(
+ hNamedPipe: HANDLE,
+ lpBuffer: rawptr,
+ nBufferSize: u32,
+ lpBytesRead: ^u32,
+ lpTotalBytesAvail: ^u32,
+ lpBytesLeftThisMessage: ^u32,
+ ) -> BOOL ---
CancelIo :: proc(handle: HANDLE) -> BOOL ---
GetOverlappedResult :: proc(
hFile: HANDLE,
diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin
index 934d103e5..e1ace4133 100644
--- a/core/sys/windows/types.odin
+++ b/core/sys/windows/types.odin
@@ -253,8 +253,6 @@ FILE_GENERIC_WRITE: DWORD : STANDARD_RIGHTS_WRITE |
FILE_APPEND_DATA |
SYNCHRONIZE
-FILE_FLAG_OPEN_REPARSE_POINT: DWORD : 0x00200000
-FILE_FLAG_BACKUP_SEMANTICS: DWORD : 0x02000000
SECURITY_SQOS_PRESENT: DWORD : 0x00100000
FIONBIO: c_ulong : 0x8004667e
@@ -2222,11 +2220,22 @@ WAIT_OBJECT_0: DWORD : 0x00000000
WAIT_TIMEOUT: DWORD : 258
WAIT_FAILED: DWORD : 0xFFFFFFFF
+FILE_FLAG_WRITE_THROUGH: DWORD : 0x80000000
+FILE_FLAG_OVERLAPPED: DWORD : 0x40000000
+FILE_FLAG_NO_BUFFERING: DWORD : 0x20000000
+FILE_FLAG_RANDOM_ACCESS: DWORD : 0x10000000
+FILE_FLAG_SEQUENTIAL_SCAN: DWORD : 0x08000000
+FILE_FLAG_DELETE_ON_CLOSE: DWORD : 0x04000000
+FILE_FLAG_BACKUP_SEMANTICS: DWORD : 0x02000000
+FILE_FLAG_POSIX_SEMANTICS: DWORD : 0x01000000
+FILE_FLAG_SESSION_AWARE: DWORD : 0x00800000
+FILE_FLAG_OPEN_REPARSE_POINT: DWORD : 0x00200000
+FILE_FLAG_OPEN_NO_RECALL: DWORD : 0x00100000
+FILE_FLAG_FIRST_PIPE_INSTANCE: DWORD : 0x00080000
+
PIPE_ACCESS_INBOUND: DWORD : 0x00000001
PIPE_ACCESS_OUTBOUND: DWORD : 0x00000002
PIPE_ACCESS_DUPLEX: DWORD : 0x00000003
-FILE_FLAG_FIRST_PIPE_INSTANCE: DWORD : 0x00080000
-FILE_FLAG_OVERLAPPED: DWORD : 0x40000000
PIPE_WAIT: DWORD : 0x00000000
PIPE_TYPE_BYTE: DWORD : 0x00000000
PIPE_TYPE_MESSAGE: DWORD : 0x00000004
diff --git a/core/sys/windows/user32.odin b/core/sys/windows/user32.odin
index 514592e7b..4ae33cd32 100644
--- a/core/sys/windows/user32.odin
+++ b/core/sys/windows/user32.odin
@@ -781,3 +781,64 @@ CF_GDIOBJLAST :: 0x03FF
CF_OWNERDISPLAY :: 0x0080
CF_PRIVATEFIRST :: 0x0200
CF_PRIVATELAST :: 0x02FF
+
+STICKYKEYS :: struct {
+ cbSize: UINT,
+ dwFlags: DWORD,
+}
+LPSTICKYKEYS :: ^STICKYKEYS
+
+SKF_STICKYKEYSON :: 0x1
+SKF_AVAILABLE :: 0x2
+SKF_HOTKEYACTIVE :: 0x4
+SKF_CONFIRMHOTKEY :: 0x8
+SKF_HOTKEYSOUND :: 0x10
+SKF_INDICATOR :: 0x20
+SKF_AUDIBLEFEEDBACK :: 0x40
+SKF_TRISTATE :: 0x80
+SKF_TWOKEYSOFF :: 0x100
+SKF_LSHIFTLOCKED :: 0x10000
+SKF_RSHIFTLOCKED :: 0x20000
+SKF_LCTLLOCKED :: 0x40000
+SKF_RCTLLOCKED :: 0x80000
+SKF_LALTLOCKED :: 0x100000
+SKF_RALTLOCKED :: 0x200000
+SKF_LWINLOCKED :: 0x400000
+SKF_RWINLOCKED :: 0x800000
+SKF_LSHIFTLATCHED :: 0x1000000
+SKF_RSHIFTLATCHED :: 0x2000000
+SKF_LCTLLATCHED :: 0x4000000
+SKF_RCTLLATCHED :: 0x8000000
+SKF_LALTLATCHED :: 0x10000000
+SKF_RALTLATCHED :: 0x20000000
+
+TOGGLEKEYS :: struct {
+ cbSize: UINT,
+ dwFlags: DWORD,
+}
+LPTOGGLEKEYS :: ^TOGGLEKEYS
+
+TKF_TOGGLEKEYSON :: 0x1
+TKF_AVAILABLE :: 0x2
+TKF_HOTKEYACTIVE :: 0x4
+TKF_CONFIRMHOTKEY :: 0x8
+TKF_HOTKEYSOUND :: 0x10
+TKF_INDICATOR :: 0x20
+
+FILTERKEYS :: struct {
+ cbSize: UINT,
+ dwFlags: DWORD,
+ iWaitMSec: DWORD,
+ iDelayMSec: DWORD,
+ iRepeatMSec: DWORD,
+ iBounceMSec: DWORD,
+}
+LPFILTERKEYS :: ^FILTERKEYS
+
+FKF_FILTERKEYSON :: 0x1
+FKF_AVAILABLE :: 0x2
+FKF_HOTKEYACTIVE :: 0x4
+FKF_CONFIRMHOTKEY :: 0x8
+FKF_HOTKEYSOUND :: 0x10
+FKF_INDICATOR :: 0x20
+FKF_CLICKON :: 0x40
diff --git a/core/sys/windows/ux_theme.odin b/core/sys/windows/ux_theme.odin
index 527abd62f..392cf1e18 100644
--- a/core/sys/windows/ux_theme.odin
+++ b/core/sys/windows/ux_theme.odin
@@ -3,7 +3,7 @@ package sys_windows
foreign import uxtheme "system:UxTheme.lib"
-MARGINS :: distinct [4]int
+MARGINS :: distinct [4]i32
PMARGINS :: ^MARGINS
@(default_calling_convention="system")
diff --git a/core/sys/windows/winerror.odin b/core/sys/windows/winerror.odin
index b3b470619..61a7d9d86 100644
--- a/core/sys/windows/winerror.odin
+++ b/core/sys/windows/winerror.odin
@@ -251,26 +251,26 @@ SEVERITY :: enum DWORD {
// Generic test for success on any status value (non-negative numbers indicate success).
SUCCEEDED :: #force_inline proc "contextless" (#any_int result: int) -> bool { return result >= S_OK }
// and the inverse
-FAILED :: #force_inline proc(#any_int result: int) -> bool { return result < S_OK }
+FAILED :: #force_inline proc "contextless" (#any_int result: int) -> bool { return result < S_OK }
// Generic test for error on any status value.
-IS_ERROR :: #force_inline proc(#any_int status: int) -> bool { return u32(status) >> 31 == u32(SEVERITY.ERROR) }
+IS_ERROR :: #force_inline proc "contextless" (#any_int status: int) -> bool { return u32(status) >> 31 == u32(SEVERITY.ERROR) }
// Return the code
-HRESULT_CODE :: #force_inline proc(#any_int hr: int) -> int { return int(u32(hr) & 0xFFFF) }
+HRESULT_CODE :: #force_inline proc "contextless" (#any_int hr: int) -> int { return int(u32(hr) & 0xFFFF) }
// Return the facility
-HRESULT_FACILITY :: #force_inline proc(#any_int hr: int) -> FACILITY { return FACILITY((u32(hr) >> 16) & 0x1FFF) }
+HRESULT_FACILITY :: #force_inline proc "contextless" (#any_int hr: int) -> FACILITY { return FACILITY((u32(hr) >> 16) & 0x1FFF) }
// Return the severity
-HRESULT_SEVERITY :: #force_inline proc(#any_int hr: int) -> SEVERITY { return SEVERITY((u32(hr) >> 31) & 0x1) }
+HRESULT_SEVERITY :: #force_inline proc "contextless" (#any_int hr: int) -> SEVERITY { return SEVERITY((u32(hr) >> 31) & 0x1) }
// Create an HRESULT value from component pieces
-MAKE_HRESULT :: #force_inline proc(#any_int sev: int, #any_int fac: int, #any_int code: int) -> HRESULT {
+MAKE_HRESULT :: #force_inline proc "contextless" (#any_int sev: int, #any_int fac: int, #any_int code: int) -> HRESULT {
return HRESULT((uint(sev)<<31) | (uint(fac)<<16) | (uint(code)))
}
-DECODE_HRESULT :: #force_inline proc(#any_int hr: int) -> (SEVERITY, FACILITY, int) {
+DECODE_HRESULT :: #force_inline proc "contextless" (#any_int hr: int) -> (SEVERITY, FACILITY, int) {
return HRESULT_SEVERITY(hr), HRESULT_FACILITY(hr), HRESULT_CODE(hr)
}
diff --git a/core/testing/signal_handler_libc.odin b/core/testing/signal_handler_libc.odin
index 7442c100c..281fbde40 100644
--- a/core/testing/signal_handler_libc.odin
+++ b/core/testing/signal_handler_libc.odin
@@ -15,7 +15,6 @@ import "core:c/libc"
import "core:encoding/ansi"
import "core:sync"
import "core:os"
-@require import "core:sys/unix"
@(private="file") stop_runner_flag: libc.sig_atomic_t
@@ -45,7 +44,7 @@ stop_runner_callback :: proc "c" (sig: libc.int) {
}
}
-@(private="file")
+@(private)
stop_test_callback :: proc "c" (sig: libc.int) {
if !local_test_index_set {
// We're a thread created by a test thread.
@@ -106,17 +105,7 @@ This is a dire bug and should be reported to the Odin developers.
// otherwise we may continue to generate signals.
intrinsics.cpu_relax()
- when ODIN_OS != .Windows {
- // NOTE(Feoramund): Some UNIX-like platforms may require this.
- //
- // During testing, I found that NetBSD 10.0 refused to
- // terminate a task thread, even when its thread had been
- // properly set to PTHREAD_CANCEL_ASYNCHRONOUS.
- //
- // The runner would stall after returning from `pthread_cancel`.
-
- unix.pthread_testcancel()
- }
+ _test_thread_cancel()
}
}
}
@@ -133,14 +122,12 @@ _setup_signal_handler :: proc() {
// For tests:
// Catch asserts and panics.
libc.signal(libc.SIGILL, stop_test_callback)
- when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .Haiku || ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD || ODIN_OS == .Darwin {
- // Catch panics on Darwin and unhandled calls to `debug_trap`.
- libc.signal(SIGTRAP, stop_test_callback)
- }
// Catch arithmetic errors.
libc.signal(libc.SIGFPE, stop_test_callback)
// Catch segmentation faults (illegal memory access).
libc.signal(libc.SIGSEGV, stop_test_callback)
+
+ __setup_signal_handler()
}
_setup_task_signal_handler :: proc(test_index: int) {
diff --git a/core/testing/signal_handler_posix.odin b/core/testing/signal_handler_posix.odin
new file mode 100644
index 000000000..1bfcc875b
--- /dev/null
+++ b/core/testing/signal_handler_posix.odin
@@ -0,0 +1,22 @@
+#+build linux, darwin, netbsd, openbsd, freebsd
+#+private
+package testing
+
+import "core:c/libc"
+import "core:sys/posix"
+
+__setup_signal_handler :: proc() {
+ libc.signal(posix.SIGTRAP, stop_test_callback)
+}
+
+_test_thread_cancel :: proc "contextless" () {
+ // NOTE(Feoramund): Some UNIX-like platforms may require this.
+ //
+ // During testing, I found that NetBSD 10.0 refused to
+ // terminate a task thread, even when its thread had been
+ // properly set to PTHREAD_CANCEL_ASYNCHRONOUS.
+ //
+ // The runner would stall after returning from `pthread_cancel`.
+
+ posix.pthread_testcancel()
+}
diff --git a/core/testing/signal_handler_windows.odin b/core/testing/signal_handler_windows.odin
new file mode 100644
index 000000000..74ebe2998
--- /dev/null
+++ b/core/testing/signal_handler_windows.odin
@@ -0,0 +1,6 @@
+#+private
+package testing
+
+__setup_signal_handler :: proc() {}
+
+_test_thread_cancel :: proc "contextless" () {}
diff --git a/core/text/scanner/scanner.odin b/core/text/scanner/scanner.odin
index d27c66f24..24dbcc8a4 100644
--- a/core/text/scanner/scanner.odin
+++ b/core/text/scanner/scanner.odin
@@ -2,7 +2,7 @@
// It takes a string providing the source, which then can be tokenized through
// repeated calls to the scan procedure.
// For compatibility with existing tooling and languages, the NUL character is not allowed.
-// If an UTF-8 encoded byte order mark (BOM) is the first character in the first character in the source, it will be discarded.
+// If an UTF-8 encoded byte order mark (BOM) is the first character in the source, it will be discarded.
//
// By default, a Scanner skips white space and Odin comments and recognizes all literals defined by the Odin programming language specification.
// A Scanner may be customized to recognize only a subset of those literals and to recognize different identifiers and white space characters.
diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin
index 9576a3040..ff79cfcbc 100644
--- a/core/thread/thread_unix.odin
+++ b/core/thread/thread_unix.odin
@@ -4,14 +4,14 @@ package thread
import "base:runtime"
import "core:sync"
-import "core:sys/unix"
+import "core:sys/posix"
_IS_SUPPORTED :: true
// NOTE(tetra): Aligned here because of core/unix/pthread_linux.odin/pthread_t.
// Also see core/sys/darwin/mach_darwin.odin/semaphore_t.
Thread_Os_Specific :: struct #align(16) {
- unix_thread: unix.pthread_t, // NOTE: very large on Darwin, small on Linux.
+ unix_thread: posix.pthread_t, // NOTE: very large on Darwin, small on Linux.
start_ok: sync.Sema,
}
//
@@ -23,7 +23,9 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
t := (^Thread)(t)
// We need to give the thread a moment to start up before we enable cancellation.
- can_set_thread_cancel_state := unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_ENABLE, nil) == 0
+ // NOTE(laytan): setting to .DISABLE on darwin, with .ENABLE pthread_cancel would deadlock
+ // most of the time, don't ask me why.
+ can_set_thread_cancel_state := posix.pthread_setcancelstate(.DISABLE when ODIN_OS == .Darwin else .ENABLE, nil) == nil
t.id = sync.current_thread_id()
@@ -36,9 +38,15 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
}
// Enable thread's cancelability.
- if can_set_thread_cancel_state {
- unix.pthread_setcanceltype (unix.PTHREAD_CANCEL_ASYNCHRONOUS, nil)
- unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_ENABLE, nil)
+ // NOTE(laytan): Darwin does not correctly/fully support all of this, not doing this does
+ // actually make pthread_cancel work in the capacity of my tests, while executing this would
+ // basically always make it deadlock.
+ if ODIN_OS != .Darwin && can_set_thread_cancel_state {
+ err := posix.pthread_setcancelstate(.ENABLE, nil)
+ assert_contextless(err == nil)
+
+ err = posix.pthread_setcanceltype(.ASYNCHRONOUS, nil)
+ assert_contextless(err == nil)
}
{
@@ -59,8 +67,8 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
sync.atomic_or(&t.flags, { .Done })
if .Self_Cleanup in sync.atomic_load(&t.flags) {
- res := unix.pthread_detach(t.unix_thread)
- assert_contextless(res == 0)
+ res := posix.pthread_detach(t.unix_thread)
+ assert_contextless(res == nil)
t.unix_thread = {}
// NOTE(ftphikari): It doesn't matter which context 'free' received, right?
@@ -71,19 +79,19 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
return nil
}
- attrs: unix.pthread_attr_t
- if unix.pthread_attr_init(&attrs) != 0 {
+ attrs: posix.pthread_attr_t
+ if posix.pthread_attr_init(&attrs) != nil {
return nil // NOTE(tetra, 2019-11-01): POSIX OOM.
}
- defer unix.pthread_attr_destroy(&attrs)
+ defer posix.pthread_attr_destroy(&attrs)
// NOTE(tetra, 2019-11-01): These only fail if their argument is invalid.
- res: i32
- res = unix.pthread_attr_setdetachstate(&attrs, unix.PTHREAD_CREATE_JOINABLE)
- assert(res == 0)
+ res: posix.Errno
+ res = posix.pthread_attr_setdetachstate(&attrs, .CREATE_JOINABLE)
+ assert(res == nil)
when ODIN_OS != .Haiku && ODIN_OS != .NetBSD {
- res = unix.pthread_attr_setinheritsched(&attrs, unix.PTHREAD_EXPLICIT_SCHED)
- assert(res == 0)
+ res = posix.pthread_attr_setinheritsched(&attrs, .EXPLICIT_SCHED)
+ assert(res == nil)
}
thread := new(Thread)
@@ -93,26 +101,26 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
thread.creation_allocator = context.allocator
// Set thread priority.
- policy: i32
+ policy: posix.Sched_Policy
when ODIN_OS != .Haiku && ODIN_OS != .NetBSD {
- res = unix.pthread_attr_getschedpolicy(&attrs, &policy)
- assert(res == 0)
+ res = posix.pthread_attr_getschedpolicy(&attrs, &policy)
+ assert(res == nil)
}
- params: unix.sched_param
- res = unix.pthread_attr_getschedparam(&attrs, &params)
- assert(res == 0)
- low := unix.sched_get_priority_min(policy)
- high := unix.sched_get_priority_max(policy)
+ params: posix.sched_param
+ res = posix.pthread_attr_getschedparam(&attrs, &params)
+ assert(res == nil)
+ low := posix.sched_get_priority_min(policy)
+ high := posix.sched_get_priority_max(policy)
switch priority {
case .Normal: // Okay
case .Low: params.sched_priority = low + 1
case .High: params.sched_priority = high
}
- res = unix.pthread_attr_setschedparam(&attrs, &params)
- assert(res == 0)
+ res = posix.pthread_attr_setschedparam(&attrs, &params)
+ assert(res == nil)
thread.procedure = procedure
- if unix.pthread_create(&thread.unix_thread, &attrs, __unix_thread_entry_proc, thread) != 0 {
+ if posix.pthread_create(&thread.unix_thread, &attrs, __unix_thread_entry_proc, thread) != nil {
free(thread, thread.creation_allocator)
return nil
}
@@ -130,7 +138,7 @@ _is_done :: proc(t: ^Thread) -> bool {
}
_join :: proc(t: ^Thread) {
- if unix.pthread_equal(unix.pthread_self(), t.unix_thread) {
+ if posix.pthread_equal(posix.pthread_self(), t.unix_thread) {
return
}
@@ -144,7 +152,7 @@ _join :: proc(t: ^Thread) {
if .Started not_in sync.atomic_load(&t.flags) {
_start(t)
}
- unix.pthread_join(t.unix_thread, nil)
+ posix.pthread_join(t.unix_thread, nil)
}
_join_multiple :: proc(threads: ..^Thread) {
@@ -170,9 +178,9 @@ _terminate :: proc(t: ^Thread, exit_code: int) {
//
// This is in contrast to behavior I have seen on Linux where the thread is
// just terminated.
- unix.pthread_cancel(t.unix_thread)
+ posix.pthread_cancel(t.unix_thread)
}
_yield :: proc() {
- unix.sched_yield()
+ posix.sched_yield()
}
diff --git a/core/time/datetime/constants.odin b/core/time/datetime/constants.odin
index 5f336ef4a..e24709e49 100644
--- a/core/time/datetime/constants.odin
+++ b/core/time/datetime/constants.odin
@@ -77,12 +77,55 @@ Time :: struct {
nano: i32,
}
+TZ_Record :: struct {
+ time: i64,
+ utc_offset: i64,
+ shortname: string,
+ dst: bool,
+}
+
+TZ_Date_Kind :: enum {
+ No_Leap,
+ Leap,
+ Month_Week_Day,
+}
+
+TZ_Transition_Date :: struct {
+ type: TZ_Date_Kind,
+
+ month: u8,
+ week: u8,
+ day: u16,
+
+ time: i64,
+}
+
+TZ_RRule :: struct {
+ has_dst: bool,
+
+ std_name: string,
+ std_offset: i64,
+ std_date: TZ_Transition_Date,
+
+ dst_name: string,
+ dst_offset: i64,
+ dst_date: TZ_Transition_Date,
+}
+
+TZ_Region :: struct {
+ name: string,
+ records: []TZ_Record,
+ shortnames: []string,
+ rrule: TZ_RRule,
+}
+
/*
A type representing datetime.
*/
DateTime :: struct {
using date: Date,
using time: Time,
+ tz: ^TZ_Region,
}
/*
@@ -130,4 +173,4 @@ Weekday :: enum i8 {
}
@(private)
-MONTH_DAYS :: [?]i8{-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} \ No newline at end of file
+MONTH_DAYS :: [?]i8{-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
diff --git a/core/time/datetime/datetime.odin b/core/time/datetime/datetime.odin
index fc9780e3b..2cd90b0e7 100644
--- a/core/time/datetime/datetime.odin
+++ b/core/time/datetime/datetime.odin
@@ -76,7 +76,7 @@ datetime, an error is returned.
components_to_datetime :: proc "contextless" (#any_int year, #any_int month, #any_int day, #any_int hour, #any_int minute, #any_int second: i64, #any_int nanos := i64(0)) -> (datetime: DateTime, err: Error) {
date := components_to_date(year, month, day) or_return
time := components_to_time(hour, minute, second, nanos) or_return
- return {date, time}, .None
+ return {date, time, nil}, .None
}
/*
@@ -88,7 +88,7 @@ object will always have the time equal to `00:00:00.000`.
*/
ordinal_to_datetime :: proc "contextless" (ordinal: Ordinal) -> (datetime: DateTime, err: Error) {
d := ordinal_to_date(ordinal) or_return
- return {Date(d), {}}, .None
+ return {Date(d), {}, nil}, .None
}
/*
@@ -433,4 +433,4 @@ unsafe_ordinal_to_date :: proc "contextless" (ordinal: Ordinal) -> (date: Date)
day := i8(ordinal - unsafe_date_to_ordinal(Date{year, month, 1}) + 1)
return {year, month, day}
-} \ No newline at end of file
+}
diff --git a/core/time/time.odin b/core/time/time.odin
index 98639b36a..b488f951c 100644
--- a/core/time/time.odin
+++ b/core/time/time.odin
@@ -930,7 +930,7 @@ If the datetime represents a time outside of a valid range, `false` is returned
as the second return value. See `Time` for the representable range.
*/
compound_to_time :: proc "contextless" (datetime: dt.DateTime) -> (t: Time, ok: bool) {
- unix_epoch := dt.DateTime{{1970, 1, 1}, {0, 0, 0, 0}}
+ unix_epoch := dt.DateTime{{1970, 1, 1}, {0, 0, 0, 0}, nil}
delta, err := dt.sub(datetime, unix_epoch)
if err != .None {
return
@@ -958,7 +958,7 @@ datetime_to_time :: proc{components_to_time, compound_to_time}
Convert time into datetime.
*/
time_to_datetime :: proc "contextless" (t: Time) -> (dt.DateTime, bool) {
- unix_epoch := dt.DateTime{{1970, 1, 1}, {0, 0, 0, 0}}
+ unix_epoch := dt.DateTime{{1970, 1, 1}, {0, 0, 0, 0}, nil}
datetime, err := dt.add(unix_epoch, dt.Delta{ nanos = t._nsec })
if err != .None {
diff --git a/core/time/time_linux.odin b/core/time/time_linux.odin
index 649f601dc..4e557766e 100644
--- a/core/time/time_linux.odin
+++ b/core/time/time_linux.odin
@@ -6,8 +6,8 @@ _IS_SUPPORTED :: true
_now :: proc "contextless" () -> Time {
time_spec_now, _ := linux.clock_gettime(.REALTIME)
- ns := time_spec_now.time_sec * 1e9 + time_spec_now.time_nsec
- return Time{_nsec=i64(ns)}
+ ns := i64(time_spec_now.time_sec) * 1e9 + i64(time_spec_now.time_nsec)
+ return Time{_nsec=ns}
}
_sleep :: proc "contextless" (d: Duration) {
@@ -29,7 +29,7 @@ _sleep :: proc "contextless" (d: Duration) {
_tick_now :: proc "contextless" () -> Tick {
t, _ := linux.clock_gettime(.MONOTONIC_RAW)
- return Tick{_nsec = i64(t.time_sec*1e9 + t.time_nsec)}
+ return Tick{_nsec = i64(t.time_sec)*1e9 + i64(t.time_nsec)}
}
_yield :: proc "contextless" () {
diff --git a/core/time/timezone/tz_unix.odin b/core/time/timezone/tz_unix.odin
new file mode 100644
index 000000000..990e78d41
--- /dev/null
+++ b/core/time/timezone/tz_unix.odin
@@ -0,0 +1,89 @@
+#+build darwin, linux, freebsd, openbsd, netbsd
+#+private
+package timezone
+
+import "core:os"
+import "core:strings"
+import "core:path/filepath"
+import "core:time/datetime"
+
+local_tz_name :: proc(allocator := context.allocator) -> (name: string, success: bool) {
+ local_str, ok := os.lookup_env("TZ", allocator)
+ if !ok {
+ orig_localtime_path := "/etc/localtime"
+ path, err := os.absolute_path_from_relative(orig_localtime_path, allocator)
+ if err != nil {
+ // If we can't find /etc/localtime, fallback to UTC
+ if err == .ENOENT {
+ str, err2 := strings.clone("UTC", allocator)
+ if err2 != nil { return }
+ return str, true
+ }
+
+ return
+ }
+ defer delete(path, allocator)
+
+ // FreeBSD makes me sad.
+ // This is a hackaround, because FreeBSD copies rather than softlinks their local timezone file,
+ // *sometimes* and then stores the original name of the timezone in /var/db/zoneinfo instead
+ if path == orig_localtime_path {
+ data := os.read_entire_file("/var/db/zoneinfo", allocator) or_return
+ return strings.trim_right_space(string(data)), true
+ }
+
+ // Looking for tz path (ex fmt: "UTC", "Etc/UTC" or "America/Los_Angeles")
+ path_dir, path_file := filepath.split(path)
+ if path_dir == "" {
+ return
+ }
+ upper_path_dir, upper_path_chunk := filepath.split(path_dir[:len(path_dir)-1])
+ if upper_path_dir == "" {
+ return
+ }
+
+ if strings.contains(upper_path_chunk, "zoneinfo") {
+ region_str, err := strings.clone(path_file, allocator)
+ if err != nil { return }
+ return region_str, true
+ } else {
+ region_str, err := filepath.join({upper_path_chunk, path_file}, allocator = allocator)
+ if err != nil { return }
+ return region_str, true
+ }
+ }
+
+ if local_str == "" {
+ delete(local_str, allocator)
+
+ str, err := strings.clone("UTC", allocator)
+ if err != nil { return }
+ return str, true
+ }
+
+ return local_str, true
+}
+
+_region_load :: proc(_reg_str: string, allocator := context.allocator) -> (out_reg: ^datetime.TZ_Region, success: bool) {
+ reg_str := _reg_str
+ if reg_str == "UTC" {
+ return nil, true
+ }
+
+ if reg_str == "local" {
+ local_name := local_tz_name(allocator) or_return
+ if local_name == "UTC" {
+ delete(local_name, allocator)
+ return nil, true
+ }
+
+ reg_str = local_name
+ }
+ defer if _reg_str == "local" { delete(reg_str, allocator) }
+
+ db_path := "/usr/share/zoneinfo"
+ region_path := filepath.join({db_path, reg_str}, allocator)
+ defer delete(region_path, allocator)
+
+ return load_tzif_file(region_path, reg_str, allocator)
+}
diff --git a/core/time/timezone/tz_windows.odin b/core/time/timezone/tz_windows.odin
new file mode 100644
index 000000000..238c4c933
--- /dev/null
+++ b/core/time/timezone/tz_windows.odin
@@ -0,0 +1,311 @@
+#+build windows
+#+private
+package timezone
+
+import "core:strings"
+import "core:sys/windows"
+import "core:time/datetime"
+
+TZ_Abbrev :: struct {
+ std: string,
+ dst: string,
+}
+
+tz_abbrevs := map[string]TZ_Abbrev {
+ "Egypt Standard Time" = {"EET", "EEST"}, // Africa/Cairo
+ "Morocco Standard Time" = {"+00", "+01"}, // Africa/Casablanca
+ "South Africa Standard Time" = {"SAST", "SAST"}, // Africa/Johannesburg
+ "South Sudan Standard Time" = {"CAT", "CAT"}, // Africa/Juba
+ "Sudan Standard Time" = {"CAT", "CAT"}, // Africa/Khartoum
+ "W. Central Africa Standard Time" = {"WAT", "WAT"}, // Africa/Lagos
+ "E. Africa Standard Time" = {"EAT", "EAT"}, // Africa/Nairobi
+ "Sao Tome Standard Time" = {"GMT", "GMT"}, // Africa/Sao_Tome
+ "Libya Standard Time" = {"EET", "EET"}, // Africa/Tripoli
+ "Namibia Standard Time" = {"CAT", "CAT"}, // Africa/Windhoek
+ "Aleutian Standard Time" = {"HST", "HDT"}, // America/Adak
+ "Alaskan Standard Time" = {"AKST", "AKDT"}, // America/Anchorage
+ "Tocantins Standard Time" = {"-03", "-03"}, // America/Araguaina
+ "Paraguay Standard Time" = {"-04", "-03"}, // America/Asuncion
+ "Bahia Standard Time" = {"-03", "-03"}, // America/Bahia
+ "SA Pacific Standard Time" = {"-05", "-05"}, // America/Bogota
+ "Argentina Standard Time" = {"-03", "-03"}, // America/Buenos_Aires
+ "Eastern Standard Time (Mexico)" = {"EST", "EST"}, // America/Cancun
+ "Venezuela Standard Time" = {"-04", "-04"}, // America/Caracas
+ "SA Eastern Standard Time" = {"-03", "-03"}, // America/Cayenne
+ "Central Standard Time" = {"CST", "CDT"}, // America/Chicago
+ "Central Brazilian Standard Time" = {"-04", "-04"}, // America/Cuiaba
+ "Mountain Standard Time" = {"MST", "MDT"}, // America/Denver
+ "Greenland Standard Time" = {"-03", "-02"}, // America/Godthab
+ "Turks And Caicos Standard Time" = {"EST", "EDT"}, // America/Grand_Turk
+ "Central America Standard Time" = {"CST", "CST"}, // America/Guatemala
+ "Atlantic Standard Time" = {"AST", "ADT"}, // America/Halifax
+ "Cuba Standard Time" = {"CST", "CDT"}, // America/Havana
+ "US Eastern Standard Time" = {"EST", "EDT"}, // America/Indianapolis
+ "SA Western Standard Time" = {"-04", "-04"}, // America/La_Paz
+ "Pacific Standard Time" = {"PST", "PDT"}, // America/Los_Angeles
+ "Mountain Standard Time (Mexico)" = {"MST", "MST"}, // America/Mazatlan
+ "Central Standard Time (Mexico)" = {"CST", "CST"}, // America/Mexico_City
+ "Saint Pierre Standard Time" = {"-03", "-02"}, // America/Miquelon
+ "Montevideo Standard Time" = {"-03", "-03"}, // America/Montevideo
+ "Eastern Standard Time" = {"EST", "EDT"}, // America/New_York
+ "US Mountain Standard Time" = {"MST", "MST"}, // America/Phoenix
+ "Haiti Standard Time" = {"EST", "EDT"}, // America/Port-au-Prince
+ "Magallanes Standard Time" = {"-03", "-03"}, // America/Punta_Arenas
+ "Canada Central Standard Time" = {"CST", "CST"}, // America/Regina
+ "Pacific SA Standard Time" = {"-04", "-03"}, // America/Santiago
+ "E. South America Standard Time" = {"-03", "-03"}, // America/Sao_Paulo
+ "Newfoundland Standard Time" = {"NST", "NDT"}, // America/St_Johns
+ "Pacific Standard Time (Mexico)" = {"PST", "PDT"}, // America/Tijuana
+ "Yukon Standard Time" = {"MST", "MST"}, // America/Whitehorse
+ "Central Asia Standard Time" = {"+06", "+06"}, // Asia/Almaty
+ "Jordan Standard Time" = {"+03", "+03"}, // Asia/Amman
+ "Arabic Standard Time" = {"+03", "+03"}, // Asia/Baghdad
+ "Azerbaijan Standard Time" = {"+04", "+04"}, // Asia/Baku
+ "SE Asia Standard Time" = {"+07", "+07"}, // Asia/Bangkok
+ "Altai Standard Time" = {"+07", "+07"}, // Asia/Barnaul
+ "Middle East Standard Time" = {"EET", "EEST"}, // Asia/Beirut
+ "India Standard Time" = {"IST", "IST"}, // Asia/Calcutta
+ "Transbaikal Standard Time" = {"+09", "+09"}, // Asia/Chita
+ "Sri Lanka Standard Time" = {"+0530", "+0530"}, // Asia/Colombo
+ "Syria Standard Time" = {"+03", "+03"}, // Asia/Damascus
+ "Bangladesh Standard Time" = {"+06", "+06"}, // Asia/Dhaka
+ "Arabian Standard Time" = {"+04", "+04"}, // Asia/Dubai
+ "West Bank Standard Time" = {"EET", "EEST"}, // Asia/Hebron
+ "W. Mongolia Standard Time" = {"+07", "+07"}, // Asia/Hovd
+ "North Asia East Standard Time" = {"+08", "+08"}, // Asia/Irkutsk
+ "Israel Standard Time" = {"IST", "IDT"}, // Asia/Jerusalem
+ "Afghanistan Standard Time" = {"+0430", "+0430"}, // Asia/Kabul
+ "Russia Time Zone 11" = {"+12", "+12"}, // Asia/Kamchatka
+ "Pakistan Standard Time" = {"PKT", "PKT"}, // Asia/Karachi
+ "Nepal Standard Time" = {"+0545", "+0545"}, // Asia/Katmandu
+ "North Asia Standard Time" = {"+07", "+07"}, // Asia/Krasnoyarsk
+ "Magadan Standard Time" = {"+11", "+11"}, // Asia/Magadan
+ "N. Central Asia Standard Time" = {"+07", "+07"}, // Asia/Novosibirsk
+ "Omsk Standard Time" = {"+06", "+06"}, // Asia/Omsk
+ "North Korea Standard Time" = {"KST", "KST"}, // Asia/Pyongyang
+ "Qyzylorda Standard Time" = {"+05", "+05"}, // Asia/Qyzylorda
+ "Myanmar Standard Time" = {"+0630", "+0630"}, // Asia/Rangoon
+ "Arab Standard Time" = {"+03", "+03"}, // Asia/Riyadh
+ "Sakhalin Standard Time" = {"+11", "+11"}, // Asia/Sakhalin
+ "Korea Standard Time" = {"KST", "KST"}, // Asia/Seoul
+ "China Standard Time" = {"CST", "CST"}, // Asia/Shanghai
+ "Singapore Standard Time" = {"+08", "+08"}, // Asia/Singapore
+ "Russia Time Zone 10" = {"+11", "+11"}, // Asia/Srednekolymsk
+ "Taipei Standard Time" = {"CST", "CST"}, // Asia/Taipei
+ "West Asia Standard Time" = {"+05", "+05"}, // Asia/Tashkent
+ "Georgian Standard Time" = {"+04", "+04"}, // Asia/Tbilisi
+ "Iran Standard Time" = {"+0330", "+0330"}, // Asia/Tehran
+ "Tokyo Standard Time" = {"JST", "JST"}, // Asia/Tokyo
+ "Tomsk Standard Time" = {"+07", "+07"}, // Asia/Tomsk
+ "Ulaanbaatar Standard Time" = {"+08", "+08"}, // Asia/Ulaanbaatar
+ "Vladivostok Standard Time" = {"+10", "+10"}, // Asia/Vladivostok
+ "Yakutsk Standard Time" = {"+09", "+09"}, // Asia/Yakutsk
+ "Ekaterinburg Standard Time" = {"+05", "+05"}, // Asia/Yekaterinburg
+ "Caucasus Standard Time" = {"+04", "+04"}, // Asia/Yerevan
+ "Azores Standard Time" = {"-01", "+00"}, // Atlantic/Azores
+ "Cape Verde Standard Time" = {"-01", "-01"}, // Atlantic/Cape_Verde
+ "Greenwich Standard Time" = {"GMT", "GMT"}, // Atlantic/Reykjavik
+ "Cen. Australia Standard Time" = {"ACST", "ACDT"}, // Australia/Adelaide
+ "E. Australia Standard Time" = {"AEST", "AEST"}, // Australia/Brisbane
+ "AUS Central Standard Time" = {"ACST", "ACST"}, // Australia/Darwin
+ "Aus Central W. Standard Time" = {"+0845", "+0845"}, // Australia/Eucla
+ "Tasmania Standard Time" = {"AEST", "AEDT"}, // Australia/Hobart
+ "Lord Howe Standard Time" = {"+1030", "+11"}, // Australia/Lord_Howe
+ "W. Australia Standard Time" = {"AWST", "AWST"}, // Australia/Perth
+ "AUS Eastern Standard Time" = {"AEST", "AEDT"}, // Australia/Sydney
+ "UTC-11" = {"-11", "-11"}, // Etc/GMT+11
+ "Dateline Standard Time" = {"-12", "-12"}, // Etc/GMT+12
+ "UTC-02" = {"-02", "-02"}, // Etc/GMT+2
+ "UTC-08" = {"-08", "-08"}, // Etc/GMT+8
+ "UTC-09" = {"-09", "-09"}, // Etc/GMT+9
+ "UTC+12" = {"+12", "+12"}, // Etc/GMT-12
+ "UTC+13" = {"+13", "+13"}, // Etc/GMT-13
+ "UTC" = {"UTC", "UTC"}, // Etc/UTC
+ "Astrakhan Standard Time" = {"+04", "+04"}, // Europe/Astrakhan
+ "W. Europe Standard Time" = {"CET", "CEST"}, // Europe/Berlin
+ "GTB Standard Time" = {"EET", "EEST"}, // Europe/Bucharest
+ "Central Europe Standard Time" = {"CET", "CEST"}, // Europe/Budapest
+ "E. Europe Standard Time" = {"EET", "EEST"}, // Europe/Chisinau
+ "Turkey Standard Time" = {"+03", "+03"}, // Europe/Istanbul
+ "Kaliningrad Standard Time" = {"EET", "EET"}, // Europe/Kaliningrad
+ "FLE Standard Time" = {"EET", "EEST"}, // Europe/Kiev
+ "GMT Standard Time" = {"GMT", "BST"}, // Europe/London
+ "Belarus Standard Time" = {"+03", "+03"}, // Europe/Minsk
+ "Russian Standard Time" = {"MSK", "MSK"}, // Europe/Moscow
+ "Romance Standard Time" = {"CET", "CEST"}, // Europe/Paris
+ "Russia Time Zone 3" = {"+04", "+04"}, // Europe/Samara
+ "Saratov Standard Time" = {"+04", "+04"}, // Europe/Saratov
+ "Volgograd Standard Time" = {"MSK", "MSK"}, // Europe/Volgograd
+ "Central European Standard Time" = {"CET", "CEST"}, // Europe/Warsaw
+ "Mauritius Standard Time" = {"+04", "+04"}, // Indian/Mauritius
+ "Samoa Standard Time" = {"+13", "+13"}, // Pacific/Apia
+ "New Zealand Standard Time" = {"NZST", "NZDT"}, // Pacific/Auckland
+ "Bougainville Standard Time" = {"+11", "+11"}, // Pacific/Bougainville
+ "Chatham Islands Standard Time" = {"+1245", "+1345"}, // Pacific/Chatham
+ "Easter Island Standard Time" = {"-06", "-05"}, // Pacific/Easter
+ "Fiji Standard Time" = {"+12", "+12"}, // Pacific/Fiji
+ "Central Pacific Standard Time" = {"+11", "+11"}, // Pacific/Guadalcanal
+ "Hawaiian Standard Time" = {"HST", "HST"}, // Pacific/Honolulu
+ "Line Islands Standard Time" = {"+14", "+14"}, // Pacific/Kiritimati
+ "Marquesas Standard Time" = {"-0930", "-0930"}, // Pacific/Marquesas
+ "Norfolk Standard Time" = {"+11", "+12"}, // Pacific/Norfolk
+ "West Pacific Standard Time" = {"+10", "+10"}, // Pacific/Port_Moresby
+ "Tonga Standard Time" = {"+13", "+13"}, // Pacific/Tongatapu
+}
+
+iana_to_windows_tz :: proc(iana_name: string, allocator := context.allocator) -> (name: string, success: bool) {
+ wintz_name_buffer: [128]u16
+ status: windows.UError
+
+ iana_name_wstr := windows.utf8_to_wstring(iana_name, allocator)
+ defer free(iana_name_wstr, allocator)
+
+ wintz_name_len := windows.ucal_getWindowsTimeZoneID(iana_name_wstr, -1, raw_data(wintz_name_buffer[:]), len(wintz_name_buffer), &status)
+ if status != .U_ZERO_ERROR {
+ return
+ }
+
+ wintz_name, err := windows.utf16_to_utf8(wintz_name_buffer[:wintz_name_len], allocator)
+ if err != nil {
+ return
+ }
+
+ return wintz_name, true
+}
+
+local_tz_name :: proc(allocator := context.allocator) -> (name: string, success: bool) {
+ iana_name_buffer: [128]u16
+ status: windows.UError
+
+ zone_str_len := windows.ucal_getDefaultTimeZone(raw_data(iana_name_buffer[:]), len(iana_name_buffer), &status)
+ if status != .U_ZERO_ERROR {
+ return
+ }
+
+ iana_name, err := windows.utf16_to_utf8(iana_name_buffer[:zone_str_len], allocator)
+ if err != nil {
+ return
+ }
+
+ return iana_name, true
+}
+
+REG_TZI_FORMAT :: struct #packed {
+ bias: windows.LONG,
+ std_bias: windows.LONG,
+ dst_bias: windows.LONG,
+ std_date: windows.SYSTEMTIME,
+ dst_date: windows.SYSTEMTIME,
+}
+
+generate_rrule_from_tzi :: proc(tzi: ^REG_TZI_FORMAT, abbrevs: TZ_Abbrev, allocator := context.allocator) -> (rrule: datetime.TZ_RRule, ok: bool) {
+ std_name, err := strings.clone(abbrevs.std, allocator)
+ if err != nil { return }
+ defer if err != nil { delete(std_name, allocator) }
+
+ if (tzi.std_date.month == 0) {
+ return datetime.TZ_RRule{
+ has_dst = false,
+
+ std_name = std_name,
+ std_offset = -(i64(tzi.bias) + i64(tzi.std_bias)) * 60,
+ dst_date = datetime.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = u8(tzi.std_date.month),
+ week = u8(tzi.std_date.day),
+ day = tzi.std_date.day_of_week,
+ time = (i64(tzi.std_date.hour) * 60 * 60) + (i64(tzi.std_date.minute) * 60) + i64(tzi.std_date.second),
+ },
+ }, true
+ }
+
+ dst_name: string
+ dst_name, err = strings.clone(abbrevs.dst, allocator)
+ if err != nil { return }
+ defer if err != nil { delete(dst_name, allocator) }
+
+ return datetime.TZ_RRule{
+ has_dst = true,
+
+ std_name = std_name,
+ std_offset = -(i64(tzi.bias) + i64(tzi.std_bias)) * 60,
+ dst_date = datetime.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = u8(tzi.std_date.month),
+ week = u8(tzi.std_date.day),
+ day = tzi.std_date.day_of_week,
+ time = (i64(tzi.std_date.hour) * 60 * 60) + (i64(tzi.std_date.minute) * 60) + i64(tzi.std_date.second),
+ },
+
+ dst_name = dst_name,
+ dst_offset = -(i64(tzi.bias) + i64(tzi.dst_bias)) * 60,
+ std_date = datetime.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = u8(tzi.dst_date.month),
+ week = u8(tzi.dst_date.day),
+ day = tzi.dst_date.day_of_week,
+ time = (i64(tzi.dst_date.hour) * 60 * 60) + (i64(tzi.dst_date.minute) * 60) + i64(tzi.dst_date.second),
+ },
+ }, true
+}
+
+_region_load :: proc(reg_str: string, allocator := context.allocator) -> (out_reg: ^datetime.TZ_Region, success: bool) {
+ wintz_name: string
+ iana_name: string
+
+ if reg_str == "local" {
+ ok := false
+
+ iana_name = local_tz_name(allocator) or_return
+ wintz_name, ok = iana_to_windows_tz(iana_name, allocator)
+ if !ok {
+ delete(iana_name, allocator)
+ return
+ }
+ } else {
+ wintz_name = iana_to_windows_tz(reg_str, allocator) or_return
+ iana_name = strings.clone(reg_str, allocator)
+ }
+ defer delete(wintz_name, allocator)
+ defer delete(iana_name, allocator)
+
+ abbrevs := tz_abbrevs[wintz_name] or_return
+ if abbrevs.std == "UTC" && abbrevs.dst == abbrevs.std {
+ return nil, true
+ }
+
+ key_base := `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones`
+ tz_key := strings.join({key_base, wintz_name}, "\\", allocator = allocator)
+ defer delete(tz_key, allocator)
+
+ tz_key_wstr := windows.utf8_to_wstring(tz_key, allocator)
+ defer free(tz_key_wstr, allocator)
+
+ key: windows.HKEY
+ res := windows.RegOpenKeyExW(windows.HKEY_LOCAL_MACHINE, tz_key_wstr, 0, windows.KEY_READ, &key)
+ if res != 0 { return }
+ defer windows.RegCloseKey(key)
+
+ tzi: REG_TZI_FORMAT
+ size := u32(size_of(REG_TZI_FORMAT))
+
+ res = windows.RegGetValueW(key, nil, windows.L("TZI"), windows.RRF_RT_ANY, nil, &tzi, &size)
+ if res != 0 {
+ return
+ }
+
+ rrule := generate_rrule_from_tzi(&tzi, abbrevs, allocator) or_return
+
+ region_name, err := strings.clone(iana_name, allocator)
+ if err != nil { return }
+ defer if err != nil { delete(region_name, allocator) }
+
+ region: ^datetime.TZ_Region
+ region, err = new_clone(datetime.TZ_Region{
+ name = region_name,
+ rrule = rrule,
+ }, allocator)
+ if err != nil { return }
+
+ return region, true
+}
diff --git a/core/time/timezone/tzdate.odin b/core/time/timezone/tzdate.odin
new file mode 100644
index 000000000..96df44299
--- /dev/null
+++ b/core/time/timezone/tzdate.odin
@@ -0,0 +1,341 @@
+package timezone
+
+import "core:fmt"
+import "core:slice"
+import "core:time"
+import "core:time/datetime"
+
+region_load :: proc(reg: string, allocator := context.allocator) -> (out_reg: ^datetime.TZ_Region, ok: bool) {
+ return _region_load(reg, allocator)
+}
+
+region_load_from_file :: proc(file_path, reg: string, allocator := context.allocator) -> (out_reg: ^datetime.TZ_Region, ok: bool) {
+ return load_tzif_file(file_path, reg, allocator)
+}
+
+region_load_from_buffer :: proc(buffer: []u8, reg: string, allocator := context.allocator) -> (out_reg: ^datetime.TZ_Region, ok: bool) {
+ return parse_tzif(buffer, reg, allocator)
+}
+
+rrule_destroy :: proc(rrule: datetime.TZ_RRule, allocator := context.allocator) {
+ delete(rrule.std_name, allocator)
+ delete(rrule.dst_name, allocator)
+}
+
+region_destroy :: proc(region: ^datetime.TZ_Region, allocator := context.allocator) {
+ if region == nil {
+ return
+ }
+
+ for name in region.shortnames {
+ delete(name, allocator)
+ }
+ delete(region.shortnames, allocator)
+ delete(region.records, allocator)
+ delete(region.name, allocator)
+ rrule_destroy(region.rrule, allocator)
+ free(region, allocator)
+}
+
+
+@private
+region_get_nearest :: proc(region: ^datetime.TZ_Region, tm: time.Time) -> (out: datetime.TZ_Record, success: bool) {
+ if len(region.records) == 0 {
+ return process_rrule(region.rrule, tm)
+ }
+
+ n := len(region.records)
+ left, right := 0, n
+
+ tm_sec := time.to_unix_seconds(tm)
+ last_time := region.records[len(region.records)-1].time
+ if tm_sec > last_time {
+ return process_rrule(region.rrule, tm)
+ }
+
+ for left < right {
+ mid := int(uint(left+right) >> 1)
+ if region.records[mid].time < tm_sec {
+ left = mid + 1
+ } else {
+ right = mid
+ }
+ }
+
+ idx := max(0, left-1)
+ return region.records[idx], true
+}
+
+@private
+month_to_seconds :: proc(month: int, is_leap: bool) -> i64 {
+ month_seconds := []i64{
+ 0, 31 * 86_400, 59 * 86_400, 90 * 86_400,
+ 120 * 86_400, 151 * 86_400, 181 * 86_400, 212 * 86_400,
+ 243 * 86_400, 273 * 86_400, 304 * 86_400, 334 * 86_400,
+ }
+
+ t := month_seconds[month]
+ if is_leap && month >= 2 {
+ t += 86_400
+ }
+ return t
+}
+
+@private
+trans_date_to_seconds :: proc(year: i64, td: datetime.TZ_Transition_Date) -> (secs: i64, ok: bool) {
+ is_leap := datetime.is_leap_year(year)
+ DAY_SEC :: 86_400
+
+ year_start := datetime.DateTime{{year, 1, 1}, {0, 0, 0, 0}, nil}
+ year_start_time := time.datetime_to_time(year_start) or_return
+
+ t := i64(time.to_unix_seconds(year_start_time))
+
+ switch td.type {
+ case .Month_Week_Day:
+ if td.month < 1 { return }
+
+ t += month_to_seconds(int(td.month) - 1, is_leap)
+
+ weekday := ((t + (4 * DAY_SEC)) %% (7 * DAY_SEC)) / DAY_SEC
+ days := i64(td.day) - weekday
+ if days < 0 { days += 7 }
+
+ month_daycount, err := datetime.last_day_of_month(year, td.month)
+ if err != nil { return }
+
+ week := td.week
+ if week == 5 && days + 28 >= i64(month_daycount) {
+ week = 4
+ }
+
+ t += DAY_SEC * (days + (7 * i64(week - 1)))
+ t += td.time
+
+ return t, true
+
+ // Both of these should result in 0 -> 365 days (in seconds)
+ case .No_Leap:
+ day := i64(td.day)
+
+ // if before Feb 29th || not a leap year
+ if day < 60 || !is_leap {
+ day -= 1
+ }
+ t += DAY_SEC * day
+
+ return t, true
+
+ case .Leap:
+ t += DAY_SEC * i64(td.day)
+
+ return t, true
+
+ case:
+ return
+ }
+
+ return
+}
+
+@private
+process_rrule :: proc(rrule: datetime.TZ_RRule, tm: time.Time) -> (out: datetime.TZ_Record, success: bool) {
+ if !rrule.has_dst {
+ return datetime.TZ_Record{
+ time = time.to_unix_seconds(tm),
+ utc_offset = rrule.std_offset,
+ shortname = rrule.std_name,
+ dst = false,
+ }, true
+ }
+
+ y, _, _ := time.date(tm)
+ std_secs := trans_date_to_seconds(i64(y), rrule.std_date) or_return
+ dst_secs := trans_date_to_seconds(i64(y), rrule.dst_date) or_return
+
+ records := []datetime.TZ_Record{
+ {
+ time = std_secs,
+ utc_offset = rrule.std_offset,
+ shortname = rrule.std_name,
+ dst = false,
+ },
+ {
+ time = dst_secs,
+ utc_offset = rrule.dst_offset,
+ shortname = rrule.dst_name,
+ dst = true,
+ },
+ }
+ record_sort_proc :: proc(i, j: datetime.TZ_Record) -> bool {
+ return i.time > j.time
+ }
+ slice.sort_by(records, record_sort_proc)
+
+ tm_sec := time.to_unix_seconds(tm)
+ for record in records {
+ if tm_sec < record.time {
+ return record, true
+ }
+ }
+
+ return records[len(records)-1], true
+}
+
+datetime_to_utc :: proc(dt: datetime.DateTime) -> (out: datetime.DateTime, success: bool) #optional_ok {
+ if dt.tz == nil {
+ return dt, true
+ }
+
+ tm := time.datetime_to_time(dt) or_return
+ record := region_get_nearest(dt.tz, tm) or_return
+
+ secs := time.time_to_unix(tm)
+ adj_time := time.unix(secs - record.utc_offset, 0)
+ adj_dt := time.time_to_datetime(adj_time) or_return
+ return adj_dt, true
+}
+
+/*
+Converts a datetime on one timezone to another timezone
+
+Inputs:
+- dt: The input datetime
+- tz: The timezone to convert to
+
+NOTE: tz will be referenced in the result datetime, so it must stay alive/allocated as long as it is used
+Returns:
+- out: The converted datetime
+- success: `false` if the datetime was invalid
+*/
+datetime_to_tz :: proc(dt: datetime.DateTime, tz: ^datetime.TZ_Region) -> (out: datetime.DateTime, success: bool) #optional_ok {
+ dt := dt
+ if dt.tz == tz {
+ return dt, true
+ }
+ if dt.tz != nil {
+ dt = datetime_to_utc(dt)
+ }
+ if tz == nil {
+ return dt, true
+ }
+
+ tm := time.datetime_to_time(dt) or_return
+ record := region_get_nearest(tz, tm) or_return
+
+ secs := time.time_to_unix(tm)
+ adj_time := time.unix(secs + record.utc_offset, 0)
+ adj_dt := time.time_to_datetime(adj_time) or_return
+ adj_dt.tz = tz
+
+ return adj_dt, true
+}
+
+/*
+Gets the timezone abbreviation/shortname for a given date.
+(ex: "PDT")
+
+Inputs:
+- dt: The datetime containing the date, time, and timezone pointer for the lookup
+
+NOTE: The lifetime of name matches the timezone it was pulled from.
+Returns:
+- name: The timezone abbreviation
+- success: returns `false` if the passed datetime is invalid
+*/
+shortname :: proc(dt: datetime.DateTime) -> (name: string, success: bool) #optional_ok {
+ tm := time.datetime_to_time(dt) or_return
+ if dt.tz == nil { return "UTC", true }
+
+ record := region_get_nearest(dt.tz, tm) or_return
+ return record.shortname, true
+}
+
+/*
+Gets the timezone abbreviation/shortname for a given date.
+(ex: "PDT")
+
+WARNING: This is unsafe because it doesn't check if your datetime is valid or if your region contains a valid record.
+
+Inputs:
+- dt: The input datetime
+
+NOTE: The lifetime of name matches the timezone it was pulled from.
+Returns:
+- name: The timezone abbreviation
+*/
+shortname_unsafe :: proc(dt: datetime.DateTime) -> string {
+ if dt.tz == nil { return "UTC" }
+
+ tm, _ := time.datetime_to_time(dt)
+ record, _ := region_get_nearest(dt.tz, tm)
+ return record.shortname
+}
+
+/*
+Checks DST for a given date.
+
+Inputs:
+- dt: The input datetime
+
+Returns:
+- is_dst: returns `true` if dt is in daylight savings time, `false` if not
+- success: returns `false` if the passed datetime is invalid
+*/
+dst :: proc(dt: datetime.DateTime) -> (is_dst: bool, success: bool) #optional_ok {
+ tm := time.datetime_to_time(dt) or_return
+ if dt.tz == nil { return false, true }
+
+ record := region_get_nearest(dt.tz, tm) or_return
+ return record.dst, true
+}
+
+/*
+Checks DST for a given date.
+
+WARNING: This is unsafe because it doesn't check if your datetime is valid or if your region contains a valid record.
+
+Inputs:
+- dt: The input datetime
+
+Returns:
+- is_dst: returns `true` if dt is in daylight savings time, `false` if not
+*/
+dst_unsafe :: proc(dt: datetime.DateTime) -> bool {
+ if dt.tz == nil { return false }
+
+ tm, _ := time.datetime_to_time(dt)
+ record, _ := region_get_nearest(dt.tz, tm)
+ return record.dst
+}
+
+datetime_to_str :: proc(dt: datetime.DateTime, allocator := context.allocator) -> string {
+ if dt.tz == nil {
+ _, ok := time.datetime_to_time(dt)
+ if !ok {
+ return ""
+ }
+
+ return fmt.aprintf("%02d-%02d-%04d @ %02d:%02d:%02d UTC", dt.month, dt.day, dt.year, dt.hour, dt.minute, dt.second, allocator = allocator)
+
+ } else {
+ tm, ok := time.datetime_to_time(dt)
+ if !ok {
+ return ""
+ }
+
+ record, ok2 := region_get_nearest(dt.tz, tm)
+ if !ok2 {
+ return ""
+ }
+
+ hour := dt.hour
+ am_pm_str := "AM"
+ if hour > 12 {
+ am_pm_str = "PM"
+ hour -= 12
+ }
+
+ return fmt.aprintf("%02d-%02d-%04d @ %02d:%02d:%02d %s %s", dt.month, dt.day, dt.year, hour, dt.minute, dt.second, am_pm_str, record.shortname, allocator = allocator)
+ }
+}
diff --git a/core/time/timezone/tzif.odin b/core/time/timezone/tzif.odin
new file mode 100644
index 000000000..609cbda73
--- /dev/null
+++ b/core/time/timezone/tzif.odin
@@ -0,0 +1,652 @@
+package timezone
+
+import "base:intrinsics"
+
+import "core:slice"
+import "core:strings"
+import "core:os"
+import "core:strconv"
+import "core:time/datetime"
+
+// Implementing RFC8536 [https://datatracker.ietf.org/doc/html/rfc8536]
+
+TZIF_MAGIC :: u32be(0x545A6966) // 'TZif'
+TZif_Version :: enum u8 {
+ V1 = 0,
+ V2 = '2',
+ V3 = '3',
+ V4 = '4',
+}
+BIG_BANG_ISH :: -0x800000000000000
+
+TZif_Header :: struct #packed {
+ magic: u32be,
+ version: TZif_Version,
+ reserved: [15]u8,
+ isutcnt: u32be,
+ isstdcnt: u32be,
+ leapcnt: u32be,
+ timecnt: u32be,
+ typecnt: u32be,
+ charcnt: u32be,
+}
+
+Sun_Shift :: enum u8 {
+ Standard = 0,
+ DST = 1,
+}
+
+Local_Time_Type :: struct #packed {
+ utoff: i32be,
+ dst: Sun_Shift,
+ idx: u8,
+}
+
+Leapsecond_Record :: struct #packed {
+ occur: i64be,
+ corr: i32be,
+}
+
+@private
+tzif_data_block_size :: proc(hdr: ^TZif_Header, version: TZif_Version) -> (block_size: int, ok: bool) {
+ time_size : int
+
+ if version == .V1 {
+ time_size = 4
+ } else if version == .V2 || version == .V3 || version == .V4 {
+ time_size = 8
+ } else {
+ return
+ }
+
+ return (int(hdr.timecnt) * time_size) +
+ int(hdr.timecnt) +
+ int(hdr.typecnt * size_of(Local_Time_Type)) +
+ int(hdr.charcnt) +
+ (int(hdr.leapcnt) * (time_size + 4)) +
+ int(hdr.isstdcnt) +
+ int(hdr.isutcnt), true
+}
+
+
+load_tzif_file :: proc(filename: string, region_name: string, allocator := context.allocator) -> (out: ^datetime.TZ_Region, ok: bool) {
+ tzif_data := os.read_entire_file_from_filename(filename, allocator) or_return
+ defer delete(tzif_data, allocator)
+ return parse_tzif(tzif_data, region_name, allocator)
+}
+
+@private
+is_alphabetic :: proc(ch: u8) -> bool {
+ // ('A' -> 'Z') || ('a' -> 'z')
+ return (ch > 0x40 && ch < 0x5B) || (ch > 0x60 && ch < 0x7B)
+}
+
+@private
+is_numeric :: proc(ch: u8) -> bool {
+ // ('0' -> '9')
+ return (ch > 0x2F && ch < 0x3A)
+}
+
+@private
+is_alphanumeric :: proc(ch: u8) -> bool {
+ return is_alphabetic(ch) || is_numeric(ch)
+}
+
+@private
+is_valid_quoted_char :: proc(ch: u8) -> bool {
+ return is_alphabetic(ch) || is_numeric(ch) || ch == '+' || ch == '-'
+}
+
+@private
+parse_posix_tz_shortname :: proc(str: string) -> (out: string, idx: int, ok: bool) {
+ was_quoted := false
+ quoted := false
+ i := 0
+
+ for ; i < len(str); i += 1 {
+ ch := str[i]
+
+ if !quoted && ch == '<' {
+ quoted = true
+ was_quoted = true
+ continue
+ }
+
+ if quoted && ch == '>' {
+ quoted = false
+ break
+ }
+
+ if !is_valid_quoted_char(ch) && ch != ',' {
+ return
+ }
+
+ if !quoted && !is_alphabetic(ch) {
+ break
+ }
+ }
+
+ // If we didn't see the trailing quote
+ if was_quoted && quoted {
+ return
+ }
+
+ out_str: string
+ end_idx := i
+ if was_quoted {
+ end_idx += 1
+ out_str = str[1:i]
+ } else {
+ out_str = str[:i]
+ }
+
+ return out_str, end_idx, true
+}
+
+@private
+parse_posix_tz_offset :: proc(str: string) -> (out_sec: i64, idx: int, ok: bool) {
+ str := str
+
+ sign : i64 = 1
+ start_idx := 0
+ i := 0
+ if str[i] == '+' {
+ i += 1
+ sign = 1
+ start_idx = 1
+ } else if str[i] == '-' {
+ i += 1
+ sign = -1
+ start_idx = 1
+ }
+
+ got_more_time := false
+ for ; i < len(str); i += 1 {
+ if is_numeric(str[i]) {
+ continue
+ }
+
+ if str[i] == ':' {
+ got_more_time = true
+ break
+ }
+
+ break
+ }
+
+ ret_sec : i64 = 0
+ hours := strconv.parse_int(str[start_idx:i], 10) or_return
+ if hours > 167 || hours < -167 {
+ return
+ }
+ ret_sec += i64(hours) * (60 * 60)
+ if !got_more_time {
+ return ret_sec * sign, i, true
+ }
+
+ i += 1
+ start_idx = i
+
+ got_more_time = false
+ for ; i < len(str); i += 1 {
+ if is_numeric(str[i]) {
+ continue
+ }
+
+ if str[i] == ':' {
+ got_more_time = true
+ break
+ }
+
+ break
+ }
+
+ mins_str := str[start_idx:i]
+ if len(mins_str) != 2 {
+ return
+ }
+
+ mins := strconv.parse_int(mins_str, 10) or_return
+ if mins > 59 || mins < 0 {
+ return
+ }
+ ret_sec += i64(mins) * 60
+ if !got_more_time {
+ return ret_sec * sign, i, true
+ }
+
+ i += 1
+ start_idx = i
+
+ for ; i < len(str); i += 1 {
+ if !is_numeric(str[i]) {
+ break
+ }
+ }
+ secs_str := str[start_idx:i]
+ if len(secs_str) != 2 {
+ return
+ }
+
+ secs := strconv.parse_int(secs_str, 10) or_return
+ if secs > 59 || secs < 0 {
+ return
+ }
+ ret_sec += i64(secs)
+ return ret_sec * sign, i, true
+}
+
+@private
+skim_digits :: proc(str: string) -> (out: string, idx: int, ok: bool) {
+ i := 0
+ for ; i < len(str); i += 1 {
+ ch := str[i]
+ if ch == '.' || ch == '/' || ch == ',' {
+ break
+ }
+
+ if !is_numeric(ch) {
+ return
+ }
+ }
+
+ return str[:i], i, true
+}
+
+TWO_AM :: 2 * 60 * 60
+parse_posix_rrule :: proc(str: string) -> (out: datetime.TZ_Transition_Date, idx: int, ok: bool) {
+ str := str
+ if len(str) < 2 { return }
+
+ i := 0
+ // No leap
+ if str[i] == 'J' {
+ i += 1
+
+ day_str, off := skim_digits(str[i:]) or_return
+ i += off
+
+ day := strconv.parse_int(day_str, 10) or_return
+ if day < 1 || day > 365 { return }
+
+ offset : i64 = TWO_AM
+ if len(str) != i && str[i] == '/' {
+ i += 1
+
+ offset, off = parse_posix_tz_offset(str[i:]) or_return
+ i += off
+ }
+
+ if len(str) != i && str[i] == ',' {
+ i += 1
+ }
+
+ return datetime.TZ_Transition_Date{
+ type = .No_Leap,
+ day = u16(day),
+ time = offset,
+ }, i, true
+
+ // Leap
+ } else if is_numeric(str[i]) {
+ day_str, off := skim_digits(str[i:]) or_return
+ i += off
+
+ day := strconv.parse_int(day_str, 10) or_return
+ if day < 0 || day > 365 { return }
+
+ offset : i64 = TWO_AM
+ if len(str) != i && str[i] == '/' {
+ i += 1
+
+ offset, off = parse_posix_tz_offset(str[i:]) or_return
+ i += off
+ }
+
+ if len(str) != i && str[i] == ',' {
+ i += 1
+ }
+
+ return datetime.TZ_Transition_Date{
+ type = .Leap,
+ day = u16(day),
+ time = offset,
+ }, i, true
+
+ } else if str[i] == 'M' {
+ i += 1
+
+ month_str, week_str, day_str: string
+ off := 0
+
+ month_str, off = skim_digits(str[i:]) or_return
+ i += off + 1
+
+ week_str, off = skim_digits(str[i:]) or_return
+ i += off + 1
+
+ day_str, off = skim_digits(str[i:]) or_return
+ i += off
+
+ month := strconv.parse_int(month_str, 10) or_return
+ if month < 1 || month > 12 { return }
+
+ week := strconv.parse_int(week_str, 10) or_return
+ if week < 1 || week > 5 { return }
+
+ day := strconv.parse_int(day_str, 10) or_return
+ if day < 0 || day > 6 { return }
+
+ offset : i64 = TWO_AM
+ if len(str) != i && str[i] == '/' {
+ i += 1
+
+ offset, off = parse_posix_tz_offset(str[i:]) or_return
+ i += off
+ }
+
+ if len(str) != i && str[i] == ',' {
+ i += 1
+ }
+
+ return datetime.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = u8(month),
+ week = u8(week),
+ day = u16(day),
+ time = offset,
+ }, i, true
+ }
+
+ return
+}
+
+parse_posix_tz :: proc(posix_tz: string, allocator := context.allocator) -> (out: datetime.TZ_RRule, ok: bool) {
+ // TZ string contain at least 3 characters for the STD name, and 1 for the offset
+ if len(posix_tz) < 4 {
+ return
+ }
+
+ str := posix_tz
+
+ std_name, idx := parse_posix_tz_shortname(str) or_return
+ str = str[idx:]
+
+ std_offset, idx2 := parse_posix_tz_offset(str) or_return
+ std_offset *= -1
+ str = str[idx2:]
+
+ std_name_str, err := strings.clone(std_name, allocator)
+ if err != nil { return }
+ defer if !ok { delete(std_name_str, allocator) }
+
+ if len(str) == 0 {
+ return datetime.TZ_RRule{
+ has_dst = false,
+ std_name = std_name_str,
+ std_offset = std_offset,
+ std_date = datetime.TZ_Transition_Date{
+ type = .Leap,
+ day = 0,
+ time = TWO_AM,
+ },
+ }, true
+ }
+
+ dst_name: string
+ dst_offset := std_offset + (1 * 60 * 60)
+ if str[0] != ',' {
+ dst_name, idx = parse_posix_tz_shortname(str) or_return
+ str = str[idx:]
+
+ if str[0] != ',' {
+ dst_offset, idx = parse_posix_tz_offset(str) or_return
+ dst_offset *= -1
+ str = str[idx:]
+ }
+ }
+ if str[0] != ',' { return }
+ str = str[1:]
+
+ std_td, idx3 := parse_posix_rrule(str) or_return
+ str = str[idx3:]
+
+ dst_td, idx4 := parse_posix_rrule(str) or_return
+ str = str[idx4:]
+
+ dst_name_str: string
+ dst_name_str, err = strings.clone(dst_name, allocator)
+ if err != nil { return }
+
+ return datetime.TZ_RRule{
+ has_dst = true,
+
+ std_name = std_name_str,
+ std_offset = std_offset,
+ std_date = std_td,
+
+ dst_name = dst_name_str,
+ dst_offset = dst_offset,
+ dst_date = dst_td,
+ }, true
+}
+
+parse_tzif :: proc(_buffer: []u8, region_name: string, allocator := context.allocator) -> (out: ^datetime.TZ_Region, ok: bool) {
+ context.allocator = allocator
+
+ buffer := _buffer
+
+ // TZif is crufty. Skip the initial header.
+
+ v1_hdr := slice.to_type(buffer, TZif_Header) or_return
+ if v1_hdr.magic != TZIF_MAGIC {
+ return
+ }
+ if v1_hdr.typecnt == 0 || v1_hdr.charcnt == 0 {
+ return
+ }
+ if v1_hdr.isutcnt != 0 && v1_hdr.isutcnt != v1_hdr.typecnt {
+ return
+ }
+ if v1_hdr.isstdcnt != 0 && v1_hdr.isstdcnt != v1_hdr.typecnt {
+ return
+ }
+
+ // We don't bother supporting v1, it uses u32 timestamps
+ if v1_hdr.version == .V1 {
+ return
+ }
+ // We only support v2 and v3
+ if v1_hdr.version != .V2 && v1_hdr.version != .V3 {
+ return
+ }
+
+ // Skip the initial v1 block too.
+ first_block_size, _ := tzif_data_block_size(&v1_hdr, .V1)
+ if len(buffer) <= size_of(v1_hdr) + first_block_size {
+ return
+ }
+ buffer = buffer[size_of(v1_hdr)+first_block_size:]
+
+ // Ok, time to parse real things
+ real_hdr := slice.to_type(buffer, TZif_Header) or_return
+ if real_hdr.magic != TZIF_MAGIC {
+ return
+ }
+ if real_hdr.typecnt == 0 || real_hdr.charcnt == 0 {
+ return
+ }
+ if real_hdr.isutcnt != 0 && real_hdr.isutcnt != real_hdr.typecnt {
+ return
+ }
+ if real_hdr.isstdcnt != 0 && real_hdr.isstdcnt != real_hdr.typecnt {
+ return
+ }
+
+ // Grab the real data block
+ real_block_size, _ := tzif_data_block_size(&real_hdr, v1_hdr.version)
+ if len(buffer) <= size_of(real_hdr) + real_block_size {
+ return
+ }
+ buffer = buffer[size_of(real_hdr):]
+
+ time_size := 8
+ transition_times := slice.reinterpret([]i64be, buffer[:int(real_hdr.timecnt)*size_of(i64be)])
+ for time in transition_times {
+ if time < BIG_BANG_ISH {
+ return
+ }
+ }
+ buffer = buffer[int(real_hdr.timecnt)*time_size:]
+
+ transition_types := buffer[:int(real_hdr.timecnt)]
+ for type in transition_types {
+ if int(type) > int(real_hdr.typecnt - 1) {
+ return
+ }
+ }
+ buffer = buffer[int(real_hdr.timecnt):]
+
+ local_time_types := slice.reinterpret([]Local_Time_Type, buffer[:int(real_hdr.typecnt)*size_of(Local_Time_Type)])
+ for ltt in local_time_types {
+ // UT offset should be > -25 hours and < 26 hours
+ if int(ltt.utoff) < -89999 || int(ltt.utoff) > 93599 {
+ return
+ }
+
+ if ltt.dst != .DST && ltt.dst != .Standard {
+ return
+ }
+
+ if int(ltt.idx) > int(real_hdr.charcnt - 1) {
+ return
+ }
+ }
+
+ buffer = buffer[int(real_hdr.typecnt) * size_of(Local_Time_Type):]
+ timezone_string_table := buffer[:real_hdr.charcnt]
+ buffer = buffer[real_hdr.charcnt:]
+
+ leapsecond_records := slice.reinterpret([]Leapsecond_Record, buffer[:int(real_hdr.leapcnt)*size_of(Leapsecond_Record)])
+ if len(leapsecond_records) > 0 {
+ if leapsecond_records[0].occur < 0 {
+ return
+ }
+ }
+ buffer = buffer[(int(real_hdr.leapcnt) * size_of(Leapsecond_Record)):]
+
+ standard_wall_tags := buffer[:int(real_hdr.isstdcnt)]
+ buffer = buffer[int(real_hdr.isstdcnt):]
+
+ ut_tags := buffer[:int(real_hdr.isutcnt)]
+
+ for stdwall_tag, idx in standard_wall_tags {
+ ut_tag := ut_tags[idx]
+
+ if (stdwall_tag != 0 && stdwall_tag != 1) {
+ return
+ }
+ if (ut_tag != 0 && ut_tag != 1) {
+ return
+ }
+
+ if ut_tag == 1 && stdwall_tag != 1 {
+ return
+ }
+ }
+ buffer = buffer[int(real_hdr.isutcnt):]
+
+ // Start of footer
+ if buffer[0] != '\n' {
+ return
+ }
+ buffer = buffer[1:]
+
+ if buffer[0] == ':' {
+ return
+ }
+
+ end_idx := 0
+ for ch in buffer {
+ if ch == '\n' {
+ break
+ }
+
+ if ch == 0 {
+ return
+ }
+ end_idx += 1
+ }
+ footer_str := string(buffer[:end_idx])
+
+ // UTC is a special case, we don't need to alloc
+ if len(local_time_types) == 1 {
+ name := cstring(raw_data(timezone_string_table[local_time_types[0].idx:]))
+ if name != "UTC" {
+ return
+ }
+
+ return nil, true
+ }
+
+ ltt_names, err := make([dynamic]string, 0, len(local_time_types), allocator)
+ if err != nil { return }
+ defer if err != nil {
+ for name in ltt_names {
+ delete(name, allocator)
+ }
+ delete(ltt_names)
+ }
+
+ for ltt in local_time_types {
+ name := cstring(raw_data(timezone_string_table[ltt.idx:]))
+ ltt_name: string
+
+ ltt_name, err = strings.clone_from_cstring_bounded(name, len(timezone_string_table), allocator)
+ if err != nil { return }
+
+ append(&ltt_names, ltt_name)
+ }
+
+ records: []datetime.TZ_Record
+ records, err = make([]datetime.TZ_Record, len(transition_times), allocator)
+ if err != nil { return }
+ defer if err != nil { delete(records, allocator) }
+
+ for trans_time, idx in transition_times {
+ trans_idx := transition_types[idx]
+ ltt := local_time_types[trans_idx]
+
+ records[idx] = datetime.TZ_Record{
+ time = i64(trans_time),
+ utc_offset = i64(ltt.utoff),
+ shortname = ltt_names[trans_idx],
+ dst = bool(ltt.dst),
+ }
+ }
+
+ rrule, ok2 := parse_posix_tz(footer_str, allocator)
+ if !ok2 { return }
+ defer if err != nil {
+ delete(rrule.std_name, allocator)
+ delete(rrule.dst_name, allocator)
+ }
+
+ region_name_out: string
+ region_name_out, err = strings.clone(region_name, allocator)
+ if err != nil { return }
+ defer if err != nil { delete(region_name_out, allocator) }
+
+ region: ^datetime.TZ_Region
+ region, err = new_clone(datetime.TZ_Region{
+ records = records,
+ shortnames = ltt_names[:],
+ name = region_name_out,
+ rrule = rrule,
+ }, allocator)
+ if err != nil {
+ return
+ }
+
+ return region, true
+}
diff --git a/core/unicode/utf16/utf16.odin b/core/unicode/utf16/utf16.odin
index 6bdd6558a..e2bcf7f68 100644
--- a/core/unicode/utf16/utf16.odin
+++ b/core/unicode/utf16/utf16.odin
@@ -106,6 +106,18 @@ decode :: proc(d: []rune, s: []u16) -> (n: int) {
return
}
+rune_count :: proc(s: []u16) -> (n: int) {
+ for i := 0; i < len(s); i += 1 {
+ c := s[i]
+ if _surr1 <= c && c < _surr2 && i+1 < len(s) &&
+ _surr2 <= s[i+1] && s[i+1] < _surr3 {
+ i += 1
+ }
+ n += 1
+ }
+ return
+}
+
decode_to_utf8 :: proc(d: []byte, s: []u16) -> (n: int) {
for i := 0; i < len(s); i += 1 {
@@ -127,4 +139,4 @@ decode_to_utf8 :: proc(d: []byte, s: []u16) -> (n: int) {
n += copy(d[n:], b[:w])
}
return
-} \ No newline at end of file
+}
diff --git a/core/unicode/utf8/utf8string/string.odin b/core/unicode/utf8/utf8string/string.odin
index 431939efe..4b0fe7241 100644
--- a/core/unicode/utf8/utf8string/string.odin
+++ b/core/unicode/utf8/utf8string/string.odin
@@ -66,7 +66,7 @@ at :: proc(s: ^String, i: int, loc := #caller_location) -> (r: rune) {
return
case s.rune_count-1:
- r, s.width = utf8.decode_rune_in_string(s.contents)
+ r, s.width = utf8.decode_last_rune(s.contents)
s.rune_pos = i
s.byte_pos = _len(s.contents) - s.width
return
diff --git a/examples/README.md b/examples/README.md
index 27072a480..90076df23 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -2,8 +2,8 @@
The `example` directory contains two packages:
-A [demo](examples/demo) illustrating the basics of Odin.
+A [demo](demo) illustrating the basics of Odin.
-It further contains [all](examples/all), which imports all [core](core) and [vendor](vendor) packages so we can conveniently run `odin check` on everything at once.
+It further contains [all](all), which imports all [core](/core) and [vendor](/vendor) packages so we can conveniently run `odin check` on everything at once.
For additional example code, see the [examples](https://github.com/odin-lang/examples) repository.
diff --git a/examples/all/all_main.odin b/examples/all/all_main.odin
index 5bd45fda4..4a8a198d3 100644
--- a/examples/all/all_main.odin
+++ b/examples/all/all_main.odin
@@ -135,6 +135,7 @@ import table "core:text/table"
import thread "core:thread"
import time "core:time"
import datetime "core:time/datetime"
+import timezone "core:time/timezone"
import flags "core:flags"
import orca "core:sys/orca"
@@ -258,6 +259,7 @@ _ :: edit
_ :: thread
_ :: time
_ :: datetime
+_ :: timezone
_ :: flags
_ :: orca
_ :: sysinfo
diff --git a/examples/all/all_posix.odin b/examples/all/all_posix.odin
index 76fac0b87..61b33a5c6 100644
--- a/examples/all/all_posix.odin
+++ b/examples/all/all_posix.odin
@@ -1,6 +1,8 @@
#+build darwin, openbsd, freebsd, netbsd
package all
-import posix "core:sys/posix"
+import posix "core:sys/posix"
+import kqueue "core:sys/kqueue"
_ :: posix
+_ :: kqueue
diff --git a/examples/all/all_vendor.odin b/examples/all/all_vendor.odin
index 1ab1debea..b224a3bbe 100644
--- a/examples/all/all_vendor.odin
+++ b/examples/all/all_vendor.odin
@@ -63,11 +63,15 @@ _ :: xlib
// NOTE: needed for doc generator
import NS "core:sys/darwin/Foundation"
+import CF "core:sys/darwin/CoreFoundation"
+import SEC "core:sys/darwin/Security"
import MTL "vendor:darwin/Metal"
import MTK "vendor:darwin/MetalKit"
import CA "vendor:darwin/QuartzCore"
_ :: NS
+_ :: CF
+_ :: SEC
_ :: MTL
_ :: MTK
_ :: CA
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin
index 4b761f0e2..36d1359ca 100644
--- a/examples/demo/demo.odin
+++ b/examples/demo/demo.odin
@@ -853,7 +853,7 @@ implicit_context_system :: proc() {
what_a_fool_believes :: proc() {
c := context // this `context` is the same as the parent procedure that it was called from
// From this example, context.user_index == 123
- // An context.allocator is assigned to the return value of `my_custom_allocator()`
+ // A context.allocator is assigned to the return value of `my_custom_allocator()`
assert(context.user_index == 123)
// The memory management procedure use the `context.allocator` by
@@ -906,7 +906,7 @@ parametric_polymorphism :: proc() {
// This is how `new` is implemented
alloc_type :: proc($T: typeid) -> ^T {
- t := cast(^T)alloc(size_of(T), align_of(T))
+ t := cast(^T)mem.alloc(size_of(T), align_of(T))
t^ = T{} // Use default initialization value
return t
}
@@ -2052,22 +2052,6 @@ explicit_context_definition :: proc "c" () {
dummy_procedure()
}
-relative_data_types :: proc() {
- fmt.println("\n#relative data types")
-
- x: int = 123
- ptr: #relative(i16) ^int
- ptr = &x
- fmt.println(ptr^)
-
- arr := [3]int{1, 2, 3}
- multi_ptr: #relative(i16) [^]int
- multi_ptr = &arr[0]
- fmt.println(multi_ptr)
- fmt.println(multi_ptr[:3])
- fmt.println(multi_ptr[1])
-}
-
or_else_operator :: proc() {
fmt.println("\n#'or_else'")
{
@@ -2151,7 +2135,7 @@ or_return_operator :: proc() {
return .None
}
foo_2 :: proc() -> (n: int, err: Error) {
- // It is more common that your procedure turns multiple values
+ // It is more common that your procedure returns multiple values
// If 'or_return' is used within a procedure multiple parameters (2+),
// then all the parameters must be named so that the remaining parameters
// so that a bare 'return' statement can be used
@@ -2634,7 +2618,6 @@ main :: proc() {
constant_literal_expressions()
union_maybe()
explicit_context_definition()
- relative_data_types()
or_else_operator()
or_return_operator()
or_break_and_or_continue_operators()
diff --git a/examples/demo/demo.rc b/examples/demo/demo.rc
new file mode 100644
index 000000000..ef3ec2fec
--- /dev/null
+++ b/examples/demo/demo.rc
@@ -0,0 +1,75 @@
+
+#define Filename "demo.exe"
+#define FileDescription "Odin demo project."
+#define ProductName "Odin Programming Language Demo"
+
+#include "winres.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+#pragma code_page(65001)
+
+#define IDI_ICON1 101
+
+#define Q(x) #x
+#define QUOTE(x) Q(x)
+#define FMTVER(x,y,z,w) QUOTE(x.y.z.w)
+
+#ifndef V1
+#define V1 1
+#endif
+#ifndef V2
+#define V2 0
+#endif
+#ifndef V3
+#define V3 0
+#endif
+#ifndef V4
+#define V4 0
+#endif
+#ifndef ODIN_VERSION
+#define ODIN_VERSION FMTVER(V1,V2,V3,V4)
+#endif
+#ifndef GIT_SHA
+#define GIT_SHA _
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION V1,V2,V3,V4
+ PRODUCTVERSION V1,V2,V3,V4
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "0409FDE9"
+ BEGIN
+ VALUE "CompanyName", "https://odin-lang.org/"
+ VALUE "FileDescription", "Odin Demo"
+ VALUE "FileVersion", FMTVER(V1,V2,V3,V4)
+ VALUE "InternalName", "demo.exe"
+ VALUE "LegalCopyright", "Copyright (c) 2016-2024 Ginger Bill. All rights reserved."
+ VALUE "OriginalFilename", "demo.exe"
+ VALUE "ProductName", "Odin Programming Language Demo"
+ VALUE "ProductVersion", QUOTE(ODIN_VERSION)
+ VALUE "Comments", QUOTE(ODIN_VERSION)
+ // PrivateBuild
+ // SpecialBuild
+ // custom values
+ VALUE "GitSha", QUOTE(GIT_SHA)
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ //0xFDE9=65001=CP_UTF8
+ VALUE "Translation", 0x0409, 0xFDE9
+ END
+END
+
+IDI_ICON1 ICON "..\\..\\misc\\sourcefile.ico"
diff --git a/misc/emblem.ico b/misc/emblem.ico
new file mode 100644
index 000000000..f5644b417
--- /dev/null
+++ b/misc/emblem.ico
Binary files differ
diff --git a/misc/odin.manifest b/misc/odin.manifest
new file mode 100644
index 000000000..d42403b22
--- /dev/null
+++ b/misc/odin.manifest
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v3' manifestVersion='1.0'>
+ <application>
+ <windowsSettings xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">
+ <activeCodePage>UTF-8</activeCodePage>
+ </windowsSettings>
+ </application>
+</assembly>
diff --git a/misc/odin.rc b/misc/odin.rc
new file mode 100644
index 000000000..9e605f6dc
--- /dev/null
+++ b/misc/odin.rc
@@ -0,0 +1,79 @@
+
+#include "winres.h"
+
+// https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+#pragma code_page(65001) // CP_UTF8
+
+#define IDI_ICON1 101
+#define IDI_ICON2 102
+
+#ifndef V1
+#define V1 1
+#endif
+#ifndef V2
+#define V2 0
+#endif
+#ifndef V3
+#define V3 0
+#endif
+#ifndef V4
+#define V4 0
+#endif
+#ifndef VF
+#define VF "1.0.0.0"
+#endif
+#ifndef VP
+#define VP "1.0.0.0"
+#endif
+#ifndef GIT_SHA
+#define GIT_SHA 0
+#endif
+#ifndef NIGHTLY
+#define NIGHTLY 0
+#endif
+
+#define Q(x) #x
+#define QUOTE(x) Q(x)
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION V1,V2,V3,V4
+ PRODUCTVERSION V1,V2,V3,V4
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "0409FDE9"
+ BEGIN
+ VALUE "CompanyName", "https://odin-lang.org/"
+ VALUE "FileDescription", "Odin general-purpose programming language." // note this is shown in the task manager
+ VALUE "FileVersion", QUOTE(VF)
+ VALUE "InternalName", "odin.exe"
+ VALUE "LegalCopyright", "Copyright (c) 2016-2024 Ginger Bill. All rights reserved."
+ VALUE "OriginalFilename", "odin.exe"
+ VALUE "ProductName", "The Odin Programming Language"
+ VALUE "ProductVersion", QUOTE(VP)
+ VALUE "Comments", QUOTE(git-sha: GIT_SHA)
+ // custom values
+ VALUE "GitSha", QUOTE(GIT_SHA)
+ VALUE "NightlyBuild", QUOTE(NIGHTLY)
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ //0xFDE9=65001=CP_UTF8
+ VALUE "Translation", 0x0409, 0xFDE9
+ END
+END
+
+IDI_ICON1 ICON "emblem.ico"
+IDI_ICON2 ICON "sourcefile.ico"
diff --git a/misc/sourcefile.ico b/misc/sourcefile.ico
new file mode 100644
index 000000000..5f3772633
--- /dev/null
+++ b/misc/sourcefile.ico
Binary files differ
diff --git a/odin.rdi b/odin.rdi
new file mode 100644
index 000000000..851ee3578
--- /dev/null
+++ b/odin.rdi
Binary files differ
diff --git a/src/big_int.cpp b/src/big_int.cpp
index 83235483c..8e476f090 100644
--- a/src/big_int.cpp
+++ b/src/big_int.cpp
@@ -62,6 +62,7 @@ gb_internal void big_int_shl (BigInt *dst, BigInt const *x, BigInt const *y);
gb_internal void big_int_shr (BigInt *dst, BigInt const *x, BigInt const *y);
gb_internal void big_int_mul (BigInt *dst, BigInt const *x, BigInt const *y);
gb_internal void big_int_mul_u64(BigInt *dst, BigInt const *x, u64 y);
+gb_internal void big_int_exp_u64(BigInt *dst, BigInt const *x, u64 y, bool *success);
gb_internal void big_int_quo_rem(BigInt const *x, BigInt const *y, BigInt *q, BigInt *r);
gb_internal void big_int_quo (BigInt *z, BigInt const *x, BigInt const *y);
@@ -250,9 +251,7 @@ gb_internal void big_int_from_string(BigInt *dst, String const &s, bool *success
exp *= 10;
exp += v;
}
- for (u64 x = 0; x < exp; x++) {
- big_int_mul_eq(dst, &b);
- }
+ big_int_exp_u64(dst, &b, exp, success);
}
if (is_negative) {
@@ -328,6 +327,18 @@ gb_internal void big_int_mul_u64(BigInt *dst, BigInt const *x, u64 y) {
big_int_dealloc(&d);
}
+gb_internal void big_int_exp_u64(BigInt *dst, BigInt const *x, u64 y, bool *success) {
+ if (y > INT_MAX) {
+ *success = false;
+ return;
+ }
+
+ // Note: The cutoff for square-multiply being faster than the naive
+ // for loop is when exp > 4, but it probably isn't worth adding
+ // a fast path.
+ mp_err err = mp_expt_n(x, int(y), dst);
+ *success = err == MP_OKAY;
+}
gb_internal void big_int_mul(BigInt *dst, BigInt const *x, BigInt const *y) {
mp_mul(x, y, dst);
diff --git a/src/bug_report.cpp b/src/bug_report.cpp
index fa7e156ce..d4517f9e3 100644
--- a/src/bug_report.cpp
+++ b/src/bug_report.cpp
@@ -2,12 +2,6 @@
Gather and print platform and version info to help with reporting Odin bugs.
*/
-#if !defined(GB_COMPILER_MSVC)
- #if defined(GB_CPU_X86)
- #include <cpuid.h>
- #endif
-#endif
-
#if defined(GB_SYSTEM_LINUX)
#include <sys/utsname.h>
#include <sys/sysinfo.h>
@@ -154,21 +148,6 @@ gb_internal void report_windows_product_type(DWORD ProductType) {
}
#endif
-gb_internal void odin_cpuid(int leaf, int result[]) {
- #if defined(GB_CPU_ARM) || defined(GB_CPU_RISCV)
- return;
-
- #elif defined(GB_CPU_X86)
-
- #if defined(GB_COMPILER_MSVC)
- __cpuid(result, leaf);
- #else
- __get_cpuid(leaf, (unsigned int*)&result[0], (unsigned int*)&result[1], (unsigned int*)&result[2], (unsigned int*)&result[3]);
- #endif
-
- #endif
-}
-
gb_internal void report_cpu_info() {
gb_printf("\tCPU: ");
@@ -887,6 +866,10 @@ gb_internal void report_os_info() {
{"21G816", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 0}}},
{"21G920", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 1}}},
{"21G1974", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 2}}},
+ {"21H1015", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 3}}},
+ {"21H1123", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 4}}},
+ {"21H1222", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 5}}},
+ {"21H1320", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 6}}},
{"22A380", {13, 0, 0}, "macOS", {"Ventura", {22, 1, 0}}},
{"22A400", {13, 0, 1}, "macOS", {"Ventura", {22, 1, 0}}},
{"22C65", {13, 1, 0}, "macOS", {"Ventura", {22, 2, 0}}},
@@ -904,6 +887,15 @@ gb_internal void report_os_info() {
{"22G120", {13, 6, 0}, "macOS", {"Ventura", {22, 6, 0}}},
{"22G313", {13, 6, 1}, "macOS", {"Ventura", {22, 6, 0}}},
{"22G320", {13, 6, 2}, "macOS", {"Ventura", {22, 6, 0}}},
+ {"22G436", {22, 6, 0}, "macOS", {"Ventura", {13, 6, 3}}},
+ {"22G513", {22, 6, 0}, "macOS", {"Ventura", {13, 6, 4}}},
+ {"22G621", {22, 6, 0}, "macOS", {"Ventura", {13, 6, 5}}},
+ {"22G630", {22, 6, 0}, "macOS", {"Ventura", {13, 6, 6}}},
+ {"22G720", {22, 6, 0}, "macOS", {"Ventura", {13, 6, 7}}},
+ {"22G820", {22, 6, 0}, "macOS", {"Ventura", {13, 6, 8}}},
+ {"22G830", {22, 6, 0}, "macOS", {"Ventura", {13, 6, 9}}},
+ {"22H123", {22, 6, 0}, "macOS", {"Ventura", {13, 7, 0}}},
+ {"22H221", {22, 6, 0}, "macOS", {"Ventura", {13, 7, 1}}},
{"23A344", {23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}},
{"23B74", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 0}}},
{"23B81", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 1}}},
@@ -920,7 +912,10 @@ gb_internal void report_os_info() {
{"23G80", {23, 6, 0}, "macOS", {"Sonoma", {14, 6, 0}}},
{"23G93", {23, 6, 0}, "macOS", {"Sonoma", {14, 6, 1}}},
{"23H124", {23, 6, 0}, "macOS", {"Sonoma", {14, 7, 0}}},
+ {"23H222", {23, 6, 0}, "macOS", {"Sonoma", {14, 7, 1}}},
{"24A335", {24, 0, 0}, "macOS", {"Sequoia", {15, 0, 0}}},
+ {"24A348", {24, 0, 0}, "macOS", {"Sequoia", {15, 0, 1}}},
+ {"24B83", {24, 1, 0}, "macOS", {"Sequoia", {15, 1, 0}}},
};
diff --git a/src/build_cpuid.cpp b/src/build_cpuid.cpp
new file mode 100644
index 000000000..b7ba5dcdf
--- /dev/null
+++ b/src/build_cpuid.cpp
@@ -0,0 +1,35 @@
+#if !defined(GB_COMPILER_MSVC)
+ #if defined(GB_CPU_X86)
+ #include <cpuid.h>
+ #endif
+#endif
+
+gb_internal void odin_cpuid(int leaf, int result[]) {
+ #if defined(GB_CPU_ARM) || defined(GB_CPU_RISCV)
+ return;
+
+ #elif defined(GB_CPU_X86)
+
+ #if defined(GB_COMPILER_MSVC)
+ __cpuid(result, leaf);
+ #else
+ __get_cpuid(leaf, (unsigned int*)&result[0], (unsigned int*)&result[1], (unsigned int*)&result[2], (unsigned int*)&result[3]);
+ #endif
+
+ #endif
+}
+
+gb_internal bool should_use_march_native() {
+ #if !defined(GB_CPU_X86)
+ return false;
+
+ #else
+
+ int cpu[4];
+ odin_cpuid(0x1, &cpu[0]); // Get feature information in ECX + EDX
+
+ bool have_popcnt = cpu[2] & (1 << 23); // bit 23 in ECX = popcnt
+ return !have_popcnt;
+
+ #endif
+} \ No newline at end of file
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index 7aff8e650..50fae93b8 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -2,6 +2,7 @@
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
+#include "build_cpuid.cpp"
// #if defined(GB_SYSTEM_WINDOWS)
// #define DEFAULT_TO_THREADED_CHECKER
@@ -343,6 +344,22 @@ struct BuildCacheData {
bool copy_already_done;
};
+
+enum LinkerChoice : i32 {
+ Linker_Invalid = -1,
+ Linker_Default = 0,
+ Linker_lld,
+ Linker_radlink,
+
+ Linker_COUNT,
+};
+
+String linker_choices[Linker_COUNT] = {
+ str_lit("default"),
+ str_lit("lld"),
+ str_lit("radlink"),
+};
+
// This stores the information for the specify architecture of this build
struct BuildContext {
// Constants
@@ -418,12 +435,13 @@ struct BuildContext {
bool no_rpath;
bool no_entry_point;
bool no_thread_local;
- bool use_lld;
bool cross_compiling;
bool different_os;
bool keep_object_files;
bool disallow_do;
+ LinkerChoice linker_choice;
+
StringSet custom_attributes;
bool strict_style;
@@ -453,7 +471,7 @@ struct BuildContext {
bool no_threaded_checker;
bool show_debug_messages;
-
+
bool copy_file_contents;
bool no_rtti;
@@ -1870,7 +1888,7 @@ gb_internal bool init_build_paths(String init_filename) {
return false;
}
- if (!build_context.use_lld && find_result.vs_exe_path.len == 0) {
+ if (build_context.linker_choice == Linker_Default && find_result.vs_exe_path.len == 0) {
gb_printf_err("link.exe not found.\n");
return false;
}
@@ -2049,19 +2067,19 @@ gb_internal bool init_build_paths(String init_filename) {
return false;
}
- gbFile output_file_test;
- const char* output_file_name = (const char*)output_file.text;
- gbFileError output_test_err = gb_file_open_mode(&output_file_test, gbFileMode_Append | gbFileMode_Rw, output_file_name);
+ // gbFile output_file_test;
+ // const char* output_file_name = (const char*)output_file.text;
+ // gbFileError output_test_err = gb_file_open_mode(&output_file_test, gbFileMode_Append | gbFileMode_Rw, output_file_name);
- if (output_test_err == 0) {
- gb_file_close(&output_file_test);
- gb_file_remove(output_file_name);
- } else {
- String output_file = path_to_string(ha, bc->build_paths[BuildPath_Output]);
- defer (gb_free(ha, output_file.text));
- gb_printf_err("No write permissions for output path: %.*s\n", LIT(output_file));
- return false;
- }
+ // if (output_test_err == 0) {
+ // gb_file_close(&output_file_test);
+ // gb_file_remove(output_file_name);
+ // } else {
+ // String output_file = path_to_string(ha, bc->build_paths[BuildPath_Output]);
+ // defer (gb_free(ha, output_file.text));
+ // gb_printf_err("No write permissions for output path: %.*s\n", LIT(output_file));
+ // return false;
+ // }
if (build_context.sanitizer_flags & SanitizerFlag_Address) {
switch (build_context.metrics.os) {
diff --git a/src/cached.cpp b/src/cached.cpp
index 4ad65ee9e..efdadce7b 100644
--- a/src/cached.cpp
+++ b/src/cached.cpp
@@ -187,10 +187,7 @@ gb_internal bool try_copy_executable_from_cache(void) {
extern char **environ;
#endif
-// returns false if different, true if it is the same
-gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
- TEMPORARY_ALLOCATOR_GUARD();
-
+Array<String> cache_gather_files(Checker *c) {
Parser *p = c->parser;
auto files = array_make<String>(heap_allocator());
@@ -222,29 +219,11 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
array_sort(files, string_cmp);
- u64 crc = 0;
- for (String const &path : files) {
- crc = crc64_with_seed(path.text, path.len, crc);
- }
-
- String base_cache_dir = build_context.build_paths[BuildPath_Output].basename;
- base_cache_dir = concatenate_strings(permanent_allocator(), base_cache_dir, str_lit("/.odin-cache"));
- (void)check_if_exists_directory_otherwise_create(base_cache_dir);
-
- gbString crc_str = gb_string_make_reserve(permanent_allocator(), 16);
- crc_str = gb_string_append_fmt(crc_str, "%016llx", crc);
- String cache_dir = concatenate3_strings(permanent_allocator(), base_cache_dir, str_lit("/"), make_string_c(crc_str));
- String files_path = concatenate3_strings(permanent_allocator(), cache_dir, str_lit("/"), str_lit("files.manifest"));
- String args_path = concatenate3_strings(permanent_allocator(), cache_dir, str_lit("/"), str_lit("args.manifest"));
- String env_path = concatenate3_strings(permanent_allocator(), cache_dir, str_lit("/"), str_lit("env.manifest"));
-
- build_context.build_cache_data.cache_dir = cache_dir;
- build_context.build_cache_data.files_path = files_path;
- build_context.build_cache_data.args_path = args_path;
- build_context.build_cache_data.env_path = env_path;
+ return files;
+}
+Array<String> cache_gather_envs() {
auto envs = array_make<String>(heap_allocator());
- defer (array_free(&envs));
{
#if defined(GB_SYSTEM_WINDOWS)
wchar_t *strings = GetEnvironmentStringsW();
@@ -275,19 +254,50 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
#endif
}
array_sort(envs, string_cmp);
+ return envs;
+}
+
+// returns false if different, true if it is the same
+gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
+ TEMPORARY_ALLOCATOR_GUARD();
+
+ auto files = cache_gather_files(c);
+ auto envs = cache_gather_envs();
+ defer (array_free(&envs));
+
+ u64 crc = 0;
+ for (String const &path : files) {
+ crc = crc64_with_seed(path.text, path.len, crc);
+ }
+
+ String base_cache_dir = build_context.build_paths[BuildPath_Output].basename;
+ base_cache_dir = concatenate_strings(permanent_allocator(), base_cache_dir, str_lit("/.odin-cache"));
+ (void)check_if_exists_directory_otherwise_create(base_cache_dir);
+
+ gbString crc_str = gb_string_make_reserve(permanent_allocator(), 16);
+ crc_str = gb_string_append_fmt(crc_str, "%016llx", crc);
+ String cache_dir = concatenate3_strings(permanent_allocator(), base_cache_dir, str_lit("/"), make_string_c(crc_str));
+ String files_path = concatenate3_strings(permanent_allocator(), cache_dir, str_lit("/"), str_lit("files.manifest"));
+ String args_path = concatenate3_strings(permanent_allocator(), cache_dir, str_lit("/"), str_lit("args.manifest"));
+ String env_path = concatenate3_strings(permanent_allocator(), cache_dir, str_lit("/"), str_lit("env.manifest"));
+
+ build_context.build_cache_data.cache_dir = cache_dir;
+ build_context.build_cache_data.files_path = files_path;
+ build_context.build_cache_data.args_path = args_path;
+ build_context.build_cache_data.env_path = env_path;
if (check_if_exists_directory_otherwise_create(cache_dir)) {
- goto write_cache;
+ return false;
}
if (check_if_exists_file_otherwise_create(files_path)) {
- goto write_cache;
+ return false;
}
if (check_if_exists_file_otherwise_create(args_path)) {
- goto write_cache;
+ return false;
}
if (check_if_exists_file_otherwise_create(env_path)) {
- goto write_cache;
+ return false;
}
{
@@ -297,7 +307,7 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
LoadedFileError file_err = load_file_32(
alloc_cstring(temporary_allocator(), files_path),
&loaded_file,
- false
+ true
);
if (file_err > LoadedFile_Empty) {
return false;
@@ -315,7 +325,7 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
}
isize sep = string_index_byte(line, ' ');
if (sep < 0) {
- goto write_cache;
+ return false;
}
String timestamp_str = substring(line, 0, sep);
@@ -325,21 +335,21 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
path_str = string_trim_whitespace(path_str);
if (file_count >= files.count) {
- goto write_cache;
+ return false;
}
if (files[file_count] != path_str) {
- goto write_cache;
+ return false;
}
u64 timestamp = exact_value_to_u64(exact_value_integer_from_string(timestamp_str));
gbFileTime last_write_time = gb_file_last_write_time(alloc_cstring(temporary_allocator(), path_str));
if (last_write_time != timestamp) {
- goto write_cache;
+ return false;
}
}
if (file_count != files.count) {
- goto write_cache;
+ return false;
}
}
{
@@ -348,7 +358,7 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
LoadedFileError file_err = load_file_32(
alloc_cstring(temporary_allocator(), args_path),
&loaded_file,
- false
+ true
);
if (file_err > LoadedFile_Empty) {
return false;
@@ -366,11 +376,11 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
break;
}
if (args_count >= args.count) {
- goto write_cache;
+ return false;
}
if (line != args[args_count]) {
- goto write_cache;
+ return false;
}
}
}
@@ -380,7 +390,7 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
LoadedFileError file_err = load_file_32(
alloc_cstring(temporary_allocator(), env_path),
&loaded_file,
- false
+ true
);
if (file_err > LoadedFile_Empty) {
return false;
@@ -398,20 +408,26 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
break;
}
if (env_count >= envs.count) {
- goto write_cache;
+ return false;
}
if (line != envs[env_count]) {
- goto write_cache;
+ return false;
}
}
}
return try_copy_executable_from_cache();
+}
+
+void write_cached_build(Checker *c, Array<String> const &args) {
+ auto files = cache_gather_files(c);
+ defer (array_free(&files));
+ auto envs = cache_gather_envs();
+ defer (array_free(&envs));
-write_cache:;
{
- char const *path_c = alloc_cstring(temporary_allocator(), files_path);
+ char const *path_c = alloc_cstring(temporary_allocator(), build_context.build_cache_data.files_path);
gb_file_remove(path_c);
debugf("Cache: updating %s\n", path_c);
@@ -426,7 +442,7 @@ write_cache:;
}
}
{
- char const *path_c = alloc_cstring(temporary_allocator(), args_path);
+ char const *path_c = alloc_cstring(temporary_allocator(), build_context.build_cache_data.args_path);
gb_file_remove(path_c);
debugf("Cache: updating %s\n", path_c);
@@ -441,7 +457,7 @@ write_cache:;
}
}
{
- char const *path_c = alloc_cstring(temporary_allocator(), env_path);
+ char const *path_c = alloc_cstring(temporary_allocator(), build_context.build_cache_data.env_path);
gb_file_remove(path_c);
debugf("Cache: updating %s\n", path_c);
@@ -454,8 +470,5 @@ write_cache:;
gb_fprintf(&f, "%.*s\n", LIT(env));
}
}
-
-
- return false;
}
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index 8c051cca2..c86503093 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -1533,6 +1533,10 @@ gb_internal LoadDirectiveResult check_load_directory_directive(CheckerContext *c
for (FileInfo fi : list) {
LoadFileCache *cache = nullptr;
+ if (fi.is_dir) {
+ continue;
+ }
+
if (cache_load_file_directive(c, call, fi.fullpath, err_on_not_found, &cache, LoadFileTier_Contents, /*use_mutex*/false)) {
array_add(&file_caches, cache);
} else {
@@ -2060,8 +2064,8 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
bool ok = check_builtin_simd_operation(c, operand, call, id, type_hint);
if (!ok) {
operand->type = t_invalid;
+ operand->mode = Addressing_Value;
}
- operand->mode = Addressing_Value;
operand->value = {};
operand->expr = call;
return ok;
@@ -3098,7 +3102,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
// Okay
} else if (!is_type_ordered(type) || !(is_type_numeric(type) || is_type_string(type))) {
gbString type_str = type_to_string(original_type);
- error(call, "Expected a ordered numeric type to 'min', got '%s'", type_str);
+ error(call, "Expected an ordered numeric type to 'min', got '%s'", type_str);
gb_string_free(type_str);
return false;
}
@@ -3166,6 +3170,10 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
return false;
}
+ if (ce->args.count <= 1) {
+ error(call, "Too few arguments for 'min', two or more are required");
+ return false;
+ }
bool all_constant = operand->mode == Addressing_Constant;
@@ -3184,7 +3192,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
if (!is_type_ordered(b.type) || !(is_type_numeric(b.type) || is_type_string(b.type))) {
gbString type_str = type_to_string(b.type);
error(call,
- "Expected a ordered numeric type to 'min', got '%s'",
+ "Expected an ordered numeric type to 'min', got '%s'",
type_str);
gb_string_free(type_str);
return false;
@@ -3267,7 +3275,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
// Okay
} else if (!is_type_ordered(type) || !(is_type_numeric(type) || is_type_string(type))) {
gbString type_str = type_to_string(original_type);
- error(call, "Expected a ordered numeric type to 'max', got '%s'", type_str);
+ error(call, "Expected an ordered numeric type to 'max', got '%s'", type_str);
gb_string_free(type_str);
return false;
}
@@ -3339,6 +3347,11 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
gb_string_free(type_str);
return false;
}
+
+ if (ce->args.count <= 1) {
+ error(call, "Too few arguments for 'max', two or more are required");
+ return false;
+ }
bool all_constant = operand->mode == Addressing_Constant;
@@ -3358,7 +3371,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
if (!is_type_ordered(b.type) || !(is_type_numeric(b.type) || is_type_string(b.type))) {
gbString type_str = type_to_string(b.type);
error(arg,
- "Expected a ordered numeric type to 'max', got '%s'",
+ "Expected an ordered numeric type to 'max', got '%s'",
type_str);
gb_string_free(type_str);
return false;
@@ -3488,7 +3501,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
Type *type = operand->type;
if (!is_type_ordered(type) || !(is_type_numeric(type) || is_type_string(type))) {
gbString type_str = type_to_string(operand->type);
- error(call, "Expected a ordered numeric or string type to 'clamp', got '%s'", type_str);
+ error(call, "Expected an ordered numeric or string type to 'clamp', got '%s'", type_str);
gb_string_free(type_str);
return false;
}
@@ -3505,7 +3518,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
}
if (!is_type_ordered(y.type) || !(is_type_numeric(y.type) || is_type_string(y.type))) {
gbString type_str = type_to_string(y.type);
- error(call, "Expected a ordered numeric or string type to 'clamp', got '%s'", type_str);
+ error(call, "Expected an ordered numeric or string type to 'clamp', got '%s'", type_str);
gb_string_free(type_str);
return false;
}
@@ -3516,7 +3529,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
}
if (!is_type_ordered(z.type) || !(is_type_numeric(z.type) || is_type_string(z.type))) {
gbString type_str = type_to_string(z.type);
- error(call, "Expected a ordered numeric or string type to 'clamp', got '%s'", type_str);
+ error(call, "Expected an ordered numeric or string type to 'clamp', got '%s'", type_str);
gb_string_free(type_str);
return false;
}
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 3b532a727..60eb030ff 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -88,11 +88,12 @@ gb_internal Type *check_init_variable(CheckerContext *ctx, Entity *e, Operand *o
e->type = t_invalid;
return nullptr;
} else if (is_type_polymorphic(t)) {
- Entity *e = entity_of_node(operand->expr);
- if (e == nullptr) {
+ Entity *e2 = entity_of_node(operand->expr);
+ if (e2 == nullptr) {
+ e->type = t_invalid;
return nullptr;
}
- if (e->state.load() != EntityState_Resolved) {
+ if (e2->state.load() != EntityState_Resolved) {
gbString str = type_to_string(t);
defer (gb_string_free(str));
error(e->token, "Invalid use of a polymorphic type '%s' in %.*s", str, LIT(context_name));
@@ -232,6 +233,10 @@ gb_internal bool check_override_as_type_due_to_aliasing(CheckerContext *ctx, Ent
// until there is a proper delaying system to try declaration again if they
// have failed.
+ if (e->type != nullptr && is_type_typed(e->type)) {
+ return false;
+ }
+
e->kind = Entity_TypeName;
check_type_decl(ctx, e, init, named_type);
return true;
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index fc1aa62e6..cb4647f33 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -285,7 +285,7 @@ gb_internal void error_operand_no_value(Operand *o) {
if (o->mode == Addressing_NoValue) {
Ast *x = unparen_expr(o->expr);
- if (x->kind == Ast_CallExpr) {
+ if (x != nullptr && x->kind == Ast_CallExpr) {
Ast *p = unparen_expr(x->CallExpr.proc);
if (p->kind == Ast_BasicDirective) {
String tag = p->BasicDirective.name.string;
@@ -297,7 +297,7 @@ gb_internal void error_operand_no_value(Operand *o) {
}
gbString err = expr_to_string(o->expr);
- if (x->kind == Ast_CallExpr) {
+ if (x != nullptr && x->kind == Ast_CallExpr) {
error(o->expr, "'%s' call does not return a value and cannot be used as a value", err);
} else {
error(o->expr, "'%s' used as a value", err);
@@ -897,20 +897,6 @@ gb_internal i64 check_distance_between_types(CheckerContext *c, Operand *operand
}
}
- if (is_type_relative_pointer(dst)) {
- i64 score = check_distance_between_types(c, operand, dst->RelativePointer.pointer_type, allow_array_programming);
- if (score >= 0) {
- return score+2;
- }
- }
-
- if (is_type_relative_multi_pointer(dst)) {
- i64 score = check_distance_between_types(c, operand, dst->RelativeMultiPointer.pointer_type, allow_array_programming);
- if (score >= 0) {
- return score+2;
- }
- }
-
if (is_type_proc(dst)) {
if (are_types_identical(src, dst)) {
return 3;
@@ -1052,12 +1038,6 @@ gb_internal AstPackage *get_package_of_type(Type *type) {
case Type_DynamicArray:
type = type->DynamicArray.elem;
continue;
- case Type_RelativePointer:
- type = type->RelativePointer.pointer_type;
- continue;
- case Type_RelativeMultiPointer:
- type = type->RelativeMultiPointer.pointer_type;
- continue;
}
return nullptr;
}
@@ -3901,6 +3881,12 @@ gb_internal void check_binary_expr(CheckerContext *c, Operand *x, Ast *node, Typ
// IMPORTANT NOTE(bill): This uses right-left evaluation in type checking only no in
check_expr(c, y, be->right);
Type *rhs_type = type_deref(y->type);
+ if (rhs_type == nullptr) {
+ error(y->expr, "Cannot use '%.*s' on an expression with no value", LIT(op.string));
+ x->mode = Addressing_Invalid;
+ x->expr = node;
+ return;
+ }
if (is_type_bit_set(rhs_type)) {
Type *elem = base_type(rhs_type)->BitSet.elem;
@@ -5388,22 +5374,25 @@ gb_internal Entity *check_selector(CheckerContext *c, Operand *operand, Ast *nod
Type *t = type_deref(operand->type);
if (t == nullptr) {
error(operand->expr, "Cannot use a selector expression on 0-value expression");
- } else if (is_type_dynamic_array(t)) {
- init_mem_allocator(c->checker);
- }
- sel = lookup_field(operand->type, field_name, operand->mode == Addressing_Type);
- entity = sel.entity;
+ } else {
+ if (is_type_dynamic_array(t)) {
+ init_mem_allocator(c->checker);
+ }
+ sel = lookup_field(operand->type, field_name, operand->mode == Addressing_Type);
+ entity = sel.entity;
- // NOTE(bill): Add type info needed for fields like 'names'
- if (entity != nullptr && (entity->flags&EntityFlag_TypeField)) {
- add_type_info_type(c, operand->type);
- }
- if (is_type_enum(operand->type)) {
- add_type_info_type(c, operand->type);
+ // NOTE(bill): Add type info needed for fields like 'names'
+ if (entity != nullptr && (entity->flags&EntityFlag_TypeField)) {
+ add_type_info_type(c, operand->type);
+ }
+ if (is_type_enum(operand->type)) {
+ add_type_info_type(c, operand->type);
+ }
}
}
- if (entity == nullptr && selector->kind == Ast_Ident && (is_type_array(type_deref(operand->type)) || is_type_simd_vector(type_deref(operand->type)))) {
+ if (entity == nullptr && selector->kind == Ast_Ident && operand->type != nullptr &&
+ (is_type_array(type_deref(operand->type)) || is_type_simd_vector(type_deref(operand->type)))) {
String field_name = selector->Ident.token.string;
if (1 < field_name.len && field_name.len <= 4) {
u8 swizzles_xyzw[4] = {'x', 'y', 'z', 'w'};
@@ -8002,6 +7991,7 @@ gb_internal ExprKind check_call_expr(CheckerContext *c, Operand *operand, Ast *c
pt = data.gen_entity->type;
}
}
+ pt = base_type(pt);
if (pt->kind == Type_Proc && pt->Proc.calling_convention == ProcCC_Odin) {
if ((c->scope->flags & ScopeFlag_ContextDefined) == 0) {
@@ -8220,17 +8210,6 @@ gb_internal bool check_set_index_data(Operand *o, Type *t, bool indirection, i64
}
return true;
- case Type_RelativeMultiPointer:
- {
- Type *pointer_type = base_type(t->RelativeMultiPointer.pointer_type);
- GB_ASSERT(pointer_type->kind == Type_MultiPointer);
- o->type = pointer_type->MultiPointer.elem;
- if (o->mode != Addressing_Constant) {
- o->mode = Addressing_Variable;
- }
- }
- return true;
-
case Type_DynamicArray:
o->type = t->DynamicArray.elem;
if (o->mode != Addressing_Constant) {
@@ -8469,6 +8448,15 @@ gb_internal ExprKind check_implicit_selector_expr(CheckerContext *c, Operand *o,
error(node, "Undeclared name '%.*s' for type '%s'", LIT(name), typ);
check_did_you_mean_type(name, bt->Enum.fields);
+ } else if (is_type_bit_set(th) && is_type_enum(th->BitSet.elem)) {
+ ERROR_BLOCK();
+
+ gbString typ = type_to_string(th);
+ gbString str = expr_to_string(node);
+ error(node, "Cannot convert enum value to '%s'", typ);
+ error_line("\tSuggestion: Did you mean '{ %s }'?\n", str);
+ gb_string_free(typ);
+ gb_string_free(str);
} else {
gbString typ = type_to_string(th);
gbString str = expr_to_string(node);
@@ -8795,11 +8783,6 @@ gb_internal ExprKind check_ternary_if_expr(CheckerContext *c, Operand *o, Ast *n
return kind;
}
- if (x.type == nullptr || x.type == t_invalid ||
- y.type == nullptr || y.type == t_invalid) {
- return kind;
- }
-
bool use_type_hint = type_hint != nullptr && (is_operand_nil(x) || is_operand_nil(y));
convert_to_typed(c, &x, use_type_hint ? type_hint : y.type);
@@ -10609,8 +10592,6 @@ gb_internal ExprKind check_index_expr(CheckerContext *c, Operand *o, Ast *node,
// Okay
} else if (is_type_string(t)) {
// Okay
- } else if (is_type_relative_multi_pointer(t)) {
- // Okay
} else if (is_type_matrix(t)) {
// Okay
} else {
@@ -10765,11 +10746,6 @@ gb_internal ExprKind check_slice_expr(CheckerContext *c, Operand *o, Ast *node,
}
break;
- case Type_RelativeMultiPointer:
- valid = true;
- o->type = type_deref(o->type);
- break;
-
case Type_EnumeratedArray:
{
gbString str = expr_to_string(o->expr);
@@ -10846,16 +10822,6 @@ gb_internal ExprKind check_slice_expr(CheckerContext *c, Operand *o, Ast *node,
x[i:n] -> []T
*/
o->type = alloc_type_slice(t->MultiPointer.elem);
- } else if (t->kind == Type_RelativeMultiPointer && se->high != nullptr) {
- /*
- x[:] -> [^]T
- x[i:] -> [^]T
- x[:n] -> []T
- x[i:n] -> []T
- */
- Type *pointer_type = base_type(t->RelativeMultiPointer.pointer_type);
- GB_ASSERT(pointer_type->kind == Type_MultiPointer);
- o->type = alloc_type_slice(pointer_type->MultiPointer.elem);
}
@@ -11216,22 +11182,6 @@ gb_internal ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast
} else if (t->kind == Type_SoaPointer) {
o->mode = Addressing_SoaVariable;
o->type = type_deref(t);
- } else if (t->kind == Type_RelativePointer) {
- if (o->mode != Addressing_Variable) {
- gbString str = expr_to_string(o->expr);
- gbString typ = type_to_string(o->type);
- error(o->expr, "Cannot dereference relative pointer '%s' of type '%s' as it does not have a variable addressing mode", str, typ);
- gb_string_free(typ);
- gb_string_free(str);
- }
-
- // NOTE(bill): This is required because when dereferencing, the original type has been lost
- add_type_info_type(c, o->type);
-
- Type *ptr_type = base_type(t->RelativePointer.pointer_type);
- GB_ASSERT(ptr_type->kind == Type_Pointer);
- o->mode = Addressing_Variable;
- o->type = ptr_type->Pointer.elem;
} else {
gbString str = expr_to_string(o->expr);
gbString typ = type_to_string(o->type);
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 74a9e8825..2418fcc5c 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -2600,6 +2600,23 @@ gb_internal void check_for_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags) {
check_expr(ctx, &o, fs->cond);
if (o.mode != Addressing_Invalid && !is_type_boolean(o.type)) {
error(fs->cond, "Non-boolean condition in 'for' statement");
+ } else {
+ Ast *cond = unparen_expr(o.expr);
+ if (cond && cond->kind == Ast_BinaryExpr &&
+ cond->BinaryExpr.left && cond->BinaryExpr.right &&
+ cond->BinaryExpr.op.kind == Token_GtEq &&
+ is_type_unsigned(type_of_expr(cond->BinaryExpr.left)) &&
+ cond->BinaryExpr.right->tav.value.kind == ExactValue_Integer &&
+ is_exact_value_zero(cond->BinaryExpr.right->tav.value)) {
+ warning(cond, "Expression is always true since unsigned numbers are always >= 0");
+ } else if (cond && cond->kind == Ast_BinaryExpr &&
+ cond->BinaryExpr.left && cond->BinaryExpr.right &&
+ cond->BinaryExpr.op.kind == Token_LtEq &&
+ is_type_unsigned(type_of_expr(cond->BinaryExpr.right)) &&
+ cond->BinaryExpr.left->tav.value.kind == ExactValue_Integer &&
+ is_exact_value_zero(cond->BinaryExpr.left->tav.value)) {
+ warning(cond, "Expression is always true since unsigned numbers are always >= 0");
+ }
}
}
if (fs->post != nullptr) {
diff --git a/src/check_type.cpp b/src/check_type.cpp
index f0e0acb9b..84e7fb249 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -673,7 +673,7 @@ gb_internal void check_struct_type(CheckerContext *ctx, Type *struct_type, Ast *
#define ST_ALIGN(_name) if (st->_name != nullptr) { \
if (st->is_packed) { \
- syntax_error(st->_name, "'#%s' cannot be applied with '#packed'", #_name); \
+ error(st->_name, "'#%s' cannot be applied with '#packed'", #_name); \
return; \
} \
i64 align = 1; \
@@ -682,12 +682,31 @@ gb_internal void check_struct_type(CheckerContext *ctx, Type *struct_type, Ast *
} \
}
- ST_ALIGN(field_align);
+ ST_ALIGN(min_field_align);
+ ST_ALIGN(max_field_align);
ST_ALIGN(align);
- if (struct_type->Struct.custom_align < struct_type->Struct.custom_field_align) {
- warning(st->align, "#align(%lld) is defined to be less than #field_name(%lld)",
- cast(long long)struct_type->Struct.custom_align,
- cast(long long)struct_type->Struct.custom_field_align);
+ if (struct_type->Struct.custom_align < struct_type->Struct.custom_min_field_align) {
+ error(st->align, "#align(%lld) is defined to be less than #min_field_align(%lld)",
+ cast(long long)struct_type->Struct.custom_align,
+ cast(long long)struct_type->Struct.custom_min_field_align);
+ }
+ if (struct_type->Struct.custom_max_field_align != 0 &&
+ struct_type->Struct.custom_align > struct_type->Struct.custom_max_field_align) {
+ error(st->align, "#align(%lld) is defined to be greater than #max_field_align(%lld)",
+ cast(long long)struct_type->Struct.custom_align,
+ cast(long long)struct_type->Struct.custom_max_field_align);
+ }
+ if (struct_type->Struct.custom_max_field_align != 0 &&
+ struct_type->Struct.custom_min_field_align > struct_type->Struct.custom_max_field_align) {
+ error(st->align, "#min_field_align(%lld) is defined to be greater than #max_field_align(%lld)",
+ cast(long long)struct_type->Struct.custom_min_field_align,
+ cast(long long)struct_type->Struct.custom_max_field_align);
+
+ i64 a = gb_min(struct_type->Struct.custom_min_field_align, struct_type->Struct.custom_max_field_align);
+ i64 b = gb_max(struct_type->Struct.custom_min_field_align, struct_type->Struct.custom_max_field_align);
+ // NOTE(bill): sort them to keep code consistent
+ struct_type->Struct.custom_min_field_align = a;
+ struct_type->Struct.custom_max_field_align = b;
}
#undef ST_ALIGN
@@ -3498,41 +3517,8 @@ gb_internal bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, T
case_end;
case_ast_node(rt, RelativeType, e);
- GB_ASSERT(rt->tag->kind == Ast_CallExpr);
- ast_node(ce, CallExpr, rt->tag);
-
- Type *base_integer = nullptr;
-
- if (ce->args.count != 1) {
- error(rt->type, "#relative expected 1 type argument, got %td", ce->args.count);
- } else {
- base_integer = check_type(ctx, ce->args[0]);
- if (!is_type_integer(base_integer)) {
- error(rt->type, "#relative base types must be an integer");
- base_integer = nullptr;
- } else if (type_size_of(base_integer) > 64) {
- error(rt->type, "#relative base integer types be less than or equal to 64-bits");
- base_integer = nullptr;
- }
- }
-
- Type *relative_type = nullptr;
- Type *base_type = check_type(ctx, rt->type);
- if (!is_type_pointer(base_type) && !is_type_multi_pointer(base_type)) {
- error(rt->type, "#relative types can only be a pointer or multi-pointer");
- relative_type = base_type;
- } else if (base_integer == nullptr) {
- relative_type = base_type;
- } else {
- if (is_type_pointer(base_type)) {
- relative_type = alloc_type_relative_pointer(base_type, base_integer);
- } else if (is_type_multi_pointer(base_type)) {
- relative_type = alloc_type_relative_multi_pointer(base_type, base_integer);
- }
- }
- GB_ASSERT(relative_type != nullptr);
-
- *type = relative_type;
+ error(e, "#relative types have been removed from the compiler. Prefer \"core:relative\".");
+ *type = t_invalid;
set_base_type(named_type, *type);
return true;
case_end;
diff --git a/src/checker.cpp b/src/checker.cpp
index af1e0e675..b7cf343f8 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -695,6 +695,9 @@ gb_internal void check_scope_usage_internal(Checker *c, Scope *scope, u64 vet_fl
bool vet_unused = (vet_flags & VetFlag_Unused) != 0;
bool vet_shadowing = (vet_flags & (VetFlag_Shadowing|VetFlag_Using)) != 0;
bool vet_unused_procedures = (vet_flags & VetFlag_UnusedProcedures) != 0;
+ if (vet_unused_procedures && e->pkg && e->pkg->kind == Package_Runtime) {
+ vet_unused_procedures = false;
+ }
VettedEntity ve_unused = {};
VettedEntity ve_shadowed = {};
@@ -2183,16 +2186,6 @@ gb_internal void add_type_info_type_internal(CheckerContext *c, Type *t) {
add_type_info_type_internal(c, bt->SimdVector.elem);
break;
- case Type_RelativePointer:
- add_type_info_type_internal(c, bt->RelativePointer.pointer_type);
- add_type_info_type_internal(c, bt->RelativePointer.base_integer);
- break;
-
- case Type_RelativeMultiPointer:
- add_type_info_type_internal(c, bt->RelativeMultiPointer.pointer_type);
- add_type_info_type_internal(c, bt->RelativeMultiPointer.base_integer);
- break;
-
case Type_Matrix:
add_type_info_type_internal(c, bt->Matrix.elem);
break;
@@ -2438,16 +2431,6 @@ gb_internal void add_min_dep_type_info(Checker *c, Type *t) {
add_min_dep_type_info(c, bt->SimdVector.elem);
break;
- case Type_RelativePointer:
- add_min_dep_type_info(c, bt->RelativePointer.pointer_type);
- add_min_dep_type_info(c, bt->RelativePointer.base_integer);
- break;
-
- case Type_RelativeMultiPointer:
- add_min_dep_type_info(c, bt->RelativeMultiPointer.pointer_type);
- add_min_dep_type_info(c, bt->RelativeMultiPointer.base_integer);
- break;
-
case Type_Matrix:
add_min_dep_type_info(c, bt->Matrix.elem);
break;
@@ -3072,8 +3055,6 @@ gb_internal void init_core_type_info(Checker *c) {
t_type_info_map = find_core_type(c, str_lit("Type_Info_Map"));
t_type_info_bit_set = find_core_type(c, str_lit("Type_Info_Bit_Set"));
t_type_info_simd_vector = find_core_type(c, str_lit("Type_Info_Simd_Vector"));
- t_type_info_relative_pointer = find_core_type(c, str_lit("Type_Info_Relative_Pointer"));
- t_type_info_relative_multi_pointer = find_core_type(c, str_lit("Type_Info_Relative_Multi_Pointer"));
t_type_info_matrix = find_core_type(c, str_lit("Type_Info_Matrix"));
t_type_info_soa_pointer = find_core_type(c, str_lit("Type_Info_Soa_Pointer"));
t_type_info_bit_field = find_core_type(c, str_lit("Type_Info_Bit_Field"));
@@ -3102,8 +3083,6 @@ gb_internal void init_core_type_info(Checker *c) {
t_type_info_map_ptr = alloc_type_pointer(t_type_info_map);
t_type_info_bit_set_ptr = alloc_type_pointer(t_type_info_bit_set);
t_type_info_simd_vector_ptr = alloc_type_pointer(t_type_info_simd_vector);
- t_type_info_relative_pointer_ptr = alloc_type_pointer(t_type_info_relative_pointer);
- t_type_info_relative_multi_pointer_ptr = alloc_type_pointer(t_type_info_relative_multi_pointer);
t_type_info_matrix_ptr = alloc_type_pointer(t_type_info_matrix);
t_type_info_soa_pointer_ptr = alloc_type_pointer(t_type_info_soa_pointer);
t_type_info_bit_field_ptr = alloc_type_pointer(t_type_info_bit_field);
@@ -6206,7 +6185,7 @@ gb_internal void check_deferred_procedures(Checker *c) {
}
if ((src_params == nullptr && dst_params != nullptr) ||
(src_params != nullptr && dst_params == nullptr)) {
- error(src->token, "Deferred procedure '%.*s' parameters do not match the inputs of initial procedure '%.*s'", LIT(src->token.string), LIT(dst->token.string));
+ error(src->token, "Deferred procedure '%.*s' parameters do not match the inputs of initial procedure '%.*s'", LIT(dst->token.string), LIT(src->token.string));
continue;
}
@@ -6219,8 +6198,8 @@ gb_internal void check_deferred_procedures(Checker *c) {
gbString s = type_to_string(src_params);
gbString d = type_to_string(dst_params);
error(src->token, "Deferred procedure '%.*s' parameters do not match the inputs of initial procedure '%.*s':\n\t(%s) =/= (%s)",
- LIT(src->token.string), LIT(dst->token.string),
- s, d
+ LIT(dst->token.string), LIT(src->token.string),
+ d, s
);
gb_string_free(d);
gb_string_free(s);
@@ -6236,7 +6215,7 @@ gb_internal void check_deferred_procedures(Checker *c) {
}
if ((src_results == nullptr && dst_params != nullptr) ||
(src_results != nullptr && dst_params == nullptr)) {
- error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s'", LIT(src->token.string), LIT(dst->token.string));
+ error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s'", LIT(dst->token.string), LIT(src->token.string));
continue;
}
@@ -6249,8 +6228,8 @@ gb_internal void check_deferred_procedures(Checker *c) {
gbString s = type_to_string(src_results);
gbString d = type_to_string(dst_params);
error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s':\n\t(%s) =/= (%s)",
- LIT(src->token.string), LIT(dst->token.string),
- s, d
+ LIT(dst->token.string), LIT(src->token.string),
+ d, s
);
gb_string_free(d);
gb_string_free(s);
@@ -6302,8 +6281,8 @@ gb_internal void check_deferred_procedures(Checker *c) {
gbString s = type_to_string(tsrc);
gbString d = type_to_string(dst_params);
error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s':\n\t(%s) =/= (%s)",
- LIT(src->token.string), LIT(dst->token.string),
- s, d
+ LIT(dst->token.string), LIT(src->token.string),
+ d, s
);
gb_string_free(d);
gb_string_free(s);
diff --git a/src/docs_format.cpp b/src/docs_format.cpp
index ca6ecb5c2..6378971d0 100644
--- a/src/docs_format.cpp
+++ b/src/docs_format.cpp
@@ -79,8 +79,7 @@ enum OdinDocTypeKind : u32 {
OdinDocType_SOAStructFixed = 17,
OdinDocType_SOAStructSlice = 18,
OdinDocType_SOAStructDynamic = 19,
- OdinDocType_RelativePointer = 20,
- OdinDocType_RelativeMultiPointer = 21,
+
OdinDocType_MultiPointer = 22,
OdinDocType_Matrix = 23,
OdinDocType_SoaPointer = 24,
diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp
index 835dfdff1..341b3fa6b 100644
--- a/src/docs_writer.cpp
+++ b/src/docs_writer.cpp
@@ -776,24 +776,6 @@ gb_internal OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) {
doc_type.types = odin_doc_type_as_slice(w, type->SimdVector.elem);
// TODO(bill):
break;
- case Type_RelativePointer:
- doc_type.kind = OdinDocType_RelativePointer;
- {
- OdinDocTypeIndex types[2] = {};
- types[0] = odin_doc_type(w, type->RelativePointer.pointer_type);
- types[1] = odin_doc_type(w, type->RelativePointer.base_integer);
- doc_type.types = odin_write_slice(w, types, gb_count_of(types));
- }
- break;
- case Type_RelativeMultiPointer:
- doc_type.kind = OdinDocType_RelativeMultiPointer;
- {
- OdinDocTypeIndex types[2] = {};
- types[0] = odin_doc_type(w, type->RelativeMultiPointer.pointer_type);
- types[1] = odin_doc_type(w, type->RelativeMultiPointer.base_integer);
- doc_type.types = odin_write_slice(w, types, gb_count_of(types));
- }
- break;
case Type_Matrix:
doc_type.kind = OdinDocType_Matrix;
diff --git a/src/exact_value.cpp b/src/exact_value.cpp
index 1a42a82a9..5d6016ecc 100644
--- a/src/exact_value.cpp
+++ b/src/exact_value.cpp
@@ -687,6 +687,7 @@ gb_internal void match_exact_values(ExactValue *x, ExactValue *y) {
case ExactValue_String:
case ExactValue_Quaternion:
case ExactValue_Pointer:
+ case ExactValue_Compound:
case ExactValue_Procedure:
case ExactValue_Typeid:
return;
diff --git a/src/gb/gb.h b/src/gb/gb.h
index 1fef4b4f5..f74026c7d 100644
--- a/src/gb/gb.h
+++ b/src/gb/gb.h
@@ -2541,7 +2541,11 @@ gb_inline void const *gb_pointer_add_const(void const *ptr, isize bytes) {
gb_inline void const *gb_pointer_sub_const(void const *ptr, isize bytes) { return cast(void const *)(cast(u8 const *)ptr - bytes); }
gb_inline isize gb_pointer_diff (void const *begin, void const *end) { return cast(isize)(cast(u8 const *)end - cast(u8 const *)begin); }
-gb_inline void gb_zero_size(void *ptr, isize size) { memset(ptr, 0, size); }
+gb_inline void gb_zero_size(void *ptr, isize size) {
+ if (size != 0) {
+ memset(ptr, 0, size);
+ }
+}
#if defined(_MSC_VER) && !defined(__clang__)
diff --git a/src/linker.cpp b/src/linker.cpp
index 500fead69..261d6e7a4 100644
--- a/src/linker.cpp
+++ b/src/linker.cpp
@@ -167,8 +167,10 @@ gb_internal i32 linker_stage(LinkerData *gen) {
if (is_windows) {
String section_name = str_lit("msvc-link");
- if (build_context.use_lld) {
- section_name = str_lit("lld-link");
+ switch (build_context.linker_choice) {
+ case Linker_Default: break;
+ case Linker_lld: section_name = str_lit("lld-link"); break;
+ case Linker_radlink: section_name = str_lit("rad-link"); break;
}
timings_start_section(timings, section_name);
@@ -304,7 +306,48 @@ gb_internal i32 linker_stage(LinkerData *gen) {
String windows_sdk_bin_path = path_to_string(heap_allocator(), build_context.build_paths[BuildPath_Win_SDK_Bin_Path]);
defer (gb_free(heap_allocator(), windows_sdk_bin_path.text));
- if (!build_context.use_lld) { // msvc
+ switch (build_context.linker_choice) {
+ case Linker_lld:
+ result = system_exec_command_line_app("msvc-lld-link",
+ "\"%.*s\\bin\\lld-link\" %s -OUT:\"%.*s\" %s "
+ "/nologo /incremental:no /opt:ref /subsystem:%.*s "
+ "%.*s "
+ "%.*s "
+ "%s "
+ "",
+ LIT(build_context.ODIN_ROOT), object_files, LIT(output_filename),
+ link_settings,
+ LIT(build_context.ODIN_WINDOWS_SUBSYSTEM),
+ LIT(build_context.link_flags),
+ LIT(build_context.extra_linker_flags),
+ lib_str
+ );
+
+ if (result) {
+ return result;
+ }
+ break;
+ case Linker_radlink:
+ result = system_exec_command_line_app("msvc-rad-link",
+ "\"%.*s\\bin\\radlink\" %s -OUT:\"%.*s\" %s "
+ "/nologo /incremental:no /opt:ref /subsystem:%.*s "
+ "%.*s "
+ "%.*s "
+ "%s "
+ "",
+ LIT(build_context.ODIN_ROOT), object_files, LIT(output_filename),
+ link_settings,
+ LIT(build_context.ODIN_WINDOWS_SUBSYSTEM),
+ LIT(build_context.link_flags),
+ LIT(build_context.extra_linker_flags),
+ lib_str
+ );
+
+ if (result) {
+ return result;
+ }
+ break;
+ default: { // msvc
String res_path = quote_path(heap_allocator(), build_context.build_paths[BuildPath_RES]);
String rc_path = quote_path(heap_allocator(), build_context.build_paths[BuildPath_RC]);
defer (gb_free(heap_allocator(), res_path.text));
@@ -365,25 +408,8 @@ gb_internal i32 linker_stage(LinkerData *gen) {
if (result) {
return result;
}
- } else { // lld
- result = system_exec_command_line_app("msvc-lld-link",
- "\"%.*s\\bin\\lld-link\" %s -OUT:\"%.*s\" %s "
- "/nologo /incremental:no /opt:ref /subsystem:%.*s "
- "%.*s "
- "%.*s "
- "%s "
- "",
- LIT(build_context.ODIN_ROOT), object_files, LIT(output_filename),
- link_settings,
- LIT(build_context.ODIN_WINDOWS_SUBSYSTEM),
- LIT(build_context.link_flags),
- LIT(build_context.extra_linker_flags),
- lib_str
- );
-
- if (result) {
- return result;
- }
+ break;
+ }
}
} else {
timings_start_section(timings, str_lit("ld-link"));
@@ -605,9 +631,18 @@ gb_internal i32 linker_stage(LinkerData *gen) {
link_settings = gb_string_appendc(link_settings, "-Wl,-fini,'_odin_exit_point' ");
}
- } else if (build_context.metrics.os != TargetOs_openbsd && build_context.metrics.os != TargetOs_haiku && build_context.metrics.arch != TargetArch_riscv64) {
- // OpenBSD and Haiku default to PIE executable. do not pass -no-pie for it.
- link_settings = gb_string_appendc(link_settings, "-no-pie ");
+ }
+
+ if (build_context.build_mode == BuildMode_Executable && build_context.reloc_mode == RelocMode_PIC) {
+ // Do not disable PIE, let the linker choose. (most likely you want it enabled)
+ } else if (build_context.build_mode != BuildMode_DynamicLibrary) {
+ if (build_context.metrics.os != TargetOs_openbsd
+ && build_context.metrics.os != TargetOs_haiku
+ && build_context.metrics.arch != TargetArch_riscv64
+ ) {
+ // OpenBSD and Haiku default to PIE executable. do not pass -no-pie for it.
+ link_settings = gb_string_appendc(link_settings, "-no-pie ");
+ }
}
gbString platform_lib_str = gb_string_make(heap_allocator(), "");
@@ -670,7 +705,7 @@ gb_internal i32 linker_stage(LinkerData *gen) {
link_command_line = gb_string_append_fmt(link_command_line, " %.*s ", LIT(build_context.extra_linker_flags));
link_command_line = gb_string_append_fmt(link_command_line, " %s ", link_settings);
- if (build_context.use_lld) {
+ if (build_context.linker_choice == Linker_lld) {
link_command_line = gb_string_append_fmt(link_command_line, " -fuse-ld=lld");
result = system_exec_command_line_app("lld-link", link_command_line);
} else {
@@ -684,7 +719,7 @@ gb_internal i32 linker_stage(LinkerData *gen) {
if (is_osx && build_context.ODIN_DEBUG) {
// NOTE: macOS links DWARF symbols dynamically. Dsymutil will map the stubs in the exe
// to the symbols in the object file
- result = system_exec_command_line_app("dsymutil", "dsymutil %.*s", LIT(output_filename));
+ result = system_exec_command_line_app("dsymutil", "dsymutil \"%.*s\"", LIT(output_filename));
if (result) {
return result;
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp
index 42086b09d..0b2bb7956 100644
--- a/src/llvm_abi.cpp
+++ b/src/llvm_abi.cpp
@@ -531,6 +531,7 @@ namespace lbAbiAmd64SysV {
RegClass_SSEInt16,
RegClass_SSEInt32,
RegClass_SSEInt64,
+ RegClass_SSEInt128,
RegClass_SSEUp,
RegClass_X87,
RegClass_X87Up,
@@ -572,6 +573,15 @@ namespace lbAbiAmd64SysV {
gb_internal Array<RegClass> classify(LLVMTypeRef t);
gb_internal LLVMTypeRef llreg(LLVMContextRef c, Array<RegClass> const &reg_classes, LLVMTypeRef type);
+ gb_internal LB_ABI_COMPUTE_RETURN_TYPE(compute_return_type) {
+ if (!return_is_defined) {
+ return lb_arg_type_direct(LLVMVoidTypeInContext(c));
+ }
+ LB_ABI_MODIFY_RETURN_IF_TUPLE_MACRO();
+
+ return amd64_type(c, return_type, Amd64TypeAttribute_StructRect, ft->calling_convention);
+ }
+
gb_internal LB_ABI_INFO(abi_info) {
LLVMContextRef c = m->ctx;
lbFunctionType *ft = gb_alloc_item(permanent_allocator(), lbFunctionType);
@@ -582,12 +592,7 @@ namespace lbAbiAmd64SysV {
for (unsigned i = 0; i < arg_count; i++) {
ft->args[i] = amd64_type(c, arg_types[i], Amd64TypeAttribute_ByVal, calling_convention);
}
-
- if (return_is_defined) {
- ft->ret = amd64_type(c, return_type, Amd64TypeAttribute_StructRect, calling_convention);
- } else {
- ft->ret = lb_arg_type_direct(LLVMVoidTypeInContext(c));
- }
+ ft->ret = compute_return_type(ft, c, return_type, return_is_defined, return_is_tuple);
return ft;
}
@@ -616,6 +621,10 @@ namespace lbAbiAmd64SysV {
}
switch (kind) {
case LLVMIntegerTypeKind:
+ if (LLVM_VERSION_MAJOR >= 18 && sz >= 16) {
+ return true;
+ }
+ return false;
case LLVMHalfTypeKind:
case LLVMFloatTypeKind:
case LLVMDoubleTypeKind:
diff --git a/src/llvm_backend.hpp b/src/llvm_backend.hpp
index 68f95cb03..464efa325 100644
--- a/src/llvm_backend.hpp
+++ b/src/llvm_backend.hpp
@@ -75,7 +75,6 @@ enum lbAddrKind {
lbAddr_Context,
lbAddr_SoaVariable,
- lbAddr_RelativePointer,
lbAddr_Swizzle,
lbAddr_SwizzleLarge,
@@ -104,9 +103,6 @@ struct lbAddr {
Ast *node;
} index_set;
struct {
- bool deref;
- } relative;
- struct {
Type *type;
u8 count; // 2, 3, or 4 components
u8 indices[4];
diff --git a/src/llvm_backend_debug.cpp b/src/llvm_backend_debug.cpp
index 5cc79dcc8..464f7065c 100644
--- a/src/llvm_backend_debug.cpp
+++ b/src/llvm_backend_debug.cpp
@@ -920,17 +920,6 @@ gb_internal LLVMMetadataRef lb_debug_type_internal(lbModule *m, Type *type) {
elem, subscripts, gb_count_of(subscripts));
}
- case Type_RelativePointer: {
- LLVMMetadataRef base_integer = lb_debug_type(m, type->RelativePointer.base_integer);
- gbString name = type_to_string(type, temporary_allocator());
- return LLVMDIBuilderCreateTypedef(m->debug_builder, base_integer, name, gb_string_length(name), nullptr, 0, nullptr, cast(u32)(8*type_align_of(type)));
- }
- case Type_RelativeMultiPointer: {
- LLVMMetadataRef base_integer = lb_debug_type(m, type->RelativeMultiPointer.base_integer);
- gbString name = type_to_string(type, temporary_allocator());
- return LLVMDIBuilderCreateTypedef(m->debug_builder, base_integer, name, gb_string_length(name), nullptr, 0, nullptr, cast(u32)(8*type_align_of(type)));
- }
-
case Type_Matrix: {
LLVMMetadataRef subscripts[1] = {};
subscripts[0] = LLVMDIBuilderGetOrCreateSubrange(m->debug_builder,
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp
index 58467db2e..80c469ae6 100644
--- a/src/llvm_backend_expr.cpp
+++ b/src/llvm_backend_expr.cpp
@@ -130,7 +130,7 @@ gb_internal lbValue lb_emit_unary_arith(lbProcedure *p, TokenKind op, lbValue x,
LLVMTypeRef vector_type = nullptr;
if (op != Token_Not && lb_try_vector_cast(p->module, val, &vector_type)) {
LLVMValueRef vp = LLVMBuildPointerCast(p->builder, val.value, LLVMPointerType(vector_type, 0), "");
- LLVMValueRef v = LLVMBuildLoad2(p->builder, vector_type, vp, "");
+ LLVMValueRef v = OdinLLVMBuildLoad(p, vector_type, vp);
LLVMValueRef opv = nullptr;
switch (op) {
@@ -324,8 +324,8 @@ gb_internal bool lb_try_direct_vector_arith(lbProcedure *p, TokenKind op, lbValu
LLVMValueRef lhs_vp = LLVMBuildPointerCast(p->builder, lhs_ptr.value, LLVMPointerType(vector_type, 0), "");
LLVMValueRef rhs_vp = LLVMBuildPointerCast(p->builder, rhs_ptr.value, LLVMPointerType(vector_type, 0), "");
- LLVMValueRef x = LLVMBuildLoad2(p->builder, vector_type, lhs_vp, "");
- LLVMValueRef y = LLVMBuildLoad2(p->builder, vector_type, rhs_vp, "");
+ LLVMValueRef x = OdinLLVMBuildLoad(p, vector_type, lhs_vp);
+ LLVMValueRef y = OdinLLVMBuildLoad(p, vector_type, rhs_vp);
LLVMValueRef z = nullptr;
if (is_type_float(integral_type)) {
@@ -551,15 +551,14 @@ gb_internal LLVMValueRef lb_matrix_to_vector(lbProcedure *p, lbValue matrix) {
Type *mt = base_type(matrix.type);
GB_ASSERT(mt->kind == Type_Matrix);
LLVMTypeRef elem_type = lb_type(p->module, mt->Matrix.elem);
-
+
unsigned total_count = cast(unsigned)matrix_type_total_internal_elems(mt);
LLVMTypeRef total_matrix_type = LLVMVectorType(elem_type, total_count);
-
+
#if 1
LLVMValueRef ptr = lb_address_from_load_or_generate_local(p, matrix).value;
LLVMValueRef matrix_vector_ptr = LLVMBuildPointerCast(p->builder, ptr, LLVMPointerType(total_matrix_type, 0), "");
- LLVMValueRef matrix_vector = LLVMBuildLoad2(p->builder, total_matrix_type, matrix_vector_ptr, "");
- LLVMSetAlignment(matrix_vector, cast(unsigned)type_align_of(mt));
+ LLVMValueRef matrix_vector = OdinLLVMBuildLoadAligned(p, total_matrix_type, matrix_vector_ptr, type_align_of(mt));
return matrix_vector;
#else
LLVMValueRef matrix_vector = LLVMBuildBitCast(p->builder, matrix.value, total_matrix_type, "");
@@ -1225,10 +1224,10 @@ gb_internal lbValue lb_emit_arith(lbProcedure *p, TokenKind op, lbValue lhs, lbV
lbValue d3 = lb_emit_struct_ep(p, res.addr, 3);
if (immediate_type != ft) {
- d0 = lb_emit_conv(p, d0, ft);
- d1 = lb_emit_conv(p, d1, ft);
- d2 = lb_emit_conv(p, d2, ft);
- d3 = lb_emit_conv(p, d3, ft);
+ z0 = lb_emit_conv(p, z0, ft);
+ z1 = lb_emit_conv(p, z1, ft);
+ z2 = lb_emit_conv(p, z2, ft);
+ z3 = lb_emit_conv(p, z3, ft);
}
lb_emit_store(p, d0, z0);
@@ -1648,7 +1647,7 @@ gb_internal lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
lb_emit_store(p, a1, id);
return lb_addr_load(p, res);
} else if (dst->kind == Type_Basic) {
- if (src->Basic.kind == Basic_string && dst->Basic.kind == Basic_cstring) {
+ if (src->kind == Type_Basic && src->Basic.kind == Basic_string && dst->Basic.kind == Basic_cstring) {
String str = lb_get_const_string(m, value);
lbValue res = {};
res.type = t;
@@ -2364,12 +2363,23 @@ gb_internal lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
GB_ASSERT(src->kind == Type_Matrix);
lbAddr v = lb_add_local_generated(p, t, true);
- if (is_matrix_square(dst) && is_matrix_square(dst)) {
+ if (dst->Matrix.row_count == src->Matrix.row_count &&
+ dst->Matrix.column_count == src->Matrix.column_count) {
+ for (i64 j = 0; j < dst->Matrix.column_count; j++) {
+ for (i64 i = 0; i < dst->Matrix.row_count; i++) {
+ lbValue d = lb_emit_matrix_epi(p, v.addr, i, j);
+ lbValue s = lb_emit_matrix_ev(p, value, i, j);
+ s = lb_emit_conv(p, s, dst->Matrix.elem);
+ lb_emit_store(p, d, s);
+ }
+ }
+ } else if (is_matrix_square(dst) && is_matrix_square(dst)) {
for (i64 j = 0; j < dst->Matrix.column_count; j++) {
for (i64 i = 0; i < dst->Matrix.row_count; i++) {
if (i < src->Matrix.row_count && j < src->Matrix.column_count) {
lbValue d = lb_emit_matrix_epi(p, v.addr, i, j);
lbValue s = lb_emit_matrix_ev(p, value, i, j);
+ s = lb_emit_conv(p, s, dst->Matrix.elem);
lb_emit_store(p, d, s);
} else if (i == j) {
lbValue d = lb_emit_matrix_epi(p, v.addr, i, j);
@@ -2555,17 +2565,27 @@ gb_internal lbValue lb_emit_comp(lbProcedure *p, TokenKind op_kind, lbValue left
if (are_types_identical(a, b)) {
// NOTE(bill): No need for a conversion
- } else if (lb_is_const(left) || lb_is_const_nil(left)) {
+ } else if ((lb_is_const(left) && !is_type_array(left.type)) || lb_is_const_nil(left)) {
+ // NOTE(karl): !is_type_array(left.type) is there to avoid lb_emit_conv
+ // trying to convert a constant array into a non-array. In that case we
+ // want the `else` branch to happen, so it can try to convert the
+ // non-array into an array instead.
+
if (lb_is_const_nil(left)) {
+ if (internal_check_is_assignable_to(right.type, left.type)) {
+ right = lb_emit_conv(p, right, left.type);
+ }
return lb_emit_comp_against_nil(p, op_kind, right);
}
left = lb_emit_conv(p, left, right.type);
- } else if (lb_is_const(right) || lb_is_const_nil(right)) {
+ } else if ((lb_is_const(right) && !is_type_array(right.type)) || lb_is_const_nil(right)) {
if (lb_is_const_nil(right)) {
+ if (internal_check_is_assignable_to(left.type, right.type)) {
+ left = lb_emit_conv(p, left, right.type);
+ }
return lb_emit_comp_against_nil(p, op_kind, left);
}
right = lb_emit_conv(p, right, left.type);
-
} else {
Type *lt = left.type;
Type *rt = right.type;
@@ -4180,30 +4200,6 @@ gb_internal lbAddr lb_build_addr_index_expr(lbProcedure *p, Ast *expr) {
return lb_addr(v);
}
- case Type_RelativeMultiPointer: {
- lbAddr rel_ptr_addr = {};
- if (deref) {
- lbValue rel_ptr_ptr = lb_build_expr(p, ie->expr);
- rel_ptr_addr = lb_addr(rel_ptr_ptr);
- } else {
- rel_ptr_addr = lb_build_addr(p, ie->expr);
- }
- lbValue rel_ptr = lb_relative_pointer_to_pointer(p, rel_ptr_addr);
-
- lbValue index = lb_build_expr(p, ie->index);
- index = lb_emit_conv(p, index, t_int);
- lbValue v = {};
-
- Type *pointer_type = base_type(t->RelativeMultiPointer.pointer_type);
- GB_ASSERT(pointer_type->kind == Type_MultiPointer);
- Type *elem = pointer_type->MultiPointer.elem;
-
- LLVMValueRef indices[1] = {index.value};
- v.value = LLVMBuildGEP2(p->builder, lb_type(p->module, elem), rel_ptr.value, indices, 1, "");
- v.type = alloc_type_pointer(elem);
- return lb_addr(v);
- }
-
case Type_DynamicArray: {
lbValue dynamic_array = {};
dynamic_array = lb_build_expr(p, ie->expr);
@@ -4313,13 +4309,6 @@ gb_internal lbAddr lb_build_addr_slice_expr(lbProcedure *p, Ast *expr) {
return slice;
}
- case Type_RelativePointer:
- GB_PANIC("TODO(bill): Type_RelativePointer should be handled above already on the lb_addr_load");
- break;
- case Type_RelativeMultiPointer:
- GB_PANIC("TODO(bill): Type_RelativeMultiPointer should be handled above already on the lb_addr_load");
- break;
-
case Type_DynamicArray: {
Type *elem_type = type->DynamicArray.elem;
Type *slice_type = alloc_type_slice(elem_type);
@@ -5323,11 +5312,7 @@ gb_internal lbAddr lb_build_addr_internal(lbProcedure *p, Ast *expr) {
case_ast_node(de, DerefExpr, expr);
Type *t = type_of_expr(de->expr);
- if (is_type_relative_pointer(t)) {
- lbAddr addr = lb_build_addr(p, de->expr);
- addr.relative.deref = true;
- return addr;
- } else if (is_type_soa_pointer(t)) {
+ if (is_type_soa_pointer(t)) {
lbValue value = lb_build_expr(p, de->expr);
lbValue ptr = lb_emit_struct_ev(p, value, 0);
lbValue idx = lb_emit_struct_ev(p, value, 1);
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp
index 842a1cbc8..9dc603993 100644
--- a/src/llvm_backend_general.cpp
+++ b/src/llvm_backend_general.cpp
@@ -409,14 +409,6 @@ gb_internal lbModule *lb_module_of_entity(lbGenerator *gen, Entity *e) {
gb_internal lbAddr lb_addr(lbValue addr) {
lbAddr v = {lbAddr_Default, addr};
- if (addr.type != nullptr && is_type_relative_pointer(type_deref(addr.type))) {
- GB_ASSERT(is_type_pointer(addr.type));
- v.kind = lbAddr_RelativePointer;
- } else if (addr.type != nullptr && is_type_relative_multi_pointer(type_deref(addr.type))) {
- GB_ASSERT(is_type_pointer(addr.type) ||
- is_type_multi_pointer(addr.type));
- v.kind = lbAddr_RelativePointer;
- }
return v;
}
@@ -501,42 +493,6 @@ gb_internal Type *lb_addr_type(lbAddr const &addr) {
return type_deref(addr.addr.type);
}
-
-gb_internal lbValue lb_relative_pointer_to_pointer(lbProcedure *p, lbAddr const &addr) {
- GB_ASSERT(addr.kind == lbAddr_RelativePointer);
-
- Type *t = base_type(lb_addr_type(addr));
- GB_ASSERT(is_type_relative_pointer(t) || is_type_relative_multi_pointer(t));
-
- Type *pointer_type = nullptr;
- Type *base_integer = nullptr;
- if (t->kind == Type_RelativePointer) {
- pointer_type = t->RelativePointer.pointer_type;
- base_integer = t->RelativePointer.base_integer;
- } else if (t->kind == Type_RelativeMultiPointer) {
- pointer_type = t->RelativeMultiPointer.pointer_type;
- base_integer = t->RelativeMultiPointer.base_integer;
- }
-
- lbValue ptr = lb_emit_conv(p, addr.addr, t_uintptr);
- lbValue offset = lb_emit_conv(p, ptr, alloc_type_pointer(base_integer));
- offset = lb_emit_load(p, offset);
-
- if (!is_type_unsigned(base_integer)) {
- offset = lb_emit_conv(p, offset, t_i64);
- }
- offset = lb_emit_conv(p, offset, t_uintptr);
- lbValue absolute_ptr = lb_emit_arith(p, Token_Add, ptr, offset, t_uintptr);
- absolute_ptr = lb_emit_conv(p, absolute_ptr, pointer_type);
-
- lbValue cond = lb_emit_comp(p, Token_CmpEq, offset, lb_const_nil(p->module, base_integer));
-
- // NOTE(bill): nil check
- lbValue nil_ptr = lb_const_nil(p->module, pointer_type);
- lbValue final_ptr = lb_emit_select(p, cond, nil_ptr, absolute_ptr);
- return final_ptr;
-}
-
gb_internal lbValue lb_make_soa_pointer(lbProcedure *p, Type *type, lbValue const &addr, lbValue const &index) {
lbAddr v = lb_add_local_generated(p, type, false);
lbValue ptr = lb_emit_struct_ep(p, v.addr, 0);
@@ -557,9 +513,6 @@ gb_internal lbValue lb_addr_get_ptr(lbProcedure *p, lbAddr const &addr) {
case lbAddr_Map:
return lb_internal_dynamic_map_get_ptr(p, addr.addr, addr.map.key);
- case lbAddr_RelativePointer:
- return lb_relative_pointer_to_pointer(p, addr);
-
case lbAddr_SoaVariable:
{
Type *soa_ptr_type = alloc_type_soa_pointer(lb_addr_type(addr));
@@ -584,9 +537,6 @@ gb_internal lbValue lb_addr_get_ptr(lbProcedure *p, lbAddr const &addr) {
gb_internal lbValue lb_build_addr_ptr(lbProcedure *p, Ast *expr) {
lbAddr addr = lb_build_addr(p, expr);
- if (addr.kind == lbAddr_RelativePointer) {
- return addr.addr;
- }
return lb_addr_get_ptr(p, addr);
}
@@ -722,7 +672,10 @@ gb_internal unsigned lb_try_get_alignment(LLVMValueRef addr_ptr, unsigned defaul
gb_internal bool lb_try_update_alignment(LLVMValueRef addr_ptr, unsigned alignment) {
if (LLVMIsAGlobalValue(addr_ptr) || LLVMIsAAllocaInst(addr_ptr) || LLVMIsALoadInst(addr_ptr)) {
if (LLVMGetAlignment(addr_ptr) < alignment) {
- if (LLVMIsAAllocaInst(addr_ptr) || LLVMIsAGlobalValue(addr_ptr)) {
+ if (LLVMIsAAllocaInst(addr_ptr)) {
+ LLVMSetAlignment(addr_ptr, alignment);
+ } else if (LLVMIsAGlobalValue(addr_ptr) && LLVMGetLinkage(addr_ptr) != LLVMExternalLinkage) {
+ // NOTE(laytan): setting alignment of an external global just changes the alignment we expect it to be.
LLVMSetAlignment(addr_ptr, alignment);
}
}
@@ -755,10 +708,7 @@ gb_internal bool lb_try_vector_cast(lbModule *m, lbValue ptr, LLVMTypeRef *vecto
LLVMValueRef addr_ptr = ptr.value;
if (LLVMIsAAllocaInst(addr_ptr) || LLVMIsAGlobalValue(addr_ptr)) {
- unsigned alignment = LLVMGetAlignment(addr_ptr);
- alignment = gb_max(alignment, vector_alignment);
- possible = true;
- LLVMSetAlignment(addr_ptr, alignment);
+ possible = lb_try_update_alignment(addr_ptr, vector_alignment);
} else if (LLVMIsALoadInst(addr_ptr)) {
unsigned alignment = LLVMGetAlignment(addr_ptr);
possible = alignment >= vector_alignment;
@@ -774,6 +724,36 @@ gb_internal bool lb_try_vector_cast(lbModule *m, lbValue ptr, LLVMTypeRef *vecto
return false;
}
+gb_internal LLVMValueRef OdinLLVMBuildLoad(lbProcedure *p, LLVMTypeRef type, LLVMValueRef value) {
+ LLVMValueRef result = LLVMBuildLoad2(p->builder, type, value, "");
+
+ // If it is not an instruction it isn't a GEP, so we don't need to track alignment in the metadata,
+ // which is not possible anyway (only LLVM instructions can have metadata).
+ if (LLVMIsAInstruction(value)) {
+ u64 is_packed = lb_get_metadata_custom_u64(p->module, value, ODIN_METADATA_IS_PACKED);
+ if (is_packed != 0) {
+ LLVMSetAlignment(result, 1);
+ }
+ }
+
+ return result;
+}
+
+gb_internal LLVMValueRef OdinLLVMBuildLoadAligned(lbProcedure *p, LLVMTypeRef type, LLVMValueRef value, i64 alignment) {
+ LLVMValueRef result = LLVMBuildLoad2(p->builder, type, value, "");
+
+ LLVMSetAlignment(result, cast(unsigned)alignment);
+
+ if (LLVMIsAInstruction(value)) {
+ u64 is_packed = lb_get_metadata_custom_u64(p->module, value, ODIN_METADATA_IS_PACKED);
+ if (is_packed != 0) {
+ LLVMSetAlignment(result, 1);
+ }
+ }
+
+ return result;
+}
+
gb_internal void lb_addr_store(lbProcedure *p, lbAddr addr, lbValue value) {
if (addr.addr.value == nullptr) {
return;
@@ -789,10 +769,6 @@ gb_internal void lb_addr_store(lbProcedure *p, lbAddr addr, lbValue value) {
value.value = LLVMConstNull(lb_type(p->module, t));
}
- if (addr.kind == lbAddr_RelativePointer && addr.relative.deref) {
- addr = lb_addr(lb_address_from_load(p, lb_addr_load(p, addr)));
- }
-
if (addr.kind == lbAddr_BitField) {
lbValue dst = addr.addr;
if (is_type_endian_big(addr.bitfield.type)) {
@@ -830,44 +806,6 @@ gb_internal void lb_addr_store(lbProcedure *p, lbAddr addr, lbValue value) {
lb_emit_runtime_call(p, "__write_bits", args);
}
return;
- } else if (addr.kind == lbAddr_RelativePointer) {
- Type *rel_ptr = base_type(lb_addr_type(addr));
- GB_ASSERT(rel_ptr->kind == Type_RelativePointer ||
- rel_ptr->kind == Type_RelativeMultiPointer);
- Type *pointer_type = nullptr;
- Type *base_integer = nullptr;
-
- if (rel_ptr->kind == Type_RelativePointer) {
- pointer_type = rel_ptr->RelativePointer.pointer_type;
- base_integer = rel_ptr->RelativePointer.base_integer;
- } else if (rel_ptr->kind == Type_RelativeMultiPointer) {
- pointer_type = rel_ptr->RelativeMultiPointer.pointer_type;
- base_integer = rel_ptr->RelativeMultiPointer.base_integer;
- }
-
- value = lb_emit_conv(p, value, pointer_type);
-
- GB_ASSERT(is_type_pointer(addr.addr.type));
- lbValue ptr = lb_emit_conv(p, addr.addr, t_uintptr);
- lbValue val_ptr = lb_emit_conv(p, value, t_uintptr);
- lbValue offset = {};
- offset.value = LLVMBuildSub(p->builder, val_ptr.value, ptr.value, "");
- offset.type = t_uintptr;
-
- if (!is_type_unsigned(base_integer)) {
- offset = lb_emit_conv(p, offset, t_i64);
- }
- offset = lb_emit_conv(p, offset, base_integer);
-
- lbValue offset_ptr = lb_emit_conv(p, addr.addr, alloc_type_pointer(base_integer));
- offset = lb_emit_select(p,
- lb_emit_comp(p, Token_CmpEq, val_ptr, lb_const_nil(p->module, t_uintptr)),
- lb_const_nil(p->module, base_integer),
- offset
- );
- LLVMBuildStore(p->builder, offset.value, offset_ptr.value);
- return;
-
} else if (addr.kind == lbAddr_Map) {
lb_internal_dynamic_map_set(p, addr.addr, addr.map.type, addr.map.key, value, p->curr_stmt);
return;
@@ -1119,7 +1057,7 @@ gb_internal lbValue lb_emit_load(lbProcedure *p, lbValue value) {
Type *vt = base_type(value.type);
GB_ASSERT(vt->kind == Type_MultiPointer);
Type *t = vt->MultiPointer.elem;
- LLVMValueRef v = LLVMBuildLoad2(p->builder, lb_type(p->module, t), value.value, "");
+ LLVMValueRef v = OdinLLVMBuildLoad(p, lb_type(p->module, t), value.value);
return lbValue{v, t};
} else if (is_type_soa_pointer(value.type)) {
lbValue ptr = lb_emit_struct_ev(p, value, 0);
@@ -1130,16 +1068,7 @@ gb_internal lbValue lb_emit_load(lbProcedure *p, lbValue value) {
GB_ASSERT_MSG(is_type_pointer(value.type), "%s", type_to_string(value.type));
Type *t = type_deref(value.type);
- LLVMValueRef v = LLVMBuildLoad2(p->builder, lb_type(p->module, t), value.value, "");
-
- // If it is not an instruction it isn't a GEP, so we don't need to track alignment in the metadata,
- // which is not possible anyway (only LLVM instructions can have metadata).
- if (LLVMIsAInstruction(value.value)) {
- u64 is_packed = lb_get_metadata_custom_u64(p->module, value.value, ODIN_METADATA_IS_PACKED);
- if (is_packed != 0) {
- LLVMSetAlignment(v, 1);
- }
- }
+ LLVMValueRef v = OdinLLVMBuildLoad(p, lb_type(p->module, t), value.value);
return lbValue{v, t};
}
@@ -1225,46 +1154,6 @@ gb_internal lbValue lb_addr_load(lbProcedure *p, lbAddr const &addr) {
}
return r;
- } else if (addr.kind == lbAddr_RelativePointer) {
- Type *rel_ptr = base_type(lb_addr_type(addr));
- Type *base_integer = nullptr;
- Type *pointer_type = nullptr;
- GB_ASSERT(rel_ptr->kind == Type_RelativePointer ||
- rel_ptr->kind == Type_RelativeMultiPointer);
-
- if (rel_ptr->kind == Type_RelativePointer) {
- base_integer = rel_ptr->RelativePointer.base_integer;
- pointer_type = rel_ptr->RelativePointer.pointer_type;
- } else if (rel_ptr->kind == Type_RelativeMultiPointer) {
- base_integer = rel_ptr->RelativeMultiPointer.base_integer;
- pointer_type = rel_ptr->RelativeMultiPointer.pointer_type;
- }
-
- lbValue ptr = lb_emit_conv(p, addr.addr, t_uintptr);
- lbValue offset = lb_emit_conv(p, ptr, alloc_type_pointer(base_integer));
- offset = lb_emit_load(p, offset);
-
-
- if (!is_type_unsigned(base_integer)) {
- offset = lb_emit_conv(p, offset, t_i64);
- }
- offset = lb_emit_conv(p, offset, t_uintptr);
- lbValue absolute_ptr = lb_emit_arith(p, Token_Add, ptr, offset, t_uintptr);
- absolute_ptr = lb_emit_conv(p, absolute_ptr, pointer_type);
-
- lbValue cond = lb_emit_comp(p, Token_CmpEq, offset, lb_const_nil(p->module, base_integer));
-
- // NOTE(bill): nil check
- lbValue nil_ptr = lb_const_nil(p->module, pointer_type);
- lbValue final_ptr = {};
- final_ptr.type = absolute_ptr.type;
- final_ptr.value = LLVMBuildSelect(p->builder, cond.value, nil_ptr.value, absolute_ptr.value, "");
-
- if (rel_ptr->kind == Type_RelativeMultiPointer) {
- return final_ptr;
- }
- return lb_emit_load(p, final_ptr);
-
} else if (addr.kind == lbAddr_Map) {
Type *map_type = base_type(type_deref(addr.addr.type));
GB_ASSERT(map_type->kind == Type_Map);
@@ -1413,7 +1302,7 @@ gb_internal lbValue lb_addr_load(lbProcedure *p, lbAddr const &addr) {
LLVMTypeRef vector_type = nullptr;
if (lb_try_vector_cast(p->module, addr.addr, &vector_type)) {
LLVMValueRef vp = LLVMBuildPointerCast(p->builder, addr.addr.value, LLVMPointerType(vector_type, 0), "");
- LLVMValueRef v = LLVMBuildLoad2(p->builder, vector_type, vp, "");
+ LLVMValueRef v = OdinLLVMBuildLoad(p, vector_type, vp);
LLVMValueRef scalars[4] = {};
for (u8 i = 0; i < addr.swizzle.count; i++) {
scalars[i] = LLVMConstInt(lb_type(p->module, t_u32), addr.swizzle.indices[i], false);
@@ -2357,13 +2246,6 @@ gb_internal LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
case Type_SimdVector:
return LLVMVectorType(lb_type(m, type->SimdVector.elem), cast(unsigned)type->SimdVector.count);
-
- case Type_RelativePointer:
- return lb_type_internal(m, type->RelativePointer.base_integer);
- case Type_RelativeMultiPointer:
- return lb_type_internal(m, type->RelativeMultiPointer.base_integer);
-
-
case Type_Matrix:
{
@@ -2710,7 +2592,7 @@ general_end:;
if (LLVMIsALoadInst(val) && (src_size >= dst_size && src_align >= dst_align)) {
LLVMValueRef val_ptr = LLVMGetOperand(val, 0);
val_ptr = LLVMBuildPointerCast(p->builder, val_ptr, LLVMPointerType(dst_type, 0), "");
- LLVMValueRef loaded_val = LLVMBuildLoad2(p->builder, dst_type, val_ptr, "");
+ LLVMValueRef loaded_val = OdinLLVMBuildLoad(p, dst_type, val_ptr);
// LLVMSetAlignment(loaded_val, gb_min(src_align, dst_align));
@@ -2726,7 +2608,7 @@ general_end:;
LLVMValueRef nptr = LLVMBuildPointerCast(p->builder, ptr, LLVMPointerType(src_type, 0), "");
LLVMBuildStore(p->builder, val, nptr);
- return LLVMBuildLoad2(p->builder, dst_type, ptr, "");
+ return OdinLLVMBuildLoad(p, dst_type, ptr);
}
}
diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp
index d84599eb0..5aee5b639 100644
--- a/src/llvm_backend_proc.cpp
+++ b/src/llvm_backend_proc.cpp
@@ -2568,7 +2568,7 @@ gb_internal lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValu
case BuiltinProc_atomic_load_explicit: {
lbValue dst = lb_build_expr(p, ce->args[0]);
- LLVMValueRef instr = LLVMBuildLoad2(p->builder, lb_type(p->module, type_deref(dst.type)), dst.value, "");
+ LLVMValueRef instr = OdinLLVMBuildLoad(p, lb_type(p->module, type_deref(dst.type)), dst.value);
switch (id) {
case BuiltinProc_non_temporal_load:
{
@@ -2621,8 +2621,7 @@ gb_internal lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValu
if (is_type_simd_vector(t)) {
lbValue res = {};
res.type = t;
- res.value = LLVMBuildLoad2(p->builder, lb_type(p->module, t), src.value, "");
- LLVMSetAlignment(res.value, 1);
+ res.value = OdinLLVMBuildLoadAligned(p, lb_type(p->module, t), src.value, 1);
return res;
} else {
lbAddr dst = lb_add_local_generated(p, t, false);
diff --git a/src/llvm_backend_stmt.cpp b/src/llvm_backend_stmt.cpp
index df3d4bc03..06d66ac80 100644
--- a/src/llvm_backend_stmt.cpp
+++ b/src/llvm_backend_stmt.cpp
@@ -2001,7 +2001,7 @@ gb_internal void lb_build_return_stmt_internal(lbProcedure *p, lbValue res) {
LLVMValueRef ptr = p->temp_callee_return_struct_memory;
LLVMValueRef nptr = LLVMBuildPointerCast(p->builder, ptr, LLVMPointerType(src_type, 0), "");
LLVMBuildStore(p->builder, ret_val, nptr);
- ret_val = LLVMBuildLoad2(p->builder, ret_type, ptr, "");
+ ret_val = OdinLLVMBuildLoad(p, ret_type, ptr);
} else {
ret_val = OdinLLVMBuildTransmute(p, ret_val, ret_type);
}
@@ -2018,14 +2018,7 @@ gb_internal void lb_build_return_stmt_internal(lbProcedure *p, lbValue res) {
gb_internal void lb_build_return_stmt(lbProcedure *p, Slice<Ast *> const &return_results) {
lb_ensure_abi_function_type(p->module, p);
- lbValue res = {};
-
- TypeTuple *tuple = &p->type->Proc.results->Tuple;
isize return_count = p->type->Proc.result_count;
- isize res_count = return_results.count;
-
- lbFunctionType *ft = lb_get_function_type(p->module, p->type);
- bool return_by_pointer = ft->ret.kind == lbArg_Indirect;
if (return_count == 0) {
// No return values
@@ -2038,7 +2031,17 @@ gb_internal void lb_build_return_stmt(lbProcedure *p, Slice<Ast *> const &return
LLVMBuildRetVoid(p->builder);
}
return;
- } else if (return_count == 1) {
+ }
+
+ lbValue res = {};
+
+ TypeTuple *tuple = &p->type->Proc.results->Tuple;
+ isize res_count = return_results.count;
+
+ lbFunctionType *ft = lb_get_function_type(p->module, p->type);
+ bool return_by_pointer = ft->ret.kind == lbArg_Indirect;
+
+ if (return_count == 1) {
Entity *e = tuple->variables[0];
if (res_count == 0) {
rw_mutex_shared_lock(&p->module->values_mutex);
diff --git a/src/llvm_backend_type.cpp b/src/llvm_backend_type.cpp
index 9d4505bb0..6c12b37be 100644
--- a/src/llvm_backend_type.cpp
+++ b/src/llvm_backend_type.cpp
@@ -43,6 +43,8 @@ gb_internal u64 lb_typeid_kind(lbModule *m, Type *type, u64 id=0) {
if (flags & BasicFlag_Pointer) kind = Typeid_Pointer;
if (flags & BasicFlag_String) kind = Typeid_String;
if (flags & BasicFlag_Rune) kind = Typeid_Rune;
+
+ if (bt->Basic.kind == Basic_typeid) kind = Typeid_Type_Id;
} break;
case Type_Pointer: kind = Typeid_Pointer; break;
case Type_MultiPointer: kind = Typeid_Multi_Pointer; break;
@@ -59,8 +61,6 @@ gb_internal u64 lb_typeid_kind(lbModule *m, Type *type, u64 id=0) {
case Type_Proc: kind = Typeid_Procedure; break;
case Type_BitSet: kind = Typeid_Bit_Set; break;
case Type_SimdVector: kind = Typeid_Simd_Vector; break;
- case Type_RelativePointer: kind = Typeid_Relative_Pointer; break;
- case Type_RelativeMultiPointer: kind = Typeid_Relative_Multi_Pointer; break;
case Type_SoaPointer: kind = Typeid_SoaPointer; break;
case Type_BitField: kind = Typeid_Bit_Field; break;
}
@@ -948,30 +948,6 @@ gb_internal void lb_setup_type_info_data_giant_array(lbModule *m, i64 global_typ
}
break;
- case Type_RelativePointer:
- {
- tag_type = t_type_info_relative_pointer;
- LLVMValueRef vals[2] = {
- get_type_info_ptr(m, t->RelativePointer.pointer_type),
- get_type_info_ptr(m, t->RelativePointer.base_integer),
- };
-
- variant_value = llvm_const_named_struct(m, tag_type, vals, gb_count_of(vals));
- }
- break;
-
- case Type_RelativeMultiPointer:
- {
- tag_type = t_type_info_relative_multi_pointer;
- LLVMValueRef vals[2] = {
- get_type_info_ptr(m, t->RelativeMultiPointer.pointer_type),
- get_type_info_ptr(m, t->RelativeMultiPointer.base_integer),
- };
-
- variant_value = llvm_const_named_struct(m, tag_type, vals, gb_count_of(vals));
- }
- break;
-
case Type_Matrix:
{
tag_type = t_type_info_matrix;
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp
index f63c42ab9..a2a0ba4cc 100644
--- a/src/llvm_backend_utility.cpp
+++ b/src/llvm_backend_utility.cpp
@@ -124,8 +124,16 @@ gb_internal void lb_mem_zero_ptr(lbProcedure *p, LLVMValueRef ptr, Type *type, u
switch (kind) {
case LLVMStructTypeKind:
case LLVMArrayTypeKind:
- // NOTE(bill): Enforce zeroing through memset to make sure padding is zeroed too
- lb_mem_zero_ptr_internal(p, ptr, lb_const_int(p->module, t_int, sz).value, alignment, false);
+ if (is_type_tuple(type)) {
+ // NOTE(bill): even though this should be safe, to keep ASAN happy, do not zero the implicit padding at the end
+ GB_ASSERT(type->kind == Type_Tuple);
+ i64 n = type->Tuple.variables.count-1;
+ i64 end_offset = type->Tuple.offsets[n] + type_size_of(type->Tuple.variables[n]->type);
+ lb_mem_zero_ptr_internal(p, ptr, lb_const_int(p->module, t_int, end_offset).value, alignment, false);
+ } else {
+ // NOTE(bill): Enforce zeroing through memset to make sure padding is zeroed too
+ lb_mem_zero_ptr_internal(p, ptr, lb_const_int(p->module, t_int, sz).value, alignment, false);
+ }
break;
default:
LLVMBuildStore(p->builder, LLVMConstNull(lb_type(p->module, type)), ptr);
@@ -269,7 +277,7 @@ gb_internal lbValue lb_emit_transmute(lbProcedure *p, lbValue value, Type *t) {
if (lb_try_update_alignment(ptr, align)) {
LLVMTypeRef result_type = lb_type(p->module, t);
res.value = LLVMBuildPointerCast(p->builder, ptr.value, LLVMPointerType(result_type, 0), "");
- res.value = LLVMBuildLoad2(p->builder, result_type, res.value, "");
+ res.value = OdinLLVMBuildLoad(p, result_type, res.value);
return res;
}
lbAddr addr = lb_add_local_generated(p, t, false);
@@ -1123,10 +1131,6 @@ gb_internal lbValue lb_emit_struct_ep(lbProcedure *p, lbValue s, i32 index) {
Type *t = base_type(type_deref(s.type));
Type *result_type = nullptr;
- if (is_type_relative_pointer(t)) {
- s = lb_addr_get_ptr(p, lb_addr(s));
- }
-
if (is_type_struct(t)) {
result_type = get_struct_field_type(t, index);
} else if (is_type_union(t)) {
@@ -1432,8 +1436,6 @@ gb_internal lbValue lb_emit_deep_field_gep(lbProcedure *p, lbValue e, Selection
e = lb_emit_array_epi(p, e, index);
} else if (type->kind == Type_Map) {
e = lb_emit_struct_ep(p, e, index);
- } else if (type->kind == Type_RelativePointer) {
- e = lb_emit_struct_ep(p, e, index);
} else {
GB_PANIC("un-gep-able type %s", type_to_string(type));
}
diff --git a/src/main.cpp b/src/main.cpp
index a969e32a9..8a5339000 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -328,6 +328,8 @@ enum BuildFlagKind {
BuildFlag_NoRPath,
BuildFlag_NoEntryPoint,
BuildFlag_UseLLD,
+ BuildFlag_UseRADLink,
+ BuildFlag_Linker,
BuildFlag_UseSeparateModules,
BuildFlag_NoThreadedChecker,
BuildFlag_ShowDebugMessages,
@@ -539,6 +541,8 @@ gb_internal bool parse_build_flags(Array<String> args) {
add_flag(&build_flags, BuildFlag_NoRPath, str_lit("no-rpath"), BuildFlagParam_None, Command__does_build);
add_flag(&build_flags, BuildFlag_NoEntryPoint, str_lit("no-entry-point"), BuildFlagParam_None, Command__does_check &~ Command_test);
add_flag(&build_flags, BuildFlag_UseLLD, str_lit("lld"), BuildFlagParam_None, Command__does_build);
+ add_flag(&build_flags, BuildFlag_UseRADLink, str_lit("radlink"), BuildFlagParam_None, Command__does_build);
+ add_flag(&build_flags, BuildFlag_Linker, str_lit("linker"), BuildFlagParam_String, Command__does_build);
add_flag(&build_flags, BuildFlag_UseSeparateModules, str_lit("use-separate-modules"), BuildFlagParam_None, Command__does_build);
add_flag(&build_flags, BuildFlag_NoThreadedChecker, str_lit("no-threaded-checker"), BuildFlagParam_None, Command__does_check);
add_flag(&build_flags, BuildFlag_ShowDebugMessages, str_lit("show-debug-messages"), BuildFlagParam_None, Command_all);
@@ -1060,27 +1064,29 @@ gb_internal bool parse_build_flags(Array<String> args) {
}
if (!found) {
- struct DistanceAndTargetIndex {
- isize distance;
- isize target_index;
- };
+ if (str != "?") {
+ struct DistanceAndTargetIndex {
+ isize distance;
+ isize target_index;
+ };
- DistanceAndTargetIndex distances[gb_count_of(named_targets)] = {};
- for (isize i = 0; i < gb_count_of(named_targets); i++) {
- distances[i].target_index = i;
- distances[i].distance = levenstein_distance_case_insensitive(str, named_targets[i].name);
- }
- gb_sort_array(distances, gb_count_of(distances), gb_isize_cmp(gb_offset_of(DistanceAndTargetIndex, distance)));
+ DistanceAndTargetIndex distances[gb_count_of(named_targets)] = {};
+ for (isize i = 0; i < gb_count_of(named_targets); i++) {
+ distances[i].target_index = i;
+ distances[i].distance = levenstein_distance_case_insensitive(str, named_targets[i].name);
+ }
+ gb_sort_array(distances, gb_count_of(distances), gb_isize_cmp(gb_offset_of(DistanceAndTargetIndex, distance)));
- gb_printf_err("Unknown target '%.*s'\n", LIT(str));
+ gb_printf_err("Unknown target '%.*s'\n", LIT(str));
- if (distances[0].distance <= MAX_SMALLEST_DID_YOU_MEAN_DISTANCE) {
- gb_printf_err("Did you mean:\n");
- for (isize i = 0; i < gb_count_of(named_targets); i++) {
- if (distances[i].distance > MAX_SMALLEST_DID_YOU_MEAN_DISTANCE) {
- break;
+ if (distances[0].distance <= MAX_SMALLEST_DID_YOU_MEAN_DISTANCE) {
+ gb_printf_err("Did you mean:\n");
+ for (isize i = 0; i < gb_count_of(named_targets); i++) {
+ if (distances[i].distance > MAX_SMALLEST_DID_YOU_MEAN_DISTANCE) {
+ break;
+ }
+ gb_printf_err("\t%.*s\n", LIT(named_targets[distances[i].target_index].name));
}
- gb_printf_err("\t%.*s\n", LIT(named_targets[distances[i].target_index].name));
}
}
gb_printf_err("All supported targets:\n");
@@ -1199,8 +1205,38 @@ gb_internal bool parse_build_flags(Array<String> args) {
build_context.no_thread_local = true;
break;
case BuildFlag_UseLLD:
- build_context.use_lld = true;
+ gb_printf_err("Warning: Use of -lld has been deprecated in favour of -linker:lld\n");
+ build_context.linker_choice = Linker_lld;
+ break;
+ case BuildFlag_UseRADLink:
+ gb_printf_err("Warning: Use of -lld has been deprecated in favour of -linker:radlink\n");
+ build_context.linker_choice = Linker_radlink;
+ break;
+ case BuildFlag_Linker:
+ {
+ GB_ASSERT(value.kind == ExactValue_String);
+ LinkerChoice linker_choice = Linker_Invalid;
+
+ for (i32 i = 0; i < Linker_COUNT; i++) {
+ if (linker_choices[i] == value.value_string) {
+ linker_choice = cast(LinkerChoice)i;
+ break;
+ }
+ }
+
+ if (linker_choice == Linker_Invalid) {
+ gb_printf_err("Invalid option for -linker:<string>. Expected one of the following\n");
+ for (i32 i = 0; i < Linker_COUNT; i++) {
+ gb_printf_err("\t%.*s\n", LIT(linker_choices[i]));
+ }
+ bad_flags = true;
+ } else {
+ build_context.linker_choice = linker_choice;
+ }
+ }
break;
+
+
case BuildFlag_UseSeparateModules:
build_context.use_separate_modules = true;
break;
@@ -1408,7 +1444,7 @@ gb_internal bool parse_build_flags(Array<String> args) {
build_context.terse_errors = true;
break;
case BuildFlag_VerboseErrors:
- gb_printf_err("-verbose-errors is not the default, -terse-errors can now disable it\n");
+ gb_printf_err("-verbose-errors is now the default, -terse-errors can disable it\n");
build_context.hide_error_line = false;
build_context.terse_errors = false;
break;
@@ -1747,7 +1783,7 @@ gb_internal void check_defines(BuildContext *bc, Checker *c) {
String name = make_string_c(entry.key);
ExactValue value = entry.value;
GB_ASSERT(value.kind != ExactValue_Invalid);
-
+
bool found = false;
for_array(i, c->info.defineables) {
Defineable *def = &c->info.defineables[i];
@@ -1776,9 +1812,9 @@ gb_internal void temp_alloc_defineable_strings(Checker *c) {
gb_internal GB_COMPARE_PROC(defineables_cmp) {
Defineable *x = (Defineable *)a;
Defineable *y = (Defineable *)b;
-
+
int cmp = 0;
-
+
String x_file = get_file_path_string(x->pos.file_id);
String y_file = get_file_path_string(y->pos.file_id);
cmp = string_compare(x_file, y_file);
@@ -1789,8 +1825,22 @@ gb_internal GB_COMPARE_PROC(defineables_cmp) {
return i32_cmp(x->pos.offset, y->pos.offset);
}
-gb_internal void sort_defineables(Checker *c) {
+gb_internal void sort_defineables_and_remove_duplicates(Checker *c) {
+ if (c->info.defineables.count == 0) {
+ return;
+ }
gb_sort_array(c->info.defineables.data, c->info.defineables.count, defineables_cmp);
+
+ Defineable prev = c->info.defineables[0];
+ for (isize i = 1; i < c->info.defineables.count; ) {
+ Defineable curr = c->info.defineables[i];
+ if (prev.pos == curr.pos) {
+ array_ordered_remove(&c->info.defineables, i);
+ continue;
+ }
+ prev = curr;
+ i++;
+ }
}
gb_internal void export_defineables(Checker *c, String path) {
@@ -2125,11 +2175,12 @@ gb_internal void remove_temp_files(lbGenerator *gen) {
}
-gb_internal void print_show_help(String const arg0, String const &command) {
+gb_internal void print_show_help(String const arg0, String const &command, String optional_flag = {}) {
print_usage_line(0, "%.*s is a tool for managing Odin source code.", LIT(arg0));
print_usage_line(0, "Usage:");
print_usage_line(1, "%.*s %.*s [arguments]", LIT(arg0), LIT(command));
print_usage_line(0, "");
+ defer (print_usage_line(0, ""));
if (command == "build") {
print_usage_line(1, "build Compiles directory of .odin files as an executable.");
@@ -2175,475 +2226,560 @@ gb_internal void print_show_help(String const arg0, String const &command) {
bool check_only = command == "check" || strip_semicolon;
bool check = run_or_build || check_only;
+ if (command == "help") {
+ doc = true;
+ build = true;
+ run_or_build = true;
+ test_only = true;
+ strip_semicolon = true;
+ check_only = true;
+ check = true;
+ }
+
print_usage_line(0, "");
print_usage_line(1, "Flags");
print_usage_line(0, "");
- if (check) {
- print_usage_line(1, "-file");
- print_usage_line(2, "Tells `%.*s %.*s` to treat the given file as a self-contained package.", LIT(arg0), LIT(command));
- print_usage_line(2, "This means that `<dir>/a.odin` won't have access to `<dir>/b.odin`'s contents.");
- print_usage_line(0, "");
- }
- if (doc) {
- print_usage_line(1, "-short");
- print_usage_line(2, "Shows shortened documentation for the packages.");
- print_usage_line(0, "");
- print_usage_line(1, "-all-packages");
- print_usage_line(2, "Generates documentation for all packages used in the current project.");
+ auto const print_flag = [&optional_flag](char const *flag) -> bool {
+ if (optional_flag.len != 0) {
+ String f = make_string_c(flag);
+ isize i = string_index_byte(f, ':');
+ if (i >= 0) {
+ f.len = i;
+ }
+ if (optional_flag != f) {
+ return false;
+ }
+ }
print_usage_line(0, "");
+ print_usage_line(1, flag);
+ return true;
+ };
- print_usage_line(1, "-doc-format");
- print_usage_line(2, "Generates documentation as the .odin-doc format (useful for external tooling).");
- print_usage_line(0, "");
- print_usage_line(1, "-out:<filepath>");
- print_usage_line(2, "Sets the base name of the resultig .odin-doc file.");
- print_usage_line(2, "The extension can be optionally included; the resulting file will always have an extension of '.odin-doc'.");
- print_usage_line(2, "Example: -out:foo");
- print_usage_line(0, "");
+ if (doc) {
+ if (print_flag("-all-packages")) {
+ print_usage_line(2, "Generates documentation for all packages used in the current project.");
+ }
+ }
+ if (test_only) {
+ if (print_flag("-all-packages")) {
+ print_usage_line(2, "Tests all packages imported into the given initial package.");
+ }
}
- if (run_or_build) {
- print_usage_line(1, "-out:<filepath>");
- print_usage_line(2, "Sets the file name of the outputted executable.");
- print_usage_line(2, "Example: -out:foo.exe");
- print_usage_line(0, "");
-
- print_usage_line(1, "-o:<string>");
- print_usage_line(2, "Sets the optimization mode for compilation.");
- print_usage_line(2, "Available options:");
- print_usage_line(3, "-o:none");
- print_usage_line(3, "-o:minimal");
- print_usage_line(3, "-o:size");
- print_usage_line(3, "-o:speed");
- if (LB_USE_NEW_PASS_SYSTEM) {
- print_usage_line(3, "-o:aggressive");
- }
- print_usage_line(2, "The default is -o:minimal.");
- print_usage_line(0, "");
+ if (build) {
+ if (print_flag("-build-mode:<mode>")) {
+ print_usage_line(2, "Sets the build mode.");
+ print_usage_line(2, "Available options:");
+ print_usage_line(3, "-build-mode:exe Builds as an executable.");
+ print_usage_line(3, "-build-mode:test Builds as an executable that executes tests.");
+ print_usage_line(3, "-build-mode:dll Builds as a dynamically linked library.");
+ print_usage_line(3, "-build-mode:shared Builds as a dynamically linked library.");
+ print_usage_line(3, "-build-mode:dynamic Builds as a dynamically linked library.");
+ print_usage_line(3, "-build-mode:lib Builds as a statically linked library.");
+ print_usage_line(3, "-build-mode:static Builds as a statically linked library.");
+ print_usage_line(3, "-build-mode:obj Builds as an object file.");
+ print_usage_line(3, "-build-mode:object Builds as an object file.");
+ print_usage_line(3, "-build-mode:assembly Builds as an assembly file.");
+ print_usage_line(3, "-build-mode:assembler Builds as an assembly file.");
+ print_usage_line(3, "-build-mode:asm Builds as an assembly file.");
+ print_usage_line(3, "-build-mode:llvm-ir Builds as an LLVM IR file.");
+ print_usage_line(3, "-build-mode:llvm Builds as an LLVM IR file.");
+ }
}
if (check) {
- print_usage_line(1, "-show-timings");
- print_usage_line(2, "Shows basic overview of the timings of different stages within the compiler in milliseconds.");
- print_usage_line(0, "");
+ if (print_flag("-collection:<name>=<filepath>")) {
+ print_usage_line(2, "Defines a library collection used for imports.");
+ print_usage_line(2, "Example: -collection:shared=dir/to/shared");
+ print_usage_line(2, "Usage in Code:");
+ print_usage_line(3, "import \"shared:foo\"");
+ }
- print_usage_line(1, "-show-more-timings");
- print_usage_line(2, "Shows an advanced overview of the timings of different stages within the compiler in milliseconds.");
- print_usage_line(0, "");
+ if (print_flag("-custom-attribute:<string>")) {
+ print_usage_line(2, "Add a custom attribute which will be ignored if it is unknown.");
+ print_usage_line(2, "This can be used with metaprogramming tools.");
+ print_usage_line(2, "Examples:");
+ print_usage_line(3, "-custom-attribute:my_tag");
+ print_usage_line(3, "-custom-attribute:my_tag,the_other_thing");
+ print_usage_line(3, "-custom-attribute:my_tag -custom-attribute:the_other_thing");
+ }
+ }
- print_usage_line(1, "-show-system-calls");
- print_usage_line(2, "Prints the whole command and arguments for calls to external tools like linker and assembler.");
- print_usage_line(0, "");
+ if (run_or_build) {
+ if (print_flag("-debug")) {
+ print_usage_line(2, "Enables debug information, and defines the global constant ODIN_DEBUG to be 'true'.");
+ }
+ }
- print_usage_line(1, "-export-timings:<format>");
- print_usage_line(2, "Exports timings to one of a few formats. Requires `-show-timings` or `-show-more-timings`.");
- print_usage_line(2, "Available options:");
- print_usage_line(3, "-export-timings:json Exports compile time stats to JSON.");
- print_usage_line(3, "-export-timings:csv Exports compile time stats to CSV.");
- print_usage_line(0, "");
+ if (check) {
+ if (print_flag("-default-to-nil-allocator")) {
+ print_usage_line(2, "Sets the default allocator to be the nil_allocator, an allocator which does nothing.");
+ }
- print_usage_line(1, "-export-timings-file:<filename>");
- print_usage_line(2, "Specifies the filename for `-export-timings`.");
- print_usage_line(2, "Example: -export-timings-file:timings.json");
- print_usage_line(0, "");
+ if (print_flag("-define:<name>=<value>")) {
+ print_usage_line(2, "Defines a scalar boolean, integer or string as global constant.");
+ print_usage_line(2, "Example: -define:SPAM=123");
+ print_usage_line(2, "Usage in code:");
+ print_usage_line(3, "#config(SPAM, default_value)");
+ }
+ }
- print_usage_line(1, "-export-dependencies:<format>");
- print_usage_line(2, "Exports dependencies to one of a few formats. Requires `-export-dependencies-file`.");
- print_usage_line(2, "Available options:");
- print_usage_line(3, "-export-dependencies:make Exports in Makefile format");
- print_usage_line(3, "-export-dependencies:json Exports in JSON format");
- print_usage_line(0, "");
+ if (run_or_build) {
+ if (print_flag("-disable-assert")) {
+ print_usage_line(2, "Disables the code generation of the built-in run-time 'assert' procedure, and defines the global constant ODIN_DISABLE_ASSERT to be 'true'.");
+ }
- print_usage_line(1, "-export-dependencies-file:<filename>");
- print_usage_line(2, "Specifies the filename for `-export-dependencies`.");
- print_usage_line(2, "Example: -export-dependencies-file:dependencies.d");
- print_usage_line(0, "");
+ if (print_flag("-disable-red-zone")) {
+ print_usage_line(2, "Disables red zone on a supported freestanding target.");
+ }
+ }
- print_usage_line(1, "-thread-count:<integer>");
- print_usage_line(2, "Overrides the number of threads the compiler will use to compile with.");
- print_usage_line(2, "Example: -thread-count:2");
- print_usage_line(0, "");
+ if (check) {
+ if (print_flag("-disallow-do")) {
+ print_usage_line(2, "Disallows the 'do' keyword in the project.");
+ }
}
- if (check_only) {
- print_usage_line(1, "-show-unused");
- print_usage_line(2, "Shows unused package declarations within the current project.");
- print_usage_line(0, "");
- print_usage_line(1, "-show-unused-with-location");
- print_usage_line(2, "Shows unused package declarations within the current project with the declarations source location.");
- print_usage_line(0, "");
+ if (doc) {
+ if (print_flag("-doc-format")) {
+ print_usage_line(2, "Generates documentation as the .odin-doc format (useful for external tooling).");
+ }
}
if (run_or_build) {
- print_usage_line(1, "-keep-temp-files");
- print_usage_line(2, "Keeps the temporary files generated during compilation.");
- print_usage_line(0, "");
- } else if (strip_semicolon) {
- print_usage_line(1, "-keep-temp-files");
- print_usage_line(2, "Keeps the temporary files generated during stripping the unneeded semicolons from files.");
- print_usage_line(0, "");
+ if (print_flag("-dynamic-map-calls")) {
+ print_usage_line(2, "Uses dynamic map calls to minimize code generation at the cost of runtime execution.");
+ }
}
if (check) {
- print_usage_line(1, "-collection:<name>=<filepath>");
- print_usage_line(2, "Defines a library collection used for imports.");
- print_usage_line(2, "Example: -collection:shared=dir/to/shared");
- print_usage_line(2, "Usage in Code:");
- print_usage_line(3, "import \"shared:foo\"");
- print_usage_line(0, "");
+ if (print_flag("-error-pos-style:<string>")) {
+ print_usage_line(2, "Available options:");
+ print_usage_line(3, "-error-pos-style:unix file/path:45:3:");
+ print_usage_line(3, "-error-pos-style:odin file/path(45:3)");
+ print_usage_line(3, "-error-pos-style:default (Defaults to 'odin'.)");
+ }
- print_usage_line(1, "-define:<name>=<value>");
- print_usage_line(2, "Defines a scalar boolean, integer or string as global constant.");
- print_usage_line(2, "Example: -define:SPAM=123");
- print_usage_line(2, "Usage in code:");
- print_usage_line(3, "#config(SPAM, default_value)");
- print_usage_line(0, "");
+ if (print_flag("-export-defineables:<filename>")) {
+ print_usage_line(2, "Exports an overview of all the #config/#defined usages in CSV format to the given file path.");
+ print_usage_line(2, "Example: -export-defineables:defineables.csv");
+ }
- print_usage_line(1, "-show-defineables");
- print_usage_line(2, "Shows an overview of all the #config/#defined usages in the project.");
- print_usage_line(0, "");
+ if (print_flag("-export-dependencies:<format>")) {
+ print_usage_line(2, "Exports dependencies to one of a few formats. Requires `-export-dependencies-file`.");
+ print_usage_line(2, "Available options:");
+ print_usage_line(3, "-export-dependencies:make Exports in Makefile format");
+ print_usage_line(3, "-export-dependencies:json Exports in JSON format");
+ }
- print_usage_line(1, "-export-defineables:<filename>");
- print_usage_line(2, "Exports an overview of all the #config/#defined usages in CSV format to the given file path.");
- print_usage_line(2, "Example: -export-defineables:defineables.csv");
- print_usage_line(0, "");
- }
+ if (print_flag("-export-dependencies-file:<filename>")) {
+ print_usage_line(2, "Specifies the filename for `-export-dependencies`.");
+ print_usage_line(2, "Example: -export-dependencies-file:dependencies.d");
+ }
- if (build) {
- print_usage_line(1, "-build-mode:<mode>");
- print_usage_line(2, "Sets the build mode.");
- print_usage_line(2, "Available options:");
- print_usage_line(3, "-build-mode:exe Builds as an executable.");
- print_usage_line(3, "-build-mode:test Builds as an executable that executes tests.");
- print_usage_line(3, "-build-mode:dll Builds as a dynamically linked library.");
- print_usage_line(3, "-build-mode:shared Builds as a dynamically linked library.");
- print_usage_line(3, "-build-mode:lib Builds as a statically linked library.");
- print_usage_line(3, "-build-mode:static Builds as a statically linked library.");
- print_usage_line(3, "-build-mode:obj Builds as an object file.");
- print_usage_line(3, "-build-mode:object Builds as an object file.");
- print_usage_line(3, "-build-mode:assembly Builds as an assembly file.");
- print_usage_line(3, "-build-mode:assembler Builds as an assembly file.");
- print_usage_line(3, "-build-mode:asm Builds as an assembly file.");
- print_usage_line(3, "-build-mode:llvm-ir Builds as an LLVM IR file.");
- print_usage_line(3, "-build-mode:llvm Builds as an LLVM IR file.");
- print_usage_line(0, "");
- }
+ if (print_flag("-export-timings:<format>")) {
+ print_usage_line(2, "Exports timings to one of a few formats. Requires `-show-timings` or `-show-more-timings`.");
+ print_usage_line(2, "Available options:");
+ print_usage_line(3, "-export-timings:json Exports compile time stats to JSON.");
+ print_usage_line(3, "-export-timings:csv Exports compile time stats to CSV.");
+ }
- if (check) {
- print_usage_line(1, "-target:<string>");
- print_usage_line(2, "Sets the target for the executable to be built in.");
- print_usage_line(0, "");
+ if (print_flag("-export-timings-file:<filename>")) {
+ print_usage_line(2, "Specifies the filename for `-export-timings`.");
+ print_usage_line(2, "Example: -export-timings-file:timings.json");
+ }
}
if (run_or_build) {
- print_usage_line(1, "-debug");
- print_usage_line(2, "Enables debug information, and defines the global constant ODIN_DEBUG to be 'true'.");
- print_usage_line(0, "");
+ if (print_flag("-extra-assembler-flags:<string>")) {
+ print_usage_line(2, "Adds extra assembler specific flags in a string.");
+ }
- print_usage_line(1, "-disable-assert");
- print_usage_line(2, "Disables the code generation of the built-in run-time 'assert' procedure, and defines the global constant ODIN_DISABLE_ASSERT to be 'true'.");
- print_usage_line(0, "");
+ if (print_flag("-extra-linker-flags:<string>")) {
+ print_usage_line(2, "Adds extra linker specific flags in a string.");
+ }
+ }
- print_usage_line(1, "-no-bounds-check");
- print_usage_line(2, "Disables bounds checking program wide.");
- print_usage_line(0, "");
+ if (check) {
+ if (print_flag("-file")) {
+ print_usage_line(2, "Tells `%.*s %.*s` to treat the given file as a self-contained package.", LIT(arg0), LIT(command));
+ print_usage_line(2, "This means that `<dir>/a.odin` won't have access to `<dir>/b.odin`'s contents.");
+ }
- print_usage_line(1, "-no-type-assert");
- print_usage_line(2, "Disables type assertion checking program wide.");
- print_usage_line(0, "");
+ if (print_flag("-foreign-error-procedures")) {
+ print_usage_line(2, "States that the error procedures used in the runtime are defined in a separate translation unit.");
+ }
- print_usage_line(1, "-no-crt");
- print_usage_line(2, "Disables automatic linking with the C Run Time.");
- print_usage_line(0, "");
+ if (print_flag("-ignore-unknown-attributes")) {
+ print_usage_line(2, "Ignores unknown attributes.");
+ print_usage_line(2, "This can be used with metaprogramming tools.");
+ }
+ }
- print_usage_line(1, "-no-rpath");
- print_usage_line(2, "Disables automatic addition of an rpath linked to the executable directory.");
- print_usage_line(0, "");
+ if (run_or_build) {
+ #if defined(GB_SYSTEM_WINDOWS)
+ if (print_flag("-ignore-vs-search")) {
+ print_usage_line(2, "[Windows only]");
+ print_usage_line(2, "Ignores the Visual Studio search for library paths.");
+ }
+ #endif
+ }
- print_usage_line(1, "-no-thread-local");
- print_usage_line(2, "Ignores @thread_local attribute, effectively treating the program as if it is single-threaded.");
- print_usage_line(0, "");
+ if (check) {
+ if (print_flag("-ignore-warnings")) {
+ print_usage_line(2, "Ignores warning messages.");
+ }
- print_usage_line(1, "-lld");
- print_usage_line(2, "Uses the LLD linker rather than the default.");
- print_usage_line(0, "");
+ if (print_flag("-json-errors")) {
+ print_usage_line(2, "Prints the error messages as json to stderr.");
+ }
+ }
- print_usage_line(1, "-use-separate-modules");
- print_usage_line(2, "The backend generates multiple build units which are then linked together.");
- print_usage_line(2, "Normally, a single build unit is generated for a standard project.");
- print_usage_line(2, "This is the default behaviour on Windows for '-o:none' and '-o:minimal' builds.");
- print_usage_line(0, "");
+ if (run_or_build) {
+ if (print_flag("-keep-temp-files")) {
+ print_usage_line(2, "Keeps the temporary files generated during compilation.");
+ }
+ } else if (strip_semicolon) {
+ if (print_flag("-keep-temp-files")) {
+ print_usage_line(2, "Keeps the temporary files generated during stripping the unneeded semicolons from files.");
+ }
+ }
+ if (run_or_build) {
+ if (print_flag("-linker:<string>")) {
+ print_usage_line(2, "Specify the linker to use.");
+ print_usage_line(2, "Choices:");
+ for (i32 i = 0; i < Linker_COUNT; i++) {
+ print_usage_line(3, "%.*s", LIT(linker_choices[i]));
+ }
+ }
+
+ if (print_flag("-lld")) {
+ print_usage_line(2, "Uses the LLD linker rather than the default.");
+ }
}
if (check) {
- print_usage_line(1, "-no-threaded-checker");
- print_usage_line(2, "Disables multithreading in the semantic checker stage.");
- print_usage_line(0, "");
+ if (print_flag("-max-error-count:<integer>")) {
+ print_usage_line(2, "Sets the maximum number of errors that can be displayed before the compiler terminates.");
+ print_usage_line(2, "Must be an integer >0.");
+ print_usage_line(2, "If not set, the default max error count is %d.", DEFAULT_MAX_ERROR_COLLECTOR_COUNT);
+ }
+ }
+
+ if (run_or_build) {
+ if (print_flag("-microarch:<string>")) {
+ print_usage_line(2, "Specifies the specific micro-architecture for the build in a string.");
+ print_usage_line(2, "Examples:");
+ print_usage_line(3, "-microarch:sandybridge");
+ print_usage_line(3, "-microarch:native");
+ print_usage_line(3, "-microarch:\"?\" for a list");
+ }
}
if (check) {
- print_usage_line(1, "-vet");
- print_usage_line(2, "Does extra checks on the code.");
- print_usage_line(2, "Extra checks include:");
- print_usage_line(3, "-vet-unused");
- print_usage_line(3, "-vet-unused-variables");
- print_usage_line(3, "-vet-unused-imports");
- print_usage_line(3, "-vet-shadowing");
- print_usage_line(3, "-vet-using-stmt");
- print_usage_line(0, "");
+ if (print_flag("-min-link-libs")) {
+ print_usage_line(2, "If set, the number of linked libraries will be minimized to prevent duplications.");
+ print_usage_line(2, "This is useful for so called \"dumb\" linkers compared to \"smart\" linkers.");
+ }
+ }
- print_usage_line(1, "-vet-unused");
- print_usage_line(2, "Checks for unused declarations (variables and imports).");
- print_usage_line(0, "");
+ if (run_or_build) {
+ if (print_flag("-minimum-os-version:<string>")) {
+ print_usage_line(2, "Sets the minimum OS version targeted by the application.");
+ print_usage_line(2, "Default: -minimum-os-version:11.0.0");
+ print_usage_line(2, "Only used when target is Darwin, if given, linking mismatched versions will emit a warning.");
+ }
- print_usage_line(1, "-vet-unused-variables");
- print_usage_line(2, "Checks for unused variable declarations.");
- print_usage_line(0, "");
+ if (print_flag("-no-bounds-check")) {
+ print_usage_line(2, "Disables bounds checking program wide.");
+ }
- print_usage_line(1, "-vet-unused-imports");
- print_usage_line(2, "Checks for unused import declarations.");
- print_usage_line(0, "");
+ if (print_flag("-no-crt")) {
+ print_usage_line(2, "Disables automatic linking with the C Run Time.");
+ }
+ }
- print_usage_line(1, "-vet-shadowing");
- print_usage_line(2, "Checks for variable shadowing within procedures.");
- print_usage_line(0, "");
+ if (check && command != "test") {
+ if (print_flag("-no-entry-point")) {
+ print_usage_line(2, "Removes default requirement of an entry point (e.g. main procedure).");
+ }
+ }
- print_usage_line(1, "-vet-using-stmt");
- print_usage_line(2, "Checks for the use of 'using' as a statement.");
- print_usage_line(2, "'using' is considered bad practice outside of immediate refactoring.");
- print_usage_line(0, "");
+ if (run_or_build) {
+ if (print_flag("-no-rpath")) {
+ print_usage_line(2, "Disables automatic addition of an rpath linked to the executable directory.");
+ }
- print_usage_line(1, "-vet-using-param");
- print_usage_line(2, "Checks for the use of 'using' on procedure parameters.");
- print_usage_line(2, "'using' is considered bad practice outside of immediate refactoring.");
- print_usage_line(0, "");
+ if (print_flag("-no-thread-local")) {
+ print_usage_line(2, "Ignores @thread_local attribute, effectively treating the program as if it is single-threaded.");
+ }
- print_usage_line(1, "-vet-style");
- print_usage_line(2, "Errs on missing trailing commas followed by a newline.");
- print_usage_line(2, "Errs on deprecated syntax.");
- print_usage_line(2, "Does not err on unneeded tokens (unlike -strict-style).");
- print_usage_line(0, "");
+ if (print_flag("-no-threaded-checker")) {
+ print_usage_line(2, "Disables multithreading in the semantic checker stage.");
+ }
- print_usage_line(1, "-vet-semicolon");
- print_usage_line(2, "Errs on unneeded semicolons.");
- print_usage_line(0, "");
+ if (print_flag("-no-type-assert")) {
+ print_usage_line(2, "Disables type assertion checking program wide.");
+ }
+ }
- print_usage_line(1, "-vet-cast");
- print_usage_line(2, "Errs on casting a value to its own type or using `transmute` rather than `cast`.");
- print_usage_line(0, "");
+ if (run_or_build) {
+ if (print_flag("-o:<string>")) {
+ print_usage_line(2, "Sets the optimization mode for compilation.");
+ print_usage_line(2, "Available options:");
+ print_usage_line(3, "-o:none");
+ print_usage_line(3, "-o:minimal");
+ print_usage_line(3, "-o:size");
+ print_usage_line(3, "-o:speed");
+ if (LB_USE_NEW_PASS_SYSTEM) {
+ print_usage_line(3, "-o:aggressive (use this with caution)");
+ }
+ print_usage_line(2, "The default is -o:minimal.");
+ }
- print_usage_line(1, "-vet-tabs");
- print_usage_line(2, "Errs when the use of tabs has not been used for indentation.");
- print_usage_line(0, "");
- print_usage_line(1, "-vet-packages:<comma-separated-strings>");
- print_usage_line(2, "Sets which packages by name will be vetted.");
- print_usage_line(2, "Files with specific +vet tags will not be ignored if they are not in the packages set.");
- print_usage_line(0, "");
+ if (print_flag("-obfuscate-source-code-locations")) {
+ print_usage_line(2, "Obfuscate the file and procedure strings, and line and column numbers, stored with a 'runtime.Source_Code_Location' value.");
+ }
- print_usage_line(1, "-vet-unused-procedures");
- print_usage_line(2, "Checks for unused procedures.");
- print_usage_line(2, "Must be used with -vet-packages or specified on a per file with +vet tags.");
- print_usage_line(0, "");
- }
- if (check) {
- print_usage_line(1, "-custom-attribute:<string>");
- print_usage_line(2, "Add a custom attribute which will be ignored if it is unknown.");
- print_usage_line(2, "This can be used with metaprogramming tools.");
- print_usage_line(2, "Examples:");
- print_usage_line(3, "-custom-attribute:my_tag");
- print_usage_line(3, "-custom-attribute:my_tag,the_other_thing");
- print_usage_line(3, "-custom-attribute:my_tag -custom-attribute:the_other_thing");
- print_usage_line(0, "");
+ if (print_flag("-out:<filepath>")) {
+ print_usage_line(2, "Sets the file name of the outputted executable.");
+ print_usage_line(2, "Example: -out:foo.exe");
+ }
+ }
- print_usage_line(1, "-ignore-unknown-attributes");
- print_usage_line(2, "Ignores unknown attributes.");
- print_usage_line(2, "This can be used with metaprogramming tools.");
- print_usage_line(0, "");
+ if (doc) {
+ if (print_flag("-out:<filepath>")) {
+ print_usage_line(2, "Sets the base name of the resultig .odin-doc file.");
+ print_usage_line(2, "The extension can be optionally included; the resulting file will always have an extension of '.odin-doc'.");
+ print_usage_line(2, "Example: -out:foo");
+ }
+ }
- if (command != "test") {
- print_usage_line(1, "-no-entry-point");
- print_usage_line(2, "Removes default requirement of an entry point (e.g. main procedure).");
- print_usage_line(0, "");
+ if (run_or_build) {
+ #if defined(GB_SYSTEM_WINDOWS)
+ if (print_flag("-pdb-name:<filepath>")) {
+ print_usage_line(2, "[Windows only]");
+ print_usage_line(2, "Defines the generated PDB name when -debug is enabled.");
+ print_usage_line(2, "Example: -pdb-name:different.pdb");
}
+ #endif
}
- if (test_only) {
- print_usage_line(1, "-all-packages");
- print_usage_line(2, "Tests all packages imported into the given initial package.");
- print_usage_line(0, "");
+ if (build) {
+ if (print_flag("-print-linker-flags")) {
+ print_usage_line(2, "Prints the all of the flags/arguments that will be passed to the linker.");
+ }
}
if (run_or_build) {
- print_usage_line(1, "-minimum-os-version:<string>");
- print_usage_line(2, "Sets the minimum OS version targeted by the application.");
- print_usage_line(2, "Default: -minimum-os-version:11.0.0");
- print_usage_line(2, "Only used when target is Darwin, if given, linking mismatched versions will emit a warning.");
- print_usage_line(0, "");
+ if (print_flag("-radlink")) {
+ print_usage_line(2, "Uses the RAD linker rather than the default.");
+ }
- print_usage_line(1, "-extra-linker-flags:<string>");
- print_usage_line(2, "Adds extra linker specific flags in a string.");
- print_usage_line(0, "");
+ if (print_flag("-reloc-mode:<string>")) {
+ print_usage_line(2, "Specifies the reloc mode.");
+ print_usage_line(2, "Available options:");
+ print_usage_line(3, "-reloc-mode:default");
+ print_usage_line(3, "-reloc-mode:static");
+ print_usage_line(3, "-reloc-mode:pic");
+ print_usage_line(3, "-reloc-mode:dynamic-no-pic");
+ }
- print_usage_line(1, "-extra-assembler-flags:<string>");
- print_usage_line(2, "Adds extra assembler specific flags in a string.");
- print_usage_line(0, "");
+ #if defined(GB_SYSTEM_WINDOWS)
+ if (print_flag("-resource:<filepath>")) {
+ print_usage_line(2, "[Windows only]");
+ print_usage_line(2, "Defines the resource file for the executable.");
+ print_usage_line(2, "Example: -resource:path/to/file.rc");
+ print_usage_line(2, "or: -resource:path/to/file.res for a precompiled one.");
+ }
+ #endif
- print_usage_line(1, "-microarch:<string>");
- print_usage_line(2, "Specifies the specific micro-architecture for the build in a string.");
- print_usage_line(2, "Examples:");
- print_usage_line(3, "-microarch:sandybridge");
- print_usage_line(3, "-microarch:native");
- print_usage_line(3, "-microarch:\"?\" for a list");
- print_usage_line(0, "");
+ if (print_flag("-sanitize:<string>")) {
+ print_usage_line(2, "Enables sanitization analysis.");
+ print_usage_line(2, "Available options:");
+ print_usage_line(3, "-sanitize:address");
+ print_usage_line(3, "-sanitize:memory");
+ print_usage_line(3, "-sanitize:thread");
+ print_usage_line(2, "NOTE: This flag can be used multiple times.");
+ }
+ }
- print_usage_line(1, "-target-features:<string>");
- print_usage_line(2, "Specifies CPU features to enable on top of the enabled features implied by -microarch.");
- print_usage_line(2, "Examples:");
- print_usage_line(3, "-target-features:atomics");
- print_usage_line(3, "-target-features:\"sse2,aes\"");
- print_usage_line(3, "-target-features:\"?\" for a list");
- print_usage_line(0, "");
+ if (doc) {
+ if (print_flag("-short")) {
+ print_usage_line(2, "Shows shortened documentation for the packages.");
+ }
+ }
- print_usage_line(1, "-strict-target-features");
- print_usage_line(2, "Makes @(enable_target_features=\"...\") behave the same way as @(require_target_features=\"...\").");
- print_usage_line(2, "This enforces that all generated code uses features supported by the combination of -target, -microarch, and -target-features.");
- print_usage_line(0, "");
+ if (check) {
+ if (print_flag("-show-defineables")) {
+ print_usage_line(2, "Shows an overview of all the #config/#defined usages in the project.");
+ }
- print_usage_line(1, "-reloc-mode:<string>");
- print_usage_line(2, "Specifies the reloc mode.");
- print_usage_line(2, "Available options:");
- print_usage_line(3, "-reloc-mode:default");
- print_usage_line(3, "-reloc-mode:static");
- print_usage_line(3, "-reloc-mode:pic");
- print_usage_line(3, "-reloc-mode:dynamic-no-pic");
- print_usage_line(0, "");
+ if (print_flag("-show-system-calls")) {
+ print_usage_line(2, "Prints the whole command and arguments for calls to external tools like linker and assembler.");
+ }
- print_usage_line(1, "-disable-red-zone");
- print_usage_line(2, "Disables red zone on a supported freestanding target.");
- print_usage_line(0, "");
+ if (print_flag("-show-timings")) {
+ print_usage_line(2, "Shows basic overview of the timings of different stages within the compiler in milliseconds.");
+ }
- print_usage_line(1, "-dynamic-map-calls");
- print_usage_line(2, "Uses dynamic map calls to minimize code generation at the cost of runtime execution.");
- print_usage_line(0, "");
+ if (print_flag("-show-more-timings")) {
+ print_usage_line(2, "Shows an advanced overview of the timings of different stages within the compiler in milliseconds.");
+ }
}
- if (build) {
- print_usage_line(1, "-print-linker-flags");
- print_usage_line(2, "Prints the all of the flags/arguments that will be passed to the linker.");
- print_usage_line(0, "");
+ if (check_only) {
+ if (print_flag("-show-unused")) {
+ print_usage_line(2, "Shows unused package declarations within the current project.");
+ }
+ if (print_flag("-show-unused-with-location")) {
+ print_usage_line(2, "Shows unused package declarations within the current project with the declarations source location.");
+ }
}
if (check) {
- print_usage_line(1, "-disallow-do");
- print_usage_line(2, "Disallows the 'do' keyword in the project.");
- print_usage_line(0, "");
+ if (print_flag("-strict-style")) {
+ print_usage_line(2, "This enforces parts of same style as the Odin compiler, prefer '-vet-style -vet-semicolon' if you do not want to match it exactly.");
+ print_usage_line(2, "");
+ print_usage_line(2, "Errs on unneeded tokens, such as unneeded semicolons.");
+ print_usage_line(2, "Errs on missing trailing commas followed by a newline.");
+ print_usage_line(2, "Errs on deprecated syntax.");
+ print_usage_line(2, "Errs when the attached-brace style in not adhered to (also known as 1TBS).");
+ print_usage_line(2, "Errs when 'case' labels are not in the same column as the associated 'switch' token.");
+ }
+ }
- print_usage_line(1, "-default-to-nil-allocator");
- print_usage_line(2, "Sets the default allocator to be the nil_allocator, an allocator which does nothing.");
- print_usage_line(0, "");
+ if (run_or_build) {
+ if (print_flag("-strict-target-features")) {
+ print_usage_line(2, "Makes @(enable_target_features=\"...\") behave the same way as @(require_target_features=\"...\").");
+ print_usage_line(2, "This enforces that all generated code uses features supported by the combination of -target, -microarch, and -target-features.");
+ }
- print_usage_line(1, "-strict-style");
- print_usage_line(2, "This enforces parts of same style as the Odin compiler, prefer '-vet-style -vet-semicolon' if you do not want to match it exactly.");
- print_usage_line(2, "");
- print_usage_line(2, "Errs on unneeded tokens, such as unneeded semicolons.");
- print_usage_line(2, "Errs on missing trailing commas followed by a newline.");
- print_usage_line(2, "Errs on deprecated syntax.");
- print_usage_line(2, "Errs when the attached-brace style in not adhered to (also known as 1TBS).");
- print_usage_line(2, "Errs when 'case' labels are not in the same column as the associated 'switch' token.");
- print_usage_line(0, "");
+ #if defined(GB_SYSTEM_WINDOWS)
+ if (print_flag("-subsystem:<option>")) {
+ print_usage_line(2, "[Windows only]");
+ print_usage_line(2, "Defines the subsystem for the application.");
+ print_usage_line(2, "Available options:");
+ print_usage_line(3, "-subsystem:console");
+ print_usage_line(3, "-subsystem:windows");
+ }
+ #endif
- print_usage_line(1, "-ignore-warnings");
- print_usage_line(2, "Ignores warning messages.");
- print_usage_line(0, "");
+ if (print_flag("-target-features:<string>")) {
+ print_usage_line(2, "Specifies CPU features to enable on top of the enabled features implied by -microarch.");
+ print_usage_line(2, "Examples:");
+ print_usage_line(3, "-target-features:atomics");
+ print_usage_line(3, "-target-features:\"sse2,aes\"");
+ print_usage_line(3, "-target-features:\"?\" for a list");
+ }
+ }
- print_usage_line(1, "-warnings-as-errors");
- print_usage_line(2, "Treats warning messages as error messages.");
- print_usage_line(0, "");
+ if (check) {
+ if (print_flag("-target:<string>")) {
+ print_usage_line(2, "Sets the target for the executable to be built in.");
+ }
- print_usage_line(1, "-terse-errors");
- print_usage_line(2, "Prints a terse error message without showing the code on that line and the location in that line.");
- print_usage_line(0, "");
+ if (print_flag("-terse-errors")) {
+ print_usage_line(2, "Prints a terse error message without showing the code on that line and the location in that line.");
+ }
- print_usage_line(1, "-json-errors");
- print_usage_line(2, "Prints the error messages as json to stderr.");
- print_usage_line(0, "");
+ if (print_flag("-thread-count:<integer>")) {
+ print_usage_line(2, "Overrides the number of threads the compiler will use to compile with.");
+ print_usage_line(2, "Example: -thread-count:2");
+ }
+ }
- print_usage_line(1, "-error-pos-style:<string>");
- print_usage_line(2, "Available options:");
- print_usage_line(3, "-error-pos-style:unix file/path:45:3:");
- print_usage_line(3, "-error-pos-style:odin file/path(45:3)");
- print_usage_line(3, "-error-pos-style:default (Defaults to 'odin'.)");
- print_usage_line(0, "");
+ if (run_or_build) {
+ if (print_flag("-use-separate-modules")) {
+ print_usage_line(2, "The backend generates multiple build units which are then linked together.");
+ print_usage_line(2, "Normally, a single build unit is generated for a standard project.");
+ print_usage_line(2, "This is the default behaviour on Windows for '-o:none' and '-o:minimal' builds.");
+ }
- print_usage_line(1, "-max-error-count:<integer>");
- print_usage_line(2, "Sets the maximum number of errors that can be displayed before the compiler terminates.");
- print_usage_line(2, "Must be an integer >0.");
- print_usage_line(2, "If not set, the default max error count is %d.", DEFAULT_MAX_ERROR_COLLECTOR_COUNT);
- print_usage_line(0, "");
+ }
- print_usage_line(1, "-min-link-libs");
- print_usage_line(2, "If set, the number of linked libraries will be minimized to prevent duplications.");
- print_usage_line(2, "This is useful for so called \"dumb\" linkers compared to \"smart\" linkers.");
- print_usage_line(0, "");
- print_usage_line(1, "-foreign-error-procedures");
- print_usage_line(2, "States that the error procedures used in the runtime are defined in a separate translation unit.");
- print_usage_line(0, "");
+ if (check) {
+ if (print_flag("-vet")) {
+ print_usage_line(2, "Does extra checks on the code.");
+ print_usage_line(2, "Extra checks include:");
+ print_usage_line(3, "-vet-unused");
+ print_usage_line(3, "-vet-unused-variables");
+ print_usage_line(3, "-vet-unused-imports");
+ print_usage_line(3, "-vet-shadowing");
+ print_usage_line(3, "-vet-using-stmt");
+ }
- }
+ if (print_flag("-vet-cast")) {
+ print_usage_line(2, "Errs on casting a value to its own type or using `transmute` rather than `cast`.");
+ }
- if (run_or_build) {
- print_usage_line(1, "-obfuscate-source-code-locations");
- print_usage_line(2, "Obfuscate the file and procedure strings, and line and column numbers, stored with a 'runtime.Source_Code_Location' value.");
- print_usage_line(0, "");
+ if (print_flag("-vet-packages:<comma-separated-strings>")) {
+ print_usage_line(2, "Sets which packages by name will be vetted.");
+ print_usage_line(2, "Files with specific +vet tags will not be ignored if they are not in the packages set.");
+ }
- print_usage_line(1, "-sanitize:<string>");
- print_usage_line(2, "Enables sanitization analysis.");
- print_usage_line(2, "Available options:");
- print_usage_line(3, "-sanitize:address");
- print_usage_line(3, "-sanitize:memory");
- print_usage_line(3, "-sanitize:thread");
- print_usage_line(2, "NOTE: This flag can be used multiple times.");
- print_usage_line(0, "");
+ if (print_flag("-vet-semicolon")) {
+ print_usage_line(2, "Errs on unneeded semicolons.");
+ }
- }
- if (run_or_build) {
- #if defined(GB_SYSTEM_WINDOWS)
- print_usage_line(1, "-ignore-vs-search");
- print_usage_line(2, "[Windows only]");
- print_usage_line(2, "Ignores the Visual Studio search for library paths.");
- print_usage_line(0, "");
+ if (print_flag("-vet-shadowing")) {
+ print_usage_line(2, "Checks for variable shadowing within procedures.");
+ }
- print_usage_line(1, "-resource:<filepath>");
- print_usage_line(2, "[Windows only]");
- print_usage_line(2, "Defines the resource file for the executable.");
- print_usage_line(2, "Example: -resource:path/to/file.rc");
- print_usage_line(2, "or: -resource:path/to/file.res for a precompiled one.");
- print_usage_line(0, "");
+ if (print_flag("-vet-style")) {
+ print_usage_line(2, "Errs on missing trailing commas followed by a newline.");
+ print_usage_line(2, "Errs on deprecated syntax.");
+ print_usage_line(2, "Does not err on unneeded tokens (unlike -strict-style).");
+ }
- print_usage_line(1, "-pdb-name:<filepath>");
- print_usage_line(2, "[Windows only]");
- print_usage_line(2, "Defines the generated PDB name when -debug is enabled.");
- print_usage_line(2, "Example: -pdb-name:different.pdb");
- print_usage_line(0, "");
- print_usage_line(1, "-subsystem:<option>");
- print_usage_line(2, "[Windows only]");
- print_usage_line(2, "Defines the subsystem for the application.");
- print_usage_line(2, "Available options:");
- print_usage_line(3, "-subsystem:console");
- print_usage_line(3, "-subsystem:windows");
- print_usage_line(0, "");
+ if (print_flag("-vet-tabs")) {
+ print_usage_line(2, "Errs when the use of tabs has not been used for indentation.");
+ }
- #endif
+
+ if (print_flag("-vet-unused")) {
+ print_usage_line(2, "Checks for unused declarations (variables and imports).");
+ }
+
+ if (print_flag("-vet-unused-imports")) {
+ print_usage_line(2, "Checks for unused import declarations.");
+ }
+
+ if (print_flag("-vet-unused-procedures")) {
+ print_usage_line(2, "Checks for unused procedures.");
+ print_usage_line(2, "Must be used with -vet-packages or specified on a per file with +vet tags.");
+ }
+
+ if (print_flag("-vet-unused-variables")) {
+ print_usage_line(2, "Checks for unused variable declarations.");
+ }
+
+
+ if (print_flag("-vet-using-param")) {
+ print_usage_line(2, "Checks for the use of 'using' on procedure parameters.");
+ print_usage_line(2, "'using' is considered bad practice outside of immediate refactoring.");
+ }
+
+ if (print_flag("-vet-using-stmt")) {
+ print_usage_line(2, "Checks for the use of 'using' as a statement.");
+ print_usage_line(2, "'using' is considered bad practice outside of immediate refactoring.");
+ }
+ }
+
+ if (check) {
+ if (print_flag("-warnings-as-errors")) {
+ print_usage_line(2, "Treats warning messages as error messages.");
+ }
}
}
@@ -3132,7 +3268,7 @@ int main(int arg_count, char const **arg_ptr) {
usage(args[0]);
return 1;
} else {
- print_show_help(args[0], args[2]);
+ print_show_help(args[0], args[1], args[2]);
return 0;
}
} else if (command == "root") {
@@ -3276,6 +3412,19 @@ int main(int arg_count, char const **arg_ptr) {
}
}
+ #if defined(GB_CPU_X86)
+ // We've detected that the CPU doesn't support popcnt, or another reason to use `-microarch:native`,
+ // and that no custom microarch was chosen.
+ if (should_use_march_native() && march == get_default_microarchitecture()) {
+ if (command == "run" || command == "test") {
+ gb_printf_err("Error: Try using '-microarch:native' as Odin defaults to %.*s (close to Nehalem), and your CPU seems to be older.\n", LIT(march));
+ gb_exit(1);
+ } else if (command == "build") {
+ gb_printf("Suggestion: Try using '-microarch:native' as Odin defaults to %.*s (close to Nehalem), and your CPU seems to be older.\n", LIT(march));
+ }
+ }
+ #endif
+
if (build_context.target_features_string.len != 0) {
String_Iterator target_it = {build_context.target_features_string, 0};
for (;;) {
@@ -3325,7 +3474,7 @@ int main(int arg_count, char const **arg_ptr) {
if (LLVM_VERSION_MAJOR < 17) {
gb_printf_err("Invalid LLVM version %s, RISC-V targets require at least LLVM 17\n", LLVM_VERSION_STRING);
gb_exit(1);
- }
+ }
}
if (build_context.show_debug_messages) {
@@ -3347,6 +3496,7 @@ int main(int arg_count, char const **arg_ptr) {
Parser *parser = gb_alloc_item(permanent_allocator(), Parser);
Checker *checker = gb_alloc_item(permanent_allocator(), Checker);
+ bool failed_to_cache_parsing = false;
MAIN_TIME_SECTION("parse files");
@@ -3366,10 +3516,6 @@ int main(int arg_count, char const **arg_ptr) {
print_all_errors();
return 1;
}
- if (any_warnings()) {
- print_all_errors();
- }
-
checker->parser = parser;
init_checker(checker);
@@ -3396,7 +3542,7 @@ int main(int arg_count, char const **arg_ptr) {
if (build_context.show_defineables || build_context.export_defineables_file != "") {
TEMPORARY_ALLOCATOR_GUARD();
temp_alloc_defineable_strings(checker);
- sort_defineables(checker);
+ sort_defineables_and_remove_duplicates(checker);
if (build_context.show_defineables) {
show_defineables(checker);
@@ -3440,6 +3586,7 @@ int main(int arg_count, char const **arg_ptr) {
if (try_cached_build(checker, args)) {
goto end_of_code_gen;
}
+ failed_to_cache_parsing = true;
}
#if ALLOW_TILDE
@@ -3505,18 +3652,23 @@ int main(int arg_count, char const **arg_ptr) {
end_of_code_gen:;
- if (build_context.show_timings) {
- show_timings(checker, &global_timings);
- }
-
if (build_context.export_dependencies_format != DependenciesExportUnspecified) {
export_dependencies(checker);
}
+ if (build_context.cached) {
+ MAIN_TIME_SECTION("write cached build");
+ if (!build_context.build_cache_data.copy_already_done) {
+ try_copy_executable_to_cache();
+ }
+
+ if (failed_to_cache_parsing) {
+ write_cached_build(checker, args);
+ }
+ }
- if (!build_context.build_cache_data.copy_already_done &&
- build_context.cached) {
- try_copy_executable_to_cache();
+ if (build_context.show_timings) {
+ show_timings(checker, &global_timings);
}
if (run_output) {
diff --git a/src/parser.cpp b/src/parser.cpp
index 520a23c5a..aa90651d3 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -448,7 +448,8 @@ gb_internal Ast *clone_ast(Ast *node, AstFile *f) {
n->StructType.fields = clone_ast_array(n->StructType.fields, f);
n->StructType.polymorphic_params = clone_ast(n->StructType.polymorphic_params, f);
n->StructType.align = clone_ast(n->StructType.align, f);
- n->StructType.field_align = clone_ast(n->StructType.field_align, f);
+ n->StructType.min_field_align = clone_ast(n->StructType.min_field_align, f);
+ n->StructType.max_field_align = clone_ast(n->StructType.max_field_align, f);
n->StructType.where_clauses = clone_ast_array(n->StructType.where_clauses, f);
break;
case Ast_UnionType:
@@ -1217,7 +1218,7 @@ gb_internal Ast *ast_dynamic_array_type(AstFile *f, Token token, Ast *elem) {
gb_internal Ast *ast_struct_type(AstFile *f, Token token, Slice<Ast *> fields, isize field_count,
Ast *polymorphic_params, bool is_packed, bool is_raw_union, bool is_no_copy,
- Ast *align, Ast *field_align,
+ Ast *align, Ast *min_field_align, Ast *max_field_align,
Token where_token, Array<Ast *> const &where_clauses) {
Ast *result = alloc_ast_node(f, Ast_StructType);
result->StructType.token = token;
@@ -1228,7 +1229,8 @@ gb_internal Ast *ast_struct_type(AstFile *f, Token token, Slice<Ast *> fields, i
result->StructType.is_raw_union = is_raw_union;
result->StructType.is_no_copy = is_no_copy;
result->StructType.align = align;
- result->StructType.field_align = field_align;
+ result->StructType.min_field_align = min_field_align;
+ result->StructType.max_field_align = max_field_align;
result->StructType.where_token = where_token;
result->StructType.where_clauses = slice_from_array(where_clauses);
return result;
@@ -2486,6 +2488,7 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) {
tag = parse_call_expr(f, tag);
}
Ast *type = parse_type(f);
+ syntax_error(tag, "#relative types have now been removed in favour of \"core:relative\"");
return ast_relative_type(f, tag, type);
} else if (name.string == "force_inline" ||
name.string == "force_no_inline") {
@@ -2757,7 +2760,8 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) {
bool is_raw_union = false;
bool no_copy = false;
Ast *align = nullptr;
- Ast *field_align = nullptr;
+ Ast *min_field_align = nullptr;
+ Ast *max_field_align = nullptr;
if (allow_token(f, Token_OpenParen)) {
isize param_count = 0;
@@ -2795,18 +2799,43 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) {
gb_string_free(s);
}
} else if (tag.string == "field_align") {
- if (field_align) {
+ if (min_field_align) {
syntax_error(tag, "Duplicate struct tag '#%.*s'", LIT(tag.string));
}
- field_align = parse_expr(f, true);
- if (field_align && field_align->kind != Ast_ParenExpr) {
+ syntax_warning(tag, "#field_align has been deprecated in favour of #min_field_align");
+ min_field_align = parse_expr(f, true);
+ if (min_field_align && min_field_align->kind != Ast_ParenExpr) {
ERROR_BLOCK();
- gbString s = expr_to_string(field_align);
+ gbString s = expr_to_string(min_field_align);
syntax_warning(tag, "#field_align requires parentheses around the expression");
- error_line("\tSuggestion: #field_align(%s)", s);
+ error_line("\tSuggestion: #min_field_align(%s)", s);
gb_string_free(s);
}
- } else if (tag.string == "raw_union") {
+ } else if (tag.string == "min_field_align") {
+ if (min_field_align) {
+ syntax_error(tag, "Duplicate struct tag '#%.*s'", LIT(tag.string));
+ }
+ min_field_align = parse_expr(f, true);
+ if (min_field_align && min_field_align->kind != Ast_ParenExpr) {
+ ERROR_BLOCK();
+ gbString s = expr_to_string(min_field_align);
+ syntax_warning(tag, "#min_field_align requires parentheses around the expression");
+ error_line("\tSuggestion: #min_field_align(%s)", s);
+ gb_string_free(s);
+ }
+ } else if (tag.string == "max_field_align") {
+ if (max_field_align) {
+ syntax_error(tag, "Duplicate struct tag '#%.*s'", LIT(tag.string));
+ }
+ max_field_align = parse_expr(f, true);
+ if (max_field_align && max_field_align->kind != Ast_ParenExpr) {
+ ERROR_BLOCK();
+ gbString s = expr_to_string(max_field_align);
+ syntax_warning(tag, "#max_field_align requires parentheses around the expression");
+ error_line("\tSuggestion: #max_field_align(%s)", s);
+ gb_string_free(s);
+ }
+ }else if (tag.string == "raw_union") {
if (is_raw_union) {
syntax_error(tag, "Duplicate struct tag '#%.*s'", LIT(tag.string));
}
@@ -2856,7 +2885,7 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) {
parser_check_polymorphic_record_parameters(f, polymorphic_params);
- return ast_struct_type(f, token, decls, name_count, polymorphic_params, is_packed, is_raw_union, no_copy, align, field_align, where_token, where_clauses);
+ return ast_struct_type(f, token, decls, name_count, polymorphic_params, is_packed, is_raw_union, no_copy, align, min_field_align, max_field_align, where_token, where_clauses);
} break;
case Token_union: {
@@ -4234,8 +4263,6 @@ gb_internal bool allow_field_separator(AstFile *f) {
gb_internal Ast *parse_struct_field_list(AstFile *f, isize *name_count_) {
Token start_token = f->curr_token;
- auto decls = array_make<Ast *>(ast_allocator(f));
-
isize total_name_count = 0;
Ast *params = parse_field_list(f, &total_name_count, FieldFlag_Struct, Token_CloseBrace, false, false);
@@ -4377,10 +4404,14 @@ gb_internal Ast *parse_field_list(AstFile *f, isize *name_count_, u32 allowed_fl
}
}
- allow_field_separator(f);
+ bool more_fields = allow_field_separator(f);
Ast *param = ast_field(f, names, type, default_value, set_flags, tag, docs, f->line_comment);
array_add(&params, param);
+ if (!more_fields) {
+ if (name_count_) *name_count_ = total_name_count;
+ return ast_field_list(f, start_token, params);
+ }
while (f->curr_token.kind != follow &&
f->curr_token.kind != Token_EOF &&
diff --git a/src/parser.hpp b/src/parser.hpp
index d5117a31e..e332fed50 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -736,7 +736,8 @@ AST_KIND(_TypeBegin, "", bool) \
isize field_count; \
Ast *polymorphic_params; \
Ast *align; \
- Ast *field_align; \
+ Ast *min_field_align; \
+ Ast *max_field_align; \
Token where_token; \
Slice<Ast *> where_clauses; \
bool is_packed; \
diff --git a/src/string.cpp b/src/string.cpp
index 3c7d96934..f8ee6c53e 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -156,6 +156,7 @@ gb_internal isize string_index_byte(String const &s, u8 x) {
gb_internal gb_inline bool str_eq(String const &a, String const &b) {
if (a.len != b.len) return false;
+ if (a.len == 0) return true;
return memcmp(a.text, b.text, a.len) == 0;
}
gb_internal gb_inline bool str_ne(String const &a, String const &b) { return !str_eq(a, b); }
@@ -411,6 +412,32 @@ gb_internal String concatenate4_strings(gbAllocator a, String const &x, String c
return make_string(data, len);
}
+#if defined(GB_SYSTEM_WINDOWS)
+gb_internal String escape_char(gbAllocator a, String s, char cte) {
+ isize buf_len = s.len;
+ isize cte_count = 0;
+ for (isize j = 0; j < s.len; j++) {
+ if (s.text[j] == cte) {
+ cte_count++;
+ }
+ }
+
+ u8 *buf = gb_alloc_array(a, u8, buf_len+cte_count);
+ isize i = 0;
+ for (isize j = 0; j < s.len; j++) {
+ u8 c = s.text[j];
+
+ if (c == cte) {
+ buf[i++] = '\\';
+ buf[i++] = c;
+ } else {
+ buf[i++] = c;
+ }
+ }
+ return make_string(buf, i);
+}
+#endif
+
gb_internal String string_join_and_quote(gbAllocator a, Array<String> strings) {
if (!strings.count) {
return make_string(nullptr, 0);
@@ -426,7 +453,11 @@ gb_internal String string_join_and_quote(gbAllocator a, Array<String> strings) {
if (i > 0) {
s = gb_string_append_fmt(s, " ");
}
+#if defined(GB_SYSTEM_WINDOWS)
+ s = gb_string_append_fmt(s, "\"%.*s\" ", LIT(escape_char(a, strings[i], '\\')));
+#else
s = gb_string_append_fmt(s, "\"%.*s\" ", LIT(strings[i]));
+#endif
}
return make_string(cast(u8 *) s, gb_string_length(s));
diff --git a/src/types.cpp b/src/types.cpp
index a9a7d6dda..c51df7261 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -137,7 +137,8 @@ struct TypeStruct {
Scope * scope;
i64 custom_align;
- i64 custom_field_align;
+ i64 custom_min_field_align;
+ i64 custom_max_field_align;
Type * polymorphic_params; // Type_Tuple
Type * polymorphic_parent;
Wait_Signal polymorphic_wait_signal;
@@ -271,14 +272,6 @@ struct TypeProc {
Type *elem; \
Type *generic_count; \
}) \
- TYPE_KIND(RelativePointer, struct { \
- Type *pointer_type; \
- Type *base_integer; \
- }) \
- TYPE_KIND(RelativeMultiPointer, struct { \
- Type *pointer_type; \
- Type *base_integer; \
- }) \
TYPE_KIND(Matrix, struct { \
Type *elem; \
i64 row_count; \
@@ -366,8 +359,6 @@ enum Typeid_Kind : u8 {
Typeid_Map,
Typeid_Bit_Set,
Typeid_Simd_Vector,
- Typeid_Relative_Pointer,
- Typeid_Relative_Multi_Pointer,
Typeid_Matrix,
Typeid_SoaPointer,
Typeid_Bit_Field,
@@ -677,8 +668,6 @@ gb_global Type *t_type_info_enum = nullptr;
gb_global Type *t_type_info_map = nullptr;
gb_global Type *t_type_info_bit_set = nullptr;
gb_global Type *t_type_info_simd_vector = nullptr;
-gb_global Type *t_type_info_relative_pointer = nullptr;
-gb_global Type *t_type_info_relative_multi_pointer = nullptr;
gb_global Type *t_type_info_matrix = nullptr;
gb_global Type *t_type_info_soa_pointer = nullptr;
gb_global Type *t_type_info_bit_field = nullptr;
@@ -707,8 +696,6 @@ gb_global Type *t_type_info_enum_ptr = nullptr;
gb_global Type *t_type_info_map_ptr = nullptr;
gb_global Type *t_type_info_bit_set_ptr = nullptr;
gb_global Type *t_type_info_simd_vector_ptr = nullptr;
-gb_global Type *t_type_info_relative_pointer_ptr = nullptr;
-gb_global Type *t_type_info_relative_multi_pointer_ptr = nullptr;
gb_global Type *t_type_info_matrix_ptr = nullptr;
gb_global Type *t_type_info_soa_pointer_ptr = nullptr;
gb_global Type *t_type_info_bit_field_ptr = nullptr;
@@ -1117,24 +1104,6 @@ gb_internal Type *alloc_type_bit_field() {
return t;
}
-gb_internal Type *alloc_type_relative_pointer(Type *pointer_type, Type *base_integer) {
- GB_ASSERT(is_type_pointer(pointer_type));
- GB_ASSERT(is_type_integer(base_integer));
- Type *t = alloc_type(Type_RelativePointer);
- t->RelativePointer.pointer_type = pointer_type;
- t->RelativePointer.base_integer = base_integer;
- return t;
-}
-
-gb_internal Type *alloc_type_relative_multi_pointer(Type *pointer_type, Type *base_integer) {
- GB_ASSERT(is_type_multi_pointer(pointer_type));
- GB_ASSERT(is_type_integer(base_integer));
- Type *t = alloc_type(Type_RelativeMultiPointer);
- t->RelativeMultiPointer.pointer_type = pointer_type;
- t->RelativeMultiPointer.base_integer = base_integer;
- return t;
-}
-
gb_internal Type *alloc_type_named(String name, Type *base, Entity *type_name) {
Type *t = alloc_type(Type_Named);
t->Named.name = name;
@@ -1226,8 +1195,6 @@ gb_internal Type *type_deref(Type *t, bool allow_multi_pointer) {
switch (bt->kind) {
case Type_Pointer:
return bt->Pointer.elem;
- case Type_RelativePointer:
- return type_deref(bt->RelativePointer.pointer_type);
case Type_SoaPointer:
{
Type *elem = base_type(bt->SoaPointer.elem);
@@ -1666,15 +1633,6 @@ gb_internal bool is_type_generic(Type *t) {
return t->kind == Type_Generic;
}
-gb_internal bool is_type_relative_pointer(Type *t) {
- t = base_type(t);
- return t->kind == Type_RelativePointer;
-}
-gb_internal bool is_type_relative_multi_pointer(Type *t) {
- t = base_type(t);
- return t->kind == Type_RelativeMultiPointer;
-}
-
gb_internal bool is_type_u8_slice(Type *t) {
t = base_type(t);
if (t->kind == Type_Slice) {
@@ -2117,8 +2075,6 @@ gb_internal bool is_type_indexable(Type *t) {
return true;
case Type_EnumeratedArray:
return true;
- case Type_RelativeMultiPointer:
- return true;
case Type_Matrix:
return true;
}
@@ -2136,8 +2092,6 @@ gb_internal bool is_type_sliceable(Type *t) {
return true;
case Type_EnumeratedArray:
return false;
- case Type_RelativeMultiPointer:
- return true;
case Type_Matrix:
return false;
}
@@ -2344,27 +2298,7 @@ gb_internal bool is_type_polymorphic(Type *t, bool or_specialized=false) {
return true;
}
break;
-
- case Type_RelativeMultiPointer:
- if (is_type_polymorphic(t->RelativeMultiPointer.pointer_type, or_specialized)) {
- return true;
- }
- if (t->RelativeMultiPointer.base_integer != nullptr &&
- is_type_polymorphic(t->RelativeMultiPointer.base_integer, or_specialized)) {
- return true;
- }
- break;
- case Type_RelativePointer:
- if (is_type_polymorphic(t->RelativePointer.pointer_type, or_specialized)) {
- return true;
- }
- if (t->RelativePointer.base_integer != nullptr &&
- is_type_polymorphic(t->RelativePointer.base_integer, or_specialized)) {
- return true;
- }
- break;
}
-
return false;
}
@@ -2406,10 +2340,6 @@ gb_internal bool type_has_nil(Type *t) {
}
}
return false;
-
- case Type_RelativePointer:
- case Type_RelativeMultiPointer:
- return true;
}
return false;
}
@@ -2578,10 +2508,6 @@ gb_internal bool is_type_load_safe(Type *type) {
}
return true;
- case Type_RelativePointer:
- case Type_RelativeMultiPointer:
- return true;
-
case Type_Pointer:
case Type_MultiPointer:
case Type_Slice:
@@ -3912,6 +3838,14 @@ gb_internal i64 type_align_of_internal(Type *t, TypePath *path) {
max = align;
}
}
+
+ if (t->Struct.custom_min_field_align > 0) {
+ max = gb_max(max, t->Struct.custom_min_field_align);
+ }
+ if (t->Struct.custom_max_field_align != 0 &&
+ t->Struct.custom_max_field_align > t->Struct.custom_min_field_align) {
+ max = gb_min(max, t->Struct.custom_max_field_align);
+ }
return max;
} break;
@@ -3936,11 +3870,6 @@ gb_internal i64 type_align_of_internal(Type *t, TypePath *path) {
case Type_Matrix:
return matrix_align_of(t, path);
- case Type_RelativePointer:
- return type_align_of_internal(t->RelativePointer.base_integer, path);
- case Type_RelativeMultiPointer:
- return type_align_of_internal(t->RelativeMultiPointer.base_integer, path);
-
case Type_SoaPointer:
return build_context.int_size;
}
@@ -3950,7 +3879,7 @@ gb_internal i64 type_align_of_internal(Type *t, TypePath *path) {
return gb_clamp(next_pow2(type_size_of_internal(t, path)), 1, build_context.max_align);
}
-gb_internal i64 *type_set_offsets_of(Slice<Entity *> const &fields, bool is_packed, bool is_raw_union, i64 min_field_align) {
+gb_internal i64 *type_set_offsets_of(Slice<Entity *> const &fields, bool is_packed, bool is_raw_union, i64 min_field_align, i64 max_field_align) {
gbAllocator a = permanent_allocator();
auto offsets = gb_alloc_array(a, i64, fields.count);
i64 curr_offset = 0;
@@ -3980,6 +3909,9 @@ gb_internal i64 *type_set_offsets_of(Slice<Entity *> const &fields, bool is_pack
} else {
Type *t = fields[i]->type;
i64 align = gb_max(type_align_of(t), min_field_align);
+ if (max_field_align > min_field_align) {
+ align = gb_min(align, max_field_align);
+ }
i64 size = gb_max(type_size_of( t), 0);
curr_offset = align_formula(curr_offset, align);
offsets[i] = curr_offset;
@@ -3996,7 +3928,7 @@ gb_internal bool type_set_offsets(Type *t) {
MUTEX_GUARD(&t->Struct.offset_mutex);
if (!t->Struct.are_offsets_set) {
t->Struct.are_offsets_being_processed = true;
- t->Struct.offsets = type_set_offsets_of(t->Struct.fields, t->Struct.is_packed, t->Struct.is_raw_union, t->Struct.custom_field_align);
+ t->Struct.offsets = type_set_offsets_of(t->Struct.fields, t->Struct.is_packed, t->Struct.is_raw_union, t->Struct.custom_min_field_align, t->Struct.custom_max_field_align);
t->Struct.are_offsets_being_processed = false;
t->Struct.are_offsets_set = true;
return true;
@@ -4005,7 +3937,7 @@ gb_internal bool type_set_offsets(Type *t) {
MUTEX_GUARD(&t->Tuple.mutex);
if (!t->Tuple.are_offsets_set) {
t->Tuple.are_offsets_being_processed = true;
- t->Tuple.offsets = type_set_offsets_of(t->Tuple.variables, t->Tuple.is_packed, false, 1);
+ t->Tuple.offsets = type_set_offsets_of(t->Tuple.variables, t->Tuple.is_packed, false, 1, 0);
t->Tuple.are_offsets_being_processed = false;
t->Tuple.are_offsets_set = true;
return true;
@@ -4230,11 +4162,6 @@ gb_internal i64 type_size_of_internal(Type *t, TypePath *path) {
case Type_BitField:
return type_size_of_internal(t->BitField.backing_type, path);
-
- case Type_RelativePointer:
- return type_size_of_internal(t->RelativePointer.base_integer, path);
- case Type_RelativeMultiPointer:
- return type_size_of_internal(t->RelativeMultiPointer.base_integer, path);
}
// Catch all
@@ -4860,19 +4787,6 @@ gb_internal gbString write_type_to_string(gbString str, Type *type, bool shortha
str = gb_string_append_fmt(str, "#simd[%d]", cast(int)type->SimdVector.count);
str = write_type_to_string(str, type->SimdVector.elem);
break;
-
- case Type_RelativePointer:
- str = gb_string_append_fmt(str, "#relative(");
- str = write_type_to_string(str, type->RelativePointer.base_integer);
- str = gb_string_append_fmt(str, ") ");
- str = write_type_to_string(str, type->RelativePointer.pointer_type);
- break;
- case Type_RelativeMultiPointer:
- str = gb_string_append_fmt(str, "#relative(");
- str = write_type_to_string(str, type->RelativePointer.base_integer);
- str = gb_string_append_fmt(str, ") ");
- str = write_type_to_string(str, type->RelativePointer.pointer_type);
- break;
case Type_Matrix:
if (type->Matrix.is_row_major) {
diff --git a/src/unicode.cpp b/src/unicode.cpp
index 665d5b182..cb9fb12ab 100644
--- a/src/unicode.cpp
+++ b/src/unicode.cpp
@@ -1,10 +1,15 @@
-#pragma warning(push)
-#pragma warning(disable: 4245)
+#if defined(GB_SYSTEM_WINDOWS)
+ #pragma warning(push)
+ #pragma warning(disable: 4245)
+#endif
extern "C" {
#include "utf8proc/utf8proc.c"
}
-#pragma warning(pop)
+
+#if defined(GB_SYSTEM_WINDOWS)
+ #pragma warning(pop)
+#endif
gb_internal bool rune_is_letter(Rune r) {
@@ -109,7 +114,7 @@ gb_internal isize utf8_decode(u8 const *str, isize str_len, Rune *codepoint_out)
u8 b1, b2, b3;
Utf8AcceptRange accept;
if (x >= 0xf0) {
- Rune mask = (cast(Rune)x << 31) >> 31;
+ Rune mask = -cast(Rune)(x & 1);
codepoint = (cast(Rune)s0 & (~mask)) | (GB_RUNE_INVALID & mask);
width = 1;
goto end;
diff --git a/tests/benchmark/bytes/benchmark_bytes.odin b/tests/benchmark/bytes/benchmark_bytes.odin
index e937fd0c2..13ef8f9a5 100644
--- a/tests/benchmark/bytes/benchmark_bytes.odin
+++ b/tests/benchmark/bytes/benchmark_bytes.odin
@@ -25,7 +25,7 @@ sizes := [?]int {
// These are the normal, unoptimized algorithms.
-plain_index_byte :: proc(s: []u8, c: byte) -> (res: int) #no_bounds_check {
+plain_index_byte :: proc "contextless" (s: []u8, c: byte) -> (res: int) #no_bounds_check {
for i := 0; i < len(s); i += 1 {
if s[i] == c {
return i
@@ -34,7 +34,7 @@ plain_index_byte :: proc(s: []u8, c: byte) -> (res: int) #no_bounds_check {
return -1
}
-plain_last_index_byte :: proc(s: []u8, c: byte) -> (res: int) #no_bounds_check {
+plain_last_index_byte :: proc "contextless" (s: []u8, c: byte) -> (res: int) #no_bounds_check {
for i := len(s)-1; i >= 0; i -= 1 {
if s[i] == c {
return i
@@ -43,7 +43,7 @@ plain_last_index_byte :: proc(s: []u8, c: byte) -> (res: int) #no_bounds_check {
return -1
}
-run_trial_size :: proc(p: proc([]u8, byte) -> int, size: int, idx: int, runs: int) -> (timing: time.Duration) {
+run_trial_size :: proc(p: proc "contextless" ([]u8, byte) -> int, size: int, idx: int, runs: int) -> (timing: time.Duration) {
data := make([]u8, size)
defer delete(data)
@@ -67,7 +67,7 @@ run_trial_size :: proc(p: proc([]u8, byte) -> int, size: int, idx: int, runs: in
return
}
-bench_table :: proc(algo_name: string, forward: bool, plain: proc([]u8, byte) -> int, simd: proc([]u8, byte) -> int) {
+bench_table :: proc(algo_name: string, forward: bool, plain: proc "contextless" ([]u8, byte) -> int, simd: proc "contextless" ([]u8, byte) -> int) {
string_buffer := strings.builder_make()
defer strings.builder_destroy(&string_buffer)
diff --git a/tests/core/crypto/test_core_crypto_sha3_variants.odin b/tests/core/crypto/test_core_crypto_sha3_variants.odin
index c11868e72..ca254c383 100644
--- a/tests/core/crypto/test_core_crypto_sha3_variants.odin
+++ b/tests/core/crypto/test_core_crypto_sha3_variants.odin
@@ -6,6 +6,7 @@ import "core:testing"
import "core:crypto/kmac"
import "core:crypto/shake"
import "core:crypto/tuplehash"
+import "core:strings"
@(test)
test_shake :: proc(t: ^testing.T) {
@@ -102,6 +103,22 @@ test_cshake :: proc(t: ^testing.T) {
"07dc27b11e51fbac75bc7b3c1d983e8b4b85fb1defaf218912ac86430273091727f42b17ed1df63e8ec118f04b23633c1dfb1574c8fb55cb45da8e25afb092bb",
"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7",
},
+
+ // cSHAKE128 - bytepad edge case (https://github.com/golang/go/issues/69169)
+ //
+ // If the implementation incorrectly pads an extra rate-bytes of 0s
+ // if the domain separator is exactly rate-bytes long, this will
+ // return:
+ //
+ // 430d3ebae1528304465f3b6f2ed34a7b931af804afe97d0e2a2796abf5725281
+ //
+ // See: https://github.com/golang/go/issues/69169
+ {
+ 128,
+ strings.repeat("x", 168-7, context.temp_allocator),
+ "2cf20c4b26c9ee7751eaa273368e616c868e7275178634e1ecdbac80d4cab5f4",
+ "",
+ },
}
for v in test_vectors {
diff --git a/tests/core/encoding/cbor/test_core_cbor.odin b/tests/core/encoding/cbor/test_core_cbor.odin
index 45f47505a..c614727b9 100644
--- a/tests/core/encoding/cbor/test_core_cbor.odin
+++ b/tests/core/encoding/cbor/test_core_cbor.odin
@@ -383,6 +383,60 @@ test_lying_length_array :: proc(t: ^testing.T) {
}
@(test)
+test_unmarshal_map_into_struct_partially :: proc(t: ^testing.T) {
+
+ // Tests that when unmarshalling into a struct that has less fields than the binary map has fields,
+ // the additional fields in the binary are skipped and the rest of the binary is correctly decoded.
+
+ Foo :: struct {
+ bar: struct {
+ hello: string,
+ world: string,
+ foo: string `cbor:"-"`,
+ },
+ baz: int,
+ }
+
+ Foo_More :: struct {
+ bar: struct {
+ hello: string,
+ world: string,
+ hellope: string,
+ foo: string,
+ },
+ baz: int,
+ }
+ more := Foo_More{
+ bar = {
+ hello = "hello",
+ world = "world",
+ hellope = "hellope",
+ foo = "foo",
+ },
+ baz = 4,
+ }
+
+ more_bin, err := cbor.marshal(more)
+ testing.expect_value(t, err, nil)
+
+ less := Foo{
+ bar = {
+ hello = "hello",
+ world = "world",
+ },
+ baz = 4,
+ }
+ less_out: Foo
+ uerr := cbor.unmarshal(string(more_bin), &less_out)
+ testing.expect_value(t, uerr, nil)
+ testing.expect_value(t, less_out, less)
+
+ delete(more_bin)
+ delete(less_out.bar.hello)
+ delete(less_out.bar.world)
+}
+
+@(test)
test_decode_unsigned :: proc(t: ^testing.T) {
expect_decoding(t, "\x00", "0", u8)
expect_decoding(t, "\x01", "1", u8)
diff --git a/tests/core/normal.odin b/tests/core/normal.odin
index 0670842ac..5bc73bd24 100644
--- a/tests/core/normal.odin
+++ b/tests/core/normal.odin
@@ -33,6 +33,7 @@ download_assets :: proc() {
@(require) import "net"
@(require) import "odin"
@(require) import "os"
+@(require) import "os/os2"
@(require) import "path/filepath"
@(require) import "reflect"
@(require) import "runtime"
diff --git a/tests/core/odin/test_file_tags.odin b/tests/core/odin/test_file_tags.odin
index dc004dfe3..ec686f279 100644
--- a/tests/core/odin/test_file_tags.odin
+++ b/tests/core/odin/test_file_tags.odin
@@ -96,6 +96,22 @@ package main
{{.JS, .wasm64p32, "baz"}, true},
{{.JS, .wasm64p32, "bar"}, false},
},
+ }, {// [5]
+ src = `
+#+build !freestanding, wasm32, wasm64p32
+package main`,
+ tags = {
+ build = {
+ {os = runtime.ALL_ODIN_OS_TYPES - {.Freestanding}, arch = runtime.ALL_ODIN_ARCH_TYPES},
+ {os = runtime.ALL_ODIN_OS_TYPES, arch = {.wasm32}},
+ {os = runtime.ALL_ODIN_OS_TYPES, arch = {.wasm64p32}},
+ },
+ },
+ matching_targets = {
+ {{.Freestanding, .wasm32, ""}, true},
+ {{.Freestanding, .wasm64p32, ""}, true},
+ {{.Freestanding, .arm64, ""}, false},
+ },
},
}
diff --git a/tests/core/os/os2/dir.odin b/tests/core/os/os2/dir.odin
new file mode 100644
index 000000000..5bb5c9820
--- /dev/null
+++ b/tests/core/os/os2/dir.odin
@@ -0,0 +1,32 @@
+package tests_core_os_os2
+
+import os "core:os/os2"
+import "core:log"
+import "core:path/filepath"
+import "core:slice"
+import "core:testing"
+
+@(test)
+test_read_dir :: proc(t: ^testing.T) {
+ path := filepath.join({#directory, "../dir"})
+ defer delete(path)
+
+ fis, err := os.read_all_directory_by_path(path, context.allocator)
+ defer os.file_info_slice_delete(fis, context.allocator)
+
+ slice.sort_by_key(fis, proc(fi: os.File_Info) -> string { return fi.name })
+
+ if err == .Unsupported {
+ log.warn("os2 directory functionality is unsupported, skipping test")
+ return
+ }
+
+ testing.expect_value(t, err, nil)
+ testing.expect_value(t, len(fis), 2)
+
+ testing.expect_value(t, fis[0].name, "b.txt")
+ testing.expect_value(t, fis[0].type, os.File_Type.Regular)
+
+ testing.expect_value(t, fis[1].name, "sub")
+ testing.expect_value(t, fis[1].type, os.File_Type.Directory)
+}
diff --git a/tests/core/os/os2/process.odin b/tests/core/os/os2/process.odin
new file mode 100644
index 000000000..d7700d201
--- /dev/null
+++ b/tests/core/os/os2/process.odin
@@ -0,0 +1,25 @@
+package tests_core_os_os2
+
+import os "core:os/os2"
+import "core:log"
+import "core:testing"
+
+@(test)
+test_process_exec :: proc(t: ^testing.T) {
+ state, stdout, stderr, err := os.process_exec({
+ command = {"echo", "hellope"},
+ }, context.allocator)
+ defer delete(stdout)
+ defer delete(stderr)
+
+ if err == .Unsupported {
+ log.warn("process_exec unsupported")
+ return
+ }
+
+ testing.expect_value(t, state.exited, true)
+ testing.expect_value(t, state.success, true)
+ testing.expect_value(t, err, nil)
+ testing.expect_value(t, string(stdout), "hellope\n")
+ testing.expect_value(t, string(stderr), "")
+}
diff --git a/tests/core/runtime/test_core_runtime.odin b/tests/core/runtime/test_core_runtime.odin
index f39caff48..84fd044cf 100644
--- a/tests/core/runtime/test_core_runtime.odin
+++ b/tests/core/runtime/test_core_runtime.odin
@@ -39,4 +39,28 @@ test_temp_allocator_returns_correct_size :: proc(t: ^testing.T) {
bytes, err := mem.alloc_bytes(10, 16)
testing.expect(t, err == nil)
testing.expect(t, len(bytes) == 10)
+}
+
+@(test)
+test_init_cap_map_dynarray :: proc(t: ^testing.T) {
+ m1 := make(map[int]string)
+ defer delete(m1)
+ testing.expect(t, cap(m1) == 0)
+ testing.expect(t, m1.allocator.procedure == context.allocator.procedure)
+
+ ally := context.temp_allocator
+ m2 := make(map[int]string, ally)
+ defer delete(m2)
+ testing.expect(t, cap(m2) == 0)
+ testing.expect(t, m2.allocator.procedure == ally.procedure)
+
+ d1 := make([dynamic]string)
+ defer delete(d1)
+ testing.expect(t, cap(d1) == 0)
+ testing.expect(t, d1.allocator.procedure == context.allocator.procedure)
+
+ d2 := make([dynamic]string, ally)
+ defer delete(d2)
+ testing.expect(t, cap(d2) == 0)
+ testing.expect(t, d2.allocator.procedure == ally.procedure)
} \ No newline at end of file
diff --git a/tests/core/slice/test_core_slice.odin b/tests/core/slice/test_core_slice.odin
index 16d5b23a4..9c77f872d 100644
--- a/tests/core/slice/test_core_slice.odin
+++ b/tests/core/slice/test_core_slice.odin
@@ -306,3 +306,38 @@ test_compare_empty :: proc(t: ^testing.T) {
testing.expectf(t, slice.equal(c[:], d[:]),
"Expected two separate empty slices of two dynamic arrays to be equal")
}
+
+@test
+test_linear_search_reverse :: proc(t: ^testing.T) {
+ index: int
+ found: bool
+
+ s := []i32{0, 50, 50, 100}
+
+ index, found = slice.linear_search_reverse(s, 100)
+ testing.expect(t, found)
+ testing.expect_value(t, index, len(s) - 1)
+
+ index, found = slice.linear_search_reverse(s[len(s) - 1:], 100)
+ testing.expect(t, found)
+ testing.expect_value(t, index, 0)
+
+ index, found = slice.linear_search_reverse(s, 50)
+ testing.expect(t, found)
+ testing.expect_value(t, index, 2)
+
+ index, found = slice.linear_search_reverse(s, 0)
+ testing.expect(t, found)
+ testing.expect_value(t, index, 0)
+
+ index, found = slice.linear_search_reverse(s, -1)
+ testing.expect(t, !found)
+
+ less_than_80 :: proc(x: i32) -> bool {
+ return x < 80
+ }
+
+ index, found = slice.linear_search_reverse_proc(s, less_than_80)
+ testing.expect(t, found)
+ testing.expect_value(t, index, 2)
+}
diff --git a/tests/core/sys/posix/posix.odin b/tests/core/sys/posix/posix.odin
index 760ddc1fb..8daffc5b9 100644
--- a/tests/core/sys/posix/posix.odin
+++ b/tests/core/sys/posix/posix.odin
@@ -1,8 +1,6 @@
-#+build darwin, freebsd, openbsd, netbsd
+#+build linux, darwin, freebsd, openbsd, netbsd
package tests_core_posix
-import "base:runtime"
-
import "core:log"
import "core:path/filepath"
import "core:strings"
@@ -146,7 +144,6 @@ test_libgen :: proc(t: ^testing.T) {
{ "usr/", ".", "usr" },
{ "", ".", "." },
{ "/", "/", "/" },
- { "//", "/", "/" },
{ "///", "/", "/" },
{ "/usr/", "/", "usr" },
{ "/usr/lib", "/usr", "lib" },
@@ -206,64 +203,6 @@ test_stat :: proc(t: ^testing.T) {
}
@(test)
-test_termios :: proc(t: ^testing.T) {
- testing.expect_value(t, transmute(posix.CControl_Flags)posix.tcflag_t(posix._CSIZE), posix.CSIZE)
-
- testing.expect_value(t, transmute(posix.COutput_Flags)posix.tcflag_t(posix._NLDLY), posix.NLDLY)
- testing.expect_value(t, transmute(posix.COutput_Flags)posix.tcflag_t(posix._CRDLY), posix.CRDLY)
- testing.expect_value(t, transmute(posix.COutput_Flags)posix.tcflag_t(posix._TABDLY), posix.TABDLY)
- testing.expect_value(t, transmute(posix.COutput_Flags)posix.tcflag_t(posix._BSDLY), posix.BSDLY)
- testing.expect_value(t, transmute(posix.COutput_Flags)posix.tcflag_t(posix._VTDLY), posix.VTDLY)
- testing.expect_value(t, transmute(posix.COutput_Flags)posix.tcflag_t(posix._FFDLY), posix.FFDLY)
-}
-
-@(test)
-test_signal :: proc(t: ^testing.T) {
- @static tt: ^testing.T
- tt = t
-
- @static ctx: runtime.Context
- ctx = context
-
- act: posix.sigaction_t
- act.sa_flags = {.SIGINFO, .RESETHAND}
- act.sa_sigaction = handler
- testing.expect_value(t, posix.sigaction(.SIGCHLD, &act, nil), posix.result.OK)
-
- handler :: proc "c" (sig: posix.Signal, info: ^posix.siginfo_t, address: rawptr) {
- context = ctx
- testing.expect_value(tt, sig, posix.Signal.SIGCHLD)
- testing.expect_value(tt, info.si_signo, posix.Signal.SIGCHLD)
- testing.expect_value(tt, info.si_status, 69)
- testing.expect_value(tt, info.si_code.chld, posix.CLD_Code.EXITED)
- }
-
- switch pid := posix.fork(); pid {
- case -1:
- log.errorf("fork() failure: %v", posix.strerror())
- case 0:
- posix.exit(69)
- case:
- for {
- status: i32
- res := posix.waitpid(pid, &status, {})
- if res == -1 {
- if !testing.expect_value(t, posix.errno(), posix.Errno.EINTR) {
- break
- }
- continue
- }
-
- if posix.WIFEXITED(status) || posix.WIFSIGNALED(status) {
- testing.expect(t, posix.WIFEXITED(status))
- testing.expect(t, posix.WEXITSTATUS(status) == 69)
- break
- }
- }
- }
-}
-
-@(test)
test_pthreads :: proc(t: ^testing.T) {
testing.set_fail_timeout(t, time.Second)
diff --git a/tests/core/sys/posix/structs.odin b/tests/core/sys/posix/structs.odin
index de9511634..a0e8fea99 100644
--- a/tests/core/sys/posix/structs.odin
+++ b/tests/core/sys/posix/structs.odin
@@ -1,4 +1,4 @@
-#+build darwin, freebsd, openbsd, netbsd
+#+build linux, darwin, freebsd, openbsd, netbsd
package tests_core_posix
import "core:log"
diff --git a/tests/core/sys/posix/structs/structs.c b/tests/core/sys/posix/structs/structs.c
index 7d8038fbb..e78e872eb 100644
--- a/tests/core/sys/posix/structs/structs.c
+++ b/tests/core/sys/posix/structs/structs.c
@@ -40,7 +40,9 @@ int main(int argc, char *argv[])
printf("pthread_attr_t %zu %zu\n", sizeof(pthread_attr_t), _Alignof(pthread_attr_t));
printf("pthread_key_t %zu %zu\n", sizeof(pthread_key_t), _Alignof(pthread_key_t));
+#ifndef __linux__
printf("sched_param %zu %zu\n", sizeof(struct sched_param), _Alignof(struct sched_param));
+#endif
printf("termios %zu %zu\n", sizeof(struct termios), _Alignof(struct termios));
@@ -99,5 +101,29 @@ int main(int argc, char *argv[])
printf("timespec %zu %zu\n", sizeof(struct timespec), _Alignof(struct timespec));
printf("clock_t %zu %zu\n", sizeof(clock_t), _Alignof(clock_t));
+ printf("PTHREAD_CANCEL_ASYNCHRONOUS %d\n", PTHREAD_CANCEL_ASYNCHRONOUS);
+ printf("PTHREAD_CANCEL_DEFERRED %d\n", PTHREAD_CANCEL_DEFERRED);
+
+ printf("PTHREAD_CANCEL_DISABLE %d\n", PTHREAD_CANCEL_DISABLE);
+ printf("PTHREAD_CANCEL_ENABLE %d\n", PTHREAD_CANCEL_ENABLE);
+
+ printf("PTHREAD_CANCELED %p\n", PTHREAD_CANCELED);
+
+ printf("PTHREAD_CREATE_JOINABLE %d\n", PTHREAD_CREATE_JOINABLE);
+ printf("PTHREAD_CREATE_DETACHED %d\n", PTHREAD_CREATE_DETACHED);
+
+ printf("PTHREAD_EXPLICIT_SCHED %d\n", PTHREAD_EXPLICIT_SCHED);
+ printf("PTHREAD_INHERIT_SCHED %d\n", PTHREAD_INHERIT_SCHED);
+
+ printf("PTHREAD_PRIO_INHERIT %d\n", PTHREAD_PRIO_INHERIT);
+ printf("PTHREAD_PRIO_NONE %d\n", PTHREAD_PRIO_NONE);
+ printf("PTHREAD_PRIO_PROTECT %d\n", PTHREAD_PRIO_PROTECT);
+
+ printf("PTHREAD_PROCESS_SHARED %d\n", PTHREAD_PROCESS_SHARED);
+ printf("PTHREAD_PROCESS_PRIVATE %d\n", PTHREAD_PROCESS_PRIVATE);
+
+ printf("PTHREAD_SCOPE_PROCESS %d\n", PTHREAD_SCOPE_PROCESS);
+ printf("PTHREAD_SCOPE_SYSTEM %d\n", PTHREAD_SCOPE_SYSTEM);
+
return 0;
}
diff --git a/tests/core/sys/posix/structs/structs.odin b/tests/core/sys/posix/structs/structs.odin
index 2663d1e30..c94bb7c99 100644
--- a/tests/core/sys/posix/structs/structs.odin
+++ b/tests/core/sys/posix/structs/structs.odin
@@ -14,7 +14,11 @@ main :: proc() {
fmt.println("pthread_attr_t", size_of(posix.pthread_attr_t), align_of(posix.pthread_attr_t))
fmt.println("pthread_key_t", size_of(posix.pthread_key_t), align_of(posix.pthread_key_t))
- fmt.println("sched_param", size_of(posix.sched_param), align_of(posix.sched_param))
+ // NOTE: On Linux, differences between libc may mean the Odin side is larger than the other side,
+ // this is fine in practice.
+ when ODIN_OS != .Linux {
+ fmt.println("sched_param", size_of(posix.sched_param), align_of(posix.sched_param))
+ }
fmt.println("termios", size_of(posix.termios), align_of(posix.termios))
@@ -71,4 +75,28 @@ main :: proc() {
fmt.println("time_t", size_of(posix.time_t), align_of(posix.time_t))
fmt.println("timespec", size_of(posix.timespec), align_of(posix.timespec))
fmt.println("clock_t", size_of(posix.clock_t), align_of(posix.clock_t))
+
+ fmt.println("PTHREAD_CANCEL_ASYNCHRONOUS", posix.PTHREAD_CANCEL_ASYNCHRONOUS)
+ fmt.println("PTHREAD_CANCEL_DEFERRED", posix.PTHREAD_CANCEL_DEFERRED)
+
+ fmt.println("PTHREAD_CANCEL_DISABLE", posix.PTHREAD_CANCEL_DISABLE)
+ fmt.println("PTHREAD_CANCEL_ENABLE", posix.PTHREAD_CANCEL_ENABLE)
+
+ fmt.printfln("PTHREAD_CANCELED %#x", posix.PTHREAD_CANCELED)
+
+ fmt.println("PTHREAD_CREATE_JOINABLE", posix.PTHREAD_CREATE_JOINABLE)
+ fmt.println("PTHREAD_CREATE_DETACHED", posix.PTHREAD_CREATE_DETACHED)
+
+ fmt.println("PTHREAD_EXPLICIT_SCHED", posix.PTHREAD_EXPLICIT_SCHED)
+ fmt.println("PTHREAD_INHERIT_SCHED", posix.PTHREAD_INHERIT_SCHED)
+
+ fmt.println("PTHREAD_PRIO_INHERIT", posix.PTHREAD_PRIO_INHERIT)
+ fmt.println("PTHREAD_PRIO_NONE", posix.PTHREAD_PRIO_NONE)
+ fmt.println("PTHREAD_PRIO_PROTECT", posix.PTHREAD_PRIO_PROTECT)
+
+ fmt.println("PTHREAD_PROCESS_SHARED", posix.PTHREAD_PROCESS_SHARED)
+ fmt.println("PTHREAD_PROCESS_PRIVATE", posix.PTHREAD_PROCESS_PRIVATE)
+
+ fmt.println("PTHREAD_SCOPE_PROCESS", posix.PTHREAD_SCOPE_PROCESS)
+ fmt.println("PTHREAD_SCOPE_SYSTEM", posix.PTHREAD_SCOPE_SYSTEM)
}
diff --git a/tests/core/time/test_core_time.odin b/tests/core/time/test_core_time.odin
index 424111aa3..3bd4c3151 100644
--- a/tests/core/time/test_core_time.odin
+++ b/tests/core/time/test_core_time.odin
@@ -3,6 +3,7 @@ package test_core_time
import "core:testing"
import "core:time"
import dt "core:time/datetime"
+import tz "core:time/timezone"
is_leap_year :: time.is_leap_year
@@ -349,3 +350,228 @@ date_component_roundtrip_test :: proc(t: ^testing.T, moment: dt.DateTime) {
moment.year, moment.month, moment.day, moment.hour, moment.minute, moment.second, YYYY, MM, DD, hh, mm, ss,
)
}
+
+datetime_eq :: proc(dt1: dt.DateTime, dt2: dt.DateTime) -> bool {
+ return (
+ dt1.year == dt2.year && dt1.month == dt2.month && dt1.day == dt2.day &&
+ dt1.hour == dt2.hour && dt1.minute == dt2.minute && dt1.second == dt2.second
+ )
+}
+
+@test
+test_convert_timezone_roundtrip :: proc(t: ^testing.T) {
+ dst_dt, _ := dt.components_to_datetime(2024, 10, 4, 23, 47, 0)
+ std_dt, _ := dt.components_to_datetime(2024, 11, 4, 23, 47, 0)
+
+ local_tz, local_load_ok := tz.region_load("local")
+ testing.expectf(t, local_load_ok, "Failed to load local timezone")
+ defer tz.region_destroy(local_tz)
+
+ edm_tz, edm_load_ok := tz.region_load("America/Edmonton")
+ testing.expectf(t, edm_load_ok, "Failed to load America/Edmonton timezone")
+ defer tz.region_destroy(edm_tz)
+
+ shuffle_tz :: proc(start_dt: dt.DateTime, test_tz: ^dt.TZ_Region) -> dt.DateTime {
+ tz_dt := tz.datetime_to_tz(start_dt, test_tz)
+ utc_dt := tz.datetime_to_utc(tz_dt)
+ return utc_dt
+ }
+
+ testing.expectf(t, datetime_eq(dst_dt, shuffle_tz(dst_dt, local_tz)), "Failed to convert to/from local dst timezone")
+ testing.expectf(t, datetime_eq(std_dt, shuffle_tz(std_dt, local_tz)), "Failed to convert to/from local std timezone")
+ testing.expectf(t, datetime_eq(dst_dt, shuffle_tz(dst_dt, edm_tz)), "Failed to convert to/from Edmonton dst timezone")
+ testing.expectf(t, datetime_eq(std_dt, shuffle_tz(std_dt, edm_tz)), "Failed to convert to/from Edmonton std timezone")
+}
+
+@test
+test_check_timezone_metadata :: proc(t: ^testing.T) {
+ dst_dt, _ := dt.components_to_datetime(2024, 10, 4, 23, 47, 0)
+ std_dt, _ := dt.components_to_datetime(2024, 11, 4, 23, 47, 0)
+
+ pac_tz, pac_load_ok := tz.region_load("America/Los_Angeles")
+ testing.expectf(t, pac_load_ok, "Failed to load America/Los_Angeles timezone")
+ defer tz.region_destroy(pac_tz)
+
+ pac_dst_dt := tz.datetime_to_tz(dst_dt, pac_tz)
+ pac_std_dt := tz.datetime_to_tz(std_dt, pac_tz)
+ testing.expectf(t, tz.shortname_unsafe(pac_dst_dt) == "PDT", "Invalid timezone shortname")
+ testing.expectf(t, tz.shortname_unsafe(pac_std_dt) == "PST", "Invalid timezone shortname")
+ testing.expectf(t, tz.dst_unsafe(pac_std_dt) == false, "Expected daylight savings == false, got true")
+ testing.expectf(t, tz.dst_unsafe(pac_dst_dt) == true, "Expected daylight savings == true, got false")
+
+ pac_dst_name, ok := tz.shortname(pac_dst_dt)
+ testing.expectf(t, ok == true, "Invalid datetime")
+ testing.expectf(t, pac_dst_name == "PDT", "Invalid timezone shortname")
+
+ pac_std_name, ok2 := tz.shortname(pac_std_dt)
+ testing.expectf(t, ok2 == true, "Invalid datetime")
+ testing.expectf(t, pac_std_name == "PST", "Invalid timezone shortname")
+
+ pac_is_dst, ok3 := tz.dst(pac_dst_dt)
+ testing.expectf(t, ok3 == true, "Invalid datetime")
+ testing.expectf(t, pac_is_dst == true, "Expected daylight savings == false, got true")
+
+ pac_is_dst, ok3 = tz.dst(pac_std_dt)
+ testing.expectf(t, ok3 == true, "Invalid datetime")
+ testing.expectf(t, pac_is_dst == false, "Expected daylight savings == false, got true")
+}
+
+rrule_eq :: proc(r1, r2: dt.TZ_RRule) -> (eq: bool) {
+ if r1.has_dst != r2.has_dst { return }
+
+ if r1.std_name != r2.std_name { return }
+ if r1.std_offset != r2.std_offset { return }
+ if r1.std_date != r2.std_date { return }
+
+ if r1.dst_name != r2.dst_name { return }
+ if r1.dst_offset != r2.dst_offset { return }
+ if r1.dst_date != r2.dst_date { return }
+
+ return true
+}
+
+@test
+test_check_timezone_posix_tz :: proc(t: ^testing.T) {
+ correct_simple_rrule := dt.TZ_RRule{
+ has_dst = false,
+
+ std_name = "UTC",
+ std_offset = -(5 * 60 * 60),
+ std_date = dt.TZ_Transition_Date{
+ type = .Leap,
+ day = 0,
+ time = 2 * 60 * 60,
+ },
+ }
+
+ simple_rrule, simple_rrule_ok := tz.parse_posix_tz("UTC+5")
+ testing.expectf(t, simple_rrule_ok, "Failed to parse posix tz")
+ defer tz.rrule_destroy(simple_rrule)
+ testing.expectf(t, rrule_eq(simple_rrule, correct_simple_rrule), "POSIX TZ parsed incorrectly")
+
+ correct_est_rrule := dt.TZ_RRule{
+ has_dst = true,
+
+ std_name = "EST",
+ std_offset = -(5 * 60 * 60),
+ std_date = dt.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = 3,
+ week = 2,
+ day = 0,
+ time = 2 * 60 * 60,
+ },
+
+ dst_name = "EDT",
+ dst_offset = -(4 * 60 * 60),
+ dst_date = dt.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = 11,
+ week = 1,
+ day = 0,
+ time = 2 * 60 * 60,
+ },
+ }
+
+ est_rrule, est_rrule_ok := tz.parse_posix_tz("EST+5EDT,M3.2.0/2,M11.1.0/2")
+ testing.expectf(t, est_rrule_ok, "Failed to parse posix tz")
+ defer tz.rrule_destroy(est_rrule)
+ testing.expectf(t, rrule_eq(est_rrule, correct_est_rrule), "POSIX TZ parsed incorrectly")
+
+ correct_ist_rrule := dt.TZ_RRule{
+ has_dst = true,
+
+ std_name = "IST",
+ std_offset = (2 * 60 * 60),
+ std_date = dt.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = 3,
+ week = 4,
+ day = 4,
+ time = 26 * 60 * 60,
+ },
+
+ dst_name = "IDT",
+ dst_offset = (3 * 60 * 60),
+ dst_date = dt.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = 10,
+ week = 5,
+ day = 0,
+ time = 2 * 60 * 60,
+ },
+ }
+
+ ist_rrule, ist_rrule_ok := tz.parse_posix_tz("IST-2IDT,M3.4.4/26,M10.5.0")
+ testing.expectf(t, ist_rrule_ok, "Failed to parse posix tz")
+ defer tz.rrule_destroy(ist_rrule)
+ testing.expectf(t, rrule_eq(ist_rrule, correct_ist_rrule), "POSIX TZ parsed incorrectly")
+
+ correct_warst_rrule := dt.TZ_RRule{
+ has_dst = true,
+
+ std_name = "WART",
+ std_offset = -(4 * 60 * 60),
+ std_date = dt.TZ_Transition_Date{
+ type = .No_Leap,
+ day = 1,
+ time = 0 * 60 * 60,
+ },
+
+ dst_name = "WARST",
+ dst_offset = -(3 * 60 * 60),
+ dst_date = dt.TZ_Transition_Date{
+ type = .No_Leap,
+ day = 365,
+ time = 25 * 60 * 60,
+ },
+ }
+
+ warst_rrule, warst_rrule_ok := tz.parse_posix_tz("WART4WARST,J1/0,J365/25")
+ testing.expectf(t, warst_rrule_ok, "Failed to parse posix tz")
+ defer tz.rrule_destroy(warst_rrule)
+ testing.expectf(t, rrule_eq(warst_rrule, correct_warst_rrule), "POSIX TZ parsed incorrectly")
+
+ correct_wgt_rrule := dt.TZ_RRule{
+ has_dst = true,
+
+ std_name = "WGT",
+ std_offset = -(3 * 60 * 60),
+ std_date = dt.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = 3,
+ week = 5,
+ day = 0,
+ time = -2 * 60 * 60,
+ },
+
+ dst_name = "WGST",
+ dst_offset = -(2 * 60 * 60),
+ dst_date = dt.TZ_Transition_Date{
+ type = .Month_Week_Day,
+ month = 10,
+ week = 5,
+ day = 0,
+ time = -1 * 60 * 60,
+ },
+ }
+
+ wgt_rrule, wgt_rrule_ok := tz.parse_posix_tz("WGT3WGST,M3.5.0/-2,M10.5.0/-1")
+ testing.expectf(t, wgt_rrule_ok, "Failed to parse posix tz")
+ defer tz.rrule_destroy(wgt_rrule)
+ testing.expectf(t, rrule_eq(wgt_rrule, correct_wgt_rrule), "POSIX TZ parsed incorrectly")
+}
+
+@test
+test_check_timezone_edgecases :: proc(t: ^testing.T) {
+ utc_dt, _ := dt.components_to_datetime(2024, 10, 4, 0, 47, 0)
+
+ tok_tz, tok_load_ok := tz.region_load("Asia/Tokyo")
+ testing.expectf(t, tok_load_ok, "Failed to load Asia/Tokyo timezone")
+ defer tz.region_destroy(tok_tz)
+
+ ret_dt := tz.datetime_to_tz(utc_dt, tok_tz)
+ expected_tok_dt, _ := dt.components_to_datetime(2024, 10, 4, 9, 47, 0)
+
+ testing.expectf(t, datetime_eq(ret_dt, expected_tok_dt), "Failed to convert to Tokyo time")
+}
diff --git a/vendor/box2d/box2d.odin b/vendor/box2d/box2d.odin
index c1d789273..e7da34a45 100644
--- a/vendor/box2d/box2d.odin
+++ b/vendor/box2d/box2d.odin
@@ -490,7 +490,7 @@ foreign lib {
World_Step :: proc(worldId: WorldId, timeStep: f32 , subStepCount: c.int) ---
// Call this to draw shapes and other debug draw data
- World_Draw :: proc(worldId: WorldId, draw: DebugDraw) ---
+ World_Draw :: proc(worldId: WorldId, draw: ^DebugDraw) ---
// Get the body events for the current time step. The event data is transient. Do not store a reference to this data.
World_GetBodyEvents :: proc(worldId: WorldId) -> BodyEvents ---
diff --git a/vendor/glfw/bindings/bindings.odin b/vendor/glfw/bindings/bindings.odin
index 81569f177..a4be006b0 100644
--- a/vendor/glfw/bindings/bindings.odin
+++ b/vendor/glfw/bindings/bindings.odin
@@ -3,7 +3,7 @@ package glfw_bindings
import "core:c"
import vk "vendor:vulkan"
-GLFW_SHARED :: #config(GLFW_SHARED, false)
+GLFW_SHARED :: #config(GLFW_SHARED, ODIN_OS != .Windows && ODIN_OS != .Darwin)
when ODIN_OS == .Windows {
when GLFW_SHARED {
@@ -38,7 +38,17 @@ when ODIN_OS == .Windows {
}
}
} else {
- foreign import glfw "system:glfw"
+ when GLFW_SHARED {
+ foreign import glfw "system:glfw"
+ } else {
+ @(private)
+ LIBGLFW3 :: "../lib/libglfw3.a"
+ when !#exists(LIBGLFW3) {
+ #panic("Could not find the static glfw library, add it at \"" + ODIN_ROOT + "vendor/glfw/lib/\"`")
+ }
+
+ foreign import glfw { LIBGLFW3 }
+ }
}
#assert(size_of(c.int) == size_of(b32))
diff --git a/vendor/lua/5.2/lua.odin b/vendor/lua/5.2/lua.odin
index d5d8ec253..bc47479e3 100644
--- a/vendor/lua/5.2/lua.odin
+++ b/vendor/lua/5.2/lua.odin
@@ -7,7 +7,7 @@ import c "core:c/libc"
#assert(size_of(c.int) == size_of(b32))
-LUA_SHARED :: config(LUA_SHARED, false)
+LUA_SHARED :: #config(LUA_SHARED, false)
when LUA_SHARED {
when ODIN_OS == .Windows {
diff --git a/vendor/miniaudio/common_unix.odin b/vendor/miniaudio/common_unix.odin
index 8afcc0b5a..1c0158404 100644
--- a/vendor/miniaudio/common_unix.odin
+++ b/vendor/miniaudio/common_unix.odin
@@ -1,18 +1,18 @@
#+build !windows
package miniaudio
-import "core:sys/unix"
+import "core:sys/posix"
import "core:c"
-thread :: unix.pthread_t
-mutex :: unix.pthread_mutex_t
+thread :: posix.pthread_t
+mutex :: posix.pthread_mutex_t
event :: struct {
value: u32,
- lock: unix.pthread_mutex_t,
- cond: unix.pthread_cond_t,
+ lock: posix.pthread_mutex_t,
+ cond: posix.pthread_cond_t,
}
semaphore :: struct {
value: c.int,
- lock: unix.pthread_mutex_t,
- cond: unix.pthread_cond_t,
+ lock: posix.pthread_mutex_t,
+ cond: posix.pthread_cond_t,
}
diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin
index 8d26c8824..e02716a3b 100644
--- a/vendor/raylib/raylib.odin
+++ b/vendor/raylib/raylib.odin
@@ -861,7 +861,7 @@ NPatchLayout :: enum c.int {
// Callbacks to hook some internal functions
// WARNING: This callbacks are intended for advance users
-TraceLogCallback :: #type proc "c" (logLevel: TraceLogLevel, text: cstring, args: c.va_list) // Logging: Redirect trace log messages
+TraceLogCallback :: #type proc "c" (logLevel: TraceLogLevel, text: cstring, args: ^c.va_list) // Logging: Redirect trace log messages
LoadFileDataCallback :: #type proc "c"(fileName: cstring, dataSize: ^c.int) -> [^]u8 // FileIO: Load binary data
SaveFileDataCallback :: #type proc "c" (fileName: cstring, data: rawptr, dataSize: c.int) -> bool // FileIO: Save binary data
LoadFileTextCallback :: #type proc "c" (fileName: cstring) -> [^]u8 // FileIO: Load text data
@@ -1012,10 +1012,10 @@ foreign lib {
// Random value generation functions
- SetRandomSeed :: proc(seed: c.uint) --- // Set the seed for the random number generator
- GetRandomValue :: proc(min, max: c.int) -> c.int --- // Get a random value between min and max (both included)
- LoadRandomSequence :: proc(count: c.uint, min, max: c.int) --- // Load random values sequence, no values repeated
- UnloadRandomSequence :: proc(sequence: ^c.int) --- // Unload random values sequence
+ SetRandomSeed :: proc(seed: c.uint) --- // Set the seed for the random number generator
+ GetRandomValue :: proc(min, max: c.int) -> c.int --- // Get a random value between min and max (both included)
+ LoadRandomSequence :: proc(count: c.uint, min, max: c.int) -> [^]c.int --- // Load random values sequence, no values repeated
+ UnloadRandomSequence :: proc(sequence: [^]c.int) --- // Unload random values sequence
// Misc. functions
TakeScreenshot :: proc(fileName: cstring) --- // Takes a screenshot of current screen (filename extension defines format)
@@ -1517,7 +1517,7 @@ foreign lib {
// Mesh generation functions
GenMeshPoly :: proc(sides: c.int, radius: f32) -> Mesh --- // Generate polygonal mesh
- GenMeshPlane :: proc(width, lengthL: f32, resX, resZ: c.int) -> Mesh --- // Generate plane mesh (with subdivisions)
+ GenMeshPlane :: proc(width, length: f32, resX, resZ: c.int) -> Mesh --- // Generate plane mesh (with subdivisions)
GenMeshCube :: proc(width, height, length: f32) -> Mesh --- // Generate cuboid mesh
GenMeshSphere :: proc(radius: f32, rings, slices: c.int) -> Mesh --- // Generate sphere mesh (standard sphere)
GenMeshHemiSphere :: proc(radius: f32, rings, slices: c.int) -> Mesh --- // Generate half-sphere mesh (no bottom cap)
diff --git a/vendor/raylib/raymath.odin b/vendor/raylib/raymath.odin
index eef5c2fcd..c66498e41 100644
--- a/vendor/raylib/raymath.odin
+++ b/vendor/raylib/raymath.odin
@@ -153,7 +153,7 @@ Vector2Normalize :: proc "c" (v: Vector2) -> Vector2 {
// Transforms a Vector2 by a given Matrix
@(require_results)
Vector2Transform :: proc "c" (v: Vector2, m: Matrix) -> Vector2 {
- v4 := Vector4{v.x, v.y, 0, 0}
+ v4 := Vector4{v.x, v.y, 0, 1}
return (m * v4).xy
}
// Calculate linear interpolation between two vectors
@@ -399,7 +399,7 @@ Vector3RotateByAxisAngle :: proc "c" (v: Vector3, axis: Vector3, angle: f32) ->
// Transforms a Vector3 by a given Matrix
@(require_results)
Vector3Transform :: proc "c" (v: Vector3, m: Matrix) -> Vector3 {
- v4 := Vector4{v.x, v.y, v.z, 0}
+ v4 := Vector4{v.x, v.y, v.z, 1}
return (m * v4).xyz
}
// Calculate linear interpolation between two vectors
diff --git a/vendor/raylib/rlgl/rlgl.odin b/vendor/raylib/rlgl/rlgl.odin
index cef31c238..9d4682294 100644
--- a/vendor/raylib/rlgl/rlgl.odin
+++ b/vendor/raylib/rlgl/rlgl.odin
@@ -438,6 +438,7 @@ foreign lib {
BlitFramebuffer :: proc(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask: c.int) --- // Blit active framebuffer to main framebuffer
// General render state
+ EnableColorBlend :: proc() --- // Enable color blending
DisableColorBlend :: proc() --- // Disable color blending
EnableDepthTest :: proc() --- // Enable depth test
DisableDepthTest :: proc() --- // Disable depth test
diff --git a/vendor/stb/lib/darwin/stb_sprintf.a b/vendor/stb/lib/darwin/stb_sprintf.a
new file mode 100644
index 000000000..e364ee200
--- /dev/null
+++ b/vendor/stb/lib/darwin/stb_sprintf.a
Binary files differ
diff --git a/vendor/stb/lib/stb_sprintf.lib b/vendor/stb/lib/stb_sprintf.lib
new file mode 100644
index 000000000..35c2cecc9
--- /dev/null
+++ b/vendor/stb/lib/stb_sprintf.lib
Binary files differ
diff --git a/vendor/stb/sprintf/stb_sprintf.odin b/vendor/stb/sprintf/stb_sprintf.odin
index ec5036e45..88119abd1 100644
--- a/vendor/stb/sprintf/stb_sprintf.odin
+++ b/vendor/stb/sprintf/stb_sprintf.odin
@@ -29,7 +29,7 @@ when ODIN_ARCH == .wasm32 || ODIN_ARCH == .wasm64p32 {
foreign stbpf {
sprintf :: proc(buf: [^]byte, fmt: cstring, #c_vararg args: ..any) -> i32 ---
snprintf :: proc(buf: [^]byte, count: i32, fmt: cstring, #c_vararg args: ..any) -> i32 ---
- vsprintf :: proc(buf: [^]byte, fmt: cstring, va: c.va_list) -> i32 ---
+ vsprintf :: proc(buf: [^]byte, fmt: cstring, va: ^c.va_list) -> i32 ---
vsnprintf :: proc(buf: [^]byte, count: i32, fmt: cstring, va: ^c.va_list) -> i32 ---
vsprintfcb :: proc(callback: SPRINTFCB, user: rawptr, buf: [^]byte, fmt: cstring, va: ^c.va_list) -> i32 ---
}
diff --git a/vendor/stb/src/build.bat b/vendor/stb/src/build.bat
index 5fd0e1789..54a0d249f 100644
--- a/vendor/stb/src/build.bat
+++ b/vendor/stb/src/build.bat
@@ -2,12 +2,13 @@
if not exist "..\lib" mkdir ..\lib
-cl -nologo -MT -TC -O2 -c stb_image.c stb_image_write.c stb_image_resize.c stb_truetype.c stb_rect_pack.c stb_vorbis.c
+cl -nologo -MT -TC -O2 -c stb_image.c stb_image_write.c stb_image_resize.c stb_truetype.c stb_rect_pack.c stb_vorbis.c stb_sprintf.c
lib -nologo stb_image.obj -out:..\lib\stb_image.lib
lib -nologo stb_image_write.obj -out:..\lib\stb_image_write.lib
lib -nologo stb_image_resize.obj -out:..\lib\stb_image_resize.lib
lib -nologo stb_truetype.obj -out:..\lib\stb_truetype.lib
lib -nologo stb_rect_pack.obj -out:..\lib\stb_rect_pack.lib
lib -nologo stb_vorbis.obj -out:..\lib\stb_vorbis.lib
+lib -nologo stb_sprintf.obj -out:..\lib\stb_sprintf.lib
del *.obj
diff --git a/vendor/vulkan/_gen/create_vulkan_odin_wrapper.py b/vendor/vulkan/_gen/create_vulkan_odin_wrapper.py
index a551887ff..87b221457 100644
--- a/vendor/vulkan/_gen/create_vulkan_odin_wrapper.py
+++ b/vendor/vulkan/_gen/create_vulkan_odin_wrapper.py
@@ -17,10 +17,14 @@ file_and_urls = [
("vulkan_ios.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vulkan/vulkan_ios.h', False),
("vulkan_wayland.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vulkan/vulkan_wayland.h', False),
# Vulkan Video
+ ("vulkan_video_codec_av1std.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_av1std.h', False),
("vulkan_video_codec_h264std.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h264std.h', False),
("vulkan_video_codec_h265std.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h265std.h', False),
+ ("vulkan_video_codec_av1std_decode.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_av1std_decode.h', False),
("vulkan_video_codec_h264std_decode.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h264std_decode.h', False),
("vulkan_video_codec_h265std_decode.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h265std_decode.h', False),
+ ("vulkan_video_codec_h264std_encode.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h264std_encode.h', False),
+ ("vulkan_video_codec_h265std_encode.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h265std_encode.h', False),
]
for file, url, _ in file_and_urls:
@@ -36,15 +40,15 @@ for file, _, skip in file_and_urls:
def no_vk(t):
- t = t.replace('Vk', '')
t = t.replace('PFN_vk_icd', 'Procicd')
t = t.replace('PFN_vk', 'Proc')
t = t.replace('PFN_', 'Proc')
t = t.replace('PFN_', 'Proc')
- t = t.replace('VK_', '')
+
+ t = re.sub('(?:Vk|VK_)?(\w+)', '\\1', t)
# Vulkan Video
- t = t.replace('STD_', '')
- t = t.replace('Std', '')
+
+ t = re.sub('(?:Std|STD_)?(\w+)', '\\1', t)
return t
OPAQUE_STRUCTS = """
@@ -61,6 +65,7 @@ def convert_type(t, prev_name, curr_name):
"uint32_t": 'u32',
"uint64_t": 'u64',
"size_t": 'int',
+ 'int16_t': 'i16',
'int32_t': 'i32',
'int64_t': 'i64',
'int': 'c.int',
@@ -298,8 +303,8 @@ def parse_enums(f):
f.write("import \"core:c\"\n\n")
f.write("// Enums\n")
- data = re.findall(r"typedef enum Vk(\w+) {(.+?)} \w+;", src, re.S)
- data += re.findall(r"typedef enum Std(\w+) {(.+?)} \w+;", src, re.S)
+ data = re.findall(r"typedef enum (\w+) {(.+?)} \w+;", src, re.S)
+ data = [(no_vk(n), f) for n, f in data]
data.sort(key=lambda x: x[0])
diff --git a/vendor/vulkan/_gen/vk_icd.h b/vendor/vulkan/_gen/vk_icd.h
index 2cd6c3d33..59204a341 100644
--- a/vendor/vulkan/_gen/vk_icd.h
+++ b/vendor/vulkan/_gen/vk_icd.h
@@ -1,23 +1,9 @@
-//
-// File: vk_icd.h
-//
/*
- * Copyright (c) 2015-2023 LunarG, Inc.
- * Copyright (c) 2015-2023 The Khronos Group Inc.
- * Copyright (c) 2015-2023 Valve Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2015-2023 The Khronos Group Inc.
+ * Copyright 2015-2023 Valve Corporation
+ * Copyright 2015-2023 LunarG, Inc.
*
+ * SPDX-License-Identifier: Apache-2.0
*/
#pragma once
diff --git a/vendor/vulkan/_gen/vk_layer.h b/vendor/vulkan/_gen/vk_layer.h
index 7954f71d8..19d88fce4 100644
--- a/vendor/vulkan/_gen/vk_layer.h
+++ b/vendor/vulkan/_gen/vk_layer.h
@@ -1,23 +1,9 @@
-//
-// File: vk_layer.h
-//
/*
- * Copyright (c) 2015-2023 LunarG, Inc.
- * Copyright (c) 2015-2023 The Khronos Group Inc.
- * Copyright (c) 2015-2023 Valve Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2015-2023 The Khronos Group Inc.
+ * Copyright 2015-2023 Valve Corporation
+ * Copyright 2015-2023 LunarG, Inc.
*
+ * SPDX-License-Identifier: Apache-2.0
*/
#pragma once
diff --git a/vendor/vulkan/_gen/vk_platform.h b/vendor/vulkan/_gen/vk_platform.h
index ed67a6004..0ecd4f647 100644
--- a/vendor/vulkan/_gen/vk_platform.h
+++ b/vendor/vulkan/_gen/vk_platform.h
@@ -2,7 +2,7 @@
// File: vk_platform.h
//
/*
-** Copyright 2014-2023 The Khronos Group Inc.
+** Copyright 2014-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
diff --git a/vendor/vulkan/_gen/vulkan_core.h b/vendor/vulkan/_gen/vulkan_core.h
index a2e7ed3cb..e6c16498a 100644
--- a/vendor/vulkan/_gen/vulkan_core.h
+++ b/vendor/vulkan/_gen/vulkan_core.h
@@ -2,7 +2,7 @@
#define VULKAN_CORE_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,6 +19,7 @@ extern "C" {
+// VK_VERSION_1_0 is a preprocessor guard. Do not pass it to API calls.
#define VK_VERSION_1_0 1
#include "vk_platform.h"
@@ -26,7 +27,7 @@ extern "C" {
#ifndef VK_USE_64_BIT_PTR_DEFINES
- #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+ #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) || (defined(__riscv) && __riscv_xlen == 64)
#define VK_USE_64_BIT_PTR_DEFINES 1
#else
#define VK_USE_64_BIT_PTR_DEFINES 0
@@ -68,21 +69,25 @@ extern "C" {
#define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0
// Version of this file
-#define VK_HEADER_VERSION 250
+#define VK_HEADER_VERSION 296
// Complete version of this file
#define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION)
+// VK_MAKE_VERSION is deprecated, but no reason was given in the API XML
// DEPRECATED: This define is deprecated. VK_MAKE_API_VERSION should be used instead.
#define VK_MAKE_VERSION(major, minor, patch) \
((((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
+// VK_VERSION_MAJOR is deprecated, but no reason was given in the API XML
// DEPRECATED: This define is deprecated. VK_API_VERSION_MAJOR should be used instead.
#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22U)
+// VK_VERSION_MINOR is deprecated, but no reason was given in the API XML
// DEPRECATED: This define is deprecated. VK_API_VERSION_MINOR should be used instead.
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU)
+// VK_VERSION_PATCH is deprecated, but no reason was given in the API XML
// DEPRECATED: This define is deprecated. VK_API_VERSION_PATCH should be used instead.
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU)
@@ -181,11 +186,11 @@ typedef enum VkResult {
VK_THREAD_DONE_KHR = 1000268001,
VK_OPERATION_DEFERRED_KHR = 1000268002,
VK_OPERATION_NOT_DEFERRED_KHR = 1000268003,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR = -1000299000,
-#endif
VK_ERROR_COMPRESSION_EXHAUSTED_EXT = -1000338000,
- VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000,
+ VK_INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000,
+ VK_PIPELINE_BINARY_MISSING_KHR = 1000483000,
+ VK_ERROR_NOT_ENOUGH_SPACE_KHR = -1000483000,
VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY,
VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE,
VK_ERROR_FRAGMENTATION_EXT = VK_ERROR_FRAGMENTATION,
@@ -194,6 +199,8 @@ typedef enum VkResult {
VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS,
VK_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED,
VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED,
+ // VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT is a deprecated alias
+ VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = VK_INCOMPATIBLE_SHADER_BINARY_EXT,
VK_RESULT_MAX_ENUM = 0x7FFFFFFF
} VkResult;
@@ -466,60 +473,34 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX = 1000029002,
VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000,
VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_EXT = 1000038000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000038001,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000038002,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT = 1000038003,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT = 1000038004,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT = 1000038005,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_EXT = 1000038007,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT = 1000038008,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT = 1000038009,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_EXT = 1000039000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000039001,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000039002,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT = 1000039003,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT = 1000039004,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT = 1000039005,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_EXT = 1000039007,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT = 1000039009,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT = 1000039010,
-#endif
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR = 1000038000,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000038001,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000038002,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR = 1000038003,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR = 1000038004,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR = 1000038005,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR = 1000038006,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR = 1000038007,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR = 1000038008,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR = 1000038009,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR = 1000038010,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR = 1000038011,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR = 1000038012,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000038013,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR = 1000039000,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000039001,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000039002,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR = 1000039003,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR = 1000039004,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR = 1000039005,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR = 1000039006,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR = 1000039007,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR = 1000039009,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR = 1000039010,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR = 1000039011,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR = 1000039012,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR = 1000039013,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000039014,
VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR = 1000040000,
VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR = 1000040001,
VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR = 1000040003,
@@ -580,6 +561,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000,
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001,
VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG = 1000110000,
VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
@@ -615,6 +597,21 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004,
VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005,
VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006,
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX = 1000134000,
+#endif
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX = 1000134001,
+#endif
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX = 1000134002,
+#endif
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX = 1000134003,
+#endif
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX = 1000134004,
+#endif
VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000,
VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001,
VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002,
@@ -686,7 +683,6 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000,
VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000,
- VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000,
VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR = 1000187000,
VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000187001,
@@ -699,10 +695,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = 1000388001,
VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000,
- VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002,
VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = 1000201000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000,
@@ -732,7 +725,11 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR = 1000232000,
+ VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR = 1000232001,
+ VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR = 1000232002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR = 1000235000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000,
VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001,
@@ -757,11 +754,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002,
VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001,
VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000,
- VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = 1000265000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000,
VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR = 1000269001,
@@ -769,8 +762,21 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR = 1000269003,
VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004,
VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT = 1000270000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT = 1000270001,
+ VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT = 1000270002,
+ VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT = 1000270003,
+ VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT = 1000270004,
+ VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT = 1000270005,
+ VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT = 1000270006,
+ VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT = 1000270007,
+ VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT = 1000270008,
+ VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT = 1000270009,
VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR = 1000271000,
VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR = 1000271001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT = 1000272000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT = 1000272001,
+ VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT = 1000272002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000,
VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT = 1000274000,
VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT = 1000274001,
@@ -794,6 +800,9 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000,
VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000,
VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT = 1000283000,
+ VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT = 1000283001,
+ VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT = 1000283002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000,
VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001,
VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002,
@@ -808,26 +817,24 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002,
VK_STRUCTURE_TYPE_PRESENT_ID_KHR = 1000294000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR = 1000299000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR = 1000299005,
-#endif
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299006,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR = 1000299007,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299008,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR = 1000299009,
+ VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000299010,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000,
VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001,
+ VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV = 1000307000,
+ VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV = 1000307001,
+ VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV = 1000307002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV = 1000307003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV = 1000307004,
VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV = 1000310000,
VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000,
VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001,
@@ -878,8 +885,6 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000,
VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT = 1000338001,
- VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT = 1000338002,
- VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT = 1000338003,
VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000,
@@ -920,6 +925,8 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001,
VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT = 1000375000,
+ VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT = 1000375001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000,
VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001,
VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002,
@@ -957,10 +964,15 @@ typedef enum VkStructureType {
#endif
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI = 1000404000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI = 1000404001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI = 1000404002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000,
VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM = 1000415000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR = 1000416000,
+ VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM = 1000417000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM = 1000417001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM = 1000417002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT = 1000418000,
VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT = 1000418001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000,
@@ -968,6 +980,11 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = 1000421000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM = 1000424000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_PROPERTIES_ARM = 1000424001,
+ VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM = 1000424002,
+ VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM = 1000424003,
+ VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM = 1000424004,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = 1000425000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = 1000425001,
VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = 1000425002,
@@ -975,11 +992,18 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = 1000426001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = 1000427000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = 1000427001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV = 1000428000,
+ VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV = 1000428001,
+ VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV = 1000428002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR = 1000434000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001,
VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT = 1000451000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT = 1000451001,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT = 1000453000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000,
@@ -1002,10 +1026,34 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = 1000466000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID = 1000468000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468001,
+ VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR = 1000470000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR = 1000470001,
+ VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR = 1000470003,
+ VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR = 1000470004,
+ VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR = 1000338002,
+ VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR = 1000338003,
+ VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR = 1000470005,
+ VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR = 1000470006,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD = 1000476000,
+ VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD = 1000476001,
+ VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD = 1000476002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR = 1000481000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT = 1000482000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT = 1000482001,
VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT = 1000482002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR = 1000483000,
+ VK_STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR = 1000483001,
+ VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR = 1000483002,
+ VK_STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR = 1000483003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR = 1000483004,
+ VK_STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR = 1000483005,
+ VK_STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR = 1000483006,
+ VK_STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR = 1000483007,
+ VK_STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR = 1000483008,
+ VK_STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR = 1000483009,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000,
VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM = 1000484001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000,
@@ -1013,16 +1061,110 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM = 1000488000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV = 1000492000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV = 1000492001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000351000,
VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT = 1000495000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT = 1000495001,
+ VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT = 1000496000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT = 1000498000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT = 1000499000,
+ VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV = 1000505000,
+ VK_STRUCTURE_TYPE_LATENCY_SLEEP_INFO_NV = 1000505001,
+ VK_STRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NV = 1000505002,
+ VK_STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV = 1000505003,
+ VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV = 1000505004,
+ VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV = 1000505005,
+ VK_STRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NV = 1000505006,
+ VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV = 1000505007,
+ VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV = 1000505008,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR = 1000506000,
+ VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM = 1000510000,
VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM = 1000510001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR = 1000201000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR = 1000511000,
+ VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR = 1000512000,
+ VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR = 1000512001,
+ VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR = 1000512003,
+ VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000512004,
+ VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR = 1000512005,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR = 1000515000,
+ VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR = 1000515001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV = 1000516000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM = 1000518000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM = 1000518001,
+ VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM = 1000518002,
+ VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM = 1000519000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM = 1000519001,
+ VK_STRUCTURE_TYPE_BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM = 1000519002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM = 1000520000,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM = 1000520001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM = 1000521000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT = 1000524000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = 1000525000,
+ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = 1000190001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = 1000190002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR = 1000528000,
+ VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX = 1000529000,
+ VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX = 1000529001,
+ VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX = 1000529002,
+ VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX = 1000529003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX = 1000529004,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT = 1000530000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR = 1000265000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR = 1000259000,
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR = 1000259001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR = 1000259002,
+ VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR = 1000184000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR = 1000544000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = 1000545000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = 1000545001,
+ VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR = 1000545002,
+ VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR = 1000545003,
+ VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR = 1000545004,
+ VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR = 1000545005,
+ VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = 1000545006,
+ VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT = 1000545007,
+ VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT = 1000545008,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV = 1000546000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV = 1000555000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR = 1000558000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV = 1000559000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR = 1000562000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR = 1000562001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR = 1000562002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR = 1000562003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR = 1000562004,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV = 1000563000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT = 1000564000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV = 1000568000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_EXT = 1000572000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_EXT = 1000572001,
+ VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_EXT = 1000572002,
+ VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_CREATE_INFO_EXT = 1000572003,
+ VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXT = 1000572004,
+ VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_EXT = 1000572006,
+ VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_EXT = 1000572007,
+ VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_PIPELINE_EXT = 1000572008,
+ VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_SHADER_EXT = 1000572009,
+ VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_PIPELINE_INFO_EXT = 1000572010,
+ VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_INFO_EXT = 1000572011,
+ VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT = 1000572012,
+ VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT = 1000572013,
+ VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT = 1000572014,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA = 1000575000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_PROPERTIES_MESA = 1000575001,
+ VK_STRUCTURE_TYPE_IMAGE_ALIGNMENT_CONTROL_CREATE_INFO_MESA = 1000575002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT = 1000582000,
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT = 1000582001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES,
+ // VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT is a deprecated alias
VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT,
VK_STRUCTURE_TYPE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INFO,
VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO,
@@ -1067,6 +1209,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
+ // VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT is a deprecated alias
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES,
VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO,
@@ -1121,11 +1264,15 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES,
+ VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR,
+ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR,
VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES,
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES,
@@ -1133,6 +1280,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO,
VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO,
VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO,
+ // VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL is a deprecated alias
VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES,
@@ -1153,7 +1301,11 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO,
VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO,
VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR,
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES,
@@ -1183,6 +1335,8 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR = VK_STRUCTURE_TYPE_IMAGE_BLIT_2,
VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2,
VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2,
+ VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR,
+ VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT,
VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT,
@@ -1228,15 +1382,10 @@ typedef enum VkImageLayout {
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000,
VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = 1000232000,
VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002,
-#endif
VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000,
VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
@@ -1296,10 +1445,15 @@ typedef enum VkObjectType {
VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL = 1000210000,
VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR = 1000268000,
VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV = 1000277000,
+ VK_OBJECT_TYPE_CUDA_MODULE_NV = 1000307000,
+ VK_OBJECT_TYPE_CUDA_FUNCTION_NV = 1000307001,
VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA = 1000366000,
VK_OBJECT_TYPE_MICROMAP_EXT = 1000396000,
VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV = 1000464000,
VK_OBJECT_TYPE_SHADER_EXT = 1000482000,
+ VK_OBJECT_TYPE_PIPELINE_BINARY_KHR = 1000483000,
+ VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_EXT = 1000572000,
+ VK_OBJECT_TYPE_INDIRECT_EXECUTION_SET_EXT = 1000572001,
VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE,
VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION,
VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT,
@@ -1307,6 +1461,7 @@ typedef enum VkObjectType {
} VkObjectType;
typedef enum VkVendorId {
+ VK_VENDOR_ID_KHRONOS = 0x10000,
VK_VENDOR_ID_VIV = 0x10001,
VK_VENDOR_ID_VSI = 0x10002,
VK_VENDOR_ID_KAZAN = 0x10003,
@@ -1579,7 +1734,9 @@ typedef enum VkFormat {
VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
- VK_FORMAT_R16G16_S10_5_NV = 1000464000,
+ VK_FORMAT_R16G16_SFIXED5_NV = 1000464000,
+ VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR = 1000470000,
+ VK_FORMAT_A8_UNORM_KHR = 1000470001,
VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK,
VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK,
VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK,
@@ -1634,6 +1791,8 @@ typedef enum VkFormat {
VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT = VK_FORMAT_G16_B16R16_2PLANE_444_UNORM,
VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT = VK_FORMAT_A4R4G4B4_UNORM_PACK16,
VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT = VK_FORMAT_A4B4G4R4_UNORM_PACK16,
+ // VK_FORMAT_R16G16_S10_5_NV is a deprecated alias
+ VK_FORMAT_R16G16_S10_5_NV = VK_FORMAT_R16G16_SFIXED5_NV,
VK_FORMAT_MAX_ENUM = 0x7FFFFFFF
} VkFormat;
@@ -1671,9 +1830,7 @@ typedef enum VkQueryType {
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001,
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000,
VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL = 1000210000,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR = 1000299000,
-#endif
VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT = 1000328000,
VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT = 1000382000,
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000,
@@ -1837,12 +1994,10 @@ typedef enum VkDynamicState {
VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV = 1000205000,
VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV = 1000205001,
VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR = 1000226000,
- VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = 1000259000,
VK_DYNAMIC_STATE_VERTEX_INPUT_EXT = 1000352000,
VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT = 1000377000,
VK_DYNAMIC_STATE_LOGIC_OP_EXT = 1000377003,
VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT = 1000381000,
- VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002,
VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT = 1000455003,
VK_DYNAMIC_STATE_POLYGON_MODE_EXT = 1000455004,
VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT = 1000455005,
@@ -1853,6 +2008,7 @@ typedef enum VkDynamicState {
VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT = 1000455010,
VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT = 1000455011,
VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT = 1000455012,
+ VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002,
VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT = 1000455013,
VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014,
VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015,
@@ -1874,6 +2030,9 @@ typedef enum VkDynamicState {
VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031,
VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV = 1000455032,
VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT = 1000524000,
+ VK_DYNAMIC_STATE_LINE_STIPPLE_KHR = 1000259000,
+ VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT = 1000582000,
+ VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = VK_DYNAMIC_STATE_LINE_STIPPLE_KHR,
VK_DYNAMIC_STATE_CULL_MODE_EXT = VK_DYNAMIC_STATE_CULL_MODE,
VK_DYNAMIC_STATE_FRONT_FACE_EXT = VK_DYNAMIC_STATE_FRONT_FACE,
VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY,
@@ -1985,6 +2144,7 @@ typedef enum VkSamplerAddressMode {
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3,
VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4,
+ // VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR is a deprecated alias
VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE,
VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7FFFFFFF
} VkSamplerAddressMode;
@@ -2022,7 +2182,8 @@ typedef enum VkAttachmentLoadOp {
VK_ATTACHMENT_LOAD_OP_LOAD = 0,
VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
- VK_ATTACHMENT_LOAD_OP_NONE_EXT = 1000400000,
+ VK_ATTACHMENT_LOAD_OP_NONE_KHR = 1000400000,
+ VK_ATTACHMENT_LOAD_OP_NONE_EXT = VK_ATTACHMENT_LOAD_OP_NONE_KHR,
VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF
} VkAttachmentLoadOp;
@@ -2039,6 +2200,9 @@ typedef enum VkAttachmentStoreOp {
typedef enum VkPipelineBindPoint {
VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
VK_PIPELINE_BIND_POINT_COMPUTE = 1,
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX = 1000134000,
+#endif
VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR = 1000165000,
VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI = 1000369003,
VK_PIPELINE_BIND_POINT_RAY_TRACING_NV = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR,
@@ -2055,14 +2219,17 @@ typedef enum VkIndexType {
VK_INDEX_TYPE_UINT16 = 0,
VK_INDEX_TYPE_UINT32 = 1,
VK_INDEX_TYPE_NONE_KHR = 1000165000,
- VK_INDEX_TYPE_UINT8_EXT = 1000265000,
+ VK_INDEX_TYPE_UINT8_KHR = 1000265000,
VK_INDEX_TYPE_NONE_NV = VK_INDEX_TYPE_NONE_KHR,
+ VK_INDEX_TYPE_UINT8_EXT = VK_INDEX_TYPE_UINT8_KHR,
VK_INDEX_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkIndexType;
typedef enum VkSubpassContents {
VK_SUBPASS_CONTENTS_INLINE = 0,
VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1,
+ VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR = 1000451000,
+ VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT = VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR,
VK_SUBPASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF
} VkSubpassContents;
@@ -2100,6 +2267,8 @@ typedef enum VkAccessFlagBits {
VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR,
VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR,
VK_ACCESS_NONE_KHR = VK_ACCESS_NONE,
+ VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV,
+ VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV,
VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkAccessFlagBits;
typedef VkFlags VkAccessFlags;
@@ -2155,12 +2324,8 @@ typedef enum VkFormatFeatureFlagBits {
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000,
VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000,
VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000,
-#endif
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT,
VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT,
VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT,
@@ -2196,6 +2361,7 @@ typedef enum VkImageCreateFlagBits {
VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000,
VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000,
VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 0x00008000,
+ VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000,
VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT,
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT,
@@ -2232,15 +2398,10 @@ typedef enum VkImageUsageFlagBits {
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000,
VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200,
VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT = 0x00400000,
VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000,
-#endif
VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000,
VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000,
VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000,
@@ -2285,9 +2446,7 @@ typedef enum VkQueueFlagBits {
VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008,
VK_QUEUE_PROTECTED_BIT = 0x00000010,
VK_QUEUE_VIDEO_DECODE_BIT_KHR = 0x00000020,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_QUEUE_VIDEO_ENCODE_BIT_KHR = 0x00000040,
-#endif
VK_QUEUE_OPTICAL_FLOW_BIT_NV = 0x00000100,
VK_QUEUE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkQueueFlagBits;
@@ -2334,9 +2493,15 @@ typedef enum VkPipelineStageFlagBits {
VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT,
VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT,
VK_PIPELINE_STAGE_NONE_KHR = VK_PIPELINE_STAGE_NONE,
+ VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT = VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV,
VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkPipelineStageFlagBits;
typedef VkFlags VkPipelineStageFlags;
+
+typedef enum VkMemoryMapFlagBits {
+ VK_MEMORY_MAP_PLACED_BIT_EXT = 0x00000001,
+ VK_MEMORY_MAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkMemoryMapFlagBits;
typedef VkFlags VkMemoryMapFlags;
typedef enum VkSparseMemoryBindFlagBits {
@@ -2404,6 +2569,7 @@ typedef enum VkBufferCreateFlagBits {
VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008,
VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000010,
VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000020,
+ VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00000040,
VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
@@ -2426,15 +2592,14 @@ typedef enum VkBufferUsageFlagBits {
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800,
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000,
VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200,
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000,
+#endif
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000,
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000,
VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000,
-#endif
VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000,
VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000,
VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000,
@@ -2508,7 +2673,9 @@ typedef enum VkPipelineCreateFlagBits {
VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000,
VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000,
VK_PIPELINE_CREATE_DISPATCH_BASE = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT,
+ // VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR is a deprecated alias
VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
+ // VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT is a deprecated alias
VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT,
VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT,
VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE,
@@ -2610,6 +2777,8 @@ typedef enum VkDescriptorPoolCreateFlagBits {
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT = 0x00000002,
VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT = 0x00000004,
+ VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV = 0x00000008,
+ VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV = 0x00000010,
VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT,
VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE = VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT,
VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
@@ -2622,7 +2791,9 @@ typedef enum VkDescriptorSetLayoutCreateFlagBits {
VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00000010,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 0x00000020,
+ VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00000080,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT = 0x00000004,
+ VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV = 0x00000040,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
@@ -2713,6 +2884,7 @@ typedef enum VkStencilFaceFlagBits {
VK_STENCIL_FACE_FRONT_BIT = 0x00000001,
VK_STENCIL_FACE_BACK_BIT = 0x00000002,
VK_STENCIL_FACE_FRONT_AND_BACK = 0x00000003,
+ // VK_STENCIL_FRONT_AND_BACK is a deprecated alias
VK_STENCIL_FRONT_AND_BACK = VK_STENCIL_FACE_FRONT_AND_BACK,
VK_STENCIL_FACE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkStencilFaceFlagBits;
@@ -3123,7 +3295,9 @@ typedef struct VkDeviceCreateInfo {
VkDeviceCreateFlags flags;
uint32_t queueCreateInfoCount;
const VkDeviceQueueCreateInfo* pQueueCreateInfos;
+ // enabledLayerCount is deprecated and should not be used
uint32_t enabledLayerCount;
+ // ppEnabledLayerNames is deprecated and should not be used
const char* const* ppEnabledLayerNames;
uint32_t enabledExtensionCount;
const char* const* ppEnabledExtensionNames;
@@ -4778,6 +4952,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands(
#endif
+// VK_VERSION_1_1 is a preprocessor guard. Do not pass it to API calls.
#define VK_VERSION_1_1 1
// Vulkan 1.1 version number
#define VK_API_VERSION_1_1 VK_MAKE_API_VERSION(0, 1, 1, 0)// Patch version should always be set to 0
@@ -4851,6 +5026,8 @@ typedef enum VkSubgroupFeatureFlagBits {
VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040,
VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080,
VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x00000100,
+ VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR = 0x00000200,
+ VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR = 0x00000400,
VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkSubgroupFeatureFlagBits;
typedef VkFlags VkSubgroupFeatureFlags;
@@ -4895,6 +5072,7 @@ typedef enum VkExternalMemoryHandleTypeFlagBits {
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA = 0x00000800,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV = 0x00001000,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX = 0x00004000,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
@@ -5643,6 +5821,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport(
#endif
+// VK_VERSION_1_2 is a preprocessor guard. Do not pass it to API calls.
#define VK_VERSION_1_2 1
// Vulkan 1.2 version number
#define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0
@@ -5676,6 +5855,8 @@ typedef enum VkDriverId {
VK_DRIVER_ID_MESA_DOZEN = 23,
VK_DRIVER_ID_MESA_NVK = 24,
VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA = 25,
+ VK_DRIVER_ID_MESA_HONEYKRISP = 26,
+ VK_DRIVER_ID_RESERVED_27 = 27,
VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY,
VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE,
VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV,
@@ -5705,6 +5886,7 @@ typedef enum VkSamplerReductionMode {
VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE = 0,
VK_SAMPLER_REDUCTION_MODE_MIN = 1,
VK_SAMPLER_REDUCTION_MODE_MAX = 2,
+ VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM = 1000521000,
VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE,
VK_SAMPLER_REDUCTION_MODE_MIN_EXT = VK_SAMPLER_REDUCTION_MODE_MIN,
VK_SAMPLER_REDUCTION_MODE_MAX_EXT = VK_SAMPLER_REDUCTION_MODE_MAX,
@@ -5725,6 +5907,7 @@ typedef enum VkResolveModeFlagBits {
VK_RESOLVE_MODE_AVERAGE_BIT = 0x00000002,
VK_RESOLVE_MODE_MIN_BIT = 0x00000004,
VK_RESOLVE_MODE_MAX_BIT = 0x00000008,
+ VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID = 0x00000010,
VK_RESOLVE_MODE_NONE_KHR = VK_RESOLVE_MODE_NONE,
VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT,
VK_RESOLVE_MODE_AVERAGE_BIT_KHR = VK_RESOLVE_MODE_AVERAGE_BIT,
@@ -6397,6 +6580,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceMemoryOpaqueCaptureAddress(
#endif
+// VK_VERSION_1_3 is a preprocessor guard. Do not pass it to API calls.
#define VK_VERSION_1_3 1
// Vulkan 1.3 version number
#define VK_API_VERSION_1_3 VK_MAKE_API_VERSION(0, 1, 3, 0)// Patch version should always be set to 0
@@ -6489,12 +6673,11 @@ static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 0x4000000000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 0x4000000000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 0x04000000ULL;
-#ifdef VK_ENABLE_BETA_EXTENSIONS
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 0x08000000ULL;
-#endif
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000ULL;
+static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT = 0x00020000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 0x00400000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000ULL;
@@ -6506,6 +6689,8 @@ static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 0
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 0x00100000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT = 0x00080000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT = 0x00100000ULL;
+static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI = 0x8000000000ULL;
+// VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI is a deprecated alias
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = 0x8000000000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x10000000000ULL;
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR = 0x10000000ULL;
@@ -6561,18 +6746,16 @@ static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT = 0x40000000
static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 0x400000000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 0x800000000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 0x1000000000ULL;
-#ifdef VK_ENABLE_BETA_EXTENSIONS
static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 0x2000000000ULL;
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 0x4000000000ULL;
-#endif
static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000ULL;
+static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_EXT = 0x00020000ULL;
+static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_EXT = 0x00040000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000ULL;
static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000ULL;
@@ -6602,9 +6785,11 @@ typedef enum VkRenderingFlagBits {
VK_RENDERING_SUSPENDING_BIT = 0x00000002,
VK_RENDERING_RESUMING_BIT = 0x00000004,
VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000008,
+ VK_RENDERING_CONTENTS_INLINE_BIT_KHR = 0x00000010,
VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR = VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT,
VK_RENDERING_SUSPENDING_BIT_KHR = VK_RENDERING_SUSPENDING_BIT,
VK_RENDERING_RESUMING_BIT_KHR = VK_RENDERING_RESUMING_BIT,
+ VK_RENDERING_CONTENTS_INLINE_BIT_EXT = VK_RENDERING_CONTENTS_INLINE_BIT_KHR,
VK_RENDERING_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkRenderingFlagBits;
typedef VkFlags VkRenderingFlags;
@@ -6671,12 +6856,9 @@ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_K
static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000ULL;
static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000ULL;
static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000ULL;
-#ifdef VK_ENABLE_BETA_EXTENSIONS
+static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT = 0x400000000000ULL;
static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000ULL;
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000ULL;
-#endif
static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 0x4000000000ULL;
static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM = 0x400000000ULL;
static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM = 0x800000000ULL;
@@ -7438,6 +7620,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirements(
#endif
+// VK_KHR_surface is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_surface 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
#define VK_KHR_SURFACE_SPEC_VERSION 25
@@ -7463,6 +7646,7 @@ typedef enum VkColorSpaceKHR {
VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
+ // VK_COLOR_SPACE_DOLBYVISION_EXT is deprecated, but no reason was given in the API XML
VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
@@ -7470,7 +7654,9 @@ typedef enum VkColorSpaceKHR {
VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
VK_COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000,
+ // VK_COLORSPACE_SRGB_NONLINEAR_KHR is a deprecated alias
VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
+ // VK_COLOR_SPACE_DCI_P3_LINEAR_EXT is a deprecated alias
VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT,
VK_COLOR_SPACE_MAX_ENUM_KHR = 0x7FFFFFFF
} VkColorSpaceKHR;
@@ -7552,6 +7738,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(
#endif
+// VK_KHR_swapchain is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_swapchain 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
#define VK_KHR_SWAPCHAIN_SPEC_VERSION 70
@@ -7712,6 +7899,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHR(
#endif
+// VK_KHR_display is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_display 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR)
@@ -7837,6 +8025,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR(
#endif
+// VK_KHR_display_swapchain is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_display_swapchain 1
#define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 10
#define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
@@ -7860,11 +8049,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR(
#endif
+// VK_KHR_sampler_mirror_clamp_to_edge is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_sampler_mirror_clamp_to_edge 1
#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 3
#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
+// VK_KHR_video_queue is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_video_queue 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionKHR)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionParametersKHR)
@@ -7875,19 +8066,17 @@ typedef enum VkQueryResultStatusKHR {
VK_QUERY_RESULT_STATUS_ERROR_KHR = -1,
VK_QUERY_RESULT_STATUS_NOT_READY_KHR = 0,
VK_QUERY_RESULT_STATUS_COMPLETE_KHR = 1,
+ VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR = -1000299000,
VK_QUERY_RESULT_STATUS_MAX_ENUM_KHR = 0x7FFFFFFF
} VkQueryResultStatusKHR;
typedef enum VkVideoCodecOperationFlagBitsKHR {
VK_VIDEO_CODEC_OPERATION_NONE_KHR = 0,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 0x00010000,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT = 0x00020000,
-#endif
+ VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR = 0x00010000,
+ VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR = 0x00020000,
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR = 0x00000001,
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR = 0x00000002,
+ VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR = 0x00000004,
VK_VIDEO_CODEC_OPERATION_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
} VkVideoCodecOperationFlagBitsKHR;
typedef VkFlags VkVideoCodecOperationFlagsKHR;
@@ -7920,6 +8109,8 @@ typedef VkFlags VkVideoCapabilityFlagsKHR;
typedef enum VkVideoSessionCreateFlagBitsKHR {
VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001,
+ VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR = 0x00000002,
+ VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR = 0x00000004,
VK_VIDEO_SESSION_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
} VkVideoSessionCreateFlagBitsKHR;
typedef VkFlags VkVideoSessionCreateFlagsKHR;
@@ -7929,12 +8120,8 @@ typedef VkFlags VkVideoEndCodingFlagsKHR;
typedef enum VkVideoCodingControlFlagBitsKHR {
VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR = 0x00000001,
-#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 0x00000002,
-#endif
-#ifdef VK_ENABLE_BETA_EXTENSIONS
- VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR = 0x00000004,
-#endif
+ VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR = 0x00000004,
VK_VIDEO_CODING_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
} VkVideoCodingControlFlagBitsKHR;
typedef VkFlags VkVideoCodingControlFlagsKHR;
@@ -8157,8 +8344,9 @@ VKAPI_ATTR void VKAPI_CALL vkCmdControlVideoCodingKHR(
#endif
+// VK_KHR_video_decode_queue is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_video_decode_queue 1
-#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 7
+#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 8
#define VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME "VK_KHR_video_decode_queue"
typedef enum VkVideoDecodeCapabilityFlagBitsKHR {
@@ -8211,10 +8399,434 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDecodeVideoKHR(
#endif
-#define VK_KHR_video_decode_h264 1
+// VK_KHR_video_encode_h264 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_video_encode_h264 1
#include "vk_video/vulkan_video_codec_h264std.h"
+#include "vk_video/vulkan_video_codec_h264std_encode.h"
+#define VK_KHR_VIDEO_ENCODE_H264_SPEC_VERSION 14
+#define VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_KHR_video_encode_h264"
+
+typedef enum VkVideoEncodeH264CapabilityFlagBitsKHR {
+ VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR = 0x00000008,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR = 0x00000080,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR = 0x00000100,
+ VK_VIDEO_ENCODE_H264_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeH264CapabilityFlagBitsKHR;
+typedef VkFlags VkVideoEncodeH264CapabilityFlagsKHR;
+
+typedef enum VkVideoEncodeH264StdFlagBitsKHR {
+ VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000008,
+ VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000010,
+ VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR = 0x00000020,
+ VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040,
+ VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR = 0x00000080,
+ VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR = 0x00000100,
+ VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR = 0x00000200,
+ VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR = 0x00000400,
+ VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR = 0x00000800,
+ VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR = 0x00001000,
+ VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR = 0x00002000,
+ VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000,
+ VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR = 0x00008000,
+ VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR = 0x00010000,
+ VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR = 0x00020000,
+ VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000,
+ VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000,
+ VK_VIDEO_ENCODE_H264_STD_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeH264StdFlagBitsKHR;
+typedef VkFlags VkVideoEncodeH264StdFlagsKHR;
+
+typedef enum VkVideoEncodeH264RateControlFlagBitsKHR {
+ VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008,
+ VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010,
+ VK_VIDEO_ENCODE_H264_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeH264RateControlFlagBitsKHR;
+typedef VkFlags VkVideoEncodeH264RateControlFlagsKHR;
+typedef struct VkVideoEncodeH264CapabilitiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkVideoEncodeH264CapabilityFlagsKHR flags;
+ StdVideoH264LevelIdc maxLevelIdc;
+ uint32_t maxSliceCount;
+ uint32_t maxPPictureL0ReferenceCount;
+ uint32_t maxBPictureL0ReferenceCount;
+ uint32_t maxL1ReferenceCount;
+ uint32_t maxTemporalLayerCount;
+ VkBool32 expectDyadicTemporalLayerPattern;
+ int32_t minQp;
+ int32_t maxQp;
+ VkBool32 prefersGopRemainingFrames;
+ VkBool32 requiresGopRemainingFrames;
+ VkVideoEncodeH264StdFlagsKHR stdSyntaxFlags;
+} VkVideoEncodeH264CapabilitiesKHR;
+
+typedef struct VkVideoEncodeH264QpKHR {
+ int32_t qpI;
+ int32_t qpP;
+ int32_t qpB;
+} VkVideoEncodeH264QpKHR;
+
+typedef struct VkVideoEncodeH264QualityLevelPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkVideoEncodeH264RateControlFlagsKHR preferredRateControlFlags;
+ uint32_t preferredGopFrameCount;
+ uint32_t preferredIdrPeriod;
+ uint32_t preferredConsecutiveBFrameCount;
+ uint32_t preferredTemporalLayerCount;
+ VkVideoEncodeH264QpKHR preferredConstantQp;
+ uint32_t preferredMaxL0ReferenceCount;
+ uint32_t preferredMaxL1ReferenceCount;
+ VkBool32 preferredStdEntropyCodingModeFlag;
+} VkVideoEncodeH264QualityLevelPropertiesKHR;
+
+typedef struct VkVideoEncodeH264SessionCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 useMaxLevelIdc;
+ StdVideoH264LevelIdc maxLevelIdc;
+} VkVideoEncodeH264SessionCreateInfoKHR;
+
+typedef struct VkVideoEncodeH264SessionParametersAddInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t stdSPSCount;
+ const StdVideoH264SequenceParameterSet* pStdSPSs;
+ uint32_t stdPPSCount;
+ const StdVideoH264PictureParameterSet* pStdPPSs;
+} VkVideoEncodeH264SessionParametersAddInfoKHR;
+
+typedef struct VkVideoEncodeH264SessionParametersCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t maxStdSPSCount;
+ uint32_t maxStdPPSCount;
+ const VkVideoEncodeH264SessionParametersAddInfoKHR* pParametersAddInfo;
+} VkVideoEncodeH264SessionParametersCreateInfoKHR;
+
+typedef struct VkVideoEncodeH264SessionParametersGetInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 writeStdSPS;
+ VkBool32 writeStdPPS;
+ uint32_t stdSPSId;
+ uint32_t stdPPSId;
+} VkVideoEncodeH264SessionParametersGetInfoKHR;
+
+typedef struct VkVideoEncodeH264SessionParametersFeedbackInfoKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 hasStdSPSOverrides;
+ VkBool32 hasStdPPSOverrides;
+} VkVideoEncodeH264SessionParametersFeedbackInfoKHR;
+
+typedef struct VkVideoEncodeH264NaluSliceInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ int32_t constantQp;
+ const StdVideoEncodeH264SliceHeader* pStdSliceHeader;
+} VkVideoEncodeH264NaluSliceInfoKHR;
+
+typedef struct VkVideoEncodeH264PictureInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t naluSliceEntryCount;
+ const VkVideoEncodeH264NaluSliceInfoKHR* pNaluSliceEntries;
+ const StdVideoEncodeH264PictureInfo* pStdPictureInfo;
+ VkBool32 generatePrefixNalu;
+} VkVideoEncodeH264PictureInfoKHR;
+
+typedef struct VkVideoEncodeH264DpbSlotInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo;
+} VkVideoEncodeH264DpbSlotInfoKHR;
+
+typedef struct VkVideoEncodeH264ProfileInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ StdVideoH264ProfileIdc stdProfileIdc;
+} VkVideoEncodeH264ProfileInfoKHR;
+
+typedef struct VkVideoEncodeH264RateControlInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkVideoEncodeH264RateControlFlagsKHR flags;
+ uint32_t gopFrameCount;
+ uint32_t idrPeriod;
+ uint32_t consecutiveBFrameCount;
+ uint32_t temporalLayerCount;
+} VkVideoEncodeH264RateControlInfoKHR;
+
+typedef struct VkVideoEncodeH264FrameSizeKHR {
+ uint32_t frameISize;
+ uint32_t framePSize;
+ uint32_t frameBSize;
+} VkVideoEncodeH264FrameSizeKHR;
+
+typedef struct VkVideoEncodeH264RateControlLayerInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 useMinQp;
+ VkVideoEncodeH264QpKHR minQp;
+ VkBool32 useMaxQp;
+ VkVideoEncodeH264QpKHR maxQp;
+ VkBool32 useMaxFrameSize;
+ VkVideoEncodeH264FrameSizeKHR maxFrameSize;
+} VkVideoEncodeH264RateControlLayerInfoKHR;
+
+typedef struct VkVideoEncodeH264GopRemainingFrameInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 useGopRemainingFrames;
+ uint32_t gopRemainingI;
+ uint32_t gopRemainingP;
+ uint32_t gopRemainingB;
+} VkVideoEncodeH264GopRemainingFrameInfoKHR;
+
+
+
+// VK_KHR_video_encode_h265 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_video_encode_h265 1
+#include "vk_video/vulkan_video_codec_h265std.h"
+#include "vk_video/vulkan_video_codec_h265std_encode.h"
+#define VK_KHR_VIDEO_ENCODE_H265_SPEC_VERSION 14
+#define VK_KHR_VIDEO_ENCODE_H265_EXTENSION_NAME "VK_KHR_video_encode_h265"
+
+typedef enum VkVideoEncodeH265CapabilityFlagBitsKHR {
+ VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR = 0x00000008,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR = 0x00000080,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR = 0x00000100,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR = 0x00000200,
+ VK_VIDEO_ENCODE_H265_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeH265CapabilityFlagBitsKHR;
+typedef VkFlags VkVideoEncodeH265CapabilityFlagsKHR;
+
+typedef enum VkVideoEncodeH265StdFlagBitsKHR {
+ VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_KHR = 0x00000008,
+ VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_KHR = 0x00000010,
+ VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_KHR = 0x00000020,
+ VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040,
+ VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_KHR = 0x00000080,
+ VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_KHR = 0x00000100,
+ VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_KHR = 0x00000200,
+ VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_KHR = 0x00000400,
+ VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_KHR = 0x00000800,
+ VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_KHR = 0x00001000,
+ VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_KHR = 0x00002000,
+ VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000,
+ VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_KHR = 0x00008000,
+ VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_KHR = 0x00010000,
+ VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_KHR = 0x00020000,
+ VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_KHR = 0x00040000,
+ VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000,
+ VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000,
+ VK_VIDEO_ENCODE_H265_STD_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeH265StdFlagBitsKHR;
+typedef VkFlags VkVideoEncodeH265StdFlagsKHR;
+
+typedef enum VkVideoEncodeH265CtbSizeFlagBitsKHR {
+ VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_H265_CTB_SIZE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeH265CtbSizeFlagBitsKHR;
+typedef VkFlags VkVideoEncodeH265CtbSizeFlagsKHR;
+
+typedef enum VkVideoEncodeH265TransformBlockSizeFlagBitsKHR {
+ VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_KHR = 0x00000008,
+ VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeH265TransformBlockSizeFlagBitsKHR;
+typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsKHR;
+
+typedef enum VkVideoEncodeH265RateControlFlagBitsKHR {
+ VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008,
+ VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010,
+ VK_VIDEO_ENCODE_H265_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeH265RateControlFlagBitsKHR;
+typedef VkFlags VkVideoEncodeH265RateControlFlagsKHR;
+typedef struct VkVideoEncodeH265CapabilitiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkVideoEncodeH265CapabilityFlagsKHR flags;
+ StdVideoH265LevelIdc maxLevelIdc;
+ uint32_t maxSliceSegmentCount;
+ VkExtent2D maxTiles;
+ VkVideoEncodeH265CtbSizeFlagsKHR ctbSizes;
+ VkVideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes;
+ uint32_t maxPPictureL0ReferenceCount;
+ uint32_t maxBPictureL0ReferenceCount;
+ uint32_t maxL1ReferenceCount;
+ uint32_t maxSubLayerCount;
+ VkBool32 expectDyadicTemporalSubLayerPattern;
+ int32_t minQp;
+ int32_t maxQp;
+ VkBool32 prefersGopRemainingFrames;
+ VkBool32 requiresGopRemainingFrames;
+ VkVideoEncodeH265StdFlagsKHR stdSyntaxFlags;
+} VkVideoEncodeH265CapabilitiesKHR;
+
+typedef struct VkVideoEncodeH265SessionCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 useMaxLevelIdc;
+ StdVideoH265LevelIdc maxLevelIdc;
+} VkVideoEncodeH265SessionCreateInfoKHR;
+
+typedef struct VkVideoEncodeH265QpKHR {
+ int32_t qpI;
+ int32_t qpP;
+ int32_t qpB;
+} VkVideoEncodeH265QpKHR;
+
+typedef struct VkVideoEncodeH265QualityLevelPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkVideoEncodeH265RateControlFlagsKHR preferredRateControlFlags;
+ uint32_t preferredGopFrameCount;
+ uint32_t preferredIdrPeriod;
+ uint32_t preferredConsecutiveBFrameCount;
+ uint32_t preferredSubLayerCount;
+ VkVideoEncodeH265QpKHR preferredConstantQp;
+ uint32_t preferredMaxL0ReferenceCount;
+ uint32_t preferredMaxL1ReferenceCount;
+} VkVideoEncodeH265QualityLevelPropertiesKHR;
+
+typedef struct VkVideoEncodeH265SessionParametersAddInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t stdVPSCount;
+ const StdVideoH265VideoParameterSet* pStdVPSs;
+ uint32_t stdSPSCount;
+ const StdVideoH265SequenceParameterSet* pStdSPSs;
+ uint32_t stdPPSCount;
+ const StdVideoH265PictureParameterSet* pStdPPSs;
+} VkVideoEncodeH265SessionParametersAddInfoKHR;
+
+typedef struct VkVideoEncodeH265SessionParametersCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t maxStdVPSCount;
+ uint32_t maxStdSPSCount;
+ uint32_t maxStdPPSCount;
+ const VkVideoEncodeH265SessionParametersAddInfoKHR* pParametersAddInfo;
+} VkVideoEncodeH265SessionParametersCreateInfoKHR;
+
+typedef struct VkVideoEncodeH265SessionParametersGetInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 writeStdVPS;
+ VkBool32 writeStdSPS;
+ VkBool32 writeStdPPS;
+ uint32_t stdVPSId;
+ uint32_t stdSPSId;
+ uint32_t stdPPSId;
+} VkVideoEncodeH265SessionParametersGetInfoKHR;
+
+typedef struct VkVideoEncodeH265SessionParametersFeedbackInfoKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 hasStdVPSOverrides;
+ VkBool32 hasStdSPSOverrides;
+ VkBool32 hasStdPPSOverrides;
+} VkVideoEncodeH265SessionParametersFeedbackInfoKHR;
+
+typedef struct VkVideoEncodeH265NaluSliceSegmentInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ int32_t constantQp;
+ const StdVideoEncodeH265SliceSegmentHeader* pStdSliceSegmentHeader;
+} VkVideoEncodeH265NaluSliceSegmentInfoKHR;
+
+typedef struct VkVideoEncodeH265PictureInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t naluSliceSegmentEntryCount;
+ const VkVideoEncodeH265NaluSliceSegmentInfoKHR* pNaluSliceSegmentEntries;
+ const StdVideoEncodeH265PictureInfo* pStdPictureInfo;
+} VkVideoEncodeH265PictureInfoKHR;
+
+typedef struct VkVideoEncodeH265DpbSlotInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo;
+} VkVideoEncodeH265DpbSlotInfoKHR;
+
+typedef struct VkVideoEncodeH265ProfileInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ StdVideoH265ProfileIdc stdProfileIdc;
+} VkVideoEncodeH265ProfileInfoKHR;
+
+typedef struct VkVideoEncodeH265RateControlInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkVideoEncodeH265RateControlFlagsKHR flags;
+ uint32_t gopFrameCount;
+ uint32_t idrPeriod;
+ uint32_t consecutiveBFrameCount;
+ uint32_t subLayerCount;
+} VkVideoEncodeH265RateControlInfoKHR;
+
+typedef struct VkVideoEncodeH265FrameSizeKHR {
+ uint32_t frameISize;
+ uint32_t framePSize;
+ uint32_t frameBSize;
+} VkVideoEncodeH265FrameSizeKHR;
+
+typedef struct VkVideoEncodeH265RateControlLayerInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 useMinQp;
+ VkVideoEncodeH265QpKHR minQp;
+ VkBool32 useMaxQp;
+ VkVideoEncodeH265QpKHR maxQp;
+ VkBool32 useMaxFrameSize;
+ VkVideoEncodeH265FrameSizeKHR maxFrameSize;
+} VkVideoEncodeH265RateControlLayerInfoKHR;
+
+typedef struct VkVideoEncodeH265GopRemainingFrameInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 useGopRemainingFrames;
+ uint32_t gopRemainingI;
+ uint32_t gopRemainingP;
+ uint32_t gopRemainingB;
+} VkVideoEncodeH265GopRemainingFrameInfoKHR;
+
+
+
+// VK_KHR_video_decode_h264 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_video_decode_h264 1
#include "vk_video/vulkan_video_codec_h264std_decode.h"
-#define VK_KHR_VIDEO_DECODE_H264_SPEC_VERSION 8
+#define VK_KHR_VIDEO_DECODE_H264_SPEC_VERSION 9
#define VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME "VK_KHR_video_decode_h264"
typedef enum VkVideoDecodeH264PictureLayoutFlagBitsKHR {
@@ -8271,6 +8883,7 @@ typedef struct VkVideoDecodeH264DpbSlotInfoKHR {
+// VK_KHR_dynamic_rendering is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_dynamic_rendering 1
#define VK_KHR_DYNAMIC_RENDERING_SPEC_VERSION 1
#define VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME "VK_KHR_dynamic_rendering"
@@ -8333,6 +8946,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderingKHR(
#endif
+// VK_KHR_multiview is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_multiview 1
#define VK_KHR_MULTIVIEW_SPEC_VERSION 1
#define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview"
@@ -8344,6 +8958,7 @@ typedef VkPhysicalDeviceMultiviewProperties VkPhysicalDeviceMultiviewPropertiesK
+// VK_KHR_get_physical_device_properties2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_get_physical_device_properties2 1
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 2
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
@@ -8409,6 +9024,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
#endif
+// VK_KHR_device_group is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_device_group 1
#define VK_KHR_DEVICE_GROUP_SPEC_VERSION 4
#define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group"
@@ -8461,15 +9077,19 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR(
#endif
+// VK_KHR_shader_draw_parameters is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_draw_parameters 1
#define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
+// VK_KHR_maintenance1 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_maintenance1 1
#define VK_KHR_MAINTENANCE_1_SPEC_VERSION 2
#define VK_KHR_MAINTENANCE_1_EXTENSION_NAME "VK_KHR_maintenance1"
+// VK_KHR_MAINTENANCE1_SPEC_VERSION is a deprecated alias
#define VK_KHR_MAINTENANCE1_SPEC_VERSION VK_KHR_MAINTENANCE_1_SPEC_VERSION
+// VK_KHR_MAINTENANCE1_EXTENSION_NAME is a deprecated alias
#define VK_KHR_MAINTENANCE1_EXTENSION_NAME VK_KHR_MAINTENANCE_1_EXTENSION_NAME
typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR;
@@ -8483,6 +9103,7 @@ VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR(
#endif
+// VK_KHR_device_group_creation is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_device_group_creation 1
#define VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION 1
#define VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHR_device_group_creation"
@@ -8501,6 +9122,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR(
#endif
+// VK_KHR_external_memory_capabilities is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_memory_capabilities 1
#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities"
@@ -8535,6 +9157,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR(
#endif
+// VK_KHR_external_memory is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_memory 1
#define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory"
@@ -8547,6 +9170,7 @@ typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR;
+// VK_KHR_external_memory_fd is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_memory_fd 1
#define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd"
@@ -8587,6 +9211,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdPropertiesKHR(
#endif
+// VK_KHR_external_semaphore_capabilities is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_semaphore_capabilities 1
#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities"
@@ -8612,6 +9237,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
#endif
+// VK_KHR_external_semaphore is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_semaphore 1
#define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore"
@@ -8623,6 +9249,7 @@ typedef VkExportSemaphoreCreateInfo VkExportSemaphoreCreateInfoKHR;
+// VK_KHR_external_semaphore_fd is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_semaphore_fd 1
#define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd"
@@ -8657,6 +9284,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHR(
#endif
+// VK_KHR_push_descriptor is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_push_descriptor 1
#define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2
#define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
@@ -8687,6 +9315,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR(
#endif
+// VK_KHR_shader_float16_int8 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_float16_int8 1
#define VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION 1
#define VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME "VK_KHR_shader_float16_int8"
@@ -8696,6 +9325,7 @@ typedef VkPhysicalDeviceShaderFloat16Int8Features VkPhysicalDeviceFloat16Int8Fea
+// VK_KHR_16bit_storage is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_16bit_storage 1
#define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1
#define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage"
@@ -8703,6 +9333,7 @@ typedef VkPhysicalDevice16BitStorageFeatures VkPhysicalDevice16BitStorageFeature
+// VK_KHR_incremental_present is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_incremental_present 1
#define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 2
#define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
@@ -8726,6 +9357,7 @@ typedef struct VkPresentRegionsKHR {
+// VK_KHR_descriptor_update_template is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_descriptor_update_template 1
typedef VkDescriptorUpdateTemplate VkDescriptorUpdateTemplateKHR;
@@ -8763,6 +9395,7 @@ VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(
#endif
+// VK_KHR_imageless_framebuffer is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_imageless_framebuffer 1
#define VK_KHR_IMAGELESS_FRAMEBUFFER_SPEC_VERSION 1
#define VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME "VK_KHR_imageless_framebuffer"
@@ -8776,6 +9409,7 @@ typedef VkRenderPassAttachmentBeginInfo VkRenderPassAttachmentBeginInfoKHR;
+// VK_KHR_create_renderpass2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_create_renderpass2 1
#define VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION 1
#define VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME "VK_KHR_create_renderpass2"
@@ -8821,6 +9455,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2KHR(
#endif
+// VK_KHR_shared_presentable_image is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shared_presentable_image 1
#define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
#define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image"
@@ -8839,6 +9474,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainStatusKHR(
#endif
+// VK_KHR_external_fence_capabilities is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_fence_capabilities 1
#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities"
@@ -8864,6 +9500,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR(
#endif
+// VK_KHR_external_fence is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_fence 1
#define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence"
@@ -8875,6 +9512,7 @@ typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR;
+// VK_KHR_external_fence_fd is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_fence_fd 1
#define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd"
@@ -8909,6 +9547,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR(
#endif
+// VK_KHR_performance_query is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_performance_query 1
#define VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION 1
#define VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME "VK_KHR_performance_query"
@@ -8932,8 +9571,11 @@ typedef enum VkPerformanceCounterScopeKHR {
VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0,
VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1,
VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2,
+ // VK_QUERY_SCOPE_COMMAND_BUFFER_KHR is a deprecated alias
VK_QUERY_SCOPE_COMMAND_BUFFER_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR,
+ // VK_QUERY_SCOPE_RENDER_PASS_KHR is a deprecated alias
VK_QUERY_SCOPE_RENDER_PASS_KHR = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR,
+ // VK_QUERY_SCOPE_COMMAND_KHR is a deprecated alias
VK_QUERY_SCOPE_COMMAND_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR,
VK_PERFORMANCE_COUNTER_SCOPE_MAX_ENUM_KHR = 0x7FFFFFFF
} VkPerformanceCounterScopeKHR;
@@ -8951,7 +9593,9 @@ typedef enum VkPerformanceCounterStorageKHR {
typedef enum VkPerformanceCounterDescriptionFlagBitsKHR {
VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR = 0x00000001,
VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR = 0x00000002,
+ // VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR is a deprecated alias
VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR,
+ // VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR is a deprecated alias
VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR,
VK_PERFORMANCE_COUNTER_DESCRIPTION_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
} VkPerformanceCounterDescriptionFlagBitsKHR;
@@ -9049,10 +9693,13 @@ VKAPI_ATTR void VKAPI_CALL vkReleaseProfilingLockKHR(
#endif
+// VK_KHR_maintenance2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_maintenance2 1
#define VK_KHR_MAINTENANCE_2_SPEC_VERSION 1
#define VK_KHR_MAINTENANCE_2_EXTENSION_NAME "VK_KHR_maintenance2"
+// VK_KHR_MAINTENANCE2_SPEC_VERSION is a deprecated alias
#define VK_KHR_MAINTENANCE2_SPEC_VERSION VK_KHR_MAINTENANCE_2_SPEC_VERSION
+// VK_KHR_MAINTENANCE2_EXTENSION_NAME is a deprecated alias
#define VK_KHR_MAINTENANCE2_EXTENSION_NAME VK_KHR_MAINTENANCE_2_EXTENSION_NAME
typedef VkPointClippingBehavior VkPointClippingBehaviorKHR;
@@ -9070,6 +9717,7 @@ typedef VkPipelineTessellationDomainOriginStateCreateInfo VkPipelineTessellation
+// VK_KHR_get_surface_capabilities2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_get_surface_capabilities2 1
#define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1
#define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2"
@@ -9108,6 +9756,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR(
#endif
+// VK_KHR_variable_pointers is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_variable_pointers 1
#define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1
#define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers"
@@ -9117,6 +9766,7 @@ typedef VkPhysicalDeviceVariablePointersFeatures VkPhysicalDeviceVariablePointer
+// VK_KHR_get_display_properties2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_get_display_properties2 1
#define VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION 1
#define VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_display_properties2"
@@ -9180,6 +9830,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilities2KHR(
#endif
+// VK_KHR_dedicated_allocation is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_dedicated_allocation 1
#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3
#define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
@@ -9189,16 +9840,19 @@ typedef VkMemoryDedicatedAllocateInfo VkMemoryDedicatedAllocateInfoKHR;
+// VK_KHR_storage_buffer_storage_class is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_storage_buffer_storage_class 1
#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1
#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class"
+// VK_KHR_relaxed_block_layout is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_relaxed_block_layout 1
#define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1
#define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout"
+// VK_KHR_get_memory_requirements2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_get_memory_requirements2 1
#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1
#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"
@@ -9235,6 +9889,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(
#endif
+// VK_KHR_image_format_list is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_image_format_list 1
#define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1
#define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list"
@@ -9242,6 +9897,7 @@ typedef VkImageFormatListCreateInfo VkImageFormatListCreateInfoKHR;
+// VK_KHR_sampler_ycbcr_conversion is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_sampler_ycbcr_conversion 1
typedef VkSamplerYcbcrConversion VkSamplerYcbcrConversionKHR;
@@ -9282,6 +9938,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR(
#endif
+// VK_KHR_bind_memory2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_bind_memory2 1
#define VK_KHR_BIND_MEMORY_2_SPEC_VERSION 1
#define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME "VK_KHR_bind_memory2"
@@ -9305,10 +9962,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR(
#endif
+// VK_KHR_maintenance3 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_maintenance3 1
#define VK_KHR_MAINTENANCE_3_SPEC_VERSION 1
#define VK_KHR_MAINTENANCE_3_EXTENSION_NAME "VK_KHR_maintenance3"
+// VK_KHR_MAINTENANCE3_SPEC_VERSION is a deprecated alias
#define VK_KHR_MAINTENANCE3_SPEC_VERSION VK_KHR_MAINTENANCE_3_SPEC_VERSION
+// VK_KHR_MAINTENANCE3_EXTENSION_NAME is a deprecated alias
#define VK_KHR_MAINTENANCE3_EXTENSION_NAME VK_KHR_MAINTENANCE_3_EXTENSION_NAME
typedef VkPhysicalDeviceMaintenance3Properties VkPhysicalDeviceMaintenance3PropertiesKHR;
@@ -9324,6 +9984,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR(
#endif
+// VK_KHR_draw_indirect_count is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_draw_indirect_count 1
#define VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
#define VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_KHR_draw_indirect_count"
@@ -9351,6 +10012,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR(
#endif
+// VK_KHR_shader_subgroup_extended_types is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_subgroup_extended_types 1
#define VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_SPEC_VERSION 1
#define VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME "VK_KHR_shader_subgroup_extended_types"
@@ -9358,6 +10020,7 @@ typedef VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures VkPhysicalDeviceShad
+// VK_KHR_8bit_storage is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_8bit_storage 1
#define VK_KHR_8BIT_STORAGE_SPEC_VERSION 1
#define VK_KHR_8BIT_STORAGE_EXTENSION_NAME "VK_KHR_8bit_storage"
@@ -9365,6 +10028,7 @@ typedef VkPhysicalDevice8BitStorageFeatures VkPhysicalDevice8BitStorageFeaturesK
+// VK_KHR_shader_atomic_int64 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_atomic_int64 1
#define VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION 1
#define VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME "VK_KHR_shader_atomic_int64"
@@ -9372,6 +10036,7 @@ typedef VkPhysicalDeviceShaderAtomicInt64Features VkPhysicalDeviceShaderAtomicIn
+// VK_KHR_shader_clock is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_clock 1
#define VK_KHR_SHADER_CLOCK_SPEC_VERSION 1
#define VK_KHR_SHADER_CLOCK_EXTENSION_NAME "VK_KHR_shader_clock"
@@ -9384,10 +10049,10 @@ typedef struct VkPhysicalDeviceShaderClockFeaturesKHR {
+// VK_KHR_video_decode_h265 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_video_decode_h265 1
-#include "vk_video/vulkan_video_codec_h265std.h"
#include "vk_video/vulkan_video_codec_h265std_decode.h"
-#define VK_KHR_VIDEO_DECODE_H265_SPEC_VERSION 7
+#define VK_KHR_VIDEO_DECODE_H265_SPEC_VERSION 8
#define VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME "VK_KHR_video_decode_h265"
typedef struct VkVideoDecodeH265ProfileInfoKHR {
VkStructureType sType;
@@ -9437,6 +10102,7 @@ typedef struct VkVideoDecodeH265DpbSlotInfoKHR {
+// VK_KHR_global_priority is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_global_priority 1
#define VK_MAX_GLOBAL_PRIORITY_SIZE_KHR 16U
#define VK_KHR_GLOBAL_PRIORITY_SPEC_VERSION 1
@@ -9474,6 +10140,7 @@ typedef struct VkQueueFamilyGlobalPriorityPropertiesKHR {
+// VK_KHR_driver_properties is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_driver_properties 1
#define VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION 1
#define VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME "VK_KHR_driver_properties"
@@ -9487,6 +10154,7 @@ typedef VkPhysicalDeviceDriverProperties VkPhysicalDeviceDriverPropertiesKHR;
+// VK_KHR_shader_float_controls is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_float_controls 1
#define VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION 4
#define VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME "VK_KHR_shader_float_controls"
@@ -9496,6 +10164,7 @@ typedef VkPhysicalDeviceFloatControlsProperties VkPhysicalDeviceFloatControlsPro
+// VK_KHR_depth_stencil_resolve is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_depth_stencil_resolve 1
#define VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION 1
#define VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME "VK_KHR_depth_stencil_resolve"
@@ -9509,11 +10178,13 @@ typedef VkPhysicalDeviceDepthStencilResolveProperties VkPhysicalDeviceDepthStenc
+// VK_KHR_swapchain_mutable_format is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_swapchain_mutable_format 1
#define VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_SPEC_VERSION 1
#define VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME "VK_KHR_swapchain_mutable_format"
+// VK_KHR_timeline_semaphore is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_timeline_semaphore 1
#define VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION 2
#define VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME "VK_KHR_timeline_semaphore"
@@ -9556,6 +10227,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphoreKHR(
#endif
+// VK_KHR_vulkan_memory_model is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_vulkan_memory_model 1
#define VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION 3
#define VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME "VK_KHR_vulkan_memory_model"
@@ -9563,6 +10235,7 @@ typedef VkPhysicalDeviceVulkanMemoryModelFeatures VkPhysicalDeviceVulkanMemoryMo
+// VK_KHR_shader_terminate_invocation is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_terminate_invocation 1
#define VK_KHR_SHADER_TERMINATE_INVOCATION_SPEC_VERSION 1
#define VK_KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME "VK_KHR_shader_terminate_invocation"
@@ -9570,6 +10243,7 @@ typedef VkPhysicalDeviceShaderTerminateInvocationFeatures VkPhysicalDeviceShader
+// VK_KHR_fragment_shading_rate is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_fragment_shading_rate 1
#define VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION 2
#define VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME "VK_KHR_fragment_shading_rate"
@@ -9649,11 +10323,65 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateKHR(
#endif
+// VK_KHR_dynamic_rendering_local_read is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_dynamic_rendering_local_read 1
+#define VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION 1
+#define VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME "VK_KHR_dynamic_rendering_local_read"
+typedef struct VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 dynamicRenderingLocalRead;
+} VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR;
+
+typedef struct VkRenderingAttachmentLocationInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t colorAttachmentCount;
+ const uint32_t* pColorAttachmentLocations;
+} VkRenderingAttachmentLocationInfoKHR;
+
+typedef struct VkRenderingInputAttachmentIndexInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t colorAttachmentCount;
+ const uint32_t* pColorAttachmentInputIndices;
+ const uint32_t* pDepthInputAttachmentIndex;
+ const uint32_t* pStencilInputAttachmentIndex;
+} VkRenderingInputAttachmentIndexInfoKHR;
+
+typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingAttachmentLocationsKHR)(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfoKHR* pLocationInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingInputAttachmentIndicesKHR)(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingAttachmentLocationsKHR(
+ VkCommandBuffer commandBuffer,
+ const VkRenderingAttachmentLocationInfoKHR* pLocationInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndicesKHR(
+ VkCommandBuffer commandBuffer,
+ const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo);
+#endif
+
+
+// VK_KHR_shader_quad_control is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_shader_quad_control 1
+#define VK_KHR_SHADER_QUAD_CONTROL_SPEC_VERSION 1
+#define VK_KHR_SHADER_QUAD_CONTROL_EXTENSION_NAME "VK_KHR_shader_quad_control"
+typedef struct VkPhysicalDeviceShaderQuadControlFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderQuadControl;
+} VkPhysicalDeviceShaderQuadControlFeaturesKHR;
+
+
+
+// VK_KHR_spirv_1_4 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_spirv_1_4 1
#define VK_KHR_SPIRV_1_4_SPEC_VERSION 1
#define VK_KHR_SPIRV_1_4_EXTENSION_NAME "VK_KHR_spirv_1_4"
+// VK_KHR_surface_protected_capabilities is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_surface_protected_capabilities 1
#define VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION 1
#define VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME "VK_KHR_surface_protected_capabilities"
@@ -9665,6 +10393,7 @@ typedef struct VkSurfaceProtectedCapabilitiesKHR {
+// VK_KHR_separate_depth_stencil_layouts is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_separate_depth_stencil_layouts 1
#define VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_SPEC_VERSION 1
#define VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME "VK_KHR_separate_depth_stencil_layouts"
@@ -9676,6 +10405,7 @@ typedef VkAttachmentDescriptionStencilLayout VkAttachmentDescriptionStencilLayou
+// VK_KHR_present_wait is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_present_wait 1
#define VK_KHR_PRESENT_WAIT_SPEC_VERSION 1
#define VK_KHR_PRESENT_WAIT_EXTENSION_NAME "VK_KHR_present_wait"
@@ -9696,6 +10426,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkWaitForPresentKHR(
#endif
+// VK_KHR_uniform_buffer_standard_layout is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_uniform_buffer_standard_layout 1
#define VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_SPEC_VERSION 1
#define VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME "VK_KHR_uniform_buffer_standard_layout"
@@ -9703,6 +10434,7 @@ typedef VkPhysicalDeviceUniformBufferStandardLayoutFeatures VkPhysicalDeviceUnif
+// VK_KHR_buffer_device_address is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_buffer_device_address 1
#define VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 1
#define VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_KHR_buffer_device_address"
@@ -9735,6 +10467,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceMemoryOpaqueCaptureAddressKHR(
#endif
+// VK_KHR_deferred_host_operations is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_deferred_host_operations 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR)
#define VK_KHR_DEFERRED_HOST_OPERATIONS_SPEC_VERSION 4
@@ -9770,6 +10503,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkDeferredOperationJoinKHR(
#endif
+// VK_KHR_pipeline_executable_properties is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_pipeline_executable_properties 1
#define VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION 1
#define VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME "VK_KHR_pipeline_executable_properties"
@@ -9860,9 +10594,15 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutableInternalRepresentationsKHR
#endif
+// VK_KHR_map_memory2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_map_memory2 1
#define VK_KHR_MAP_MEMORY_2_SPEC_VERSION 1
#define VK_KHR_MAP_MEMORY_2_EXTENSION_NAME "VK_KHR_map_memory2"
+
+typedef enum VkMemoryUnmapFlagBitsKHR {
+ VK_MEMORY_UNMAP_RESERVE_BIT_EXT = 0x00000001,
+ VK_MEMORY_UNMAP_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkMemoryUnmapFlagBitsKHR;
typedef VkFlags VkMemoryUnmapFlagsKHR;
typedef struct VkMemoryMapInfoKHR {
VkStructureType sType;
@@ -9895,6 +10635,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkUnmapMemory2KHR(
#endif
+// VK_KHR_shader_integer_dot_product is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_integer_dot_product 1
#define VK_KHR_SHADER_INTEGER_DOT_PRODUCT_SPEC_VERSION 1
#define VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME "VK_KHR_shader_integer_dot_product"
@@ -9904,6 +10645,7 @@ typedef VkPhysicalDeviceShaderIntegerDotProductProperties VkPhysicalDeviceShader
+// VK_KHR_pipeline_library is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_pipeline_library 1
#define VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION 1
#define VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME "VK_KHR_pipeline_library"
@@ -9916,11 +10658,13 @@ typedef struct VkPipelineLibraryCreateInfoKHR {
+// VK_KHR_shader_non_semantic_info is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_non_semantic_info 1
#define VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION 1
#define VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME "VK_KHR_shader_non_semantic_info"
+// VK_KHR_present_id is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_present_id 1
#define VK_KHR_PRESENT_ID_SPEC_VERSION 1
#define VK_KHR_PRESENT_ID_EXTENSION_NAME "VK_KHR_present_id"
@@ -9939,6 +10683,180 @@ typedef struct VkPhysicalDevicePresentIdFeaturesKHR {
+// VK_KHR_video_encode_queue is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_video_encode_queue 1
+#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 12
+#define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue"
+
+typedef enum VkVideoEncodeTuningModeKHR {
+ VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0,
+ VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1,
+ VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2,
+ VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3,
+ VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4,
+ VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeTuningModeKHR;
+typedef VkFlags VkVideoEncodeFlagsKHR;
+
+typedef enum VkVideoEncodeCapabilityFlagBitsKHR {
+ VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeCapabilityFlagBitsKHR;
+typedef VkFlags VkVideoEncodeCapabilityFlagsKHR;
+
+typedef enum VkVideoEncodeRateControlModeFlagBitsKHR {
+ VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0,
+ VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeRateControlModeFlagBitsKHR;
+typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR;
+
+typedef enum VkVideoEncodeFeedbackFlagBitsKHR {
+ VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeFeedbackFlagBitsKHR;
+typedef VkFlags VkVideoEncodeFeedbackFlagsKHR;
+
+typedef enum VkVideoEncodeUsageFlagBitsKHR {
+ VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0,
+ VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008,
+ VK_VIDEO_ENCODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeUsageFlagBitsKHR;
+typedef VkFlags VkVideoEncodeUsageFlagsKHR;
+
+typedef enum VkVideoEncodeContentFlagBitsKHR {
+ VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0,
+ VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001,
+ VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002,
+ VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004,
+ VK_VIDEO_ENCODE_CONTENT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoEncodeContentFlagBitsKHR;
+typedef VkFlags VkVideoEncodeContentFlagsKHR;
+typedef VkFlags VkVideoEncodeRateControlFlagsKHR;
+typedef struct VkVideoEncodeInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkVideoEncodeFlagsKHR flags;
+ VkBuffer dstBuffer;
+ VkDeviceSize dstBufferOffset;
+ VkDeviceSize dstBufferRange;
+ VkVideoPictureResourceInfoKHR srcPictureResource;
+ const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot;
+ uint32_t referenceSlotCount;
+ const VkVideoReferenceSlotInfoKHR* pReferenceSlots;
+ uint32_t precedingExternallyEncodedBytes;
+} VkVideoEncodeInfoKHR;
+
+typedef struct VkVideoEncodeCapabilitiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkVideoEncodeCapabilityFlagsKHR flags;
+ VkVideoEncodeRateControlModeFlagsKHR rateControlModes;
+ uint32_t maxRateControlLayers;
+ uint64_t maxBitrate;
+ uint32_t maxQualityLevels;
+ VkExtent2D encodeInputPictureGranularity;
+ VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags;
+} VkVideoEncodeCapabilitiesKHR;
+
+typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags;
+} VkQueryPoolVideoEncodeFeedbackCreateInfoKHR;
+
+typedef struct VkVideoEncodeUsageInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkVideoEncodeUsageFlagsKHR videoUsageHints;
+ VkVideoEncodeContentFlagsKHR videoContentHints;
+ VkVideoEncodeTuningModeKHR tuningMode;
+} VkVideoEncodeUsageInfoKHR;
+
+typedef struct VkVideoEncodeRateControlLayerInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint64_t averageBitrate;
+ uint64_t maxBitrate;
+ uint32_t frameRateNumerator;
+ uint32_t frameRateDenominator;
+} VkVideoEncodeRateControlLayerInfoKHR;
+
+typedef struct VkVideoEncodeRateControlInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkVideoEncodeRateControlFlagsKHR flags;
+ VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode;
+ uint32_t layerCount;
+ const VkVideoEncodeRateControlLayerInfoKHR* pLayers;
+ uint32_t virtualBufferSizeInMs;
+ uint32_t initialVirtualBufferSizeInMs;
+} VkVideoEncodeRateControlInfoKHR;
+
+typedef struct VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const VkVideoProfileInfoKHR* pVideoProfile;
+ uint32_t qualityLevel;
+} VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR;
+
+typedef struct VkVideoEncodeQualityLevelPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkVideoEncodeRateControlModeFlagBitsKHR preferredRateControlMode;
+ uint32_t preferredRateControlLayerCount;
+} VkVideoEncodeQualityLevelPropertiesKHR;
+
+typedef struct VkVideoEncodeQualityLevelInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t qualityLevel;
+} VkVideoEncodeQualityLevelInfoKHR;
+
+typedef struct VkVideoEncodeSessionParametersGetInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkVideoSessionParametersKHR videoSessionParameters;
+} VkVideoEncodeSessionParametersGetInfoKHR;
+
+typedef struct VkVideoEncodeSessionParametersFeedbackInfoKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 hasOverrides;
+} VkVideoEncodeSessionParametersFeedbackInfoKHR;
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetEncodedVideoSessionParametersKHR)(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData);
+typedef void (VKAPI_PTR *PFN_vkCmdEncodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo,
+ VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetEncodedVideoSessionParametersKHR(
+ VkDevice device,
+ const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo,
+ VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo,
+ size_t* pDataSize,
+ void* pData);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR(
+ VkCommandBuffer commandBuffer,
+ const VkVideoEncodeInfoKHR* pEncodeInfo);
+#endif
+
+
+// VK_KHR_synchronization2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_synchronization2 1
#define VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION 1
#define VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME "VK_KHR_synchronization2"
@@ -10039,6 +10957,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointData2NV(
#endif
+// VK_KHR_fragment_shader_barycentric is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_fragment_shader_barycentric 1
#define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1
#define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME "VK_KHR_fragment_shader_barycentric"
@@ -10056,6 +10975,7 @@ typedef struct VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR {
+// VK_KHR_shader_subgroup_uniform_control_flow is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_shader_subgroup_uniform_control_flow 1
#define VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_SPEC_VERSION 1
#define VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME "VK_KHR_shader_subgroup_uniform_control_flow"
@@ -10067,6 +10987,7 @@ typedef struct VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR {
+// VK_KHR_zero_initialize_workgroup_memory is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_zero_initialize_workgroup_memory 1
#define VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_SPEC_VERSION 1
#define VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME "VK_KHR_zero_initialize_workgroup_memory"
@@ -10074,6 +10995,7 @@ typedef VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures VkPhysicalDeviceZe
+// VK_KHR_workgroup_memory_explicit_layout is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_workgroup_memory_explicit_layout 1
#define VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_SPEC_VERSION 1
#define VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME "VK_KHR_workgroup_memory_explicit_layout"
@@ -10088,6 +11010,7 @@ typedef struct VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR {
+// VK_KHR_copy_commands2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_copy_commands2 1
#define VK_KHR_COPY_COMMANDS_2_SPEC_VERSION 1
#define VK_KHR_COPY_COMMANDS_2_EXTENSION_NAME "VK_KHR_copy_commands2"
@@ -10147,6 +11070,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage2KHR(
#endif
+// VK_KHR_format_feature_flags2 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_format_feature_flags2 1
#define VK_KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION 2
#define VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME "VK_KHR_format_feature_flags2"
@@ -10158,6 +11082,7 @@ typedef VkFormatProperties3 VkFormatProperties3KHR;
+// VK_KHR_ray_tracing_maintenance1 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_ray_tracing_maintenance1 1
#define VK_KHR_RAY_TRACING_MAINTENANCE_1_SPEC_VERSION 1
#define VK_KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME "VK_KHR_ray_tracing_maintenance1"
@@ -10194,11 +11119,13 @@ VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysIndirect2KHR(
#endif
+// VK_KHR_portability_enumeration is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_portability_enumeration 1
#define VK_KHR_PORTABILITY_ENUMERATION_SPEC_VERSION 1
#define VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME "VK_KHR_portability_enumeration"
+// VK_KHR_maintenance4 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_maintenance4 1
#define VK_KHR_MAINTENANCE_4_SPEC_VERSION 2
#define VK_KHR_MAINTENANCE_4_EXTENSION_NAME "VK_KHR_maintenance4"
@@ -10233,6 +11160,197 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirementsKHR(
#endif
+// VK_KHR_shader_subgroup_rotate is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_shader_subgroup_rotate 1
+#define VK_KHR_SHADER_SUBGROUP_ROTATE_SPEC_VERSION 2
+#define VK_KHR_SHADER_SUBGROUP_ROTATE_EXTENSION_NAME "VK_KHR_shader_subgroup_rotate"
+typedef struct VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderSubgroupRotate;
+ VkBool32 shaderSubgroupRotateClustered;
+} VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR;
+
+
+
+// VK_KHR_shader_maximal_reconvergence is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_shader_maximal_reconvergence 1
+#define VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_SPEC_VERSION 1
+#define VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_EXTENSION_NAME "VK_KHR_shader_maximal_reconvergence"
+typedef struct VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderMaximalReconvergence;
+} VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR;
+
+
+
+// VK_KHR_maintenance5 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_maintenance5 1
+#define VK_KHR_MAINTENANCE_5_SPEC_VERSION 1
+#define VK_KHR_MAINTENANCE_5_EXTENSION_NAME "VK_KHR_maintenance5"
+typedef VkFlags64 VkPipelineCreateFlags2KHR;
+
+// Flag bits for VkPipelineCreateFlagBits2KHR
+typedef VkFlags64 VkPipelineCreateFlagBits2KHR;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR = 0x00000001ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR = 0x00000002ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR = 0x00000004ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x400000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 0x00000008ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR = 0x00000010ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV = 0x00000020ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR = 0x00000040ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR = 0x00000100ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR = 0x00000200ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR = 0x00000800ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV = 0x00040000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR = 0x80000000ULL;
+static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT = 0x4000000000ULL;
+
+typedef VkFlags64 VkBufferUsageFlags2KHR;
+
+// Flag bits for VkBufferUsageFlagBits2KHR
+typedef VkFlags64 VkBufferUsageFlagBits2KHR;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000004ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR = 0x00000010ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR = 0x00000020ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR = 0x00000040ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR = 0x00000080ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR = 0x00000100ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV = 0x00000400ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00004000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR = 0x00020000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000ULL;
+static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT = 0x80000000ULL;
+
+typedef struct VkPhysicalDeviceMaintenance5FeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 maintenance5;
+} VkPhysicalDeviceMaintenance5FeaturesKHR;
+
+typedef struct VkPhysicalDeviceMaintenance5PropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting;
+ VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting;
+ VkBool32 depthStencilSwizzleOneSupport;
+ VkBool32 polygonModePointSize;
+ VkBool32 nonStrictSinglePixelWideLinesUseParallelogram;
+ VkBool32 nonStrictWideLinesUseParallelogram;
+} VkPhysicalDeviceMaintenance5PropertiesKHR;
+
+typedef struct VkRenderingAreaInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t viewMask;
+ uint32_t colorAttachmentCount;
+ const VkFormat* pColorAttachmentFormats;
+ VkFormat depthAttachmentFormat;
+ VkFormat stencilAttachmentFormat;
+} VkRenderingAreaInfoKHR;
+
+typedef struct VkImageSubresource2KHR {
+ VkStructureType sType;
+ void* pNext;
+ VkImageSubresource imageSubresource;
+} VkImageSubresource2KHR;
+
+typedef struct VkDeviceImageSubresourceInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const VkImageCreateInfo* pCreateInfo;
+ const VkImageSubresource2KHR* pSubresource;
+} VkDeviceImageSubresourceInfoKHR;
+
+typedef struct VkSubresourceLayout2KHR {
+ VkStructureType sType;
+ void* pNext;
+ VkSubresourceLayout subresourceLayout;
+} VkSubresourceLayout2KHR;
+
+typedef struct VkPipelineCreateFlags2CreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineCreateFlags2KHR flags;
+} VkPipelineCreateFlags2CreateInfoKHR;
+
+typedef struct VkBufferUsageFlags2CreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBufferUsageFlags2KHR usage;
+} VkBufferUsageFlags2CreateInfoKHR;
+
+typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer2KHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType);
+typedef void (VKAPI_PTR *PFN_vkGetRenderingAreaGranularityKHR)(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, VkExtent2D* pGranularity);
+typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSubresourceLayoutKHR)(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, VkSubresourceLayout2KHR* pLayout);
+typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2KHR)(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2KHR(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkDeviceSize size,
+ VkIndexType indexType);
+
+VKAPI_ATTR void VKAPI_CALL vkGetRenderingAreaGranularityKHR(
+ VkDevice device,
+ const VkRenderingAreaInfoKHR* pRenderingAreaInfo,
+ VkExtent2D* pGranularity);
+
+VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSubresourceLayoutKHR(
+ VkDevice device,
+ const VkDeviceImageSubresourceInfoKHR* pInfo,
+ VkSubresourceLayout2KHR* pLayout);
+
+VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2KHR(
+ VkDevice device,
+ VkImage image,
+ const VkImageSubresource2KHR* pSubresource,
+ VkSubresourceLayout2KHR* pLayout);
+#endif
+
+
+// VK_KHR_ray_tracing_position_fetch is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_ray_tracing_position_fetch 1
#define VK_KHR_RAY_TRACING_POSITION_FETCH_SPEC_VERSION 1
#define VK_KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME "VK_KHR_ray_tracing_position_fetch"
@@ -10244,6 +11362,644 @@ typedef struct VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR {
+// VK_KHR_pipeline_binary is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_pipeline_binary 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineBinaryKHR)
+#define VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR 32U
+#define VK_KHR_PIPELINE_BINARY_SPEC_VERSION 1
+#define VK_KHR_PIPELINE_BINARY_EXTENSION_NAME "VK_KHR_pipeline_binary"
+typedef struct VkPhysicalDevicePipelineBinaryFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 pipelineBinaries;
+} VkPhysicalDevicePipelineBinaryFeaturesKHR;
+
+typedef struct VkPhysicalDevicePipelineBinaryPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 pipelineBinaryInternalCache;
+ VkBool32 pipelineBinaryInternalCacheControl;
+ VkBool32 pipelineBinaryPrefersInternalCache;
+ VkBool32 pipelineBinaryPrecompiledInternalCache;
+ VkBool32 pipelineBinaryCompressedData;
+} VkPhysicalDevicePipelineBinaryPropertiesKHR;
+
+typedef struct VkDevicePipelineBinaryInternalCacheControlKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 disableInternalCache;
+} VkDevicePipelineBinaryInternalCacheControlKHR;
+
+typedef struct VkPipelineBinaryKeyKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t keySize;
+ uint8_t key[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR];
+} VkPipelineBinaryKeyKHR;
+
+typedef struct VkPipelineBinaryDataKHR {
+ size_t dataSize;
+ void* pData;
+} VkPipelineBinaryDataKHR;
+
+typedef struct VkPipelineBinaryKeysAndDataKHR {
+ uint32_t binaryCount;
+ const VkPipelineBinaryKeyKHR* pPipelineBinaryKeys;
+ const VkPipelineBinaryDataKHR* pPipelineBinaryData;
+} VkPipelineBinaryKeysAndDataKHR;
+
+typedef struct VkPipelineCreateInfoKHR {
+ VkStructureType sType;
+ void* pNext;
+} VkPipelineCreateInfoKHR;
+
+typedef struct VkPipelineBinaryCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const VkPipelineBinaryKeysAndDataKHR* pKeysAndDataInfo;
+ VkPipeline pipeline;
+ const VkPipelineCreateInfoKHR* pPipelineCreateInfo;
+} VkPipelineBinaryCreateInfoKHR;
+
+typedef struct VkPipelineBinaryInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t binaryCount;
+ const VkPipelineBinaryKHR* pPipelineBinaries;
+} VkPipelineBinaryInfoKHR;
+
+typedef struct VkReleaseCapturedPipelineDataInfoKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkPipeline pipeline;
+} VkReleaseCapturedPipelineDataInfoKHR;
+
+typedef struct VkPipelineBinaryDataInfoKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkPipelineBinaryKHR pipelineBinary;
+} VkPipelineBinaryDataInfoKHR;
+
+typedef struct VkPipelineBinaryHandlesInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t pipelineBinaryCount;
+ VkPipelineBinaryKHR* pPipelineBinaries;
+} VkPipelineBinaryHandlesInfoKHR;
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineBinariesKHR)(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries);
+typedef void (VKAPI_PTR *PFN_vkDestroyPipelineBinaryKHR)(VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineKeyKHR)(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, VkPipelineBinaryKeyKHR* pPipelineKey);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineBinaryDataKHR)(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, void* pPipelineBinaryData);
+typedef VkResult (VKAPI_PTR *PFN_vkReleaseCapturedPipelineDataKHR)(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, const VkAllocationCallbacks* pAllocator);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineBinariesKHR(
+ VkDevice device,
+ const VkPipelineBinaryCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkPipelineBinaryHandlesInfoKHR* pBinaries);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineBinaryKHR(
+ VkDevice device,
+ VkPipelineBinaryKHR pipelineBinary,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineKeyKHR(
+ VkDevice device,
+ const VkPipelineCreateInfoKHR* pPipelineCreateInfo,
+ VkPipelineBinaryKeyKHR* pPipelineKey);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineBinaryDataKHR(
+ VkDevice device,
+ const VkPipelineBinaryDataInfoKHR* pInfo,
+ VkPipelineBinaryKeyKHR* pPipelineBinaryKey,
+ size_t* pPipelineBinaryDataSize,
+ void* pPipelineBinaryData);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkReleaseCapturedPipelineDataKHR(
+ VkDevice device,
+ const VkReleaseCapturedPipelineDataInfoKHR* pInfo,
+ const VkAllocationCallbacks* pAllocator);
+#endif
+
+
+// VK_KHR_cooperative_matrix is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_cooperative_matrix 1
+#define VK_KHR_COOPERATIVE_MATRIX_SPEC_VERSION 2
+#define VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME "VK_KHR_cooperative_matrix"
+
+typedef enum VkComponentTypeKHR {
+ VK_COMPONENT_TYPE_FLOAT16_KHR = 0,
+ VK_COMPONENT_TYPE_FLOAT32_KHR = 1,
+ VK_COMPONENT_TYPE_FLOAT64_KHR = 2,
+ VK_COMPONENT_TYPE_SINT8_KHR = 3,
+ VK_COMPONENT_TYPE_SINT16_KHR = 4,
+ VK_COMPONENT_TYPE_SINT32_KHR = 5,
+ VK_COMPONENT_TYPE_SINT64_KHR = 6,
+ VK_COMPONENT_TYPE_UINT8_KHR = 7,
+ VK_COMPONENT_TYPE_UINT16_KHR = 8,
+ VK_COMPONENT_TYPE_UINT32_KHR = 9,
+ VK_COMPONENT_TYPE_UINT64_KHR = 10,
+ VK_COMPONENT_TYPE_FLOAT16_NV = VK_COMPONENT_TYPE_FLOAT16_KHR,
+ VK_COMPONENT_TYPE_FLOAT32_NV = VK_COMPONENT_TYPE_FLOAT32_KHR,
+ VK_COMPONENT_TYPE_FLOAT64_NV = VK_COMPONENT_TYPE_FLOAT64_KHR,
+ VK_COMPONENT_TYPE_SINT8_NV = VK_COMPONENT_TYPE_SINT8_KHR,
+ VK_COMPONENT_TYPE_SINT16_NV = VK_COMPONENT_TYPE_SINT16_KHR,
+ VK_COMPONENT_TYPE_SINT32_NV = VK_COMPONENT_TYPE_SINT32_KHR,
+ VK_COMPONENT_TYPE_SINT64_NV = VK_COMPONENT_TYPE_SINT64_KHR,
+ VK_COMPONENT_TYPE_UINT8_NV = VK_COMPONENT_TYPE_UINT8_KHR,
+ VK_COMPONENT_TYPE_UINT16_NV = VK_COMPONENT_TYPE_UINT16_KHR,
+ VK_COMPONENT_TYPE_UINT32_NV = VK_COMPONENT_TYPE_UINT32_KHR,
+ VK_COMPONENT_TYPE_UINT64_NV = VK_COMPONENT_TYPE_UINT64_KHR,
+ VK_COMPONENT_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkComponentTypeKHR;
+
+typedef enum VkScopeKHR {
+ VK_SCOPE_DEVICE_KHR = 1,
+ VK_SCOPE_WORKGROUP_KHR = 2,
+ VK_SCOPE_SUBGROUP_KHR = 3,
+ VK_SCOPE_QUEUE_FAMILY_KHR = 5,
+ VK_SCOPE_DEVICE_NV = VK_SCOPE_DEVICE_KHR,
+ VK_SCOPE_WORKGROUP_NV = VK_SCOPE_WORKGROUP_KHR,
+ VK_SCOPE_SUBGROUP_NV = VK_SCOPE_SUBGROUP_KHR,
+ VK_SCOPE_QUEUE_FAMILY_NV = VK_SCOPE_QUEUE_FAMILY_KHR,
+ VK_SCOPE_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkScopeKHR;
+typedef struct VkCooperativeMatrixPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t MSize;
+ uint32_t NSize;
+ uint32_t KSize;
+ VkComponentTypeKHR AType;
+ VkComponentTypeKHR BType;
+ VkComponentTypeKHR CType;
+ VkComponentTypeKHR ResultType;
+ VkBool32 saturatingAccumulation;
+ VkScopeKHR scope;
+} VkCooperativeMatrixPropertiesKHR;
+
+typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 cooperativeMatrix;
+ VkBool32 cooperativeMatrixRobustBufferAccess;
+} VkPhysicalDeviceCooperativeMatrixFeaturesKHR;
+
+typedef struct VkPhysicalDeviceCooperativeMatrixPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkShaderStageFlags cooperativeMatrixSupportedStages;
+} VkPhysicalDeviceCooperativeMatrixPropertiesKHR;
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pPropertyCount,
+ VkCooperativeMatrixPropertiesKHR* pProperties);
+#endif
+
+
+// VK_KHR_compute_shader_derivatives is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_compute_shader_derivatives 1
+#define VK_KHR_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION 1
+#define VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME "VK_KHR_compute_shader_derivatives"
+typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 computeDerivativeGroupQuads;
+ VkBool32 computeDerivativeGroupLinear;
+} VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR;
+
+typedef struct VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 meshAndTaskShaderDerivatives;
+} VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR;
+
+
+
+// VK_KHR_video_decode_av1 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_video_decode_av1 1
+#include "vk_video/vulkan_video_codec_av1std.h"
+#include "vk_video/vulkan_video_codec_av1std_decode.h"
+#define VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR 7U
+#define VK_KHR_VIDEO_DECODE_AV1_SPEC_VERSION 1
+#define VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME "VK_KHR_video_decode_av1"
+typedef struct VkVideoDecodeAV1ProfileInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ StdVideoAV1Profile stdProfile;
+ VkBool32 filmGrainSupport;
+} VkVideoDecodeAV1ProfileInfoKHR;
+
+typedef struct VkVideoDecodeAV1CapabilitiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ StdVideoAV1Level maxLevel;
+} VkVideoDecodeAV1CapabilitiesKHR;
+
+typedef struct VkVideoDecodeAV1SessionParametersCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const StdVideoAV1SequenceHeader* pStdSequenceHeader;
+} VkVideoDecodeAV1SessionParametersCreateInfoKHR;
+
+typedef struct VkVideoDecodeAV1PictureInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const StdVideoDecodeAV1PictureInfo* pStdPictureInfo;
+ int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR];
+ uint32_t frameHeaderOffset;
+ uint32_t tileCount;
+ const uint32_t* pTileOffsets;
+ const uint32_t* pTileSizes;
+} VkVideoDecodeAV1PictureInfoKHR;
+
+typedef struct VkVideoDecodeAV1DpbSlotInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const StdVideoDecodeAV1ReferenceInfo* pStdReferenceInfo;
+} VkVideoDecodeAV1DpbSlotInfoKHR;
+
+
+
+// VK_KHR_video_maintenance1 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_video_maintenance1 1
+#define VK_KHR_VIDEO_MAINTENANCE_1_SPEC_VERSION 1
+#define VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME "VK_KHR_video_maintenance1"
+typedef struct VkPhysicalDeviceVideoMaintenance1FeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 videoMaintenance1;
+} VkPhysicalDeviceVideoMaintenance1FeaturesKHR;
+
+typedef struct VkVideoInlineQueryInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkQueryPool queryPool;
+ uint32_t firstQuery;
+ uint32_t queryCount;
+} VkVideoInlineQueryInfoKHR;
+
+
+
+// VK_KHR_vertex_attribute_divisor is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_vertex_attribute_divisor 1
+#define VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 1
+#define VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_KHR_vertex_attribute_divisor"
+typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxVertexAttribDivisor;
+ VkBool32 supportsNonZeroFirstInstance;
+} VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR;
+
+typedef struct VkVertexInputBindingDivisorDescriptionKHR {
+ uint32_t binding;
+ uint32_t divisor;
+} VkVertexInputBindingDivisorDescriptionKHR;
+
+typedef struct VkPipelineVertexInputDivisorStateCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t vertexBindingDivisorCount;
+ const VkVertexInputBindingDivisorDescriptionKHR* pVertexBindingDivisors;
+} VkPipelineVertexInputDivisorStateCreateInfoKHR;
+
+typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 vertexAttributeInstanceRateDivisor;
+ VkBool32 vertexAttributeInstanceRateZeroDivisor;
+} VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR;
+
+
+
+// VK_KHR_load_store_op_none is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_load_store_op_none 1
+#define VK_KHR_LOAD_STORE_OP_NONE_SPEC_VERSION 1
+#define VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME "VK_KHR_load_store_op_none"
+
+
+// VK_KHR_shader_float_controls2 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_shader_float_controls2 1
+#define VK_KHR_SHADER_FLOAT_CONTROLS_2_SPEC_VERSION 1
+#define VK_KHR_SHADER_FLOAT_CONTROLS_2_EXTENSION_NAME "VK_KHR_shader_float_controls2"
+typedef struct VkPhysicalDeviceShaderFloatControls2FeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderFloatControls2;
+} VkPhysicalDeviceShaderFloatControls2FeaturesKHR;
+
+
+
+// VK_KHR_index_type_uint8 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_index_type_uint8 1
+#define VK_KHR_INDEX_TYPE_UINT8_SPEC_VERSION 1
+#define VK_KHR_INDEX_TYPE_UINT8_EXTENSION_NAME "VK_KHR_index_type_uint8"
+typedef struct VkPhysicalDeviceIndexTypeUint8FeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 indexTypeUint8;
+} VkPhysicalDeviceIndexTypeUint8FeaturesKHR;
+
+
+
+// VK_KHR_line_rasterization is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_line_rasterization 1
+#define VK_KHR_LINE_RASTERIZATION_SPEC_VERSION 1
+#define VK_KHR_LINE_RASTERIZATION_EXTENSION_NAME "VK_KHR_line_rasterization"
+
+typedef enum VkLineRasterizationModeKHR {
+ VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR = 0,
+ VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR = 1,
+ VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR = 2,
+ VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR = 3,
+ VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR,
+ VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR,
+ VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR,
+ VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR,
+ VK_LINE_RASTERIZATION_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkLineRasterizationModeKHR;
+typedef struct VkPhysicalDeviceLineRasterizationFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 rectangularLines;
+ VkBool32 bresenhamLines;
+ VkBool32 smoothLines;
+ VkBool32 stippledRectangularLines;
+ VkBool32 stippledBresenhamLines;
+ VkBool32 stippledSmoothLines;
+} VkPhysicalDeviceLineRasterizationFeaturesKHR;
+
+typedef struct VkPhysicalDeviceLineRasterizationPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t lineSubPixelPrecisionBits;
+} VkPhysicalDeviceLineRasterizationPropertiesKHR;
+
+typedef struct VkPipelineRasterizationLineStateCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkLineRasterizationModeKHR lineRasterizationMode;
+ VkBool32 stippledLineEnable;
+ uint32_t lineStippleFactor;
+ uint16_t lineStipplePattern;
+} VkPipelineRasterizationLineStateCreateInfoKHR;
+
+typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleKHR)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleKHR(
+ VkCommandBuffer commandBuffer,
+ uint32_t lineStippleFactor,
+ uint16_t lineStipplePattern);
+#endif
+
+
+// VK_KHR_calibrated_timestamps is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_calibrated_timestamps 1
+#define VK_KHR_CALIBRATED_TIMESTAMPS_SPEC_VERSION 1
+#define VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME "VK_KHR_calibrated_timestamps"
+
+typedef enum VkTimeDomainKHR {
+ VK_TIME_DOMAIN_DEVICE_KHR = 0,
+ VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR = 1,
+ VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR = 2,
+ VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR = 3,
+ VK_TIME_DOMAIN_DEVICE_EXT = VK_TIME_DOMAIN_DEVICE_KHR,
+ VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR,
+ VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR,
+ VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR,
+ VK_TIME_DOMAIN_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkTimeDomainKHR;
+typedef struct VkCalibratedTimestampInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkTimeDomainKHR timeDomain;
+} VkCalibratedTimestampInfoKHR;
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains);
+typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsKHR)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pTimeDomainCount,
+ VkTimeDomainKHR* pTimeDomains);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsKHR(
+ VkDevice device,
+ uint32_t timestampCount,
+ const VkCalibratedTimestampInfoKHR* pTimestampInfos,
+ uint64_t* pTimestamps,
+ uint64_t* pMaxDeviation);
+#endif
+
+
+// VK_KHR_shader_expect_assume is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_shader_expect_assume 1
+#define VK_KHR_SHADER_EXPECT_ASSUME_SPEC_VERSION 1
+#define VK_KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME "VK_KHR_shader_expect_assume"
+typedef struct VkPhysicalDeviceShaderExpectAssumeFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderExpectAssume;
+} VkPhysicalDeviceShaderExpectAssumeFeaturesKHR;
+
+
+
+// VK_KHR_maintenance6 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_maintenance6 1
+#define VK_KHR_MAINTENANCE_6_SPEC_VERSION 1
+#define VK_KHR_MAINTENANCE_6_EXTENSION_NAME "VK_KHR_maintenance6"
+typedef struct VkPhysicalDeviceMaintenance6FeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 maintenance6;
+} VkPhysicalDeviceMaintenance6FeaturesKHR;
+
+typedef struct VkPhysicalDeviceMaintenance6PropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 blockTexelViewCompatibleMultipleLayers;
+ uint32_t maxCombinedImageSamplerDescriptorCount;
+ VkBool32 fragmentShadingRateClampCombinerInputs;
+} VkPhysicalDeviceMaintenance6PropertiesKHR;
+
+typedef struct VkBindMemoryStatusKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkResult* pResult;
+} VkBindMemoryStatusKHR;
+
+typedef struct VkBindDescriptorSetsInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkShaderStageFlags stageFlags;
+ VkPipelineLayout layout;
+ uint32_t firstSet;
+ uint32_t descriptorSetCount;
+ const VkDescriptorSet* pDescriptorSets;
+ uint32_t dynamicOffsetCount;
+ const uint32_t* pDynamicOffsets;
+} VkBindDescriptorSetsInfoKHR;
+
+typedef struct VkPushConstantsInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineLayout layout;
+ VkShaderStageFlags stageFlags;
+ uint32_t offset;
+ uint32_t size;
+ const void* pValues;
+} VkPushConstantsInfoKHR;
+
+typedef struct VkPushDescriptorSetInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkShaderStageFlags stageFlags;
+ VkPipelineLayout layout;
+ uint32_t set;
+ uint32_t descriptorWriteCount;
+ const VkWriteDescriptorSet* pDescriptorWrites;
+} VkPushDescriptorSetInfoKHR;
+
+typedef struct VkPushDescriptorSetWithTemplateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkDescriptorUpdateTemplate descriptorUpdateTemplate;
+ VkPipelineLayout layout;
+ uint32_t set;
+ const void* pData;
+} VkPushDescriptorSetWithTemplateInfoKHR;
+
+typedef struct VkSetDescriptorBufferOffsetsInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkShaderStageFlags stageFlags;
+ VkPipelineLayout layout;
+ uint32_t firstSet;
+ uint32_t setCount;
+ const uint32_t* pBufferIndices;
+ const VkDeviceSize* pOffsets;
+} VkSetDescriptorBufferOffsetsInfoEXT;
+
+typedef struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkShaderStageFlags stageFlags;
+ VkPipelineLayout layout;
+ uint32_t set;
+} VkBindDescriptorBufferEmbeddedSamplersInfoEXT;
+
+typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets2KHR)(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdPushConstants2KHR)(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSet2KHR)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplate2KHR)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDescriptorBufferOffsets2EXT)(VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT)(VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2KHR(
+ VkCommandBuffer commandBuffer,
+ const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2KHR(
+ VkCommandBuffer commandBuffer,
+ const VkPushConstantsInfoKHR* pPushConstantsInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2KHR(
+ VkCommandBuffer commandBuffer,
+ const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2KHR(
+ VkCommandBuffer commandBuffer,
+ const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsets2EXT(
+ VkCommandBuffer commandBuffer,
+ const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplers2EXT(
+ VkCommandBuffer commandBuffer,
+ const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo);
+#endif
+
+
+// VK_KHR_shader_relaxed_extended_instruction is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_shader_relaxed_extended_instruction 1
+#define VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_SPEC_VERSION 1
+#define VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_EXTENSION_NAME "VK_KHR_shader_relaxed_extended_instruction"
+typedef struct VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderRelaxedExtendedInstruction;
+} VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR;
+
+
+
+// VK_KHR_maintenance7 is a preprocessor guard. Do not pass it to API calls.
+#define VK_KHR_maintenance7 1
+#define VK_KHR_MAINTENANCE_7_SPEC_VERSION 1
+#define VK_KHR_MAINTENANCE_7_EXTENSION_NAME "VK_KHR_maintenance7"
+
+typedef enum VkPhysicalDeviceLayeredApiKHR {
+ VK_PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR = 0,
+ VK_PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR = 1,
+ VK_PHYSICAL_DEVICE_LAYERED_API_METAL_KHR = 2,
+ VK_PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR = 3,
+ VK_PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR = 4,
+ VK_PHYSICAL_DEVICE_LAYERED_API_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkPhysicalDeviceLayeredApiKHR;
+typedef struct VkPhysicalDeviceMaintenance7FeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 maintenance7;
+} VkPhysicalDeviceMaintenance7FeaturesKHR;
+
+typedef struct VkPhysicalDeviceMaintenance7PropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 robustFragmentShadingRateAttachmentAccess;
+ VkBool32 separateDepthStencilAttachmentAccess;
+ uint32_t maxDescriptorSetTotalUniformBuffersDynamic;
+ uint32_t maxDescriptorSetTotalStorageBuffersDynamic;
+ uint32_t maxDescriptorSetTotalBuffersDynamic;
+ uint32_t maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic;
+ uint32_t maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic;
+ uint32_t maxDescriptorSetUpdateAfterBindTotalBuffersDynamic;
+} VkPhysicalDeviceMaintenance7PropertiesKHR;
+
+typedef struct VkPhysicalDeviceLayeredApiPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t vendorID;
+ uint32_t deviceID;
+ VkPhysicalDeviceLayeredApiKHR layeredAPI;
+ char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
+} VkPhysicalDeviceLayeredApiPropertiesKHR;
+
+typedef struct VkPhysicalDeviceLayeredApiPropertiesListKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t layeredApiCount;
+ VkPhysicalDeviceLayeredApiPropertiesKHR* pLayeredApis;
+} VkPhysicalDeviceLayeredApiPropertiesListKHR;
+
+typedef struct VkPhysicalDeviceLayeredApiVulkanPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkPhysicalDeviceProperties2 properties;
+} VkPhysicalDeviceLayeredApiVulkanPropertiesKHR;
+
+
+
+// VK_EXT_debug_report is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_debug_report 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 10
@@ -10288,8 +12044,12 @@ typedef enum VkDebugReportObjectTypeEXT {
VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT = 1000029001,
VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = 1000150000,
VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000,
+ VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_MODULE_NV_EXT = 1000307000,
+ VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_FUNCTION_NV_EXT = 1000307001,
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT = 1000366000,
+ // VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT is a deprecated alias
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT,
+ // VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT is a deprecated alias
VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT,
@@ -10351,21 +12111,25 @@ VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT(
#endif
+// VK_NV_glsl_shader is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_glsl_shader 1
#define VK_NV_GLSL_SHADER_SPEC_VERSION 1
#define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader"
+// VK_EXT_depth_range_unrestricted is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_depth_range_unrestricted 1
#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1
#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted"
+// VK_IMG_filter_cubic is a preprocessor guard. Do not pass it to API calls.
#define VK_IMG_filter_cubic 1
#define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
#define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic"
+// VK_AMD_rasterization_order is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_rasterization_order 1
#define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
#define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order"
@@ -10383,16 +12147,19 @@ typedef struct VkPipelineRasterizationStateRasterizationOrderAMD {
+// VK_AMD_shader_trinary_minmax is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_trinary_minmax 1
#define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
#define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
+// VK_AMD_shader_explicit_vertex_parameter is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_explicit_vertex_parameter 1
#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
+// VK_EXT_debug_marker is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_debug_marker 1
#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
#define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker"
@@ -10449,11 +12216,13 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT(
#endif
+// VK_AMD_gcn_shader is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_gcn_shader 1
#define VK_AMD_GCN_SHADER_SPEC_VERSION 1
#define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
+// VK_NV_dedicated_allocation is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_dedicated_allocation 1
#define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
#define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
@@ -10478,6 +12247,7 @@ typedef struct VkDedicatedAllocationMemoryAllocateInfoNV {
+// VK_EXT_transform_feedback is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_transform_feedback 1
#define VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION 1
#define VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME "VK_EXT_transform_feedback"
@@ -10565,6 +12335,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectByteCountEXT(
#endif
+// VK_NVX_binary_import is a preprocessor guard. Do not pass it to API calls.
#define VK_NVX_binary_import 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuModuleNVX)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuFunctionNVX)
@@ -10636,6 +12407,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCuLaunchKernelNVX(
#endif
+// VK_NVX_image_view_handle is a preprocessor guard. Do not pass it to API calls.
#define VK_NVX_image_view_handle 1
#define VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION 2
#define VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME "VK_NVX_image_view_handle"
@@ -10669,6 +12441,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetImageViewAddressNVX(
#endif
+// VK_AMD_draw_indirect_count is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_draw_indirect_count 1
#define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 2
#define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
@@ -10696,21 +12469,25 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD(
#endif
+// VK_AMD_negative_viewport_height is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_negative_viewport_height 1
#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
+// VK_AMD_gpu_shader_half_float is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_gpu_shader_half_float 1
#define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 2
#define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
+// VK_AMD_shader_ballot is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_ballot 1
#define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
#define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
+// VK_AMD_texture_gather_bias_lod is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_texture_gather_bias_lod 1
#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1
#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod"
@@ -10722,6 +12499,7 @@ typedef struct VkTextureLODGatherFormatPropertiesAMD {
+// VK_AMD_shader_info is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_info 1
#define VK_AMD_SHADER_INFO_SPEC_VERSION 1
#define VK_AMD_SHADER_INFO_EXTENSION_NAME "VK_AMD_shader_info"
@@ -10763,11 +12541,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD(
#endif
+// VK_AMD_shader_image_load_store_lod is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_image_load_store_lod 1
#define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION 1
#define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME "VK_AMD_shader_image_load_store_lod"
+// VK_NV_corner_sampled_image is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_corner_sampled_image 1
#define VK_NV_CORNER_SAMPLED_IMAGE_SPEC_VERSION 2
#define VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME "VK_NV_corner_sampled_image"
@@ -10779,11 +12559,13 @@ typedef struct VkPhysicalDeviceCornerSampledImageFeaturesNV {
+// VK_IMG_format_pvrtc is a preprocessor guard. Do not pass it to API calls.
#define VK_IMG_format_pvrtc 1
#define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
#define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
+// VK_NV_external_memory_capabilities is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_external_memory_capabilities 1
#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
@@ -10826,6 +12608,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceExternalImageFormatPropertiesN
#endif
+// VK_NV_external_memory is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_external_memory 1
#define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
#define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
@@ -10843,8 +12626,9 @@ typedef struct VkExportMemoryAllocateInfoNV {
+// VK_EXT_validation_flags is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_validation_flags 1
-#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 2
+#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 3
#define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
typedef enum VkValidationCheckEXT {
@@ -10861,16 +12645,19 @@ typedef struct VkValidationFlagsEXT {
+// VK_EXT_shader_subgroup_ballot is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_subgroup_ballot 1
#define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
#define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
+// VK_EXT_shader_subgroup_vote is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_subgroup_vote 1
#define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
#define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
+// VK_EXT_texture_compression_astc_hdr is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_texture_compression_astc_hdr 1
#define VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_SPEC_VERSION 1
#define VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME "VK_EXT_texture_compression_astc_hdr"
@@ -10878,6 +12665,7 @@ typedef VkPhysicalDeviceTextureCompressionASTCHDRFeatures VkPhysicalDeviceTextur
+// VK_EXT_astc_decode_mode is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_astc_decode_mode 1
#define VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION 1
#define VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME "VK_EXT_astc_decode_mode"
@@ -10895,6 +12683,7 @@ typedef struct VkPhysicalDeviceASTCDecodeFeaturesEXT {
+// VK_EXT_pipeline_robustness is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_pipeline_robustness 1
#define VK_EXT_PIPELINE_ROBUSTNESS_SPEC_VERSION 1
#define VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME "VK_EXT_pipeline_robustness"
@@ -10940,6 +12729,7 @@ typedef struct VkPipelineRobustnessCreateInfoEXT {
+// VK_EXT_conditional_rendering is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_conditional_rendering 1
#define VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION 2
#define VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME "VK_EXT_conditional_rendering"
@@ -10983,6 +12773,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndConditionalRenderingEXT(
#endif
+// VK_NV_clip_space_w_scaling is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_clip_space_w_scaling 1
#define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
#define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
@@ -11010,6 +12801,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV(
#endif
+// VK_EXT_direct_mode_display is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_direct_mode_display 1
#define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
#define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
@@ -11022,12 +12814,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT(
#endif
+// VK_EXT_display_surface_counter is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_display_surface_counter 1
#define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
#define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
typedef enum VkSurfaceCounterFlagBitsEXT {
VK_SURFACE_COUNTER_VBLANK_BIT_EXT = 0x00000001,
+ // VK_SURFACE_COUNTER_VBLANK_EXT is a deprecated alias
VK_SURFACE_COUNTER_VBLANK_EXT = VK_SURFACE_COUNTER_VBLANK_BIT_EXT,
VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
} VkSurfaceCounterFlagBitsEXT;
@@ -11058,6 +12852,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT(
#endif
+// VK_EXT_display_control is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_display_control 1
#define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
#define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control"
@@ -11134,6 +12929,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT(
#endif
+// VK_GOOGLE_display_timing is a preprocessor guard. Do not pass it to API calls.
#define VK_GOOGLE_display_timing 1
#define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
#define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
@@ -11178,23 +12974,29 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE(
#endif
+// VK_NV_sample_mask_override_coverage is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_sample_mask_override_coverage 1
#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
+// VK_NV_geometry_shader_passthrough is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_geometry_shader_passthrough 1
#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
+// VK_NV_viewport_array2 is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_viewport_array2 1
#define VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION 1
#define VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME "VK_NV_viewport_array2"
+// VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION is a deprecated alias
#define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION
+// VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME is a deprecated alias
#define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME
+// VK_NVX_multiview_per_view_attributes is a preprocessor guard. Do not pass it to API calls.
#define VK_NVX_multiview_per_view_attributes 1
#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
@@ -11206,6 +13008,7 @@ typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
+// VK_NV_viewport_swizzle is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_viewport_swizzle 1
#define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
#define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
@@ -11239,6 +13042,7 @@ typedef struct VkPipelineViewportSwizzleStateCreateInfoNV {
+// VK_EXT_discard_rectangles is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_discard_rectangles 1
#define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 2
#define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
@@ -11285,6 +13089,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleModeEXT(
#endif
+// VK_EXT_conservative_rasterization is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_conservative_rasterization 1
#define VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION 1
#define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization"
@@ -11320,6 +13125,7 @@ typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT {
+// VK_EXT_depth_clip_enable is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_depth_clip_enable 1
#define VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION 1
#define VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME "VK_EXT_depth_clip_enable"
@@ -11339,13 +13145,15 @@ typedef struct VkPipelineRasterizationDepthClipStateCreateInfoEXT {
+// VK_EXT_swapchain_colorspace is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_swapchain_colorspace 1
-#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 4
+#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 5
#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
+// VK_EXT_hdr_metadata is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_hdr_metadata 1
-#define VK_EXT_HDR_METADATA_SPEC_VERSION 2
+#define VK_EXT_HDR_METADATA_SPEC_VERSION 3
#define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
typedef struct VkXYColorEXT {
float x;
@@ -11376,17 +13184,32 @@ VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT(
#endif
+// VK_IMG_relaxed_line_rasterization is a preprocessor guard. Do not pass it to API calls.
+#define VK_IMG_relaxed_line_rasterization 1
+#define VK_IMG_RELAXED_LINE_RASTERIZATION_SPEC_VERSION 1
+#define VK_IMG_RELAXED_LINE_RASTERIZATION_EXTENSION_NAME "VK_IMG_relaxed_line_rasterization"
+typedef struct VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 relaxedLineRasterization;
+} VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG;
+
+
+
+// VK_EXT_external_memory_dma_buf is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_external_memory_dma_buf 1
#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION 1
#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME "VK_EXT_external_memory_dma_buf"
+// VK_EXT_queue_family_foreign is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_queue_family_foreign 1
#define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1
#define VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME "VK_EXT_queue_family_foreign"
#define VK_QUEUE_FAMILY_FOREIGN_EXT (~2U)
+// VK_EXT_debug_utils is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_debug_utils 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT)
#define VK_EXT_DEBUG_UTILS_SPEC_VERSION 2
@@ -11529,6 +13352,7 @@ VKAPI_ATTR void VKAPI_CALL vkSubmitDebugUtilsMessageEXT(
#endif
+// VK_EXT_sampler_filter_minmax is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_sampler_filter_minmax 1
#define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 2
#define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax"
@@ -11540,21 +13364,25 @@ typedef VkPhysicalDeviceSamplerFilterMinmaxProperties VkPhysicalDeviceSamplerFil
+// VK_AMD_gpu_shader_int16 is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_gpu_shader_int16 1
#define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 2
#define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16"
+// VK_AMD_mixed_attachment_samples is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_mixed_attachment_samples 1
#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1
#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples"
+// VK_AMD_shader_fragment_mask is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_fragment_mask 1
#define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1
#define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask"
+// VK_EXT_inline_uniform_block is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_inline_uniform_block 1
#define VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION 1
#define VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME "VK_EXT_inline_uniform_block"
@@ -11568,11 +13396,13 @@ typedef VkDescriptorPoolInlineUniformBlockCreateInfo VkDescriptorPoolInlineUnifo
+// VK_EXT_shader_stencil_export is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_stencil_export 1
#define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1
#define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export"
+// VK_EXT_sample_locations is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_sample_locations 1
#define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1
#define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations"
@@ -11647,6 +13477,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT(
#endif
+// VK_EXT_blend_operation_advanced is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_blend_operation_advanced 1
#define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2
#define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced"
@@ -11684,6 +13515,7 @@ typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT {
+// VK_NV_fragment_coverage_to_color is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_fragment_coverage_to_color 1
#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1
#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color"
@@ -11698,6 +13530,7 @@ typedef struct VkPipelineCoverageToColorStateCreateInfoNV {
+// VK_NV_framebuffer_mixed_samples is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_framebuffer_mixed_samples 1
#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1
#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples"
@@ -11722,11 +13555,13 @@ typedef struct VkPipelineCoverageModulationStateCreateInfoNV {
+// VK_NV_fill_rectangle is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_fill_rectangle 1
#define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1
#define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle"
+// VK_NV_shader_sm_builtins is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_shader_sm_builtins 1
#define VK_NV_SHADER_SM_BUILTINS_SPEC_VERSION 1
#define VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME "VK_NV_shader_sm_builtins"
@@ -11745,11 +13580,13 @@ typedef struct VkPhysicalDeviceShaderSMBuiltinsFeaturesNV {
+// VK_EXT_post_depth_coverage is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_post_depth_coverage 1
#define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1
#define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage"
+// VK_EXT_image_drm_format_modifier is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_image_drm_format_modifier 1
#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION 2
#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME "VK_EXT_image_drm_format_modifier"
@@ -11819,6 +13656,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetImageDrmFormatModifierPropertiesEXT(
#endif
+// VK_EXT_validation_cache is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_validation_cache 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT)
#define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1
@@ -11874,6 +13712,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT(
#endif
+// VK_EXT_descriptor_indexing is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_descriptor_indexing 1
#define VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION 2
#define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing"
@@ -11893,11 +13732,13 @@ typedef VkDescriptorSetVariableDescriptorCountLayoutSupport VkDescriptorSetVaria
+// VK_EXT_shader_viewport_index_layer is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_viewport_index_layer 1
#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1
#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer"
+// VK_NV_shading_rate_image is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_shading_rate_image 1
#define VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION 3
#define VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME "VK_NV_shading_rate_image"
@@ -11998,6 +13839,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetCoarseSampleOrderNV(
#endif
+// VK_NV_ray_tracing is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_ray_tracing 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureNV)
#define VK_NV_RAY_TRACING_SPEC_VERSION 3
@@ -12376,6 +14218,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCompileDeferredNV(
#endif
+// VK_NV_representative_fragment_test is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_representative_fragment_test 1
#define VK_NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION 2
#define VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME "VK_NV_representative_fragment_test"
@@ -12393,6 +14236,7 @@ typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV {
+// VK_EXT_filter_cubic is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_filter_cubic 1
#define VK_EXT_FILTER_CUBIC_SPEC_VERSION 3
#define VK_EXT_FILTER_CUBIC_EXTENSION_NAME "VK_EXT_filter_cubic"
@@ -12411,11 +14255,13 @@ typedef struct VkFilterCubicImageViewImageFormatPropertiesEXT {
+// VK_QCOM_render_pass_shader_resolve is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_render_pass_shader_resolve 1
#define VK_QCOM_RENDER_PASS_SHADER_RESOLVE_SPEC_VERSION 4
#define VK_QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME "VK_QCOM_render_pass_shader_resolve"
+// VK_EXT_global_priority is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_global_priority 1
#define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2
#define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority"
@@ -12425,6 +14271,7 @@ typedef VkDeviceQueueGlobalPriorityCreateInfoKHR VkDeviceQueueGlobalPriorityCrea
+// VK_EXT_external_memory_host is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_external_memory_host 1
#define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1
#define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host"
@@ -12458,6 +14305,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT(
#endif
+// VK_AMD_buffer_marker is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_buffer_marker 1
#define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1
#define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker"
@@ -12473,6 +14321,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD(
#endif
+// VK_AMD_pipeline_compiler_control is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_pipeline_compiler_control 1
#define VK_AMD_PIPELINE_COMPILER_CONTROL_SPEC_VERSION 1
#define VK_AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME "VK_AMD_pipeline_compiler_control"
@@ -12489,41 +14338,33 @@ typedef struct VkPipelineCompilerControlCreateInfoAMD {
+// VK_EXT_calibrated_timestamps is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_calibrated_timestamps 1
#define VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION 2
#define VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME "VK_EXT_calibrated_timestamps"
+typedef VkTimeDomainKHR VkTimeDomainEXT;
-typedef enum VkTimeDomainEXT {
- VK_TIME_DOMAIN_DEVICE_EXT = 0,
- VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1,
- VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = 2,
- VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = 3,
- VK_TIME_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkTimeDomainEXT;
-typedef struct VkCalibratedTimestampInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkTimeDomainEXT timeDomain;
-} VkCalibratedTimestampInfoEXT;
+typedef VkCalibratedTimestampInfoKHR VkCalibratedTimestampInfoEXT;
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainEXT* pTimeDomains);
-typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsEXT)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains);
+typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsEXT)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
VkPhysicalDevice physicalDevice,
uint32_t* pTimeDomainCount,
- VkTimeDomainEXT* pTimeDomains);
+ VkTimeDomainKHR* pTimeDomains);
VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsEXT(
VkDevice device,
uint32_t timestampCount,
- const VkCalibratedTimestampInfoEXT* pTimestampInfos,
+ const VkCalibratedTimestampInfoKHR* pTimestampInfos,
uint64_t* pTimestamps,
uint64_t* pMaxDeviation);
#endif
+// VK_AMD_shader_core_properties is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_core_properties 1
#define VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION 2
#define VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_AMD_shader_core_properties"
@@ -12548,6 +14389,7 @@ typedef struct VkPhysicalDeviceShaderCorePropertiesAMD {
+// VK_AMD_memory_overallocation_behavior is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_memory_overallocation_behavior 1
#define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION 1
#define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME "VK_AMD_memory_overallocation_behavior"
@@ -12566,6 +14408,7 @@ typedef struct VkDeviceMemoryOverallocationCreateInfoAMD {
+// VK_EXT_vertex_attribute_divisor is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_vertex_attribute_divisor 1
#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 3
#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor"
@@ -12575,27 +14418,15 @@ typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT {
uint32_t maxVertexAttribDivisor;
} VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT;
-typedef struct VkVertexInputBindingDivisorDescriptionEXT {
- uint32_t binding;
- uint32_t divisor;
-} VkVertexInputBindingDivisorDescriptionEXT;
+typedef VkVertexInputBindingDivisorDescriptionKHR VkVertexInputBindingDivisorDescriptionEXT;
-typedef struct VkPipelineVertexInputDivisorStateCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- uint32_t vertexBindingDivisorCount;
- const VkVertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors;
-} VkPipelineVertexInputDivisorStateCreateInfoEXT;
+typedef VkPipelineVertexInputDivisorStateCreateInfoKHR VkPipelineVertexInputDivisorStateCreateInfoEXT;
-typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT {
- VkStructureType sType;
- void* pNext;
- VkBool32 vertexAttributeInstanceRateDivisor;
- VkBool32 vertexAttributeInstanceRateZeroDivisor;
-} VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT;
+typedef VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT;
+// VK_EXT_pipeline_creation_feedback is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_pipeline_creation_feedback 1
#define VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION 1
#define VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME "VK_EXT_pipeline_creation_feedback"
@@ -12609,23 +14440,21 @@ typedef VkPipelineCreationFeedback VkPipelineCreationFeedbackEXT;
+// VK_NV_shader_subgroup_partitioned is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_shader_subgroup_partitioned 1
#define VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION 1
#define VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME "VK_NV_shader_subgroup_partitioned"
+// VK_NV_compute_shader_derivatives is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_compute_shader_derivatives 1
#define VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION 1
#define VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME "VK_NV_compute_shader_derivatives"
-typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesNV {
- VkStructureType sType;
- void* pNext;
- VkBool32 computeDerivativeGroupQuads;
- VkBool32 computeDerivativeGroupLinear;
-} VkPhysicalDeviceComputeShaderDerivativesFeaturesNV;
+typedef VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR VkPhysicalDeviceComputeShaderDerivativesFeaturesNV;
+// VK_NV_mesh_shader is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_mesh_shader 1
#define VK_NV_MESH_SHADER_SPEC_VERSION 1
#define VK_NV_MESH_SHADER_EXTENSION_NAME "VK_NV_mesh_shader"
@@ -12687,6 +14516,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectCountNV(
#endif
+// VK_NV_fragment_shader_barycentric is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_fragment_shader_barycentric 1
#define VK_NV_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1
#define VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME "VK_NV_fragment_shader_barycentric"
@@ -12694,6 +14524,7 @@ typedef VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR VkPhysicalDeviceFra
+// VK_NV_shader_image_footprint is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_shader_image_footprint 1
#define VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION 2
#define VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME "VK_NV_shader_image_footprint"
@@ -12705,6 +14536,7 @@ typedef struct VkPhysicalDeviceShaderImageFootprintFeaturesNV {
+// VK_NV_scissor_exclusive is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_scissor_exclusive 1
#define VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION 2
#define VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME "VK_NV_scissor_exclusive"
@@ -12739,6 +14571,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetExclusiveScissorNV(
#endif
+// VK_NV_device_diagnostic_checkpoints is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_device_diagnostic_checkpoints 1
#define VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_SPEC_VERSION 2
#define VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME "VK_NV_device_diagnostic_checkpoints"
@@ -12770,6 +14603,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointDataNV(
#endif
+// VK_INTEL_shader_integer_functions2 is a preprocessor guard. Do not pass it to API calls.
#define VK_INTEL_shader_integer_functions2 1
#define VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_SPEC_VERSION 1
#define VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME "VK_INTEL_shader_integer_functions2"
@@ -12781,6 +14615,7 @@ typedef struct VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL {
+// VK_INTEL_performance_query is a preprocessor guard. Do not pass it to API calls.
#define VK_INTEL_performance_query 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPerformanceConfigurationINTEL)
#define VK_INTEL_PERFORMANCE_QUERY_SPEC_VERSION 2
@@ -12919,6 +14754,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPerformanceParameterINTEL(
#endif
+// VK_EXT_pci_bus_info is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_pci_bus_info 1
#define VK_EXT_PCI_BUS_INFO_SPEC_VERSION 2
#define VK_EXT_PCI_BUS_INFO_EXTENSION_NAME "VK_EXT_pci_bus_info"
@@ -12933,6 +14769,7 @@ typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT {
+// VK_AMD_display_native_hdr is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_display_native_hdr 1
#define VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION 1
#define VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME "VK_AMD_display_native_hdr"
@@ -12958,6 +14795,7 @@ VKAPI_ATTR void VKAPI_CALL vkSetLocalDimmingAMD(
#endif
+// VK_EXT_fragment_density_map is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_fragment_density_map 1
#define VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION 2
#define VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME "VK_EXT_fragment_density_map"
@@ -12985,6 +14823,7 @@ typedef struct VkRenderPassFragmentDensityMapCreateInfoEXT {
+// VK_EXT_scalar_block_layout is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_scalar_block_layout 1
#define VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION 1
#define VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME "VK_EXT_scalar_block_layout"
@@ -12992,18 +14831,23 @@ typedef VkPhysicalDeviceScalarBlockLayoutFeatures VkPhysicalDeviceScalarBlockLay
+// VK_GOOGLE_hlsl_functionality1 is a preprocessor guard. Do not pass it to API calls.
#define VK_GOOGLE_hlsl_functionality1 1
#define VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION 1
#define VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME "VK_GOOGLE_hlsl_functionality1"
+// VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION is a deprecated alias
#define VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION
+// VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME is a deprecated alias
#define VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME
+// VK_GOOGLE_decorate_string is a preprocessor guard. Do not pass it to API calls.
#define VK_GOOGLE_decorate_string 1
#define VK_GOOGLE_DECORATE_STRING_SPEC_VERSION 1
#define VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME "VK_GOOGLE_decorate_string"
+// VK_EXT_subgroup_size_control is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_subgroup_size_control 1
#define VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION 2
#define VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME "VK_EXT_subgroup_size_control"
@@ -13015,6 +14859,7 @@ typedef VkPipelineShaderStageRequiredSubgroupSizeCreateInfo VkPipelineShaderStag
+// VK_AMD_shader_core_properties2 is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_core_properties2 1
#define VK_AMD_SHADER_CORE_PROPERTIES_2_SPEC_VERSION 1
#define VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME "VK_AMD_shader_core_properties2"
@@ -13032,6 +14877,7 @@ typedef struct VkPhysicalDeviceShaderCoreProperties2AMD {
+// VK_AMD_device_coherent_memory is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_device_coherent_memory 1
#define VK_AMD_DEVICE_COHERENT_MEMORY_SPEC_VERSION 1
#define VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME "VK_AMD_device_coherent_memory"
@@ -13043,6 +14889,7 @@ typedef struct VkPhysicalDeviceCoherentMemoryFeaturesAMD {
+// VK_EXT_shader_image_atomic_int64 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_image_atomic_int64 1
#define VK_EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION 1
#define VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME "VK_EXT_shader_image_atomic_int64"
@@ -13055,6 +14902,7 @@ typedef struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT {
+// VK_EXT_memory_budget is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_memory_budget 1
#define VK_EXT_MEMORY_BUDGET_SPEC_VERSION 1
#define VK_EXT_MEMORY_BUDGET_EXTENSION_NAME "VK_EXT_memory_budget"
@@ -13067,6 +14915,7 @@ typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT {
+// VK_EXT_memory_priority is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_memory_priority 1
#define VK_EXT_MEMORY_PRIORITY_SPEC_VERSION 1
#define VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME "VK_EXT_memory_priority"
@@ -13084,6 +14933,7 @@ typedef struct VkMemoryPriorityAllocateInfoEXT {
+// VK_NV_dedicated_allocation_image_aliasing is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_dedicated_allocation_image_aliasing 1
#define VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_SPEC_VERSION 1
#define VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME "VK_NV_dedicated_allocation_image_aliasing"
@@ -13095,6 +14945,7 @@ typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV {
+// VK_EXT_buffer_device_address is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_buffer_device_address 1
#define VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 2
#define VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_EXT_buffer_device_address"
@@ -13125,6 +14976,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressEXT(
#endif
+// VK_EXT_tooling_info is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_tooling_info 1
#define VK_EXT_TOOLING_INFO_SPEC_VERSION 1
#define VK_EXT_TOOLING_INFO_EXTENSION_NAME "VK_EXT_tooling_info"
@@ -13144,6 +14996,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceToolPropertiesEXT(
#endif
+// VK_EXT_separate_stencil_usage is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_separate_stencil_usage 1
#define VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION 1
#define VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME "VK_EXT_separate_stencil_usage"
@@ -13151,8 +15004,9 @@ typedef VkImageStencilUsageCreateInfo VkImageStencilUsageCreateInfoEXT;
+// VK_EXT_validation_features is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_validation_features 1
-#define VK_EXT_VALIDATION_FEATURES_SPEC_VERSION 5
+#define VK_EXT_VALIDATION_FEATURES_SPEC_VERSION 6
#define VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME "VK_EXT_validation_features"
typedef enum VkValidationFeatureEnableEXT {
@@ -13186,32 +15040,14 @@ typedef struct VkValidationFeaturesEXT {
+// VK_NV_cooperative_matrix is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_cooperative_matrix 1
#define VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION 1
#define VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME "VK_NV_cooperative_matrix"
+typedef VkComponentTypeKHR VkComponentTypeNV;
+
+typedef VkScopeKHR VkScopeNV;
-typedef enum VkComponentTypeNV {
- VK_COMPONENT_TYPE_FLOAT16_NV = 0,
- VK_COMPONENT_TYPE_FLOAT32_NV = 1,
- VK_COMPONENT_TYPE_FLOAT64_NV = 2,
- VK_COMPONENT_TYPE_SINT8_NV = 3,
- VK_COMPONENT_TYPE_SINT16_NV = 4,
- VK_COMPONENT_TYPE_SINT32_NV = 5,
- VK_COMPONENT_TYPE_SINT64_NV = 6,
- VK_COMPONENT_TYPE_UINT8_NV = 7,
- VK_COMPONENT_TYPE_UINT16_NV = 8,
- VK_COMPONENT_TYPE_UINT32_NV = 9,
- VK_COMPONENT_TYPE_UINT64_NV = 10,
- VK_COMPONENT_TYPE_MAX_ENUM_NV = 0x7FFFFFFF
-} VkComponentTypeNV;
-
-typedef enum VkScopeNV {
- VK_SCOPE_DEVICE_NV = 1,
- VK_SCOPE_WORKGROUP_NV = 2,
- VK_SCOPE_SUBGROUP_NV = 3,
- VK_SCOPE_QUEUE_FAMILY_NV = 5,
- VK_SCOPE_MAX_ENUM_NV = 0x7FFFFFFF
-} VkScopeNV;
typedef struct VkCooperativeMatrixPropertiesNV {
VkStructureType sType;
void* pNext;
@@ -13248,6 +15084,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
#endif
+// VK_NV_coverage_reduction_mode is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_coverage_reduction_mode 1
#define VK_NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION 1
#define VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME "VK_NV_coverage_reduction_mode"
@@ -13290,6 +15127,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSupportedFramebufferMixedSampl
#endif
+// VK_EXT_fragment_shader_interlock is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_fragment_shader_interlock 1
#define VK_EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION 1
#define VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME "VK_EXT_fragment_shader_interlock"
@@ -13303,6 +15141,7 @@ typedef struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT {
+// VK_EXT_ycbcr_image_arrays is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_ycbcr_image_arrays 1
#define VK_EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION 1
#define VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME "VK_EXT_ycbcr_image_arrays"
@@ -13314,6 +15153,7 @@ typedef struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT {
+// VK_EXT_provoking_vertex is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_provoking_vertex 1
#define VK_EXT_PROVOKING_VERTEX_SPEC_VERSION 1
#define VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME "VK_EXT_provoking_vertex"
@@ -13345,6 +15185,7 @@ typedef struct VkPipelineRasterizationProvokingVertexStateCreateInfoEXT {
+// VK_EXT_headless_surface is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_headless_surface 1
#define VK_EXT_HEADLESS_SURFACE_SPEC_VERSION 1
#define VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME "VK_EXT_headless_surface"
@@ -13366,42 +15207,17 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateHeadlessSurfaceEXT(
#endif
+// VK_EXT_line_rasterization is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_line_rasterization 1
#define VK_EXT_LINE_RASTERIZATION_SPEC_VERSION 1
#define VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME "VK_EXT_line_rasterization"
+typedef VkLineRasterizationModeKHR VkLineRasterizationModeEXT;
-typedef enum VkLineRasterizationModeEXT {
- VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = 0,
- VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = 1,
- VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = 2,
- VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = 3,
- VK_LINE_RASTERIZATION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkLineRasterizationModeEXT;
-typedef struct VkPhysicalDeviceLineRasterizationFeaturesEXT {
- VkStructureType sType;
- void* pNext;
- VkBool32 rectangularLines;
- VkBool32 bresenhamLines;
- VkBool32 smoothLines;
- VkBool32 stippledRectangularLines;
- VkBool32 stippledBresenhamLines;
- VkBool32 stippledSmoothLines;
-} VkPhysicalDeviceLineRasterizationFeaturesEXT;
+typedef VkPhysicalDeviceLineRasterizationFeaturesKHR VkPhysicalDeviceLineRasterizationFeaturesEXT;
-typedef struct VkPhysicalDeviceLineRasterizationPropertiesEXT {
- VkStructureType sType;
- void* pNext;
- uint32_t lineSubPixelPrecisionBits;
-} VkPhysicalDeviceLineRasterizationPropertiesEXT;
+typedef VkPhysicalDeviceLineRasterizationPropertiesKHR VkPhysicalDeviceLineRasterizationPropertiesEXT;
-typedef struct VkPipelineRasterizationLineStateCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkLineRasterizationModeEXT lineRasterizationMode;
- VkBool32 stippledLineEnable;
- uint32_t lineStippleFactor;
- uint16_t lineStipplePattern;
-} VkPipelineRasterizationLineStateCreateInfoEXT;
+typedef VkPipelineRasterizationLineStateCreateInfoKHR VkPipelineRasterizationLineStateCreateInfoEXT;
typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleEXT)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern);
@@ -13413,6 +15229,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleEXT(
#endif
+// VK_EXT_shader_atomic_float is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_atomic_float 1
#define VK_EXT_SHADER_ATOMIC_FLOAT_SPEC_VERSION 1
#define VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME "VK_EXT_shader_atomic_float"
@@ -13435,6 +15252,7 @@ typedef struct VkPhysicalDeviceShaderAtomicFloatFeaturesEXT {
+// VK_EXT_host_query_reset is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_host_query_reset 1
#define VK_EXT_HOST_QUERY_RESET_SPEC_VERSION 1
#define VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME "VK_EXT_host_query_reset"
@@ -13451,17 +15269,15 @@ VKAPI_ATTR void VKAPI_CALL vkResetQueryPoolEXT(
#endif
+// VK_EXT_index_type_uint8 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_index_type_uint8 1
#define VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION 1
#define VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME "VK_EXT_index_type_uint8"
-typedef struct VkPhysicalDeviceIndexTypeUint8FeaturesEXT {
- VkStructureType sType;
- void* pNext;
- VkBool32 indexTypeUint8;
-} VkPhysicalDeviceIndexTypeUint8FeaturesEXT;
+typedef VkPhysicalDeviceIndexTypeUint8FeaturesKHR VkPhysicalDeviceIndexTypeUint8FeaturesEXT;
+// VK_EXT_extended_dynamic_state is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_extended_dynamic_state 1
#define VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION 1
#define VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME "VK_EXT_extended_dynamic_state"
@@ -13546,6 +15362,172 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOpEXT(
#endif
+// VK_EXT_host_image_copy is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_host_image_copy 1
+#define VK_EXT_HOST_IMAGE_COPY_SPEC_VERSION 1
+#define VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME "VK_EXT_host_image_copy"
+
+typedef enum VkHostImageCopyFlagBitsEXT {
+ VK_HOST_IMAGE_COPY_MEMCPY_EXT = 0x00000001,
+ VK_HOST_IMAGE_COPY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkHostImageCopyFlagBitsEXT;
+typedef VkFlags VkHostImageCopyFlagsEXT;
+typedef struct VkPhysicalDeviceHostImageCopyFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 hostImageCopy;
+} VkPhysicalDeviceHostImageCopyFeaturesEXT;
+
+typedef struct VkPhysicalDeviceHostImageCopyPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t copySrcLayoutCount;
+ VkImageLayout* pCopySrcLayouts;
+ uint32_t copyDstLayoutCount;
+ VkImageLayout* pCopyDstLayouts;
+ uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE];
+ VkBool32 identicalMemoryTypeRequirements;
+} VkPhysicalDeviceHostImageCopyPropertiesEXT;
+
+typedef struct VkMemoryToImageCopyEXT {
+ VkStructureType sType;
+ const void* pNext;
+ const void* pHostPointer;
+ uint32_t memoryRowLength;
+ uint32_t memoryImageHeight;
+ VkImageSubresourceLayers imageSubresource;
+ VkOffset3D imageOffset;
+ VkExtent3D imageExtent;
+} VkMemoryToImageCopyEXT;
+
+typedef struct VkImageToMemoryCopyEXT {
+ VkStructureType sType;
+ const void* pNext;
+ void* pHostPointer;
+ uint32_t memoryRowLength;
+ uint32_t memoryImageHeight;
+ VkImageSubresourceLayers imageSubresource;
+ VkOffset3D imageOffset;
+ VkExtent3D imageExtent;
+} VkImageToMemoryCopyEXT;
+
+typedef struct VkCopyMemoryToImageInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkHostImageCopyFlagsEXT flags;
+ VkImage dstImage;
+ VkImageLayout dstImageLayout;
+ uint32_t regionCount;
+ const VkMemoryToImageCopyEXT* pRegions;
+} VkCopyMemoryToImageInfoEXT;
+
+typedef struct VkCopyImageToMemoryInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkHostImageCopyFlagsEXT flags;
+ VkImage srcImage;
+ VkImageLayout srcImageLayout;
+ uint32_t regionCount;
+ const VkImageToMemoryCopyEXT* pRegions;
+} VkCopyImageToMemoryInfoEXT;
+
+typedef struct VkCopyImageToImageInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkHostImageCopyFlagsEXT flags;
+ VkImage srcImage;
+ VkImageLayout srcImageLayout;
+ VkImage dstImage;
+ VkImageLayout dstImageLayout;
+ uint32_t regionCount;
+ const VkImageCopy2* pRegions;
+} VkCopyImageToImageInfoEXT;
+
+typedef struct VkHostImageLayoutTransitionInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkImage image;
+ VkImageLayout oldLayout;
+ VkImageLayout newLayout;
+ VkImageSubresourceRange subresourceRange;
+} VkHostImageLayoutTransitionInfoEXT;
+
+typedef struct VkSubresourceHostMemcpySizeEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkDeviceSize size;
+} VkSubresourceHostMemcpySizeEXT;
+
+typedef struct VkHostImageCopyDevicePerformanceQueryEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 optimalDeviceAccess;
+ VkBool32 identicalMemoryLayout;
+} VkHostImageCopyDevicePerformanceQueryEXT;
+
+typedef VkSubresourceLayout2KHR VkSubresourceLayout2EXT;
+
+typedef VkImageSubresource2KHR VkImageSubresource2EXT;
+
+typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToImageEXT)(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToMemoryEXT)(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToImageEXT)(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkTransitionImageLayoutEXT)(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfoEXT* pTransitions);
+typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2EXT)(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToImageEXT(
+ VkDevice device,
+ const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToMemoryEXT(
+ VkDevice device,
+ const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToImageEXT(
+ VkDevice device,
+ const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkTransitionImageLayoutEXT(
+ VkDevice device,
+ uint32_t transitionCount,
+ const VkHostImageLayoutTransitionInfoEXT* pTransitions);
+
+VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2EXT(
+ VkDevice device,
+ VkImage image,
+ const VkImageSubresource2KHR* pSubresource,
+ VkSubresourceLayout2KHR* pLayout);
+#endif
+
+
+// VK_EXT_map_memory_placed is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_map_memory_placed 1
+#define VK_EXT_MAP_MEMORY_PLACED_SPEC_VERSION 1
+#define VK_EXT_MAP_MEMORY_PLACED_EXTENSION_NAME "VK_EXT_map_memory_placed"
+typedef struct VkPhysicalDeviceMapMemoryPlacedFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 memoryMapPlaced;
+ VkBool32 memoryMapRangePlaced;
+ VkBool32 memoryUnmapReserve;
+} VkPhysicalDeviceMapMemoryPlacedFeaturesEXT;
+
+typedef struct VkPhysicalDeviceMapMemoryPlacedPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkDeviceSize minPlacedMemoryMapAlignment;
+} VkPhysicalDeviceMapMemoryPlacedPropertiesEXT;
+
+typedef struct VkMemoryMapPlacedInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ void* pPlacedAddress;
+} VkMemoryMapPlacedInfoEXT;
+
+
+
+// VK_EXT_shader_atomic_float2 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_atomic_float2 1
#define VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION 1
#define VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME "VK_EXT_shader_atomic_float2"
@@ -13568,6 +15550,7 @@ typedef struct VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT {
+// VK_EXT_surface_maintenance1 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_surface_maintenance1 1
#define VK_EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION 1
#define VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME "VK_EXT_surface_maintenance1"
@@ -13612,6 +15595,7 @@ typedef struct VkSurfacePresentModeCompatibilityEXT {
+// VK_EXT_swapchain_maintenance1 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_swapchain_maintenance1 1
#define VK_EXT_SWAPCHAIN_MAINTENANCE_1_SPEC_VERSION 1
#define VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME "VK_EXT_swapchain_maintenance1"
@@ -13667,6 +15651,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkReleaseSwapchainImagesEXT(
#endif
+// VK_EXT_shader_demote_to_helper_invocation is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_demote_to_helper_invocation 1
#define VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION 1
#define VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME "VK_EXT_shader_demote_to_helper_invocation"
@@ -13674,6 +15659,7 @@ typedef VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures VkPhysicalDeviceS
+// VK_NV_device_generated_commands is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_device_generated_commands 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNV)
#define VK_NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3
@@ -13689,6 +15675,8 @@ typedef enum VkIndirectCommandsTokenTypeNV {
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = 1000328000,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV = 1000428003,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV = 1000428004,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_NV = 0x7FFFFFFF
} VkIndirectCommandsTokenTypeNV;
@@ -13865,6 +15853,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNV(
#endif
+// VK_NV_inherited_viewport_scissor is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_inherited_viewport_scissor 1
#define VK_NV_INHERITED_VIEWPORT_SCISSOR_SPEC_VERSION 1
#define VK_NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME "VK_NV_inherited_viewport_scissor"
@@ -13884,6 +15873,7 @@ typedef struct VkCommandBufferInheritanceViewportScissorInfoNV {
+// VK_EXT_texel_buffer_alignment is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_texel_buffer_alignment 1
#define VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION 1
#define VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME "VK_EXT_texel_buffer_alignment"
@@ -13897,8 +15887,9 @@ typedef VkPhysicalDeviceTexelBufferAlignmentProperties VkPhysicalDeviceTexelBuff
+// VK_QCOM_render_pass_transform is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_render_pass_transform 1
-#define VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION 3
+#define VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION 4
#define VK_QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME "VK_QCOM_render_pass_transform"
typedef struct VkRenderPassTransformBeginInfoQCOM {
VkStructureType sType;
@@ -13915,6 +15906,51 @@ typedef struct VkCommandBufferInheritanceRenderPassTransformInfoQCOM {
+// VK_EXT_depth_bias_control is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_depth_bias_control 1
+#define VK_EXT_DEPTH_BIAS_CONTROL_SPEC_VERSION 1
+#define VK_EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME "VK_EXT_depth_bias_control"
+
+typedef enum VkDepthBiasRepresentationEXT {
+ VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT = 0,
+ VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT = 1,
+ VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT = 2,
+ VK_DEPTH_BIAS_REPRESENTATION_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDepthBiasRepresentationEXT;
+typedef struct VkPhysicalDeviceDepthBiasControlFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 depthBiasControl;
+ VkBool32 leastRepresentableValueForceUnormRepresentation;
+ VkBool32 floatRepresentation;
+ VkBool32 depthBiasExact;
+} VkPhysicalDeviceDepthBiasControlFeaturesEXT;
+
+typedef struct VkDepthBiasInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ float depthBiasConstantFactor;
+ float depthBiasClamp;
+ float depthBiasSlopeFactor;
+} VkDepthBiasInfoEXT;
+
+typedef struct VkDepthBiasRepresentationInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDepthBiasRepresentationEXT depthBiasRepresentation;
+ VkBool32 depthBiasExact;
+} VkDepthBiasRepresentationInfoEXT;
+
+typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias2EXT)(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias2EXT(
+ VkCommandBuffer commandBuffer,
+ const VkDepthBiasInfoEXT* pDepthBiasInfo);
+#endif
+
+
+// VK_EXT_device_memory_report is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_device_memory_report 1
#define VK_EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION 2
#define VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME "VK_EXT_device_memory_report"
@@ -13960,6 +15996,7 @@ typedef struct VkDeviceDeviceMemoryReportCreateInfoEXT {
+// VK_EXT_acquire_drm_display is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_acquire_drm_display 1
#define VK_EXT_ACQUIRE_DRM_DISPLAY_SPEC_VERSION 1
#define VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_drm_display"
@@ -13980,6 +16017,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDrmDisplayEXT(
#endif
+// VK_EXT_robustness2 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_robustness2 1
#define VK_EXT_ROBUSTNESS_2_SPEC_VERSION 1
#define VK_EXT_ROBUSTNESS_2_EXTENSION_NAME "VK_EXT_robustness2"
@@ -14000,6 +16038,7 @@ typedef struct VkPhysicalDeviceRobustness2PropertiesEXT {
+// VK_EXT_custom_border_color is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_custom_border_color 1
#define VK_EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION 12
#define VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME "VK_EXT_custom_border_color"
@@ -14025,11 +16064,13 @@ typedef struct VkPhysicalDeviceCustomBorderColorFeaturesEXT {
+// VK_GOOGLE_user_type is a preprocessor guard. Do not pass it to API calls.
#define VK_GOOGLE_user_type 1
#define VK_GOOGLE_USER_TYPE_SPEC_VERSION 1
#define VK_GOOGLE_USER_TYPE_EXTENSION_NAME "VK_GOOGLE_user_type"
+// VK_NV_present_barrier is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_present_barrier 1
#define VK_NV_PRESENT_BARRIER_SPEC_VERSION 1
#define VK_NV_PRESENT_BARRIER_EXTENSION_NAME "VK_NV_present_barrier"
@@ -14053,6 +16094,7 @@ typedef struct VkSwapchainPresentBarrierCreateInfoNV {
+// VK_EXT_private_data is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_private_data 1
typedef VkPrivateDataSlot VkPrivateDataSlotEXT;
@@ -14099,6 +16141,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPrivateDataEXT(
#endif
+// VK_EXT_pipeline_creation_cache_control is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_pipeline_creation_cache_control 1
#define VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_SPEC_VERSION 3
#define VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME "VK_EXT_pipeline_creation_cache_control"
@@ -14106,6 +16149,7 @@ typedef VkPhysicalDevicePipelineCreationCacheControlFeatures VkPhysicalDevicePip
+// VK_NV_device_diagnostics_config is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_device_diagnostics_config 1
#define VK_NV_DEVICE_DIAGNOSTICS_CONFIG_SPEC_VERSION 2
#define VK_NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME "VK_NV_device_diagnostics_config"
@@ -14132,11 +16176,105 @@ typedef struct VkDeviceDiagnosticsConfigCreateInfoNV {
+// VK_QCOM_render_pass_store_ops is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_render_pass_store_ops 1
#define VK_QCOM_RENDER_PASS_STORE_OPS_SPEC_VERSION 2
#define VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME "VK_QCOM_render_pass_store_ops"
+// VK_NV_cuda_kernel_launch is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_cuda_kernel_launch 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCudaModuleNV)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCudaFunctionNV)
+#define VK_NV_CUDA_KERNEL_LAUNCH_SPEC_VERSION 2
+#define VK_NV_CUDA_KERNEL_LAUNCH_EXTENSION_NAME "VK_NV_cuda_kernel_launch"
+typedef struct VkCudaModuleCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ size_t dataSize;
+ const void* pData;
+} VkCudaModuleCreateInfoNV;
+
+typedef struct VkCudaFunctionCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkCudaModuleNV module;
+ const char* pName;
+} VkCudaFunctionCreateInfoNV;
+
+typedef struct VkCudaLaunchInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkCudaFunctionNV function;
+ uint32_t gridDimX;
+ uint32_t gridDimY;
+ uint32_t gridDimZ;
+ uint32_t blockDimX;
+ uint32_t blockDimY;
+ uint32_t blockDimZ;
+ uint32_t sharedMemBytes;
+ size_t paramCount;
+ const void* const * pParams;
+ size_t extraCount;
+ const void* const * pExtras;
+} VkCudaLaunchInfoNV;
+
+typedef struct VkPhysicalDeviceCudaKernelLaunchFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 cudaKernelLaunchFeatures;
+} VkPhysicalDeviceCudaKernelLaunchFeaturesNV;
+
+typedef struct VkPhysicalDeviceCudaKernelLaunchPropertiesNV {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t computeCapabilityMinor;
+ uint32_t computeCapabilityMajor;
+} VkPhysicalDeviceCudaKernelLaunchPropertiesNV;
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateCudaModuleNV)(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule);
+typedef VkResult (VKAPI_PTR *PFN_vkGetCudaModuleCacheNV)(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateCudaFunctionNV)(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction);
+typedef void (VKAPI_PTR *PFN_vkDestroyCudaModuleNV)(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkDestroyCudaFunctionNV)(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkCmdCudaLaunchKernelNV)(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaModuleNV(
+ VkDevice device,
+ const VkCudaModuleCreateInfoNV* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkCudaModuleNV* pModule);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetCudaModuleCacheNV(
+ VkDevice device,
+ VkCudaModuleNV module,
+ size_t* pCacheSize,
+ void* pCacheData);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaFunctionNV(
+ VkDevice device,
+ const VkCudaFunctionCreateInfoNV* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkCudaFunctionNV* pFunction);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyCudaModuleNV(
+ VkDevice device,
+ VkCudaModuleNV module,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyCudaFunctionNV(
+ VkDevice device,
+ VkCudaFunctionNV function,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdCudaLaunchKernelNV(
+ VkCommandBuffer commandBuffer,
+ const VkCudaLaunchInfoNV* pLaunchInfo);
+#endif
+
+
+// VK_NV_low_latency is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_low_latency 1
#define VK_NV_LOW_LATENCY_SPEC_VERSION 1
#define VK_NV_LOW_LATENCY_EXTENSION_NAME "VK_NV_low_latency"
@@ -14148,6 +16286,7 @@ typedef struct VkQueryLowLatencySupportNV {
+// VK_EXT_descriptor_buffer is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_descriptor_buffer 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR)
#define VK_EXT_DESCRIPTOR_BUFFER_SPEC_VERSION 1
@@ -14215,14 +16354,14 @@ typedef struct VkDescriptorAddressInfoEXT {
typedef struct VkDescriptorBufferBindingInfoEXT {
VkStructureType sType;
- void* pNext;
+ const void* pNext;
VkDeviceAddress address;
VkBufferUsageFlags usage;
} VkDescriptorBufferBindingInfoEXT;
typedef struct VkDescriptorBufferBindingPushDescriptorBufferHandleEXT {
VkStructureType sType;
- void* pNext;
+ const void* pNext;
VkBuffer buffer;
} VkDescriptorBufferBindingPushDescriptorBufferHandleEXT;
@@ -14360,6 +16499,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetAccelerationStructureOpaqueCaptureDescriptor
#endif
+// VK_EXT_graphics_pipeline_library is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_graphics_pipeline_library 1
#define VK_EXT_GRAPHICS_PIPELINE_LIBRARY_SPEC_VERSION 1
#define VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME "VK_EXT_graphics_pipeline_library"
@@ -14387,12 +16527,13 @@ typedef struct VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT {
typedef struct VkGraphicsPipelineLibraryCreateInfoEXT {
VkStructureType sType;
- void* pNext;
+ const void* pNext;
VkGraphicsPipelineLibraryFlagsEXT flags;
} VkGraphicsPipelineLibraryCreateInfoEXT;
+// VK_AMD_shader_early_and_late_fragment_tests is a preprocessor guard. Do not pass it to API calls.
#define VK_AMD_shader_early_and_late_fragment_tests 1
#define VK_AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_SPEC_VERSION 1
#define VK_AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_EXTENSION_NAME "VK_AMD_shader_early_and_late_fragment_tests"
@@ -14404,6 +16545,7 @@ typedef struct VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD {
+// VK_NV_fragment_shading_rate_enums is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_fragment_shading_rate_enums 1
#define VK_NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION 1
#define VK_NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME "VK_NV_fragment_shading_rate_enums"
@@ -14461,6 +16603,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateEnumNV(
#endif
+// VK_NV_ray_tracing_motion_blur is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_ray_tracing_motion_blur 1
#define VK_NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION 1
#define VK_NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME "VK_NV_ray_tracing_motion_blur"
@@ -14551,6 +16694,7 @@ typedef struct VkPhysicalDeviceRayTracingMotionBlurFeaturesNV {
+// VK_EXT_ycbcr_2plane_444_formats is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_ycbcr_2plane_444_formats 1
#define VK_EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION 1
#define VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME "VK_EXT_ycbcr_2plane_444_formats"
@@ -14562,6 +16706,7 @@ typedef struct VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT {
+// VK_EXT_fragment_density_map2 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_fragment_density_map2 1
#define VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION 1
#define VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME "VK_EXT_fragment_density_map2"
@@ -14582,8 +16727,9 @@ typedef struct VkPhysicalDeviceFragmentDensityMap2PropertiesEXT {
+// VK_QCOM_rotated_copy_commands is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_rotated_copy_commands 1
-#define VK_QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION 1
+#define VK_QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION 2
#define VK_QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME "VK_QCOM_rotated_copy_commands"
typedef struct VkCopyCommandTransformInfoQCOM {
VkStructureType sType;
@@ -14593,6 +16739,7 @@ typedef struct VkCopyCommandTransformInfoQCOM {
+// VK_EXT_image_robustness is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_image_robustness 1
#define VK_EXT_IMAGE_ROBUSTNESS_SPEC_VERSION 1
#define VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME "VK_EXT_image_robustness"
@@ -14600,6 +16747,7 @@ typedef VkPhysicalDeviceImageRobustnessFeatures VkPhysicalDeviceImageRobustnessF
+// VK_EXT_image_compression_control is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_image_compression_control 1
#define VK_EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION 1
#define VK_EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME "VK_EXT_image_compression_control"
@@ -14656,18 +16804,6 @@ typedef struct VkImageCompressionControlEXT {
VkImageCompressionFixedRateFlagsEXT* pFixedRateFlags;
} VkImageCompressionControlEXT;
-typedef struct VkSubresourceLayout2EXT {
- VkStructureType sType;
- void* pNext;
- VkSubresourceLayout subresourceLayout;
-} VkSubresourceLayout2EXT;
-
-typedef struct VkImageSubresource2EXT {
- VkStructureType sType;
- void* pNext;
- VkImageSubresource imageSubresource;
-} VkImageSubresource2EXT;
-
typedef struct VkImageCompressionPropertiesEXT {
VkStructureType sType;
void* pNext;
@@ -14675,17 +16811,9 @@ typedef struct VkImageCompressionPropertiesEXT {
VkImageCompressionFixedRateFlagsEXT imageCompressionFixedRateFlags;
} VkImageCompressionPropertiesEXT;
-typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2EXT)(VkDevice device, VkImage image, const VkImageSubresource2EXT* pSubresource, VkSubresourceLayout2EXT* pLayout);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2EXT(
- VkDevice device,
- VkImage image,
- const VkImageSubresource2EXT* pSubresource,
- VkSubresourceLayout2EXT* pLayout);
-#endif
+// VK_EXT_attachment_feedback_loop_layout is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_attachment_feedback_loop_layout 1
#define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_SPEC_VERSION 2
#define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME "VK_EXT_attachment_feedback_loop_layout"
@@ -14697,6 +16825,7 @@ typedef struct VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT {
+// VK_EXT_4444_formats is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_4444_formats 1
#define VK_EXT_4444_FORMATS_SPEC_VERSION 1
#define VK_EXT_4444_FORMATS_EXTENSION_NAME "VK_EXT_4444_formats"
@@ -14709,6 +16838,7 @@ typedef struct VkPhysicalDevice4444FormatsFeaturesEXT {
+// VK_EXT_device_fault is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_device_fault 1
#define VK_EXT_DEVICE_FAULT_SPEC_VERSION 2
#define VK_EXT_DEVICE_FAULT_EXTENSION_NAME "VK_EXT_device_fault"
@@ -14788,6 +16918,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceFaultInfoEXT(
#endif
+// VK_ARM_rasterization_order_attachment_access is a preprocessor guard. Do not pass it to API calls.
#define VK_ARM_rasterization_order_attachment_access 1
#define VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION 1
#define VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME "VK_ARM_rasterization_order_attachment_access"
@@ -14803,6 +16934,7 @@ typedef VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT VkPhysical
+// VK_EXT_rgba10x6_formats is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_rgba10x6_formats 1
#define VK_EXT_RGBA10X6_FORMATS_SPEC_VERSION 1
#define VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME "VK_EXT_rgba10x6_formats"
@@ -14814,6 +16946,7 @@ typedef struct VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT {
+// VK_VALVE_mutable_descriptor_type is a preprocessor guard. Do not pass it to API calls.
#define VK_VALVE_mutable_descriptor_type 1
#define VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION 1
#define VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME "VK_VALVE_mutable_descriptor_type"
@@ -14843,6 +16976,7 @@ typedef VkMutableDescriptorTypeCreateInfoEXT VkMutableDescriptorTypeCreateInfoVA
+// VK_EXT_vertex_input_dynamic_state is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_vertex_input_dynamic_state 1
#define VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION 2
#define VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME "VK_EXT_vertex_input_dynamic_state"
@@ -14882,6 +17016,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetVertexInputEXT(
#endif
+// VK_EXT_physical_device_drm is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_physical_device_drm 1
#define VK_EXT_PHYSICAL_DEVICE_DRM_SPEC_VERSION 1
#define VK_EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME "VK_EXT_physical_device_drm"
@@ -14898,6 +17033,7 @@ typedef struct VkPhysicalDeviceDrmPropertiesEXT {
+// VK_EXT_device_address_binding_report is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_device_address_binding_report 1
#define VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION 1
#define VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME "VK_EXT_device_address_binding_report"
@@ -14930,6 +17066,7 @@ typedef struct VkDeviceAddressBindingCallbackDataEXT {
+// VK_EXT_depth_clip_control is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_depth_clip_control 1
#define VK_EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION 1
#define VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME "VK_EXT_depth_clip_control"
@@ -14947,6 +17084,7 @@ typedef struct VkPipelineViewportDepthClipControlCreateInfoEXT {
+// VK_EXT_primitive_topology_list_restart is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_primitive_topology_list_restart 1
#define VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_SPEC_VERSION 1
#define VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME "VK_EXT_primitive_topology_list_restart"
@@ -14959,8 +17097,9 @@ typedef struct VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT {
+// VK_HUAWEI_subpass_shading is a preprocessor guard. Do not pass it to API calls.
#define VK_HUAWEI_subpass_shading 1
-#define VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION 2
+#define VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION 3
#define VK_HUAWEI_SUBPASS_SHADING_EXTENSION_NAME "VK_HUAWEI_subpass_shading"
typedef struct VkSubpassShadingPipelineCreateInfoHUAWEI {
VkStructureType sType;
@@ -14995,6 +17134,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSubpassShadingHUAWEI(
#endif
+// VK_HUAWEI_invocation_mask is a preprocessor guard. Do not pass it to API calls.
#define VK_HUAWEI_invocation_mask 1
#define VK_HUAWEI_INVOCATION_MASK_SPEC_VERSION 1
#define VK_HUAWEI_INVOCATION_MASK_EXTENSION_NAME "VK_HUAWEI_invocation_mask"
@@ -15014,6 +17154,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBindInvocationMaskHUAWEI(
#endif
+// VK_NV_external_memory_rdma is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_external_memory_rdma 1
typedef void* VkRemoteAddressNV;
#define VK_NV_EXTERNAL_MEMORY_RDMA_SPEC_VERSION 1
@@ -15041,6 +17182,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryRemoteAddressNV(
#endif
+// VK_EXT_pipeline_properties is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_pipeline_properties 1
#define VK_EXT_PIPELINE_PROPERTIES_SPEC_VERSION 1
#define VK_EXT_PIPELINE_PROPERTIES_EXTENSION_NAME "VK_EXT_pipeline_properties"
@@ -15068,6 +17210,39 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelinePropertiesEXT(
#endif
+// VK_EXT_frame_boundary is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_frame_boundary 1
+#define VK_EXT_FRAME_BOUNDARY_SPEC_VERSION 1
+#define VK_EXT_FRAME_BOUNDARY_EXTENSION_NAME "VK_EXT_frame_boundary"
+
+typedef enum VkFrameBoundaryFlagBitsEXT {
+ VK_FRAME_BOUNDARY_FRAME_END_BIT_EXT = 0x00000001,
+ VK_FRAME_BOUNDARY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkFrameBoundaryFlagBitsEXT;
+typedef VkFlags VkFrameBoundaryFlagsEXT;
+typedef struct VkPhysicalDeviceFrameBoundaryFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 frameBoundary;
+} VkPhysicalDeviceFrameBoundaryFeaturesEXT;
+
+typedef struct VkFrameBoundaryEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkFrameBoundaryFlagsEXT flags;
+ uint64_t frameID;
+ uint32_t imageCount;
+ const VkImage* pImages;
+ uint32_t bufferCount;
+ const VkBuffer* pBuffers;
+ uint64_t tagName;
+ size_t tagSize;
+ const void* pTag;
+} VkFrameBoundaryEXT;
+
+
+
+// VK_EXT_multisampled_render_to_single_sampled is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_multisampled_render_to_single_sampled 1
#define VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION 1
#define VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME "VK_EXT_multisampled_render_to_single_sampled"
@@ -15092,6 +17267,7 @@ typedef struct VkMultisampledRenderToSingleSampledInfoEXT {
+// VK_EXT_extended_dynamic_state2 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_extended_dynamic_state2 1
#define VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION 1
#define VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME "VK_EXT_extended_dynamic_state2"
@@ -15132,6 +17308,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveRestartEnableEXT(
#endif
+// VK_EXT_color_write_enable is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_color_write_enable 1
#define VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION 1
#define VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME "VK_EXT_color_write_enable"
@@ -15158,6 +17335,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetColorWrite
#endif
+// VK_EXT_primitives_generated_query is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_primitives_generated_query 1
#define VK_EXT_PRIMITIVES_GENERATED_QUERY_SPEC_VERSION 1
#define VK_EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME "VK_EXT_primitives_generated_query"
@@ -15171,6 +17349,7 @@ typedef struct VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT {
+// VK_EXT_global_priority_query is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_global_priority_query 1
#define VK_EXT_GLOBAL_PRIORITY_QUERY_SPEC_VERSION 1
#define VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME "VK_EXT_global_priority_query"
@@ -15181,6 +17360,7 @@ typedef VkQueueFamilyGlobalPriorityPropertiesKHR VkQueueFamilyGlobalPriorityProp
+// VK_EXT_image_view_min_lod is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_image_view_min_lod 1
#define VK_EXT_IMAGE_VIEW_MIN_LOD_SPEC_VERSION 1
#define VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME "VK_EXT_image_view_min_lod"
@@ -15198,6 +17378,7 @@ typedef struct VkImageViewMinLodCreateInfoEXT {
+// VK_EXT_multi_draw is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_multi_draw 1
#define VK_EXT_MULTI_DRAW_SPEC_VERSION 1
#define VK_EXT_MULTI_DRAW_EXTENSION_NAME "VK_EXT_multi_draw"
@@ -15247,6 +17428,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawMultiIndexedEXT(
#endif
+// VK_EXT_image_2d_view_of_3d is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_image_2d_view_of_3d 1
#define VK_EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION 1
#define VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME "VK_EXT_image_2d_view_of_3d"
@@ -15259,6 +17441,7 @@ typedef struct VkPhysicalDeviceImage2DViewOf3DFeaturesEXT {
+// VK_EXT_shader_tile_image is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_tile_image 1
#define VK_EXT_SHADER_TILE_IMAGE_SPEC_VERSION 1
#define VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME "VK_EXT_shader_tile_image"
@@ -15280,6 +17463,7 @@ typedef struct VkPhysicalDeviceShaderTileImagePropertiesEXT {
+// VK_EXT_opacity_micromap is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_opacity_micromap 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkMicromapEXT)
#define VK_EXT_OPACITY_MICROMAP_SPEC_VERSION 2
@@ -15551,13 +17735,15 @@ VKAPI_ATTR void VKAPI_CALL vkGetMicromapBuildSizesEXT(
#endif
+// VK_EXT_load_store_op_none is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_load_store_op_none 1
#define VK_EXT_LOAD_STORE_OP_NONE_SPEC_VERSION 1
#define VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME "VK_EXT_load_store_op_none"
+// VK_HUAWEI_cluster_culling_shader is a preprocessor guard. Do not pass it to API calls.
#define VK_HUAWEI_cluster_culling_shader 1
-#define VK_HUAWEI_CLUSTER_CULLING_SHADER_SPEC_VERSION 2
+#define VK_HUAWEI_CLUSTER_CULLING_SHADER_SPEC_VERSION 3
#define VK_HUAWEI_CLUSTER_CULLING_SHADER_EXTENSION_NAME "VK_HUAWEI_cluster_culling_shader"
typedef struct VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI {
VkStructureType sType;
@@ -15575,6 +17761,12 @@ typedef struct VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI {
VkDeviceSize indirectBufferOffsetAlignment;
} VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI;
+typedef struct VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 clusterShadingRate;
+} VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI;
+
typedef void (VKAPI_PTR *PFN_vkCmdDrawClusterHUAWEI)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
typedef void (VKAPI_PTR *PFN_vkCmdDrawClusterIndirectHUAWEI)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
@@ -15592,6 +17784,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawClusterIndirectHUAWEI(
#endif
+// VK_EXT_border_color_swizzle is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_border_color_swizzle 1
#define VK_EXT_BORDER_COLOR_SWIZZLE_SPEC_VERSION 1
#define VK_EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME "VK_EXT_border_color_swizzle"
@@ -15611,6 +17804,7 @@ typedef struct VkSamplerBorderColorComponentMappingCreateInfoEXT {
+// VK_EXT_pageable_device_local_memory is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_pageable_device_local_memory 1
#define VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_SPEC_VERSION 1
#define VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME "VK_EXT_pageable_device_local_memory"
@@ -15630,6 +17824,7 @@ VKAPI_ATTR void VKAPI_CALL vkSetDeviceMemoryPriorityEXT(
#endif
+// VK_ARM_shader_core_properties is a preprocessor guard. Do not pass it to API calls.
#define VK_ARM_shader_core_properties 1
#define VK_ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION 1
#define VK_ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_ARM_shader_core_properties"
@@ -15643,6 +17838,37 @@ typedef struct VkPhysicalDeviceShaderCorePropertiesARM {
+// VK_ARM_scheduling_controls is a preprocessor guard. Do not pass it to API calls.
+#define VK_ARM_scheduling_controls 1
+#define VK_ARM_SCHEDULING_CONTROLS_SPEC_VERSION 1
+#define VK_ARM_SCHEDULING_CONTROLS_EXTENSION_NAME "VK_ARM_scheduling_controls"
+typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagsARM;
+
+// Flag bits for VkPhysicalDeviceSchedulingControlsFlagBitsARM
+typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagBitsARM;
+static const VkPhysicalDeviceSchedulingControlsFlagBitsARM VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM = 0x00000001ULL;
+
+typedef struct VkDeviceQueueShaderCoreControlCreateInfoARM {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t shaderCoreCount;
+} VkDeviceQueueShaderCoreControlCreateInfoARM;
+
+typedef struct VkPhysicalDeviceSchedulingControlsFeaturesARM {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 schedulingControls;
+} VkPhysicalDeviceSchedulingControlsFeaturesARM;
+
+typedef struct VkPhysicalDeviceSchedulingControlsPropertiesARM {
+ VkStructureType sType;
+ void* pNext;
+ VkPhysicalDeviceSchedulingControlsFlagsARM schedulingControlsFlags;
+} VkPhysicalDeviceSchedulingControlsPropertiesARM;
+
+
+
+// VK_EXT_image_sliced_view_of_3d is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_image_sliced_view_of_3d 1
#define VK_EXT_IMAGE_SLICED_VIEW_OF_3D_SPEC_VERSION 1
#define VK_EXT_IMAGE_SLICED_VIEW_OF_3D_EXTENSION_NAME "VK_EXT_image_sliced_view_of_3d"
@@ -15662,6 +17888,7 @@ typedef struct VkImageViewSlicedCreateInfoEXT {
+// VK_VALVE_descriptor_set_host_mapping is a preprocessor guard. Do not pass it to API calls.
#define VK_VALVE_descriptor_set_host_mapping 1
#define VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_SPEC_VERSION 1
#define VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME "VK_VALVE_descriptor_set_host_mapping"
@@ -15701,6 +17928,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetHostMappingVALVE(
#endif
+// VK_EXT_depth_clamp_zero_one is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_depth_clamp_zero_one 1
#define VK_EXT_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION 1
#define VK_EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME "VK_EXT_depth_clamp_zero_one"
@@ -15712,6 +17940,7 @@ typedef struct VkPhysicalDeviceDepthClampZeroOneFeaturesEXT {
+// VK_EXT_non_seamless_cube_map is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_non_seamless_cube_map 1
#define VK_EXT_NON_SEAMLESS_CUBE_MAP_SPEC_VERSION 1
#define VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME "VK_EXT_non_seamless_cube_map"
@@ -15723,8 +17952,48 @@ typedef struct VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT {
+// VK_ARM_render_pass_striped is a preprocessor guard. Do not pass it to API calls.
+#define VK_ARM_render_pass_striped 1
+#define VK_ARM_RENDER_PASS_STRIPED_SPEC_VERSION 1
+#define VK_ARM_RENDER_PASS_STRIPED_EXTENSION_NAME "VK_ARM_render_pass_striped"
+typedef struct VkPhysicalDeviceRenderPassStripedFeaturesARM {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 renderPassStriped;
+} VkPhysicalDeviceRenderPassStripedFeaturesARM;
+
+typedef struct VkPhysicalDeviceRenderPassStripedPropertiesARM {
+ VkStructureType sType;
+ void* pNext;
+ VkExtent2D renderPassStripeGranularity;
+ uint32_t maxRenderPassStripes;
+} VkPhysicalDeviceRenderPassStripedPropertiesARM;
+
+typedef struct VkRenderPassStripeInfoARM {
+ VkStructureType sType;
+ const void* pNext;
+ VkRect2D stripeArea;
+} VkRenderPassStripeInfoARM;
+
+typedef struct VkRenderPassStripeBeginInfoARM {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t stripeInfoCount;
+ const VkRenderPassStripeInfoARM* pStripeInfos;
+} VkRenderPassStripeBeginInfoARM;
+
+typedef struct VkRenderPassStripeSubmitInfoARM {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t stripeSemaphoreInfoCount;
+ const VkSemaphoreSubmitInfo* pStripeSemaphoreInfos;
+} VkRenderPassStripeSubmitInfoARM;
+
+
+
+// VK_QCOM_fragment_density_map_offset is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_fragment_density_map_offset 1
-#define VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION 1
+#define VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION 2
#define VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME "VK_QCOM_fragment_density_map_offset"
typedef struct VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM {
VkStructureType sType;
@@ -15747,6 +18016,7 @@ typedef struct VkSubpassFragmentDensityMapOffsetEndInfoQCOM {
+// VK_NV_copy_memory_indirect is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_copy_memory_indirect 1
#define VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSION 1
#define VK_NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME "VK_NV_copy_memory_indirect"
@@ -15798,6 +18068,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToImageIndirectNV(
#endif
+// VK_NV_memory_decompression is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_memory_decompression 1
#define VK_NV_MEMORY_DECOMPRESSION_SPEC_VERSION 1
#define VK_NV_MEMORY_DECOMPRESSION_EXTENSION_NAME "VK_NV_memory_decompression"
@@ -15845,6 +18116,59 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDecompressMemoryIndirectCountNV(
#endif
+// VK_NV_device_generated_commands_compute is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_device_generated_commands_compute 1
+#define VK_NV_DEVICE_GENERATED_COMMANDS_COMPUTE_SPEC_VERSION 2
+#define VK_NV_DEVICE_GENERATED_COMMANDS_COMPUTE_EXTENSION_NAME "VK_NV_device_generated_commands_compute"
+typedef struct VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 deviceGeneratedCompute;
+ VkBool32 deviceGeneratedComputePipelines;
+ VkBool32 deviceGeneratedComputeCaptureReplay;
+} VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV;
+
+typedef struct VkComputePipelineIndirectBufferInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceAddress deviceAddress;
+ VkDeviceSize size;
+ VkDeviceAddress pipelineDeviceAddressCaptureReplay;
+} VkComputePipelineIndirectBufferInfoNV;
+
+typedef struct VkPipelineIndirectDeviceAddressInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineBindPoint pipelineBindPoint;
+ VkPipeline pipeline;
+} VkPipelineIndirectDeviceAddressInfoNV;
+
+typedef struct VkBindPipelineIndirectCommandNV {
+ VkDeviceAddress pipelineAddress;
+} VkBindPipelineIndirectCommandNV;
+
+typedef void (VKAPI_PTR *PFN_vkGetPipelineIndirectMemoryRequirementsNV)(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkCmdUpdatePipelineIndirectBufferNV)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
+typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetPipelineIndirectDeviceAddressNV)(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetPipelineIndirectMemoryRequirementsNV(
+ VkDevice device,
+ const VkComputePipelineCreateInfo* pCreateInfo,
+ VkMemoryRequirements2* pMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdUpdatePipelineIndirectBufferNV(
+ VkCommandBuffer commandBuffer,
+ VkPipelineBindPoint pipelineBindPoint,
+ VkPipeline pipeline);
+
+VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetPipelineIndirectDeviceAddressNV(
+ VkDevice device,
+ const VkPipelineIndirectDeviceAddressInfoNV* pInfo);
+#endif
+
+
+// VK_NV_linear_color_attachment is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_linear_color_attachment 1
#define VK_NV_LINEAR_COLOR_ATTACHMENT_SPEC_VERSION 1
#define VK_NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME "VK_NV_linear_color_attachment"
@@ -15856,11 +18180,13 @@ typedef struct VkPhysicalDeviceLinearColorAttachmentFeaturesNV {
+// VK_GOOGLE_surfaceless_query is a preprocessor guard. Do not pass it to API calls.
#define VK_GOOGLE_surfaceless_query 1
#define VK_GOOGLE_SURFACELESS_QUERY_SPEC_VERSION 2
#define VK_GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME "VK_GOOGLE_surfaceless_query"
+// VK_EXT_image_compression_control_swapchain is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_image_compression_control_swapchain 1
#define VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_SPEC_VERSION 1
#define VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME "VK_EXT_image_compression_control_swapchain"
@@ -15872,6 +18198,7 @@ typedef struct VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT {
+// VK_QCOM_image_processing is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_image_processing 1
#define VK_QCOM_IMAGE_PROCESSING_SPEC_VERSION 1
#define VK_QCOM_IMAGE_PROCESSING_EXTENSION_NAME "VK_QCOM_image_processing"
@@ -15902,6 +18229,39 @@ typedef struct VkPhysicalDeviceImageProcessingPropertiesQCOM {
+// VK_EXT_nested_command_buffer is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_nested_command_buffer 1
+#define VK_EXT_NESTED_COMMAND_BUFFER_SPEC_VERSION 1
+#define VK_EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME "VK_EXT_nested_command_buffer"
+typedef struct VkPhysicalDeviceNestedCommandBufferFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 nestedCommandBuffer;
+ VkBool32 nestedCommandBufferRendering;
+ VkBool32 nestedCommandBufferSimultaneousUse;
+} VkPhysicalDeviceNestedCommandBufferFeaturesEXT;
+
+typedef struct VkPhysicalDeviceNestedCommandBufferPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxCommandBufferNestingLevel;
+} VkPhysicalDeviceNestedCommandBufferPropertiesEXT;
+
+
+
+// VK_EXT_external_memory_acquire_unmodified is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_external_memory_acquire_unmodified 1
+#define VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_SPEC_VERSION 1
+#define VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXTENSION_NAME "VK_EXT_external_memory_acquire_unmodified"
+typedef struct VkExternalMemoryAcquireUnmodifiedEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 acquireUnmodifiedMemory;
+} VkExternalMemoryAcquireUnmodifiedEXT;
+
+
+
+// VK_EXT_extended_dynamic_state3 is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_extended_dynamic_state3 1
#define VK_EXT_EXTENDED_DYNAMIC_STATE_3_SPEC_VERSION 2
#define VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME "VK_EXT_extended_dynamic_state3"
@@ -15964,7 +18324,6 @@ typedef struct VkColorBlendAdvancedEXT {
VkBool32 clampResults;
} VkColorBlendAdvancedEXT;
-typedef void (VKAPI_PTR *PFN_vkCmdSetTessellationDomainOriginEXT)(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin);
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthClampEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable);
typedef void (VKAPI_PTR *PFN_vkCmdSetPolygonModeEXT)(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode);
typedef void (VKAPI_PTR *PFN_vkCmdSetRasterizationSamplesEXT)(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples);
@@ -15975,6 +18334,7 @@ typedef void (VKAPI_PTR *PFN_vkCmdSetLogicOpEnableEXT)(VkCommandBuffer commandBu
typedef void (VKAPI_PTR *PFN_vkCmdSetColorBlendEnableEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables);
typedef void (VKAPI_PTR *PFN_vkCmdSetColorBlendEquationEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations);
typedef void (VKAPI_PTR *PFN_vkCmdSetColorWriteMaskEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks);
+typedef void (VKAPI_PTR *PFN_vkCmdSetTessellationDomainOriginEXT)(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin);
typedef void (VKAPI_PTR *PFN_vkCmdSetRasterizationStreamEXT)(VkCommandBuffer commandBuffer, uint32_t rasterizationStream);
typedef void (VKAPI_PTR *PFN_vkCmdSetConservativeRasterizationModeEXT)(VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode);
typedef void (VKAPI_PTR *PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize);
@@ -15997,10 +18357,6 @@ typedef void (VKAPI_PTR *PFN_vkCmdSetRepresentativeFragmentTestEnableNV)(VkComma
typedef void (VKAPI_PTR *PFN_vkCmdSetCoverageReductionModeNV)(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode);
#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkCmdSetTessellationDomainOriginEXT(
- VkCommandBuffer commandBuffer,
- VkTessellationDomainOrigin domainOrigin);
-
VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClampEnableEXT(
VkCommandBuffer commandBuffer,
VkBool32 depthClampEnable);
@@ -16048,6 +18404,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetColorWriteMaskEXT(
uint32_t attachmentCount,
const VkColorComponentFlags* pColorWriteMasks);
+VKAPI_ATTR void VKAPI_CALL vkCmdSetTessellationDomainOriginEXT(
+ VkCommandBuffer commandBuffer,
+ VkTessellationDomainOrigin domainOrigin);
+
VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizationStreamEXT(
VkCommandBuffer commandBuffer,
uint32_t rasterizationStream);
@@ -16135,6 +18495,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageReductionModeNV(
#endif
+// VK_EXT_subpass_merge_feedback is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_subpass_merge_feedback 1
#define VK_EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION 2
#define VK_EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME "VK_EXT_subpass_merge_feedback"
@@ -16192,6 +18553,7 @@ typedef struct VkRenderPassSubpassFeedbackCreateInfoEXT {
+// VK_LUNARG_direct_driver_loading is a preprocessor guard. Do not pass it to API calls.
#define VK_LUNARG_direct_driver_loading 1
#define VK_LUNARG_DIRECT_DRIVER_LOADING_SPEC_VERSION 1
#define VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME "VK_LUNARG_direct_driver_loading"
@@ -16214,7 +18576,7 @@ typedef struct VkDirectDriverLoadingInfoLUNARG {
typedef struct VkDirectDriverLoadingListLUNARG {
VkStructureType sType;
- void* pNext;
+ const void* pNext;
VkDirectDriverLoadingModeLUNARG mode;
uint32_t driverCount;
const VkDirectDriverLoadingInfoLUNARG* pDrivers;
@@ -16222,6 +18584,7 @@ typedef struct VkDirectDriverLoadingListLUNARG {
+// VK_EXT_shader_module_identifier is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_module_identifier 1
#define VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT 32U
#define VK_EXT_SHADER_MODULE_IDENTIFIER_SPEC_VERSION 1
@@ -16268,11 +18631,13 @@ VKAPI_ATTR void VKAPI_CALL vkGetShaderModuleCreateInfoIdentifierEXT(
#endif
+// VK_EXT_rasterization_order_attachment_access is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_rasterization_order_attachment_access 1
#define VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION 1
#define VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME "VK_EXT_rasterization_order_attachment_access"
+// VK_NV_optical_flow is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_optical_flow 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkOpticalFlowSessionNV)
#define VK_NV_OPTICAL_FLOW_SPEC_VERSION 1
@@ -16437,8 +18802,9 @@ VKAPI_ATTR void VKAPI_CALL vkCmdOpticalFlowExecuteNV(
#endif
+// VK_EXT_legacy_dithering is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_legacy_dithering 1
-#define VK_EXT_LEGACY_DITHERING_SPEC_VERSION 1
+#define VK_EXT_LEGACY_DITHERING_SPEC_VERSION 2
#define VK_EXT_LEGACY_DITHERING_EXTENSION_NAME "VK_EXT_legacy_dithering"
typedef struct VkPhysicalDeviceLegacyDitheringFeaturesEXT {
VkStructureType sType;
@@ -16448,6 +18814,7 @@ typedef struct VkPhysicalDeviceLegacyDitheringFeaturesEXT {
+// VK_EXT_pipeline_protected_access is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_pipeline_protected_access 1
#define VK_EXT_PIPELINE_PROTECTED_ACCESS_SPEC_VERSION 1
#define VK_EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME "VK_EXT_pipeline_protected_access"
@@ -16459,6 +18826,54 @@ typedef struct VkPhysicalDevicePipelineProtectedAccessFeaturesEXT {
+// VK_AMD_anti_lag is a preprocessor guard. Do not pass it to API calls.
+#define VK_AMD_anti_lag 1
+#define VK_AMD_ANTI_LAG_SPEC_VERSION 1
+#define VK_AMD_ANTI_LAG_EXTENSION_NAME "VK_AMD_anti_lag"
+
+typedef enum VkAntiLagModeAMD {
+ VK_ANTI_LAG_MODE_DRIVER_CONTROL_AMD = 0,
+ VK_ANTI_LAG_MODE_ON_AMD = 1,
+ VK_ANTI_LAG_MODE_OFF_AMD = 2,
+ VK_ANTI_LAG_MODE_MAX_ENUM_AMD = 0x7FFFFFFF
+} VkAntiLagModeAMD;
+
+typedef enum VkAntiLagStageAMD {
+ VK_ANTI_LAG_STAGE_INPUT_AMD = 0,
+ VK_ANTI_LAG_STAGE_PRESENT_AMD = 1,
+ VK_ANTI_LAG_STAGE_MAX_ENUM_AMD = 0x7FFFFFFF
+} VkAntiLagStageAMD;
+typedef struct VkPhysicalDeviceAntiLagFeaturesAMD {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 antiLag;
+} VkPhysicalDeviceAntiLagFeaturesAMD;
+
+typedef struct VkAntiLagPresentationInfoAMD {
+ VkStructureType sType;
+ void* pNext;
+ VkAntiLagStageAMD stage;
+ uint64_t frameIndex;
+} VkAntiLagPresentationInfoAMD;
+
+typedef struct VkAntiLagDataAMD {
+ VkStructureType sType;
+ const void* pNext;
+ VkAntiLagModeAMD mode;
+ uint32_t maxFPS;
+ const VkAntiLagPresentationInfoAMD* pPresentationInfo;
+} VkAntiLagDataAMD;
+
+typedef void (VKAPI_PTR *PFN_vkAntiLagUpdateAMD)(VkDevice device, const VkAntiLagDataAMD* pData);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkAntiLagUpdateAMD(
+ VkDevice device,
+ const VkAntiLagDataAMD* pData);
+#endif
+
+
+// VK_EXT_shader_object is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_shader_object 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderEXT)
#define VK_EXT_SHADER_OBJECT_SPEC_VERSION 1
@@ -16470,6 +18885,12 @@ typedef enum VkShaderCodeTypeEXT {
VK_SHADER_CODE_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
} VkShaderCodeTypeEXT;
+typedef enum VkDepthClampModeEXT {
+ VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT = 0,
+ VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT = 1,
+ VK_DEPTH_CLAMP_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDepthClampModeEXT;
+
typedef enum VkShaderCreateFlagBitsEXT {
VK_SHADER_CREATE_LINK_STAGE_BIT_EXT = 0x00000001,
VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 0x00000002,
@@ -16478,6 +18899,7 @@ typedef enum VkShaderCreateFlagBitsEXT {
VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT = 0x00000010,
VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT = 0x00000020,
VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00000040,
+ VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT = 0x00000080,
VK_SHADER_CREATE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
} VkShaderCreateFlagBitsEXT;
typedef VkFlags VkShaderCreateFlagsEXT;
@@ -16513,10 +18935,16 @@ typedef struct VkShaderCreateInfoEXT {
typedef VkPipelineShaderStageRequiredSubgroupSizeCreateInfo VkShaderRequiredSubgroupSizeCreateInfoEXT;
+typedef struct VkDepthClampRangeEXT {
+ float minDepthClamp;
+ float maxDepthClamp;
+} VkDepthClampRangeEXT;
+
typedef VkResult (VKAPI_PTR *PFN_vkCreateShadersEXT)(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders);
typedef void (VKAPI_PTR *PFN_vkDestroyShaderEXT)(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator);
typedef VkResult (VKAPI_PTR *PFN_vkGetShaderBinaryDataEXT)(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData);
typedef void (VKAPI_PTR *PFN_vkCmdBindShadersEXT)(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDepthClampRangeEXT)(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateShadersEXT(
@@ -16542,9 +18970,15 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBindShadersEXT(
uint32_t stageCount,
const VkShaderStageFlagBits* pStages,
const VkShaderEXT* pShaders);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClampRangeEXT(
+ VkCommandBuffer commandBuffer,
+ VkDepthClampModeEXT depthClampMode,
+ const VkDepthClampRangeEXT* pDepthClampRange);
#endif
+// VK_QCOM_tile_properties is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_tile_properties 1
#define VK_QCOM_TILE_PROPERTIES_SPEC_VERSION 1
#define VK_QCOM_TILE_PROPERTIES_EXTENSION_NAME "VK_QCOM_tile_properties"
@@ -16579,6 +19013,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDynamicRenderingTilePropertiesQCOM(
#endif
+// VK_SEC_amigo_profiling is a preprocessor guard. Do not pass it to API calls.
#define VK_SEC_amigo_profiling 1
#define VK_SEC_AMIGO_PROFILING_SPEC_VERSION 1
#define VK_SEC_AMIGO_PROFILING_EXTENSION_NAME "VK_SEC_amigo_profiling"
@@ -16597,6 +19032,7 @@ typedef struct VkAmigoProfilingSubmitInfoSEC {
+// VK_QCOM_multiview_per_view_viewports is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_multiview_per_view_viewports 1
#define VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_SPEC_VERSION 1
#define VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_EXTENSION_NAME "VK_QCOM_multiview_per_view_viewports"
@@ -16608,6 +19044,7 @@ typedef struct VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM {
+// VK_NV_ray_tracing_invocation_reorder is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_ray_tracing_invocation_reorder 1
#define VK_NV_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION 1
#define VK_NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME "VK_NV_ray_tracing_invocation_reorder"
@@ -16631,11 +19068,84 @@ typedef struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV {
+// VK_NV_extended_sparse_address_space is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_extended_sparse_address_space 1
+#define VK_NV_EXTENDED_SPARSE_ADDRESS_SPACE_SPEC_VERSION 1
+#define VK_NV_EXTENDED_SPARSE_ADDRESS_SPACE_EXTENSION_NAME "VK_NV_extended_sparse_address_space"
+typedef struct VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 extendedSparseAddressSpace;
+} VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV;
+
+typedef struct VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkDeviceSize extendedSparseAddressSpaceSize;
+ VkImageUsageFlags extendedSparseImageUsageFlags;
+ VkBufferUsageFlags extendedSparseBufferUsageFlags;
+} VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV;
+
+
+
+// VK_EXT_mutable_descriptor_type is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_mutable_descriptor_type 1
#define VK_EXT_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION 1
#define VK_EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME "VK_EXT_mutable_descriptor_type"
+// VK_EXT_legacy_vertex_attributes is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_legacy_vertex_attributes 1
+#define VK_EXT_LEGACY_VERTEX_ATTRIBUTES_SPEC_VERSION 1
+#define VK_EXT_LEGACY_VERTEX_ATTRIBUTES_EXTENSION_NAME "VK_EXT_legacy_vertex_attributes"
+typedef struct VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 legacyVertexAttributes;
+} VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT;
+
+typedef struct VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 nativeUnalignedPerformance;
+} VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT;
+
+
+
+// VK_EXT_layer_settings is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_layer_settings 1
+#define VK_EXT_LAYER_SETTINGS_SPEC_VERSION 2
+#define VK_EXT_LAYER_SETTINGS_EXTENSION_NAME "VK_EXT_layer_settings"
+
+typedef enum VkLayerSettingTypeEXT {
+ VK_LAYER_SETTING_TYPE_BOOL32_EXT = 0,
+ VK_LAYER_SETTING_TYPE_INT32_EXT = 1,
+ VK_LAYER_SETTING_TYPE_INT64_EXT = 2,
+ VK_LAYER_SETTING_TYPE_UINT32_EXT = 3,
+ VK_LAYER_SETTING_TYPE_UINT64_EXT = 4,
+ VK_LAYER_SETTING_TYPE_FLOAT32_EXT = 5,
+ VK_LAYER_SETTING_TYPE_FLOAT64_EXT = 6,
+ VK_LAYER_SETTING_TYPE_STRING_EXT = 7,
+ VK_LAYER_SETTING_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkLayerSettingTypeEXT;
+typedef struct VkLayerSettingEXT {
+ const char* pLayerName;
+ const char* pSettingName;
+ VkLayerSettingTypeEXT type;
+ uint32_t valueCount;
+ const void* pValues;
+} VkLayerSettingEXT;
+
+typedef struct VkLayerSettingsCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t settingCount;
+ const VkLayerSettingEXT* pSettings;
+} VkLayerSettingsCreateInfoEXT;
+
+
+
+// VK_ARM_shader_core_builtins is a preprocessor guard. Do not pass it to API calls.
#define VK_ARM_shader_core_builtins 1
#define VK_ARM_SHADER_CORE_BUILTINS_SPEC_VERSION 2
#define VK_ARM_SHADER_CORE_BUILTINS_EXTENSION_NAME "VK_ARM_shader_core_builtins"
@@ -16655,6 +19165,7 @@ typedef struct VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM {
+// VK_EXT_pipeline_library_group_handles is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_pipeline_library_group_handles 1
#define VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_SPEC_VERSION 1
#define VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_EXTENSION_NAME "VK_EXT_pipeline_library_group_handles"
@@ -16666,6 +19177,151 @@ typedef struct VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT {
+// VK_EXT_dynamic_rendering_unused_attachments is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_dynamic_rendering_unused_attachments 1
+#define VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_SPEC_VERSION 1
+#define VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME "VK_EXT_dynamic_rendering_unused_attachments"
+typedef struct VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 dynamicRenderingUnusedAttachments;
+} VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT;
+
+
+
+// VK_NV_low_latency2 is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_low_latency2 1
+#define VK_NV_LOW_LATENCY_2_SPEC_VERSION 2
+#define VK_NV_LOW_LATENCY_2_EXTENSION_NAME "VK_NV_low_latency2"
+
+typedef enum VkLatencyMarkerNV {
+ VK_LATENCY_MARKER_SIMULATION_START_NV = 0,
+ VK_LATENCY_MARKER_SIMULATION_END_NV = 1,
+ VK_LATENCY_MARKER_RENDERSUBMIT_START_NV = 2,
+ VK_LATENCY_MARKER_RENDERSUBMIT_END_NV = 3,
+ VK_LATENCY_MARKER_PRESENT_START_NV = 4,
+ VK_LATENCY_MARKER_PRESENT_END_NV = 5,
+ VK_LATENCY_MARKER_INPUT_SAMPLE_NV = 6,
+ VK_LATENCY_MARKER_TRIGGER_FLASH_NV = 7,
+ VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_START_NV = 8,
+ VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_END_NV = 9,
+ VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_START_NV = 10,
+ VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_END_NV = 11,
+ VK_LATENCY_MARKER_MAX_ENUM_NV = 0x7FFFFFFF
+} VkLatencyMarkerNV;
+
+typedef enum VkOutOfBandQueueTypeNV {
+ VK_OUT_OF_BAND_QUEUE_TYPE_RENDER_NV = 0,
+ VK_OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV = 1,
+ VK_OUT_OF_BAND_QUEUE_TYPE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkOutOfBandQueueTypeNV;
+typedef struct VkLatencySleepModeInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 lowLatencyMode;
+ VkBool32 lowLatencyBoost;
+ uint32_t minimumIntervalUs;
+} VkLatencySleepModeInfoNV;
+
+typedef struct VkLatencySleepInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkSemaphore signalSemaphore;
+ uint64_t value;
+} VkLatencySleepInfoNV;
+
+typedef struct VkSetLatencyMarkerInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ uint64_t presentID;
+ VkLatencyMarkerNV marker;
+} VkSetLatencyMarkerInfoNV;
+
+typedef struct VkLatencyTimingsFrameReportNV {
+ VkStructureType sType;
+ const void* pNext;
+ uint64_t presentID;
+ uint64_t inputSampleTimeUs;
+ uint64_t simStartTimeUs;
+ uint64_t simEndTimeUs;
+ uint64_t renderSubmitStartTimeUs;
+ uint64_t renderSubmitEndTimeUs;
+ uint64_t presentStartTimeUs;
+ uint64_t presentEndTimeUs;
+ uint64_t driverStartTimeUs;
+ uint64_t driverEndTimeUs;
+ uint64_t osRenderQueueStartTimeUs;
+ uint64_t osRenderQueueEndTimeUs;
+ uint64_t gpuRenderStartTimeUs;
+ uint64_t gpuRenderEndTimeUs;
+} VkLatencyTimingsFrameReportNV;
+
+typedef struct VkGetLatencyMarkerInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t timingCount;
+ VkLatencyTimingsFrameReportNV* pTimings;
+} VkGetLatencyMarkerInfoNV;
+
+typedef struct VkLatencySubmissionPresentIdNV {
+ VkStructureType sType;
+ const void* pNext;
+ uint64_t presentID;
+} VkLatencySubmissionPresentIdNV;
+
+typedef struct VkSwapchainLatencyCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 latencyModeEnable;
+} VkSwapchainLatencyCreateInfoNV;
+
+typedef struct VkOutOfBandQueueTypeInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkOutOfBandQueueTypeNV queueType;
+} VkOutOfBandQueueTypeInfoNV;
+
+typedef struct VkLatencySurfaceCapabilitiesNV {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t presentModeCount;
+ VkPresentModeKHR* pPresentModes;
+} VkLatencySurfaceCapabilitiesNV;
+
+typedef VkResult (VKAPI_PTR *PFN_vkSetLatencySleepModeNV)(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkLatencySleepNV)(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo);
+typedef void (VKAPI_PTR *PFN_vkSetLatencyMarkerNV)(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo);
+typedef void (VKAPI_PTR *PFN_vkGetLatencyTimingsNV)(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo);
+typedef void (VKAPI_PTR *PFN_vkQueueNotifyOutOfBandNV)(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkSetLatencySleepModeNV(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ const VkLatencySleepModeInfoNV* pSleepModeInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkLatencySleepNV(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ const VkLatencySleepInfoNV* pSleepInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkSetLatencyMarkerNV(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkGetLatencyTimingsNV(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkQueueNotifyOutOfBandNV(
+ VkQueue queue,
+ const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo);
+#endif
+
+
+// VK_QCOM_multiview_per_view_render_areas is a preprocessor guard. Do not pass it to API calls.
#define VK_QCOM_multiview_per_view_render_areas 1
#define VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_SPEC_VERSION 1
#define VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_EXTENSION_NAME "VK_QCOM_multiview_per_view_render_areas"
@@ -16684,6 +19340,114 @@ typedef struct VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM {
+// VK_NV_per_stage_descriptor_set is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_per_stage_descriptor_set 1
+#define VK_NV_PER_STAGE_DESCRIPTOR_SET_SPEC_VERSION 1
+#define VK_NV_PER_STAGE_DESCRIPTOR_SET_EXTENSION_NAME "VK_NV_per_stage_descriptor_set"
+typedef struct VkPhysicalDevicePerStageDescriptorSetFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 perStageDescriptorSet;
+ VkBool32 dynamicPipelineLayout;
+} VkPhysicalDevicePerStageDescriptorSetFeaturesNV;
+
+
+
+// VK_QCOM_image_processing2 is a preprocessor guard. Do not pass it to API calls.
+#define VK_QCOM_image_processing2 1
+#define VK_QCOM_IMAGE_PROCESSING_2_SPEC_VERSION 1
+#define VK_QCOM_IMAGE_PROCESSING_2_EXTENSION_NAME "VK_QCOM_image_processing2"
+
+typedef enum VkBlockMatchWindowCompareModeQCOM {
+ VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM = 0,
+ VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM = 1,
+ VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_ENUM_QCOM = 0x7FFFFFFF
+} VkBlockMatchWindowCompareModeQCOM;
+typedef struct VkPhysicalDeviceImageProcessing2FeaturesQCOM {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 textureBlockMatch2;
+} VkPhysicalDeviceImageProcessing2FeaturesQCOM;
+
+typedef struct VkPhysicalDeviceImageProcessing2PropertiesQCOM {
+ VkStructureType sType;
+ void* pNext;
+ VkExtent2D maxBlockMatchWindow;
+} VkPhysicalDeviceImageProcessing2PropertiesQCOM;
+
+typedef struct VkSamplerBlockMatchWindowCreateInfoQCOM {
+ VkStructureType sType;
+ const void* pNext;
+ VkExtent2D windowExtent;
+ VkBlockMatchWindowCompareModeQCOM windowCompareMode;
+} VkSamplerBlockMatchWindowCreateInfoQCOM;
+
+
+
+// VK_QCOM_filter_cubic_weights is a preprocessor guard. Do not pass it to API calls.
+#define VK_QCOM_filter_cubic_weights 1
+#define VK_QCOM_FILTER_CUBIC_WEIGHTS_SPEC_VERSION 1
+#define VK_QCOM_FILTER_CUBIC_WEIGHTS_EXTENSION_NAME "VK_QCOM_filter_cubic_weights"
+
+typedef enum VkCubicFilterWeightsQCOM {
+ VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM = 0,
+ VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM = 1,
+ VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM = 2,
+ VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM = 3,
+ VK_CUBIC_FILTER_WEIGHTS_MAX_ENUM_QCOM = 0x7FFFFFFF
+} VkCubicFilterWeightsQCOM;
+typedef struct VkPhysicalDeviceCubicWeightsFeaturesQCOM {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 selectableCubicWeights;
+} VkPhysicalDeviceCubicWeightsFeaturesQCOM;
+
+typedef struct VkSamplerCubicWeightsCreateInfoQCOM {
+ VkStructureType sType;
+ const void* pNext;
+ VkCubicFilterWeightsQCOM cubicWeights;
+} VkSamplerCubicWeightsCreateInfoQCOM;
+
+typedef struct VkBlitImageCubicWeightsInfoQCOM {
+ VkStructureType sType;
+ const void* pNext;
+ VkCubicFilterWeightsQCOM cubicWeights;
+} VkBlitImageCubicWeightsInfoQCOM;
+
+
+
+// VK_QCOM_ycbcr_degamma is a preprocessor guard. Do not pass it to API calls.
+#define VK_QCOM_ycbcr_degamma 1
+#define VK_QCOM_YCBCR_DEGAMMA_SPEC_VERSION 1
+#define VK_QCOM_YCBCR_DEGAMMA_EXTENSION_NAME "VK_QCOM_ycbcr_degamma"
+typedef struct VkPhysicalDeviceYcbcrDegammaFeaturesQCOM {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 ycbcrDegamma;
+} VkPhysicalDeviceYcbcrDegammaFeaturesQCOM;
+
+typedef struct VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 enableYDegamma;
+ VkBool32 enableCbCrDegamma;
+} VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM;
+
+
+
+// VK_QCOM_filter_cubic_clamp is a preprocessor guard. Do not pass it to API calls.
+#define VK_QCOM_filter_cubic_clamp 1
+#define VK_QCOM_FILTER_CUBIC_CLAMP_SPEC_VERSION 1
+#define VK_QCOM_FILTER_CUBIC_CLAMP_EXTENSION_NAME "VK_QCOM_filter_cubic_clamp"
+typedef struct VkPhysicalDeviceCubicClampFeaturesQCOM {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 cubicRangeClamp;
+} VkPhysicalDeviceCubicClampFeaturesQCOM;
+
+
+
+// VK_EXT_attachment_feedback_loop_dynamic_state is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_attachment_feedback_loop_dynamic_state 1
#define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_SPEC_VERSION 1
#define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_EXTENSION_NAME "VK_EXT_attachment_feedback_loop_dynamic_state"
@@ -16702,6 +19466,420 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetAttachmentFeedbackLoopEnableEXT(
#endif
+// VK_MSFT_layered_driver is a preprocessor guard. Do not pass it to API calls.
+#define VK_MSFT_layered_driver 1
+#define VK_MSFT_LAYERED_DRIVER_SPEC_VERSION 1
+#define VK_MSFT_LAYERED_DRIVER_EXTENSION_NAME "VK_MSFT_layered_driver"
+
+typedef enum VkLayeredDriverUnderlyingApiMSFT {
+ VK_LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT = 0,
+ VK_LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT = 1,
+ VK_LAYERED_DRIVER_UNDERLYING_API_MAX_ENUM_MSFT = 0x7FFFFFFF
+} VkLayeredDriverUnderlyingApiMSFT;
+typedef struct VkPhysicalDeviceLayeredDriverPropertiesMSFT {
+ VkStructureType sType;
+ void* pNext;
+ VkLayeredDriverUnderlyingApiMSFT underlyingAPI;
+} VkPhysicalDeviceLayeredDriverPropertiesMSFT;
+
+
+
+// VK_NV_descriptor_pool_overallocation is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_descriptor_pool_overallocation 1
+#define VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_SPEC_VERSION 1
+#define VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME "VK_NV_descriptor_pool_overallocation"
+typedef struct VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 descriptorPoolOverallocation;
+} VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV;
+
+
+
+// VK_NV_raw_access_chains is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_raw_access_chains 1
+#define VK_NV_RAW_ACCESS_CHAINS_SPEC_VERSION 1
+#define VK_NV_RAW_ACCESS_CHAINS_EXTENSION_NAME "VK_NV_raw_access_chains"
+typedef struct VkPhysicalDeviceRawAccessChainsFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderRawAccessChains;
+} VkPhysicalDeviceRawAccessChainsFeaturesNV;
+
+
+
+// VK_NV_command_buffer_inheritance is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_command_buffer_inheritance 1
+#define VK_NV_COMMAND_BUFFER_INHERITANCE_SPEC_VERSION 1
+#define VK_NV_COMMAND_BUFFER_INHERITANCE_EXTENSION_NAME "VK_NV_command_buffer_inheritance"
+typedef struct VkPhysicalDeviceCommandBufferInheritanceFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 commandBufferInheritance;
+} VkPhysicalDeviceCommandBufferInheritanceFeaturesNV;
+
+
+
+// VK_NV_shader_atomic_float16_vector is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_shader_atomic_float16_vector 1
+#define VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_SPEC_VERSION 1
+#define VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_EXTENSION_NAME "VK_NV_shader_atomic_float16_vector"
+typedef struct VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderFloat16VectorAtomics;
+} VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV;
+
+
+
+// VK_EXT_shader_replicated_composites is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_shader_replicated_composites 1
+#define VK_EXT_SHADER_REPLICATED_COMPOSITES_SPEC_VERSION 1
+#define VK_EXT_SHADER_REPLICATED_COMPOSITES_EXTENSION_NAME "VK_EXT_shader_replicated_composites"
+typedef struct VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderReplicatedComposites;
+} VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT;
+
+
+
+// VK_NV_ray_tracing_validation is a preprocessor guard. Do not pass it to API calls.
+#define VK_NV_ray_tracing_validation 1
+#define VK_NV_RAY_TRACING_VALIDATION_SPEC_VERSION 1
+#define VK_NV_RAY_TRACING_VALIDATION_EXTENSION_NAME "VK_NV_ray_tracing_validation"
+typedef struct VkPhysicalDeviceRayTracingValidationFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 rayTracingValidation;
+} VkPhysicalDeviceRayTracingValidationFeaturesNV;
+
+
+
+// VK_EXT_device_generated_commands is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_device_generated_commands 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectExecutionSetEXT)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutEXT)
+#define VK_EXT_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1
+#define VK_EXT_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_EXT_device_generated_commands"
+
+typedef enum VkIndirectExecutionSetInfoTypeEXT {
+ VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT = 0,
+ VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT = 1,
+ VK_INDIRECT_EXECUTION_SET_INFO_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkIndirectExecutionSetInfoTypeEXT;
+
+typedef enum VkIndirectCommandsTokenTypeEXT {
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT = 0,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT = 1,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT = 2,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT = 3,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT = 4,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT = 5,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT = 6,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT = 7,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT = 8,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT = 9,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT = 1000202002,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT = 1000202003,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT = 1000328000,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT = 1000328001,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT = 1000386004,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkIndirectCommandsTokenTypeEXT;
+
+typedef enum VkIndirectCommandsInputModeFlagBitsEXT {
+ VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT = 0x00000001,
+ VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT = 0x00000002,
+ VK_INDIRECT_COMMANDS_INPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkIndirectCommandsInputModeFlagBitsEXT;
+typedef VkFlags VkIndirectCommandsInputModeFlagsEXT;
+
+typedef enum VkIndirectCommandsLayoutUsageFlagBitsEXT {
+ VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT = 0x00000001,
+ VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT = 0x00000002,
+ VK_INDIRECT_COMMANDS_LAYOUT_USAGE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkIndirectCommandsLayoutUsageFlagBitsEXT;
+typedef VkFlags VkIndirectCommandsLayoutUsageFlagsEXT;
+typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 deviceGeneratedCommands;
+ VkBool32 dynamicGeneratedPipelineLayout;
+} VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT;
+
+typedef struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxIndirectPipelineCount;
+ uint32_t maxIndirectShaderObjectCount;
+ uint32_t maxIndirectSequenceCount;
+ uint32_t maxIndirectCommandsTokenCount;
+ uint32_t maxIndirectCommandsTokenOffset;
+ uint32_t maxIndirectCommandsIndirectStride;
+ VkIndirectCommandsInputModeFlagsEXT supportedIndirectCommandsInputModes;
+ VkShaderStageFlags supportedIndirectCommandsShaderStages;
+ VkShaderStageFlags supportedIndirectCommandsShaderStagesPipelineBinding;
+ VkShaderStageFlags supportedIndirectCommandsShaderStagesShaderBinding;
+ VkBool32 deviceGeneratedCommandsTransformFeedback;
+ VkBool32 deviceGeneratedCommandsMultiDrawIndirectCount;
+} VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT;
+
+typedef struct VkGeneratedCommandsMemoryRequirementsInfoEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkIndirectExecutionSetEXT indirectExecutionSet;
+ VkIndirectCommandsLayoutEXT indirectCommandsLayout;
+ uint32_t maxSequenceCount;
+ uint32_t maxDrawCount;
+} VkGeneratedCommandsMemoryRequirementsInfoEXT;
+
+typedef struct VkIndirectExecutionSetPipelineInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipeline initialPipeline;
+ uint32_t maxPipelineCount;
+} VkIndirectExecutionSetPipelineInfoEXT;
+
+typedef struct VkIndirectExecutionSetShaderLayoutInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t setLayoutCount;
+ const VkDescriptorSetLayout* pSetLayouts;
+} VkIndirectExecutionSetShaderLayoutInfoEXT;
+
+typedef struct VkIndirectExecutionSetShaderInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t shaderCount;
+ const VkShaderEXT* pInitialShaders;
+ const VkIndirectExecutionSetShaderLayoutInfoEXT* pSetLayoutInfos;
+ uint32_t maxShaderCount;
+ uint32_t pushConstantRangeCount;
+ const VkPushConstantRange* pPushConstantRanges;
+} VkIndirectExecutionSetShaderInfoEXT;
+
+typedef union VkIndirectExecutionSetInfoEXT {
+ const VkIndirectExecutionSetPipelineInfoEXT* pPipelineInfo;
+ const VkIndirectExecutionSetShaderInfoEXT* pShaderInfo;
+} VkIndirectExecutionSetInfoEXT;
+
+typedef struct VkIndirectExecutionSetCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkIndirectExecutionSetInfoTypeEXT type;
+ VkIndirectExecutionSetInfoEXT info;
+} VkIndirectExecutionSetCreateInfoEXT;
+
+typedef struct VkGeneratedCommandsInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkShaderStageFlags shaderStages;
+ VkIndirectExecutionSetEXT indirectExecutionSet;
+ VkIndirectCommandsLayoutEXT indirectCommandsLayout;
+ VkDeviceAddress indirectAddress;
+ VkDeviceSize indirectAddressSize;
+ VkDeviceAddress preprocessAddress;
+ VkDeviceSize preprocessSize;
+ uint32_t maxSequenceCount;
+ VkDeviceAddress sequenceCountAddress;
+ uint32_t maxDrawCount;
+} VkGeneratedCommandsInfoEXT;
+
+typedef struct VkWriteIndirectExecutionSetPipelineEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t index;
+ VkPipeline pipeline;
+} VkWriteIndirectExecutionSetPipelineEXT;
+
+typedef struct VkIndirectCommandsPushConstantTokenEXT {
+ VkPushConstantRange updateRange;
+} VkIndirectCommandsPushConstantTokenEXT;
+
+typedef struct VkIndirectCommandsVertexBufferTokenEXT {
+ uint32_t vertexBindingUnit;
+} VkIndirectCommandsVertexBufferTokenEXT;
+
+typedef struct VkIndirectCommandsIndexBufferTokenEXT {
+ VkIndirectCommandsInputModeFlagBitsEXT mode;
+} VkIndirectCommandsIndexBufferTokenEXT;
+
+typedef struct VkIndirectCommandsExecutionSetTokenEXT {
+ VkIndirectExecutionSetInfoTypeEXT type;
+ VkShaderStageFlags shaderStages;
+} VkIndirectCommandsExecutionSetTokenEXT;
+
+typedef union VkIndirectCommandsTokenDataEXT {
+ const VkIndirectCommandsPushConstantTokenEXT* pPushConstant;
+ const VkIndirectCommandsVertexBufferTokenEXT* pVertexBuffer;
+ const VkIndirectCommandsIndexBufferTokenEXT* pIndexBuffer;
+ const VkIndirectCommandsExecutionSetTokenEXT* pExecutionSet;
+} VkIndirectCommandsTokenDataEXT;
+
+typedef struct VkIndirectCommandsLayoutTokenEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkIndirectCommandsTokenTypeEXT type;
+ VkIndirectCommandsTokenDataEXT data;
+ uint32_t offset;
+} VkIndirectCommandsLayoutTokenEXT;
+
+typedef struct VkIndirectCommandsLayoutCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkIndirectCommandsLayoutUsageFlagsEXT flags;
+ VkShaderStageFlags shaderStages;
+ uint32_t indirectStride;
+ VkPipelineLayout pipelineLayout;
+ uint32_t tokenCount;
+ const VkIndirectCommandsLayoutTokenEXT* pTokens;
+} VkIndirectCommandsLayoutCreateInfoEXT;
+
+typedef struct VkDrawIndirectCountIndirectCommandEXT {
+ VkDeviceAddress bufferAddress;
+ uint32_t stride;
+ uint32_t commandCount;
+} VkDrawIndirectCountIndirectCommandEXT;
+
+typedef struct VkBindVertexBufferIndirectCommandEXT {
+ VkDeviceAddress bufferAddress;
+ uint32_t size;
+ uint32_t stride;
+} VkBindVertexBufferIndirectCommandEXT;
+
+typedef struct VkBindIndexBufferIndirectCommandEXT {
+ VkDeviceAddress bufferAddress;
+ uint32_t size;
+ VkIndexType indexType;
+} VkBindIndexBufferIndirectCommandEXT;
+
+typedef struct VkGeneratedCommandsPipelineInfoEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkPipeline pipeline;
+} VkGeneratedCommandsPipelineInfoEXT;
+
+typedef struct VkGeneratedCommandsShaderInfoEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t shaderCount;
+ const VkShaderEXT* pShaders;
+} VkGeneratedCommandsShaderInfoEXT;
+
+typedef struct VkWriteIndirectExecutionSetShaderEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t index;
+ VkShaderEXT shader;
+} VkWriteIndirectExecutionSetShaderEXT;
+
+typedef void (VKAPI_PTR *PFN_vkGetGeneratedCommandsMemoryRequirementsEXT)(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, VkMemoryRequirements2* pMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkCmdPreprocessGeneratedCommandsEXT)(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer);
+typedef void (VKAPI_PTR *PFN_vkCmdExecuteGeneratedCommandsEXT)(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutEXT)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout);
+typedef void (VKAPI_PTR *PFN_vkDestroyIndirectCommandsLayoutEXT)(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectExecutionSetEXT)(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectExecutionSetEXT* pIndirectExecutionSet);
+typedef void (VKAPI_PTR *PFN_vkDestroyIndirectExecutionSetEXT)(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkUpdateIndirectExecutionSetPipelineEXT)(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites);
+typedef void (VKAPI_PTR *PFN_vkUpdateIndirectExecutionSetShaderEXT)(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetGeneratedCommandsMemoryRequirementsEXT(
+ VkDevice device,
+ const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo,
+ VkMemoryRequirements2* pMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdPreprocessGeneratedCommandsEXT(
+ VkCommandBuffer commandBuffer,
+ const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo,
+ VkCommandBuffer stateCommandBuffer);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdExecuteGeneratedCommandsEXT(
+ VkCommandBuffer commandBuffer,
+ VkBool32 isPreprocessed,
+ const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutEXT(
+ VkDevice device,
+ const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutEXT(
+ VkDevice device,
+ VkIndirectCommandsLayoutEXT indirectCommandsLayout,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectExecutionSetEXT(
+ VkDevice device,
+ const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkIndirectExecutionSetEXT* pIndirectExecutionSet);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectExecutionSetEXT(
+ VkDevice device,
+ VkIndirectExecutionSetEXT indirectExecutionSet,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkUpdateIndirectExecutionSetPipelineEXT(
+ VkDevice device,
+ VkIndirectExecutionSetEXT indirectExecutionSet,
+ uint32_t executionSetWriteCount,
+ const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites);
+
+VKAPI_ATTR void VKAPI_CALL vkUpdateIndirectExecutionSetShaderEXT(
+ VkDevice device,
+ VkIndirectExecutionSetEXT indirectExecutionSet,
+ uint32_t executionSetWriteCount,
+ const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites);
+#endif
+
+
+// VK_MESA_image_alignment_control is a preprocessor guard. Do not pass it to API calls.
+#define VK_MESA_image_alignment_control 1
+#define VK_MESA_IMAGE_ALIGNMENT_CONTROL_SPEC_VERSION 1
+#define VK_MESA_IMAGE_ALIGNMENT_CONTROL_EXTENSION_NAME "VK_MESA_image_alignment_control"
+typedef struct VkPhysicalDeviceImageAlignmentControlFeaturesMESA {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 imageAlignmentControl;
+} VkPhysicalDeviceImageAlignmentControlFeaturesMESA;
+
+typedef struct VkPhysicalDeviceImageAlignmentControlPropertiesMESA {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t supportedImageAlignmentMask;
+} VkPhysicalDeviceImageAlignmentControlPropertiesMESA;
+
+typedef struct VkImageAlignmentControlCreateInfoMESA {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t maximumRequestedAlignment;
+} VkImageAlignmentControlCreateInfoMESA;
+
+
+
+// VK_EXT_depth_clamp_control is a preprocessor guard. Do not pass it to API calls.
+#define VK_EXT_depth_clamp_control 1
+#define VK_EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION 1
+#define VK_EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME "VK_EXT_depth_clamp_control"
+typedef struct VkPhysicalDeviceDepthClampControlFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 depthClampControl;
+} VkPhysicalDeviceDepthClampControlFeaturesEXT;
+
+typedef struct VkPipelineViewportDepthClampControlCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDepthClampModeEXT depthClampMode;
+ const VkDepthClampRangeEXT* pDepthClampRange;
+} VkPipelineViewportDepthClampControlCreateInfoEXT;
+
+
+
+// VK_KHR_acceleration_structure is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_acceleration_structure 1
#define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 13
#define VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_KHR_acceleration_structure"
@@ -16977,6 +20155,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureBuildSizesKHR(
#endif
+// VK_KHR_ray_tracing_pipeline is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_ray_tracing_pipeline 1
#define VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION 1
#define VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME "VK_KHR_ray_tracing_pipeline"
@@ -17113,6 +20292,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetRayTracingPipelineStackSizeKHR(
#endif
+// VK_KHR_ray_query is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_ray_query 1
#define VK_KHR_RAY_QUERY_SPEC_VERSION 1
#define VK_KHR_RAY_QUERY_EXTENSION_NAME "VK_KHR_ray_query"
@@ -17124,6 +20304,7 @@ typedef struct VkPhysicalDeviceRayQueryFeaturesKHR {
+// VK_EXT_mesh_shader is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_mesh_shader 1
#define VK_EXT_MESH_SHADER_SPEC_VERSION 1
#define VK_EXT_MESH_SHADER_EXTENSION_NAME "VK_EXT_mesh_shader"
diff --git a/vendor/vulkan/_gen/vulkan_ios.h b/vendor/vulkan/_gen/vulkan_ios.h
index 8c6d9e72a..22ed2c039 100644
--- a/vendor/vulkan/_gen/vulkan_ios.h
+++ b/vendor/vulkan/_gen/vulkan_ios.h
@@ -2,7 +2,7 @@
#define VULKAN_IOS_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,6 +19,7 @@ extern "C" {
+// VK_MVK_ios_surface is a preprocessor guard. Do not pass it to API calls.
#define VK_MVK_ios_surface 1
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 3
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
diff --git a/vendor/vulkan/_gen/vulkan_macos.h b/vendor/vulkan/_gen/vulkan_macos.h
index 3310e11ab..a7f5613a0 100644
--- a/vendor/vulkan/_gen/vulkan_macos.h
+++ b/vendor/vulkan/_gen/vulkan_macos.h
@@ -2,7 +2,7 @@
#define VULKAN_MACOS_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,6 +19,7 @@ extern "C" {
+// VK_MVK_macos_surface is a preprocessor guard. Do not pass it to API calls.
#define VK_MVK_macos_surface 1
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 3
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
diff --git a/vendor/vulkan/_gen/vulkan_metal.h b/vendor/vulkan/_gen/vulkan_metal.h
index 7127651c1..89a557490 100644
--- a/vendor/vulkan/_gen/vulkan_metal.h
+++ b/vendor/vulkan/_gen/vulkan_metal.h
@@ -2,7 +2,7 @@
#define VULKAN_METAL_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,6 +19,7 @@ extern "C" {
+// VK_EXT_metal_surface is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_metal_surface 1
#ifdef __OBJC__
@class CAMetalLayer;
@@ -47,31 +48,32 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
#endif
+// VK_EXT_metal_objects is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_metal_objects 1
#ifdef __OBJC__
@protocol MTLDevice;
-typedef id<MTLDevice> MTLDevice_id;
+typedef __unsafe_unretained id<MTLDevice> MTLDevice_id;
#else
typedef void* MTLDevice_id;
#endif
#ifdef __OBJC__
@protocol MTLCommandQueue;
-typedef id<MTLCommandQueue> MTLCommandQueue_id;
+typedef __unsafe_unretained id<MTLCommandQueue> MTLCommandQueue_id;
#else
typedef void* MTLCommandQueue_id;
#endif
#ifdef __OBJC__
@protocol MTLBuffer;
-typedef id<MTLBuffer> MTLBuffer_id;
+typedef __unsafe_unretained id<MTLBuffer> MTLBuffer_id;
#else
typedef void* MTLBuffer_id;
#endif
#ifdef __OBJC__
@protocol MTLTexture;
-typedef id<MTLTexture> MTLTexture_id;
+typedef __unsafe_unretained id<MTLTexture> MTLTexture_id;
#else
typedef void* MTLTexture_id;
#endif
@@ -79,12 +81,12 @@ typedef void* MTLTexture_id;
typedef struct __IOSurface* IOSurfaceRef;
#ifdef __OBJC__
@protocol MTLSharedEvent;
-typedef id<MTLSharedEvent> MTLSharedEvent_id;
+typedef __unsafe_unretained id<MTLSharedEvent> MTLSharedEvent_id;
#else
typedef void* MTLSharedEvent_id;
#endif
-#define VK_EXT_METAL_OBJECTS_SPEC_VERSION 1
+#define VK_EXT_METAL_OBJECTS_SPEC_VERSION 2
#define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects"
typedef enum VkExportMetalObjectTypeFlagBitsEXT {
diff --git a/vendor/vulkan/_gen/vulkan_video_codec_av1std.h b/vendor/vulkan/_gen/vulkan_video_codec_av1std.h
new file mode 100644
index 000000000..8ce283e8a
--- /dev/null
+++ b/vendor/vulkan/_gen/vulkan_video_codec_av1std.h
@@ -0,0 +1,392 @@
+#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_
+#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1
+
+/*
+** Copyright 2015-2024 The Khronos Group Inc.
+**
+** SPDX-License-Identifier: Apache-2.0
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+// vulkan_video_codec_av1std is a preprocessor guard. Do not pass it to API calls.
+#define vulkan_video_codec_av1std 1
+#include "vulkan_video_codecs_common.h"
+#define STD_VIDEO_AV1_NUM_REF_FRAMES 8
+#define STD_VIDEO_AV1_REFS_PER_FRAME 7
+#define STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME 8
+#define STD_VIDEO_AV1_MAX_TILE_COLS 64
+#define STD_VIDEO_AV1_MAX_TILE_ROWS 64
+#define STD_VIDEO_AV1_MAX_SEGMENTS 8
+#define STD_VIDEO_AV1_SEG_LVL_MAX 8
+#define STD_VIDEO_AV1_PRIMARY_REF_NONE 7
+#define STD_VIDEO_AV1_SELECT_INTEGER_MV 2
+#define STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS 2
+#define STD_VIDEO_AV1_SKIP_MODE_FRAMES 2
+#define STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS 4
+#define STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS 2
+#define STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS 8
+#define STD_VIDEO_AV1_MAX_NUM_PLANES 3
+#define STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS 6
+#define STD_VIDEO_AV1_MAX_NUM_Y_POINTS 14
+#define STD_VIDEO_AV1_MAX_NUM_CB_POINTS 10
+#define STD_VIDEO_AV1_MAX_NUM_CR_POINTS 10
+#define STD_VIDEO_AV1_MAX_NUM_POS_LUMA 24
+#define STD_VIDEO_AV1_MAX_NUM_POS_CHROMA 25
+
+typedef enum StdVideoAV1Profile {
+ STD_VIDEO_AV1_PROFILE_MAIN = 0,
+ STD_VIDEO_AV1_PROFILE_HIGH = 1,
+ STD_VIDEO_AV1_PROFILE_PROFESSIONAL = 2,
+ STD_VIDEO_AV1_PROFILE_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_PROFILE_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1Profile;
+
+typedef enum StdVideoAV1Level {
+ STD_VIDEO_AV1_LEVEL_2_0 = 0,
+ STD_VIDEO_AV1_LEVEL_2_1 = 1,
+ STD_VIDEO_AV1_LEVEL_2_2 = 2,
+ STD_VIDEO_AV1_LEVEL_2_3 = 3,
+ STD_VIDEO_AV1_LEVEL_3_0 = 4,
+ STD_VIDEO_AV1_LEVEL_3_1 = 5,
+ STD_VIDEO_AV1_LEVEL_3_2 = 6,
+ STD_VIDEO_AV1_LEVEL_3_3 = 7,
+ STD_VIDEO_AV1_LEVEL_4_0 = 8,
+ STD_VIDEO_AV1_LEVEL_4_1 = 9,
+ STD_VIDEO_AV1_LEVEL_4_2 = 10,
+ STD_VIDEO_AV1_LEVEL_4_3 = 11,
+ STD_VIDEO_AV1_LEVEL_5_0 = 12,
+ STD_VIDEO_AV1_LEVEL_5_1 = 13,
+ STD_VIDEO_AV1_LEVEL_5_2 = 14,
+ STD_VIDEO_AV1_LEVEL_5_3 = 15,
+ STD_VIDEO_AV1_LEVEL_6_0 = 16,
+ STD_VIDEO_AV1_LEVEL_6_1 = 17,
+ STD_VIDEO_AV1_LEVEL_6_2 = 18,
+ STD_VIDEO_AV1_LEVEL_6_3 = 19,
+ STD_VIDEO_AV1_LEVEL_7_0 = 20,
+ STD_VIDEO_AV1_LEVEL_7_1 = 21,
+ STD_VIDEO_AV1_LEVEL_7_2 = 22,
+ STD_VIDEO_AV1_LEVEL_7_3 = 23,
+ STD_VIDEO_AV1_LEVEL_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_LEVEL_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1Level;
+
+typedef enum StdVideoAV1FrameType {
+ STD_VIDEO_AV1_FRAME_TYPE_KEY = 0,
+ STD_VIDEO_AV1_FRAME_TYPE_INTER = 1,
+ STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY = 2,
+ STD_VIDEO_AV1_FRAME_TYPE_SWITCH = 3,
+ STD_VIDEO_AV1_FRAME_TYPE_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_FRAME_TYPE_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1FrameType;
+
+typedef enum StdVideoAV1ReferenceName {
+ STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME = 0,
+ STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME = 1,
+ STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME = 2,
+ STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME = 3,
+ STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME = 4,
+ STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME = 5,
+ STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME = 6,
+ STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME = 7,
+ STD_VIDEO_AV1_REFERENCE_NAME_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_REFERENCE_NAME_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1ReferenceName;
+
+typedef enum StdVideoAV1InterpolationFilter {
+ STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP = 0,
+ STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH = 1,
+ STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP = 2,
+ STD_VIDEO_AV1_INTERPOLATION_FILTER_BILINEAR = 3,
+ STD_VIDEO_AV1_INTERPOLATION_FILTER_SWITCHABLE = 4,
+ STD_VIDEO_AV1_INTERPOLATION_FILTER_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_INTERPOLATION_FILTER_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1InterpolationFilter;
+
+typedef enum StdVideoAV1TxMode {
+ STD_VIDEO_AV1_TX_MODE_ONLY_4X4 = 0,
+ STD_VIDEO_AV1_TX_MODE_LARGEST = 1,
+ STD_VIDEO_AV1_TX_MODE_SELECT = 2,
+ STD_VIDEO_AV1_TX_MODE_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_TX_MODE_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1TxMode;
+
+typedef enum StdVideoAV1FrameRestorationType {
+ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE = 0,
+ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER = 1,
+ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ = 2,
+ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE = 3,
+ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1FrameRestorationType;
+
+typedef enum StdVideoAV1ColorPrimaries {
+ STD_VIDEO_AV1_COLOR_PRIMARIES_BT_709 = 1,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED = 2,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_M = 4,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_B_G = 5,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_BT_601 = 6,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_240 = 7,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_GENERIC_FILM = 8,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_BT_2020 = 9,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_XYZ = 10,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_431 = 11,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432 = 12,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213 = 22,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_COLOR_PRIMARIES_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1ColorPrimaries;
+
+typedef enum StdVideoAV1TransferCharacteristics {
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_0 = 0,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_709 = 1,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_UNSPECIFIED = 2,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_3 = 3,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_M = 4,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_B_G = 5,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_601 = 6,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_240 = 7,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LINEAR = 8,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100 = 9,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100_SQRT10 = 10,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_IEC_61966 = 11,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_1361 = 12,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SRGB = 13,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_10_BIT = 14,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_12_BIT = 15,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_2084 = 16,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_428 = 17,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_HLG = 18,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1TransferCharacteristics;
+
+typedef enum StdVideoAV1MatrixCoefficients {
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_IDENTITY = 0,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_709 = 1,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_UNSPECIFIED = 2,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_RESERVED_3 = 3,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_FCC = 4,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_470_B_G = 5,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_601 = 6,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_240 = 7,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_YCGCO = 8,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_NCL = 9,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_CL = 10,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_2085 = 11,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_NCL = 12,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_CL = 13,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_ICTCP = 14,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_MATRIX_COEFFICIENTS_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1MatrixCoefficients;
+
+typedef enum StdVideoAV1ChromaSamplePosition {
+ STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_UNKNOWN = 0,
+ STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_VERTICAL = 1,
+ STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_COLOCATED = 2,
+ STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_RESERVED = 3,
+ STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_INVALID = 0x7FFFFFFF,
+ STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_MAX_ENUM = 0x7FFFFFFF
+} StdVideoAV1ChromaSamplePosition;
+typedef struct StdVideoAV1ColorConfigFlags {
+ uint32_t mono_chrome : 1;
+ uint32_t color_range : 1;
+ uint32_t separate_uv_delta_q : 1;
+ uint32_t color_description_present_flag : 1;
+ uint32_t reserved : 28;
+} StdVideoAV1ColorConfigFlags;
+
+typedef struct StdVideoAV1ColorConfig {
+ StdVideoAV1ColorConfigFlags flags;
+ uint8_t BitDepth;
+ uint8_t subsampling_x;
+ uint8_t subsampling_y;
+ uint8_t reserved1;
+ StdVideoAV1ColorPrimaries color_primaries;
+ StdVideoAV1TransferCharacteristics transfer_characteristics;
+ StdVideoAV1MatrixCoefficients matrix_coefficients;
+ StdVideoAV1ChromaSamplePosition chroma_sample_position;
+} StdVideoAV1ColorConfig;
+
+typedef struct StdVideoAV1TimingInfoFlags {
+ uint32_t equal_picture_interval : 1;
+ uint32_t reserved : 31;
+} StdVideoAV1TimingInfoFlags;
+
+typedef struct StdVideoAV1TimingInfo {
+ StdVideoAV1TimingInfoFlags flags;
+ uint32_t num_units_in_display_tick;
+ uint32_t time_scale;
+ uint32_t num_ticks_per_picture_minus_1;
+} StdVideoAV1TimingInfo;
+
+typedef struct StdVideoAV1LoopFilterFlags {
+ uint32_t loop_filter_delta_enabled : 1;
+ uint32_t loop_filter_delta_update : 1;
+ uint32_t reserved : 30;
+} StdVideoAV1LoopFilterFlags;
+
+typedef struct StdVideoAV1LoopFilter {
+ StdVideoAV1LoopFilterFlags flags;
+ uint8_t loop_filter_level[STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS];
+ uint8_t loop_filter_sharpness;
+ uint8_t update_ref_delta;
+ int8_t loop_filter_ref_deltas[STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME];
+ uint8_t update_mode_delta;
+ int8_t loop_filter_mode_deltas[STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS];
+} StdVideoAV1LoopFilter;
+
+typedef struct StdVideoAV1QuantizationFlags {
+ uint32_t using_qmatrix : 1;
+ uint32_t diff_uv_delta : 1;
+ uint32_t reserved : 30;
+} StdVideoAV1QuantizationFlags;
+
+typedef struct StdVideoAV1Quantization {
+ StdVideoAV1QuantizationFlags flags;
+ uint8_t base_q_idx;
+ int8_t DeltaQYDc;
+ int8_t DeltaQUDc;
+ int8_t DeltaQUAc;
+ int8_t DeltaQVDc;
+ int8_t DeltaQVAc;
+ uint8_t qm_y;
+ uint8_t qm_u;
+ uint8_t qm_v;
+} StdVideoAV1Quantization;
+
+typedef struct StdVideoAV1Segmentation {
+ uint8_t FeatureEnabled[STD_VIDEO_AV1_MAX_SEGMENTS];
+ int16_t FeatureData[STD_VIDEO_AV1_MAX_SEGMENTS][STD_VIDEO_AV1_SEG_LVL_MAX];
+} StdVideoAV1Segmentation;
+
+typedef struct StdVideoAV1TileInfoFlags {
+ uint32_t uniform_tile_spacing_flag : 1;
+ uint32_t reserved : 31;
+} StdVideoAV1TileInfoFlags;
+
+typedef struct StdVideoAV1TileInfo {
+ StdVideoAV1TileInfoFlags flags;
+ uint8_t TileCols;
+ uint8_t TileRows;
+ uint16_t context_update_tile_id;
+ uint8_t tile_size_bytes_minus_1;
+ uint8_t reserved1[7];
+ const uint16_t* pMiColStarts;
+ const uint16_t* pMiRowStarts;
+ const uint16_t* pWidthInSbsMinus1;
+ const uint16_t* pHeightInSbsMinus1;
+} StdVideoAV1TileInfo;
+
+typedef struct StdVideoAV1CDEF {
+ uint8_t cdef_damping_minus_3;
+ uint8_t cdef_bits;
+ uint8_t cdef_y_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS];
+ uint8_t cdef_y_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS];
+ uint8_t cdef_uv_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS];
+ uint8_t cdef_uv_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS];
+} StdVideoAV1CDEF;
+
+typedef struct StdVideoAV1LoopRestoration {
+ StdVideoAV1FrameRestorationType FrameRestorationType[STD_VIDEO_AV1_MAX_NUM_PLANES];
+ uint16_t LoopRestorationSize[STD_VIDEO_AV1_MAX_NUM_PLANES];
+} StdVideoAV1LoopRestoration;
+
+typedef struct StdVideoAV1GlobalMotion {
+ uint8_t GmType[STD_VIDEO_AV1_NUM_REF_FRAMES];
+ int32_t gm_params[STD_VIDEO_AV1_NUM_REF_FRAMES][STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS];
+} StdVideoAV1GlobalMotion;
+
+typedef struct StdVideoAV1FilmGrainFlags {
+ uint32_t chroma_scaling_from_luma : 1;
+ uint32_t overlap_flag : 1;
+ uint32_t clip_to_restricted_range : 1;
+ uint32_t update_grain : 1;
+ uint32_t reserved : 28;
+} StdVideoAV1FilmGrainFlags;
+
+typedef struct StdVideoAV1FilmGrain {
+ StdVideoAV1FilmGrainFlags flags;
+ uint8_t grain_scaling_minus_8;
+ uint8_t ar_coeff_lag;
+ uint8_t ar_coeff_shift_minus_6;
+ uint8_t grain_scale_shift;
+ uint16_t grain_seed;
+ uint8_t film_grain_params_ref_idx;
+ uint8_t num_y_points;
+ uint8_t point_y_value[STD_VIDEO_AV1_MAX_NUM_Y_POINTS];
+ uint8_t point_y_scaling[STD_VIDEO_AV1_MAX_NUM_Y_POINTS];
+ uint8_t num_cb_points;
+ uint8_t point_cb_value[STD_VIDEO_AV1_MAX_NUM_CB_POINTS];
+ uint8_t point_cb_scaling[STD_VIDEO_AV1_MAX_NUM_CB_POINTS];
+ uint8_t num_cr_points;
+ uint8_t point_cr_value[STD_VIDEO_AV1_MAX_NUM_CR_POINTS];
+ uint8_t point_cr_scaling[STD_VIDEO_AV1_MAX_NUM_CR_POINTS];
+ int8_t ar_coeffs_y_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_LUMA];
+ int8_t ar_coeffs_cb_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA];
+ int8_t ar_coeffs_cr_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA];
+ uint8_t cb_mult;
+ uint8_t cb_luma_mult;
+ uint16_t cb_offset;
+ uint8_t cr_mult;
+ uint8_t cr_luma_mult;
+ uint16_t cr_offset;
+} StdVideoAV1FilmGrain;
+
+typedef struct StdVideoAV1SequenceHeaderFlags {
+ uint32_t still_picture : 1;
+ uint32_t reduced_still_picture_header : 1;
+ uint32_t use_128x128_superblock : 1;
+ uint32_t enable_filter_intra : 1;
+ uint32_t enable_intra_edge_filter : 1;
+ uint32_t enable_interintra_compound : 1;
+ uint32_t enable_masked_compound : 1;
+ uint32_t enable_warped_motion : 1;
+ uint32_t enable_dual_filter : 1;
+ uint32_t enable_order_hint : 1;
+ uint32_t enable_jnt_comp : 1;
+ uint32_t enable_ref_frame_mvs : 1;
+ uint32_t frame_id_numbers_present_flag : 1;
+ uint32_t enable_superres : 1;
+ uint32_t enable_cdef : 1;
+ uint32_t enable_restoration : 1;
+ uint32_t film_grain_params_present : 1;
+ uint32_t timing_info_present_flag : 1;
+ uint32_t initial_display_delay_present_flag : 1;
+ uint32_t reserved : 13;
+} StdVideoAV1SequenceHeaderFlags;
+
+typedef struct StdVideoAV1SequenceHeader {
+ StdVideoAV1SequenceHeaderFlags flags;
+ StdVideoAV1Profile seq_profile;
+ uint8_t frame_width_bits_minus_1;
+ uint8_t frame_height_bits_minus_1;
+ uint16_t max_frame_width_minus_1;
+ uint16_t max_frame_height_minus_1;
+ uint8_t delta_frame_id_length_minus_2;
+ uint8_t additional_frame_id_length_minus_1;
+ uint8_t order_hint_bits_minus_1;
+ uint8_t seq_force_integer_mv;
+ uint8_t seq_force_screen_content_tools;
+ uint8_t reserved1[5];
+ const StdVideoAV1ColorConfig* pColorConfig;
+ const StdVideoAV1TimingInfo* pTimingInfo;
+} StdVideoAV1SequenceHeader;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/vulkan/_gen/vulkan_video_codec_av1std_decode.h b/vendor/vulkan/_gen/vulkan_video_codec_av1std_decode.h
new file mode 100644
index 000000000..6b8130cd9
--- /dev/null
+++ b/vendor/vulkan/_gen/vulkan_video_codec_av1std_decode.h
@@ -0,0 +1,109 @@
+#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_
+#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1
+
+/*
+** Copyright 2015-2024 The Khronos Group Inc.
+**
+** SPDX-License-Identifier: Apache-2.0
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+// vulkan_video_codec_av1std_decode is a preprocessor guard. Do not pass it to API calls.
+#define vulkan_video_codec_av1std_decode 1
+#include "vulkan_video_codec_av1std.h"
+
+#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
+
+#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0
+#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode"
+typedef struct StdVideoDecodeAV1PictureInfoFlags {
+ uint32_t error_resilient_mode : 1;
+ uint32_t disable_cdf_update : 1;
+ uint32_t use_superres : 1;
+ uint32_t render_and_frame_size_different : 1;
+ uint32_t allow_screen_content_tools : 1;
+ uint32_t is_filter_switchable : 1;
+ uint32_t force_integer_mv : 1;
+ uint32_t frame_size_override_flag : 1;
+ uint32_t buffer_removal_time_present_flag : 1;
+ uint32_t allow_intrabc : 1;
+ uint32_t frame_refs_short_signaling : 1;
+ uint32_t allow_high_precision_mv : 1;
+ uint32_t is_motion_mode_switchable : 1;
+ uint32_t use_ref_frame_mvs : 1;
+ uint32_t disable_frame_end_update_cdf : 1;
+ uint32_t allow_warped_motion : 1;
+ uint32_t reduced_tx_set : 1;
+ uint32_t reference_select : 1;
+ uint32_t skip_mode_present : 1;
+ uint32_t delta_q_present : 1;
+ uint32_t delta_lf_present : 1;
+ uint32_t delta_lf_multi : 1;
+ uint32_t segmentation_enabled : 1;
+ uint32_t segmentation_update_map : 1;
+ uint32_t segmentation_temporal_update : 1;
+ uint32_t segmentation_update_data : 1;
+ uint32_t UsesLr : 1;
+ uint32_t usesChromaLr : 1;
+ uint32_t apply_grain : 1;
+ uint32_t reserved : 3;
+} StdVideoDecodeAV1PictureInfoFlags;
+
+typedef struct StdVideoDecodeAV1PictureInfo {
+ StdVideoDecodeAV1PictureInfoFlags flags;
+ StdVideoAV1FrameType frame_type;
+ uint32_t current_frame_id;
+ uint8_t OrderHint;
+ uint8_t primary_ref_frame;
+ uint8_t refresh_frame_flags;
+ uint8_t reserved1;
+ StdVideoAV1InterpolationFilter interpolation_filter;
+ StdVideoAV1TxMode TxMode;
+ uint8_t delta_q_res;
+ uint8_t delta_lf_res;
+ uint8_t SkipModeFrame[STD_VIDEO_AV1_SKIP_MODE_FRAMES];
+ uint8_t coded_denom;
+ uint8_t reserved2[3];
+ uint8_t OrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES];
+ uint32_t expectedFrameId[STD_VIDEO_AV1_NUM_REF_FRAMES];
+ const StdVideoAV1TileInfo* pTileInfo;
+ const StdVideoAV1Quantization* pQuantization;
+ const StdVideoAV1Segmentation* pSegmentation;
+ const StdVideoAV1LoopFilter* pLoopFilter;
+ const StdVideoAV1CDEF* pCDEF;
+ const StdVideoAV1LoopRestoration* pLoopRestoration;
+ const StdVideoAV1GlobalMotion* pGlobalMotion;
+ const StdVideoAV1FilmGrain* pFilmGrain;
+} StdVideoDecodeAV1PictureInfo;
+
+typedef struct StdVideoDecodeAV1ReferenceInfoFlags {
+ uint32_t disable_frame_end_update_cdf : 1;
+ uint32_t segmentation_enabled : 1;
+ uint32_t reserved : 30;
+} StdVideoDecodeAV1ReferenceInfoFlags;
+
+typedef struct StdVideoDecodeAV1ReferenceInfo {
+ StdVideoDecodeAV1ReferenceInfoFlags flags;
+ uint8_t frame_type;
+ uint8_t RefFrameSignBias;
+ uint8_t OrderHint;
+ uint8_t SavedOrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES];
+} StdVideoDecodeAV1ReferenceInfo;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/vulkan/_gen/vulkan_video_codec_h264std.h b/vendor/vulkan/_gen/vulkan_video_codec_h264std.h
index 21c7b667f..6d27af37b 100644
--- a/vendor/vulkan/_gen/vulkan_video_codec_h264std.h
+++ b/vendor/vulkan/_gen/vulkan_video_codec_h264std.h
@@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,8 +19,9 @@ extern "C" {
+// vulkan_video_codec_h264std is a preprocessor guard. Do not pass it to API calls.
#define vulkan_video_codec_h264std 1
-#include <stdint.h>
+#include "vulkan_video_codecs_common.h"
#define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16
@@ -28,6 +29,7 @@ extern "C" {
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64
#define STD_VIDEO_H264_MAX_NUM_LIST_REF 32
#define STD_VIDEO_H264_MAX_CHROMA_PLANES 2
+#define STD_VIDEO_H264_NO_REFERENCE_PICTURE 0xFF
typedef enum StdVideoH264ChromaFormatIdc {
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0,
diff --git a/vendor/vulkan/_gen/vulkan_video_codec_h264std_decode.h b/vendor/vulkan/_gen/vulkan_video_codec_h264std_decode.h
index f7eb8edbd..439cb885e 100644
--- a/vendor/vulkan/_gen/vulkan_video_codec_h264std_decode.h
+++ b/vendor/vulkan/_gen/vulkan_video_codec_h264std_decode.h
@@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,13 +19,15 @@ extern "C" {
+// vulkan_video_codec_h264std_decode is a preprocessor guard. Do not pass it to API calls.
#define vulkan_video_codec_h264std_decode 1
+#include "vulkan_video_codec_h264std.h"
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
-#define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_decode"
+#define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2
typedef enum StdVideoDecodeH264FieldOrderCount {
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0,
diff --git a/vendor/vulkan/_gen/vulkan_video_codec_h264std_encode.h b/vendor/vulkan/_gen/vulkan_video_codec_h264std_encode.h
new file mode 100644
index 000000000..9e24aa5d9
--- /dev/null
+++ b/vendor/vulkan/_gen/vulkan_video_codec_h264std_encode.h
@@ -0,0 +1,147 @@
+#ifndef VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_
+#define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1
+
+/*
+** Copyright 2015-2024 The Khronos Group Inc.
+**
+** SPDX-License-Identifier: Apache-2.0
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+// vulkan_video_codec_h264std_encode is a preprocessor guard. Do not pass it to API calls.
+#define vulkan_video_codec_h264std_encode 1
+#include "vulkan_video_codec_h264std.h"
+
+#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
+
+#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0
+#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_encode"
+typedef struct StdVideoEncodeH264WeightTableFlags {
+ uint32_t luma_weight_l0_flag;
+ uint32_t chroma_weight_l0_flag;
+ uint32_t luma_weight_l1_flag;
+ uint32_t chroma_weight_l1_flag;
+} StdVideoEncodeH264WeightTableFlags;
+
+typedef struct StdVideoEncodeH264WeightTable {
+ StdVideoEncodeH264WeightTableFlags flags;
+ uint8_t luma_log2_weight_denom;
+ uint8_t chroma_log2_weight_denom;
+ int8_t luma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF];
+ int8_t luma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF];
+ int8_t chroma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
+ int8_t chroma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
+ int8_t luma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF];
+ int8_t luma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF];
+ int8_t chroma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
+ int8_t chroma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
+} StdVideoEncodeH264WeightTable;
+
+typedef struct StdVideoEncodeH264SliceHeaderFlags {
+ uint32_t direct_spatial_mv_pred_flag : 1;
+ uint32_t num_ref_idx_active_override_flag : 1;
+ uint32_t reserved : 30;
+} StdVideoEncodeH264SliceHeaderFlags;
+
+typedef struct StdVideoEncodeH264PictureInfoFlags {
+ uint32_t IdrPicFlag : 1;
+ uint32_t is_reference : 1;
+ uint32_t no_output_of_prior_pics_flag : 1;
+ uint32_t long_term_reference_flag : 1;
+ uint32_t adaptive_ref_pic_marking_mode_flag : 1;
+ uint32_t reserved : 27;
+} StdVideoEncodeH264PictureInfoFlags;
+
+typedef struct StdVideoEncodeH264ReferenceInfoFlags {
+ uint32_t used_for_long_term_reference : 1;
+ uint32_t reserved : 31;
+} StdVideoEncodeH264ReferenceInfoFlags;
+
+typedef struct StdVideoEncodeH264ReferenceListsInfoFlags {
+ uint32_t ref_pic_list_modification_flag_l0 : 1;
+ uint32_t ref_pic_list_modification_flag_l1 : 1;
+ uint32_t reserved : 30;
+} StdVideoEncodeH264ReferenceListsInfoFlags;
+
+typedef struct StdVideoEncodeH264RefListModEntry {
+ StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc;
+ uint16_t abs_diff_pic_num_minus1;
+ uint16_t long_term_pic_num;
+} StdVideoEncodeH264RefListModEntry;
+
+typedef struct StdVideoEncodeH264RefPicMarkingEntry {
+ StdVideoH264MemMgmtControlOp memory_management_control_operation;
+ uint16_t difference_of_pic_nums_minus1;
+ uint16_t long_term_pic_num;
+ uint16_t long_term_frame_idx;
+ uint16_t max_long_term_frame_idx_plus1;
+} StdVideoEncodeH264RefPicMarkingEntry;
+
+typedef struct StdVideoEncodeH264ReferenceListsInfo {
+ StdVideoEncodeH264ReferenceListsInfoFlags flags;
+ uint8_t num_ref_idx_l0_active_minus1;
+ uint8_t num_ref_idx_l1_active_minus1;
+ uint8_t RefPicList0[STD_VIDEO_H264_MAX_NUM_LIST_REF];
+ uint8_t RefPicList1[STD_VIDEO_H264_MAX_NUM_LIST_REF];
+ uint8_t refList0ModOpCount;
+ uint8_t refList1ModOpCount;
+ uint8_t refPicMarkingOpCount;
+ uint8_t reserved1[7];
+ const StdVideoEncodeH264RefListModEntry* pRefList0ModOperations;
+ const StdVideoEncodeH264RefListModEntry* pRefList1ModOperations;
+ const StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations;
+} StdVideoEncodeH264ReferenceListsInfo;
+
+typedef struct StdVideoEncodeH264PictureInfo {
+ StdVideoEncodeH264PictureInfoFlags flags;
+ uint8_t seq_parameter_set_id;
+ uint8_t pic_parameter_set_id;
+ uint16_t idr_pic_id;
+ StdVideoH264PictureType primary_pic_type;
+ uint32_t frame_num;
+ int32_t PicOrderCnt;
+ uint8_t temporal_id;
+ uint8_t reserved1[3];
+ const StdVideoEncodeH264ReferenceListsInfo* pRefLists;
+} StdVideoEncodeH264PictureInfo;
+
+typedef struct StdVideoEncodeH264ReferenceInfo {
+ StdVideoEncodeH264ReferenceInfoFlags flags;
+ StdVideoH264PictureType primary_pic_type;
+ uint32_t FrameNum;
+ int32_t PicOrderCnt;
+ uint16_t long_term_pic_num;
+ uint16_t long_term_frame_idx;
+ uint8_t temporal_id;
+} StdVideoEncodeH264ReferenceInfo;
+
+typedef struct StdVideoEncodeH264SliceHeader {
+ StdVideoEncodeH264SliceHeaderFlags flags;
+ uint32_t first_mb_in_slice;
+ StdVideoH264SliceType slice_type;
+ int8_t slice_alpha_c0_offset_div2;
+ int8_t slice_beta_offset_div2;
+ int8_t slice_qp_delta;
+ uint8_t reserved1;
+ StdVideoH264CabacInitIdc cabac_init_idc;
+ StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc;
+ const StdVideoEncodeH264WeightTable* pWeightTable;
+} StdVideoEncodeH264SliceHeader;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/vulkan/_gen/vulkan_video_codec_h265std.h b/vendor/vulkan/_gen/vulkan_video_codec_h265std.h
index 4233bdc89..d0a1bacbe 100644
--- a/vendor/vulkan/_gen/vulkan_video_codec_h265std.h
+++ b/vendor/vulkan/_gen/vulkan_video_codec_h265std.h
@@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,9 +19,11 @@ extern "C" {
+// vulkan_video_codec_h265std is a preprocessor guard. Do not pass it to API calls.
#define vulkan_video_codec_h265std 1
-#define STD_VIDEO_H265_SUBLAYERS_LIST_SIZE 7
+#include "vulkan_video_codecs_common.h"
#define STD_VIDEO_H265_CPB_CNT_LIST_SIZE 32
+#define STD_VIDEO_H265_SUBLAYERS_LIST_SIZE 7
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS 6
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS 16
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS 6
@@ -30,18 +32,19 @@ extern "C" {
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS 64
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS 2
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS 64
-#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE 3
-#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE 128
-#define STD_VIDEO_H265_MAX_DPB_SIZE 16
-#define STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS 32
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE 6
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE 19
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE 21
+#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE 3
+#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE 128
#define STD_VIDEO_H265_MAX_NUM_LIST_REF 15
#define STD_VIDEO_H265_MAX_CHROMA_PLANES 2
#define STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS 64
+#define STD_VIDEO_H265_MAX_DPB_SIZE 16
+#define STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS 32
#define STD_VIDEO_H265_MAX_LONG_TERM_PICS 16
#define STD_VIDEO_H265_MAX_DELTA_POC 48
+#define STD_VIDEO_H265_NO_REFERENCE_PICTURE 0xFF
typedef enum StdVideoH265ChromaFormatIdc {
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0,
diff --git a/vendor/vulkan/_gen/vulkan_video_codec_h265std_decode.h b/vendor/vulkan/_gen/vulkan_video_codec_h265std_decode.h
index 7eee9b389..0178793e5 100644
--- a/vendor/vulkan/_gen/vulkan_video_codec_h265std_decode.h
+++ b/vendor/vulkan/_gen/vulkan_video_codec_h265std_decode.h
@@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,13 +19,15 @@ extern "C" {
+// vulkan_video_codec_h265std_decode is a preprocessor guard. Do not pass it to API calls.
#define vulkan_video_codec_h265std_decode 1
+#include "vulkan_video_codec_h265std.h"
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
-#define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_decode"
+#define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8
typedef struct StdVideoDecodeH265PictureInfoFlags {
uint32_t IrapPicFlag : 1;
uint32_t IdrPicFlag : 1;
diff --git a/vendor/vulkan/_gen/vulkan_video_codec_h265std_encode.h b/vendor/vulkan/_gen/vulkan_video_codec_h265std_encode.h
new file mode 100644
index 000000000..ee34491f4
--- /dev/null
+++ b/vendor/vulkan/_gen/vulkan_video_codec_h265std_encode.h
@@ -0,0 +1,157 @@
+#ifndef VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_
+#define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1
+
+/*
+** Copyright 2015-2024 The Khronos Group Inc.
+**
+** SPDX-License-Identifier: Apache-2.0
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+// vulkan_video_codec_h265std_encode is a preprocessor guard. Do not pass it to API calls.
+#define vulkan_video_codec_h265std_encode 1
+#include "vulkan_video_codec_h265std.h"
+
+#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
+
+#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0
+#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_encode"
+typedef struct StdVideoEncodeH265WeightTableFlags {
+ uint16_t luma_weight_l0_flag;
+ uint16_t chroma_weight_l0_flag;
+ uint16_t luma_weight_l1_flag;
+ uint16_t chroma_weight_l1_flag;
+} StdVideoEncodeH265WeightTableFlags;
+
+typedef struct StdVideoEncodeH265WeightTable {
+ StdVideoEncodeH265WeightTableFlags flags;
+ uint8_t luma_log2_weight_denom;
+ int8_t delta_chroma_log2_weight_denom;
+ int8_t delta_luma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
+ int8_t luma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
+ int8_t delta_chroma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
+ int8_t delta_chroma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
+ int8_t delta_luma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
+ int8_t luma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
+ int8_t delta_chroma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
+ int8_t delta_chroma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
+} StdVideoEncodeH265WeightTable;
+
+typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags {
+ uint32_t first_slice_segment_in_pic_flag : 1;
+ uint32_t dependent_slice_segment_flag : 1;
+ uint32_t slice_sao_luma_flag : 1;
+ uint32_t slice_sao_chroma_flag : 1;
+ uint32_t num_ref_idx_active_override_flag : 1;
+ uint32_t mvd_l1_zero_flag : 1;
+ uint32_t cabac_init_flag : 1;
+ uint32_t cu_chroma_qp_offset_enabled_flag : 1;
+ uint32_t deblocking_filter_override_flag : 1;
+ uint32_t slice_deblocking_filter_disabled_flag : 1;
+ uint32_t collocated_from_l0_flag : 1;
+ uint32_t slice_loop_filter_across_slices_enabled_flag : 1;
+ uint32_t reserved : 20;
+} StdVideoEncodeH265SliceSegmentHeaderFlags;
+
+typedef struct StdVideoEncodeH265SliceSegmentHeader {
+ StdVideoEncodeH265SliceSegmentHeaderFlags flags;
+ StdVideoH265SliceType slice_type;
+ uint32_t slice_segment_address;
+ uint8_t collocated_ref_idx;
+ uint8_t MaxNumMergeCand;
+ int8_t slice_cb_qp_offset;
+ int8_t slice_cr_qp_offset;
+ int8_t slice_beta_offset_div2;
+ int8_t slice_tc_offset_div2;
+ int8_t slice_act_y_qp_offset;
+ int8_t slice_act_cb_qp_offset;
+ int8_t slice_act_cr_qp_offset;
+ int8_t slice_qp_delta;
+ uint16_t reserved1;
+ const StdVideoEncodeH265WeightTable* pWeightTable;
+} StdVideoEncodeH265SliceSegmentHeader;
+
+typedef struct StdVideoEncodeH265ReferenceListsInfoFlags {
+ uint32_t ref_pic_list_modification_flag_l0 : 1;
+ uint32_t ref_pic_list_modification_flag_l1 : 1;
+ uint32_t reserved : 30;
+} StdVideoEncodeH265ReferenceListsInfoFlags;
+
+typedef struct StdVideoEncodeH265ReferenceListsInfo {
+ StdVideoEncodeH265ReferenceListsInfoFlags flags;
+ uint8_t num_ref_idx_l0_active_minus1;
+ uint8_t num_ref_idx_l1_active_minus1;
+ uint8_t RefPicList0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
+ uint8_t RefPicList1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
+ uint8_t list_entry_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
+ uint8_t list_entry_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
+} StdVideoEncodeH265ReferenceListsInfo;
+
+typedef struct StdVideoEncodeH265PictureInfoFlags {
+ uint32_t is_reference : 1;
+ uint32_t IrapPicFlag : 1;
+ uint32_t used_for_long_term_reference : 1;
+ uint32_t discardable_flag : 1;
+ uint32_t cross_layer_bla_flag : 1;
+ uint32_t pic_output_flag : 1;
+ uint32_t no_output_of_prior_pics_flag : 1;
+ uint32_t short_term_ref_pic_set_sps_flag : 1;
+ uint32_t slice_temporal_mvp_enabled_flag : 1;
+ uint32_t reserved : 23;
+} StdVideoEncodeH265PictureInfoFlags;
+
+typedef struct StdVideoEncodeH265LongTermRefPics {
+ uint8_t num_long_term_sps;
+ uint8_t num_long_term_pics;
+ uint8_t lt_idx_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS];
+ uint8_t poc_lsb_lt[STD_VIDEO_H265_MAX_LONG_TERM_PICS];
+ uint16_t used_by_curr_pic_lt_flag;
+ uint8_t delta_poc_msb_present_flag[STD_VIDEO_H265_MAX_DELTA_POC];
+ uint8_t delta_poc_msb_cycle_lt[STD_VIDEO_H265_MAX_DELTA_POC];
+} StdVideoEncodeH265LongTermRefPics;
+
+typedef struct StdVideoEncodeH265PictureInfo {
+ StdVideoEncodeH265PictureInfoFlags flags;
+ StdVideoH265PictureType pic_type;
+ uint8_t sps_video_parameter_set_id;
+ uint8_t pps_seq_parameter_set_id;
+ uint8_t pps_pic_parameter_set_id;
+ uint8_t short_term_ref_pic_set_idx;
+ int32_t PicOrderCntVal;
+ uint8_t TemporalId;
+ uint8_t reserved1[7];
+ const StdVideoEncodeH265ReferenceListsInfo* pRefLists;
+ const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSet;
+ const StdVideoEncodeH265LongTermRefPics* pLongTermRefPics;
+} StdVideoEncodeH265PictureInfo;
+
+typedef struct StdVideoEncodeH265ReferenceInfoFlags {
+ uint32_t used_for_long_term_reference : 1;
+ uint32_t unused_for_reference : 1;
+ uint32_t reserved : 30;
+} StdVideoEncodeH265ReferenceInfoFlags;
+
+typedef struct StdVideoEncodeH265ReferenceInfo {
+ StdVideoEncodeH265ReferenceInfoFlags flags;
+ StdVideoH265PictureType pic_type;
+ int32_t PicOrderCntVal;
+ uint8_t TemporalId;
+} StdVideoEncodeH265ReferenceInfo;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/vulkan/_gen/vulkan_wayland.h b/vendor/vulkan/_gen/vulkan_wayland.h
index bdf4fdfad..5d18518f6 100644
--- a/vendor/vulkan/_gen/vulkan_wayland.h
+++ b/vendor/vulkan/_gen/vulkan_wayland.h
@@ -2,7 +2,7 @@
#define VULKAN_WAYLAND_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,6 +19,7 @@ extern "C" {
+// VK_KHR_wayland_surface is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_wayland_surface 1
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
diff --git a/vendor/vulkan/_gen/vulkan_win32.h b/vendor/vulkan/_gen/vulkan_win32.h
index 5b65a36a6..d7a0b2bab 100644
--- a/vendor/vulkan/_gen/vulkan_win32.h
+++ b/vendor/vulkan/_gen/vulkan_win32.h
@@ -2,7 +2,7 @@
#define VULKAN_WIN32_H_ 1
/*
-** Copyright 2015-2023 The Khronos Group Inc.
+** Copyright 2015-2024 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -19,6 +19,7 @@ extern "C" {
+// VK_KHR_win32_surface is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_win32_surface 1
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
@@ -47,6 +48,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
#endif
+// VK_KHR_external_memory_win32 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_memory_win32 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
@@ -96,6 +98,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
#endif
+// VK_KHR_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_win32_keyed_mutex 1
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
@@ -113,6 +116,7 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
+// VK_KHR_external_semaphore_win32 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_semaphore_win32 1
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
@@ -165,6 +169,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
#endif
+// VK_KHR_external_fence_win32 is a preprocessor guard. Do not pass it to API calls.
#define VK_KHR_external_fence_win32 1
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
@@ -208,6 +213,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
#endif
+// VK_NV_external_memory_win32 is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_external_memory_win32 1
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
@@ -236,6 +242,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
#endif
+// VK_NV_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_win32_keyed_mutex 1
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
@@ -253,6 +260,7 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
+// VK_EXT_full_screen_exclusive is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_full_screen_exclusive 1
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
@@ -309,6 +317,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
#endif
+// VK_NV_acquire_winrt_display is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_acquire_winrt_display 1
#define VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION 1
#define VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME "VK_NV_acquire_winrt_display"
diff --git a/vendor/vulkan/core.odin b/vendor/vulkan/core.odin
index 79b856595..2f788db13 100644
--- a/vendor/vulkan/core.odin
+++ b/vendor/vulkan/core.odin
@@ -51,11 +51,32 @@ MAX_GLOBAL_PRIORITY_SIZE_EXT :: 16
QUEUE_FAMILY_EXTERNAL :: MAX_QUEUE_FAMILY_EXTERNAL
// General Constants
-HEADER_VERSION :: 250
+HEADER_VERSION :: 296
MAX_DRIVER_NAME_SIZE :: 256
MAX_DRIVER_INFO_SIZE :: 256
// Vulkan Video Constants
+VIDEO_AV1_NUM_REF_FRAMES :: 8
+VIDEO_AV1_REFS_PER_FRAME :: 7
+VIDEO_AV1_TOTAL_REFS_PER_FRAME :: 8
+VIDEO_AV1_MAX_TILE_COLS :: 64
+VIDEO_AV1_MAX_TILE_ROWS :: 64
+VIDEO_AV1_MAX_SEGMENTS :: 8
+VIDEO_AV1_SEG_LVL_MAX :: 8
+VIDEO_AV1_PRIMARY_REF_NONE :: 7
+VIDEO_AV1_SELECT_INTEGER_MV :: 2
+VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS :: 2
+VIDEO_AV1_SKIP_MODE_FRAMES :: 2
+VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS :: 4
+VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS :: 2
+VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS :: 8
+VIDEO_AV1_MAX_NUM_PLANES :: 3
+VIDEO_AV1_GLOBAL_MOTION_PARAMS :: 6
+VIDEO_AV1_MAX_NUM_Y_POINTS :: 14
+VIDEO_AV1_MAX_NUM_CB_POINTS :: 10
+VIDEO_AV1_MAX_NUM_CR_POINTS :: 10
+VIDEO_AV1_MAX_NUM_POS_LUMA :: 24
+VIDEO_AV1_MAX_NUM_POS_CHROMA :: 25
VIDEO_H264_CPB_CNT_LIST_SIZE :: 32
VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS :: 6
VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS :: 16
@@ -63,8 +84,9 @@ VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS :: 6
VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS :: 64
VIDEO_H264_MAX_NUM_LIST_REF :: 32
VIDEO_H264_MAX_CHROMA_PLANES :: 2
-VIDEO_H265_SUBLAYERS_LIST_SIZE :: 7
+VIDEO_H264_NO_REFERENCE_PICTURE :: 0xFF
VIDEO_H265_CPB_CNT_LIST_SIZE :: 32
+VIDEO_H265_SUBLAYERS_LIST_SIZE :: 7
VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS :: 6
VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS :: 16
VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS :: 6
@@ -73,18 +95,19 @@ VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS :: 6
VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS :: 64
VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS :: 2
VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS :: 64
-VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE :: 3
-VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE :: 128
-VIDEO_H265_MAX_DPB_SIZE :: 16
-VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS :: 32
VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE :: 6
VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE :: 19
VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE :: 21
+VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE :: 3
+VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE :: 128
VIDEO_H265_MAX_NUM_LIST_REF :: 15
VIDEO_H265_MAX_CHROMA_PLANES :: 2
VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS :: 64
+VIDEO_H265_MAX_DPB_SIZE :: 16
+VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS :: 32
VIDEO_H265_MAX_LONG_TERM_PICS :: 16
VIDEO_H265_MAX_DELTA_POC :: 48
+VIDEO_H265_NO_REFERENCE_PICTURE :: 0xFF
VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE :: 2
VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE :: 8
@@ -108,10 +131,16 @@ KHR_video_queue :: 1
KHR_VIDEO_QUEUE_SPEC_VERSION :: 8
KHR_VIDEO_QUEUE_EXTENSION_NAME :: "VK_KHR_video_queue"
KHR_video_decode_queue :: 1
-KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION :: 7
+KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION :: 8
KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME :: "VK_KHR_video_decode_queue"
+KHR_video_encode_h264 :: 1
+KHR_VIDEO_ENCODE_H264_SPEC_VERSION :: 14
+KHR_VIDEO_ENCODE_H264_EXTENSION_NAME :: "VK_KHR_video_encode_h264"
+KHR_video_encode_h265 :: 1
+KHR_VIDEO_ENCODE_H265_SPEC_VERSION :: 14
+KHR_VIDEO_ENCODE_H265_EXTENSION_NAME :: "VK_KHR_video_encode_h265"
KHR_video_decode_h264 :: 1
-KHR_VIDEO_DECODE_H264_SPEC_VERSION :: 8
+KHR_VIDEO_DECODE_H264_SPEC_VERSION :: 9
KHR_VIDEO_DECODE_H264_EXTENSION_NAME :: "VK_KHR_video_decode_h264"
KHR_dynamic_rendering :: 1
KHR_DYNAMIC_RENDERING_SPEC_VERSION :: 1
@@ -249,7 +278,7 @@ KHR_shader_clock :: 1
KHR_SHADER_CLOCK_SPEC_VERSION :: 1
KHR_SHADER_CLOCK_EXTENSION_NAME :: "VK_KHR_shader_clock"
KHR_video_decode_h265 :: 1
-KHR_VIDEO_DECODE_H265_SPEC_VERSION :: 7
+KHR_VIDEO_DECODE_H265_SPEC_VERSION :: 8
KHR_VIDEO_DECODE_H265_EXTENSION_NAME :: "VK_KHR_video_decode_h265"
KHR_global_priority :: 1
MAX_GLOBAL_PRIORITY_SIZE_KHR :: 16
@@ -281,6 +310,12 @@ KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME :: "VK_KHR_shader_term
KHR_fragment_shading_rate :: 1
KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: 2
KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: "VK_KHR_fragment_shading_rate"
+KHR_dynamic_rendering_local_read :: 1
+KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION :: 1
+KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME :: "VK_KHR_dynamic_rendering_local_read"
+KHR_shader_quad_control :: 1
+KHR_SHADER_QUAD_CONTROL_SPEC_VERSION :: 1
+KHR_SHADER_QUAD_CONTROL_EXTENSION_NAME :: "VK_KHR_shader_quad_control"
KHR_spirv_1_4 :: 1
KHR_SPIRV_1_4_SPEC_VERSION :: 1
KHR_SPIRV_1_4_EXTENSION_NAME :: "VK_KHR_spirv_1_4"
@@ -320,6 +355,9 @@ KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME :: "VK_KHR_shader_non_
KHR_present_id :: 1
KHR_PRESENT_ID_SPEC_VERSION :: 1
KHR_PRESENT_ID_EXTENSION_NAME :: "VK_KHR_present_id"
+KHR_video_encode_queue :: 1
+KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION :: 12
+KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME :: "VK_KHR_video_encode_queue"
KHR_synchronization2 :: 1
KHR_SYNCHRONIZATION_2_SPEC_VERSION :: 1
KHR_SYNCHRONIZATION_2_EXTENSION_NAME :: "VK_KHR_synchronization2"
@@ -350,9 +388,65 @@ KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME :: "VK_KHR_portability
KHR_maintenance4 :: 1
KHR_MAINTENANCE_4_SPEC_VERSION :: 2
KHR_MAINTENANCE_4_EXTENSION_NAME :: "VK_KHR_maintenance4"
+KHR_shader_subgroup_rotate :: 1
+KHR_SHADER_SUBGROUP_ROTATE_SPEC_VERSION :: 2
+KHR_SHADER_SUBGROUP_ROTATE_EXTENSION_NAME :: "VK_KHR_shader_subgroup_rotate"
+KHR_shader_maximal_reconvergence :: 1
+KHR_SHADER_MAXIMAL_RECONVERGENCE_SPEC_VERSION :: 1
+KHR_SHADER_MAXIMAL_RECONVERGENCE_EXTENSION_NAME :: "VK_KHR_shader_maximal_reconvergence"
+KHR_maintenance5 :: 1
+KHR_MAINTENANCE_5_SPEC_VERSION :: 1
+KHR_MAINTENANCE_5_EXTENSION_NAME :: "VK_KHR_maintenance5"
KHR_ray_tracing_position_fetch :: 1
KHR_RAY_TRACING_POSITION_FETCH_SPEC_VERSION :: 1
KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME :: "VK_KHR_ray_tracing_position_fetch"
+KHR_pipeline_binary :: 1
+MAX_PIPELINE_BINARY_KEY_SIZE_KHR :: 32
+KHR_PIPELINE_BINARY_SPEC_VERSION :: 1
+KHR_PIPELINE_BINARY_EXTENSION_NAME :: "VK_KHR_pipeline_binary"
+KHR_cooperative_matrix :: 1
+KHR_COOPERATIVE_MATRIX_SPEC_VERSION :: 2
+KHR_COOPERATIVE_MATRIX_EXTENSION_NAME :: "VK_KHR_cooperative_matrix"
+KHR_compute_shader_derivatives :: 1
+KHR_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION :: 1
+KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME :: "VK_KHR_compute_shader_derivatives"
+KHR_video_decode_av1 :: 1
+MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR :: 7
+KHR_VIDEO_DECODE_AV1_SPEC_VERSION :: 1
+KHR_VIDEO_DECODE_AV1_EXTENSION_NAME :: "VK_KHR_video_decode_av1"
+KHR_video_maintenance1 :: 1
+KHR_VIDEO_MAINTENANCE_1_SPEC_VERSION :: 1
+KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME :: "VK_KHR_video_maintenance1"
+KHR_vertex_attribute_divisor :: 1
+KHR_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION :: 1
+KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME :: "VK_KHR_vertex_attribute_divisor"
+KHR_load_store_op_none :: 1
+KHR_LOAD_STORE_OP_NONE_SPEC_VERSION :: 1
+KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME :: "VK_KHR_load_store_op_none"
+KHR_shader_float_controls2 :: 1
+KHR_SHADER_FLOAT_CONTROLS_2_SPEC_VERSION :: 1
+KHR_SHADER_FLOAT_CONTROLS_2_EXTENSION_NAME :: "VK_KHR_shader_float_controls2"
+KHR_index_type_uint8 :: 1
+KHR_INDEX_TYPE_UINT8_SPEC_VERSION :: 1
+KHR_INDEX_TYPE_UINT8_EXTENSION_NAME :: "VK_KHR_index_type_uint8"
+KHR_line_rasterization :: 1
+KHR_LINE_RASTERIZATION_SPEC_VERSION :: 1
+KHR_LINE_RASTERIZATION_EXTENSION_NAME :: "VK_KHR_line_rasterization"
+KHR_calibrated_timestamps :: 1
+KHR_CALIBRATED_TIMESTAMPS_SPEC_VERSION :: 1
+KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME :: "VK_KHR_calibrated_timestamps"
+KHR_shader_expect_assume :: 1
+KHR_SHADER_EXPECT_ASSUME_SPEC_VERSION :: 1
+KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME :: "VK_KHR_shader_expect_assume"
+KHR_maintenance6 :: 1
+KHR_MAINTENANCE_6_SPEC_VERSION :: 1
+KHR_MAINTENANCE_6_EXTENSION_NAME :: "VK_KHR_maintenance6"
+KHR_shader_relaxed_extended_instruction :: 1
+KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_SPEC_VERSION :: 1
+KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_EXTENSION_NAME :: "VK_KHR_shader_relaxed_extended_instruction"
+KHR_maintenance7 :: 1
+KHR_MAINTENANCE_7_SPEC_VERSION :: 1
+KHR_MAINTENANCE_7_EXTENSION_NAME :: "VK_KHR_maintenance7"
EXT_debug_report :: 1
EXT_DEBUG_REPORT_SPEC_VERSION :: 10
EXT_DEBUG_REPORT_EXTENSION_NAME :: "VK_EXT_debug_report"
@@ -420,7 +514,7 @@ NV_external_memory :: 1
NV_EXTERNAL_MEMORY_SPEC_VERSION :: 1
NV_EXTERNAL_MEMORY_EXTENSION_NAME :: "VK_NV_external_memory"
EXT_validation_flags :: 1
-EXT_VALIDATION_FLAGS_SPEC_VERSION :: 2
+EXT_VALIDATION_FLAGS_SPEC_VERSION :: 3
EXT_VALIDATION_FLAGS_EXTENSION_NAME :: "VK_EXT_validation_flags"
EXT_shader_subgroup_ballot :: 1
EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION :: 1
@@ -482,10 +576,10 @@ EXT_depth_clip_enable :: 1
EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION :: 1
EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME :: "VK_EXT_depth_clip_enable"
EXT_swapchain_colorspace :: 1
-EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION :: 4
+EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION :: 5
EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME :: "VK_EXT_swapchain_colorspace"
EXT_hdr_metadata :: 1
-EXT_HDR_METADATA_SPEC_VERSION :: 2
+EXT_HDR_METADATA_SPEC_VERSION :: 3
EXT_HDR_METADATA_EXTENSION_NAME :: "VK_EXT_hdr_metadata"
EXT_external_memory_dma_buf :: 1
EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION :: 1
@@ -659,7 +753,7 @@ EXT_separate_stencil_usage :: 1
EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION :: 1
EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME :: "VK_EXT_separate_stencil_usage"
EXT_validation_features :: 1
-EXT_VALIDATION_FEATURES_SPEC_VERSION :: 5
+EXT_VALIDATION_FEATURES_SPEC_VERSION :: 6
EXT_VALIDATION_FEATURES_EXTENSION_NAME :: "VK_EXT_validation_features"
NV_cooperative_matrix :: 1
NV_COOPERATIVE_MATRIX_SPEC_VERSION :: 1
@@ -694,6 +788,12 @@ EXT_INDEX_TYPE_UINT8_EXTENSION_NAME :: "VK_EXT_index_type_
EXT_extended_dynamic_state :: 1
EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION :: 1
EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME :: "VK_EXT_extended_dynamic_state"
+EXT_host_image_copy :: 1
+EXT_HOST_IMAGE_COPY_SPEC_VERSION :: 1
+EXT_HOST_IMAGE_COPY_EXTENSION_NAME :: "VK_EXT_host_image_copy"
+EXT_map_memory_placed :: 1
+EXT_MAP_MEMORY_PLACED_SPEC_VERSION :: 1
+EXT_MAP_MEMORY_PLACED_EXTENSION_NAME :: "VK_EXT_map_memory_placed"
EXT_shader_atomic_float2 :: 1
EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION :: 1
EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME :: "VK_EXT_shader_atomic_float2"
@@ -715,6 +815,9 @@ NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME :: "VK_NV_inherited_vi
EXT_texel_buffer_alignment :: 1
EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION :: 1
EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME :: "VK_EXT_texel_buffer_alignment"
+EXT_depth_bias_control :: 1
+EXT_DEPTH_BIAS_CONTROL_SPEC_VERSION :: 1
+EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME :: "VK_EXT_depth_bias_control"
EXT_device_memory_report :: 1
EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION :: 2
EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME :: "VK_EXT_device_memory_report"
@@ -742,6 +845,9 @@ EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME :: "VK_EXT_pipeline_cr
NV_device_diagnostics_config :: 1
NV_DEVICE_DIAGNOSTICS_CONFIG_SPEC_VERSION :: 2
NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME :: "VK_NV_device_diagnostics_config"
+NV_cuda_kernel_launch :: 1
+NV_CUDA_KERNEL_LAUNCH_SPEC_VERSION :: 2
+NV_CUDA_KERNEL_LAUNCH_EXTENSION_NAME :: "VK_NV_cuda_kernel_launch"
NV_low_latency :: 1
NV_LOW_LATENCY_SPEC_VERSION :: 1
NV_LOW_LATENCY_EXTENSION_NAME :: "VK_NV_low_latency"
@@ -805,6 +911,9 @@ NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME :: "VK_NV_external_mem
EXT_pipeline_properties :: 1
EXT_PIPELINE_PROPERTIES_SPEC_VERSION :: 1
EXT_PIPELINE_PROPERTIES_EXTENSION_NAME :: "VK_EXT_pipeline_properties"
+EXT_frame_boundary :: 1
+EXT_FRAME_BOUNDARY_SPEC_VERSION :: 1
+EXT_FRAME_BOUNDARY_EXTENSION_NAME :: "VK_EXT_frame_boundary"
EXT_multisampled_render_to_single_sampled :: 1
EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION :: 1
EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME :: "VK_EXT_multisampled_render_to_single_sampled"
@@ -859,6 +968,9 @@ NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME :: "VK_NV_copy_memory_
NV_memory_decompression :: 1
NV_MEMORY_DECOMPRESSION_SPEC_VERSION :: 1
NV_MEMORY_DECOMPRESSION_EXTENSION_NAME :: "VK_NV_memory_decompression"
+NV_device_generated_commands_compute :: 1
+NV_DEVICE_GENERATED_COMMANDS_COMPUTE_SPEC_VERSION :: 2
+NV_DEVICE_GENERATED_COMMANDS_COMPUTE_EXTENSION_NAME :: "VK_NV_device_generated_commands_compute"
NV_linear_color_attachment :: 1
NV_LINEAR_COLOR_ATTACHMENT_SPEC_VERSION :: 1
NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME :: "VK_NV_linear_color_attachment"
@@ -868,6 +980,12 @@ GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME :: "VK_GOOGLE_surfacel
EXT_image_compression_control_swapchain :: 1
EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_SPEC_VERSION :: 1
EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME :: "VK_EXT_image_compression_control_swapchain"
+EXT_nested_command_buffer :: 1
+EXT_NESTED_COMMAND_BUFFER_SPEC_VERSION :: 1
+EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME :: "VK_EXT_nested_command_buffer"
+EXT_external_memory_acquire_unmodified :: 1
+EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_SPEC_VERSION :: 1
+EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXTENSION_NAME :: "VK_EXT_external_memory_acquire_unmodified"
EXT_extended_dynamic_state3 :: 1
EXT_EXTENDED_DYNAMIC_STATE_3_SPEC_VERSION :: 2
EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME :: "VK_EXT_extended_dynamic_state3"
@@ -884,26 +1002,71 @@ NV_optical_flow :: 1
NV_OPTICAL_FLOW_SPEC_VERSION :: 1
NV_OPTICAL_FLOW_EXTENSION_NAME :: "VK_NV_optical_flow"
EXT_legacy_dithering :: 1
-EXT_LEGACY_DITHERING_SPEC_VERSION :: 1
+EXT_LEGACY_DITHERING_SPEC_VERSION :: 2
EXT_LEGACY_DITHERING_EXTENSION_NAME :: "VK_EXT_legacy_dithering"
EXT_pipeline_protected_access :: 1
EXT_PIPELINE_PROTECTED_ACCESS_SPEC_VERSION :: 1
EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME :: "VK_EXT_pipeline_protected_access"
+AMD_anti_lag :: 1
+AMD_ANTI_LAG_SPEC_VERSION :: 1
+AMD_ANTI_LAG_EXTENSION_NAME :: "VK_AMD_anti_lag"
EXT_shader_object :: 1
EXT_SHADER_OBJECT_SPEC_VERSION :: 1
EXT_SHADER_OBJECT_EXTENSION_NAME :: "VK_EXT_shader_object"
NV_ray_tracing_invocation_reorder :: 1
NV_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION :: 1
NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME :: "VK_NV_ray_tracing_invocation_reorder"
+NV_extended_sparse_address_space :: 1
+NV_EXTENDED_SPARSE_ADDRESS_SPACE_SPEC_VERSION :: 1
+NV_EXTENDED_SPARSE_ADDRESS_SPACE_EXTENSION_NAME :: "VK_NV_extended_sparse_address_space"
EXT_mutable_descriptor_type :: 1
EXT_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION :: 1
EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME :: "VK_EXT_mutable_descriptor_type"
+EXT_legacy_vertex_attributes :: 1
+EXT_LEGACY_VERTEX_ATTRIBUTES_SPEC_VERSION :: 1
+EXT_LEGACY_VERTEX_ATTRIBUTES_EXTENSION_NAME :: "VK_EXT_legacy_vertex_attributes"
+EXT_layer_settings :: 1
+EXT_LAYER_SETTINGS_SPEC_VERSION :: 2
+EXT_LAYER_SETTINGS_EXTENSION_NAME :: "VK_EXT_layer_settings"
EXT_pipeline_library_group_handles :: 1
EXT_PIPELINE_LIBRARY_GROUP_HANDLES_SPEC_VERSION :: 1
EXT_PIPELINE_LIBRARY_GROUP_HANDLES_EXTENSION_NAME :: "VK_EXT_pipeline_library_group_handles"
+EXT_dynamic_rendering_unused_attachments :: 1
+EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_SPEC_VERSION :: 1
+EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME :: "VK_EXT_dynamic_rendering_unused_attachments"
+NV_low_latency2 :: 1
+NV_LOW_LATENCY_2_SPEC_VERSION :: 2
+NV_LOW_LATENCY_2_EXTENSION_NAME :: "VK_NV_low_latency2"
+NV_per_stage_descriptor_set :: 1
+NV_PER_STAGE_DESCRIPTOR_SET_SPEC_VERSION :: 1
+NV_PER_STAGE_DESCRIPTOR_SET_EXTENSION_NAME :: "VK_NV_per_stage_descriptor_set"
EXT_attachment_feedback_loop_dynamic_state :: 1
EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_SPEC_VERSION :: 1
EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_EXTENSION_NAME :: "VK_EXT_attachment_feedback_loop_dynamic_state"
+NV_descriptor_pool_overallocation :: 1
+NV_DESCRIPTOR_POOL_OVERALLOCATION_SPEC_VERSION :: 1
+NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME :: "VK_NV_descriptor_pool_overallocation"
+NV_raw_access_chains :: 1
+NV_RAW_ACCESS_CHAINS_SPEC_VERSION :: 1
+NV_RAW_ACCESS_CHAINS_EXTENSION_NAME :: "VK_NV_raw_access_chains"
+NV_command_buffer_inheritance :: 1
+NV_COMMAND_BUFFER_INHERITANCE_SPEC_VERSION :: 1
+NV_COMMAND_BUFFER_INHERITANCE_EXTENSION_NAME :: "VK_NV_command_buffer_inheritance"
+NV_shader_atomic_float16_vector :: 1
+NV_SHADER_ATOMIC_FLOAT16_VECTOR_SPEC_VERSION :: 1
+NV_SHADER_ATOMIC_FLOAT16_VECTOR_EXTENSION_NAME :: "VK_NV_shader_atomic_float16_vector"
+EXT_shader_replicated_composites :: 1
+EXT_SHADER_REPLICATED_COMPOSITES_SPEC_VERSION :: 1
+EXT_SHADER_REPLICATED_COMPOSITES_EXTENSION_NAME :: "VK_EXT_shader_replicated_composites"
+NV_ray_tracing_validation :: 1
+NV_RAY_TRACING_VALIDATION_SPEC_VERSION :: 1
+NV_RAY_TRACING_VALIDATION_EXTENSION_NAME :: "VK_NV_ray_tracing_validation"
+EXT_device_generated_commands :: 1
+EXT_DEVICE_GENERATED_COMMANDS_SPEC_VERSION :: 1
+EXT_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME :: "VK_EXT_device_generated_commands"
+EXT_depth_clamp_control :: 1
+EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION :: 1
+EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME :: "VK_EXT_depth_clamp_control"
KHR_acceleration_structure :: 1
KHR_ACCELERATION_STRUCTURE_SPEC_VERSION :: 13
KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME :: "VK_KHR_acceleration_structure"
@@ -947,7 +1110,7 @@ EXT_metal_surface :: 1
EXT_METAL_SURFACE_SPEC_VERSION :: 1
EXT_METAL_SURFACE_EXTENSION_NAME :: "VK_EXT_metal_surface"
EXT_metal_objects :: 1
-EXT_METAL_OBJECTS_SPEC_VERSION :: 1
+EXT_METAL_OBJECTS_SPEC_VERSION :: 2
EXT_METAL_OBJECTS_EXTENSION_NAME :: "VK_EXT_metal_objects"
KHR_wayland_surface :: 1
KHR_WAYLAND_SURFACE_SPEC_VERSION :: 6
@@ -989,6 +1152,7 @@ DisplayModeKHR :: distinct NonDispatchableHandle
VideoSessionKHR :: distinct NonDispatchableHandle
VideoSessionParametersKHR :: distinct NonDispatchableHandle
DeferredOperationKHR :: distinct NonDispatchableHandle
+PipelineBinaryKHR :: distinct NonDispatchableHandle
DebugReportCallbackEXT :: distinct NonDispatchableHandle
CuModuleNVX :: distinct NonDispatchableHandle
CuFunctionNVX :: distinct NonDispatchableHandle
@@ -997,9 +1161,13 @@ ValidationCacheEXT :: distinct NonDispatchableHandle
AccelerationStructureNV :: distinct NonDispatchableHandle
PerformanceConfigurationINTEL :: distinct NonDispatchableHandle
IndirectCommandsLayoutNV :: distinct NonDispatchableHandle
+CudaModuleNV :: distinct NonDispatchableHandle
+CudaFunctionNV :: distinct NonDispatchableHandle
AccelerationStructureKHR :: distinct NonDispatchableHandle
MicromapEXT :: distinct NonDispatchableHandle
OpticalFlowSessionNV :: distinct NonDispatchableHandle
ShaderEXT :: distinct NonDispatchableHandle
+IndirectExecutionSetEXT :: distinct NonDispatchableHandle
+IndirectCommandsLayoutEXT :: distinct NonDispatchableHandle
diff --git a/vendor/vulkan/enums.odin b/vendor/vulkan/enums.odin
index b6bbbec30..7edea0231 100644
--- a/vendor/vulkan/enums.odin
+++ b/vendor/vulkan/enums.odin
@@ -77,6 +77,8 @@ AccessFlag :: enum Flags {
SHADING_RATE_IMAGE_READ_NV = FRAGMENT_SHADING_RATE_ATTACHMENT_READ_KHR,
ACCELERATION_STRUCTURE_READ_NV = ACCELERATION_STRUCTURE_READ_KHR,
ACCELERATION_STRUCTURE_WRITE_NV = ACCELERATION_STRUCTURE_WRITE_KHR,
+ COMMAND_PREPROCESS_READ_EXT = COMMAND_PREPROCESS_READ_NV,
+ COMMAND_PREPROCESS_WRITE_EXT = COMMAND_PREPROCESS_WRITE_NV,
}
AccessFlags_NONE :: AccessFlags{}
@@ -86,6 +88,17 @@ AcquireProfilingLockFlagsKHR :: distinct bit_set[AcquireProfilingLockFlagKHR; Fl
AcquireProfilingLockFlagKHR :: enum Flags {
}
+AntiLagModeAMD :: enum c.int {
+ DRIVER_CONTROL = 0,
+ ON = 1,
+ OFF = 2,
+}
+
+AntiLagStageAMD :: enum c.int {
+ INPUT = 0,
+ PRESENT = 1,
+}
+
AttachmentDescriptionFlags :: distinct bit_set[AttachmentDescriptionFlag; Flags]
AttachmentDescriptionFlag :: enum Flags {
MAY_ALIAS = 0,
@@ -95,7 +108,8 @@ AttachmentLoadOp :: enum c.int {
LOAD = 0,
CLEAR = 1,
DONT_CARE = 2,
- NONE_EXT = 1000400000,
+ NONE_KHR = 1000400000,
+ NONE_EXT = NONE_KHR,
}
AttachmentStoreOp :: enum c.int {
@@ -186,6 +200,11 @@ BlendOverlapEXT :: enum c.int {
CONJOINT = 2,
}
+BlockMatchWindowCompareModeQCOM :: enum c.int {
+ BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM = 0,
+ BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM = 1,
+}
+
BorderColor :: enum c.int {
FLOAT_TRANSPARENT_BLACK = 0,
INT_TRANSPARENT_BLACK = 1,
@@ -205,6 +224,7 @@ BufferCreateFlag :: enum Flags {
PROTECTED = 3,
DEVICE_ADDRESS_CAPTURE_REPLAY = 4,
DESCRIPTOR_BUFFER_CAPTURE_REPLAY_EXT = 5,
+ VIDEO_PROFILE_INDEPENDENT_KHR = 6,
DEVICE_ADDRESS_CAPTURE_REPLAY_EXT = DEVICE_ADDRESS_CAPTURE_REPLAY,
DEVICE_ADDRESS_CAPTURE_REPLAY_KHR = DEVICE_ADDRESS_CAPTURE_REPLAY,
}
@@ -226,6 +246,7 @@ BufferUsageFlag :: enum Flags {
TRANSFORM_FEEDBACK_BUFFER_EXT = 11,
TRANSFORM_FEEDBACK_COUNTER_BUFFER_EXT = 12,
CONDITIONAL_RENDERING_EXT = 9,
+ EXECUTION_GRAPH_SCRATCH_AMDX = 25,
ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_KHR = 19,
ACCELERATION_STRUCTURE_STORAGE_KHR = 20,
SHADER_BINDING_TABLE_KHR = 10,
@@ -370,18 +391,29 @@ ComponentSwizzle :: enum c.int {
A = 6,
}
-ComponentTypeNV :: enum c.int {
- FLOAT16 = 0,
- FLOAT32 = 1,
- FLOAT64 = 2,
- SINT8 = 3,
- SINT16 = 4,
- SINT32 = 5,
- SINT64 = 6,
- UINT8 = 7,
- UINT16 = 8,
- UINT32 = 9,
- UINT64 = 10,
+ComponentTypeKHR :: enum c.int {
+ FLOAT16 = 0,
+ FLOAT32 = 1,
+ FLOAT64 = 2,
+ SINT8 = 3,
+ SINT16 = 4,
+ SINT32 = 5,
+ SINT64 = 6,
+ UINT8 = 7,
+ UINT16 = 8,
+ UINT32 = 9,
+ UINT64 = 10,
+ FLOAT16_NV = FLOAT16,
+ FLOAT32_NV = FLOAT32,
+ FLOAT64_NV = FLOAT64,
+ SINT8_NV = SINT8,
+ SINT16_NV = SINT16,
+ SINT32_NV = SINT32,
+ SINT64_NV = SINT64,
+ UINT8_NV = UINT8,
+ UINT16_NV = UINT16,
+ UINT32_NV = UINT32,
+ UINT64_NV = UINT64,
}
CompositeAlphaFlagsKHR :: distinct bit_set[CompositeAlphaFlagKHR; Flags]
@@ -431,6 +463,13 @@ CoverageReductionModeNV :: enum c.int {
TRUNCATE = 1,
}
+CubicFilterWeightsQCOM :: enum c.int {
+ CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM = 0,
+ CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM = 1,
+ CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM = 2,
+ CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM = 3,
+}
+
CullModeFlags :: distinct bit_set[CullModeFlag; Flags]
CullModeFlag :: enum Flags {
FRONT = 0,
@@ -489,6 +528,8 @@ DebugReportObjectTypeEXT :: enum c.int {
CU_FUNCTION_NVX = 1000029001,
ACCELERATION_STRUCTURE_KHR = 1000150000,
ACCELERATION_STRUCTURE_NV = 1000165000,
+ CUDA_MODULE_NV = 1000307000,
+ CUDA_FUNCTION_NV = 1000307001,
BUFFER_COLLECTION_FUCHSIA = 1000366000,
DEBUG_REPORT = DEBUG_REPORT_CALLBACK_EXT,
VALIDATION_CACHE = VALIDATION_CACHE_EXT,
@@ -522,6 +563,17 @@ DependencyFlag :: enum Flags {
DEVICE_GROUP_KHR = DEVICE_GROUP,
}
+DepthBiasRepresentationEXT :: enum c.int {
+ LEAST_REPRESENTABLE_VALUE_FORMAT = 0,
+ LEAST_REPRESENTABLE_VALUE_FORCE_UNORM = 1,
+ FLOAT = 2,
+}
+
+DepthClampModeEXT :: enum c.int {
+ VIEWPORT_RANGE = 0,
+ USER_DEFINED_RANGE = 1,
+}
+
DescriptorBindingFlags :: distinct bit_set[DescriptorBindingFlag; Flags]
DescriptorBindingFlag :: enum Flags {
UPDATE_AFTER_BIND = 0,
@@ -536,11 +588,13 @@ DescriptorBindingFlag :: enum Flags {
DescriptorPoolCreateFlags :: distinct bit_set[DescriptorPoolCreateFlag; Flags]
DescriptorPoolCreateFlag :: enum Flags {
- FREE_DESCRIPTOR_SET = 0,
- UPDATE_AFTER_BIND = 1,
- HOST_ONLY_EXT = 2,
- UPDATE_AFTER_BIND_EXT = UPDATE_AFTER_BIND,
- HOST_ONLY_VALVE = HOST_ONLY_EXT,
+ FREE_DESCRIPTOR_SET = 0,
+ UPDATE_AFTER_BIND = 1,
+ HOST_ONLY_EXT = 2,
+ ALLOW_OVERALLOCATION_SETS_NV = 3,
+ ALLOW_OVERALLOCATION_POOLS_NV = 4,
+ UPDATE_AFTER_BIND_EXT = UPDATE_AFTER_BIND,
+ HOST_ONLY_VALVE = HOST_ONLY_EXT,
}
DescriptorSetLayoutCreateFlags :: distinct bit_set[DescriptorSetLayoutCreateFlag; Flags]
@@ -549,7 +603,9 @@ DescriptorSetLayoutCreateFlag :: enum Flags {
PUSH_DESCRIPTOR_KHR = 0,
DESCRIPTOR_BUFFER_EXT = 4,
EMBEDDED_IMMUTABLE_SAMPLERS_EXT = 5,
+ INDIRECT_BINDABLE_NV = 7,
HOST_ONLY_POOL_EXT = 2,
+ PER_STAGE_NV = 6,
UPDATE_AFTER_BIND_POOL_EXT = UPDATE_AFTER_BIND_POOL,
HOST_ONLY_POOL_VALVE = HOST_ONLY_POOL_EXT,
}
@@ -693,6 +749,8 @@ DriverId :: enum c.int {
MESA_DOZEN = 23,
MESA_NVK = 24,
IMAGINATION_OPEN_SOURCE_MESA = 25,
+ MESA_HONEYKRISP = 26,
+ RESERVED_27 = 27,
AMD_PROPRIETARY_KHR = AMD_PROPRIETARY,
AMD_OPEN_SOURCE_KHR = AMD_OPEN_SOURCE,
MESA_RADV_KHR = MESA_RADV,
@@ -743,12 +801,10 @@ DynamicState :: enum c.int {
EXCLUSIVE_SCISSOR_ENABLE_NV = 1000205000,
EXCLUSIVE_SCISSOR_NV = 1000205001,
FRAGMENT_SHADING_RATE_KHR = 1000226000,
- LINE_STIPPLE_EXT = 1000259000,
VERTEX_INPUT_EXT = 1000352000,
PATCH_CONTROL_POINTS_EXT = 1000377000,
LOGIC_OP_EXT = 1000377003,
COLOR_WRITE_ENABLE_EXT = 1000381000,
- TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002,
DEPTH_CLAMP_ENABLE_EXT = 1000455003,
POLYGON_MODE_EXT = 1000455004,
RASTERIZATION_SAMPLES_EXT = 1000455005,
@@ -759,6 +815,7 @@ DynamicState :: enum c.int {
COLOR_BLEND_ENABLE_EXT = 1000455010,
COLOR_BLEND_EQUATION_EXT = 1000455011,
COLOR_WRITE_MASK_EXT = 1000455012,
+ TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002,
RASTERIZATION_STREAM_EXT = 1000455013,
CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014,
EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015,
@@ -780,6 +837,9 @@ DynamicState :: enum c.int {
REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031,
COVERAGE_REDUCTION_MODE_NV = 1000455032,
ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT = 1000524000,
+ LINE_STIPPLE_KHR = 1000259000,
+ DEPTH_CLAMP_RANGE_EXT = 1000582000,
+ LINE_STIPPLE_EXT = LINE_STIPPLE_KHR,
CULL_MODE_EXT = CULL_MODE,
FRONT_FACE_EXT = FRONT_FACE,
PRIMITIVE_TOPOLOGY_EXT = PRIMITIVE_TOPOLOGY,
@@ -865,6 +925,7 @@ ExternalMemoryHandleTypeFlag :: enum Flags {
HOST_MAPPED_FOREIGN_MEMORY_EXT = 8,
ZIRCON_VMO_FUCHSIA = 11,
RDMA_ADDRESS_NV = 12,
+ SCREEN_BUFFER_QNX = 14,
OPAQUE_FD_KHR = OPAQUE_FD,
OPAQUE_WIN32_KHR = OPAQUE_WIN32,
OPAQUE_WIN32_KMT_KHR = OPAQUE_WIN32_KMT,
@@ -1172,7 +1233,9 @@ Format :: enum c.int {
PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
- R16G16_S10_5_NV = 1000464000,
+ R16G16_SFIXED5_NV = 1000464000,
+ A1B5G5R5_UNORM_PACK16_KHR = 1000470000,
+ A8_UNORM_KHR = 1000470001,
ASTC_4x4_SFLOAT_BLOCK_EXT = ASTC_4x4_SFLOAT_BLOCK,
ASTC_5x4_SFLOAT_BLOCK_EXT = ASTC_5x4_SFLOAT_BLOCK,
ASTC_5x5_SFLOAT_BLOCK_EXT = ASTC_5x5_SFLOAT_BLOCK,
@@ -1227,6 +1290,7 @@ Format :: enum c.int {
G16_B16R16_2PLANE_444_UNORM_EXT = G16_B16R16_2PLANE_444_UNORM,
A4R4G4B4_UNORM_PACK16_EXT = A4R4G4B4_UNORM_PACK16,
A4B4G4R4_UNORM_PACK16_EXT = A4B4G4R4_UNORM_PACK16,
+ R16G16_S10_5_NV = R16G16_SFIXED5_NV,
}
FormatFeatureFlags :: distinct bit_set[FormatFeatureFlag; Flags]
@@ -1303,6 +1367,11 @@ FragmentShadingRateTypeNV :: enum c.int {
ENUMS = 1,
}
+FrameBoundaryFlagsEXT :: distinct bit_set[FrameBoundaryFlagEXT; Flags]
+FrameBoundaryFlagEXT :: enum Flags {
+ FRAME_END = 0,
+}
+
FramebufferCreateFlags :: distinct bit_set[FramebufferCreateFlag; Flags]
FramebufferCreateFlag :: enum Flags {
IMAGELESS = 0,
@@ -1360,6 +1429,11 @@ GraphicsPipelineLibraryFlagEXT :: enum Flags {
FRAGMENT_OUTPUT_INTERFACE = 3,
}
+HostImageCopyFlagsEXT :: distinct bit_set[HostImageCopyFlagEXT; Flags]
+HostImageCopyFlagEXT :: enum Flags {
+ MEMCPY = 0,
+}
+
ImageAspectFlags :: distinct bit_set[ImageAspectFlag; Flags]
ImageAspectFlag :: enum Flags {
COLOR = 0,
@@ -1443,6 +1517,7 @@ ImageCreateFlag :: enum Flags {
MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXT = 18,
D2_VIEW_COMPATIBLE_EXT = 17,
FRAGMENT_DENSITY_MAP_OFFSET_QCOM = 15,
+ VIDEO_PROFILE_INDEPENDENT_KHR = 20,
SPLIT_INSTANCE_BIND_REGIONS_KHR = SPLIT_INSTANCE_BIND_REGIONS,
D2_ARRAY_COMPATIBLE_KHR = D2_ARRAY_COMPATIBLE,
BLOCK_TEXEL_VIEW_COMPATIBLE_KHR = BLOCK_TEXEL_VIEW_COMPATIBLE,
@@ -1476,6 +1551,7 @@ ImageLayout :: enum c.int {
SHARED_PRESENT_KHR = 1000111000,
FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000,
FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003,
+ RENDERING_LOCAL_READ_KHR = 1000232000,
VIDEO_ENCODE_DST_KHR = 1000299000,
VIDEO_ENCODE_SRC_KHR = 1000299001,
VIDEO_ENCODE_DPB_KHR = 1000299002,
@@ -1518,6 +1594,7 @@ ImageUsageFlag :: enum Flags {
VIDEO_DECODE_DPB_KHR = 12,
FRAGMENT_DENSITY_MAP_EXT = 9,
FRAGMENT_SHADING_RATE_ATTACHMENT_KHR = 8,
+ HOST_TRANSFER_EXT = 22,
VIDEO_ENCODE_DST_KHR = 13,
VIDEO_ENCODE_SRC_KHR = 14,
VIDEO_ENCODE_DPB_KHR = 15,
@@ -1549,8 +1626,21 @@ IndexType :: enum c.int {
UINT16 = 0,
UINT32 = 1,
NONE_KHR = 1000165000,
- UINT8_EXT = 1000265000,
+ UINT8_KHR = 1000265000,
NONE_NV = NONE_KHR,
+ UINT8_EXT = UINT8_KHR,
+}
+
+IndirectCommandsInputModeFlagsEXT :: distinct bit_set[IndirectCommandsInputModeFlagEXT; Flags]
+IndirectCommandsInputModeFlagEXT :: enum Flags {
+ VULKAN_INDEX_BUFFER = 0,
+ DXGI_INDEX_BUFFER = 1,
+}
+
+IndirectCommandsLayoutUsageFlagsEXT :: distinct bit_set[IndirectCommandsLayoutUsageFlagEXT; Flags]
+IndirectCommandsLayoutUsageFlagEXT :: enum Flags {
+ EXPLICIT_PREPROCESS = 0,
+ UNORDERED_SEQUENCES = 1,
}
IndirectCommandsLayoutUsageFlagsNV :: distinct bit_set[IndirectCommandsLayoutUsageFlagNV; Flags]
@@ -1560,6 +1650,24 @@ IndirectCommandsLayoutUsageFlagNV :: enum Flags {
UNORDERED_SEQUENCES = 2,
}
+IndirectCommandsTokenTypeEXT :: enum c.int {
+ EXECUTION_SET = 0,
+ PUSH_CONSTANT = 1,
+ SEQUENCE_INDEX = 2,
+ INDEX_BUFFER = 3,
+ VERTEX_BUFFER = 4,
+ DRAW_INDEXED = 5,
+ DRAW = 6,
+ DRAW_INDEXED_COUNT = 7,
+ DRAW_COUNT = 8,
+ DISPATCH = 9,
+ DRAW_MESH_TASKS_NV = 1000202002,
+ DRAW_MESH_TASKS_COUNT_NV = 1000202003,
+ DRAW_MESH_TASKS = 1000328000,
+ DRAW_MESH_TASKS_COUNT = 1000328001,
+ TRACE_RAYS2 = 1000386004,
+}
+
IndirectCommandsTokenTypeNV :: enum c.int {
SHADER_GROUP = 0,
STATE_FLAGS = 1,
@@ -1570,6 +1678,13 @@ IndirectCommandsTokenTypeNV :: enum c.int {
DRAW = 6,
DRAW_TASKS = 7,
DRAW_MESH_TASKS = 1000328000,
+ PIPELINE = 1000428003,
+ DISPATCH = 1000428004,
+}
+
+IndirectExecutionSetInfoTypeEXT :: enum c.int {
+ PIPELINES = 0,
+ SHADER_OBJECTS = 1,
}
IndirectStateFlagsNV :: distinct bit_set[IndirectStateFlagNV; Flags]
@@ -1586,11 +1701,46 @@ InternalAllocationType :: enum c.int {
EXECUTABLE = 0,
}
-LineRasterizationModeEXT :: enum c.int {
- DEFAULT = 0,
- RECTANGULAR = 1,
- BRESENHAM = 2,
- RECTANGULAR_SMOOTH = 3,
+LatencyMarkerNV :: enum c.int {
+ SIMULATION_START = 0,
+ SIMULATION_END = 1,
+ RENDERSUBMIT_START = 2,
+ RENDERSUBMIT_END = 3,
+ PRESENT_START = 4,
+ PRESENT_END = 5,
+ INPUT_SAMPLE = 6,
+ TRIGGER_FLASH = 7,
+ OUT_OF_BAND_RENDERSUBMIT_START = 8,
+ OUT_OF_BAND_RENDERSUBMIT_END = 9,
+ OUT_OF_BAND_PRESENT_START = 10,
+ OUT_OF_BAND_PRESENT_END = 11,
+}
+
+LayerSettingTypeEXT :: enum c.int {
+ BOOL32 = 0,
+ INT32 = 1,
+ INT64 = 2,
+ UINT32 = 3,
+ UINT64 = 4,
+ FLOAT32 = 5,
+ FLOAT64 = 6,
+ STRING = 7,
+}
+
+LayeredDriverUnderlyingApiMSFT :: enum c.int {
+ LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT = 0,
+ LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT = 1,
+}
+
+LineRasterizationModeKHR :: enum c.int {
+ DEFAULT = 0,
+ RECTANGULAR = 1,
+ BRESENHAM = 2,
+ RECTANGULAR_SMOOTH = 3,
+ DEFAULT_EXT = DEFAULT,
+ RECTANGULAR_EXT = RECTANGULAR,
+ BRESENHAM_EXT = BRESENHAM,
+ RECTANGULAR_SMOOTH_EXT = RECTANGULAR_SMOOTH,
}
LogicOp :: enum c.int {
@@ -1629,6 +1779,11 @@ MemoryHeapFlag :: enum Flags {
MULTI_INSTANCE_KHR = MULTI_INSTANCE,
}
+MemoryMapFlags :: distinct bit_set[MemoryMapFlag; Flags]
+MemoryMapFlag :: enum Flags {
+ PLACED_EXT = 0,
+}
+
MemoryOverallocationBehaviorAMD :: enum c.int {
DEFAULT = 0,
ALLOWED = 1,
@@ -1648,6 +1803,11 @@ MemoryPropertyFlag :: enum Flags {
RDMA_CAPABLE_NV = 8,
}
+MemoryUnmapFlagsKHR :: distinct bit_set[MemoryUnmapFlagKHR; Flags]
+MemoryUnmapFlagKHR :: enum Flags {
+ RESERVE_EXT = 0,
+}
+
MicromapCreateFlagsEXT :: distinct bit_set[MicromapCreateFlagEXT; Flags]
MicromapCreateFlagEXT :: enum Flags {
DEVICE_ADDRESS_CAPTURE_REPLAY = 0,
@@ -1704,10 +1864,15 @@ ObjectType :: enum c.int {
PERFORMANCE_CONFIGURATION_INTEL = 1000210000,
DEFERRED_OPERATION_KHR = 1000268000,
INDIRECT_COMMANDS_LAYOUT_NV = 1000277000,
+ CUDA_MODULE_NV = 1000307000,
+ CUDA_FUNCTION_NV = 1000307001,
BUFFER_COLLECTION_FUCHSIA = 1000366000,
MICROMAP_EXT = 1000396000,
OPTICAL_FLOW_SESSION_NV = 1000464000,
SHADER_EXT = 1000482000,
+ PIPELINE_BINARY_KHR = 1000483000,
+ INDIRECT_COMMANDS_LAYOUT_EXT = 1000572000,
+ INDIRECT_EXECUTION_SET_EXT = 1000572001,
DESCRIPTOR_UPDATE_TEMPLATE_KHR = DESCRIPTOR_UPDATE_TEMPLATE,
SAMPLER_YCBCR_CONVERSION_KHR = SAMPLER_YCBCR_CONVERSION,
PRIVATE_DATA_SLOT_EXT = PRIVATE_DATA_SLOT,
@@ -1781,6 +1946,11 @@ OpticalFlowUsageFlagNV :: enum Flags {
OpticalFlowUsageFlagsNV_UNKNOWN :: OpticalFlowUsageFlagsNV{}
+OutOfBandQueueTypeNV :: enum c.int {
+ RENDER = 0,
+ PRESENT = 1,
+}
+
PeerMemoryFeatureFlags :: distinct bit_set[PeerMemoryFeatureFlag; Flags]
PeerMemoryFeatureFlag :: enum Flags {
COPY_SRC = 0,
@@ -1853,6 +2023,14 @@ PerformanceValueTypeINTEL :: enum c.int {
PERFORMANCE_VALUE_TYPE_STRING_INTEL = 4,
}
+PhysicalDeviceLayeredApiKHR :: enum c.int {
+ VULKAN = 0,
+ D3D12 = 1,
+ METAL = 2,
+ OPENGL = 3,
+ OPENGLES = 4,
+}
+
PhysicalDeviceType :: enum c.int {
OTHER = 0,
INTEGRATED_GPU = 1,
@@ -1864,6 +2042,7 @@ PhysicalDeviceType :: enum c.int {
PipelineBindPoint :: enum c.int {
GRAPHICS = 0,
COMPUTE = 1,
+ EXECUTION_GRAPH_AMDX = 1000134000,
RAY_TRACING_KHR = 1000165000,
SUBPASS_SHADING_HUAWEI = 1000369003,
RAY_TRACING_NV = RAY_TRACING_KHR,
@@ -2015,6 +2194,7 @@ PipelineStageFlag :: enum Flags {
ACCELERATION_STRUCTURE_BUILD_NV = ACCELERATION_STRUCTURE_BUILD_KHR,
TASK_SHADER_NV = TASK_SHADER_EXT,
MESH_SHADER_NV = MESH_SHADER_EXT,
+ COMMAND_PREPROCESS_EXT = COMMAND_PREPROCESS_NV,
}
PipelineStageFlags_NONE :: PipelineStageFlags{}
@@ -2113,9 +2293,10 @@ QueryResultFlag :: enum Flags {
}
QueryResultStatusKHR :: enum c.int {
- ERROR = -1,
- NOT_READY = 0,
- COMPLETE = 1,
+ ERROR = -1,
+ NOT_READY = 0,
+ COMPLETE = 1,
+ INSUFFICIENT_BITSTREAM_BUFFER_RANGE = -1000299000,
}
QueryType :: enum c.int {
@@ -2191,21 +2372,24 @@ RenderingFlag :: enum Flags {
SUSPENDING = 1,
RESUMING = 2,
ENABLE_LEGACY_DITHERING_EXT = 3,
+ CONTENTS_INLINE_KHR = 4,
CONTENTS_SECONDARY_COMMAND_BUFFERS_KHR = CONTENTS_SECONDARY_COMMAND_BUFFERS,
SUSPENDING_KHR = SUSPENDING,
RESUMING_KHR = RESUMING,
+ CONTENTS_INLINE_EXT = CONTENTS_INLINE_KHR,
}
ResolveModeFlags :: distinct bit_set[ResolveModeFlag; Flags]
ResolveModeFlag :: enum Flags {
- SAMPLE_ZERO = 0,
- AVERAGE = 1,
- MIN = 2,
- MAX = 3,
- SAMPLE_ZERO_KHR = SAMPLE_ZERO,
- AVERAGE_KHR = AVERAGE,
- MIN_KHR = MIN,
- MAX_KHR = MAX,
+ SAMPLE_ZERO = 0,
+ AVERAGE = 1,
+ MIN = 2,
+ MAX = 3,
+ EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID = 4,
+ SAMPLE_ZERO_KHR = SAMPLE_ZERO,
+ AVERAGE_KHR = AVERAGE,
+ MIN_KHR = MIN,
+ MAX_KHR = MAX,
}
ResolveModeFlags_NONE :: ResolveModeFlags{}
@@ -2258,7 +2442,9 @@ Result :: enum c.int {
OPERATION_NOT_DEFERRED_KHR = 1000268003,
ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR = -1000299000,
ERROR_COMPRESSION_EXHAUSTED_EXT = -1000338000,
- ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000,
+ INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000,
+ PIPELINE_BINARY_MISSING_KHR = 1000483000,
+ ERROR_NOT_ENOUGH_SPACE_KHR = -1000483000,
ERROR_OUT_OF_POOL_MEMORY_KHR = ERROR_OUT_OF_POOL_MEMORY,
ERROR_INVALID_EXTERNAL_HANDLE_KHR = ERROR_INVALID_EXTERNAL_HANDLE,
ERROR_FRAGMENTATION_EXT = ERROR_FRAGMENTATION,
@@ -2267,6 +2453,7 @@ Result :: enum c.int {
ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS,
PIPELINE_COMPILE_REQUIRED_EXT = PIPELINE_COMPILE_REQUIRED,
ERROR_PIPELINE_COMPILE_REQUIRED_EXT = PIPELINE_COMPILE_REQUIRED,
+ ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = INCOMPATIBLE_SHADER_BINARY_EXT,
}
SampleCountFlags :: distinct bit_set[SampleCountFlag; Flags]
@@ -2304,12 +2491,13 @@ SamplerMipmapMode :: enum c.int {
}
SamplerReductionMode :: enum c.int {
- WEIGHTED_AVERAGE = 0,
- MIN = 1,
- MAX = 2,
- WEIGHTED_AVERAGE_EXT = WEIGHTED_AVERAGE,
- MIN_EXT = MIN,
- MAX_EXT = MAX,
+ WEIGHTED_AVERAGE = 0,
+ MIN = 1,
+ MAX = 2,
+ WEIGHTED_AVERAGE_RANGECLAMP_QCOM = 1000521000,
+ WEIGHTED_AVERAGE_EXT = WEIGHTED_AVERAGE,
+ MIN_EXT = MIN,
+ MAX_EXT = MAX,
}
SamplerYcbcrModelConversion :: enum c.int {
@@ -2332,11 +2520,15 @@ SamplerYcbcrRange :: enum c.int {
ITU_NARROW_KHR = ITU_NARROW,
}
-ScopeNV :: enum c.int {
- DEVICE = 1,
- WORKGROUP = 2,
- SUBGROUP = 3,
- QUEUE_FAMILY = 5,
+ScopeKHR :: enum c.int {
+ DEVICE = 1,
+ WORKGROUP = 2,
+ SUBGROUP = 3,
+ QUEUE_FAMILY = 5,
+ DEVICE_NV = DEVICE,
+ WORKGROUP_NV = WORKGROUP,
+ SUBGROUP_NV = SUBGROUP,
+ QUEUE_FAMILY_NV = QUEUE_FAMILY,
}
SemaphoreImportFlags :: distinct bit_set[SemaphoreImportFlag; Flags]
@@ -2376,6 +2568,7 @@ ShaderCreateFlagEXT :: enum Flags {
DISPATCH_BASE = 4,
FRAGMENT_SHADING_RATE_ATTACHMENT = 5,
FRAGMENT_DENSITY_MAP_ATTACHMENT = 6,
+ INDIRECT_BINDABLE = 7,
}
ShaderFloatControlsIndependence :: enum c.int {
@@ -2753,24 +2946,34 @@ StructureType :: enum c.int {
CU_LAUNCH_INFO_NVX = 1000029002,
IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000,
IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001,
- VIDEO_ENCODE_H264_CAPABILITIES_EXT = 1000038000,
- VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000038001,
- VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000038002,
- VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT = 1000038003,
- VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT = 1000038004,
- VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT = 1000038005,
- VIDEO_ENCODE_H264_PROFILE_INFO_EXT = 1000038007,
- VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT = 1000038008,
- VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT = 1000038009,
- VIDEO_ENCODE_H265_CAPABILITIES_EXT = 1000039000,
- VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000039001,
- VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000039002,
- VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT = 1000039003,
- VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT = 1000039004,
- VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT = 1000039005,
- VIDEO_ENCODE_H265_PROFILE_INFO_EXT = 1000039007,
- VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT = 1000039009,
- VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT = 1000039010,
+ VIDEO_ENCODE_H264_CAPABILITIES_KHR = 1000038000,
+ VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000038001,
+ VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000038002,
+ VIDEO_ENCODE_H264_PICTURE_INFO_KHR = 1000038003,
+ VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR = 1000038004,
+ VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR = 1000038005,
+ VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR = 1000038006,
+ VIDEO_ENCODE_H264_PROFILE_INFO_KHR = 1000038007,
+ VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR = 1000038008,
+ VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR = 1000038009,
+ VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR = 1000038010,
+ VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR = 1000038011,
+ VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR = 1000038012,
+ VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000038013,
+ VIDEO_ENCODE_H265_CAPABILITIES_KHR = 1000039000,
+ VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000039001,
+ VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000039002,
+ VIDEO_ENCODE_H265_PICTURE_INFO_KHR = 1000039003,
+ VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR = 1000039004,
+ VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR = 1000039005,
+ VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR = 1000039006,
+ VIDEO_ENCODE_H265_PROFILE_INFO_KHR = 1000039007,
+ VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR = 1000039009,
+ VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR = 1000039010,
+ VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR = 1000039011,
+ VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR = 1000039012,
+ VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR = 1000039013,
+ VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000039014,
VIDEO_DECODE_H264_CAPABILITIES_KHR = 1000040000,
VIDEO_DECODE_H264_PICTURE_INFO_KHR = 1000040001,
VIDEO_DECODE_H264_PROFILE_INFO_KHR = 1000040003,
@@ -2831,6 +3034,7 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000,
PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001,
HDR_METADATA_EXT = 1000105000,
+ PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG = 1000110000,
SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
@@ -2866,6 +3070,11 @@ StructureType :: enum c.int {
MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004,
EXTERNAL_FORMAT_ANDROID = 1000129005,
ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006,
+ PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX = 1000134000,
+ PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX = 1000134001,
+ EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX = 1000134002,
+ EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX = 1000134003,
+ PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX = 1000134004,
SAMPLE_LOCATIONS_INFO_EXT = 1000143000,
RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001,
PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002,
@@ -2933,7 +3142,6 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002,
PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000,
PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000,
- CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000,
PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000,
VIDEO_DECODE_H265_CAPABILITIES_KHR = 1000187000,
VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000187001,
@@ -2946,10 +3154,7 @@ StructureType :: enum c.int {
QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = 1000388001,
DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000,
PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000,
- PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001,
- PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002,
PRESENT_FRAME_TOKEN_GGP = 1000191000,
- PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = 1000201000,
PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000,
PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001,
PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000,
@@ -2979,7 +3184,11 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004,
PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000,
PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000,
+ PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR = 1000232000,
+ RENDERING_ATTACHMENT_LOCATION_INFO_KHR = 1000232001,
+ RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR = 1000232002,
PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000,
+ PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR = 1000235000,
PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000,
PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000,
MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001,
@@ -3004,11 +3213,7 @@ StructureType :: enum c.int {
SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002,
SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001,
HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000,
- PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000,
- PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001,
- PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002,
PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000,
- PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = 1000265000,
PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000,
PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000,
PIPELINE_INFO_KHR = 1000269001,
@@ -3016,8 +3221,21 @@ StructureType :: enum c.int {
PIPELINE_EXECUTABLE_INFO_KHR = 1000269003,
PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004,
PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005,
+ PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT = 1000270000,
+ PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT = 1000270001,
+ MEMORY_TO_IMAGE_COPY_EXT = 1000270002,
+ IMAGE_TO_MEMORY_COPY_EXT = 1000270003,
+ COPY_IMAGE_TO_MEMORY_INFO_EXT = 1000270004,
+ COPY_MEMORY_TO_IMAGE_INFO_EXT = 1000270005,
+ HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT = 1000270006,
+ COPY_IMAGE_TO_IMAGE_INFO_EXT = 1000270007,
+ SUBRESOURCE_HOST_MEMCPY_SIZE_EXT = 1000270008,
+ HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT = 1000270009,
MEMORY_MAP_INFO_KHR = 1000271000,
MEMORY_UNMAP_INFO_KHR = 1000271001,
+ PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT = 1000272000,
+ PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT = 1000272001,
+ MEMORY_MAP_PLACED_INFO_EXT = 1000272002,
PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000,
SURFACE_PRESENT_MODE_EXT = 1000274000,
SURFACE_PRESENT_SCALING_CAPABILITIES_EXT = 1000274001,
@@ -3041,6 +3259,9 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000,
COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000,
RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001,
+ PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT = 1000283000,
+ DEPTH_BIAS_INFO_EXT = 1000283001,
+ DEPTH_BIAS_REPRESENTATION_INFO_EXT = 1000283002,
PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000,
DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001,
DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002,
@@ -3061,8 +3282,18 @@ StructureType :: enum c.int {
VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003,
VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004,
QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR = 1000299005,
+ PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299006,
+ VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR = 1000299007,
+ VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299008,
+ VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR = 1000299009,
+ VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000299010,
PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000,
DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001,
+ CUDA_MODULE_CREATE_INFO_NV = 1000307000,
+ CUDA_FUNCTION_CREATE_INFO_NV = 1000307001,
+ CUDA_LAUNCH_INFO_NV = 1000307002,
+ PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV = 1000307003,
+ PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV = 1000307004,
QUERY_LOW_LATENCY_SUPPORT_NV = 1000310000,
EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000,
EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001,
@@ -3113,8 +3344,6 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000,
PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000,
IMAGE_COMPRESSION_CONTROL_EXT = 1000338001,
- SUBRESOURCE_LAYOUT_2_EXT = 1000338002,
- IMAGE_SUBRESOURCE_2_EXT = 1000338003,
IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004,
PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000,
PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000,
@@ -3155,6 +3384,8 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001,
PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000,
PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001,
+ PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT = 1000375000,
+ FRAME_BOUNDARY_EXT = 1000375001,
PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000,
SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001,
MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002,
@@ -3186,10 +3417,15 @@ StructureType :: enum c.int {
ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV = 1000397002,
PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI = 1000404000,
PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI = 1000404001,
+ PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI = 1000404002,
PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000,
SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001,
PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000,
PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM = 1000415000,
+ PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR = 1000416000,
+ DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM = 1000417000,
+ PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM = 1000417001,
+ PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM = 1000417002,
PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT = 1000418000,
IMAGE_VIEW_SLICED_CREATE_INFO_EXT = 1000418001,
PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000,
@@ -3197,6 +3433,11 @@ StructureType :: enum c.int {
DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002,
PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = 1000421000,
PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000,
+ PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM = 1000424000,
+ PHYSICAL_DEVICE_RENDER_PASS_STRIPED_PROPERTIES_ARM = 1000424001,
+ RENDER_PASS_STRIPE_BEGIN_INFO_ARM = 1000424002,
+ RENDER_PASS_STRIPE_INFO_ARM = 1000424003,
+ RENDER_PASS_STRIPE_SUBMIT_INFO_ARM = 1000424004,
PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = 1000425000,
PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = 1000425001,
SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = 1000425002,
@@ -3204,11 +3445,18 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = 1000426001,
PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = 1000427000,
PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = 1000427001,
+ PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV = 1000428000,
+ COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV = 1000428001,
+ PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV = 1000428002,
PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000,
+ PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR = 1000434000,
PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000,
PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000,
PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001,
IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002,
+ PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT = 1000451000,
+ PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT = 1000451001,
+ EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT = 1000453000,
PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000,
PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001,
PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000,
@@ -3231,10 +3479,34 @@ StructureType :: enum c.int {
OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010,
PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000,
PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = 1000466000,
+ PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID = 1000468000,
+ PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468001,
+ ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468002,
+ PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR = 1000470000,
+ PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR = 1000470001,
+ RENDERING_AREA_INFO_KHR = 1000470003,
+ DEVICE_IMAGE_SUBRESOURCE_INFO_KHR = 1000470004,
+ SUBRESOURCE_LAYOUT_2_KHR = 1000338002,
+ IMAGE_SUBRESOURCE_2_KHR = 1000338003,
+ PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR = 1000470005,
+ BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR = 1000470006,
+ PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD = 1000476000,
+ ANTI_LAG_DATA_AMD = 1000476001,
+ ANTI_LAG_PRESENTATION_INFO_AMD = 1000476002,
PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR = 1000481000,
PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT = 1000482000,
PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT = 1000482001,
SHADER_CREATE_INFO_EXT = 1000482002,
+ PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR = 1000483000,
+ PIPELINE_BINARY_CREATE_INFO_KHR = 1000483001,
+ PIPELINE_BINARY_INFO_KHR = 1000483002,
+ PIPELINE_BINARY_KEY_KHR = 1000483003,
+ PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR = 1000483004,
+ RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR = 1000483005,
+ PIPELINE_BINARY_DATA_INFO_KHR = 1000483006,
+ PIPELINE_CREATE_INFO_KHR = 1000483007,
+ DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR = 1000483008,
+ PIPELINE_BINARY_HANDLES_INFO_KHR = 1000483009,
PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000,
TILE_PROPERTIES_QCOM = 1000484001,
PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000,
@@ -3242,14 +3514,107 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM = 1000488000,
PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000,
PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001,
+ PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV = 1000492000,
+ PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV = 1000492001,
PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000351000,
MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002,
+ PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT = 1000495000,
+ PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT = 1000495001,
+ LAYER_SETTINGS_CREATE_INFO_EXT = 1000496000,
PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000,
PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001,
PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT = 1000498000,
+ PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT = 1000499000,
+ LATENCY_SLEEP_MODE_INFO_NV = 1000505000,
+ LATENCY_SLEEP_INFO_NV = 1000505001,
+ SET_LATENCY_MARKER_INFO_NV = 1000505002,
+ GET_LATENCY_MARKER_INFO_NV = 1000505003,
+ LATENCY_TIMINGS_FRAME_REPORT_NV = 1000505004,
+ LATENCY_SUBMISSION_PRESENT_ID_NV = 1000505005,
+ OUT_OF_BAND_QUEUE_TYPE_INFO_NV = 1000505006,
+ SWAPCHAIN_LATENCY_CREATE_INFO_NV = 1000505007,
+ LATENCY_SURFACE_CAPABILITIES_NV = 1000505008,
+ PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR = 1000506000,
+ COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506001,
+ PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506002,
PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM = 1000510000,
MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM = 1000510001,
+ PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR = 1000201000,
+ PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR = 1000511000,
+ VIDEO_DECODE_AV1_CAPABILITIES_KHR = 1000512000,
+ VIDEO_DECODE_AV1_PICTURE_INFO_KHR = 1000512001,
+ VIDEO_DECODE_AV1_PROFILE_INFO_KHR = 1000512003,
+ VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000512004,
+ VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR = 1000512005,
+ PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR = 1000515000,
+ VIDEO_INLINE_QUERY_INFO_KHR = 1000515001,
+ PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV = 1000516000,
+ PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM = 1000518000,
+ PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM = 1000518001,
+ SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM = 1000518002,
+ SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM = 1000519000,
+ PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM = 1000519001,
+ BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM = 1000519002,
+ PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM = 1000520000,
+ SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM = 1000520001,
+ PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM = 1000521000,
PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT = 1000524000,
+ PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = 1000525000,
+ PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = 1000190001,
+ PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = 1000190002,
+ PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR = 1000528000,
+ SCREEN_BUFFER_PROPERTIES_QNX = 1000529000,
+ SCREEN_BUFFER_FORMAT_PROPERTIES_QNX = 1000529001,
+ IMPORT_SCREEN_BUFFER_INFO_QNX = 1000529002,
+ EXTERNAL_FORMAT_QNX = 1000529003,
+ PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX = 1000529004,
+ PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT = 1000530000,
+ PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR = 1000265000,
+ PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR = 1000259000,
+ PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR = 1000259001,
+ PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR = 1000259002,
+ CALIBRATED_TIMESTAMP_INFO_KHR = 1000184000,
+ PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR = 1000544000,
+ PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = 1000545000,
+ PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = 1000545001,
+ BIND_MEMORY_STATUS_KHR = 1000545002,
+ BIND_DESCRIPTOR_SETS_INFO_KHR = 1000545003,
+ PUSH_CONSTANTS_INFO_KHR = 1000545004,
+ PUSH_DESCRIPTOR_SET_INFO_KHR = 1000545005,
+ PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = 1000545006,
+ SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT = 1000545007,
+ BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT = 1000545008,
+ PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV = 1000546000,
+ PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV = 1000555000,
+ PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR = 1000558000,
+ PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV = 1000559000,
+ PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR = 1000562000,
+ PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR = 1000562001,
+ PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR = 1000562002,
+ PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR = 1000562003,
+ PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR = 1000562004,
+ PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV = 1000563000,
+ PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT = 1000564000,
+ PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV = 1000568000,
+ PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_EXT = 1000572000,
+ PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_EXT = 1000572001,
+ GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_EXT = 1000572002,
+ INDIRECT_EXECUTION_SET_CREATE_INFO_EXT = 1000572003,
+ GENERATED_COMMANDS_INFO_EXT = 1000572004,
+ INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_EXT = 1000572006,
+ INDIRECT_COMMANDS_LAYOUT_TOKEN_EXT = 1000572007,
+ WRITE_INDIRECT_EXECUTION_SET_PIPELINE_EXT = 1000572008,
+ WRITE_INDIRECT_EXECUTION_SET_SHADER_EXT = 1000572009,
+ INDIRECT_EXECUTION_SET_PIPELINE_INFO_EXT = 1000572010,
+ INDIRECT_EXECUTION_SET_SHADER_INFO_EXT = 1000572011,
+ INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT = 1000572012,
+ GENERATED_COMMANDS_PIPELINE_INFO_EXT = 1000572013,
+ GENERATED_COMMANDS_SHADER_INFO_EXT = 1000572014,
+ PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA = 1000575000,
+ PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_PROPERTIES_MESA = 1000575001,
+ IMAGE_ALIGNMENT_CONTROL_CREATE_INFO_MESA = 1000575002,
+ PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT = 1000582000,
+ PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT = 1000582001,
PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES,
PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES,
DEBUG_REPORT_CREATE_INFO_EXT = DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT,
@@ -3350,11 +3715,15 @@ StructureType :: enum c.int {
PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES,
PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES,
PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES,
+ CALIBRATED_TIMESTAMP_INFO_EXT = CALIBRATED_TIMESTAMP_INFO_KHR,
+ PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR,
+ PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR,
PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = PIPELINE_CREATION_FEEDBACK_CREATE_INFO,
PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = PHYSICAL_DEVICE_DRIVER_PROPERTIES,
PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES,
PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES,
SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE,
+ PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR,
PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR,
PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES,
PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES,
@@ -3382,7 +3751,11 @@ StructureType :: enum c.int {
BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO,
MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO,
DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO,
+ PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR,
+ PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR,
+ PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR,
PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES,
+ PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR,
PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES,
PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES,
PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES,
@@ -3412,6 +3785,8 @@ StructureType :: enum c.int {
IMAGE_BLIT_2_KHR = IMAGE_BLIT_2,
BUFFER_IMAGE_COPY_2_KHR = BUFFER_IMAGE_COPY_2,
IMAGE_RESOLVE_2_KHR = IMAGE_RESOLVE_2,
+ SUBRESOURCE_LAYOUT_2_EXT = SUBRESOURCE_LAYOUT_2_KHR,
+ IMAGE_SUBRESOURCE_2_EXT = IMAGE_SUBRESOURCE_2_KHR,
PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT,
PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT,
MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT,
@@ -3428,15 +3803,17 @@ StructureType :: enum c.int {
SubgroupFeatureFlags :: distinct bit_set[SubgroupFeatureFlag; Flags]
SubgroupFeatureFlag :: enum Flags {
- BASIC = 0,
- VOTE = 1,
- ARITHMETIC = 2,
- BALLOT = 3,
- SHUFFLE = 4,
- SHUFFLE_RELATIVE = 5,
- CLUSTERED = 6,
- QUAD = 7,
- PARTITIONED_NV = 8,
+ BASIC = 0,
+ VOTE = 1,
+ ARITHMETIC = 2,
+ BALLOT = 3,
+ SHUFFLE = 4,
+ SHUFFLE_RELATIVE = 5,
+ CLUSTERED = 6,
+ QUAD = 7,
+ PARTITIONED_NV = 8,
+ ROTATE_KHR = 9,
+ ROTATE_CLUSTERED_KHR = 10,
}
SubmitFlags :: distinct bit_set[SubmitFlag; Flags]
@@ -3446,8 +3823,10 @@ SubmitFlag :: enum Flags {
}
SubpassContents :: enum c.int {
- INLINE = 0,
- SECONDARY_COMMAND_BUFFERS = 1,
+ INLINE = 0,
+ SECONDARY_COMMAND_BUFFERS = 1,
+ INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR = 1000451000,
+ INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT = INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR,
}
SubpassDescriptionFlags :: distinct bit_set[SubpassDescriptionFlag; Flags]
@@ -3523,11 +3902,15 @@ TessellationDomainOrigin :: enum c.int {
LOWER_LEFT_KHR = LOWER_LEFT,
}
-TimeDomainEXT :: enum c.int {
- DEVICE = 0,
- CLOCK_MONOTONIC = 1,
- CLOCK_MONOTONIC_RAW = 2,
- QUERY_PERFORMANCE_COUNTER = 3,
+TimeDomainKHR :: enum c.int {
+ DEVICE = 0,
+ CLOCK_MONOTONIC = 1,
+ CLOCK_MONOTONIC_RAW = 2,
+ QUERY_PERFORMANCE_COUNTER = 3,
+ DEVICE_EXT = DEVICE,
+ CLOCK_MONOTONIC_EXT = CLOCK_MONOTONIC,
+ CLOCK_MONOTONIC_RAW_EXT = CLOCK_MONOTONIC_RAW,
+ QUERY_PERFORMANCE_COUNTER_EXT = QUERY_PERFORMANCE_COUNTER,
}
ToolPurposeFlags :: distinct bit_set[ToolPurposeFlag; Flags]
@@ -3575,6 +3958,7 @@ ValidationFeatureEnableEXT :: enum c.int {
}
VendorId :: enum c.int {
+ KHRONOS = 0x10000,
VIV = 0x10001,
VSI = 0x10002,
KAZAN = 0x10003,
@@ -3589,6 +3973,39 @@ VertexInputRate :: enum c.int {
INSTANCE = 1,
}
+VideoAV1ChromaSamplePosition :: enum c.int {
+}
+
+VideoAV1ColorPrimaries :: enum c.int {
+}
+
+VideoAV1FrameRestorationType :: enum c.int {
+}
+
+VideoAV1FrameType :: enum c.int {
+}
+
+VideoAV1InterpolationFilter :: enum c.int {
+}
+
+VideoAV1Level :: enum c.int {
+}
+
+VideoAV1MatrixCoefficients :: enum c.int {
+}
+
+VideoAV1Profile :: enum c.int {
+}
+
+VideoAV1ReferenceName :: enum c.int {
+}
+
+VideoAV1TransferCharacteristics :: enum c.int {
+}
+
+VideoAV1TxMode :: enum c.int {
+}
+
VideoCapabilityFlagsKHR :: distinct bit_set[VideoCapabilityFlagKHR; Flags]
VideoCapabilityFlagKHR :: enum Flags {
PROTECTED_CONTENT = 0,
@@ -3608,10 +4025,11 @@ VideoChromaSubsamplingFlagsKHR_INVALID :: VideoChromaSubsamplingFlagsKHR{}
VideoCodecOperationFlagsKHR :: distinct bit_set[VideoCodecOperationFlagKHR; Flags]
VideoCodecOperationFlagKHR :: enum Flags {
- ENCODE_H264_EXT = 16,
- ENCODE_H265_EXT = 17,
- DECODE_H264 = 0,
- DECODE_H265 = 1,
+ ENCODE_H264 = 16,
+ ENCODE_H265 = 17,
+ DECODE_H264 = 0,
+ DECODE_H265 = 1,
+ DECODE_AV1 = 2,
}
VideoCodecOperationFlagsKHR_NONE :: VideoCodecOperationFlagsKHR{}
@@ -3619,9 +4037,9 @@ VideoCodecOperationFlagsKHR_NONE :: VideoCodecOperationFlagsKHR{}
VideoCodingControlFlagsKHR :: distinct bit_set[VideoCodingControlFlagKHR; Flags]
VideoCodingControlFlagKHR :: enum Flags {
- RESET = 0,
- ENCODE_RATE_CONTROL = 1,
- ENCODE_RATE_CONTROL_LAYER = 2,
+ RESET = 0,
+ ENCODE_RATE_CONTROL = 1,
+ ENCODE_QUALITY_LEVEL = 2,
}
VideoComponentBitDepthFlagsKHR :: distinct bit_set[VideoComponentBitDepthFlagKHR; Flags]
@@ -3662,6 +4080,167 @@ VideoDecodeUsageFlagKHR :: enum Flags {
VideoDecodeUsageFlagsKHR_DEFAULT :: VideoDecodeUsageFlagsKHR{}
+VideoEncodeCapabilityFlagsKHR :: distinct bit_set[VideoEncodeCapabilityFlagKHR; Flags]
+VideoEncodeCapabilityFlagKHR :: enum Flags {
+ PRECEDING_EXTERNALLY_ENCODED_BYTES = 0,
+ INSUFFICIENTSTREAM_BUFFER_RANGE_DETECTION = 1,
+}
+
+VideoEncodeContentFlagsKHR :: distinct bit_set[VideoEncodeContentFlagKHR; Flags]
+VideoEncodeContentFlagKHR :: enum Flags {
+ CAMERA = 0,
+ DESKTOP = 1,
+ RENDERED = 2,
+}
+
+VideoEncodeContentFlagsKHR_DEFAULT :: VideoEncodeContentFlagsKHR{}
+
+
+VideoEncodeFeedbackFlagsKHR :: distinct bit_set[VideoEncodeFeedbackFlagKHR; Flags]
+VideoEncodeFeedbackFlagKHR :: enum Flags {
+ BITSTREAM_BUFFER_OFFSET = 0,
+ BITSTREAM_BYTES_WRITTEN = 1,
+ BITSTREAM_HAS_OVERRIDES = 2,
+}
+
+VideoEncodeH264CapabilityFlagsKHR :: distinct bit_set[VideoEncodeH264CapabilityFlagKHR; Flags]
+VideoEncodeH264CapabilityFlagKHR :: enum Flags {
+ HRD_COMPLIANCE = 0,
+ PREDICTION_WEIGHT_TABLE_GENERATED = 1,
+ ROW_UNALIGNED_SLICE = 2,
+ DIFFERENT_SLICE_TYPE = 3,
+ B_FRAME_IN_L0_LIST = 4,
+ B_FRAME_IN_L1_LIST = 5,
+ PER_PICTURE_TYPE_MIN_MAX_QP = 6,
+ PER_SLICE_CONSTANT_QP = 7,
+ GENERATE_PREFIX_NALU = 8,
+}
+
+VideoEncodeH264RateControlFlagsKHR :: distinct bit_set[VideoEncodeH264RateControlFlagKHR; Flags]
+VideoEncodeH264RateControlFlagKHR :: enum Flags {
+ ATTEMPT_HRD_COMPLIANCE = 0,
+ REGULAR_GOP = 1,
+ REFERENCE_PATTERN_FLAT = 2,
+ REFERENCE_PATTERN_DYADIC = 3,
+ TEMPORAL_LAYER_PATTERN_DYADIC = 4,
+}
+
+VideoEncodeH264StdFlagsKHR :: distinct bit_set[VideoEncodeH264StdFlagKHR; Flags]
+VideoEncodeH264StdFlagKHR :: enum Flags {
+ SEPARATE_COLOR_PLANE_FLAG_SET = 0,
+ QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET = 1,
+ SCALING_MATRIX_PRESENT_FLAG_SET = 2,
+ CHROMA_QP_INDEX_OFFSET = 3,
+ SECOND_CHROMA_QP_INDEX_OFFSET = 4,
+ PIC_INIT_QP_MINUS26 = 5,
+ WEIGHTED_PRED_FLAG_SET = 6,
+ WEIGHTED_BIPRED_IDC_EXPLICIT = 7,
+ WEIGHTED_BIPRED_IDC_IMPLICIT = 8,
+ TRANSFORM_8X8_MODE_FLAG_SET = 9,
+ DIRECT_SPATIAL_MV_PRED_FLAG_UNSET = 10,
+ ENTROPY_CODING_MODE_FLAG_UNSET = 11,
+ ENTROPY_CODING_MODE_FLAG_SET = 12,
+ DIRECT_8X8_INFERENCE_FLAG_UNSET = 13,
+ CONSTRAINED_INTRA_PRED_FLAG_SET = 14,
+ DEBLOCKING_FILTER_DISABLED = 15,
+ DEBLOCKING_FILTER_ENABLED = 16,
+ DEBLOCKING_FILTER_PARTIAL = 17,
+ SLICE_QP_DELTA = 19,
+ DIFFERENT_SLICE_QP_DELTA = 20,
+}
+
+VideoEncodeH265CapabilityFlagsKHR :: distinct bit_set[VideoEncodeH265CapabilityFlagKHR; Flags]
+VideoEncodeH265CapabilityFlagKHR :: enum Flags {
+ HRD_COMPLIANCE = 0,
+ PREDICTION_WEIGHT_TABLE_GENERATED = 1,
+ ROW_UNALIGNED_SLICE_SEGMENT = 2,
+ DIFFERENT_SLICE_SEGMENT_TYPE = 3,
+ B_FRAME_IN_L0_LIST = 4,
+ B_FRAME_IN_L1_LIST = 5,
+ PER_PICTURE_TYPE_MIN_MAX_QP = 6,
+ PER_SLICE_SEGMENT_CONSTANT_QP = 7,
+ MULTIPLE_TILES_PER_SLICE_SEGMENT = 8,
+ MULTIPLE_SLICE_SEGMENTS_PER_TILE = 9,
+}
+
+VideoEncodeH265CtbSizeFlagsKHR :: distinct bit_set[VideoEncodeH265CtbSizeFlagKHR; Flags]
+VideoEncodeH265CtbSizeFlagKHR :: enum Flags {
+ _16 = 0,
+ _32 = 1,
+ _64 = 2,
+}
+
+VideoEncodeH265RateControlFlagsKHR :: distinct bit_set[VideoEncodeH265RateControlFlagKHR; Flags]
+VideoEncodeH265RateControlFlagKHR :: enum Flags {
+ ATTEMPT_HRD_COMPLIANCE = 0,
+ REGULAR_GOP = 1,
+ REFERENCE_PATTERN_FLAT = 2,
+ REFERENCE_PATTERN_DYADIC = 3,
+ TEMPORAL_SUB_LAYER_PATTERN_DYADIC = 4,
+}
+
+VideoEncodeH265StdFlagsKHR :: distinct bit_set[VideoEncodeH265StdFlagKHR; Flags]
+VideoEncodeH265StdFlagKHR :: enum Flags {
+ SEPARATE_COLOR_PLANE_FLAG_SET = 0,
+ SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET = 1,
+ SCALING_LIST_DATA_PRESENT_FLAG_SET = 2,
+ PCM_ENABLED_FLAG_SET = 3,
+ SPS_TEMPORAL_MVP_ENABLED_FLAG_SET = 4,
+ INIT_QP_MINUS26 = 5,
+ WEIGHTED_PRED_FLAG_SET = 6,
+ WEIGHTED_BIPRED_FLAG_SET = 7,
+ LOG2_PARALLEL_MERGE_LEVEL_MINUS2 = 8,
+ SIGN_DATA_HIDING_ENABLED_FLAG_SET = 9,
+ TRANSFORM_SKIP_ENABLED_FLAG_SET = 10,
+ TRANSFORM_SKIP_ENABLED_FLAG_UNSET = 11,
+ PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET = 12,
+ TRANSQUANT_BYPASS_ENABLED_FLAG_SET = 13,
+ CONSTRAINED_INTRA_PRED_FLAG_SET = 14,
+ ENTROPY_CODING_SYNC_ENABLED_FLAG_SET = 15,
+ DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET = 16,
+ DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET = 17,
+ DEPENDENT_SLICE_SEGMENT_FLAG_SET = 18,
+ SLICE_QP_DELTA = 19,
+ DIFFERENT_SLICE_QP_DELTA = 20,
+}
+
+VideoEncodeH265TransformBlockSizeFlagsKHR :: distinct bit_set[VideoEncodeH265TransformBlockSizeFlagKHR; Flags]
+VideoEncodeH265TransformBlockSizeFlagKHR :: enum Flags {
+ _4 = 0,
+ _8 = 1,
+ _16 = 2,
+ _32 = 3,
+}
+
+VideoEncodeRateControlModeFlagsKHR :: distinct bit_set[VideoEncodeRateControlModeFlagKHR; Flags]
+VideoEncodeRateControlModeFlagKHR :: enum Flags {
+ DISABLED = 0,
+ CBR = 1,
+ VBR = 2,
+}
+
+VideoEncodeRateControlModeFlagsKHR_DEFAULT :: VideoEncodeRateControlModeFlagsKHR{}
+
+
+VideoEncodeTuningModeKHR :: enum c.int {
+ DEFAULT = 0,
+ HIGH_QUALITY = 1,
+ LOW_LATENCY = 2,
+ ULTRA_LOW_LATENCY = 3,
+ LOSSLESS = 4,
+}
+
+VideoEncodeUsageFlagsKHR :: distinct bit_set[VideoEncodeUsageFlagKHR; Flags]
+VideoEncodeUsageFlagKHR :: enum Flags {
+ TRANSCODING = 0,
+ STREAMING = 1,
+ RECORDING = 2,
+ CONFERENCING = 3,
+}
+
+VideoEncodeUsageFlagsKHR_DEFAULT :: VideoEncodeUsageFlagsKHR{}
+
+
VideoH264AspectRatioIdc :: enum c.int {
}
@@ -3721,7 +4300,9 @@ VideoH265SliceType :: enum c.int {
VideoSessionCreateFlagsKHR :: distinct bit_set[VideoSessionCreateFlagKHR; Flags]
VideoSessionCreateFlagKHR :: enum Flags {
- PROTECTED_CONTENT = 0,
+ PROTECTED_CONTENT = 0,
+ ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS = 1,
+ INLINE_QUERIES = 2,
}
ViewportCoordinateSwizzleNV :: enum c.int {
@@ -3767,10 +4348,6 @@ IOSSurfaceCreateFlagsMVK :: distinct bit_set[IOSSurf
IOSSurfaceCreateFlagMVK :: enum u32 {}
MacOSSurfaceCreateFlagsMVK :: distinct bit_set[MacOSSurfaceCreateFlagMVK; Flags]
MacOSSurfaceCreateFlagMVK :: enum u32 {}
-MemoryMapFlags :: distinct bit_set[MemoryMapFlag; Flags]
-MemoryMapFlag :: enum u32 {}
-MemoryUnmapFlagsKHR :: distinct bit_set[MemoryUnmapFlagKHR; Flags]
-MemoryUnmapFlagKHR :: enum u32 {}
MetalSurfaceCreateFlagsEXT :: distinct bit_set[MetalSurfaceCreateFlagEXT; Flags]
MetalSurfaceCreateFlagEXT :: enum u32 {}
PipelineCoverageModulationStateCreateFlagsNV :: distinct bit_set[PipelineCoverageModulationStateCreateFlagNV; Flags]
@@ -3817,6 +4394,10 @@ VideoBeginCodingFlagsKHR :: distinct bit_set[VideoBe
VideoBeginCodingFlagKHR :: enum u32 {}
VideoDecodeFlagsKHR :: distinct bit_set[VideoDecodeFlagKHR; Flags]
VideoDecodeFlagKHR :: enum u32 {}
+VideoEncodeFlagsKHR :: distinct bit_set[VideoEncodeFlagKHR; Flags]
+VideoEncodeFlagKHR :: enum u32 {}
+VideoEncodeRateControlFlagsKHR :: distinct bit_set[VideoEncodeRateControlFlagKHR; Flags]
+VideoEncodeRateControlFlagKHR :: enum u32 {}
VideoEndCodingFlagsKHR :: distinct bit_set[VideoEndCodingFlagKHR; Flags]
VideoEndCodingFlagKHR :: enum u32 {}
VideoSessionParametersCreateFlagsKHR :: distinct bit_set[VideoSessionParametersCreateFlagKHR; Flags]
@@ -3877,6 +4458,8 @@ AccessFlag2 :: enum Flags64 {
CONDITIONAL_RENDERING_READ_EXT = 20,
COMMAND_PREPROCESS_READ_NV = 17,
COMMAND_PREPROCESS_WRITE_NV = 18,
+ COMMAND_PREPROCESS_READ_EXT = 17,
+ COMMAND_PREPROCESS_WRITE_EXT = 18,
FRAGMENT_SHADING_RATE_ATTACHMENT_READ_KHR = 23,
SHADING_RATE_IMAGE_READ_NV = 23,
ACCELERATION_STRUCTURE_READ_KHR = 21,
@@ -3955,6 +4538,7 @@ FormatFeatureFlag2 :: enum Flags64 {
ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR = 29,
FRAGMENT_DENSITY_MAP_EXT = 24,
FRAGMENT_SHADING_RATE_ATTACHMENT_KHR = 30,
+ HOST_IMAGE_TRANSFER_EXT = 46,
VIDEO_ENCODE_INPUT_KHR = 27,
VIDEO_ENCODE_DPB_KHR = 28,
LINEAR_COLOR_ATTACHMENT_NV = 38,
@@ -4024,6 +4608,7 @@ PipelineStageFlag2 :: enum Flags64 {
TRANSFORM_FEEDBACK_EXT = 24,
CONDITIONAL_RENDERING_EXT = 18,
COMMAND_PREPROCESS_NV = 17,
+ COMMAND_PREPROCESS_EXT = 17,
FRAGMENT_SHADING_RATE_ATTACHMENT_KHR = 22,
SHADING_RATE_IMAGE_NV = 22,
ACCELERATION_STRUCTURE_BUILD_KHR = 25,
@@ -4035,6 +4620,7 @@ PipelineStageFlag2 :: enum Flags64 {
MESH_SHADER_NV = 20,
TASK_SHADER_EXT = 19,
MESH_SHADER_EXT = 20,
+ SUBPASS_SHADER_HUAWEI = 39,
SUBPASS_SHADING_HUAWEI = 39,
INVOCATION_MASK_HUAWEI = 40,
ACCELERATION_STRUCTURE_COPY_KHR = 28,
diff --git a/vendor/vulkan/procedures.odin b/vendor/vulkan/procedures.odin
index bec421f29..813827c83 100644
--- a/vendor/vulkan/procedures.odin
+++ b/vendor/vulkan/procedures.odin
@@ -55,7 +55,9 @@ ProcGetDisplayPlaneSupportedDisplaysKHR :: #type pro
ProcGetDrmDisplayEXT :: #type proc "system" (physicalDevice: PhysicalDevice, drmFd: i32, connectorId: u32, display: ^DisplayKHR) -> Result
ProcGetInstanceProcAddr :: #type proc "system" (instance: Instance, pName: cstring) -> ProcVoidFunction
ProcGetInstanceProcAddrLUNARG :: #type proc "system" (instance: Instance, pName: cstring) -> ProcVoidFunction
-ProcGetPhysicalDeviceCalibrateableTimeDomainsEXT :: #type proc "system" (physicalDevice: PhysicalDevice, pTimeDomainCount: ^u32, pTimeDomains: [^]TimeDomainEXT) -> Result
+ProcGetPhysicalDeviceCalibrateableTimeDomainsEXT :: #type proc "system" (physicalDevice: PhysicalDevice, pTimeDomainCount: ^u32, pTimeDomains: [^]TimeDomainKHR) -> Result
+ProcGetPhysicalDeviceCalibrateableTimeDomainsKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pTimeDomainCount: ^u32, pTimeDomains: [^]TimeDomainKHR) -> Result
+ProcGetPhysicalDeviceCooperativeMatrixPropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]CooperativeMatrixPropertiesKHR) -> Result
ProcGetPhysicalDeviceCooperativeMatrixPropertiesNV :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]CooperativeMatrixPropertiesNV) -> Result
ProcGetPhysicalDeviceDisplayPlaneProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]DisplayPlaneProperties2KHR) -> Result
ProcGetPhysicalDeviceDisplayPlanePropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]DisplayPlanePropertiesKHR) -> Result
@@ -106,6 +108,7 @@ ProcGetPhysicalDeviceSurfaceSupportKHR :: #type pro
ProcGetPhysicalDeviceToolProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pToolCount: ^u32, pToolProperties: [^]PhysicalDeviceToolProperties) -> Result
ProcGetPhysicalDeviceToolPropertiesEXT :: #type proc "system" (physicalDevice: PhysicalDevice, pToolCount: ^u32, pToolProperties: [^]PhysicalDeviceToolProperties) -> Result
ProcGetPhysicalDeviceVideoCapabilitiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pVideoProfile: ^VideoProfileInfoKHR, pCapabilities: [^]VideoCapabilitiesKHR) -> Result
+ProcGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pQualityLevelInfo: ^PhysicalDeviceVideoEncodeQualityLevelInfoKHR, pQualityLevelProperties: [^]VideoEncodeQualityLevelPropertiesKHR) -> Result
ProcGetPhysicalDeviceVideoFormatPropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pVideoFormatInfo: ^PhysicalDeviceVideoFormatInfoKHR, pVideoFormatPropertyCount: ^u32, pVideoFormatProperties: [^]VideoFormatPropertiesKHR) -> Result
ProcGetPhysicalDeviceWaylandPresentationSupportKHR :: #type proc "system" (physicalDevice: PhysicalDevice, queueFamilyIndex: u32, display: ^wl_display) -> b32
ProcGetPhysicalDeviceWin32PresentationSupportKHR :: #type proc "system" (physicalDevice: PhysicalDevice, queueFamilyIndex: u32) -> b32
@@ -122,6 +125,7 @@ ProcAcquireProfilingLockKHR :: #type proc "system
ProcAllocateCommandBuffers :: #type proc "system" (device: Device, pAllocateInfo: ^CommandBufferAllocateInfo, pCommandBuffers: [^]CommandBuffer) -> Result
ProcAllocateDescriptorSets :: #type proc "system" (device: Device, pAllocateInfo: ^DescriptorSetAllocateInfo, pDescriptorSets: [^]DescriptorSet) -> Result
ProcAllocateMemory :: #type proc "system" (device: Device, pAllocateInfo: ^MemoryAllocateInfo, pAllocator: ^AllocationCallbacks, pMemory: ^DeviceMemory) -> Result
+ProcAntiLagUpdateAMD :: #type proc "system" (device: Device, pData: ^AntiLagDataAMD)
ProcBeginCommandBuffer :: #type proc "system" (commandBuffer: CommandBuffer, pBeginInfo: ^CommandBufferBeginInfo) -> Result
ProcBindAccelerationStructureMemoryNV :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindAccelerationStructureMemoryInfoNV) -> Result
ProcBindBufferMemory :: #type proc "system" (device: Device, buffer: Buffer, memory: DeviceMemory, memoryOffset: DeviceSize) -> Result
@@ -145,10 +149,13 @@ ProcCmdBeginRendering :: #type proc "system
ProcCmdBeginRenderingKHR :: #type proc "system" (commandBuffer: CommandBuffer, pRenderingInfo: ^RenderingInfo)
ProcCmdBeginTransformFeedbackEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstCounterBuffer: u32, counterBufferCount: u32, pCounterBuffers: [^]Buffer, pCounterBufferOffsets: [^]DeviceSize)
ProcCmdBeginVideoCodingKHR :: #type proc "system" (commandBuffer: CommandBuffer, pBeginInfo: ^VideoBeginCodingInfoKHR)
+ProcCmdBindDescriptorBufferEmbeddedSamplers2EXT :: #type proc "system" (commandBuffer: CommandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo: ^BindDescriptorBufferEmbeddedSamplersInfoEXT)
ProcCmdBindDescriptorBufferEmbeddedSamplersEXT :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, layout: PipelineLayout, set: u32)
ProcCmdBindDescriptorBuffersEXT :: #type proc "system" (commandBuffer: CommandBuffer, bufferCount: u32, pBindingInfos: [^]DescriptorBufferBindingInfoEXT)
ProcCmdBindDescriptorSets :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, layout: PipelineLayout, firstSet: u32, descriptorSetCount: u32, pDescriptorSets: [^]DescriptorSet, dynamicOffsetCount: u32, pDynamicOffsets: [^]u32)
+ProcCmdBindDescriptorSets2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pBindDescriptorSetsInfo: ^BindDescriptorSetsInfoKHR)
ProcCmdBindIndexBuffer :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, indexType: IndexType)
+ProcCmdBindIndexBuffer2KHR :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, size: DeviceSize, indexType: IndexType)
ProcCmdBindInvocationMaskHUAWEI :: #type proc "system" (commandBuffer: CommandBuffer, imageView: ImageView, imageLayout: ImageLayout)
ProcCmdBindPipeline :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, pipeline: Pipeline)
ProcCmdBindPipelineShaderGroupNV :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, pipeline: Pipeline, groupIndex: u32)
@@ -192,6 +199,7 @@ ProcCmdCopyMicromapEXT :: #type proc "system
ProcCmdCopyMicromapToMemoryEXT :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^CopyMicromapToMemoryInfoEXT)
ProcCmdCopyQueryPoolResults :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, firstQuery: u32, queryCount: u32, dstBuffer: Buffer, dstOffset: DeviceSize, stride: DeviceSize, flags: QueryResultFlags)
ProcCmdCuLaunchKernelNVX :: #type proc "system" (commandBuffer: CommandBuffer, pLaunchInfo: ^CuLaunchInfoNVX)
+ProcCmdCudaLaunchKernelNV :: #type proc "system" (commandBuffer: CommandBuffer, pLaunchInfo: ^CudaLaunchInfoNV)
ProcCmdDebugMarkerBeginEXT :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^DebugMarkerMarkerInfoEXT)
ProcCmdDebugMarkerEndEXT :: #type proc "system" (commandBuffer: CommandBuffer)
ProcCmdDebugMarkerInsertEXT :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^DebugMarkerMarkerInfoEXT)
@@ -223,6 +231,7 @@ ProcCmdDrawMeshTasksIndirectNV :: #type proc "system
ProcCmdDrawMeshTasksNV :: #type proc "system" (commandBuffer: CommandBuffer, taskCount: u32, firstTask: u32)
ProcCmdDrawMultiEXT :: #type proc "system" (commandBuffer: CommandBuffer, drawCount: u32, pVertexInfo: ^MultiDrawInfoEXT, instanceCount: u32, firstInstance: u32, stride: u32)
ProcCmdDrawMultiIndexedEXT :: #type proc "system" (commandBuffer: CommandBuffer, drawCount: u32, pIndexInfo: ^MultiDrawIndexedInfoEXT, instanceCount: u32, firstInstance: u32, stride: u32, pVertexOffset: ^i32)
+ProcCmdEncodeVideoKHR :: #type proc "system" (commandBuffer: CommandBuffer, pEncodeInfo: ^VideoEncodeInfoKHR)
ProcCmdEndConditionalRenderingEXT :: #type proc "system" (commandBuffer: CommandBuffer)
ProcCmdEndDebugUtilsLabelEXT :: #type proc "system" (commandBuffer: CommandBuffer)
ProcCmdEndQuery :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32)
@@ -235,6 +244,7 @@ ProcCmdEndRenderingKHR :: #type proc "system
ProcCmdEndTransformFeedbackEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstCounterBuffer: u32, counterBufferCount: u32, pCounterBuffers: [^]Buffer, pCounterBufferOffsets: [^]DeviceSize)
ProcCmdEndVideoCodingKHR :: #type proc "system" (commandBuffer: CommandBuffer, pEndCodingInfo: ^VideoEndCodingInfoKHR)
ProcCmdExecuteCommands :: #type proc "system" (commandBuffer: CommandBuffer, commandBufferCount: u32, pCommandBuffers: [^]CommandBuffer)
+ProcCmdExecuteGeneratedCommandsEXT :: #type proc "system" (commandBuffer: CommandBuffer, isPreprocessed: b32, pGeneratedCommandsInfo: ^GeneratedCommandsInfoEXT)
ProcCmdExecuteGeneratedCommandsNV :: #type proc "system" (commandBuffer: CommandBuffer, isPreprocessed: b32, pGeneratedCommandsInfo: ^GeneratedCommandsInfoNV)
ProcCmdFillBuffer :: #type proc "system" (commandBuffer: CommandBuffer, dstBuffer: Buffer, dstOffset: DeviceSize, size: DeviceSize, data: u32)
ProcCmdInsertDebugUtilsLabelEXT :: #type proc "system" (commandBuffer: CommandBuffer, pLabelInfo: ^DebugUtilsLabelEXT)
@@ -245,9 +255,13 @@ ProcCmdOpticalFlowExecuteNV :: #type proc "system
ProcCmdPipelineBarrier :: #type proc "system" (commandBuffer: CommandBuffer, srcStageMask: PipelineStageFlags, dstStageMask: PipelineStageFlags, dependencyFlags: DependencyFlags, memoryBarrierCount: u32, pMemoryBarriers: [^]MemoryBarrier, bufferMemoryBarrierCount: u32, pBufferMemoryBarriers: [^]BufferMemoryBarrier, imageMemoryBarrierCount: u32, pImageMemoryBarriers: [^]ImageMemoryBarrier)
ProcCmdPipelineBarrier2 :: #type proc "system" (commandBuffer: CommandBuffer, pDependencyInfo: ^DependencyInfo)
ProcCmdPipelineBarrier2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pDependencyInfo: ^DependencyInfo)
+ProcCmdPreprocessGeneratedCommandsEXT :: #type proc "system" (commandBuffer: CommandBuffer, pGeneratedCommandsInfo: ^GeneratedCommandsInfoEXT, stateCommandBuffer: CommandBuffer)
ProcCmdPreprocessGeneratedCommandsNV :: #type proc "system" (commandBuffer: CommandBuffer, pGeneratedCommandsInfo: ^GeneratedCommandsInfoNV)
ProcCmdPushConstants :: #type proc "system" (commandBuffer: CommandBuffer, layout: PipelineLayout, stageFlags: ShaderStageFlags, offset: u32, size: u32, pValues: rawptr)
+ProcCmdPushConstants2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pPushConstantsInfo: ^PushConstantsInfoKHR)
+ProcCmdPushDescriptorSet2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pPushDescriptorSetInfo: ^PushDescriptorSetInfoKHR)
ProcCmdPushDescriptorSetKHR :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, layout: PipelineLayout, set: u32, descriptorWriteCount: u32, pDescriptorWrites: [^]WriteDescriptorSet)
+ProcCmdPushDescriptorSetWithTemplate2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pPushDescriptorSetWithTemplateInfo: ^PushDescriptorSetWithTemplateInfoKHR)
ProcCmdPushDescriptorSetWithTemplateKHR :: #type proc "system" (commandBuffer: CommandBuffer, descriptorUpdateTemplate: DescriptorUpdateTemplate, layout: PipelineLayout, set: u32, pData: rawptr)
ProcCmdResetEvent :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, stageMask: PipelineStageFlags)
ProcCmdResetEvent2 :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, stageMask: PipelineStageFlags2)
@@ -276,12 +290,14 @@ ProcCmdSetCoverageToColorLocationNV :: #type proc "system
ProcCmdSetCullMode :: #type proc "system" (commandBuffer: CommandBuffer, cullMode: CullModeFlags)
ProcCmdSetCullModeEXT :: #type proc "system" (commandBuffer: CommandBuffer, cullMode: CullModeFlags)
ProcCmdSetDepthBias :: #type proc "system" (commandBuffer: CommandBuffer, depthBiasConstantFactor: f32, depthBiasClamp: f32, depthBiasSlopeFactor: f32)
+ProcCmdSetDepthBias2EXT :: #type proc "system" (commandBuffer: CommandBuffer, pDepthBiasInfo: ^DepthBiasInfoEXT)
ProcCmdSetDepthBiasEnable :: #type proc "system" (commandBuffer: CommandBuffer, depthBiasEnable: b32)
ProcCmdSetDepthBiasEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthBiasEnable: b32)
ProcCmdSetDepthBounds :: #type proc "system" (commandBuffer: CommandBuffer, minDepthBounds: f32, maxDepthBounds: f32)
ProcCmdSetDepthBoundsTestEnable :: #type proc "system" (commandBuffer: CommandBuffer, depthBoundsTestEnable: b32)
ProcCmdSetDepthBoundsTestEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthBoundsTestEnable: b32)
ProcCmdSetDepthClampEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthClampEnable: b32)
+ProcCmdSetDepthClampRangeEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthClampMode: DepthClampModeEXT, pDepthClampRange: ^DepthClampRangeEXT)
ProcCmdSetDepthClipEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthClipEnable: b32)
ProcCmdSetDepthClipNegativeOneToOneEXT :: #type proc "system" (commandBuffer: CommandBuffer, negativeOneToOne: b32)
ProcCmdSetDepthCompareOp :: #type proc "system" (commandBuffer: CommandBuffer, depthCompareOp: CompareOp)
@@ -290,6 +306,7 @@ ProcCmdSetDepthTestEnable :: #type proc "system
ProcCmdSetDepthTestEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthTestEnable: b32)
ProcCmdSetDepthWriteEnable :: #type proc "system" (commandBuffer: CommandBuffer, depthWriteEnable: b32)
ProcCmdSetDepthWriteEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthWriteEnable: b32)
+ProcCmdSetDescriptorBufferOffsets2EXT :: #type proc "system" (commandBuffer: CommandBuffer, pSetDescriptorBufferOffsetsInfo: ^SetDescriptorBufferOffsetsInfoEXT)
ProcCmdSetDescriptorBufferOffsetsEXT :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, layout: PipelineLayout, firstSet: u32, setCount: u32, pBufferIndices: [^]u32, pOffsets: [^]DeviceSize)
ProcCmdSetDeviceMask :: #type proc "system" (commandBuffer: CommandBuffer, deviceMask: u32)
ProcCmdSetDeviceMaskKHR :: #type proc "system" (commandBuffer: CommandBuffer, deviceMask: u32)
@@ -309,6 +326,7 @@ ProcCmdSetFrontFaceEXT :: #type proc "system
ProcCmdSetLineRasterizationModeEXT :: #type proc "system" (commandBuffer: CommandBuffer, lineRasterizationMode: LineRasterizationModeEXT)
ProcCmdSetLineStippleEXT :: #type proc "system" (commandBuffer: CommandBuffer, lineStippleFactor: u32, lineStipplePattern: u16)
ProcCmdSetLineStippleEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, stippledLineEnable: b32)
+ProcCmdSetLineStippleKHR :: #type proc "system" (commandBuffer: CommandBuffer, lineStippleFactor: u32, lineStipplePattern: u16)
ProcCmdSetLineWidth :: #type proc "system" (commandBuffer: CommandBuffer, lineWidth: f32)
ProcCmdSetLogicOpEXT :: #type proc "system" (commandBuffer: CommandBuffer, logicOp: LogicOp)
ProcCmdSetLogicOpEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, logicOpEnable: b32)
@@ -327,6 +345,8 @@ ProcCmdSetRasterizationStreamEXT :: #type proc "system
ProcCmdSetRasterizerDiscardEnable :: #type proc "system" (commandBuffer: CommandBuffer, rasterizerDiscardEnable: b32)
ProcCmdSetRasterizerDiscardEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, rasterizerDiscardEnable: b32)
ProcCmdSetRayTracingPipelineStackSizeKHR :: #type proc "system" (commandBuffer: CommandBuffer, pipelineStackSize: u32)
+ProcCmdSetRenderingAttachmentLocationsKHR :: #type proc "system" (commandBuffer: CommandBuffer, pLocationInfo: ^RenderingAttachmentLocationInfoKHR)
+ProcCmdSetRenderingInputAttachmentIndicesKHR :: #type proc "system" (commandBuffer: CommandBuffer, pInputAttachmentIndexInfo: ^RenderingInputAttachmentIndexInfoKHR)
ProcCmdSetRepresentativeFragmentTestEnableNV :: #type proc "system" (commandBuffer: CommandBuffer, representativeFragmentTestEnable: b32)
ProcCmdSetSampleLocationsEXT :: #type proc "system" (commandBuffer: CommandBuffer, pSampleLocationsInfo: ^SampleLocationsInfoEXT)
ProcCmdSetSampleLocationsEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, sampleLocationsEnable: b32)
@@ -357,6 +377,7 @@ ProcCmdTraceRaysIndirectKHR :: #type proc "system
ProcCmdTraceRaysKHR :: #type proc "system" (commandBuffer: CommandBuffer, pRaygenShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pMissShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pHitShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pCallableShaderBindingTable: [^]StridedDeviceAddressRegionKHR, width: u32, height: u32, depth: u32)
ProcCmdTraceRaysNV :: #type proc "system" (commandBuffer: CommandBuffer, raygenShaderBindingTableBuffer: Buffer, raygenShaderBindingOffset: DeviceSize, missShaderBindingTableBuffer: Buffer, missShaderBindingOffset: DeviceSize, missShaderBindingStride: DeviceSize, hitShaderBindingTableBuffer: Buffer, hitShaderBindingOffset: DeviceSize, hitShaderBindingStride: DeviceSize, callableShaderBindingTableBuffer: Buffer, callableShaderBindingOffset: DeviceSize, callableShaderBindingStride: DeviceSize, width: u32, height: u32, depth: u32)
ProcCmdUpdateBuffer :: #type proc "system" (commandBuffer: CommandBuffer, dstBuffer: Buffer, dstOffset: DeviceSize, dataSize: DeviceSize, pData: rawptr)
+ProcCmdUpdatePipelineIndirectBufferNV :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, pipeline: Pipeline)
ProcCmdWaitEvents :: #type proc "system" (commandBuffer: CommandBuffer, eventCount: u32, pEvents: [^]Event, srcStageMask: PipelineStageFlags, dstStageMask: PipelineStageFlags, memoryBarrierCount: u32, pMemoryBarriers: [^]MemoryBarrier, bufferMemoryBarrierCount: u32, pBufferMemoryBarriers: [^]BufferMemoryBarrier, imageMemoryBarrierCount: u32, pImageMemoryBarriers: [^]ImageMemoryBarrier)
ProcCmdWaitEvents2 :: #type proc "system" (commandBuffer: CommandBuffer, eventCount: u32, pEvents: [^]Event, pDependencyInfos: [^]DependencyInfo)
ProcCmdWaitEvents2KHR :: #type proc "system" (commandBuffer: CommandBuffer, eventCount: u32, pEvents: [^]Event, pDependencyInfos: [^]DependencyInfo)
@@ -371,7 +392,10 @@ ProcCmdWriteTimestamp2KHR :: #type proc "system
ProcCompileDeferredNV :: #type proc "system" (device: Device, pipeline: Pipeline, shader: u32) -> Result
ProcCopyAccelerationStructureKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyAccelerationStructureInfoKHR) -> Result
ProcCopyAccelerationStructureToMemoryKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyAccelerationStructureToMemoryInfoKHR) -> Result
+ProcCopyImageToImageEXT :: #type proc "system" (device: Device, pCopyImageToImageInfo: ^CopyImageToImageInfoEXT) -> Result
+ProcCopyImageToMemoryEXT :: #type proc "system" (device: Device, pCopyImageToMemoryInfo: ^CopyImageToMemoryInfoEXT) -> Result
ProcCopyMemoryToAccelerationStructureKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyMemoryToAccelerationStructureInfoKHR) -> Result
+ProcCopyMemoryToImageEXT :: #type proc "system" (device: Device, pCopyMemoryToImageInfo: ^CopyMemoryToImageInfoEXT) -> Result
ProcCopyMemoryToMicromapEXT :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyMemoryToMicromapInfoEXT) -> Result
ProcCopyMicromapEXT :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyMicromapInfoEXT) -> Result
ProcCopyMicromapToMemoryEXT :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyMicromapToMemoryInfoEXT) -> Result
@@ -383,6 +407,8 @@ ProcCreateCommandPool :: #type proc "system
ProcCreateComputePipelines :: #type proc "system" (device: Device, pipelineCache: PipelineCache, createInfoCount: u32, pCreateInfos: [^]ComputePipelineCreateInfo, pAllocator: ^AllocationCallbacks, pPipelines: [^]Pipeline) -> Result
ProcCreateCuFunctionNVX :: #type proc "system" (device: Device, pCreateInfo: ^CuFunctionCreateInfoNVX, pAllocator: ^AllocationCallbacks, pFunction: ^CuFunctionNVX) -> Result
ProcCreateCuModuleNVX :: #type proc "system" (device: Device, pCreateInfo: ^CuModuleCreateInfoNVX, pAllocator: ^AllocationCallbacks, pModule: ^CuModuleNVX) -> Result
+ProcCreateCudaFunctionNV :: #type proc "system" (device: Device, pCreateInfo: ^CudaFunctionCreateInfoNV, pAllocator: ^AllocationCallbacks, pFunction: ^CudaFunctionNV) -> Result
+ProcCreateCudaModuleNV :: #type proc "system" (device: Device, pCreateInfo: ^CudaModuleCreateInfoNV, pAllocator: ^AllocationCallbacks, pModule: ^CudaModuleNV) -> Result
ProcCreateDeferredOperationKHR :: #type proc "system" (device: Device, pAllocator: ^AllocationCallbacks, pDeferredOperation: ^DeferredOperationKHR) -> Result
ProcCreateDescriptorPool :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorPoolCreateInfo, pAllocator: ^AllocationCallbacks, pDescriptorPool: ^DescriptorPool) -> Result
ProcCreateDescriptorSetLayout :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorSetLayoutCreateInfo, pAllocator: ^AllocationCallbacks, pSetLayout: ^DescriptorSetLayout) -> Result
@@ -394,9 +420,12 @@ ProcCreateFramebuffer :: #type proc "system
ProcCreateGraphicsPipelines :: #type proc "system" (device: Device, pipelineCache: PipelineCache, createInfoCount: u32, pCreateInfos: [^]GraphicsPipelineCreateInfo, pAllocator: ^AllocationCallbacks, pPipelines: [^]Pipeline) -> Result
ProcCreateImage :: #type proc "system" (device: Device, pCreateInfo: ^ImageCreateInfo, pAllocator: ^AllocationCallbacks, pImage: ^Image) -> Result
ProcCreateImageView :: #type proc "system" (device: Device, pCreateInfo: ^ImageViewCreateInfo, pAllocator: ^AllocationCallbacks, pView: ^ImageView) -> Result
+ProcCreateIndirectCommandsLayoutEXT :: #type proc "system" (device: Device, pCreateInfo: ^IndirectCommandsLayoutCreateInfoEXT, pAllocator: ^AllocationCallbacks, pIndirectCommandsLayout: ^IndirectCommandsLayoutEXT) -> Result
ProcCreateIndirectCommandsLayoutNV :: #type proc "system" (device: Device, pCreateInfo: ^IndirectCommandsLayoutCreateInfoNV, pAllocator: ^AllocationCallbacks, pIndirectCommandsLayout: ^IndirectCommandsLayoutNV) -> Result
+ProcCreateIndirectExecutionSetEXT :: #type proc "system" (device: Device, pCreateInfo: ^IndirectExecutionSetCreateInfoEXT, pAllocator: ^AllocationCallbacks, pIndirectExecutionSet: ^IndirectExecutionSetEXT) -> Result
ProcCreateMicromapEXT :: #type proc "system" (device: Device, pCreateInfo: ^MicromapCreateInfoEXT, pAllocator: ^AllocationCallbacks, pMicromap: ^MicromapEXT) -> Result
ProcCreateOpticalFlowSessionNV :: #type proc "system" (device: Device, pCreateInfo: ^OpticalFlowSessionCreateInfoNV, pAllocator: ^AllocationCallbacks, pSession: ^OpticalFlowSessionNV) -> Result
+ProcCreatePipelineBinariesKHR :: #type proc "system" (device: Device, pCreateInfo: ^PipelineBinaryCreateInfoKHR, pAllocator: ^AllocationCallbacks, pBinaries: [^]PipelineBinaryHandlesInfoKHR) -> Result
ProcCreatePipelineCache :: #type proc "system" (device: Device, pCreateInfo: ^PipelineCacheCreateInfo, pAllocator: ^AllocationCallbacks, pPipelineCache: ^PipelineCache) -> Result
ProcCreatePipelineLayout :: #type proc "system" (device: Device, pCreateInfo: ^PipelineLayoutCreateInfo, pAllocator: ^AllocationCallbacks, pPipelineLayout: ^PipelineLayout) -> Result
ProcCreatePrivateDataSlot :: #type proc "system" (device: Device, pCreateInfo: ^PrivateDataSlotCreateInfo, pAllocator: ^AllocationCallbacks, pPrivateDataSlot: ^PrivateDataSlot) -> Result
@@ -428,6 +457,8 @@ ProcDestroyBufferView :: #type proc "system
ProcDestroyCommandPool :: #type proc "system" (device: Device, commandPool: CommandPool, pAllocator: ^AllocationCallbacks)
ProcDestroyCuFunctionNVX :: #type proc "system" (device: Device, function: CuFunctionNVX, pAllocator: ^AllocationCallbacks)
ProcDestroyCuModuleNVX :: #type proc "system" (device: Device, module: CuModuleNVX, pAllocator: ^AllocationCallbacks)
+ProcDestroyCudaFunctionNV :: #type proc "system" (device: Device, function: CudaFunctionNV, pAllocator: ^AllocationCallbacks)
+ProcDestroyCudaModuleNV :: #type proc "system" (device: Device, module: CudaModuleNV, pAllocator: ^AllocationCallbacks)
ProcDestroyDeferredOperationKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR, pAllocator: ^AllocationCallbacks)
ProcDestroyDescriptorPool :: #type proc "system" (device: Device, descriptorPool: DescriptorPool, pAllocator: ^AllocationCallbacks)
ProcDestroyDescriptorSetLayout :: #type proc "system" (device: Device, descriptorSetLayout: DescriptorSetLayout, pAllocator: ^AllocationCallbacks)
@@ -439,10 +470,13 @@ ProcDestroyFence :: #type proc "system
ProcDestroyFramebuffer :: #type proc "system" (device: Device, framebuffer: Framebuffer, pAllocator: ^AllocationCallbacks)
ProcDestroyImage :: #type proc "system" (device: Device, image: Image, pAllocator: ^AllocationCallbacks)
ProcDestroyImageView :: #type proc "system" (device: Device, imageView: ImageView, pAllocator: ^AllocationCallbacks)
+ProcDestroyIndirectCommandsLayoutEXT :: #type proc "system" (device: Device, indirectCommandsLayout: IndirectCommandsLayoutEXT, pAllocator: ^AllocationCallbacks)
ProcDestroyIndirectCommandsLayoutNV :: #type proc "system" (device: Device, indirectCommandsLayout: IndirectCommandsLayoutNV, pAllocator: ^AllocationCallbacks)
+ProcDestroyIndirectExecutionSetEXT :: #type proc "system" (device: Device, indirectExecutionSet: IndirectExecutionSetEXT, pAllocator: ^AllocationCallbacks)
ProcDestroyMicromapEXT :: #type proc "system" (device: Device, micromap: MicromapEXT, pAllocator: ^AllocationCallbacks)
ProcDestroyOpticalFlowSessionNV :: #type proc "system" (device: Device, session: OpticalFlowSessionNV, pAllocator: ^AllocationCallbacks)
ProcDestroyPipeline :: #type proc "system" (device: Device, pipeline: Pipeline, pAllocator: ^AllocationCallbacks)
+ProcDestroyPipelineBinaryKHR :: #type proc "system" (device: Device, pipelineBinary: PipelineBinaryKHR, pAllocator: ^AllocationCallbacks)
ProcDestroyPipelineCache :: #type proc "system" (device: Device, pipelineCache: PipelineCache, pAllocator: ^AllocationCallbacks)
ProcDestroyPipelineLayout :: #type proc "system" (device: Device, pipelineLayout: PipelineLayout, pAllocator: ^AllocationCallbacks)
ProcDestroyPrivateDataSlot :: #type proc "system" (device: Device, privateDataSlot: PrivateDataSlot, pAllocator: ^AllocationCallbacks)
@@ -481,7 +515,9 @@ ProcGetBufferMemoryRequirements2KHR :: #type proc "system
ProcGetBufferOpaqueCaptureAddress :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> u64
ProcGetBufferOpaqueCaptureAddressKHR :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> u64
ProcGetBufferOpaqueCaptureDescriptorDataEXT :: #type proc "system" (device: Device, pInfo: ^BufferCaptureDescriptorDataInfoEXT, pData: rawptr) -> Result
-ProcGetCalibratedTimestampsEXT :: #type proc "system" (device: Device, timestampCount: u32, pTimestampInfos: [^]CalibratedTimestampInfoEXT, pTimestamps: [^]u64, pMaxDeviation: ^u64) -> Result
+ProcGetCalibratedTimestampsEXT :: #type proc "system" (device: Device, timestampCount: u32, pTimestampInfos: [^]CalibratedTimestampInfoKHR, pTimestamps: [^]u64, pMaxDeviation: ^u64) -> Result
+ProcGetCalibratedTimestampsKHR :: #type proc "system" (device: Device, timestampCount: u32, pTimestampInfos: [^]CalibratedTimestampInfoKHR, pTimestamps: [^]u64, pMaxDeviation: ^u64) -> Result
+ProcGetCudaModuleCacheNV :: #type proc "system" (device: Device, module: CudaModuleNV, pCacheSize: ^int, pCacheData: rawptr) -> Result
ProcGetDeferredOperationMaxConcurrencyKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR) -> u32
ProcGetDeferredOperationResultKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR) -> Result
ProcGetDescriptorEXT :: #type proc "system" (device: Device, pDescriptorInfo: ^DescriptorGetInfoEXT, dataSize: int, pDescriptor: rawptr)
@@ -504,6 +540,7 @@ ProcGetDeviceImageMemoryRequirements :: #type proc "system
ProcGetDeviceImageMemoryRequirementsKHR :: #type proc "system" (device: Device, pInfo: ^DeviceImageMemoryRequirements, pMemoryRequirements: [^]MemoryRequirements2)
ProcGetDeviceImageSparseMemoryRequirements :: #type proc "system" (device: Device, pInfo: ^DeviceImageMemoryRequirements, pSparseMemoryRequirementCount: ^u32, pSparseMemoryRequirements: [^]SparseImageMemoryRequirements2)
ProcGetDeviceImageSparseMemoryRequirementsKHR :: #type proc "system" (device: Device, pInfo: ^DeviceImageMemoryRequirements, pSparseMemoryRequirementCount: ^u32, pSparseMemoryRequirements: [^]SparseImageMemoryRequirements2)
+ProcGetDeviceImageSubresourceLayoutKHR :: #type proc "system" (device: Device, pInfo: ^DeviceImageSubresourceInfoKHR, pLayout: ^SubresourceLayout2KHR)
ProcGetDeviceMemoryCommitment :: #type proc "system" (device: Device, memory: DeviceMemory, pCommittedMemoryInBytes: [^]DeviceSize)
ProcGetDeviceMemoryOpaqueCaptureAddress :: #type proc "system" (device: Device, pInfo: ^DeviceMemoryOpaqueCaptureAddressInfo) -> u64
ProcGetDeviceMemoryOpaqueCaptureAddressKHR :: #type proc "system" (device: Device, pInfo: ^DeviceMemoryOpaqueCaptureAddressInfo) -> u64
@@ -513,11 +550,13 @@ ProcGetDeviceQueue :: #type proc "system
ProcGetDeviceQueue2 :: #type proc "system" (device: Device, pQueueInfo: ^DeviceQueueInfo2, pQueue: ^Queue)
ProcGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI :: #type proc "system" (device: Device, renderpass: RenderPass, pMaxWorkgroupSize: ^Extent2D) -> Result
ProcGetDynamicRenderingTilePropertiesQCOM :: #type proc "system" (device: Device, pRenderingInfo: ^RenderingInfo, pProperties: [^]TilePropertiesQCOM) -> Result
+ProcGetEncodedVideoSessionParametersKHR :: #type proc "system" (device: Device, pVideoSessionParametersInfo: ^VideoEncodeSessionParametersGetInfoKHR, pFeedbackInfo: ^VideoEncodeSessionParametersFeedbackInfoKHR, pDataSize: ^int, pData: rawptr) -> Result
ProcGetEventStatus :: #type proc "system" (device: Device, event: Event) -> Result
ProcGetFenceFdKHR :: #type proc "system" (device: Device, pGetFdInfo: ^FenceGetFdInfoKHR, pFd: ^c.int) -> Result
ProcGetFenceStatus :: #type proc "system" (device: Device, fence: Fence) -> Result
ProcGetFenceWin32HandleKHR :: #type proc "system" (device: Device, pGetWin32HandleInfo: ^FenceGetWin32HandleInfoKHR, pHandle: ^HANDLE) -> Result
ProcGetFramebufferTilePropertiesQCOM :: #type proc "system" (device: Device, framebuffer: Framebuffer, pPropertiesCount: ^u32, pProperties: [^]TilePropertiesQCOM) -> Result
+ProcGetGeneratedCommandsMemoryRequirementsEXT :: #type proc "system" (device: Device, pInfo: ^GeneratedCommandsMemoryRequirementsInfoEXT, pMemoryRequirements: [^]MemoryRequirements2)
ProcGetGeneratedCommandsMemoryRequirementsNV :: #type proc "system" (device: Device, pInfo: ^GeneratedCommandsMemoryRequirementsInfoNV, pMemoryRequirements: [^]MemoryRequirements2)
ProcGetImageDrmFormatModifierPropertiesEXT :: #type proc "system" (device: Device, image: Image, pProperties: [^]ImageDrmFormatModifierPropertiesEXT) -> Result
ProcGetImageMemoryRequirements :: #type proc "system" (device: Device, image: Image, pMemoryRequirements: [^]MemoryRequirements)
@@ -528,10 +567,12 @@ ProcGetImageSparseMemoryRequirements :: #type proc "system
ProcGetImageSparseMemoryRequirements2 :: #type proc "system" (device: Device, pInfo: ^ImageSparseMemoryRequirementsInfo2, pSparseMemoryRequirementCount: ^u32, pSparseMemoryRequirements: [^]SparseImageMemoryRequirements2)
ProcGetImageSparseMemoryRequirements2KHR :: #type proc "system" (device: Device, pInfo: ^ImageSparseMemoryRequirementsInfo2, pSparseMemoryRequirementCount: ^u32, pSparseMemoryRequirements: [^]SparseImageMemoryRequirements2)
ProcGetImageSubresourceLayout :: #type proc "system" (device: Device, image: Image, pSubresource: ^ImageSubresource, pLayout: ^SubresourceLayout)
-ProcGetImageSubresourceLayout2EXT :: #type proc "system" (device: Device, image: Image, pSubresource: ^ImageSubresource2EXT, pLayout: ^SubresourceLayout2EXT)
+ProcGetImageSubresourceLayout2EXT :: #type proc "system" (device: Device, image: Image, pSubresource: ^ImageSubresource2KHR, pLayout: ^SubresourceLayout2KHR)
+ProcGetImageSubresourceLayout2KHR :: #type proc "system" (device: Device, image: Image, pSubresource: ^ImageSubresource2KHR, pLayout: ^SubresourceLayout2KHR)
ProcGetImageViewAddressNVX :: #type proc "system" (device: Device, imageView: ImageView, pProperties: [^]ImageViewAddressPropertiesNVX) -> Result
ProcGetImageViewHandleNVX :: #type proc "system" (device: Device, pInfo: ^ImageViewHandleInfoNVX) -> u32
ProcGetImageViewOpaqueCaptureDescriptorDataEXT :: #type proc "system" (device: Device, pInfo: ^ImageViewCaptureDescriptorDataInfoEXT, pData: rawptr) -> Result
+ProcGetLatencyTimingsNV :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pLatencyMarkerInfo: ^GetLatencyMarkerInfoNV)
ProcGetMemoryFdKHR :: #type proc "system" (device: Device, pGetFdInfo: ^MemoryGetFdInfoKHR, pFd: ^c.int) -> Result
ProcGetMemoryFdPropertiesKHR :: #type proc "system" (device: Device, handleType: ExternalMemoryHandleTypeFlags, fd: c.int, pMemoryFdProperties: [^]MemoryFdPropertiesKHR) -> Result
ProcGetMemoryHostPointerPropertiesEXT :: #type proc "system" (device: Device, handleType: ExternalMemoryHandleTypeFlags, pHostPointer: rawptr, pMemoryHostPointerProperties: [^]MemoryHostPointerPropertiesEXT) -> Result
@@ -542,10 +583,14 @@ ProcGetMemoryWin32HandlePropertiesKHR :: #type proc "system
ProcGetMicromapBuildSizesEXT :: #type proc "system" (device: Device, buildType: AccelerationStructureBuildTypeKHR, pBuildInfo: ^MicromapBuildInfoEXT, pSizeInfo: ^MicromapBuildSizesInfoEXT)
ProcGetPastPresentationTimingGOOGLE :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pPresentationTimingCount: ^u32, pPresentationTimings: [^]PastPresentationTimingGOOGLE) -> Result
ProcGetPerformanceParameterINTEL :: #type proc "system" (device: Device, parameter: PerformanceParameterTypeINTEL, pValue: ^PerformanceValueINTEL) -> Result
+ProcGetPipelineBinaryDataKHR :: #type proc "system" (device: Device, pInfo: ^PipelineBinaryDataInfoKHR, pPipelineBinaryKey: ^PipelineBinaryKeyKHR, pPipelineBinaryDataSize: ^int, pPipelineBinaryData: rawptr) -> Result
ProcGetPipelineCacheData :: #type proc "system" (device: Device, pipelineCache: PipelineCache, pDataSize: ^int, pData: rawptr) -> Result
ProcGetPipelineExecutableInternalRepresentationsKHR :: #type proc "system" (device: Device, pExecutableInfo: ^PipelineExecutableInfoKHR, pInternalRepresentationCount: ^u32, pInternalRepresentations: [^]PipelineExecutableInternalRepresentationKHR) -> Result
ProcGetPipelineExecutablePropertiesKHR :: #type proc "system" (device: Device, pPipelineInfo: ^PipelineInfoKHR, pExecutableCount: ^u32, pProperties: [^]PipelineExecutablePropertiesKHR) -> Result
ProcGetPipelineExecutableStatisticsKHR :: #type proc "system" (device: Device, pExecutableInfo: ^PipelineExecutableInfoKHR, pStatisticCount: ^u32, pStatistics: [^]PipelineExecutableStatisticKHR) -> Result
+ProcGetPipelineIndirectDeviceAddressNV :: #type proc "system" (device: Device, pInfo: ^PipelineIndirectDeviceAddressInfoNV) -> DeviceAddress
+ProcGetPipelineIndirectMemoryRequirementsNV :: #type proc "system" (device: Device, pCreateInfo: ^ComputePipelineCreateInfo, pMemoryRequirements: [^]MemoryRequirements2)
+ProcGetPipelineKeyKHR :: #type proc "system" (device: Device, pPipelineCreateInfo: ^PipelineCreateInfoKHR, pPipelineKey: ^PipelineBinaryKeyKHR) -> Result
ProcGetPipelinePropertiesEXT :: #type proc "system" (device: Device, pPipelineInfo: ^PipelineInfoEXT, pPipelineProperties: [^]BaseOutStructure) -> Result
ProcGetPrivateData :: #type proc "system" (device: Device, objectType: ObjectType, objectHandle: u64, privateDataSlot: PrivateDataSlot, pData: ^u64)
ProcGetPrivateDataEXT :: #type proc "system" (device: Device, objectType: ObjectType, objectHandle: u64, privateDataSlot: PrivateDataSlot, pData: ^u64)
@@ -558,6 +603,7 @@ ProcGetRayTracingShaderGroupHandlesNV :: #type proc "system
ProcGetRayTracingShaderGroupStackSizeKHR :: #type proc "system" (device: Device, pipeline: Pipeline, group: u32, groupShader: ShaderGroupShaderKHR) -> DeviceSize
ProcGetRefreshCycleDurationGOOGLE :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pDisplayTimingProperties: [^]RefreshCycleDurationGOOGLE) -> Result
ProcGetRenderAreaGranularity :: #type proc "system" (device: Device, renderPass: RenderPass, pGranularity: ^Extent2D)
+ProcGetRenderingAreaGranularityKHR :: #type proc "system" (device: Device, pRenderingAreaInfo: ^RenderingAreaInfoKHR, pGranularity: ^Extent2D)
ProcGetSamplerOpaqueCaptureDescriptorDataEXT :: #type proc "system" (device: Device, pInfo: ^SamplerCaptureDescriptorDataInfoEXT, pData: rawptr) -> Result
ProcGetSemaphoreCounterValue :: #type proc "system" (device: Device, semaphore: Semaphore, pValue: ^u64) -> Result
ProcGetSemaphoreCounterValueKHR :: #type proc "system" (device: Device, semaphore: Semaphore, pValue: ^u64) -> Result
@@ -578,6 +624,7 @@ ProcImportSemaphoreFdKHR :: #type proc "system
ProcImportSemaphoreWin32HandleKHR :: #type proc "system" (device: Device, pImportSemaphoreWin32HandleInfo: ^ImportSemaphoreWin32HandleInfoKHR) -> Result
ProcInitializePerformanceApiINTEL :: #type proc "system" (device: Device, pInitializeInfo: ^InitializePerformanceApiInfoINTEL) -> Result
ProcInvalidateMappedMemoryRanges :: #type proc "system" (device: Device, memoryRangeCount: u32, pMemoryRanges: [^]MappedMemoryRange) -> Result
+ProcLatencySleepNV :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pSleepInfo: ^LatencySleepInfoNV) -> Result
ProcMapMemory :: #type proc "system" (device: Device, memory: DeviceMemory, offset: DeviceSize, size: DeviceSize, flags: MemoryMapFlags, ppData: ^rawptr) -> Result
ProcMapMemory2KHR :: #type proc "system" (device: Device, pMemoryMapInfo: ^MemoryMapInfoKHR, ppData: ^rawptr) -> Result
ProcMergePipelineCaches :: #type proc "system" (device: Device, dstCache: PipelineCache, srcCacheCount: u32, pSrcCaches: [^]PipelineCache) -> Result
@@ -586,6 +633,7 @@ ProcQueueBeginDebugUtilsLabelEXT :: #type proc "system
ProcQueueBindSparse :: #type proc "system" (queue: Queue, bindInfoCount: u32, pBindInfo: ^BindSparseInfo, fence: Fence) -> Result
ProcQueueEndDebugUtilsLabelEXT :: #type proc "system" (queue: Queue)
ProcQueueInsertDebugUtilsLabelEXT :: #type proc "system" (queue: Queue, pLabelInfo: ^DebugUtilsLabelEXT)
+ProcQueueNotifyOutOfBandNV :: #type proc "system" (queue: Queue, pQueueTypeInfo: ^OutOfBandQueueTypeInfoNV)
ProcQueuePresentKHR :: #type proc "system" (queue: Queue, pPresentInfo: ^PresentInfoKHR) -> Result
ProcQueueSetPerformanceConfigurationINTEL :: #type proc "system" (queue: Queue, configuration: PerformanceConfigurationINTEL) -> Result
ProcQueueSubmit :: #type proc "system" (queue: Queue, submitCount: u32, pSubmits: [^]SubmitInfo, fence: Fence) -> Result
@@ -594,6 +642,7 @@ ProcQueueSubmit2KHR :: #type proc "system
ProcQueueWaitIdle :: #type proc "system" (queue: Queue) -> Result
ProcRegisterDeviceEventEXT :: #type proc "system" (device: Device, pDeviceEventInfo: ^DeviceEventInfoEXT, pAllocator: ^AllocationCallbacks, pFence: ^Fence) -> Result
ProcRegisterDisplayEventEXT :: #type proc "system" (device: Device, display: DisplayKHR, pDisplayEventInfo: ^DisplayEventInfoEXT, pAllocator: ^AllocationCallbacks, pFence: ^Fence) -> Result
+ProcReleaseCapturedPipelineDataKHR :: #type proc "system" (device: Device, pInfo: ^ReleaseCapturedPipelineDataInfoKHR, pAllocator: ^AllocationCallbacks) -> Result
ProcReleaseFullScreenExclusiveModeEXT :: #type proc "system" (device: Device, swapchain: SwapchainKHR) -> Result
ProcReleasePerformanceConfigurationINTEL :: #type proc "system" (device: Device, configuration: PerformanceConfigurationINTEL) -> Result
ProcReleaseProfilingLockKHR :: #type proc "system" (device: Device)
@@ -610,11 +659,14 @@ ProcSetDebugUtilsObjectTagEXT :: #type proc "system
ProcSetDeviceMemoryPriorityEXT :: #type proc "system" (device: Device, memory: DeviceMemory, priority: f32)
ProcSetEvent :: #type proc "system" (device: Device, event: Event) -> Result
ProcSetHdrMetadataEXT :: #type proc "system" (device: Device, swapchainCount: u32, pSwapchains: [^]SwapchainKHR, pMetadata: ^HdrMetadataEXT)
+ProcSetLatencyMarkerNV :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pLatencyMarkerInfo: ^SetLatencyMarkerInfoNV)
+ProcSetLatencySleepModeNV :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pSleepModeInfo: ^LatencySleepModeInfoNV) -> Result
ProcSetLocalDimmingAMD :: #type proc "system" (device: Device, swapChain: SwapchainKHR, localDimmingEnable: b32)
ProcSetPrivateData :: #type proc "system" (device: Device, objectType: ObjectType, objectHandle: u64, privateDataSlot: PrivateDataSlot, data: u64) -> Result
ProcSetPrivateDataEXT :: #type proc "system" (device: Device, objectType: ObjectType, objectHandle: u64, privateDataSlot: PrivateDataSlot, data: u64) -> Result
ProcSignalSemaphore :: #type proc "system" (device: Device, pSignalInfo: ^SemaphoreSignalInfo) -> Result
ProcSignalSemaphoreKHR :: #type proc "system" (device: Device, pSignalInfo: ^SemaphoreSignalInfo) -> Result
+ProcTransitionImageLayoutEXT :: #type proc "system" (device: Device, transitionCount: u32, pTransitions: [^]HostImageLayoutTransitionInfoEXT) -> Result
ProcTrimCommandPool :: #type proc "system" (device: Device, commandPool: CommandPool, flags: CommandPoolTrimFlags)
ProcTrimCommandPoolKHR :: #type proc "system" (device: Device, commandPool: CommandPool, flags: CommandPoolTrimFlags)
ProcUninitializePerformanceApiINTEL :: #type proc "system" (device: Device)
@@ -623,6 +675,8 @@ ProcUnmapMemory2KHR :: #type proc "system
ProcUpdateDescriptorSetWithTemplate :: #type proc "system" (device: Device, descriptorSet: DescriptorSet, descriptorUpdateTemplate: DescriptorUpdateTemplate, pData: rawptr)
ProcUpdateDescriptorSetWithTemplateKHR :: #type proc "system" (device: Device, descriptorSet: DescriptorSet, descriptorUpdateTemplate: DescriptorUpdateTemplate, pData: rawptr)
ProcUpdateDescriptorSets :: #type proc "system" (device: Device, descriptorWriteCount: u32, pDescriptorWrites: [^]WriteDescriptorSet, descriptorCopyCount: u32, pDescriptorCopies: [^]CopyDescriptorSet)
+ProcUpdateIndirectExecutionSetPipelineEXT :: #type proc "system" (device: Device, indirectExecutionSet: IndirectExecutionSetEXT, executionSetWriteCount: u32, pExecutionSetWrites: [^]WriteIndirectExecutionSetPipelineEXT)
+ProcUpdateIndirectExecutionSetShaderEXT :: #type proc "system" (device: Device, indirectExecutionSet: IndirectExecutionSetEXT, executionSetWriteCount: u32, pExecutionSetWrites: [^]WriteIndirectExecutionSetShaderEXT)
ProcUpdateVideoSessionParametersKHR :: #type proc "system" (device: Device, videoSessionParameters: VideoSessionParametersKHR, pUpdateInfo: ^VideoSessionParametersUpdateInfoKHR) -> Result
ProcWaitForFences :: #type proc "system" (device: Device, fenceCount: u32, pFences: [^]Fence, waitAll: b32, timeout: u64) -> Result
ProcWaitForPresentKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR, presentId: u64, timeout: u64) -> Result
@@ -674,6 +728,8 @@ GetDisplayPlaneSupportedDisplaysKHR: ProcGetDisplayP
GetDrmDisplayEXT: ProcGetDrmDisplayEXT
GetInstanceProcAddrLUNARG: ProcGetInstanceProcAddrLUNARG
GetPhysicalDeviceCalibrateableTimeDomainsEXT: ProcGetPhysicalDeviceCalibrateableTimeDomainsEXT
+GetPhysicalDeviceCalibrateableTimeDomainsKHR: ProcGetPhysicalDeviceCalibrateableTimeDomainsKHR
+GetPhysicalDeviceCooperativeMatrixPropertiesKHR: ProcGetPhysicalDeviceCooperativeMatrixPropertiesKHR
GetPhysicalDeviceCooperativeMatrixPropertiesNV: ProcGetPhysicalDeviceCooperativeMatrixPropertiesNV
GetPhysicalDeviceDisplayPlaneProperties2KHR: ProcGetPhysicalDeviceDisplayPlaneProperties2KHR
GetPhysicalDeviceDisplayPlanePropertiesKHR: ProcGetPhysicalDeviceDisplayPlanePropertiesKHR
@@ -724,6 +780,7 @@ GetPhysicalDeviceSurfaceSupportKHR: ProcGetPhysical
GetPhysicalDeviceToolProperties: ProcGetPhysicalDeviceToolProperties
GetPhysicalDeviceToolPropertiesEXT: ProcGetPhysicalDeviceToolPropertiesEXT
GetPhysicalDeviceVideoCapabilitiesKHR: ProcGetPhysicalDeviceVideoCapabilitiesKHR
+GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR: ProcGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR
GetPhysicalDeviceVideoFormatPropertiesKHR: ProcGetPhysicalDeviceVideoFormatPropertiesKHR
GetPhysicalDeviceWaylandPresentationSupportKHR: ProcGetPhysicalDeviceWaylandPresentationSupportKHR
GetPhysicalDeviceWin32PresentationSupportKHR: ProcGetPhysicalDeviceWin32PresentationSupportKHR
@@ -740,6 +797,7 @@ AcquireProfilingLockKHR: ProcAcquireProfilingLock
AllocateCommandBuffers: ProcAllocateCommandBuffers
AllocateDescriptorSets: ProcAllocateDescriptorSets
AllocateMemory: ProcAllocateMemory
+AntiLagUpdateAMD: ProcAntiLagUpdateAMD
BeginCommandBuffer: ProcBeginCommandBuffer
BindAccelerationStructureMemoryNV: ProcBindAccelerationStructureMemoryNV
BindBufferMemory: ProcBindBufferMemory
@@ -763,10 +821,13 @@ CmdBeginRendering: ProcCmdBeginRendering
CmdBeginRenderingKHR: ProcCmdBeginRenderingKHR
CmdBeginTransformFeedbackEXT: ProcCmdBeginTransformFeedbackEXT
CmdBeginVideoCodingKHR: ProcCmdBeginVideoCodingKHR
+CmdBindDescriptorBufferEmbeddedSamplers2EXT: ProcCmdBindDescriptorBufferEmbeddedSamplers2EXT
CmdBindDescriptorBufferEmbeddedSamplersEXT: ProcCmdBindDescriptorBufferEmbeddedSamplersEXT
CmdBindDescriptorBuffersEXT: ProcCmdBindDescriptorBuffersEXT
CmdBindDescriptorSets: ProcCmdBindDescriptorSets
+CmdBindDescriptorSets2KHR: ProcCmdBindDescriptorSets2KHR
CmdBindIndexBuffer: ProcCmdBindIndexBuffer
+CmdBindIndexBuffer2KHR: ProcCmdBindIndexBuffer2KHR
CmdBindInvocationMaskHUAWEI: ProcCmdBindInvocationMaskHUAWEI
CmdBindPipeline: ProcCmdBindPipeline
CmdBindPipelineShaderGroupNV: ProcCmdBindPipelineShaderGroupNV
@@ -810,6 +871,7 @@ CmdCopyMicromapEXT: ProcCmdCopyMicromapEXT
CmdCopyMicromapToMemoryEXT: ProcCmdCopyMicromapToMemoryEXT
CmdCopyQueryPoolResults: ProcCmdCopyQueryPoolResults
CmdCuLaunchKernelNVX: ProcCmdCuLaunchKernelNVX
+CmdCudaLaunchKernelNV: ProcCmdCudaLaunchKernelNV
CmdDebugMarkerBeginEXT: ProcCmdDebugMarkerBeginEXT
CmdDebugMarkerEndEXT: ProcCmdDebugMarkerEndEXT
CmdDebugMarkerInsertEXT: ProcCmdDebugMarkerInsertEXT
@@ -841,6 +903,7 @@ CmdDrawMeshTasksIndirectNV: ProcCmdDrawMeshTasksIndi
CmdDrawMeshTasksNV: ProcCmdDrawMeshTasksNV
CmdDrawMultiEXT: ProcCmdDrawMultiEXT
CmdDrawMultiIndexedEXT: ProcCmdDrawMultiIndexedEXT
+CmdEncodeVideoKHR: ProcCmdEncodeVideoKHR
CmdEndConditionalRenderingEXT: ProcCmdEndConditionalRenderingEXT
CmdEndDebugUtilsLabelEXT: ProcCmdEndDebugUtilsLabelEXT
CmdEndQuery: ProcCmdEndQuery
@@ -853,6 +916,7 @@ CmdEndRenderingKHR: ProcCmdEndRenderingKHR
CmdEndTransformFeedbackEXT: ProcCmdEndTransformFeedbackEXT
CmdEndVideoCodingKHR: ProcCmdEndVideoCodingKHR
CmdExecuteCommands: ProcCmdExecuteCommands
+CmdExecuteGeneratedCommandsEXT: ProcCmdExecuteGeneratedCommandsEXT
CmdExecuteGeneratedCommandsNV: ProcCmdExecuteGeneratedCommandsNV
CmdFillBuffer: ProcCmdFillBuffer
CmdInsertDebugUtilsLabelEXT: ProcCmdInsertDebugUtilsLabelEXT
@@ -863,9 +927,13 @@ CmdOpticalFlowExecuteNV: ProcCmdOpticalFlowExecut
CmdPipelineBarrier: ProcCmdPipelineBarrier
CmdPipelineBarrier2: ProcCmdPipelineBarrier2
CmdPipelineBarrier2KHR: ProcCmdPipelineBarrier2KHR
+CmdPreprocessGeneratedCommandsEXT: ProcCmdPreprocessGeneratedCommandsEXT
CmdPreprocessGeneratedCommandsNV: ProcCmdPreprocessGeneratedCommandsNV
CmdPushConstants: ProcCmdPushConstants
+CmdPushConstants2KHR: ProcCmdPushConstants2KHR
+CmdPushDescriptorSet2KHR: ProcCmdPushDescriptorSet2KHR
CmdPushDescriptorSetKHR: ProcCmdPushDescriptorSetKHR
+CmdPushDescriptorSetWithTemplate2KHR: ProcCmdPushDescriptorSetWithTemplate2KHR
CmdPushDescriptorSetWithTemplateKHR: ProcCmdPushDescriptorSetWithTemplateKHR
CmdResetEvent: ProcCmdResetEvent
CmdResetEvent2: ProcCmdResetEvent2
@@ -894,12 +962,14 @@ CmdSetCoverageToColorLocationNV: ProcCmdSetCoverageToColo
CmdSetCullMode: ProcCmdSetCullMode
CmdSetCullModeEXT: ProcCmdSetCullModeEXT
CmdSetDepthBias: ProcCmdSetDepthBias
+CmdSetDepthBias2EXT: ProcCmdSetDepthBias2EXT
CmdSetDepthBiasEnable: ProcCmdSetDepthBiasEnable
CmdSetDepthBiasEnableEXT: ProcCmdSetDepthBiasEnableEXT
CmdSetDepthBounds: ProcCmdSetDepthBounds
CmdSetDepthBoundsTestEnable: ProcCmdSetDepthBoundsTestEnable
CmdSetDepthBoundsTestEnableEXT: ProcCmdSetDepthBoundsTestEnableEXT
CmdSetDepthClampEnableEXT: ProcCmdSetDepthClampEnableEXT
+CmdSetDepthClampRangeEXT: ProcCmdSetDepthClampRangeEXT
CmdSetDepthClipEnableEXT: ProcCmdSetDepthClipEnableEXT
CmdSetDepthClipNegativeOneToOneEXT: ProcCmdSetDepthClipNegativeOneToOneEXT
CmdSetDepthCompareOp: ProcCmdSetDepthCompareOp
@@ -908,6 +978,7 @@ CmdSetDepthTestEnable: ProcCmdSetDepthTestEnabl
CmdSetDepthTestEnableEXT: ProcCmdSetDepthTestEnableEXT
CmdSetDepthWriteEnable: ProcCmdSetDepthWriteEnable
CmdSetDepthWriteEnableEXT: ProcCmdSetDepthWriteEnableEXT
+CmdSetDescriptorBufferOffsets2EXT: ProcCmdSetDescriptorBufferOffsets2EXT
CmdSetDescriptorBufferOffsetsEXT: ProcCmdSetDescriptorBufferOffsetsEXT
CmdSetDeviceMask: ProcCmdSetDeviceMask
CmdSetDeviceMaskKHR: ProcCmdSetDeviceMaskKHR
@@ -927,6 +998,7 @@ CmdSetFrontFaceEXT: ProcCmdSetFrontFaceEXT
CmdSetLineRasterizationModeEXT: ProcCmdSetLineRasterizationModeEXT
CmdSetLineStippleEXT: ProcCmdSetLineStippleEXT
CmdSetLineStippleEnableEXT: ProcCmdSetLineStippleEnableEXT
+CmdSetLineStippleKHR: ProcCmdSetLineStippleKHR
CmdSetLineWidth: ProcCmdSetLineWidth
CmdSetLogicOpEXT: ProcCmdSetLogicOpEXT
CmdSetLogicOpEnableEXT: ProcCmdSetLogicOpEnableEXT
@@ -945,6 +1017,8 @@ CmdSetRasterizationStreamEXT: ProcCmdSetRasterizationS
CmdSetRasterizerDiscardEnable: ProcCmdSetRasterizerDiscardEnable
CmdSetRasterizerDiscardEnableEXT: ProcCmdSetRasterizerDiscardEnableEXT
CmdSetRayTracingPipelineStackSizeKHR: ProcCmdSetRayTracingPipelineStackSizeKHR
+CmdSetRenderingAttachmentLocationsKHR: ProcCmdSetRenderingAttachmentLocationsKHR
+CmdSetRenderingInputAttachmentIndicesKHR: ProcCmdSetRenderingInputAttachmentIndicesKHR
CmdSetRepresentativeFragmentTestEnableNV: ProcCmdSetRepresentativeFragmentTestEnableNV
CmdSetSampleLocationsEXT: ProcCmdSetSampleLocationsEXT
CmdSetSampleLocationsEnableEXT: ProcCmdSetSampleLocationsEnableEXT
@@ -975,6 +1049,7 @@ CmdTraceRaysIndirectKHR: ProcCmdTraceRaysIndirect
CmdTraceRaysKHR: ProcCmdTraceRaysKHR
CmdTraceRaysNV: ProcCmdTraceRaysNV
CmdUpdateBuffer: ProcCmdUpdateBuffer
+CmdUpdatePipelineIndirectBufferNV: ProcCmdUpdatePipelineIndirectBufferNV
CmdWaitEvents: ProcCmdWaitEvents
CmdWaitEvents2: ProcCmdWaitEvents2
CmdWaitEvents2KHR: ProcCmdWaitEvents2KHR
@@ -989,7 +1064,10 @@ CmdWriteTimestamp2KHR: ProcCmdWriteTimestamp2KH
CompileDeferredNV: ProcCompileDeferredNV
CopyAccelerationStructureKHR: ProcCopyAccelerationStructureKHR
CopyAccelerationStructureToMemoryKHR: ProcCopyAccelerationStructureToMemoryKHR
+CopyImageToImageEXT: ProcCopyImageToImageEXT
+CopyImageToMemoryEXT: ProcCopyImageToMemoryEXT
CopyMemoryToAccelerationStructureKHR: ProcCopyMemoryToAccelerationStructureKHR
+CopyMemoryToImageEXT: ProcCopyMemoryToImageEXT
CopyMemoryToMicromapEXT: ProcCopyMemoryToMicromapEXT
CopyMicromapEXT: ProcCopyMicromapEXT
CopyMicromapToMemoryEXT: ProcCopyMicromapToMemoryEXT
@@ -1001,6 +1079,8 @@ CreateCommandPool: ProcCreateCommandPool
CreateComputePipelines: ProcCreateComputePipelines
CreateCuFunctionNVX: ProcCreateCuFunctionNVX
CreateCuModuleNVX: ProcCreateCuModuleNVX
+CreateCudaFunctionNV: ProcCreateCudaFunctionNV
+CreateCudaModuleNV: ProcCreateCudaModuleNV
CreateDeferredOperationKHR: ProcCreateDeferredOperationKHR
CreateDescriptorPool: ProcCreateDescriptorPool
CreateDescriptorSetLayout: ProcCreateDescriptorSetLayout
@@ -1012,9 +1092,12 @@ CreateFramebuffer: ProcCreateFramebuffer
CreateGraphicsPipelines: ProcCreateGraphicsPipelines
CreateImage: ProcCreateImage
CreateImageView: ProcCreateImageView
+CreateIndirectCommandsLayoutEXT: ProcCreateIndirectCommandsLayoutEXT
CreateIndirectCommandsLayoutNV: ProcCreateIndirectCommandsLayoutNV
+CreateIndirectExecutionSetEXT: ProcCreateIndirectExecutionSetEXT
CreateMicromapEXT: ProcCreateMicromapEXT
CreateOpticalFlowSessionNV: ProcCreateOpticalFlowSessionNV
+CreatePipelineBinariesKHR: ProcCreatePipelineBinariesKHR
CreatePipelineCache: ProcCreatePipelineCache
CreatePipelineLayout: ProcCreatePipelineLayout
CreatePrivateDataSlot: ProcCreatePrivateDataSlot
@@ -1046,6 +1129,8 @@ DestroyBufferView: ProcDestroyBufferView
DestroyCommandPool: ProcDestroyCommandPool
DestroyCuFunctionNVX: ProcDestroyCuFunctionNVX
DestroyCuModuleNVX: ProcDestroyCuModuleNVX
+DestroyCudaFunctionNV: ProcDestroyCudaFunctionNV
+DestroyCudaModuleNV: ProcDestroyCudaModuleNV
DestroyDeferredOperationKHR: ProcDestroyDeferredOperationKHR
DestroyDescriptorPool: ProcDestroyDescriptorPool
DestroyDescriptorSetLayout: ProcDestroyDescriptorSetLayout
@@ -1057,10 +1142,13 @@ DestroyFence: ProcDestroyFence
DestroyFramebuffer: ProcDestroyFramebuffer
DestroyImage: ProcDestroyImage
DestroyImageView: ProcDestroyImageView
+DestroyIndirectCommandsLayoutEXT: ProcDestroyIndirectCommandsLayoutEXT
DestroyIndirectCommandsLayoutNV: ProcDestroyIndirectCommandsLayoutNV
+DestroyIndirectExecutionSetEXT: ProcDestroyIndirectExecutionSetEXT
DestroyMicromapEXT: ProcDestroyMicromapEXT
DestroyOpticalFlowSessionNV: ProcDestroyOpticalFlowSessionNV
DestroyPipeline: ProcDestroyPipeline
+DestroyPipelineBinaryKHR: ProcDestroyPipelineBinaryKHR
DestroyPipelineCache: ProcDestroyPipelineCache
DestroyPipelineLayout: ProcDestroyPipelineLayout
DestroyPrivateDataSlot: ProcDestroyPrivateDataSlot
@@ -1100,6 +1188,8 @@ GetBufferOpaqueCaptureAddress: ProcGetBufferOpaqueCaptu
GetBufferOpaqueCaptureAddressKHR: ProcGetBufferOpaqueCaptureAddressKHR
GetBufferOpaqueCaptureDescriptorDataEXT: ProcGetBufferOpaqueCaptureDescriptorDataEXT
GetCalibratedTimestampsEXT: ProcGetCalibratedTimestampsEXT
+GetCalibratedTimestampsKHR: ProcGetCalibratedTimestampsKHR
+GetCudaModuleCacheNV: ProcGetCudaModuleCacheNV
GetDeferredOperationMaxConcurrencyKHR: ProcGetDeferredOperationMaxConcurrencyKHR
GetDeferredOperationResultKHR: ProcGetDeferredOperationResultKHR
GetDescriptorEXT: ProcGetDescriptorEXT
@@ -1122,6 +1212,7 @@ GetDeviceImageMemoryRequirements: ProcGetDeviceImageMemory
GetDeviceImageMemoryRequirementsKHR: ProcGetDeviceImageMemoryRequirementsKHR
GetDeviceImageSparseMemoryRequirements: ProcGetDeviceImageSparseMemoryRequirements
GetDeviceImageSparseMemoryRequirementsKHR: ProcGetDeviceImageSparseMemoryRequirementsKHR
+GetDeviceImageSubresourceLayoutKHR: ProcGetDeviceImageSubresourceLayoutKHR
GetDeviceMemoryCommitment: ProcGetDeviceMemoryCommitment
GetDeviceMemoryOpaqueCaptureAddress: ProcGetDeviceMemoryOpaqueCaptureAddress
GetDeviceMemoryOpaqueCaptureAddressKHR: ProcGetDeviceMemoryOpaqueCaptureAddressKHR
@@ -1131,11 +1222,13 @@ GetDeviceQueue: ProcGetDeviceQueue
GetDeviceQueue2: ProcGetDeviceQueue2
GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI: ProcGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI
GetDynamicRenderingTilePropertiesQCOM: ProcGetDynamicRenderingTilePropertiesQCOM
+GetEncodedVideoSessionParametersKHR: ProcGetEncodedVideoSessionParametersKHR
GetEventStatus: ProcGetEventStatus
GetFenceFdKHR: ProcGetFenceFdKHR
GetFenceStatus: ProcGetFenceStatus
GetFenceWin32HandleKHR: ProcGetFenceWin32HandleKHR
GetFramebufferTilePropertiesQCOM: ProcGetFramebufferTilePropertiesQCOM
+GetGeneratedCommandsMemoryRequirementsEXT: ProcGetGeneratedCommandsMemoryRequirementsEXT
GetGeneratedCommandsMemoryRequirementsNV: ProcGetGeneratedCommandsMemoryRequirementsNV
GetImageDrmFormatModifierPropertiesEXT: ProcGetImageDrmFormatModifierPropertiesEXT
GetImageMemoryRequirements: ProcGetImageMemoryRequirements
@@ -1147,9 +1240,11 @@ GetImageSparseMemoryRequirements2: ProcGetImageSparseMemory
GetImageSparseMemoryRequirements2KHR: ProcGetImageSparseMemoryRequirements2KHR
GetImageSubresourceLayout: ProcGetImageSubresourceLayout
GetImageSubresourceLayout2EXT: ProcGetImageSubresourceLayout2EXT
+GetImageSubresourceLayout2KHR: ProcGetImageSubresourceLayout2KHR
GetImageViewAddressNVX: ProcGetImageViewAddressNVX
GetImageViewHandleNVX: ProcGetImageViewHandleNVX
GetImageViewOpaqueCaptureDescriptorDataEXT: ProcGetImageViewOpaqueCaptureDescriptorDataEXT
+GetLatencyTimingsNV: ProcGetLatencyTimingsNV
GetMemoryFdKHR: ProcGetMemoryFdKHR
GetMemoryFdPropertiesKHR: ProcGetMemoryFdPropertiesKHR
GetMemoryHostPointerPropertiesEXT: ProcGetMemoryHostPointerPropertiesEXT
@@ -1160,10 +1255,14 @@ GetMemoryWin32HandlePropertiesKHR: ProcGetMemoryWin32Handle
GetMicromapBuildSizesEXT: ProcGetMicromapBuildSizesEXT
GetPastPresentationTimingGOOGLE: ProcGetPastPresentationTimingGOOGLE
GetPerformanceParameterINTEL: ProcGetPerformanceParameterINTEL
+GetPipelineBinaryDataKHR: ProcGetPipelineBinaryDataKHR
GetPipelineCacheData: ProcGetPipelineCacheData
GetPipelineExecutableInternalRepresentationsKHR: ProcGetPipelineExecutableInternalRepresentationsKHR
GetPipelineExecutablePropertiesKHR: ProcGetPipelineExecutablePropertiesKHR
GetPipelineExecutableStatisticsKHR: ProcGetPipelineExecutableStatisticsKHR
+GetPipelineIndirectDeviceAddressNV: ProcGetPipelineIndirectDeviceAddressNV
+GetPipelineIndirectMemoryRequirementsNV: ProcGetPipelineIndirectMemoryRequirementsNV
+GetPipelineKeyKHR: ProcGetPipelineKeyKHR
GetPipelinePropertiesEXT: ProcGetPipelinePropertiesEXT
GetPrivateData: ProcGetPrivateData
GetPrivateDataEXT: ProcGetPrivateDataEXT
@@ -1176,6 +1275,7 @@ GetRayTracingShaderGroupHandlesNV: ProcGetRayTracingShaderG
GetRayTracingShaderGroupStackSizeKHR: ProcGetRayTracingShaderGroupStackSizeKHR
GetRefreshCycleDurationGOOGLE: ProcGetRefreshCycleDurationGOOGLE
GetRenderAreaGranularity: ProcGetRenderAreaGranularity
+GetRenderingAreaGranularityKHR: ProcGetRenderingAreaGranularityKHR
GetSamplerOpaqueCaptureDescriptorDataEXT: ProcGetSamplerOpaqueCaptureDescriptorDataEXT
GetSemaphoreCounterValue: ProcGetSemaphoreCounterValue
GetSemaphoreCounterValueKHR: ProcGetSemaphoreCounterValueKHR
@@ -1196,6 +1296,7 @@ ImportSemaphoreFdKHR: ProcImportSemaphoreFdKHR
ImportSemaphoreWin32HandleKHR: ProcImportSemaphoreWin32HandleKHR
InitializePerformanceApiINTEL: ProcInitializePerformanceApiINTEL
InvalidateMappedMemoryRanges: ProcInvalidateMappedMemoryRanges
+LatencySleepNV: ProcLatencySleepNV
MapMemory: ProcMapMemory
MapMemory2KHR: ProcMapMemory2KHR
MergePipelineCaches: ProcMergePipelineCaches
@@ -1204,6 +1305,7 @@ QueueBeginDebugUtilsLabelEXT: ProcQueueBeginDebugUtils
QueueBindSparse: ProcQueueBindSparse
QueueEndDebugUtilsLabelEXT: ProcQueueEndDebugUtilsLabelEXT
QueueInsertDebugUtilsLabelEXT: ProcQueueInsertDebugUtilsLabelEXT
+QueueNotifyOutOfBandNV: ProcQueueNotifyOutOfBandNV
QueuePresentKHR: ProcQueuePresentKHR
QueueSetPerformanceConfigurationINTEL: ProcQueueSetPerformanceConfigurationINTEL
QueueSubmit: ProcQueueSubmit
@@ -1212,6 +1314,7 @@ QueueSubmit2KHR: ProcQueueSubmit2KHR
QueueWaitIdle: ProcQueueWaitIdle
RegisterDeviceEventEXT: ProcRegisterDeviceEventEXT
RegisterDisplayEventEXT: ProcRegisterDisplayEventEXT
+ReleaseCapturedPipelineDataKHR: ProcReleaseCapturedPipelineDataKHR
ReleaseFullScreenExclusiveModeEXT: ProcReleaseFullScreenExclusiveModeEXT
ReleasePerformanceConfigurationINTEL: ProcReleasePerformanceConfigurationINTEL
ReleaseProfilingLockKHR: ProcReleaseProfilingLockKHR
@@ -1228,11 +1331,14 @@ SetDebugUtilsObjectTagEXT: ProcSetDebugUtilsObjectT
SetDeviceMemoryPriorityEXT: ProcSetDeviceMemoryPriorityEXT
SetEvent: ProcSetEvent
SetHdrMetadataEXT: ProcSetHdrMetadataEXT
+SetLatencyMarkerNV: ProcSetLatencyMarkerNV
+SetLatencySleepModeNV: ProcSetLatencySleepModeNV
SetLocalDimmingAMD: ProcSetLocalDimmingAMD
SetPrivateData: ProcSetPrivateData
SetPrivateDataEXT: ProcSetPrivateDataEXT
SignalSemaphore: ProcSignalSemaphore
SignalSemaphoreKHR: ProcSignalSemaphoreKHR
+TransitionImageLayoutEXT: ProcTransitionImageLayoutEXT
TrimCommandPool: ProcTrimCommandPool
TrimCommandPoolKHR: ProcTrimCommandPoolKHR
UninitializePerformanceApiINTEL: ProcUninitializePerformanceApiINTEL
@@ -1241,6 +1347,8 @@ UnmapMemory2KHR: ProcUnmapMemory2KHR
UpdateDescriptorSetWithTemplate: ProcUpdateDescriptorSetWithTemplate
UpdateDescriptorSetWithTemplateKHR: ProcUpdateDescriptorSetWithTemplateKHR
UpdateDescriptorSets: ProcUpdateDescriptorSets
+UpdateIndirectExecutionSetPipelineEXT: ProcUpdateIndirectExecutionSetPipelineEXT
+UpdateIndirectExecutionSetShaderEXT: ProcUpdateIndirectExecutionSetShaderEXT
UpdateVideoSessionParametersKHR: ProcUpdateVideoSessionParametersKHR
WaitForFences: ProcWaitForFences
WaitForPresentKHR: ProcWaitForPresentKHR
@@ -1292,6 +1400,8 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&GetDrmDisplayEXT, "vkGetDrmDisplayEXT")
set_proc_address(&GetInstanceProcAddrLUNARG, "vkGetInstanceProcAddrLUNARG")
set_proc_address(&GetPhysicalDeviceCalibrateableTimeDomainsEXT, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT")
+ set_proc_address(&GetPhysicalDeviceCalibrateableTimeDomainsKHR, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR")
+ set_proc_address(&GetPhysicalDeviceCooperativeMatrixPropertiesKHR, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR")
set_proc_address(&GetPhysicalDeviceCooperativeMatrixPropertiesNV, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV")
set_proc_address(&GetPhysicalDeviceDisplayPlaneProperties2KHR, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR")
set_proc_address(&GetPhysicalDeviceDisplayPlanePropertiesKHR, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR")
@@ -1342,6 +1452,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&GetPhysicalDeviceToolProperties, "vkGetPhysicalDeviceToolProperties")
set_proc_address(&GetPhysicalDeviceToolPropertiesEXT, "vkGetPhysicalDeviceToolPropertiesEXT")
set_proc_address(&GetPhysicalDeviceVideoCapabilitiesKHR, "vkGetPhysicalDeviceVideoCapabilitiesKHR")
+ set_proc_address(&GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR")
set_proc_address(&GetPhysicalDeviceVideoFormatPropertiesKHR, "vkGetPhysicalDeviceVideoFormatPropertiesKHR")
set_proc_address(&GetPhysicalDeviceWaylandPresentationSupportKHR, "vkGetPhysicalDeviceWaylandPresentationSupportKHR")
set_proc_address(&GetPhysicalDeviceWin32PresentationSupportKHR, "vkGetPhysicalDeviceWin32PresentationSupportKHR")
@@ -1358,6 +1469,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&AllocateCommandBuffers, "vkAllocateCommandBuffers")
set_proc_address(&AllocateDescriptorSets, "vkAllocateDescriptorSets")
set_proc_address(&AllocateMemory, "vkAllocateMemory")
+ set_proc_address(&AntiLagUpdateAMD, "vkAntiLagUpdateAMD")
set_proc_address(&BeginCommandBuffer, "vkBeginCommandBuffer")
set_proc_address(&BindAccelerationStructureMemoryNV, "vkBindAccelerationStructureMemoryNV")
set_proc_address(&BindBufferMemory, "vkBindBufferMemory")
@@ -1381,10 +1493,13 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdBeginRenderingKHR, "vkCmdBeginRenderingKHR")
set_proc_address(&CmdBeginTransformFeedbackEXT, "vkCmdBeginTransformFeedbackEXT")
set_proc_address(&CmdBeginVideoCodingKHR, "vkCmdBeginVideoCodingKHR")
+ set_proc_address(&CmdBindDescriptorBufferEmbeddedSamplers2EXT, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT")
set_proc_address(&CmdBindDescriptorBufferEmbeddedSamplersEXT, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT")
set_proc_address(&CmdBindDescriptorBuffersEXT, "vkCmdBindDescriptorBuffersEXT")
set_proc_address(&CmdBindDescriptorSets, "vkCmdBindDescriptorSets")
+ set_proc_address(&CmdBindDescriptorSets2KHR, "vkCmdBindDescriptorSets2KHR")
set_proc_address(&CmdBindIndexBuffer, "vkCmdBindIndexBuffer")
+ set_proc_address(&CmdBindIndexBuffer2KHR, "vkCmdBindIndexBuffer2KHR")
set_proc_address(&CmdBindInvocationMaskHUAWEI, "vkCmdBindInvocationMaskHUAWEI")
set_proc_address(&CmdBindPipeline, "vkCmdBindPipeline")
set_proc_address(&CmdBindPipelineShaderGroupNV, "vkCmdBindPipelineShaderGroupNV")
@@ -1428,6 +1543,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdCopyMicromapToMemoryEXT, "vkCmdCopyMicromapToMemoryEXT")
set_proc_address(&CmdCopyQueryPoolResults, "vkCmdCopyQueryPoolResults")
set_proc_address(&CmdCuLaunchKernelNVX, "vkCmdCuLaunchKernelNVX")
+ set_proc_address(&CmdCudaLaunchKernelNV, "vkCmdCudaLaunchKernelNV")
set_proc_address(&CmdDebugMarkerBeginEXT, "vkCmdDebugMarkerBeginEXT")
set_proc_address(&CmdDebugMarkerEndEXT, "vkCmdDebugMarkerEndEXT")
set_proc_address(&CmdDebugMarkerInsertEXT, "vkCmdDebugMarkerInsertEXT")
@@ -1459,6 +1575,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdDrawMeshTasksNV, "vkCmdDrawMeshTasksNV")
set_proc_address(&CmdDrawMultiEXT, "vkCmdDrawMultiEXT")
set_proc_address(&CmdDrawMultiIndexedEXT, "vkCmdDrawMultiIndexedEXT")
+ set_proc_address(&CmdEncodeVideoKHR, "vkCmdEncodeVideoKHR")
set_proc_address(&CmdEndConditionalRenderingEXT, "vkCmdEndConditionalRenderingEXT")
set_proc_address(&CmdEndDebugUtilsLabelEXT, "vkCmdEndDebugUtilsLabelEXT")
set_proc_address(&CmdEndQuery, "vkCmdEndQuery")
@@ -1471,6 +1588,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdEndTransformFeedbackEXT, "vkCmdEndTransformFeedbackEXT")
set_proc_address(&CmdEndVideoCodingKHR, "vkCmdEndVideoCodingKHR")
set_proc_address(&CmdExecuteCommands, "vkCmdExecuteCommands")
+ set_proc_address(&CmdExecuteGeneratedCommandsEXT, "vkCmdExecuteGeneratedCommandsEXT")
set_proc_address(&CmdExecuteGeneratedCommandsNV, "vkCmdExecuteGeneratedCommandsNV")
set_proc_address(&CmdFillBuffer, "vkCmdFillBuffer")
set_proc_address(&CmdInsertDebugUtilsLabelEXT, "vkCmdInsertDebugUtilsLabelEXT")
@@ -1481,9 +1599,13 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdPipelineBarrier, "vkCmdPipelineBarrier")
set_proc_address(&CmdPipelineBarrier2, "vkCmdPipelineBarrier2")
set_proc_address(&CmdPipelineBarrier2KHR, "vkCmdPipelineBarrier2KHR")
+ set_proc_address(&CmdPreprocessGeneratedCommandsEXT, "vkCmdPreprocessGeneratedCommandsEXT")
set_proc_address(&CmdPreprocessGeneratedCommandsNV, "vkCmdPreprocessGeneratedCommandsNV")
set_proc_address(&CmdPushConstants, "vkCmdPushConstants")
+ set_proc_address(&CmdPushConstants2KHR, "vkCmdPushConstants2KHR")
+ set_proc_address(&CmdPushDescriptorSet2KHR, "vkCmdPushDescriptorSet2KHR")
set_proc_address(&CmdPushDescriptorSetKHR, "vkCmdPushDescriptorSetKHR")
+ set_proc_address(&CmdPushDescriptorSetWithTemplate2KHR, "vkCmdPushDescriptorSetWithTemplate2KHR")
set_proc_address(&CmdPushDescriptorSetWithTemplateKHR, "vkCmdPushDescriptorSetWithTemplateKHR")
set_proc_address(&CmdResetEvent, "vkCmdResetEvent")
set_proc_address(&CmdResetEvent2, "vkCmdResetEvent2")
@@ -1512,12 +1634,14 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdSetCullMode, "vkCmdSetCullMode")
set_proc_address(&CmdSetCullModeEXT, "vkCmdSetCullModeEXT")
set_proc_address(&CmdSetDepthBias, "vkCmdSetDepthBias")
+ set_proc_address(&CmdSetDepthBias2EXT, "vkCmdSetDepthBias2EXT")
set_proc_address(&CmdSetDepthBiasEnable, "vkCmdSetDepthBiasEnable")
set_proc_address(&CmdSetDepthBiasEnableEXT, "vkCmdSetDepthBiasEnableEXT")
set_proc_address(&CmdSetDepthBounds, "vkCmdSetDepthBounds")
set_proc_address(&CmdSetDepthBoundsTestEnable, "vkCmdSetDepthBoundsTestEnable")
set_proc_address(&CmdSetDepthBoundsTestEnableEXT, "vkCmdSetDepthBoundsTestEnableEXT")
set_proc_address(&CmdSetDepthClampEnableEXT, "vkCmdSetDepthClampEnableEXT")
+ set_proc_address(&CmdSetDepthClampRangeEXT, "vkCmdSetDepthClampRangeEXT")
set_proc_address(&CmdSetDepthClipEnableEXT, "vkCmdSetDepthClipEnableEXT")
set_proc_address(&CmdSetDepthClipNegativeOneToOneEXT, "vkCmdSetDepthClipNegativeOneToOneEXT")
set_proc_address(&CmdSetDepthCompareOp, "vkCmdSetDepthCompareOp")
@@ -1526,6 +1650,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdSetDepthTestEnableEXT, "vkCmdSetDepthTestEnableEXT")
set_proc_address(&CmdSetDepthWriteEnable, "vkCmdSetDepthWriteEnable")
set_proc_address(&CmdSetDepthWriteEnableEXT, "vkCmdSetDepthWriteEnableEXT")
+ set_proc_address(&CmdSetDescriptorBufferOffsets2EXT, "vkCmdSetDescriptorBufferOffsets2EXT")
set_proc_address(&CmdSetDescriptorBufferOffsetsEXT, "vkCmdSetDescriptorBufferOffsetsEXT")
set_proc_address(&CmdSetDeviceMask, "vkCmdSetDeviceMask")
set_proc_address(&CmdSetDeviceMaskKHR, "vkCmdSetDeviceMaskKHR")
@@ -1545,6 +1670,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdSetLineRasterizationModeEXT, "vkCmdSetLineRasterizationModeEXT")
set_proc_address(&CmdSetLineStippleEXT, "vkCmdSetLineStippleEXT")
set_proc_address(&CmdSetLineStippleEnableEXT, "vkCmdSetLineStippleEnableEXT")
+ set_proc_address(&CmdSetLineStippleKHR, "vkCmdSetLineStippleKHR")
set_proc_address(&CmdSetLineWidth, "vkCmdSetLineWidth")
set_proc_address(&CmdSetLogicOpEXT, "vkCmdSetLogicOpEXT")
set_proc_address(&CmdSetLogicOpEnableEXT, "vkCmdSetLogicOpEnableEXT")
@@ -1563,6 +1689,8 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdSetRasterizerDiscardEnable, "vkCmdSetRasterizerDiscardEnable")
set_proc_address(&CmdSetRasterizerDiscardEnableEXT, "vkCmdSetRasterizerDiscardEnableEXT")
set_proc_address(&CmdSetRayTracingPipelineStackSizeKHR, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ set_proc_address(&CmdSetRenderingAttachmentLocationsKHR, "vkCmdSetRenderingAttachmentLocationsKHR")
+ set_proc_address(&CmdSetRenderingInputAttachmentIndicesKHR, "vkCmdSetRenderingInputAttachmentIndicesKHR")
set_proc_address(&CmdSetRepresentativeFragmentTestEnableNV, "vkCmdSetRepresentativeFragmentTestEnableNV")
set_proc_address(&CmdSetSampleLocationsEXT, "vkCmdSetSampleLocationsEXT")
set_proc_address(&CmdSetSampleLocationsEnableEXT, "vkCmdSetSampleLocationsEnableEXT")
@@ -1593,6 +1721,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CmdTraceRaysKHR, "vkCmdTraceRaysKHR")
set_proc_address(&CmdTraceRaysNV, "vkCmdTraceRaysNV")
set_proc_address(&CmdUpdateBuffer, "vkCmdUpdateBuffer")
+ set_proc_address(&CmdUpdatePipelineIndirectBufferNV, "vkCmdUpdatePipelineIndirectBufferNV")
set_proc_address(&CmdWaitEvents, "vkCmdWaitEvents")
set_proc_address(&CmdWaitEvents2, "vkCmdWaitEvents2")
set_proc_address(&CmdWaitEvents2KHR, "vkCmdWaitEvents2KHR")
@@ -1607,7 +1736,10 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CompileDeferredNV, "vkCompileDeferredNV")
set_proc_address(&CopyAccelerationStructureKHR, "vkCopyAccelerationStructureKHR")
set_proc_address(&CopyAccelerationStructureToMemoryKHR, "vkCopyAccelerationStructureToMemoryKHR")
+ set_proc_address(&CopyImageToImageEXT, "vkCopyImageToImageEXT")
+ set_proc_address(&CopyImageToMemoryEXT, "vkCopyImageToMemoryEXT")
set_proc_address(&CopyMemoryToAccelerationStructureKHR, "vkCopyMemoryToAccelerationStructureKHR")
+ set_proc_address(&CopyMemoryToImageEXT, "vkCopyMemoryToImageEXT")
set_proc_address(&CopyMemoryToMicromapEXT, "vkCopyMemoryToMicromapEXT")
set_proc_address(&CopyMicromapEXT, "vkCopyMicromapEXT")
set_proc_address(&CopyMicromapToMemoryEXT, "vkCopyMicromapToMemoryEXT")
@@ -1619,6 +1751,8 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CreateComputePipelines, "vkCreateComputePipelines")
set_proc_address(&CreateCuFunctionNVX, "vkCreateCuFunctionNVX")
set_proc_address(&CreateCuModuleNVX, "vkCreateCuModuleNVX")
+ set_proc_address(&CreateCudaFunctionNV, "vkCreateCudaFunctionNV")
+ set_proc_address(&CreateCudaModuleNV, "vkCreateCudaModuleNV")
set_proc_address(&CreateDeferredOperationKHR, "vkCreateDeferredOperationKHR")
set_proc_address(&CreateDescriptorPool, "vkCreateDescriptorPool")
set_proc_address(&CreateDescriptorSetLayout, "vkCreateDescriptorSetLayout")
@@ -1630,9 +1764,12 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&CreateGraphicsPipelines, "vkCreateGraphicsPipelines")
set_proc_address(&CreateImage, "vkCreateImage")
set_proc_address(&CreateImageView, "vkCreateImageView")
+ set_proc_address(&CreateIndirectCommandsLayoutEXT, "vkCreateIndirectCommandsLayoutEXT")
set_proc_address(&CreateIndirectCommandsLayoutNV, "vkCreateIndirectCommandsLayoutNV")
+ set_proc_address(&CreateIndirectExecutionSetEXT, "vkCreateIndirectExecutionSetEXT")
set_proc_address(&CreateMicromapEXT, "vkCreateMicromapEXT")
set_proc_address(&CreateOpticalFlowSessionNV, "vkCreateOpticalFlowSessionNV")
+ set_proc_address(&CreatePipelineBinariesKHR, "vkCreatePipelineBinariesKHR")
set_proc_address(&CreatePipelineCache, "vkCreatePipelineCache")
set_proc_address(&CreatePipelineLayout, "vkCreatePipelineLayout")
set_proc_address(&CreatePrivateDataSlot, "vkCreatePrivateDataSlot")
@@ -1664,6 +1801,8 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&DestroyCommandPool, "vkDestroyCommandPool")
set_proc_address(&DestroyCuFunctionNVX, "vkDestroyCuFunctionNVX")
set_proc_address(&DestroyCuModuleNVX, "vkDestroyCuModuleNVX")
+ set_proc_address(&DestroyCudaFunctionNV, "vkDestroyCudaFunctionNV")
+ set_proc_address(&DestroyCudaModuleNV, "vkDestroyCudaModuleNV")
set_proc_address(&DestroyDeferredOperationKHR, "vkDestroyDeferredOperationKHR")
set_proc_address(&DestroyDescriptorPool, "vkDestroyDescriptorPool")
set_proc_address(&DestroyDescriptorSetLayout, "vkDestroyDescriptorSetLayout")
@@ -1675,10 +1814,13 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&DestroyFramebuffer, "vkDestroyFramebuffer")
set_proc_address(&DestroyImage, "vkDestroyImage")
set_proc_address(&DestroyImageView, "vkDestroyImageView")
+ set_proc_address(&DestroyIndirectCommandsLayoutEXT, "vkDestroyIndirectCommandsLayoutEXT")
set_proc_address(&DestroyIndirectCommandsLayoutNV, "vkDestroyIndirectCommandsLayoutNV")
+ set_proc_address(&DestroyIndirectExecutionSetEXT, "vkDestroyIndirectExecutionSetEXT")
set_proc_address(&DestroyMicromapEXT, "vkDestroyMicromapEXT")
set_proc_address(&DestroyOpticalFlowSessionNV, "vkDestroyOpticalFlowSessionNV")
set_proc_address(&DestroyPipeline, "vkDestroyPipeline")
+ set_proc_address(&DestroyPipelineBinaryKHR, "vkDestroyPipelineBinaryKHR")
set_proc_address(&DestroyPipelineCache, "vkDestroyPipelineCache")
set_proc_address(&DestroyPipelineLayout, "vkDestroyPipelineLayout")
set_proc_address(&DestroyPrivateDataSlot, "vkDestroyPrivateDataSlot")
@@ -1718,6 +1860,8 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&GetBufferOpaqueCaptureAddressKHR, "vkGetBufferOpaqueCaptureAddressKHR")
set_proc_address(&GetBufferOpaqueCaptureDescriptorDataEXT, "vkGetBufferOpaqueCaptureDescriptorDataEXT")
set_proc_address(&GetCalibratedTimestampsEXT, "vkGetCalibratedTimestampsEXT")
+ set_proc_address(&GetCalibratedTimestampsKHR, "vkGetCalibratedTimestampsKHR")
+ set_proc_address(&GetCudaModuleCacheNV, "vkGetCudaModuleCacheNV")
set_proc_address(&GetDeferredOperationMaxConcurrencyKHR, "vkGetDeferredOperationMaxConcurrencyKHR")
set_proc_address(&GetDeferredOperationResultKHR, "vkGetDeferredOperationResultKHR")
set_proc_address(&GetDescriptorEXT, "vkGetDescriptorEXT")
@@ -1740,6 +1884,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&GetDeviceImageMemoryRequirementsKHR, "vkGetDeviceImageMemoryRequirementsKHR")
set_proc_address(&GetDeviceImageSparseMemoryRequirements, "vkGetDeviceImageSparseMemoryRequirements")
set_proc_address(&GetDeviceImageSparseMemoryRequirementsKHR, "vkGetDeviceImageSparseMemoryRequirementsKHR")
+ set_proc_address(&GetDeviceImageSubresourceLayoutKHR, "vkGetDeviceImageSubresourceLayoutKHR")
set_proc_address(&GetDeviceMemoryCommitment, "vkGetDeviceMemoryCommitment")
set_proc_address(&GetDeviceMemoryOpaqueCaptureAddress, "vkGetDeviceMemoryOpaqueCaptureAddress")
set_proc_address(&GetDeviceMemoryOpaqueCaptureAddressKHR, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
@@ -1749,11 +1894,13 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&GetDeviceQueue2, "vkGetDeviceQueue2")
set_proc_address(&GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
set_proc_address(&GetDynamicRenderingTilePropertiesQCOM, "vkGetDynamicRenderingTilePropertiesQCOM")
+ set_proc_address(&GetEncodedVideoSessionParametersKHR, "vkGetEncodedVideoSessionParametersKHR")
set_proc_address(&GetEventStatus, "vkGetEventStatus")
set_proc_address(&GetFenceFdKHR, "vkGetFenceFdKHR")
set_proc_address(&GetFenceStatus, "vkGetFenceStatus")
set_proc_address(&GetFenceWin32HandleKHR, "vkGetFenceWin32HandleKHR")
set_proc_address(&GetFramebufferTilePropertiesQCOM, "vkGetFramebufferTilePropertiesQCOM")
+ set_proc_address(&GetGeneratedCommandsMemoryRequirementsEXT, "vkGetGeneratedCommandsMemoryRequirementsEXT")
set_proc_address(&GetGeneratedCommandsMemoryRequirementsNV, "vkGetGeneratedCommandsMemoryRequirementsNV")
set_proc_address(&GetImageDrmFormatModifierPropertiesEXT, "vkGetImageDrmFormatModifierPropertiesEXT")
set_proc_address(&GetImageMemoryRequirements, "vkGetImageMemoryRequirements")
@@ -1765,9 +1912,11 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&GetImageSparseMemoryRequirements2KHR, "vkGetImageSparseMemoryRequirements2KHR")
set_proc_address(&GetImageSubresourceLayout, "vkGetImageSubresourceLayout")
set_proc_address(&GetImageSubresourceLayout2EXT, "vkGetImageSubresourceLayout2EXT")
+ set_proc_address(&GetImageSubresourceLayout2KHR, "vkGetImageSubresourceLayout2KHR")
set_proc_address(&GetImageViewAddressNVX, "vkGetImageViewAddressNVX")
set_proc_address(&GetImageViewHandleNVX, "vkGetImageViewHandleNVX")
set_proc_address(&GetImageViewOpaqueCaptureDescriptorDataEXT, "vkGetImageViewOpaqueCaptureDescriptorDataEXT")
+ set_proc_address(&GetLatencyTimingsNV, "vkGetLatencyTimingsNV")
set_proc_address(&GetMemoryFdKHR, "vkGetMemoryFdKHR")
set_proc_address(&GetMemoryFdPropertiesKHR, "vkGetMemoryFdPropertiesKHR")
set_proc_address(&GetMemoryHostPointerPropertiesEXT, "vkGetMemoryHostPointerPropertiesEXT")
@@ -1778,10 +1927,14 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&GetMicromapBuildSizesEXT, "vkGetMicromapBuildSizesEXT")
set_proc_address(&GetPastPresentationTimingGOOGLE, "vkGetPastPresentationTimingGOOGLE")
set_proc_address(&GetPerformanceParameterINTEL, "vkGetPerformanceParameterINTEL")
+ set_proc_address(&GetPipelineBinaryDataKHR, "vkGetPipelineBinaryDataKHR")
set_proc_address(&GetPipelineCacheData, "vkGetPipelineCacheData")
set_proc_address(&GetPipelineExecutableInternalRepresentationsKHR, "vkGetPipelineExecutableInternalRepresentationsKHR")
set_proc_address(&GetPipelineExecutablePropertiesKHR, "vkGetPipelineExecutablePropertiesKHR")
set_proc_address(&GetPipelineExecutableStatisticsKHR, "vkGetPipelineExecutableStatisticsKHR")
+ set_proc_address(&GetPipelineIndirectDeviceAddressNV, "vkGetPipelineIndirectDeviceAddressNV")
+ set_proc_address(&GetPipelineIndirectMemoryRequirementsNV, "vkGetPipelineIndirectMemoryRequirementsNV")
+ set_proc_address(&GetPipelineKeyKHR, "vkGetPipelineKeyKHR")
set_proc_address(&GetPipelinePropertiesEXT, "vkGetPipelinePropertiesEXT")
set_proc_address(&GetPrivateData, "vkGetPrivateData")
set_proc_address(&GetPrivateDataEXT, "vkGetPrivateDataEXT")
@@ -1794,6 +1947,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&GetRayTracingShaderGroupStackSizeKHR, "vkGetRayTracingShaderGroupStackSizeKHR")
set_proc_address(&GetRefreshCycleDurationGOOGLE, "vkGetRefreshCycleDurationGOOGLE")
set_proc_address(&GetRenderAreaGranularity, "vkGetRenderAreaGranularity")
+ set_proc_address(&GetRenderingAreaGranularityKHR, "vkGetRenderingAreaGranularityKHR")
set_proc_address(&GetSamplerOpaqueCaptureDescriptorDataEXT, "vkGetSamplerOpaqueCaptureDescriptorDataEXT")
set_proc_address(&GetSemaphoreCounterValue, "vkGetSemaphoreCounterValue")
set_proc_address(&GetSemaphoreCounterValueKHR, "vkGetSemaphoreCounterValueKHR")
@@ -1814,6 +1968,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&ImportSemaphoreWin32HandleKHR, "vkImportSemaphoreWin32HandleKHR")
set_proc_address(&InitializePerformanceApiINTEL, "vkInitializePerformanceApiINTEL")
set_proc_address(&InvalidateMappedMemoryRanges, "vkInvalidateMappedMemoryRanges")
+ set_proc_address(&LatencySleepNV, "vkLatencySleepNV")
set_proc_address(&MapMemory, "vkMapMemory")
set_proc_address(&MapMemory2KHR, "vkMapMemory2KHR")
set_proc_address(&MergePipelineCaches, "vkMergePipelineCaches")
@@ -1822,6 +1977,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&QueueBindSparse, "vkQueueBindSparse")
set_proc_address(&QueueEndDebugUtilsLabelEXT, "vkQueueEndDebugUtilsLabelEXT")
set_proc_address(&QueueInsertDebugUtilsLabelEXT, "vkQueueInsertDebugUtilsLabelEXT")
+ set_proc_address(&QueueNotifyOutOfBandNV, "vkQueueNotifyOutOfBandNV")
set_proc_address(&QueuePresentKHR, "vkQueuePresentKHR")
set_proc_address(&QueueSetPerformanceConfigurationINTEL, "vkQueueSetPerformanceConfigurationINTEL")
set_proc_address(&QueueSubmit, "vkQueueSubmit")
@@ -1830,6 +1986,7 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&QueueWaitIdle, "vkQueueWaitIdle")
set_proc_address(&RegisterDeviceEventEXT, "vkRegisterDeviceEventEXT")
set_proc_address(&RegisterDisplayEventEXT, "vkRegisterDisplayEventEXT")
+ set_proc_address(&ReleaseCapturedPipelineDataKHR, "vkReleaseCapturedPipelineDataKHR")
set_proc_address(&ReleaseFullScreenExclusiveModeEXT, "vkReleaseFullScreenExclusiveModeEXT")
set_proc_address(&ReleasePerformanceConfigurationINTEL, "vkReleasePerformanceConfigurationINTEL")
set_proc_address(&ReleaseProfilingLockKHR, "vkReleaseProfilingLockKHR")
@@ -1846,11 +2003,14 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&SetDeviceMemoryPriorityEXT, "vkSetDeviceMemoryPriorityEXT")
set_proc_address(&SetEvent, "vkSetEvent")
set_proc_address(&SetHdrMetadataEXT, "vkSetHdrMetadataEXT")
+ set_proc_address(&SetLatencyMarkerNV, "vkSetLatencyMarkerNV")
+ set_proc_address(&SetLatencySleepModeNV, "vkSetLatencySleepModeNV")
set_proc_address(&SetLocalDimmingAMD, "vkSetLocalDimmingAMD")
set_proc_address(&SetPrivateData, "vkSetPrivateData")
set_proc_address(&SetPrivateDataEXT, "vkSetPrivateDataEXT")
set_proc_address(&SignalSemaphore, "vkSignalSemaphore")
set_proc_address(&SignalSemaphoreKHR, "vkSignalSemaphoreKHR")
+ set_proc_address(&TransitionImageLayoutEXT, "vkTransitionImageLayoutEXT")
set_proc_address(&TrimCommandPool, "vkTrimCommandPool")
set_proc_address(&TrimCommandPoolKHR, "vkTrimCommandPoolKHR")
set_proc_address(&UninitializePerformanceApiINTEL, "vkUninitializePerformanceApiINTEL")
@@ -1859,6 +2019,8 @@ load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
set_proc_address(&UpdateDescriptorSetWithTemplate, "vkUpdateDescriptorSetWithTemplate")
set_proc_address(&UpdateDescriptorSetWithTemplateKHR, "vkUpdateDescriptorSetWithTemplateKHR")
set_proc_address(&UpdateDescriptorSets, "vkUpdateDescriptorSets")
+ set_proc_address(&UpdateIndirectExecutionSetPipelineEXT, "vkUpdateIndirectExecutionSetPipelineEXT")
+ set_proc_address(&UpdateIndirectExecutionSetShaderEXT, "vkUpdateIndirectExecutionSetShaderEXT")
set_proc_address(&UpdateVideoSessionParametersKHR, "vkUpdateVideoSessionParametersKHR")
set_proc_address(&WaitForFences, "vkWaitForFences")
set_proc_address(&WaitForPresentKHR, "vkWaitForPresentKHR")
@@ -1879,6 +2041,7 @@ Device_VTable :: struct {
AllocateCommandBuffers: ProcAllocateCommandBuffers,
AllocateDescriptorSets: ProcAllocateDescriptorSets,
AllocateMemory: ProcAllocateMemory,
+ AntiLagUpdateAMD: ProcAntiLagUpdateAMD,
BeginCommandBuffer: ProcBeginCommandBuffer,
BindAccelerationStructureMemoryNV: ProcBindAccelerationStructureMemoryNV,
BindBufferMemory: ProcBindBufferMemory,
@@ -1902,10 +2065,13 @@ Device_VTable :: struct {
CmdBeginRenderingKHR: ProcCmdBeginRenderingKHR,
CmdBeginTransformFeedbackEXT: ProcCmdBeginTransformFeedbackEXT,
CmdBeginVideoCodingKHR: ProcCmdBeginVideoCodingKHR,
+ CmdBindDescriptorBufferEmbeddedSamplers2EXT: ProcCmdBindDescriptorBufferEmbeddedSamplers2EXT,
CmdBindDescriptorBufferEmbeddedSamplersEXT: ProcCmdBindDescriptorBufferEmbeddedSamplersEXT,
CmdBindDescriptorBuffersEXT: ProcCmdBindDescriptorBuffersEXT,
CmdBindDescriptorSets: ProcCmdBindDescriptorSets,
+ CmdBindDescriptorSets2KHR: ProcCmdBindDescriptorSets2KHR,
CmdBindIndexBuffer: ProcCmdBindIndexBuffer,
+ CmdBindIndexBuffer2KHR: ProcCmdBindIndexBuffer2KHR,
CmdBindInvocationMaskHUAWEI: ProcCmdBindInvocationMaskHUAWEI,
CmdBindPipeline: ProcCmdBindPipeline,
CmdBindPipelineShaderGroupNV: ProcCmdBindPipelineShaderGroupNV,
@@ -1949,6 +2115,7 @@ Device_VTable :: struct {
CmdCopyMicromapToMemoryEXT: ProcCmdCopyMicromapToMemoryEXT,
CmdCopyQueryPoolResults: ProcCmdCopyQueryPoolResults,
CmdCuLaunchKernelNVX: ProcCmdCuLaunchKernelNVX,
+ CmdCudaLaunchKernelNV: ProcCmdCudaLaunchKernelNV,
CmdDebugMarkerBeginEXT: ProcCmdDebugMarkerBeginEXT,
CmdDebugMarkerEndEXT: ProcCmdDebugMarkerEndEXT,
CmdDebugMarkerInsertEXT: ProcCmdDebugMarkerInsertEXT,
@@ -1980,6 +2147,7 @@ Device_VTable :: struct {
CmdDrawMeshTasksNV: ProcCmdDrawMeshTasksNV,
CmdDrawMultiEXT: ProcCmdDrawMultiEXT,
CmdDrawMultiIndexedEXT: ProcCmdDrawMultiIndexedEXT,
+ CmdEncodeVideoKHR: ProcCmdEncodeVideoKHR,
CmdEndConditionalRenderingEXT: ProcCmdEndConditionalRenderingEXT,
CmdEndDebugUtilsLabelEXT: ProcCmdEndDebugUtilsLabelEXT,
CmdEndQuery: ProcCmdEndQuery,
@@ -1992,6 +2160,7 @@ Device_VTable :: struct {
CmdEndTransformFeedbackEXT: ProcCmdEndTransformFeedbackEXT,
CmdEndVideoCodingKHR: ProcCmdEndVideoCodingKHR,
CmdExecuteCommands: ProcCmdExecuteCommands,
+ CmdExecuteGeneratedCommandsEXT: ProcCmdExecuteGeneratedCommandsEXT,
CmdExecuteGeneratedCommandsNV: ProcCmdExecuteGeneratedCommandsNV,
CmdFillBuffer: ProcCmdFillBuffer,
CmdInsertDebugUtilsLabelEXT: ProcCmdInsertDebugUtilsLabelEXT,
@@ -2002,9 +2171,13 @@ Device_VTable :: struct {
CmdPipelineBarrier: ProcCmdPipelineBarrier,
CmdPipelineBarrier2: ProcCmdPipelineBarrier2,
CmdPipelineBarrier2KHR: ProcCmdPipelineBarrier2KHR,
+ CmdPreprocessGeneratedCommandsEXT: ProcCmdPreprocessGeneratedCommandsEXT,
CmdPreprocessGeneratedCommandsNV: ProcCmdPreprocessGeneratedCommandsNV,
CmdPushConstants: ProcCmdPushConstants,
+ CmdPushConstants2KHR: ProcCmdPushConstants2KHR,
+ CmdPushDescriptorSet2KHR: ProcCmdPushDescriptorSet2KHR,
CmdPushDescriptorSetKHR: ProcCmdPushDescriptorSetKHR,
+ CmdPushDescriptorSetWithTemplate2KHR: ProcCmdPushDescriptorSetWithTemplate2KHR,
CmdPushDescriptorSetWithTemplateKHR: ProcCmdPushDescriptorSetWithTemplateKHR,
CmdResetEvent: ProcCmdResetEvent,
CmdResetEvent2: ProcCmdResetEvent2,
@@ -2033,12 +2206,14 @@ Device_VTable :: struct {
CmdSetCullMode: ProcCmdSetCullMode,
CmdSetCullModeEXT: ProcCmdSetCullModeEXT,
CmdSetDepthBias: ProcCmdSetDepthBias,
+ CmdSetDepthBias2EXT: ProcCmdSetDepthBias2EXT,
CmdSetDepthBiasEnable: ProcCmdSetDepthBiasEnable,
CmdSetDepthBiasEnableEXT: ProcCmdSetDepthBiasEnableEXT,
CmdSetDepthBounds: ProcCmdSetDepthBounds,
CmdSetDepthBoundsTestEnable: ProcCmdSetDepthBoundsTestEnable,
CmdSetDepthBoundsTestEnableEXT: ProcCmdSetDepthBoundsTestEnableEXT,
CmdSetDepthClampEnableEXT: ProcCmdSetDepthClampEnableEXT,
+ CmdSetDepthClampRangeEXT: ProcCmdSetDepthClampRangeEXT,
CmdSetDepthClipEnableEXT: ProcCmdSetDepthClipEnableEXT,
CmdSetDepthClipNegativeOneToOneEXT: ProcCmdSetDepthClipNegativeOneToOneEXT,
CmdSetDepthCompareOp: ProcCmdSetDepthCompareOp,
@@ -2047,6 +2222,7 @@ Device_VTable :: struct {
CmdSetDepthTestEnableEXT: ProcCmdSetDepthTestEnableEXT,
CmdSetDepthWriteEnable: ProcCmdSetDepthWriteEnable,
CmdSetDepthWriteEnableEXT: ProcCmdSetDepthWriteEnableEXT,
+ CmdSetDescriptorBufferOffsets2EXT: ProcCmdSetDescriptorBufferOffsets2EXT,
CmdSetDescriptorBufferOffsetsEXT: ProcCmdSetDescriptorBufferOffsetsEXT,
CmdSetDeviceMask: ProcCmdSetDeviceMask,
CmdSetDeviceMaskKHR: ProcCmdSetDeviceMaskKHR,
@@ -2066,6 +2242,7 @@ Device_VTable :: struct {
CmdSetLineRasterizationModeEXT: ProcCmdSetLineRasterizationModeEXT,
CmdSetLineStippleEXT: ProcCmdSetLineStippleEXT,
CmdSetLineStippleEnableEXT: ProcCmdSetLineStippleEnableEXT,
+ CmdSetLineStippleKHR: ProcCmdSetLineStippleKHR,
CmdSetLineWidth: ProcCmdSetLineWidth,
CmdSetLogicOpEXT: ProcCmdSetLogicOpEXT,
CmdSetLogicOpEnableEXT: ProcCmdSetLogicOpEnableEXT,
@@ -2084,6 +2261,8 @@ Device_VTable :: struct {
CmdSetRasterizerDiscardEnable: ProcCmdSetRasterizerDiscardEnable,
CmdSetRasterizerDiscardEnableEXT: ProcCmdSetRasterizerDiscardEnableEXT,
CmdSetRayTracingPipelineStackSizeKHR: ProcCmdSetRayTracingPipelineStackSizeKHR,
+ CmdSetRenderingAttachmentLocationsKHR: ProcCmdSetRenderingAttachmentLocationsKHR,
+ CmdSetRenderingInputAttachmentIndicesKHR: ProcCmdSetRenderingInputAttachmentIndicesKHR,
CmdSetRepresentativeFragmentTestEnableNV: ProcCmdSetRepresentativeFragmentTestEnableNV,
CmdSetSampleLocationsEXT: ProcCmdSetSampleLocationsEXT,
CmdSetSampleLocationsEnableEXT: ProcCmdSetSampleLocationsEnableEXT,
@@ -2114,6 +2293,7 @@ Device_VTable :: struct {
CmdTraceRaysKHR: ProcCmdTraceRaysKHR,
CmdTraceRaysNV: ProcCmdTraceRaysNV,
CmdUpdateBuffer: ProcCmdUpdateBuffer,
+ CmdUpdatePipelineIndirectBufferNV: ProcCmdUpdatePipelineIndirectBufferNV,
CmdWaitEvents: ProcCmdWaitEvents,
CmdWaitEvents2: ProcCmdWaitEvents2,
CmdWaitEvents2KHR: ProcCmdWaitEvents2KHR,
@@ -2128,7 +2308,10 @@ Device_VTable :: struct {
CompileDeferredNV: ProcCompileDeferredNV,
CopyAccelerationStructureKHR: ProcCopyAccelerationStructureKHR,
CopyAccelerationStructureToMemoryKHR: ProcCopyAccelerationStructureToMemoryKHR,
+ CopyImageToImageEXT: ProcCopyImageToImageEXT,
+ CopyImageToMemoryEXT: ProcCopyImageToMemoryEXT,
CopyMemoryToAccelerationStructureKHR: ProcCopyMemoryToAccelerationStructureKHR,
+ CopyMemoryToImageEXT: ProcCopyMemoryToImageEXT,
CopyMemoryToMicromapEXT: ProcCopyMemoryToMicromapEXT,
CopyMicromapEXT: ProcCopyMicromapEXT,
CopyMicromapToMemoryEXT: ProcCopyMicromapToMemoryEXT,
@@ -2140,6 +2323,8 @@ Device_VTable :: struct {
CreateComputePipelines: ProcCreateComputePipelines,
CreateCuFunctionNVX: ProcCreateCuFunctionNVX,
CreateCuModuleNVX: ProcCreateCuModuleNVX,
+ CreateCudaFunctionNV: ProcCreateCudaFunctionNV,
+ CreateCudaModuleNV: ProcCreateCudaModuleNV,
CreateDeferredOperationKHR: ProcCreateDeferredOperationKHR,
CreateDescriptorPool: ProcCreateDescriptorPool,
CreateDescriptorSetLayout: ProcCreateDescriptorSetLayout,
@@ -2151,9 +2336,12 @@ Device_VTable :: struct {
CreateGraphicsPipelines: ProcCreateGraphicsPipelines,
CreateImage: ProcCreateImage,
CreateImageView: ProcCreateImageView,
+ CreateIndirectCommandsLayoutEXT: ProcCreateIndirectCommandsLayoutEXT,
CreateIndirectCommandsLayoutNV: ProcCreateIndirectCommandsLayoutNV,
+ CreateIndirectExecutionSetEXT: ProcCreateIndirectExecutionSetEXT,
CreateMicromapEXT: ProcCreateMicromapEXT,
CreateOpticalFlowSessionNV: ProcCreateOpticalFlowSessionNV,
+ CreatePipelineBinariesKHR: ProcCreatePipelineBinariesKHR,
CreatePipelineCache: ProcCreatePipelineCache,
CreatePipelineLayout: ProcCreatePipelineLayout,
CreatePrivateDataSlot: ProcCreatePrivateDataSlot,
@@ -2185,6 +2373,8 @@ Device_VTable :: struct {
DestroyCommandPool: ProcDestroyCommandPool,
DestroyCuFunctionNVX: ProcDestroyCuFunctionNVX,
DestroyCuModuleNVX: ProcDestroyCuModuleNVX,
+ DestroyCudaFunctionNV: ProcDestroyCudaFunctionNV,
+ DestroyCudaModuleNV: ProcDestroyCudaModuleNV,
DestroyDeferredOperationKHR: ProcDestroyDeferredOperationKHR,
DestroyDescriptorPool: ProcDestroyDescriptorPool,
DestroyDescriptorSetLayout: ProcDestroyDescriptorSetLayout,
@@ -2196,10 +2386,13 @@ Device_VTable :: struct {
DestroyFramebuffer: ProcDestroyFramebuffer,
DestroyImage: ProcDestroyImage,
DestroyImageView: ProcDestroyImageView,
+ DestroyIndirectCommandsLayoutEXT: ProcDestroyIndirectCommandsLayoutEXT,
DestroyIndirectCommandsLayoutNV: ProcDestroyIndirectCommandsLayoutNV,
+ DestroyIndirectExecutionSetEXT: ProcDestroyIndirectExecutionSetEXT,
DestroyMicromapEXT: ProcDestroyMicromapEXT,
DestroyOpticalFlowSessionNV: ProcDestroyOpticalFlowSessionNV,
DestroyPipeline: ProcDestroyPipeline,
+ DestroyPipelineBinaryKHR: ProcDestroyPipelineBinaryKHR,
DestroyPipelineCache: ProcDestroyPipelineCache,
DestroyPipelineLayout: ProcDestroyPipelineLayout,
DestroyPrivateDataSlot: ProcDestroyPrivateDataSlot,
@@ -2239,6 +2432,8 @@ Device_VTable :: struct {
GetBufferOpaqueCaptureAddressKHR: ProcGetBufferOpaqueCaptureAddressKHR,
GetBufferOpaqueCaptureDescriptorDataEXT: ProcGetBufferOpaqueCaptureDescriptorDataEXT,
GetCalibratedTimestampsEXT: ProcGetCalibratedTimestampsEXT,
+ GetCalibratedTimestampsKHR: ProcGetCalibratedTimestampsKHR,
+ GetCudaModuleCacheNV: ProcGetCudaModuleCacheNV,
GetDeferredOperationMaxConcurrencyKHR: ProcGetDeferredOperationMaxConcurrencyKHR,
GetDeferredOperationResultKHR: ProcGetDeferredOperationResultKHR,
GetDescriptorEXT: ProcGetDescriptorEXT,
@@ -2261,6 +2456,7 @@ Device_VTable :: struct {
GetDeviceImageMemoryRequirementsKHR: ProcGetDeviceImageMemoryRequirementsKHR,
GetDeviceImageSparseMemoryRequirements: ProcGetDeviceImageSparseMemoryRequirements,
GetDeviceImageSparseMemoryRequirementsKHR: ProcGetDeviceImageSparseMemoryRequirementsKHR,
+ GetDeviceImageSubresourceLayoutKHR: ProcGetDeviceImageSubresourceLayoutKHR,
GetDeviceMemoryCommitment: ProcGetDeviceMemoryCommitment,
GetDeviceMemoryOpaqueCaptureAddress: ProcGetDeviceMemoryOpaqueCaptureAddress,
GetDeviceMemoryOpaqueCaptureAddressKHR: ProcGetDeviceMemoryOpaqueCaptureAddressKHR,
@@ -2270,11 +2466,13 @@ Device_VTable :: struct {
GetDeviceQueue2: ProcGetDeviceQueue2,
GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI: ProcGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI,
GetDynamicRenderingTilePropertiesQCOM: ProcGetDynamicRenderingTilePropertiesQCOM,
+ GetEncodedVideoSessionParametersKHR: ProcGetEncodedVideoSessionParametersKHR,
GetEventStatus: ProcGetEventStatus,
GetFenceFdKHR: ProcGetFenceFdKHR,
GetFenceStatus: ProcGetFenceStatus,
GetFenceWin32HandleKHR: ProcGetFenceWin32HandleKHR,
GetFramebufferTilePropertiesQCOM: ProcGetFramebufferTilePropertiesQCOM,
+ GetGeneratedCommandsMemoryRequirementsEXT: ProcGetGeneratedCommandsMemoryRequirementsEXT,
GetGeneratedCommandsMemoryRequirementsNV: ProcGetGeneratedCommandsMemoryRequirementsNV,
GetImageDrmFormatModifierPropertiesEXT: ProcGetImageDrmFormatModifierPropertiesEXT,
GetImageMemoryRequirements: ProcGetImageMemoryRequirements,
@@ -2286,9 +2484,11 @@ Device_VTable :: struct {
GetImageSparseMemoryRequirements2KHR: ProcGetImageSparseMemoryRequirements2KHR,
GetImageSubresourceLayout: ProcGetImageSubresourceLayout,
GetImageSubresourceLayout2EXT: ProcGetImageSubresourceLayout2EXT,
+ GetImageSubresourceLayout2KHR: ProcGetImageSubresourceLayout2KHR,
GetImageViewAddressNVX: ProcGetImageViewAddressNVX,
GetImageViewHandleNVX: ProcGetImageViewHandleNVX,
GetImageViewOpaqueCaptureDescriptorDataEXT: ProcGetImageViewOpaqueCaptureDescriptorDataEXT,
+ GetLatencyTimingsNV: ProcGetLatencyTimingsNV,
GetMemoryFdKHR: ProcGetMemoryFdKHR,
GetMemoryFdPropertiesKHR: ProcGetMemoryFdPropertiesKHR,
GetMemoryHostPointerPropertiesEXT: ProcGetMemoryHostPointerPropertiesEXT,
@@ -2299,10 +2499,14 @@ Device_VTable :: struct {
GetMicromapBuildSizesEXT: ProcGetMicromapBuildSizesEXT,
GetPastPresentationTimingGOOGLE: ProcGetPastPresentationTimingGOOGLE,
GetPerformanceParameterINTEL: ProcGetPerformanceParameterINTEL,
+ GetPipelineBinaryDataKHR: ProcGetPipelineBinaryDataKHR,
GetPipelineCacheData: ProcGetPipelineCacheData,
GetPipelineExecutableInternalRepresentationsKHR: ProcGetPipelineExecutableInternalRepresentationsKHR,
GetPipelineExecutablePropertiesKHR: ProcGetPipelineExecutablePropertiesKHR,
GetPipelineExecutableStatisticsKHR: ProcGetPipelineExecutableStatisticsKHR,
+ GetPipelineIndirectDeviceAddressNV: ProcGetPipelineIndirectDeviceAddressNV,
+ GetPipelineIndirectMemoryRequirementsNV: ProcGetPipelineIndirectMemoryRequirementsNV,
+ GetPipelineKeyKHR: ProcGetPipelineKeyKHR,
GetPipelinePropertiesEXT: ProcGetPipelinePropertiesEXT,
GetPrivateData: ProcGetPrivateData,
GetPrivateDataEXT: ProcGetPrivateDataEXT,
@@ -2315,6 +2519,7 @@ Device_VTable :: struct {
GetRayTracingShaderGroupStackSizeKHR: ProcGetRayTracingShaderGroupStackSizeKHR,
GetRefreshCycleDurationGOOGLE: ProcGetRefreshCycleDurationGOOGLE,
GetRenderAreaGranularity: ProcGetRenderAreaGranularity,
+ GetRenderingAreaGranularityKHR: ProcGetRenderingAreaGranularityKHR,
GetSamplerOpaqueCaptureDescriptorDataEXT: ProcGetSamplerOpaqueCaptureDescriptorDataEXT,
GetSemaphoreCounterValue: ProcGetSemaphoreCounterValue,
GetSemaphoreCounterValueKHR: ProcGetSemaphoreCounterValueKHR,
@@ -2335,6 +2540,7 @@ Device_VTable :: struct {
ImportSemaphoreWin32HandleKHR: ProcImportSemaphoreWin32HandleKHR,
InitializePerformanceApiINTEL: ProcInitializePerformanceApiINTEL,
InvalidateMappedMemoryRanges: ProcInvalidateMappedMemoryRanges,
+ LatencySleepNV: ProcLatencySleepNV,
MapMemory: ProcMapMemory,
MapMemory2KHR: ProcMapMemory2KHR,
MergePipelineCaches: ProcMergePipelineCaches,
@@ -2343,6 +2549,7 @@ Device_VTable :: struct {
QueueBindSparse: ProcQueueBindSparse,
QueueEndDebugUtilsLabelEXT: ProcQueueEndDebugUtilsLabelEXT,
QueueInsertDebugUtilsLabelEXT: ProcQueueInsertDebugUtilsLabelEXT,
+ QueueNotifyOutOfBandNV: ProcQueueNotifyOutOfBandNV,
QueuePresentKHR: ProcQueuePresentKHR,
QueueSetPerformanceConfigurationINTEL: ProcQueueSetPerformanceConfigurationINTEL,
QueueSubmit: ProcQueueSubmit,
@@ -2351,6 +2558,7 @@ Device_VTable :: struct {
QueueWaitIdle: ProcQueueWaitIdle,
RegisterDeviceEventEXT: ProcRegisterDeviceEventEXT,
RegisterDisplayEventEXT: ProcRegisterDisplayEventEXT,
+ ReleaseCapturedPipelineDataKHR: ProcReleaseCapturedPipelineDataKHR,
ReleaseFullScreenExclusiveModeEXT: ProcReleaseFullScreenExclusiveModeEXT,
ReleasePerformanceConfigurationINTEL: ProcReleasePerformanceConfigurationINTEL,
ReleaseProfilingLockKHR: ProcReleaseProfilingLockKHR,
@@ -2367,11 +2575,14 @@ Device_VTable :: struct {
SetDeviceMemoryPriorityEXT: ProcSetDeviceMemoryPriorityEXT,
SetEvent: ProcSetEvent,
SetHdrMetadataEXT: ProcSetHdrMetadataEXT,
+ SetLatencyMarkerNV: ProcSetLatencyMarkerNV,
+ SetLatencySleepModeNV: ProcSetLatencySleepModeNV,
SetLocalDimmingAMD: ProcSetLocalDimmingAMD,
SetPrivateData: ProcSetPrivateData,
SetPrivateDataEXT: ProcSetPrivateDataEXT,
SignalSemaphore: ProcSignalSemaphore,
SignalSemaphoreKHR: ProcSignalSemaphoreKHR,
+ TransitionImageLayoutEXT: ProcTransitionImageLayoutEXT,
TrimCommandPool: ProcTrimCommandPool,
TrimCommandPoolKHR: ProcTrimCommandPoolKHR,
UninitializePerformanceApiINTEL: ProcUninitializePerformanceApiINTEL,
@@ -2380,6 +2591,8 @@ Device_VTable :: struct {
UpdateDescriptorSetWithTemplate: ProcUpdateDescriptorSetWithTemplate,
UpdateDescriptorSetWithTemplateKHR: ProcUpdateDescriptorSetWithTemplateKHR,
UpdateDescriptorSets: ProcUpdateDescriptorSets,
+ UpdateIndirectExecutionSetPipelineEXT: ProcUpdateIndirectExecutionSetPipelineEXT,
+ UpdateIndirectExecutionSetShaderEXT: ProcUpdateIndirectExecutionSetShaderEXT,
UpdateVideoSessionParametersKHR: ProcUpdateVideoSessionParametersKHR,
WaitForFences: ProcWaitForFences,
WaitForPresentKHR: ProcWaitForPresentKHR,
@@ -2398,6 +2611,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.AllocateCommandBuffers = auto_cast GetDeviceProcAddr(device, "vkAllocateCommandBuffers")
vtable.AllocateDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkAllocateDescriptorSets")
vtable.AllocateMemory = auto_cast GetDeviceProcAddr(device, "vkAllocateMemory")
+ vtable.AntiLagUpdateAMD = auto_cast GetDeviceProcAddr(device, "vkAntiLagUpdateAMD")
vtable.BeginCommandBuffer = auto_cast GetDeviceProcAddr(device, "vkBeginCommandBuffer")
vtable.BindAccelerationStructureMemoryNV = auto_cast GetDeviceProcAddr(device, "vkBindAccelerationStructureMemoryNV")
vtable.BindBufferMemory = auto_cast GetDeviceProcAddr(device, "vkBindBufferMemory")
@@ -2421,10 +2635,13 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdBeginRenderingKHR = auto_cast GetDeviceProcAddr(device, "vkCmdBeginRenderingKHR")
vtable.CmdBeginTransformFeedbackEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginTransformFeedbackEXT")
vtable.CmdBeginVideoCodingKHR = auto_cast GetDeviceProcAddr(device, "vkCmdBeginVideoCodingKHR")
+ vtable.CmdBindDescriptorBufferEmbeddedSamplers2EXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT")
vtable.CmdBindDescriptorBufferEmbeddedSamplersEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT")
vtable.CmdBindDescriptorBuffersEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorBuffersEXT")
vtable.CmdBindDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorSets")
+ vtable.CmdBindDescriptorSets2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorSets2KHR")
vtable.CmdBindIndexBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdBindIndexBuffer")
+ vtable.CmdBindIndexBuffer2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdBindIndexBuffer2KHR")
vtable.CmdBindInvocationMaskHUAWEI = auto_cast GetDeviceProcAddr(device, "vkCmdBindInvocationMaskHUAWEI")
vtable.CmdBindPipeline = auto_cast GetDeviceProcAddr(device, "vkCmdBindPipeline")
vtable.CmdBindPipelineShaderGroupNV = auto_cast GetDeviceProcAddr(device, "vkCmdBindPipelineShaderGroupNV")
@@ -2468,6 +2685,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdCopyMicromapToMemoryEXT = auto_cast GetDeviceProcAddr(device, "vkCmdCopyMicromapToMemoryEXT")
vtable.CmdCopyQueryPoolResults = auto_cast GetDeviceProcAddr(device, "vkCmdCopyQueryPoolResults")
vtable.CmdCuLaunchKernelNVX = auto_cast GetDeviceProcAddr(device, "vkCmdCuLaunchKernelNVX")
+ vtable.CmdCudaLaunchKernelNV = auto_cast GetDeviceProcAddr(device, "vkCmdCudaLaunchKernelNV")
vtable.CmdDebugMarkerBeginEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerBeginEXT")
vtable.CmdDebugMarkerEndEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerEndEXT")
vtable.CmdDebugMarkerInsertEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerInsertEXT")
@@ -2499,6 +2717,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdDrawMeshTasksNV = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMeshTasksNV")
vtable.CmdDrawMultiEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMultiEXT")
vtable.CmdDrawMultiIndexedEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMultiIndexedEXT")
+ vtable.CmdEncodeVideoKHR = auto_cast GetDeviceProcAddr(device, "vkCmdEncodeVideoKHR")
vtable.CmdEndConditionalRenderingEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndConditionalRenderingEXT")
vtable.CmdEndDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndDebugUtilsLabelEXT")
vtable.CmdEndQuery = auto_cast GetDeviceProcAddr(device, "vkCmdEndQuery")
@@ -2511,6 +2730,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdEndTransformFeedbackEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndTransformFeedbackEXT")
vtable.CmdEndVideoCodingKHR = auto_cast GetDeviceProcAddr(device, "vkCmdEndVideoCodingKHR")
vtable.CmdExecuteCommands = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteCommands")
+ vtable.CmdExecuteGeneratedCommandsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteGeneratedCommandsEXT")
vtable.CmdExecuteGeneratedCommandsNV = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteGeneratedCommandsNV")
vtable.CmdFillBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdFillBuffer")
vtable.CmdInsertDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdInsertDebugUtilsLabelEXT")
@@ -2521,9 +2741,13 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdPipelineBarrier = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier")
vtable.CmdPipelineBarrier2 = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier2")
vtable.CmdPipelineBarrier2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier2KHR")
+ vtable.CmdPreprocessGeneratedCommandsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdPreprocessGeneratedCommandsEXT")
vtable.CmdPreprocessGeneratedCommandsNV = auto_cast GetDeviceProcAddr(device, "vkCmdPreprocessGeneratedCommandsNV")
vtable.CmdPushConstants = auto_cast GetDeviceProcAddr(device, "vkCmdPushConstants")
+ vtable.CmdPushConstants2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushConstants2KHR")
+ vtable.CmdPushDescriptorSet2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSet2KHR")
vtable.CmdPushDescriptorSetKHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetKHR")
+ vtable.CmdPushDescriptorSetWithTemplate2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetWithTemplate2KHR")
vtable.CmdPushDescriptorSetWithTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetWithTemplateKHR")
vtable.CmdResetEvent = auto_cast GetDeviceProcAddr(device, "vkCmdResetEvent")
vtable.CmdResetEvent2 = auto_cast GetDeviceProcAddr(device, "vkCmdResetEvent2")
@@ -2552,12 +2776,14 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdSetCullMode = auto_cast GetDeviceProcAddr(device, "vkCmdSetCullMode")
vtable.CmdSetCullModeEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetCullModeEXT")
vtable.CmdSetDepthBias = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBias")
+ vtable.CmdSetDepthBias2EXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBias2EXT")
vtable.CmdSetDepthBiasEnable = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBiasEnable")
vtable.CmdSetDepthBiasEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBiasEnableEXT")
vtable.CmdSetDepthBounds = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBounds")
vtable.CmdSetDepthBoundsTestEnable = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBoundsTestEnable")
vtable.CmdSetDepthBoundsTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBoundsTestEnableEXT")
vtable.CmdSetDepthClampEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthClampEnableEXT")
+ vtable.CmdSetDepthClampRangeEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthClampRangeEXT")
vtable.CmdSetDepthClipEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthClipEnableEXT")
vtable.CmdSetDepthClipNegativeOneToOneEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthClipNegativeOneToOneEXT")
vtable.CmdSetDepthCompareOp = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthCompareOp")
@@ -2566,6 +2792,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdSetDepthTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthTestEnableEXT")
vtable.CmdSetDepthWriteEnable = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthWriteEnable")
vtable.CmdSetDepthWriteEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthWriteEnableEXT")
+ vtable.CmdSetDescriptorBufferOffsets2EXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDescriptorBufferOffsets2EXT")
vtable.CmdSetDescriptorBufferOffsetsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDescriptorBufferOffsetsEXT")
vtable.CmdSetDeviceMask = auto_cast GetDeviceProcAddr(device, "vkCmdSetDeviceMask")
vtable.CmdSetDeviceMaskKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetDeviceMaskKHR")
@@ -2585,6 +2812,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdSetLineRasterizationModeEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineRasterizationModeEXT")
vtable.CmdSetLineStippleEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineStippleEXT")
vtable.CmdSetLineStippleEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineStippleEnableEXT")
+ vtable.CmdSetLineStippleKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineStippleKHR")
vtable.CmdSetLineWidth = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineWidth")
vtable.CmdSetLogicOpEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLogicOpEXT")
vtable.CmdSetLogicOpEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLogicOpEnableEXT")
@@ -2603,6 +2831,8 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdSetRasterizerDiscardEnable = auto_cast GetDeviceProcAddr(device, "vkCmdSetRasterizerDiscardEnable")
vtable.CmdSetRasterizerDiscardEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetRasterizerDiscardEnableEXT")
vtable.CmdSetRayTracingPipelineStackSizeKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ vtable.CmdSetRenderingAttachmentLocationsKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetRenderingAttachmentLocationsKHR")
+ vtable.CmdSetRenderingInputAttachmentIndicesKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetRenderingInputAttachmentIndicesKHR")
vtable.CmdSetRepresentativeFragmentTestEnableNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetRepresentativeFragmentTestEnableNV")
vtable.CmdSetSampleLocationsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetSampleLocationsEXT")
vtable.CmdSetSampleLocationsEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetSampleLocationsEnableEXT")
@@ -2633,6 +2863,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CmdTraceRaysKHR = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysKHR")
vtable.CmdTraceRaysNV = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysNV")
vtable.CmdUpdateBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdUpdateBuffer")
+ vtable.CmdUpdatePipelineIndirectBufferNV = auto_cast GetDeviceProcAddr(device, "vkCmdUpdatePipelineIndirectBufferNV")
vtable.CmdWaitEvents = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents")
vtable.CmdWaitEvents2 = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents2")
vtable.CmdWaitEvents2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents2KHR")
@@ -2647,7 +2878,10 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CompileDeferredNV = auto_cast GetDeviceProcAddr(device, "vkCompileDeferredNV")
vtable.CopyAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCopyAccelerationStructureKHR")
vtable.CopyAccelerationStructureToMemoryKHR = auto_cast GetDeviceProcAddr(device, "vkCopyAccelerationStructureToMemoryKHR")
+ vtable.CopyImageToImageEXT = auto_cast GetDeviceProcAddr(device, "vkCopyImageToImageEXT")
+ vtable.CopyImageToMemoryEXT = auto_cast GetDeviceProcAddr(device, "vkCopyImageToMemoryEXT")
vtable.CopyMemoryToAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCopyMemoryToAccelerationStructureKHR")
+ vtable.CopyMemoryToImageEXT = auto_cast GetDeviceProcAddr(device, "vkCopyMemoryToImageEXT")
vtable.CopyMemoryToMicromapEXT = auto_cast GetDeviceProcAddr(device, "vkCopyMemoryToMicromapEXT")
vtable.CopyMicromapEXT = auto_cast GetDeviceProcAddr(device, "vkCopyMicromapEXT")
vtable.CopyMicromapToMemoryEXT = auto_cast GetDeviceProcAddr(device, "vkCopyMicromapToMemoryEXT")
@@ -2659,6 +2893,8 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CreateComputePipelines = auto_cast GetDeviceProcAddr(device, "vkCreateComputePipelines")
vtable.CreateCuFunctionNVX = auto_cast GetDeviceProcAddr(device, "vkCreateCuFunctionNVX")
vtable.CreateCuModuleNVX = auto_cast GetDeviceProcAddr(device, "vkCreateCuModuleNVX")
+ vtable.CreateCudaFunctionNV = auto_cast GetDeviceProcAddr(device, "vkCreateCudaFunctionNV")
+ vtable.CreateCudaModuleNV = auto_cast GetDeviceProcAddr(device, "vkCreateCudaModuleNV")
vtable.CreateDeferredOperationKHR = auto_cast GetDeviceProcAddr(device, "vkCreateDeferredOperationKHR")
vtable.CreateDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorPool")
vtable.CreateDescriptorSetLayout = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorSetLayout")
@@ -2670,9 +2906,12 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.CreateGraphicsPipelines = auto_cast GetDeviceProcAddr(device, "vkCreateGraphicsPipelines")
vtable.CreateImage = auto_cast GetDeviceProcAddr(device, "vkCreateImage")
vtable.CreateImageView = auto_cast GetDeviceProcAddr(device, "vkCreateImageView")
+ vtable.CreateIndirectCommandsLayoutEXT = auto_cast GetDeviceProcAddr(device, "vkCreateIndirectCommandsLayoutEXT")
vtable.CreateIndirectCommandsLayoutNV = auto_cast GetDeviceProcAddr(device, "vkCreateIndirectCommandsLayoutNV")
+ vtable.CreateIndirectExecutionSetEXT = auto_cast GetDeviceProcAddr(device, "vkCreateIndirectExecutionSetEXT")
vtable.CreateMicromapEXT = auto_cast GetDeviceProcAddr(device, "vkCreateMicromapEXT")
vtable.CreateOpticalFlowSessionNV = auto_cast GetDeviceProcAddr(device, "vkCreateOpticalFlowSessionNV")
+ vtable.CreatePipelineBinariesKHR = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineBinariesKHR")
vtable.CreatePipelineCache = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineCache")
vtable.CreatePipelineLayout = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineLayout")
vtable.CreatePrivateDataSlot = auto_cast GetDeviceProcAddr(device, "vkCreatePrivateDataSlot")
@@ -2704,6 +2943,8 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.DestroyCommandPool = auto_cast GetDeviceProcAddr(device, "vkDestroyCommandPool")
vtable.DestroyCuFunctionNVX = auto_cast GetDeviceProcAddr(device, "vkDestroyCuFunctionNVX")
vtable.DestroyCuModuleNVX = auto_cast GetDeviceProcAddr(device, "vkDestroyCuModuleNVX")
+ vtable.DestroyCudaFunctionNV = auto_cast GetDeviceProcAddr(device, "vkDestroyCudaFunctionNV")
+ vtable.DestroyCudaModuleNV = auto_cast GetDeviceProcAddr(device, "vkDestroyCudaModuleNV")
vtable.DestroyDeferredOperationKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyDeferredOperationKHR")
vtable.DestroyDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorPool")
vtable.DestroyDescriptorSetLayout = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorSetLayout")
@@ -2715,10 +2956,13 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.DestroyFramebuffer = auto_cast GetDeviceProcAddr(device, "vkDestroyFramebuffer")
vtable.DestroyImage = auto_cast GetDeviceProcAddr(device, "vkDestroyImage")
vtable.DestroyImageView = auto_cast GetDeviceProcAddr(device, "vkDestroyImageView")
+ vtable.DestroyIndirectCommandsLayoutEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyIndirectCommandsLayoutEXT")
vtable.DestroyIndirectCommandsLayoutNV = auto_cast GetDeviceProcAddr(device, "vkDestroyIndirectCommandsLayoutNV")
+ vtable.DestroyIndirectExecutionSetEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyIndirectExecutionSetEXT")
vtable.DestroyMicromapEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyMicromapEXT")
vtable.DestroyOpticalFlowSessionNV = auto_cast GetDeviceProcAddr(device, "vkDestroyOpticalFlowSessionNV")
vtable.DestroyPipeline = auto_cast GetDeviceProcAddr(device, "vkDestroyPipeline")
+ vtable.DestroyPipelineBinaryKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineBinaryKHR")
vtable.DestroyPipelineCache = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineCache")
vtable.DestroyPipelineLayout = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineLayout")
vtable.DestroyPrivateDataSlot = auto_cast GetDeviceProcAddr(device, "vkDestroyPrivateDataSlot")
@@ -2758,6 +3002,8 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.GetBufferOpaqueCaptureAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetBufferOpaqueCaptureAddressKHR")
vtable.GetBufferOpaqueCaptureDescriptorDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetBufferOpaqueCaptureDescriptorDataEXT")
vtable.GetCalibratedTimestampsEXT = auto_cast GetDeviceProcAddr(device, "vkGetCalibratedTimestampsEXT")
+ vtable.GetCalibratedTimestampsKHR = auto_cast GetDeviceProcAddr(device, "vkGetCalibratedTimestampsKHR")
+ vtable.GetCudaModuleCacheNV = auto_cast GetDeviceProcAddr(device, "vkGetCudaModuleCacheNV")
vtable.GetDeferredOperationMaxConcurrencyKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeferredOperationMaxConcurrencyKHR")
vtable.GetDeferredOperationResultKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeferredOperationResultKHR")
vtable.GetDescriptorEXT = auto_cast GetDeviceProcAddr(device, "vkGetDescriptorEXT")
@@ -2780,6 +3026,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.GetDeviceImageMemoryRequirementsKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceImageMemoryRequirementsKHR")
vtable.GetDeviceImageSparseMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetDeviceImageSparseMemoryRequirements")
vtable.GetDeviceImageSparseMemoryRequirementsKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceImageSparseMemoryRequirementsKHR")
+ vtable.GetDeviceImageSubresourceLayoutKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceImageSubresourceLayoutKHR")
vtable.GetDeviceMemoryCommitment = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryCommitment")
vtable.GetDeviceMemoryOpaqueCaptureAddress = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryOpaqueCaptureAddress")
vtable.GetDeviceMemoryOpaqueCaptureAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
@@ -2789,11 +3036,13 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.GetDeviceQueue2 = auto_cast GetDeviceProcAddr(device, "vkGetDeviceQueue2")
vtable.GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = auto_cast GetDeviceProcAddr(device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
vtable.GetDynamicRenderingTilePropertiesQCOM = auto_cast GetDeviceProcAddr(device, "vkGetDynamicRenderingTilePropertiesQCOM")
+ vtable.GetEncodedVideoSessionParametersKHR = auto_cast GetDeviceProcAddr(device, "vkGetEncodedVideoSessionParametersKHR")
vtable.GetEventStatus = auto_cast GetDeviceProcAddr(device, "vkGetEventStatus")
vtable.GetFenceFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetFenceFdKHR")
vtable.GetFenceStatus = auto_cast GetDeviceProcAddr(device, "vkGetFenceStatus")
vtable.GetFenceWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkGetFenceWin32HandleKHR")
vtable.GetFramebufferTilePropertiesQCOM = auto_cast GetDeviceProcAddr(device, "vkGetFramebufferTilePropertiesQCOM")
+ vtable.GetGeneratedCommandsMemoryRequirementsEXT = auto_cast GetDeviceProcAddr(device, "vkGetGeneratedCommandsMemoryRequirementsEXT")
vtable.GetGeneratedCommandsMemoryRequirementsNV = auto_cast GetDeviceProcAddr(device, "vkGetGeneratedCommandsMemoryRequirementsNV")
vtable.GetImageDrmFormatModifierPropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetImageDrmFormatModifierPropertiesEXT")
vtable.GetImageMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetImageMemoryRequirements")
@@ -2805,9 +3054,11 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.GetImageSparseMemoryRequirements2KHR = auto_cast GetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements2KHR")
vtable.GetImageSubresourceLayout = auto_cast GetDeviceProcAddr(device, "vkGetImageSubresourceLayout")
vtable.GetImageSubresourceLayout2EXT = auto_cast GetDeviceProcAddr(device, "vkGetImageSubresourceLayout2EXT")
+ vtable.GetImageSubresourceLayout2KHR = auto_cast GetDeviceProcAddr(device, "vkGetImageSubresourceLayout2KHR")
vtable.GetImageViewAddressNVX = auto_cast GetDeviceProcAddr(device, "vkGetImageViewAddressNVX")
vtable.GetImageViewHandleNVX = auto_cast GetDeviceProcAddr(device, "vkGetImageViewHandleNVX")
vtable.GetImageViewOpaqueCaptureDescriptorDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetImageViewOpaqueCaptureDescriptorDataEXT")
+ vtable.GetLatencyTimingsNV = auto_cast GetDeviceProcAddr(device, "vkGetLatencyTimingsNV")
vtable.GetMemoryFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryFdKHR")
vtable.GetMemoryFdPropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryFdPropertiesKHR")
vtable.GetMemoryHostPointerPropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetMemoryHostPointerPropertiesEXT")
@@ -2818,10 +3069,14 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.GetMicromapBuildSizesEXT = auto_cast GetDeviceProcAddr(device, "vkGetMicromapBuildSizesEXT")
vtable.GetPastPresentationTimingGOOGLE = auto_cast GetDeviceProcAddr(device, "vkGetPastPresentationTimingGOOGLE")
vtable.GetPerformanceParameterINTEL = auto_cast GetDeviceProcAddr(device, "vkGetPerformanceParameterINTEL")
+ vtable.GetPipelineBinaryDataKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineBinaryDataKHR")
vtable.GetPipelineCacheData = auto_cast GetDeviceProcAddr(device, "vkGetPipelineCacheData")
vtable.GetPipelineExecutableInternalRepresentationsKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutableInternalRepresentationsKHR")
vtable.GetPipelineExecutablePropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutablePropertiesKHR")
vtable.GetPipelineExecutableStatisticsKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutableStatisticsKHR")
+ vtable.GetPipelineIndirectDeviceAddressNV = auto_cast GetDeviceProcAddr(device, "vkGetPipelineIndirectDeviceAddressNV")
+ vtable.GetPipelineIndirectMemoryRequirementsNV = auto_cast GetDeviceProcAddr(device, "vkGetPipelineIndirectMemoryRequirementsNV")
+ vtable.GetPipelineKeyKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineKeyKHR")
vtable.GetPipelinePropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetPipelinePropertiesEXT")
vtable.GetPrivateData = auto_cast GetDeviceProcAddr(device, "vkGetPrivateData")
vtable.GetPrivateDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetPrivateDataEXT")
@@ -2834,6 +3089,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.GetRayTracingShaderGroupStackSizeKHR = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingShaderGroupStackSizeKHR")
vtable.GetRefreshCycleDurationGOOGLE = auto_cast GetDeviceProcAddr(device, "vkGetRefreshCycleDurationGOOGLE")
vtable.GetRenderAreaGranularity = auto_cast GetDeviceProcAddr(device, "vkGetRenderAreaGranularity")
+ vtable.GetRenderingAreaGranularityKHR = auto_cast GetDeviceProcAddr(device, "vkGetRenderingAreaGranularityKHR")
vtable.GetSamplerOpaqueCaptureDescriptorDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetSamplerOpaqueCaptureDescriptorDataEXT")
vtable.GetSemaphoreCounterValue = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreCounterValue")
vtable.GetSemaphoreCounterValueKHR = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreCounterValueKHR")
@@ -2854,6 +3110,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.ImportSemaphoreWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkImportSemaphoreWin32HandleKHR")
vtable.InitializePerformanceApiINTEL = auto_cast GetDeviceProcAddr(device, "vkInitializePerformanceApiINTEL")
vtable.InvalidateMappedMemoryRanges = auto_cast GetDeviceProcAddr(device, "vkInvalidateMappedMemoryRanges")
+ vtable.LatencySleepNV = auto_cast GetDeviceProcAddr(device, "vkLatencySleepNV")
vtable.MapMemory = auto_cast GetDeviceProcAddr(device, "vkMapMemory")
vtable.MapMemory2KHR = auto_cast GetDeviceProcAddr(device, "vkMapMemory2KHR")
vtable.MergePipelineCaches = auto_cast GetDeviceProcAddr(device, "vkMergePipelineCaches")
@@ -2862,6 +3119,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.QueueBindSparse = auto_cast GetDeviceProcAddr(device, "vkQueueBindSparse")
vtable.QueueEndDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueEndDebugUtilsLabelEXT")
vtable.QueueInsertDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueInsertDebugUtilsLabelEXT")
+ vtable.QueueNotifyOutOfBandNV = auto_cast GetDeviceProcAddr(device, "vkQueueNotifyOutOfBandNV")
vtable.QueuePresentKHR = auto_cast GetDeviceProcAddr(device, "vkQueuePresentKHR")
vtable.QueueSetPerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkQueueSetPerformanceConfigurationINTEL")
vtable.QueueSubmit = auto_cast GetDeviceProcAddr(device, "vkQueueSubmit")
@@ -2870,6 +3128,7 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.QueueWaitIdle = auto_cast GetDeviceProcAddr(device, "vkQueueWaitIdle")
vtable.RegisterDeviceEventEXT = auto_cast GetDeviceProcAddr(device, "vkRegisterDeviceEventEXT")
vtable.RegisterDisplayEventEXT = auto_cast GetDeviceProcAddr(device, "vkRegisterDisplayEventEXT")
+ vtable.ReleaseCapturedPipelineDataKHR = auto_cast GetDeviceProcAddr(device, "vkReleaseCapturedPipelineDataKHR")
vtable.ReleaseFullScreenExclusiveModeEXT = auto_cast GetDeviceProcAddr(device, "vkReleaseFullScreenExclusiveModeEXT")
vtable.ReleasePerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkReleasePerformanceConfigurationINTEL")
vtable.ReleaseProfilingLockKHR = auto_cast GetDeviceProcAddr(device, "vkReleaseProfilingLockKHR")
@@ -2886,11 +3145,14 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.SetDeviceMemoryPriorityEXT = auto_cast GetDeviceProcAddr(device, "vkSetDeviceMemoryPriorityEXT")
vtable.SetEvent = auto_cast GetDeviceProcAddr(device, "vkSetEvent")
vtable.SetHdrMetadataEXT = auto_cast GetDeviceProcAddr(device, "vkSetHdrMetadataEXT")
+ vtable.SetLatencyMarkerNV = auto_cast GetDeviceProcAddr(device, "vkSetLatencyMarkerNV")
+ vtable.SetLatencySleepModeNV = auto_cast GetDeviceProcAddr(device, "vkSetLatencySleepModeNV")
vtable.SetLocalDimmingAMD = auto_cast GetDeviceProcAddr(device, "vkSetLocalDimmingAMD")
vtable.SetPrivateData = auto_cast GetDeviceProcAddr(device, "vkSetPrivateData")
vtable.SetPrivateDataEXT = auto_cast GetDeviceProcAddr(device, "vkSetPrivateDataEXT")
vtable.SignalSemaphore = auto_cast GetDeviceProcAddr(device, "vkSignalSemaphore")
vtable.SignalSemaphoreKHR = auto_cast GetDeviceProcAddr(device, "vkSignalSemaphoreKHR")
+ vtable.TransitionImageLayoutEXT = auto_cast GetDeviceProcAddr(device, "vkTransitionImageLayoutEXT")
vtable.TrimCommandPool = auto_cast GetDeviceProcAddr(device, "vkTrimCommandPool")
vtable.TrimCommandPoolKHR = auto_cast GetDeviceProcAddr(device, "vkTrimCommandPoolKHR")
vtable.UninitializePerformanceApiINTEL = auto_cast GetDeviceProcAddr(device, "vkUninitializePerformanceApiINTEL")
@@ -2899,6 +3161,8 @@ load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable
vtable.UpdateDescriptorSetWithTemplate = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplate")
vtable.UpdateDescriptorSetWithTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplateKHR")
vtable.UpdateDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSets")
+ vtable.UpdateIndirectExecutionSetPipelineEXT = auto_cast GetDeviceProcAddr(device, "vkUpdateIndirectExecutionSetPipelineEXT")
+ vtable.UpdateIndirectExecutionSetShaderEXT = auto_cast GetDeviceProcAddr(device, "vkUpdateIndirectExecutionSetShaderEXT")
vtable.UpdateVideoSessionParametersKHR = auto_cast GetDeviceProcAddr(device, "vkUpdateVideoSessionParametersKHR")
vtable.WaitForFences = auto_cast GetDeviceProcAddr(device, "vkWaitForFences")
vtable.WaitForPresentKHR = auto_cast GetDeviceProcAddr(device, "vkWaitForPresentKHR")
@@ -2917,6 +3181,7 @@ load_proc_addresses_device :: proc(device: Device) {
AllocateCommandBuffers = auto_cast GetDeviceProcAddr(device, "vkAllocateCommandBuffers")
AllocateDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkAllocateDescriptorSets")
AllocateMemory = auto_cast GetDeviceProcAddr(device, "vkAllocateMemory")
+ AntiLagUpdateAMD = auto_cast GetDeviceProcAddr(device, "vkAntiLagUpdateAMD")
BeginCommandBuffer = auto_cast GetDeviceProcAddr(device, "vkBeginCommandBuffer")
BindAccelerationStructureMemoryNV = auto_cast GetDeviceProcAddr(device, "vkBindAccelerationStructureMemoryNV")
BindBufferMemory = auto_cast GetDeviceProcAddr(device, "vkBindBufferMemory")
@@ -2940,10 +3205,13 @@ load_proc_addresses_device :: proc(device: Device) {
CmdBeginRenderingKHR = auto_cast GetDeviceProcAddr(device, "vkCmdBeginRenderingKHR")
CmdBeginTransformFeedbackEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginTransformFeedbackEXT")
CmdBeginVideoCodingKHR = auto_cast GetDeviceProcAddr(device, "vkCmdBeginVideoCodingKHR")
+ CmdBindDescriptorBufferEmbeddedSamplers2EXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT")
CmdBindDescriptorBufferEmbeddedSamplersEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT")
CmdBindDescriptorBuffersEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorBuffersEXT")
CmdBindDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorSets")
+ CmdBindDescriptorSets2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorSets2KHR")
CmdBindIndexBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdBindIndexBuffer")
+ CmdBindIndexBuffer2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdBindIndexBuffer2KHR")
CmdBindInvocationMaskHUAWEI = auto_cast GetDeviceProcAddr(device, "vkCmdBindInvocationMaskHUAWEI")
CmdBindPipeline = auto_cast GetDeviceProcAddr(device, "vkCmdBindPipeline")
CmdBindPipelineShaderGroupNV = auto_cast GetDeviceProcAddr(device, "vkCmdBindPipelineShaderGroupNV")
@@ -2987,6 +3255,7 @@ load_proc_addresses_device :: proc(device: Device) {
CmdCopyMicromapToMemoryEXT = auto_cast GetDeviceProcAddr(device, "vkCmdCopyMicromapToMemoryEXT")
CmdCopyQueryPoolResults = auto_cast GetDeviceProcAddr(device, "vkCmdCopyQueryPoolResults")
CmdCuLaunchKernelNVX = auto_cast GetDeviceProcAddr(device, "vkCmdCuLaunchKernelNVX")
+ CmdCudaLaunchKernelNV = auto_cast GetDeviceProcAddr(device, "vkCmdCudaLaunchKernelNV")
CmdDebugMarkerBeginEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerBeginEXT")
CmdDebugMarkerEndEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerEndEXT")
CmdDebugMarkerInsertEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerInsertEXT")
@@ -3018,6 +3287,7 @@ load_proc_addresses_device :: proc(device: Device) {
CmdDrawMeshTasksNV = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMeshTasksNV")
CmdDrawMultiEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMultiEXT")
CmdDrawMultiIndexedEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMultiIndexedEXT")
+ CmdEncodeVideoKHR = auto_cast GetDeviceProcAddr(device, "vkCmdEncodeVideoKHR")
CmdEndConditionalRenderingEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndConditionalRenderingEXT")
CmdEndDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndDebugUtilsLabelEXT")
CmdEndQuery = auto_cast GetDeviceProcAddr(device, "vkCmdEndQuery")
@@ -3030,6 +3300,7 @@ load_proc_addresses_device :: proc(device: Device) {
CmdEndTransformFeedbackEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndTransformFeedbackEXT")
CmdEndVideoCodingKHR = auto_cast GetDeviceProcAddr(device, "vkCmdEndVideoCodingKHR")
CmdExecuteCommands = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteCommands")
+ CmdExecuteGeneratedCommandsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteGeneratedCommandsEXT")
CmdExecuteGeneratedCommandsNV = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteGeneratedCommandsNV")
CmdFillBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdFillBuffer")
CmdInsertDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdInsertDebugUtilsLabelEXT")
@@ -3040,9 +3311,13 @@ load_proc_addresses_device :: proc(device: Device) {
CmdPipelineBarrier = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier")
CmdPipelineBarrier2 = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier2")
CmdPipelineBarrier2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier2KHR")
+ CmdPreprocessGeneratedCommandsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdPreprocessGeneratedCommandsEXT")
CmdPreprocessGeneratedCommandsNV = auto_cast GetDeviceProcAddr(device, "vkCmdPreprocessGeneratedCommandsNV")
CmdPushConstants = auto_cast GetDeviceProcAddr(device, "vkCmdPushConstants")
+ CmdPushConstants2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushConstants2KHR")
+ CmdPushDescriptorSet2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSet2KHR")
CmdPushDescriptorSetKHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetKHR")
+ CmdPushDescriptorSetWithTemplate2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetWithTemplate2KHR")
CmdPushDescriptorSetWithTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetWithTemplateKHR")
CmdResetEvent = auto_cast GetDeviceProcAddr(device, "vkCmdResetEvent")
CmdResetEvent2 = auto_cast GetDeviceProcAddr(device, "vkCmdResetEvent2")
@@ -3071,12 +3346,14 @@ load_proc_addresses_device :: proc(device: Device) {
CmdSetCullMode = auto_cast GetDeviceProcAddr(device, "vkCmdSetCullMode")
CmdSetCullModeEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetCullModeEXT")
CmdSetDepthBias = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBias")
+ CmdSetDepthBias2EXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBias2EXT")
CmdSetDepthBiasEnable = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBiasEnable")
CmdSetDepthBiasEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBiasEnableEXT")
CmdSetDepthBounds = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBounds")
CmdSetDepthBoundsTestEnable = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBoundsTestEnable")
CmdSetDepthBoundsTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBoundsTestEnableEXT")
CmdSetDepthClampEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthClampEnableEXT")
+ CmdSetDepthClampRangeEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthClampRangeEXT")
CmdSetDepthClipEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthClipEnableEXT")
CmdSetDepthClipNegativeOneToOneEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthClipNegativeOneToOneEXT")
CmdSetDepthCompareOp = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthCompareOp")
@@ -3085,6 +3362,7 @@ load_proc_addresses_device :: proc(device: Device) {
CmdSetDepthTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthTestEnableEXT")
CmdSetDepthWriteEnable = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthWriteEnable")
CmdSetDepthWriteEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthWriteEnableEXT")
+ CmdSetDescriptorBufferOffsets2EXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDescriptorBufferOffsets2EXT")
CmdSetDescriptorBufferOffsetsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDescriptorBufferOffsetsEXT")
CmdSetDeviceMask = auto_cast GetDeviceProcAddr(device, "vkCmdSetDeviceMask")
CmdSetDeviceMaskKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetDeviceMaskKHR")
@@ -3104,6 +3382,7 @@ load_proc_addresses_device :: proc(device: Device) {
CmdSetLineRasterizationModeEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineRasterizationModeEXT")
CmdSetLineStippleEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineStippleEXT")
CmdSetLineStippleEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineStippleEnableEXT")
+ CmdSetLineStippleKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineStippleKHR")
CmdSetLineWidth = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineWidth")
CmdSetLogicOpEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLogicOpEXT")
CmdSetLogicOpEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLogicOpEnableEXT")
@@ -3122,6 +3401,8 @@ load_proc_addresses_device :: proc(device: Device) {
CmdSetRasterizerDiscardEnable = auto_cast GetDeviceProcAddr(device, "vkCmdSetRasterizerDiscardEnable")
CmdSetRasterizerDiscardEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetRasterizerDiscardEnableEXT")
CmdSetRayTracingPipelineStackSizeKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ CmdSetRenderingAttachmentLocationsKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetRenderingAttachmentLocationsKHR")
+ CmdSetRenderingInputAttachmentIndicesKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetRenderingInputAttachmentIndicesKHR")
CmdSetRepresentativeFragmentTestEnableNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetRepresentativeFragmentTestEnableNV")
CmdSetSampleLocationsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetSampleLocationsEXT")
CmdSetSampleLocationsEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetSampleLocationsEnableEXT")
@@ -3152,6 +3433,7 @@ load_proc_addresses_device :: proc(device: Device) {
CmdTraceRaysKHR = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysKHR")
CmdTraceRaysNV = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysNV")
CmdUpdateBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdUpdateBuffer")
+ CmdUpdatePipelineIndirectBufferNV = auto_cast GetDeviceProcAddr(device, "vkCmdUpdatePipelineIndirectBufferNV")
CmdWaitEvents = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents")
CmdWaitEvents2 = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents2")
CmdWaitEvents2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents2KHR")
@@ -3166,7 +3448,10 @@ load_proc_addresses_device :: proc(device: Device) {
CompileDeferredNV = auto_cast GetDeviceProcAddr(device, "vkCompileDeferredNV")
CopyAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCopyAccelerationStructureKHR")
CopyAccelerationStructureToMemoryKHR = auto_cast GetDeviceProcAddr(device, "vkCopyAccelerationStructureToMemoryKHR")
+ CopyImageToImageEXT = auto_cast GetDeviceProcAddr(device, "vkCopyImageToImageEXT")
+ CopyImageToMemoryEXT = auto_cast GetDeviceProcAddr(device, "vkCopyImageToMemoryEXT")
CopyMemoryToAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCopyMemoryToAccelerationStructureKHR")
+ CopyMemoryToImageEXT = auto_cast GetDeviceProcAddr(device, "vkCopyMemoryToImageEXT")
CopyMemoryToMicromapEXT = auto_cast GetDeviceProcAddr(device, "vkCopyMemoryToMicromapEXT")
CopyMicromapEXT = auto_cast GetDeviceProcAddr(device, "vkCopyMicromapEXT")
CopyMicromapToMemoryEXT = auto_cast GetDeviceProcAddr(device, "vkCopyMicromapToMemoryEXT")
@@ -3178,6 +3463,8 @@ load_proc_addresses_device :: proc(device: Device) {
CreateComputePipelines = auto_cast GetDeviceProcAddr(device, "vkCreateComputePipelines")
CreateCuFunctionNVX = auto_cast GetDeviceProcAddr(device, "vkCreateCuFunctionNVX")
CreateCuModuleNVX = auto_cast GetDeviceProcAddr(device, "vkCreateCuModuleNVX")
+ CreateCudaFunctionNV = auto_cast GetDeviceProcAddr(device, "vkCreateCudaFunctionNV")
+ CreateCudaModuleNV = auto_cast GetDeviceProcAddr(device, "vkCreateCudaModuleNV")
CreateDeferredOperationKHR = auto_cast GetDeviceProcAddr(device, "vkCreateDeferredOperationKHR")
CreateDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorPool")
CreateDescriptorSetLayout = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorSetLayout")
@@ -3189,9 +3476,12 @@ load_proc_addresses_device :: proc(device: Device) {
CreateGraphicsPipelines = auto_cast GetDeviceProcAddr(device, "vkCreateGraphicsPipelines")
CreateImage = auto_cast GetDeviceProcAddr(device, "vkCreateImage")
CreateImageView = auto_cast GetDeviceProcAddr(device, "vkCreateImageView")
+ CreateIndirectCommandsLayoutEXT = auto_cast GetDeviceProcAddr(device, "vkCreateIndirectCommandsLayoutEXT")
CreateIndirectCommandsLayoutNV = auto_cast GetDeviceProcAddr(device, "vkCreateIndirectCommandsLayoutNV")
+ CreateIndirectExecutionSetEXT = auto_cast GetDeviceProcAddr(device, "vkCreateIndirectExecutionSetEXT")
CreateMicromapEXT = auto_cast GetDeviceProcAddr(device, "vkCreateMicromapEXT")
CreateOpticalFlowSessionNV = auto_cast GetDeviceProcAddr(device, "vkCreateOpticalFlowSessionNV")
+ CreatePipelineBinariesKHR = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineBinariesKHR")
CreatePipelineCache = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineCache")
CreatePipelineLayout = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineLayout")
CreatePrivateDataSlot = auto_cast GetDeviceProcAddr(device, "vkCreatePrivateDataSlot")
@@ -3223,6 +3513,8 @@ load_proc_addresses_device :: proc(device: Device) {
DestroyCommandPool = auto_cast GetDeviceProcAddr(device, "vkDestroyCommandPool")
DestroyCuFunctionNVX = auto_cast GetDeviceProcAddr(device, "vkDestroyCuFunctionNVX")
DestroyCuModuleNVX = auto_cast GetDeviceProcAddr(device, "vkDestroyCuModuleNVX")
+ DestroyCudaFunctionNV = auto_cast GetDeviceProcAddr(device, "vkDestroyCudaFunctionNV")
+ DestroyCudaModuleNV = auto_cast GetDeviceProcAddr(device, "vkDestroyCudaModuleNV")
DestroyDeferredOperationKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyDeferredOperationKHR")
DestroyDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorPool")
DestroyDescriptorSetLayout = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorSetLayout")
@@ -3234,10 +3526,13 @@ load_proc_addresses_device :: proc(device: Device) {
DestroyFramebuffer = auto_cast GetDeviceProcAddr(device, "vkDestroyFramebuffer")
DestroyImage = auto_cast GetDeviceProcAddr(device, "vkDestroyImage")
DestroyImageView = auto_cast GetDeviceProcAddr(device, "vkDestroyImageView")
+ DestroyIndirectCommandsLayoutEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyIndirectCommandsLayoutEXT")
DestroyIndirectCommandsLayoutNV = auto_cast GetDeviceProcAddr(device, "vkDestroyIndirectCommandsLayoutNV")
+ DestroyIndirectExecutionSetEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyIndirectExecutionSetEXT")
DestroyMicromapEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyMicromapEXT")
DestroyOpticalFlowSessionNV = auto_cast GetDeviceProcAddr(device, "vkDestroyOpticalFlowSessionNV")
DestroyPipeline = auto_cast GetDeviceProcAddr(device, "vkDestroyPipeline")
+ DestroyPipelineBinaryKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineBinaryKHR")
DestroyPipelineCache = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineCache")
DestroyPipelineLayout = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineLayout")
DestroyPrivateDataSlot = auto_cast GetDeviceProcAddr(device, "vkDestroyPrivateDataSlot")
@@ -3277,6 +3572,8 @@ load_proc_addresses_device :: proc(device: Device) {
GetBufferOpaqueCaptureAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetBufferOpaqueCaptureAddressKHR")
GetBufferOpaqueCaptureDescriptorDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetBufferOpaqueCaptureDescriptorDataEXT")
GetCalibratedTimestampsEXT = auto_cast GetDeviceProcAddr(device, "vkGetCalibratedTimestampsEXT")
+ GetCalibratedTimestampsKHR = auto_cast GetDeviceProcAddr(device, "vkGetCalibratedTimestampsKHR")
+ GetCudaModuleCacheNV = auto_cast GetDeviceProcAddr(device, "vkGetCudaModuleCacheNV")
GetDeferredOperationMaxConcurrencyKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeferredOperationMaxConcurrencyKHR")
GetDeferredOperationResultKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeferredOperationResultKHR")
GetDescriptorEXT = auto_cast GetDeviceProcAddr(device, "vkGetDescriptorEXT")
@@ -3299,6 +3596,7 @@ load_proc_addresses_device :: proc(device: Device) {
GetDeviceImageMemoryRequirementsKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceImageMemoryRequirementsKHR")
GetDeviceImageSparseMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetDeviceImageSparseMemoryRequirements")
GetDeviceImageSparseMemoryRequirementsKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceImageSparseMemoryRequirementsKHR")
+ GetDeviceImageSubresourceLayoutKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceImageSubresourceLayoutKHR")
GetDeviceMemoryCommitment = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryCommitment")
GetDeviceMemoryOpaqueCaptureAddress = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryOpaqueCaptureAddress")
GetDeviceMemoryOpaqueCaptureAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
@@ -3308,11 +3606,13 @@ load_proc_addresses_device :: proc(device: Device) {
GetDeviceQueue2 = auto_cast GetDeviceProcAddr(device, "vkGetDeviceQueue2")
GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = auto_cast GetDeviceProcAddr(device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
GetDynamicRenderingTilePropertiesQCOM = auto_cast GetDeviceProcAddr(device, "vkGetDynamicRenderingTilePropertiesQCOM")
+ GetEncodedVideoSessionParametersKHR = auto_cast GetDeviceProcAddr(device, "vkGetEncodedVideoSessionParametersKHR")
GetEventStatus = auto_cast GetDeviceProcAddr(device, "vkGetEventStatus")
GetFenceFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetFenceFdKHR")
GetFenceStatus = auto_cast GetDeviceProcAddr(device, "vkGetFenceStatus")
GetFenceWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkGetFenceWin32HandleKHR")
GetFramebufferTilePropertiesQCOM = auto_cast GetDeviceProcAddr(device, "vkGetFramebufferTilePropertiesQCOM")
+ GetGeneratedCommandsMemoryRequirementsEXT = auto_cast GetDeviceProcAddr(device, "vkGetGeneratedCommandsMemoryRequirementsEXT")
GetGeneratedCommandsMemoryRequirementsNV = auto_cast GetDeviceProcAddr(device, "vkGetGeneratedCommandsMemoryRequirementsNV")
GetImageDrmFormatModifierPropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetImageDrmFormatModifierPropertiesEXT")
GetImageMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetImageMemoryRequirements")
@@ -3324,9 +3624,11 @@ load_proc_addresses_device :: proc(device: Device) {
GetImageSparseMemoryRequirements2KHR = auto_cast GetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements2KHR")
GetImageSubresourceLayout = auto_cast GetDeviceProcAddr(device, "vkGetImageSubresourceLayout")
GetImageSubresourceLayout2EXT = auto_cast GetDeviceProcAddr(device, "vkGetImageSubresourceLayout2EXT")
+ GetImageSubresourceLayout2KHR = auto_cast GetDeviceProcAddr(device, "vkGetImageSubresourceLayout2KHR")
GetImageViewAddressNVX = auto_cast GetDeviceProcAddr(device, "vkGetImageViewAddressNVX")
GetImageViewHandleNVX = auto_cast GetDeviceProcAddr(device, "vkGetImageViewHandleNVX")
GetImageViewOpaqueCaptureDescriptorDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetImageViewOpaqueCaptureDescriptorDataEXT")
+ GetLatencyTimingsNV = auto_cast GetDeviceProcAddr(device, "vkGetLatencyTimingsNV")
GetMemoryFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryFdKHR")
GetMemoryFdPropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryFdPropertiesKHR")
GetMemoryHostPointerPropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetMemoryHostPointerPropertiesEXT")
@@ -3337,10 +3639,14 @@ load_proc_addresses_device :: proc(device: Device) {
GetMicromapBuildSizesEXT = auto_cast GetDeviceProcAddr(device, "vkGetMicromapBuildSizesEXT")
GetPastPresentationTimingGOOGLE = auto_cast GetDeviceProcAddr(device, "vkGetPastPresentationTimingGOOGLE")
GetPerformanceParameterINTEL = auto_cast GetDeviceProcAddr(device, "vkGetPerformanceParameterINTEL")
+ GetPipelineBinaryDataKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineBinaryDataKHR")
GetPipelineCacheData = auto_cast GetDeviceProcAddr(device, "vkGetPipelineCacheData")
GetPipelineExecutableInternalRepresentationsKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutableInternalRepresentationsKHR")
GetPipelineExecutablePropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutablePropertiesKHR")
GetPipelineExecutableStatisticsKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutableStatisticsKHR")
+ GetPipelineIndirectDeviceAddressNV = auto_cast GetDeviceProcAddr(device, "vkGetPipelineIndirectDeviceAddressNV")
+ GetPipelineIndirectMemoryRequirementsNV = auto_cast GetDeviceProcAddr(device, "vkGetPipelineIndirectMemoryRequirementsNV")
+ GetPipelineKeyKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineKeyKHR")
GetPipelinePropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetPipelinePropertiesEXT")
GetPrivateData = auto_cast GetDeviceProcAddr(device, "vkGetPrivateData")
GetPrivateDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetPrivateDataEXT")
@@ -3353,6 +3659,7 @@ load_proc_addresses_device :: proc(device: Device) {
GetRayTracingShaderGroupStackSizeKHR = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingShaderGroupStackSizeKHR")
GetRefreshCycleDurationGOOGLE = auto_cast GetDeviceProcAddr(device, "vkGetRefreshCycleDurationGOOGLE")
GetRenderAreaGranularity = auto_cast GetDeviceProcAddr(device, "vkGetRenderAreaGranularity")
+ GetRenderingAreaGranularityKHR = auto_cast GetDeviceProcAddr(device, "vkGetRenderingAreaGranularityKHR")
GetSamplerOpaqueCaptureDescriptorDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetSamplerOpaqueCaptureDescriptorDataEXT")
GetSemaphoreCounterValue = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreCounterValue")
GetSemaphoreCounterValueKHR = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreCounterValueKHR")
@@ -3373,6 +3680,7 @@ load_proc_addresses_device :: proc(device: Device) {
ImportSemaphoreWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkImportSemaphoreWin32HandleKHR")
InitializePerformanceApiINTEL = auto_cast GetDeviceProcAddr(device, "vkInitializePerformanceApiINTEL")
InvalidateMappedMemoryRanges = auto_cast GetDeviceProcAddr(device, "vkInvalidateMappedMemoryRanges")
+ LatencySleepNV = auto_cast GetDeviceProcAddr(device, "vkLatencySleepNV")
MapMemory = auto_cast GetDeviceProcAddr(device, "vkMapMemory")
MapMemory2KHR = auto_cast GetDeviceProcAddr(device, "vkMapMemory2KHR")
MergePipelineCaches = auto_cast GetDeviceProcAddr(device, "vkMergePipelineCaches")
@@ -3381,6 +3689,7 @@ load_proc_addresses_device :: proc(device: Device) {
QueueBindSparse = auto_cast GetDeviceProcAddr(device, "vkQueueBindSparse")
QueueEndDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueEndDebugUtilsLabelEXT")
QueueInsertDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueInsertDebugUtilsLabelEXT")
+ QueueNotifyOutOfBandNV = auto_cast GetDeviceProcAddr(device, "vkQueueNotifyOutOfBandNV")
QueuePresentKHR = auto_cast GetDeviceProcAddr(device, "vkQueuePresentKHR")
QueueSetPerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkQueueSetPerformanceConfigurationINTEL")
QueueSubmit = auto_cast GetDeviceProcAddr(device, "vkQueueSubmit")
@@ -3389,6 +3698,7 @@ load_proc_addresses_device :: proc(device: Device) {
QueueWaitIdle = auto_cast GetDeviceProcAddr(device, "vkQueueWaitIdle")
RegisterDeviceEventEXT = auto_cast GetDeviceProcAddr(device, "vkRegisterDeviceEventEXT")
RegisterDisplayEventEXT = auto_cast GetDeviceProcAddr(device, "vkRegisterDisplayEventEXT")
+ ReleaseCapturedPipelineDataKHR = auto_cast GetDeviceProcAddr(device, "vkReleaseCapturedPipelineDataKHR")
ReleaseFullScreenExclusiveModeEXT = auto_cast GetDeviceProcAddr(device, "vkReleaseFullScreenExclusiveModeEXT")
ReleasePerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkReleasePerformanceConfigurationINTEL")
ReleaseProfilingLockKHR = auto_cast GetDeviceProcAddr(device, "vkReleaseProfilingLockKHR")
@@ -3405,11 +3715,14 @@ load_proc_addresses_device :: proc(device: Device) {
SetDeviceMemoryPriorityEXT = auto_cast GetDeviceProcAddr(device, "vkSetDeviceMemoryPriorityEXT")
SetEvent = auto_cast GetDeviceProcAddr(device, "vkSetEvent")
SetHdrMetadataEXT = auto_cast GetDeviceProcAddr(device, "vkSetHdrMetadataEXT")
+ SetLatencyMarkerNV = auto_cast GetDeviceProcAddr(device, "vkSetLatencyMarkerNV")
+ SetLatencySleepModeNV = auto_cast GetDeviceProcAddr(device, "vkSetLatencySleepModeNV")
SetLocalDimmingAMD = auto_cast GetDeviceProcAddr(device, "vkSetLocalDimmingAMD")
SetPrivateData = auto_cast GetDeviceProcAddr(device, "vkSetPrivateData")
SetPrivateDataEXT = auto_cast GetDeviceProcAddr(device, "vkSetPrivateDataEXT")
SignalSemaphore = auto_cast GetDeviceProcAddr(device, "vkSignalSemaphore")
SignalSemaphoreKHR = auto_cast GetDeviceProcAddr(device, "vkSignalSemaphoreKHR")
+ TransitionImageLayoutEXT = auto_cast GetDeviceProcAddr(device, "vkTransitionImageLayoutEXT")
TrimCommandPool = auto_cast GetDeviceProcAddr(device, "vkTrimCommandPool")
TrimCommandPoolKHR = auto_cast GetDeviceProcAddr(device, "vkTrimCommandPoolKHR")
UninitializePerformanceApiINTEL = auto_cast GetDeviceProcAddr(device, "vkUninitializePerformanceApiINTEL")
@@ -3418,6 +3731,8 @@ load_proc_addresses_device :: proc(device: Device) {
UpdateDescriptorSetWithTemplate = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplate")
UpdateDescriptorSetWithTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplateKHR")
UpdateDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSets")
+ UpdateIndirectExecutionSetPipelineEXT = auto_cast GetDeviceProcAddr(device, "vkUpdateIndirectExecutionSetPipelineEXT")
+ UpdateIndirectExecutionSetShaderEXT = auto_cast GetDeviceProcAddr(device, "vkUpdateIndirectExecutionSetShaderEXT")
UpdateVideoSessionParametersKHR = auto_cast GetDeviceProcAddr(device, "vkUpdateVideoSessionParametersKHR")
WaitForFences = auto_cast GetDeviceProcAddr(device, "vkWaitForFences")
WaitForPresentKHR = auto_cast GetDeviceProcAddr(device, "vkWaitForPresentKHR")
@@ -3460,6 +3775,8 @@ load_proc_addresses_instance :: proc(instance: Instance) {
GetDrmDisplayEXT = auto_cast GetInstanceProcAddr(instance, "vkGetDrmDisplayEXT")
GetInstanceProcAddrLUNARG = auto_cast GetInstanceProcAddr(instance, "vkGetInstanceProcAddrLUNARG")
GetPhysicalDeviceCalibrateableTimeDomainsEXT = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT")
+ GetPhysicalDeviceCalibrateableTimeDomainsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR")
+ GetPhysicalDeviceCooperativeMatrixPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR")
GetPhysicalDeviceCooperativeMatrixPropertiesNV = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV")
GetPhysicalDeviceDisplayPlaneProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR")
GetPhysicalDeviceDisplayPlanePropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR")
@@ -3510,6 +3827,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
GetPhysicalDeviceToolProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceToolProperties")
GetPhysicalDeviceToolPropertiesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceToolPropertiesEXT")
GetPhysicalDeviceVideoCapabilitiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR")
+ GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR")
GetPhysicalDeviceVideoFormatPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR")
GetPhysicalDeviceWaylandPresentationSupportKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR")
GetPhysicalDeviceWin32PresentationSupportKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR")
@@ -3526,6 +3844,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
AllocateCommandBuffers = auto_cast GetInstanceProcAddr(instance, "vkAllocateCommandBuffers")
AllocateDescriptorSets = auto_cast GetInstanceProcAddr(instance, "vkAllocateDescriptorSets")
AllocateMemory = auto_cast GetInstanceProcAddr(instance, "vkAllocateMemory")
+ AntiLagUpdateAMD = auto_cast GetInstanceProcAddr(instance, "vkAntiLagUpdateAMD")
BeginCommandBuffer = auto_cast GetInstanceProcAddr(instance, "vkBeginCommandBuffer")
BindAccelerationStructureMemoryNV = auto_cast GetInstanceProcAddr(instance, "vkBindAccelerationStructureMemoryNV")
BindBufferMemory = auto_cast GetInstanceProcAddr(instance, "vkBindBufferMemory")
@@ -3549,10 +3868,13 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdBeginRenderingKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginRenderingKHR")
CmdBeginTransformFeedbackEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginTransformFeedbackEXT")
CmdBeginVideoCodingKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginVideoCodingKHR")
+ CmdBindDescriptorBufferEmbeddedSamplers2EXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT")
CmdBindDescriptorBufferEmbeddedSamplersEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT")
CmdBindDescriptorBuffersEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBindDescriptorBuffersEXT")
CmdBindDescriptorSets = auto_cast GetInstanceProcAddr(instance, "vkCmdBindDescriptorSets")
+ CmdBindDescriptorSets2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdBindDescriptorSets2KHR")
CmdBindIndexBuffer = auto_cast GetInstanceProcAddr(instance, "vkCmdBindIndexBuffer")
+ CmdBindIndexBuffer2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdBindIndexBuffer2KHR")
CmdBindInvocationMaskHUAWEI = auto_cast GetInstanceProcAddr(instance, "vkCmdBindInvocationMaskHUAWEI")
CmdBindPipeline = auto_cast GetInstanceProcAddr(instance, "vkCmdBindPipeline")
CmdBindPipelineShaderGroupNV = auto_cast GetInstanceProcAddr(instance, "vkCmdBindPipelineShaderGroupNV")
@@ -3596,6 +3918,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdCopyMicromapToMemoryEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyMicromapToMemoryEXT")
CmdCopyQueryPoolResults = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyQueryPoolResults")
CmdCuLaunchKernelNVX = auto_cast GetInstanceProcAddr(instance, "vkCmdCuLaunchKernelNVX")
+ CmdCudaLaunchKernelNV = auto_cast GetInstanceProcAddr(instance, "vkCmdCudaLaunchKernelNV")
CmdDebugMarkerBeginEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDebugMarkerBeginEXT")
CmdDebugMarkerEndEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDebugMarkerEndEXT")
CmdDebugMarkerInsertEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDebugMarkerInsertEXT")
@@ -3627,6 +3950,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdDrawMeshTasksNV = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawMeshTasksNV")
CmdDrawMultiEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawMultiEXT")
CmdDrawMultiIndexedEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawMultiIndexedEXT")
+ CmdEncodeVideoKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdEncodeVideoKHR")
CmdEndConditionalRenderingEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdEndConditionalRenderingEXT")
CmdEndDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdEndDebugUtilsLabelEXT")
CmdEndQuery = auto_cast GetInstanceProcAddr(instance, "vkCmdEndQuery")
@@ -3639,6 +3963,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdEndTransformFeedbackEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdEndTransformFeedbackEXT")
CmdEndVideoCodingKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdEndVideoCodingKHR")
CmdExecuteCommands = auto_cast GetInstanceProcAddr(instance, "vkCmdExecuteCommands")
+ CmdExecuteGeneratedCommandsEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdExecuteGeneratedCommandsEXT")
CmdExecuteGeneratedCommandsNV = auto_cast GetInstanceProcAddr(instance, "vkCmdExecuteGeneratedCommandsNV")
CmdFillBuffer = auto_cast GetInstanceProcAddr(instance, "vkCmdFillBuffer")
CmdInsertDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdInsertDebugUtilsLabelEXT")
@@ -3649,9 +3974,13 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdPipelineBarrier = auto_cast GetInstanceProcAddr(instance, "vkCmdPipelineBarrier")
CmdPipelineBarrier2 = auto_cast GetInstanceProcAddr(instance, "vkCmdPipelineBarrier2")
CmdPipelineBarrier2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPipelineBarrier2KHR")
+ CmdPreprocessGeneratedCommandsEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdPreprocessGeneratedCommandsEXT")
CmdPreprocessGeneratedCommandsNV = auto_cast GetInstanceProcAddr(instance, "vkCmdPreprocessGeneratedCommandsNV")
CmdPushConstants = auto_cast GetInstanceProcAddr(instance, "vkCmdPushConstants")
+ CmdPushConstants2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPushConstants2KHR")
+ CmdPushDescriptorSet2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPushDescriptorSet2KHR")
CmdPushDescriptorSetKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPushDescriptorSetKHR")
+ CmdPushDescriptorSetWithTemplate2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPushDescriptorSetWithTemplate2KHR")
CmdPushDescriptorSetWithTemplateKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPushDescriptorSetWithTemplateKHR")
CmdResetEvent = auto_cast GetInstanceProcAddr(instance, "vkCmdResetEvent")
CmdResetEvent2 = auto_cast GetInstanceProcAddr(instance, "vkCmdResetEvent2")
@@ -3680,12 +4009,14 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdSetCullMode = auto_cast GetInstanceProcAddr(instance, "vkCmdSetCullMode")
CmdSetCullModeEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetCullModeEXT")
CmdSetDepthBias = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBias")
+ CmdSetDepthBias2EXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBias2EXT")
CmdSetDepthBiasEnable = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBiasEnable")
CmdSetDepthBiasEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBiasEnableEXT")
CmdSetDepthBounds = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBounds")
CmdSetDepthBoundsTestEnable = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBoundsTestEnable")
CmdSetDepthBoundsTestEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBoundsTestEnableEXT")
CmdSetDepthClampEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthClampEnableEXT")
+ CmdSetDepthClampRangeEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthClampRangeEXT")
CmdSetDepthClipEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthClipEnableEXT")
CmdSetDepthClipNegativeOneToOneEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthClipNegativeOneToOneEXT")
CmdSetDepthCompareOp = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthCompareOp")
@@ -3694,6 +4025,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdSetDepthTestEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthTestEnableEXT")
CmdSetDepthWriteEnable = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthWriteEnable")
CmdSetDepthWriteEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthWriteEnableEXT")
+ CmdSetDescriptorBufferOffsets2EXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDescriptorBufferOffsets2EXT")
CmdSetDescriptorBufferOffsetsEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDescriptorBufferOffsetsEXT")
CmdSetDeviceMask = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDeviceMask")
CmdSetDeviceMaskKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDeviceMaskKHR")
@@ -3713,6 +4045,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdSetLineRasterizationModeEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLineRasterizationModeEXT")
CmdSetLineStippleEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLineStippleEXT")
CmdSetLineStippleEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLineStippleEnableEXT")
+ CmdSetLineStippleKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLineStippleKHR")
CmdSetLineWidth = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLineWidth")
CmdSetLogicOpEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLogicOpEXT")
CmdSetLogicOpEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLogicOpEnableEXT")
@@ -3731,6 +4064,8 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdSetRasterizerDiscardEnable = auto_cast GetInstanceProcAddr(instance, "vkCmdSetRasterizerDiscardEnable")
CmdSetRasterizerDiscardEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetRasterizerDiscardEnableEXT")
CmdSetRayTracingPipelineStackSizeKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ CmdSetRenderingAttachmentLocationsKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetRenderingAttachmentLocationsKHR")
+ CmdSetRenderingInputAttachmentIndicesKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetRenderingInputAttachmentIndicesKHR")
CmdSetRepresentativeFragmentTestEnableNV = auto_cast GetInstanceProcAddr(instance, "vkCmdSetRepresentativeFragmentTestEnableNV")
CmdSetSampleLocationsEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetSampleLocationsEXT")
CmdSetSampleLocationsEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetSampleLocationsEnableEXT")
@@ -3761,6 +4096,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CmdTraceRaysKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdTraceRaysKHR")
CmdTraceRaysNV = auto_cast GetInstanceProcAddr(instance, "vkCmdTraceRaysNV")
CmdUpdateBuffer = auto_cast GetInstanceProcAddr(instance, "vkCmdUpdateBuffer")
+ CmdUpdatePipelineIndirectBufferNV = auto_cast GetInstanceProcAddr(instance, "vkCmdUpdatePipelineIndirectBufferNV")
CmdWaitEvents = auto_cast GetInstanceProcAddr(instance, "vkCmdWaitEvents")
CmdWaitEvents2 = auto_cast GetInstanceProcAddr(instance, "vkCmdWaitEvents2")
CmdWaitEvents2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdWaitEvents2KHR")
@@ -3775,7 +4111,10 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CompileDeferredNV = auto_cast GetInstanceProcAddr(instance, "vkCompileDeferredNV")
CopyAccelerationStructureKHR = auto_cast GetInstanceProcAddr(instance, "vkCopyAccelerationStructureKHR")
CopyAccelerationStructureToMemoryKHR = auto_cast GetInstanceProcAddr(instance, "vkCopyAccelerationStructureToMemoryKHR")
+ CopyImageToImageEXT = auto_cast GetInstanceProcAddr(instance, "vkCopyImageToImageEXT")
+ CopyImageToMemoryEXT = auto_cast GetInstanceProcAddr(instance, "vkCopyImageToMemoryEXT")
CopyMemoryToAccelerationStructureKHR = auto_cast GetInstanceProcAddr(instance, "vkCopyMemoryToAccelerationStructureKHR")
+ CopyMemoryToImageEXT = auto_cast GetInstanceProcAddr(instance, "vkCopyMemoryToImageEXT")
CopyMemoryToMicromapEXT = auto_cast GetInstanceProcAddr(instance, "vkCopyMemoryToMicromapEXT")
CopyMicromapEXT = auto_cast GetInstanceProcAddr(instance, "vkCopyMicromapEXT")
CopyMicromapToMemoryEXT = auto_cast GetInstanceProcAddr(instance, "vkCopyMicromapToMemoryEXT")
@@ -3787,6 +4126,8 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CreateComputePipelines = auto_cast GetInstanceProcAddr(instance, "vkCreateComputePipelines")
CreateCuFunctionNVX = auto_cast GetInstanceProcAddr(instance, "vkCreateCuFunctionNVX")
CreateCuModuleNVX = auto_cast GetInstanceProcAddr(instance, "vkCreateCuModuleNVX")
+ CreateCudaFunctionNV = auto_cast GetInstanceProcAddr(instance, "vkCreateCudaFunctionNV")
+ CreateCudaModuleNV = auto_cast GetInstanceProcAddr(instance, "vkCreateCudaModuleNV")
CreateDeferredOperationKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateDeferredOperationKHR")
CreateDescriptorPool = auto_cast GetInstanceProcAddr(instance, "vkCreateDescriptorPool")
CreateDescriptorSetLayout = auto_cast GetInstanceProcAddr(instance, "vkCreateDescriptorSetLayout")
@@ -3798,9 +4139,12 @@ load_proc_addresses_instance :: proc(instance: Instance) {
CreateGraphicsPipelines = auto_cast GetInstanceProcAddr(instance, "vkCreateGraphicsPipelines")
CreateImage = auto_cast GetInstanceProcAddr(instance, "vkCreateImage")
CreateImageView = auto_cast GetInstanceProcAddr(instance, "vkCreateImageView")
+ CreateIndirectCommandsLayoutEXT = auto_cast GetInstanceProcAddr(instance, "vkCreateIndirectCommandsLayoutEXT")
CreateIndirectCommandsLayoutNV = auto_cast GetInstanceProcAddr(instance, "vkCreateIndirectCommandsLayoutNV")
+ CreateIndirectExecutionSetEXT = auto_cast GetInstanceProcAddr(instance, "vkCreateIndirectExecutionSetEXT")
CreateMicromapEXT = auto_cast GetInstanceProcAddr(instance, "vkCreateMicromapEXT")
CreateOpticalFlowSessionNV = auto_cast GetInstanceProcAddr(instance, "vkCreateOpticalFlowSessionNV")
+ CreatePipelineBinariesKHR = auto_cast GetInstanceProcAddr(instance, "vkCreatePipelineBinariesKHR")
CreatePipelineCache = auto_cast GetInstanceProcAddr(instance, "vkCreatePipelineCache")
CreatePipelineLayout = auto_cast GetInstanceProcAddr(instance, "vkCreatePipelineLayout")
CreatePrivateDataSlot = auto_cast GetInstanceProcAddr(instance, "vkCreatePrivateDataSlot")
@@ -3832,6 +4176,8 @@ load_proc_addresses_instance :: proc(instance: Instance) {
DestroyCommandPool = auto_cast GetInstanceProcAddr(instance, "vkDestroyCommandPool")
DestroyCuFunctionNVX = auto_cast GetInstanceProcAddr(instance, "vkDestroyCuFunctionNVX")
DestroyCuModuleNVX = auto_cast GetInstanceProcAddr(instance, "vkDestroyCuModuleNVX")
+ DestroyCudaFunctionNV = auto_cast GetInstanceProcAddr(instance, "vkDestroyCudaFunctionNV")
+ DestroyCudaModuleNV = auto_cast GetInstanceProcAddr(instance, "vkDestroyCudaModuleNV")
DestroyDeferredOperationKHR = auto_cast GetInstanceProcAddr(instance, "vkDestroyDeferredOperationKHR")
DestroyDescriptorPool = auto_cast GetInstanceProcAddr(instance, "vkDestroyDescriptorPool")
DestroyDescriptorSetLayout = auto_cast GetInstanceProcAddr(instance, "vkDestroyDescriptorSetLayout")
@@ -3843,10 +4189,13 @@ load_proc_addresses_instance :: proc(instance: Instance) {
DestroyFramebuffer = auto_cast GetInstanceProcAddr(instance, "vkDestroyFramebuffer")
DestroyImage = auto_cast GetInstanceProcAddr(instance, "vkDestroyImage")
DestroyImageView = auto_cast GetInstanceProcAddr(instance, "vkDestroyImageView")
+ DestroyIndirectCommandsLayoutEXT = auto_cast GetInstanceProcAddr(instance, "vkDestroyIndirectCommandsLayoutEXT")
DestroyIndirectCommandsLayoutNV = auto_cast GetInstanceProcAddr(instance, "vkDestroyIndirectCommandsLayoutNV")
+ DestroyIndirectExecutionSetEXT = auto_cast GetInstanceProcAddr(instance, "vkDestroyIndirectExecutionSetEXT")
DestroyMicromapEXT = auto_cast GetInstanceProcAddr(instance, "vkDestroyMicromapEXT")
DestroyOpticalFlowSessionNV = auto_cast GetInstanceProcAddr(instance, "vkDestroyOpticalFlowSessionNV")
DestroyPipeline = auto_cast GetInstanceProcAddr(instance, "vkDestroyPipeline")
+ DestroyPipelineBinaryKHR = auto_cast GetInstanceProcAddr(instance, "vkDestroyPipelineBinaryKHR")
DestroyPipelineCache = auto_cast GetInstanceProcAddr(instance, "vkDestroyPipelineCache")
DestroyPipelineLayout = auto_cast GetInstanceProcAddr(instance, "vkDestroyPipelineLayout")
DestroyPrivateDataSlot = auto_cast GetInstanceProcAddr(instance, "vkDestroyPrivateDataSlot")
@@ -3886,6 +4235,8 @@ load_proc_addresses_instance :: proc(instance: Instance) {
GetBufferOpaqueCaptureAddressKHR = auto_cast GetInstanceProcAddr(instance, "vkGetBufferOpaqueCaptureAddressKHR")
GetBufferOpaqueCaptureDescriptorDataEXT = auto_cast GetInstanceProcAddr(instance, "vkGetBufferOpaqueCaptureDescriptorDataEXT")
GetCalibratedTimestampsEXT = auto_cast GetInstanceProcAddr(instance, "vkGetCalibratedTimestampsEXT")
+ GetCalibratedTimestampsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetCalibratedTimestampsKHR")
+ GetCudaModuleCacheNV = auto_cast GetInstanceProcAddr(instance, "vkGetCudaModuleCacheNV")
GetDeferredOperationMaxConcurrencyKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeferredOperationMaxConcurrencyKHR")
GetDeferredOperationResultKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeferredOperationResultKHR")
GetDescriptorEXT = auto_cast GetInstanceProcAddr(instance, "vkGetDescriptorEXT")
@@ -3908,6 +4259,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
GetDeviceImageMemoryRequirementsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceImageMemoryRequirementsKHR")
GetDeviceImageSparseMemoryRequirements = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceImageSparseMemoryRequirements")
GetDeviceImageSparseMemoryRequirementsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceImageSparseMemoryRequirementsKHR")
+ GetDeviceImageSubresourceLayoutKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceImageSubresourceLayoutKHR")
GetDeviceMemoryCommitment = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceMemoryCommitment")
GetDeviceMemoryOpaqueCaptureAddress = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceMemoryOpaqueCaptureAddress")
GetDeviceMemoryOpaqueCaptureAddressKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
@@ -3917,11 +4269,13 @@ load_proc_addresses_instance :: proc(instance: Instance) {
GetDeviceQueue2 = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceQueue2")
GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
GetDynamicRenderingTilePropertiesQCOM = auto_cast GetInstanceProcAddr(instance, "vkGetDynamicRenderingTilePropertiesQCOM")
+ GetEncodedVideoSessionParametersKHR = auto_cast GetInstanceProcAddr(instance, "vkGetEncodedVideoSessionParametersKHR")
GetEventStatus = auto_cast GetInstanceProcAddr(instance, "vkGetEventStatus")
GetFenceFdKHR = auto_cast GetInstanceProcAddr(instance, "vkGetFenceFdKHR")
GetFenceStatus = auto_cast GetInstanceProcAddr(instance, "vkGetFenceStatus")
GetFenceWin32HandleKHR = auto_cast GetInstanceProcAddr(instance, "vkGetFenceWin32HandleKHR")
GetFramebufferTilePropertiesQCOM = auto_cast GetInstanceProcAddr(instance, "vkGetFramebufferTilePropertiesQCOM")
+ GetGeneratedCommandsMemoryRequirementsEXT = auto_cast GetInstanceProcAddr(instance, "vkGetGeneratedCommandsMemoryRequirementsEXT")
GetGeneratedCommandsMemoryRequirementsNV = auto_cast GetInstanceProcAddr(instance, "vkGetGeneratedCommandsMemoryRequirementsNV")
GetImageDrmFormatModifierPropertiesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetImageDrmFormatModifierPropertiesEXT")
GetImageMemoryRequirements = auto_cast GetInstanceProcAddr(instance, "vkGetImageMemoryRequirements")
@@ -3933,9 +4287,11 @@ load_proc_addresses_instance :: proc(instance: Instance) {
GetImageSparseMemoryRequirements2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetImageSparseMemoryRequirements2KHR")
GetImageSubresourceLayout = auto_cast GetInstanceProcAddr(instance, "vkGetImageSubresourceLayout")
GetImageSubresourceLayout2EXT = auto_cast GetInstanceProcAddr(instance, "vkGetImageSubresourceLayout2EXT")
+ GetImageSubresourceLayout2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetImageSubresourceLayout2KHR")
GetImageViewAddressNVX = auto_cast GetInstanceProcAddr(instance, "vkGetImageViewAddressNVX")
GetImageViewHandleNVX = auto_cast GetInstanceProcAddr(instance, "vkGetImageViewHandleNVX")
GetImageViewOpaqueCaptureDescriptorDataEXT = auto_cast GetInstanceProcAddr(instance, "vkGetImageViewOpaqueCaptureDescriptorDataEXT")
+ GetLatencyTimingsNV = auto_cast GetInstanceProcAddr(instance, "vkGetLatencyTimingsNV")
GetMemoryFdKHR = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryFdKHR")
GetMemoryFdPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryFdPropertiesKHR")
GetMemoryHostPointerPropertiesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryHostPointerPropertiesEXT")
@@ -3946,10 +4302,14 @@ load_proc_addresses_instance :: proc(instance: Instance) {
GetMicromapBuildSizesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetMicromapBuildSizesEXT")
GetPastPresentationTimingGOOGLE = auto_cast GetInstanceProcAddr(instance, "vkGetPastPresentationTimingGOOGLE")
GetPerformanceParameterINTEL = auto_cast GetInstanceProcAddr(instance, "vkGetPerformanceParameterINTEL")
+ GetPipelineBinaryDataKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineBinaryDataKHR")
GetPipelineCacheData = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineCacheData")
GetPipelineExecutableInternalRepresentationsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineExecutableInternalRepresentationsKHR")
GetPipelineExecutablePropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineExecutablePropertiesKHR")
GetPipelineExecutableStatisticsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineExecutableStatisticsKHR")
+ GetPipelineIndirectDeviceAddressNV = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineIndirectDeviceAddressNV")
+ GetPipelineIndirectMemoryRequirementsNV = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineIndirectMemoryRequirementsNV")
+ GetPipelineKeyKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineKeyKHR")
GetPipelinePropertiesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetPipelinePropertiesEXT")
GetPrivateData = auto_cast GetInstanceProcAddr(instance, "vkGetPrivateData")
GetPrivateDataEXT = auto_cast GetInstanceProcAddr(instance, "vkGetPrivateDataEXT")
@@ -3962,6 +4322,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
GetRayTracingShaderGroupStackSizeKHR = auto_cast GetInstanceProcAddr(instance, "vkGetRayTracingShaderGroupStackSizeKHR")
GetRefreshCycleDurationGOOGLE = auto_cast GetInstanceProcAddr(instance, "vkGetRefreshCycleDurationGOOGLE")
GetRenderAreaGranularity = auto_cast GetInstanceProcAddr(instance, "vkGetRenderAreaGranularity")
+ GetRenderingAreaGranularityKHR = auto_cast GetInstanceProcAddr(instance, "vkGetRenderingAreaGranularityKHR")
GetSamplerOpaqueCaptureDescriptorDataEXT = auto_cast GetInstanceProcAddr(instance, "vkGetSamplerOpaqueCaptureDescriptorDataEXT")
GetSemaphoreCounterValue = auto_cast GetInstanceProcAddr(instance, "vkGetSemaphoreCounterValue")
GetSemaphoreCounterValueKHR = auto_cast GetInstanceProcAddr(instance, "vkGetSemaphoreCounterValueKHR")
@@ -3982,6 +4343,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
ImportSemaphoreWin32HandleKHR = auto_cast GetInstanceProcAddr(instance, "vkImportSemaphoreWin32HandleKHR")
InitializePerformanceApiINTEL = auto_cast GetInstanceProcAddr(instance, "vkInitializePerformanceApiINTEL")
InvalidateMappedMemoryRanges = auto_cast GetInstanceProcAddr(instance, "vkInvalidateMappedMemoryRanges")
+ LatencySleepNV = auto_cast GetInstanceProcAddr(instance, "vkLatencySleepNV")
MapMemory = auto_cast GetInstanceProcAddr(instance, "vkMapMemory")
MapMemory2KHR = auto_cast GetInstanceProcAddr(instance, "vkMapMemory2KHR")
MergePipelineCaches = auto_cast GetInstanceProcAddr(instance, "vkMergePipelineCaches")
@@ -3990,6 +4352,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
QueueBindSparse = auto_cast GetInstanceProcAddr(instance, "vkQueueBindSparse")
QueueEndDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkQueueEndDebugUtilsLabelEXT")
QueueInsertDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkQueueInsertDebugUtilsLabelEXT")
+ QueueNotifyOutOfBandNV = auto_cast GetInstanceProcAddr(instance, "vkQueueNotifyOutOfBandNV")
QueuePresentKHR = auto_cast GetInstanceProcAddr(instance, "vkQueuePresentKHR")
QueueSetPerformanceConfigurationINTEL = auto_cast GetInstanceProcAddr(instance, "vkQueueSetPerformanceConfigurationINTEL")
QueueSubmit = auto_cast GetInstanceProcAddr(instance, "vkQueueSubmit")
@@ -3998,6 +4361,7 @@ load_proc_addresses_instance :: proc(instance: Instance) {
QueueWaitIdle = auto_cast GetInstanceProcAddr(instance, "vkQueueWaitIdle")
RegisterDeviceEventEXT = auto_cast GetInstanceProcAddr(instance, "vkRegisterDeviceEventEXT")
RegisterDisplayEventEXT = auto_cast GetInstanceProcAddr(instance, "vkRegisterDisplayEventEXT")
+ ReleaseCapturedPipelineDataKHR = auto_cast GetInstanceProcAddr(instance, "vkReleaseCapturedPipelineDataKHR")
ReleaseFullScreenExclusiveModeEXT = auto_cast GetInstanceProcAddr(instance, "vkReleaseFullScreenExclusiveModeEXT")
ReleasePerformanceConfigurationINTEL = auto_cast GetInstanceProcAddr(instance, "vkReleasePerformanceConfigurationINTEL")
ReleaseProfilingLockKHR = auto_cast GetInstanceProcAddr(instance, "vkReleaseProfilingLockKHR")
@@ -4014,11 +4378,14 @@ load_proc_addresses_instance :: proc(instance: Instance) {
SetDeviceMemoryPriorityEXT = auto_cast GetInstanceProcAddr(instance, "vkSetDeviceMemoryPriorityEXT")
SetEvent = auto_cast GetInstanceProcAddr(instance, "vkSetEvent")
SetHdrMetadataEXT = auto_cast GetInstanceProcAddr(instance, "vkSetHdrMetadataEXT")
+ SetLatencyMarkerNV = auto_cast GetInstanceProcAddr(instance, "vkSetLatencyMarkerNV")
+ SetLatencySleepModeNV = auto_cast GetInstanceProcAddr(instance, "vkSetLatencySleepModeNV")
SetLocalDimmingAMD = auto_cast GetInstanceProcAddr(instance, "vkSetLocalDimmingAMD")
SetPrivateData = auto_cast GetInstanceProcAddr(instance, "vkSetPrivateData")
SetPrivateDataEXT = auto_cast GetInstanceProcAddr(instance, "vkSetPrivateDataEXT")
SignalSemaphore = auto_cast GetInstanceProcAddr(instance, "vkSignalSemaphore")
SignalSemaphoreKHR = auto_cast GetInstanceProcAddr(instance, "vkSignalSemaphoreKHR")
+ TransitionImageLayoutEXT = auto_cast GetInstanceProcAddr(instance, "vkTransitionImageLayoutEXT")
TrimCommandPool = auto_cast GetInstanceProcAddr(instance, "vkTrimCommandPool")
TrimCommandPoolKHR = auto_cast GetInstanceProcAddr(instance, "vkTrimCommandPoolKHR")
UninitializePerformanceApiINTEL = auto_cast GetInstanceProcAddr(instance, "vkUninitializePerformanceApiINTEL")
@@ -4027,6 +4394,8 @@ load_proc_addresses_instance :: proc(instance: Instance) {
UpdateDescriptorSetWithTemplate = auto_cast GetInstanceProcAddr(instance, "vkUpdateDescriptorSetWithTemplate")
UpdateDescriptorSetWithTemplateKHR = auto_cast GetInstanceProcAddr(instance, "vkUpdateDescriptorSetWithTemplateKHR")
UpdateDescriptorSets = auto_cast GetInstanceProcAddr(instance, "vkUpdateDescriptorSets")
+ UpdateIndirectExecutionSetPipelineEXT = auto_cast GetInstanceProcAddr(instance, "vkUpdateIndirectExecutionSetPipelineEXT")
+ UpdateIndirectExecutionSetShaderEXT = auto_cast GetInstanceProcAddr(instance, "vkUpdateIndirectExecutionSetShaderEXT")
UpdateVideoSessionParametersKHR = auto_cast GetInstanceProcAddr(instance, "vkUpdateVideoSessionParametersKHR")
WaitForFences = auto_cast GetInstanceProcAddr(instance, "vkWaitForFences")
WaitForPresentKHR = auto_cast GetInstanceProcAddr(instance, "vkWaitForPresentKHR")
diff --git a/vendor/vulkan/structs.odin b/vendor/vulkan/structs.odin
index e16a49dc3..15c1a527a 100644
--- a/vendor/vulkan/structs.odin
+++ b/vendor/vulkan/structs.odin
@@ -3032,6 +3032,297 @@ VideoDecodeInfoKHR :: struct {
pReferenceSlots: [^]VideoReferenceSlotInfoKHR,
}
+VideoEncodeH264CapabilitiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: VideoEncodeH264CapabilityFlagsKHR,
+ maxLevelIdc: VideoH264LevelIdc,
+ maxSliceCount: u32,
+ maxPPictureL0ReferenceCount: u32,
+ maxBPictureL0ReferenceCount: u32,
+ maxL1ReferenceCount: u32,
+ maxTemporalLayerCount: u32,
+ expectDyadicTemporalLayerPattern: b32,
+ minQp: i32,
+ maxQp: i32,
+ prefersGopRemainingFrames: b32,
+ requiresGopRemainingFrames: b32,
+ stdSyntaxFlags: VideoEncodeH264StdFlagsKHR,
+}
+
+VideoEncodeH264QpKHR :: struct {
+ qpI: i32,
+ qpP: i32,
+ qpB: i32,
+}
+
+VideoEncodeH264QualityLevelPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ preferredRateControlFlags: VideoEncodeH264RateControlFlagsKHR,
+ preferredGopFrameCount: u32,
+ preferredIdrPeriod: u32,
+ preferredConsecutiveBFrameCount: u32,
+ preferredTemporalLayerCount: u32,
+ preferredConstantQp: VideoEncodeH264QpKHR,
+ preferredMaxL0ReferenceCount: u32,
+ preferredMaxL1ReferenceCount: u32,
+ preferredStdEntropyCodingModeFlag: b32,
+}
+
+VideoEncodeH264SessionCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ useMaxLevelIdc: b32,
+ maxLevelIdc: VideoH264LevelIdc,
+}
+
+VideoEncodeH264SessionParametersAddInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stdSPSCount: u32,
+ pStdSPSs: [^]VideoH264SequenceParameterSet,
+ stdPPSCount: u32,
+ pStdPPSs: [^]VideoH264PictureParameterSet,
+}
+
+VideoEncodeH264SessionParametersCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maxStdSPSCount: u32,
+ maxStdPPSCount: u32,
+ pParametersAddInfo: ^VideoEncodeH264SessionParametersAddInfoKHR,
+}
+
+VideoEncodeH264SessionParametersGetInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ writeStdSPS: b32,
+ writeStdPPS: b32,
+ stdSPSId: u32,
+ stdPPSId: u32,
+}
+
+VideoEncodeH264SessionParametersFeedbackInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ hasStdSPSOverrides: b32,
+ hasStdPPSOverrides: b32,
+}
+
+VideoEncodeH264NaluSliceInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ constantQp: i32,
+ pStdSliceHeader: ^VideoEncodeH264SliceHeader,
+}
+
+VideoEncodeH264PictureInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ naluSliceEntryCount: u32,
+ pNaluSliceEntries: [^]VideoEncodeH264NaluSliceInfoKHR,
+ pStdPictureInfo: ^VideoEncodeH264PictureInfo,
+ generatePrefixNalu: b32,
+}
+
+VideoEncodeH264DpbSlotInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pStdReferenceInfo: ^VideoEncodeH264ReferenceInfo,
+}
+
+VideoEncodeH264ProfileInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stdProfileIdc: VideoH264ProfileIdc,
+}
+
+VideoEncodeH264RateControlInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: VideoEncodeH264RateControlFlagsKHR,
+ gopFrameCount: u32,
+ idrPeriod: u32,
+ consecutiveBFrameCount: u32,
+ temporalLayerCount: u32,
+}
+
+VideoEncodeH264FrameSizeKHR :: struct {
+ frameISize: u32,
+ framePSize: u32,
+ frameBSize: u32,
+}
+
+VideoEncodeH264RateControlLayerInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ useMinQp: b32,
+ minQp: VideoEncodeH264QpKHR,
+ useMaxQp: b32,
+ maxQp: VideoEncodeH264QpKHR,
+ useMaxFrameSize: b32,
+ maxFrameSize: VideoEncodeH264FrameSizeKHR,
+}
+
+VideoEncodeH264GopRemainingFrameInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ useGopRemainingFrames: b32,
+ gopRemainingI: u32,
+ gopRemainingP: u32,
+ gopRemainingB: u32,
+}
+
+VideoEncodeH265CapabilitiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: VideoEncodeH265CapabilityFlagsKHR,
+ maxLevelIdc: VideoH265LevelIdc,
+ maxSliceSegmentCount: u32,
+ maxTiles: Extent2D,
+ ctbSizes: VideoEncodeH265CtbSizeFlagsKHR,
+ transformBlockSizes: VideoEncodeH265TransformBlockSizeFlagsKHR,
+ maxPPictureL0ReferenceCount: u32,
+ maxBPictureL0ReferenceCount: u32,
+ maxL1ReferenceCount: u32,
+ maxSubLayerCount: u32,
+ expectDyadicTemporalSubLayerPattern: b32,
+ minQp: i32,
+ maxQp: i32,
+ prefersGopRemainingFrames: b32,
+ requiresGopRemainingFrames: b32,
+ stdSyntaxFlags: VideoEncodeH265StdFlagsKHR,
+}
+
+VideoEncodeH265SessionCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ useMaxLevelIdc: b32,
+ maxLevelIdc: VideoH265LevelIdc,
+}
+
+VideoEncodeH265QpKHR :: struct {
+ qpI: i32,
+ qpP: i32,
+ qpB: i32,
+}
+
+VideoEncodeH265QualityLevelPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ preferredRateControlFlags: VideoEncodeH265RateControlFlagsKHR,
+ preferredGopFrameCount: u32,
+ preferredIdrPeriod: u32,
+ preferredConsecutiveBFrameCount: u32,
+ preferredSubLayerCount: u32,
+ preferredConstantQp: VideoEncodeH265QpKHR,
+ preferredMaxL0ReferenceCount: u32,
+ preferredMaxL1ReferenceCount: u32,
+}
+
+VideoEncodeH265SessionParametersAddInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stdVPSCount: u32,
+ pStdVPSs: [^]VideoH265VideoParameterSet,
+ stdSPSCount: u32,
+ pStdSPSs: [^]VideoH265SequenceParameterSet,
+ stdPPSCount: u32,
+ pStdPPSs: [^]VideoH265PictureParameterSet,
+}
+
+VideoEncodeH265SessionParametersCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maxStdVPSCount: u32,
+ maxStdSPSCount: u32,
+ maxStdPPSCount: u32,
+ pParametersAddInfo: ^VideoEncodeH265SessionParametersAddInfoKHR,
+}
+
+VideoEncodeH265SessionParametersGetInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ writeStdVPS: b32,
+ writeStdSPS: b32,
+ writeStdPPS: b32,
+ stdVPSId: u32,
+ stdSPSId: u32,
+ stdPPSId: u32,
+}
+
+VideoEncodeH265SessionParametersFeedbackInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ hasStdVPSOverrides: b32,
+ hasStdSPSOverrides: b32,
+ hasStdPPSOverrides: b32,
+}
+
+VideoEncodeH265NaluSliceSegmentInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ constantQp: i32,
+ pStdSliceSegmentHeader: ^VideoEncodeH265SliceSegmentHeader,
+}
+
+VideoEncodeH265PictureInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ naluSliceSegmentEntryCount: u32,
+ pNaluSliceSegmentEntries: [^]VideoEncodeH265NaluSliceSegmentInfoKHR,
+ pStdPictureInfo: ^VideoEncodeH265PictureInfo,
+}
+
+VideoEncodeH265DpbSlotInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pStdReferenceInfo: ^VideoEncodeH265ReferenceInfo,
+}
+
+VideoEncodeH265ProfileInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stdProfileIdc: VideoH265ProfileIdc,
+}
+
+VideoEncodeH265RateControlInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: VideoEncodeH265RateControlFlagsKHR,
+ gopFrameCount: u32,
+ idrPeriod: u32,
+ consecutiveBFrameCount: u32,
+ subLayerCount: u32,
+}
+
+VideoEncodeH265FrameSizeKHR :: struct {
+ frameISize: u32,
+ framePSize: u32,
+ frameBSize: u32,
+}
+
+VideoEncodeH265RateControlLayerInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ useMinQp: b32,
+ minQp: VideoEncodeH265QpKHR,
+ useMaxQp: b32,
+ maxQp: VideoEncodeH265QpKHR,
+ useMaxFrameSize: b32,
+ maxFrameSize: VideoEncodeH265FrameSizeKHR,
+}
+
+VideoEncodeH265GopRemainingFrameInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ useGopRemainingFrames: b32,
+ gopRemainingI: u32,
+ gopRemainingP: u32,
+ gopRemainingB: u32,
+}
+
VideoDecodeH264ProfileInfoKHR :: struct {
sType: StructureType,
pNext: rawptr,
@@ -3422,6 +3713,34 @@ PhysicalDeviceFragmentShadingRateKHR :: struct {
fragmentSize: Extent2D,
}
+PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ dynamicRenderingLocalRead: b32,
+}
+
+RenderingAttachmentLocationInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ colorAttachmentCount: u32,
+ pColorAttachmentLocations: [^]u32,
+}
+
+RenderingInputAttachmentIndexInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ colorAttachmentCount: u32,
+ pColorAttachmentInputIndices: [^]u32,
+ pDepthInputAttachmentIndex: ^u32,
+ pStencilInputAttachmentIndex: ^u32,
+}
+
+PhysicalDeviceShaderQuadControlFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderQuadControl: b32,
+}
+
SurfaceProtectedCapabilitiesKHR :: struct {
sType: StructureType,
pNext: rawptr,
@@ -3524,6 +3843,98 @@ PhysicalDevicePresentIdFeaturesKHR :: struct {
presentId: b32,
}
+VideoEncodeInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: VideoEncodeFlagsKHR,
+ dstBuffer: Buffer,
+ dstBufferOffset: DeviceSize,
+ dstBufferRange: DeviceSize,
+ srcPictureResource: VideoPictureResourceInfoKHR,
+ pSetupReferenceSlot: ^VideoReferenceSlotInfoKHR,
+ referenceSlotCount: u32,
+ pReferenceSlots: [^]VideoReferenceSlotInfoKHR,
+ precedingExternallyEncodedBytes: u32,
+}
+
+VideoEncodeCapabilitiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: VideoEncodeCapabilityFlagsKHR,
+ rateControlModes: VideoEncodeRateControlModeFlagsKHR,
+ maxRateControlLayers: u32,
+ maxBitrate: u64,
+ maxQualityLevels: u32,
+ encodeInputPictureGranularity: Extent2D,
+ supportedEncodeFeedbackFlags: VideoEncodeFeedbackFlagsKHR,
+}
+
+QueryPoolVideoEncodeFeedbackCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ encodeFeedbackFlags: VideoEncodeFeedbackFlagsKHR,
+}
+
+VideoEncodeUsageInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ videoUsageHints: VideoEncodeUsageFlagsKHR,
+ videoContentHints: VideoEncodeContentFlagsKHR,
+ tuningMode: VideoEncodeTuningModeKHR,
+}
+
+VideoEncodeRateControlLayerInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ averageBitrate: u64,
+ maxBitrate: u64,
+ frameRateNumerator: u32,
+ frameRateDenominator: u32,
+}
+
+VideoEncodeRateControlInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: VideoEncodeRateControlFlagsKHR,
+ rateControlMode: VideoEncodeRateControlModeFlagsKHR,
+ layerCount: u32,
+ pLayers: [^]VideoEncodeRateControlLayerInfoKHR,
+ virtualBufferSizeInMs: u32,
+ initialVirtualBufferSizeInMs: u32,
+}
+
+PhysicalDeviceVideoEncodeQualityLevelInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pVideoProfile: ^VideoProfileInfoKHR,
+ qualityLevel: u32,
+}
+
+VideoEncodeQualityLevelPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ preferredRateControlMode: VideoEncodeRateControlModeFlagsKHR,
+ preferredRateControlLayerCount: u32,
+}
+
+VideoEncodeQualityLevelInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ qualityLevel: u32,
+}
+
+VideoEncodeSessionParametersGetInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ videoSessionParameters: VideoSessionParametersKHR,
+}
+
+VideoEncodeSessionParametersFeedbackInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ hasOverrides: b32,
+}
+
QueueFamilyCheckpointProperties2NV :: struct {
sType: StructureType,
pNext: rawptr,
@@ -3588,12 +3999,455 @@ TraceRaysIndirectCommand2KHR :: struct {
depth: u32,
}
+PhysicalDeviceShaderSubgroupRotateFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderSubgroupRotate: b32,
+ shaderSubgroupRotateClustered: b32,
+}
+
+PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderMaximalReconvergence: b32,
+}
+
+PhysicalDeviceMaintenance5FeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maintenance5: b32,
+}
+
+PhysicalDeviceMaintenance5PropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ earlyFragmentMultisampleCoverageAfterSampleCounting: b32,
+ earlyFragmentSampleMaskTestBeforeSampleCounting: b32,
+ depthStencilSwizzleOneSupport: b32,
+ polygonModePointSize: b32,
+ nonStrictSinglePixelWideLinesUseParallelogram: b32,
+ nonStrictWideLinesUseParallelogram: b32,
+}
+
+RenderingAreaInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ viewMask: u32,
+ colorAttachmentCount: u32,
+ pColorAttachmentFormats: [^]Format,
+ depthAttachmentFormat: Format,
+ stencilAttachmentFormat: Format,
+}
+
+ImageSubresource2KHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ imageSubresource: ImageSubresource,
+}
+
+DeviceImageSubresourceInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pCreateInfo: ^ImageCreateInfo,
+ pSubresource: ^ImageSubresource2KHR,
+}
+
+SubresourceLayout2KHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ subresourceLayout: SubresourceLayout,
+}
+
+PipelineCreateFlags2CreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: PipelineCreateFlags2KHR,
+}
+
+BufferUsageFlags2CreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ usage: BufferUsageFlags2KHR,
+}
+
PhysicalDeviceRayTracingPositionFetchFeaturesKHR :: struct {
sType: StructureType,
pNext: rawptr,
rayTracingPositionFetch: b32,
}
+PhysicalDevicePipelineBinaryFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pipelineBinaries: b32,
+}
+
+PhysicalDevicePipelineBinaryPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pipelineBinaryInternalCache: b32,
+ pipelineBinaryInternalCacheControl: b32,
+ pipelineBinaryPrefersInternalCache: b32,
+ pipelineBinaryPrecompiledInternalCache: b32,
+ pipelineBinaryCompressedData: b32,
+}
+
+DevicePipelineBinaryInternalCacheControlKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ disableInternalCache: b32,
+}
+
+PipelineBinaryKeyKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ keySize: u32,
+ key: [MAX_PIPELINE_BINARY_KEY_SIZE_KHR]u8,
+}
+
+PipelineBinaryDataKHR :: struct {
+ dataSize: int,
+ pData: rawptr,
+}
+
+PipelineBinaryKeysAndDataKHR :: struct {
+ binaryCount: u32,
+ pPipelineBinaryKeys: [^]PipelineBinaryKeyKHR,
+ pPipelineBinaryData: ^PipelineBinaryDataKHR,
+}
+
+PipelineCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+}
+
+PipelineBinaryCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pKeysAndDataInfo: ^PipelineBinaryKeysAndDataKHR,
+ pipeline: Pipeline,
+ pPipelineCreateInfo: ^PipelineCreateInfoKHR,
+}
+
+PipelineBinaryInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ binaryCount: u32,
+ pPipelineBinaries: [^]PipelineBinaryKHR,
+}
+
+ReleaseCapturedPipelineDataInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pipeline: Pipeline,
+}
+
+PipelineBinaryDataInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pipelineBinary: PipelineBinaryKHR,
+}
+
+PipelineBinaryHandlesInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pipelineBinaryCount: u32,
+ pPipelineBinaries: [^]PipelineBinaryKHR,
+}
+
+CooperativeMatrixPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ MSize: u32,
+ NSize: u32,
+ KSize: u32,
+ AType: ComponentTypeKHR,
+ BType: ComponentTypeKHR,
+ CType: ComponentTypeKHR,
+ ResultType: ComponentTypeKHR,
+ saturatingAccumulation: b32,
+ scope: ScopeKHR,
+}
+
+PhysicalDeviceCooperativeMatrixFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ cooperativeMatrix: b32,
+ cooperativeMatrixRobustBufferAccess: b32,
+}
+
+PhysicalDeviceCooperativeMatrixPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ cooperativeMatrixSupportedStages: ShaderStageFlags,
+}
+
+PhysicalDeviceComputeShaderDerivativesFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ computeDerivativeGroupQuads: b32,
+ computeDerivativeGroupLinear: b32,
+}
+
+PhysicalDeviceComputeShaderDerivativesPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ meshAndTaskShaderDerivatives: b32,
+}
+
+VideoDecodeAV1ProfileInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stdProfile: VideoAV1Profile,
+ filmGrainSupport: b32,
+}
+
+VideoDecodeAV1CapabilitiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maxLevel: VideoAV1Level,
+}
+
+VideoDecodeAV1SessionParametersCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pStdSequenceHeader: ^VideoAV1SequenceHeader,
+}
+
+VideoDecodeAV1PictureInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pStdPictureInfo: ^VideoDecodeAV1PictureInfo,
+ referenceNameSlotIndices: [MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]i32,
+ frameHeaderOffset: u32,
+ tileCount: u32,
+ pTileOffsets: [^]u32,
+ pTileSizes: [^]u32,
+}
+
+VideoDecodeAV1DpbSlotInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pStdReferenceInfo: ^VideoDecodeAV1ReferenceInfo,
+}
+
+PhysicalDeviceVideoMaintenance1FeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ videoMaintenance1: b32,
+}
+
+VideoInlineQueryInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ queryPool: QueryPool,
+ firstQuery: u32,
+ queryCount: u32,
+}
+
+PhysicalDeviceVertexAttributeDivisorPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maxVertexAttribDivisor: u32,
+ supportsNonZeroFirstInstance: b32,
+}
+
+VertexInputBindingDivisorDescriptionKHR :: struct {
+ binding: u32,
+ divisor: u32,
+}
+
+PipelineVertexInputDivisorStateCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ vertexBindingDivisorCount: u32,
+ pVertexBindingDivisors: [^]VertexInputBindingDivisorDescriptionKHR,
+}
+
+PhysicalDeviceVertexAttributeDivisorFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ vertexAttributeInstanceRateDivisor: b32,
+ vertexAttributeInstanceRateZeroDivisor: b32,
+}
+
+PhysicalDeviceShaderFloatControls2FeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderFloatControls2: b32,
+}
+
+PhysicalDeviceIndexTypeUint8FeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ indexTypeUint8: b32,
+}
+
+PhysicalDeviceLineRasterizationFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ rectangularLines: b32,
+ bresenhamLines: b32,
+ smoothLines: b32,
+ stippledRectangularLines: b32,
+ stippledBresenhamLines: b32,
+ stippledSmoothLines: b32,
+}
+
+PhysicalDeviceLineRasterizationPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ lineSubPixelPrecisionBits: u32,
+}
+
+PipelineRasterizationLineStateCreateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ lineRasterizationMode: LineRasterizationModeKHR,
+ stippledLineEnable: b32,
+ lineStippleFactor: u32,
+ lineStipplePattern: u16,
+}
+
+CalibratedTimestampInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ timeDomain: TimeDomainKHR,
+}
+
+PhysicalDeviceShaderExpectAssumeFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderExpectAssume: b32,
+}
+
+PhysicalDeviceMaintenance6FeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maintenance6: b32,
+}
+
+PhysicalDeviceMaintenance6PropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ blockTexelViewCompatibleMultipleLayers: b32,
+ maxCombinedImageSamplerDescriptorCount: u32,
+ fragmentShadingRateClampCombinerInputs: b32,
+}
+
+BindMemoryStatusKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pResult: ^Result,
+}
+
+BindDescriptorSetsInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stageFlags: ShaderStageFlags,
+ layout: PipelineLayout,
+ firstSet: u32,
+ descriptorSetCount: u32,
+ pDescriptorSets: [^]DescriptorSet,
+ dynamicOffsetCount: u32,
+ pDynamicOffsets: [^]u32,
+}
+
+PushConstantsInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ layout: PipelineLayout,
+ stageFlags: ShaderStageFlags,
+ offset: u32,
+ size: u32,
+ pValues: rawptr,
+}
+
+PushDescriptorSetInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stageFlags: ShaderStageFlags,
+ layout: PipelineLayout,
+ set: u32,
+ descriptorWriteCount: u32,
+ pDescriptorWrites: [^]WriteDescriptorSet,
+}
+
+PushDescriptorSetWithTemplateInfoKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ descriptorUpdateTemplate: DescriptorUpdateTemplate,
+ layout: PipelineLayout,
+ set: u32,
+ pData: rawptr,
+}
+
+SetDescriptorBufferOffsetsInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stageFlags: ShaderStageFlags,
+ layout: PipelineLayout,
+ firstSet: u32,
+ setCount: u32,
+ pBufferIndices: [^]u32,
+ pOffsets: [^]DeviceSize,
+}
+
+BindDescriptorBufferEmbeddedSamplersInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stageFlags: ShaderStageFlags,
+ layout: PipelineLayout,
+ set: u32,
+}
+
+PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderRelaxedExtendedInstruction: b32,
+}
+
+PhysicalDeviceMaintenance7FeaturesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maintenance7: b32,
+}
+
+PhysicalDeviceMaintenance7PropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ robustFragmentShadingRateAttachmentAccess: b32,
+ separateDepthStencilAttachmentAccess: b32,
+ maxDescriptorSetTotalUniformBuffersDynamic: u32,
+ maxDescriptorSetTotalStorageBuffersDynamic: u32,
+ maxDescriptorSetTotalBuffersDynamic: u32,
+ maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic: u32,
+ maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic: u32,
+ maxDescriptorSetUpdateAfterBindTotalBuffersDynamic: u32,
+}
+
+PhysicalDeviceLayeredApiPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ vendorID: u32,
+ deviceID: u32,
+ layeredAPI: PhysicalDeviceLayeredApiKHR,
+ deviceName: [MAX_PHYSICAL_DEVICE_NAME_SIZE]byte,
+}
+
+PhysicalDeviceLayeredApiPropertiesListKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ layeredApiCount: u32,
+ pLayeredApis: [^]PhysicalDeviceLayeredApiPropertiesKHR,
+}
+
+PhysicalDeviceLayeredApiVulkanPropertiesKHR :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ properties: PhysicalDeviceProperties2,
+}
+
DebugReportCallbackCreateInfoEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -4006,6 +4860,12 @@ HdrMetadataEXT :: struct {
maxFrameAverageLightLevel: f32,
}
+PhysicalDeviceRelaxedLineRasterizationFeaturesIMG :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ relaxedLineRasterization: b32,
+}
+
DebugUtilsLabelEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -4473,12 +5333,6 @@ PipelineCompilerControlCreateInfoAMD :: struct {
compilerControlFlags: PipelineCompilerControlFlagsAMD,
}
-CalibratedTimestampInfoEXT :: struct {
- sType: StructureType,
- pNext: rawptr,
- timeDomain: TimeDomainEXT,
-}
-
PhysicalDeviceShaderCorePropertiesAMD :: struct {
sType: StructureType,
pNext: rawptr,
@@ -4510,32 +5364,6 @@ PhysicalDeviceVertexAttributeDivisorPropertiesEXT :: struct {
maxVertexAttribDivisor: u32,
}
-VertexInputBindingDivisorDescriptionEXT :: struct {
- binding: u32,
- divisor: u32,
-}
-
-PipelineVertexInputDivisorStateCreateInfoEXT :: struct {
- sType: StructureType,
- pNext: rawptr,
- vertexBindingDivisorCount: u32,
- pVertexBindingDivisors: [^]VertexInputBindingDivisorDescriptionEXT,
-}
-
-PhysicalDeviceVertexAttributeDivisorFeaturesEXT :: struct {
- sType: StructureType,
- pNext: rawptr,
- vertexAttributeInstanceRateDivisor: b32,
- vertexAttributeInstanceRateZeroDivisor: b32,
-}
-
-PhysicalDeviceComputeShaderDerivativesFeaturesNV :: struct {
- sType: StructureType,
- pNext: rawptr,
- computeDerivativeGroupQuads: b32,
- computeDerivativeGroupLinear: b32,
-}
-
PhysicalDeviceMeshShaderFeaturesNV :: struct {
sType: StructureType,
pNext: rawptr,
@@ -4854,32 +5682,6 @@ HeadlessSurfaceCreateInfoEXT :: struct {
flags: HeadlessSurfaceCreateFlagsEXT,
}
-PhysicalDeviceLineRasterizationFeaturesEXT :: struct {
- sType: StructureType,
- pNext: rawptr,
- rectangularLines: b32,
- bresenhamLines: b32,
- smoothLines: b32,
- stippledRectangularLines: b32,
- stippledBresenhamLines: b32,
- stippledSmoothLines: b32,
-}
-
-PhysicalDeviceLineRasterizationPropertiesEXT :: struct {
- sType: StructureType,
- pNext: rawptr,
- lineSubPixelPrecisionBits: u32,
-}
-
-PipelineRasterizationLineStateCreateInfoEXT :: struct {
- sType: StructureType,
- pNext: rawptr,
- lineRasterizationMode: LineRasterizationModeEXT,
- stippledLineEnable: b32,
- lineStippleFactor: u32,
- lineStipplePattern: u16,
-}
-
PhysicalDeviceShaderAtomicFloatFeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -4897,16 +5699,123 @@ PhysicalDeviceShaderAtomicFloatFeaturesEXT :: struct {
sparseImageFloat32AtomicAdd: b32,
}
-PhysicalDeviceIndexTypeUint8FeaturesEXT :: struct {
+PhysicalDeviceExtendedDynamicStateFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ extendedDynamicState: b32,
+}
+
+PhysicalDeviceHostImageCopyFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ hostImageCopy: b32,
+}
+
+PhysicalDeviceHostImageCopyPropertiesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ copySrcLayoutCount: u32,
+ pCopySrcLayouts: [^]ImageLayout,
+ copyDstLayoutCount: u32,
+ pCopyDstLayouts: [^]ImageLayout,
+ optimalTilingLayoutUUID: [UUID_SIZE]u8,
+ identicalMemoryTypeRequirements: b32,
+}
+
+MemoryToImageCopyEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pHostPointer: rawptr,
+ memoryRowLength: u32,
+ memoryImageHeight: u32,
+ imageSubresource: ImageSubresourceLayers,
+ imageOffset: Offset3D,
+ imageExtent: Extent3D,
+}
+
+ImageToMemoryCopyEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pHostPointer: rawptr,
+ memoryRowLength: u32,
+ memoryImageHeight: u32,
+ imageSubresource: ImageSubresourceLayers,
+ imageOffset: Offset3D,
+ imageExtent: Extent3D,
+}
+
+CopyMemoryToImageInfoEXT :: struct {
sType: StructureType,
pNext: rawptr,
- indexTypeUint8: b32,
+ flags: HostImageCopyFlagsEXT,
+ dstImage: Image,
+ dstImageLayout: ImageLayout,
+ regionCount: u32,
+ pRegions: [^]MemoryToImageCopyEXT,
}
-PhysicalDeviceExtendedDynamicStateFeaturesEXT :: struct {
+CopyImageToMemoryInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: HostImageCopyFlagsEXT,
+ srcImage: Image,
+ srcImageLayout: ImageLayout,
+ regionCount: u32,
+ pRegions: [^]ImageToMemoryCopyEXT,
+}
+
+CopyImageToImageInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: HostImageCopyFlagsEXT,
+ srcImage: Image,
+ srcImageLayout: ImageLayout,
+ dstImage: Image,
+ dstImageLayout: ImageLayout,
+ regionCount: u32,
+ pRegions: [^]ImageCopy2,
+}
+
+HostImageLayoutTransitionInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ image: Image,
+ oldLayout: ImageLayout,
+ newLayout: ImageLayout,
+ subresourceRange: ImageSubresourceRange,
+}
+
+SubresourceHostMemcpySizeEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ size: DeviceSize,
+}
+
+HostImageCopyDevicePerformanceQueryEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ optimalDeviceAccess: b32,
+ identicalMemoryLayout: b32,
+}
+
+PhysicalDeviceMapMemoryPlacedFeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
- extendedDynamicState: b32,
+ memoryMapPlaced: b32,
+ memoryMapRangePlaced: b32,
+ memoryUnmapReserve: b32,
+}
+
+PhysicalDeviceMapMemoryPlacedPropertiesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ minPlacedMemoryMapAlignment: DeviceSize,
+}
+
+MemoryMapPlacedInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pPlacedAddress: rawptr,
}
PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: struct {
@@ -5144,6 +6053,30 @@ CommandBufferInheritanceRenderPassTransformInfoQCOM :: struct {
renderArea: Rect2D,
}
+PhysicalDeviceDepthBiasControlFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ depthBiasControl: b32,
+ leastRepresentableValueForceUnormRepresentation: b32,
+ floatRepresentation: b32,
+ depthBiasExact: b32,
+}
+
+DepthBiasInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ depthBiasConstantFactor: f32,
+ depthBiasClamp: f32,
+ depthBiasSlopeFactor: f32,
+}
+
+DepthBiasRepresentationInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ depthBiasRepresentation: DepthBiasRepresentationEXT,
+ depthBiasExact: b32,
+}
+
PhysicalDeviceDeviceMemoryReportFeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -5235,6 +6168,50 @@ DeviceDiagnosticsConfigCreateInfoNV :: struct {
flags: DeviceDiagnosticsConfigFlagsNV,
}
+CudaModuleCreateInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ dataSize: int,
+ pData: rawptr,
+}
+
+CudaFunctionCreateInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ module: CudaModuleNV,
+ pName: cstring,
+}
+
+CudaLaunchInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ function: CudaFunctionNV,
+ gridDimX: u32,
+ gridDimY: u32,
+ gridDimZ: u32,
+ blockDimX: u32,
+ blockDimY: u32,
+ blockDimZ: u32,
+ sharedMemBytes: u32,
+ paramCount: int,
+ pParams: [^]rawptr,
+ extraCount: int,
+ pExtras: [^]rawptr,
+}
+
+PhysicalDeviceCudaKernelLaunchFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ cudaKernelLaunchFeatures: b32,
+}
+
+PhysicalDeviceCudaKernelLaunchPropertiesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ computeCapabilityMinor: u32,
+ computeCapabilityMajor: u32,
+}
+
QueryLowLatencySupportNV :: struct {
sType: StructureType,
pNext: rawptr,
@@ -5532,18 +6509,6 @@ ImageCompressionControlEXT :: struct {
pFixedRateFlags: [^]ImageCompressionFixedRateFlagsEXT,
}
-SubresourceLayout2EXT :: struct {
- sType: StructureType,
- pNext: rawptr,
- subresourceLayout: SubresourceLayout,
-}
-
-ImageSubresource2EXT :: struct {
- sType: StructureType,
- pNext: rawptr,
- imageSubresource: ImageSubresource,
-}
-
ImageCompressionPropertiesEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -5765,6 +6730,26 @@ PhysicalDevicePipelinePropertiesFeaturesEXT :: struct {
pipelinePropertiesIdentifier: b32,
}
+PhysicalDeviceFrameBoundaryFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ frameBoundary: b32,
+}
+
+FrameBoundaryEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: FrameBoundaryFlagsEXT,
+ frameID: u64,
+ imageCount: u32,
+ pImages: [^]Image,
+ bufferCount: u32,
+ pBuffers: [^]Buffer,
+ tagName: u64,
+ tagSize: int,
+ pTag: rawptr,
+}
+
PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -5997,6 +6982,12 @@ PhysicalDeviceClusterCullingShaderPropertiesHUAWEI :: struct {
indirectBufferOffsetAlignment: DeviceSize,
}
+PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ clusterShadingRate: b32,
+}
+
PhysicalDeviceBorderColorSwizzleFeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6025,6 +7016,24 @@ PhysicalDeviceShaderCorePropertiesARM :: struct {
fmaRate: u32,
}
+DeviceQueueShaderCoreControlCreateInfoARM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderCoreCount: u32,
+}
+
+PhysicalDeviceSchedulingControlsFeaturesARM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ schedulingControls: b32,
+}
+
+PhysicalDeviceSchedulingControlsPropertiesARM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ schedulingControlsFlags: PhysicalDeviceSchedulingControlsFlagsARM,
+}
+
PhysicalDeviceImageSlicedViewOf3DFeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6070,6 +7079,39 @@ PhysicalDeviceNonSeamlessCubeMapFeaturesEXT :: struct {
nonSeamlessCubeMap: b32,
}
+PhysicalDeviceRenderPassStripedFeaturesARM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ renderPassStriped: b32,
+}
+
+PhysicalDeviceRenderPassStripedPropertiesARM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ renderPassStripeGranularity: Extent2D,
+ maxRenderPassStripes: u32,
+}
+
+RenderPassStripeInfoARM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stripeArea: Rect2D,
+}
+
+RenderPassStripeBeginInfoARM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stripeInfoCount: u32,
+ pStripeInfos: [^]RenderPassStripeInfoARM,
+}
+
+RenderPassStripeSubmitInfoARM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stripeSemaphoreInfoCount: u32,
+ pStripeSemaphoreInfos: [^]SemaphoreSubmitInfo,
+}
+
PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6137,6 +7179,33 @@ PhysicalDeviceMemoryDecompressionPropertiesNV :: struct {
maxDecompressionIndirectCount: u64,
}
+PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ deviceGeneratedCompute: b32,
+ deviceGeneratedComputePipelines: b32,
+ deviceGeneratedComputeCaptureReplay: b32,
+}
+
+ComputePipelineIndirectBufferInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ deviceAddress: DeviceAddress,
+ size: DeviceSize,
+ pipelineDeviceAddressCaptureReplay: DeviceAddress,
+}
+
+PipelineIndirectDeviceAddressInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pipelineBindPoint: PipelineBindPoint,
+ pipeline: Pipeline,
+}
+
+BindPipelineIndirectCommandNV :: struct {
+ pipelineAddress: DeviceAddress,
+}
+
PhysicalDeviceLinearColorAttachmentFeaturesNV :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6174,6 +7243,26 @@ PhysicalDeviceImageProcessingPropertiesQCOM :: struct {
maxBoxFilterBlockSize: Extent2D,
}
+PhysicalDeviceNestedCommandBufferFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ nestedCommandBuffer: b32,
+ nestedCommandBufferRendering: b32,
+ nestedCommandBufferSimultaneousUse: b32,
+}
+
+PhysicalDeviceNestedCommandBufferPropertiesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maxCommandBufferNestingLevel: u32,
+}
+
+ExternalMemoryAcquireUnmodifiedEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ acquireUnmodifiedMemory: b32,
+}
+
PhysicalDeviceExtendedDynamicState3FeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6384,6 +7473,27 @@ PhysicalDevicePipelineProtectedAccessFeaturesEXT :: struct {
pipelineProtectedAccess: b32,
}
+PhysicalDeviceAntiLagFeaturesAMD :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ antiLag: b32,
+}
+
+AntiLagPresentationInfoAMD :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ stage: AntiLagStageAMD,
+ frameIndex: u64,
+}
+
+AntiLagDataAMD :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ mode: AntiLagModeAMD,
+ maxFPS: u32,
+ pPresentationInfo: ^AntiLagPresentationInfoAMD,
+}
+
PhysicalDeviceShaderObjectFeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6414,6 +7524,11 @@ ShaderCreateInfoEXT :: struct {
pSpecializationInfo: ^SpecializationInfo,
}
+DepthClampRangeEXT :: struct {
+ minDepthClamp: f32,
+ maxDepthClamp: f32,
+}
+
PhysicalDeviceTilePropertiesFeaturesQCOM :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6459,6 +7574,47 @@ PhysicalDeviceRayTracingInvocationReorderFeaturesNV :: struct {
rayTracingInvocationReorder: b32,
}
+PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ extendedSparseAddressSpace: b32,
+}
+
+PhysicalDeviceExtendedSparseAddressSpacePropertiesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ extendedSparseAddressSpaceSize: DeviceSize,
+ extendedSparseImageUsageFlags: ImageUsageFlags,
+ extendedSparseBufferUsageFlags: BufferUsageFlags,
+}
+
+PhysicalDeviceLegacyVertexAttributesFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ legacyVertexAttributes: b32,
+}
+
+PhysicalDeviceLegacyVertexAttributesPropertiesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ nativeUnalignedPerformance: b32,
+}
+
+LayerSettingEXT :: struct {
+ pLayerName: cstring,
+ pSettingName: cstring,
+ type: LayerSettingTypeEXT,
+ valueCount: u32,
+ pValues: rawptr,
+}
+
+LayerSettingsCreateInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ settingCount: u32,
+ pSettings: [^]LayerSettingEXT,
+}
+
PhysicalDeviceShaderCoreBuiltinsFeaturesARM :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6479,6 +7635,85 @@ PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT :: struct {
pipelineLibraryGroupHandles: b32,
}
+PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ dynamicRenderingUnusedAttachments: b32,
+}
+
+LatencySleepModeInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ lowLatencyMode: b32,
+ lowLatencyBoost: b32,
+ minimumIntervalUs: u32,
+}
+
+LatencySleepInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ signalSemaphore: Semaphore,
+ value: u64,
+}
+
+SetLatencyMarkerInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ presentID: u64,
+ marker: LatencyMarkerNV,
+}
+
+LatencyTimingsFrameReportNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ presentID: u64,
+ inputSampleTimeUs: u64,
+ simStartTimeUs: u64,
+ simEndTimeUs: u64,
+ renderSubmitStartTimeUs: u64,
+ renderSubmitEndTimeUs: u64,
+ presentStartTimeUs: u64,
+ presentEndTimeUs: u64,
+ driverStartTimeUs: u64,
+ driverEndTimeUs: u64,
+ osRenderQueueStartTimeUs: u64,
+ osRenderQueueEndTimeUs: u64,
+ gpuRenderStartTimeUs: u64,
+ gpuRenderEndTimeUs: u64,
+}
+
+GetLatencyMarkerInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ timingCount: u32,
+ pTimings: [^]LatencyTimingsFrameReportNV,
+}
+
+LatencySubmissionPresentIdNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ presentID: u64,
+}
+
+SwapchainLatencyCreateInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ latencyModeEnable: b32,
+}
+
+OutOfBandQueueTypeInfoNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ queueType: OutOfBandQueueTypeNV,
+}
+
+LatencySurfaceCapabilitiesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ presentModeCount: u32,
+ pPresentModes: [^]PresentModeKHR,
+}
+
PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM :: struct {
sType: StructureType,
pNext: rawptr,
@@ -6492,12 +7727,321 @@ MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM :: struct {
pPerViewRenderAreas: [^]Rect2D,
}
+PhysicalDevicePerStageDescriptorSetFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ perStageDescriptorSet: b32,
+ dynamicPipelineLayout: b32,
+}
+
+PhysicalDeviceImageProcessing2FeaturesQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ textureBlockMatch2: b32,
+}
+
+PhysicalDeviceImageProcessing2PropertiesQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maxBlockMatchWindow: Extent2D,
+}
+
+SamplerBlockMatchWindowCreateInfoQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ windowExtent: Extent2D,
+ windowCompareMode: BlockMatchWindowCompareModeQCOM,
+}
+
+PhysicalDeviceCubicWeightsFeaturesQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ selectableCubicWeights: b32,
+}
+
+SamplerCubicWeightsCreateInfoQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ cubicWeights: CubicFilterWeightsQCOM,
+}
+
+BlitImageCubicWeightsInfoQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ cubicWeights: CubicFilterWeightsQCOM,
+}
+
+PhysicalDeviceYcbcrDegammaFeaturesQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ ycbcrDegamma: b32,
+}
+
+SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ enableYDegamma: b32,
+ enableCbCrDegamma: b32,
+}
+
+PhysicalDeviceCubicClampFeaturesQCOM :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ cubicRangeClamp: b32,
+}
+
PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT :: struct {
sType: StructureType,
pNext: rawptr,
attachmentFeedbackLoopDynamicState: b32,
}
+PhysicalDeviceLayeredDriverPropertiesMSFT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ underlyingAPI: LayeredDriverUnderlyingApiMSFT,
+}
+
+PhysicalDeviceDescriptorPoolOverallocationFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ descriptorPoolOverallocation: b32,
+}
+
+PhysicalDeviceRawAccessChainsFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderRawAccessChains: b32,
+}
+
+PhysicalDeviceCommandBufferInheritanceFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ commandBufferInheritance: b32,
+}
+
+PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderFloat16VectorAtomics: b32,
+}
+
+PhysicalDeviceShaderReplicatedCompositesFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderReplicatedComposites: b32,
+}
+
+PhysicalDeviceRayTracingValidationFeaturesNV :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ rayTracingValidation: b32,
+}
+
+PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ deviceGeneratedCommands: b32,
+ dynamicGeneratedPipelineLayout: b32,
+}
+
+PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maxIndirectPipelineCount: u32,
+ maxIndirectShaderObjectCount: u32,
+ maxIndirectSequenceCount: u32,
+ maxIndirectCommandsTokenCount: u32,
+ maxIndirectCommandsTokenOffset: u32,
+ maxIndirectCommandsIndirectStride: u32,
+ supportedIndirectCommandsInputModes: IndirectCommandsInputModeFlagsEXT,
+ supportedIndirectCommandsShaderStages: ShaderStageFlags,
+ supportedIndirectCommandsShaderStagesPipelineBinding: ShaderStageFlags,
+ supportedIndirectCommandsShaderStagesShaderBinding: ShaderStageFlags,
+ deviceGeneratedCommandsTransformFeedback: b32,
+ deviceGeneratedCommandsMultiDrawIndirectCount: b32,
+}
+
+GeneratedCommandsMemoryRequirementsInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ indirectExecutionSet: IndirectExecutionSetEXT,
+ indirectCommandsLayout: IndirectCommandsLayoutEXT,
+ maxSequenceCount: u32,
+ maxDrawCount: u32,
+}
+
+IndirectExecutionSetPipelineInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ initialPipeline: Pipeline,
+ maxPipelineCount: u32,
+}
+
+IndirectExecutionSetShaderLayoutInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ setLayoutCount: u32,
+ pSetLayouts: [^]DescriptorSetLayout,
+}
+
+IndirectExecutionSetShaderInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderCount: u32,
+ pInitialShaders: [^]ShaderEXT,
+ pSetLayoutInfos: [^]IndirectExecutionSetShaderLayoutInfoEXT,
+ maxShaderCount: u32,
+ pushConstantRangeCount: u32,
+ pPushConstantRanges: [^]PushConstantRange,
+}
+
+IndirectExecutionSetInfoEXT :: struct #raw_union {
+ pPipelineInfo: ^IndirectExecutionSetPipelineInfoEXT,
+ pShaderInfo: ^IndirectExecutionSetShaderInfoEXT,
+}
+
+IndirectExecutionSetCreateInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ type: IndirectExecutionSetInfoTypeEXT,
+ info: IndirectExecutionSetInfoEXT,
+}
+
+GeneratedCommandsInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderStages: ShaderStageFlags,
+ indirectExecutionSet: IndirectExecutionSetEXT,
+ indirectCommandsLayout: IndirectCommandsLayoutEXT,
+ indirectAddress: DeviceAddress,
+ indirectAddressSize: DeviceSize,
+ preprocessAddress: DeviceAddress,
+ preprocessSize: DeviceSize,
+ maxSequenceCount: u32,
+ sequenceCountAddress: DeviceAddress,
+ maxDrawCount: u32,
+}
+
+WriteIndirectExecutionSetPipelineEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ index: u32,
+ pipeline: Pipeline,
+}
+
+IndirectCommandsPushConstantTokenEXT :: struct {
+ updateRange: PushConstantRange,
+}
+
+IndirectCommandsVertexBufferTokenEXT :: struct {
+ vertexBindingUnit: u32,
+}
+
+IndirectCommandsIndexBufferTokenEXT :: struct {
+ mode: IndirectCommandsInputModeFlagsEXT,
+}
+
+IndirectCommandsExecutionSetTokenEXT :: struct {
+ type: IndirectExecutionSetInfoTypeEXT,
+ shaderStages: ShaderStageFlags,
+}
+
+IndirectCommandsTokenDataEXT :: struct #raw_union {
+ pPushConstant: ^IndirectCommandsPushConstantTokenEXT,
+ pVertexBuffer: ^IndirectCommandsVertexBufferTokenEXT,
+ pIndexBuffer: ^IndirectCommandsIndexBufferTokenEXT,
+ pExecutionSet: ^IndirectCommandsExecutionSetTokenEXT,
+}
+
+IndirectCommandsLayoutTokenEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ type: IndirectCommandsTokenTypeEXT,
+ data: IndirectCommandsTokenDataEXT,
+ offset: u32,
+}
+
+IndirectCommandsLayoutCreateInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ flags: IndirectCommandsLayoutUsageFlagsEXT,
+ shaderStages: ShaderStageFlags,
+ indirectStride: u32,
+ pipelineLayout: PipelineLayout,
+ tokenCount: u32,
+ pTokens: [^]IndirectCommandsLayoutTokenEXT,
+}
+
+DrawIndirectCountIndirectCommandEXT :: struct {
+ bufferAddress: DeviceAddress,
+ stride: u32,
+ commandCount: u32,
+}
+
+BindVertexBufferIndirectCommandEXT :: struct {
+ bufferAddress: DeviceAddress,
+ size: u32,
+ stride: u32,
+}
+
+BindIndexBufferIndirectCommandEXT :: struct {
+ bufferAddress: DeviceAddress,
+ size: u32,
+ indexType: IndexType,
+}
+
+GeneratedCommandsPipelineInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ pipeline: Pipeline,
+}
+
+GeneratedCommandsShaderInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ shaderCount: u32,
+ pShaders: [^]ShaderEXT,
+}
+
+WriteIndirectExecutionSetShaderEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ index: u32,
+ shader: ShaderEXT,
+}
+
+PhysicalDeviceImageAlignmentControlFeaturesMESA :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ imageAlignmentControl: b32,
+}
+
+PhysicalDeviceImageAlignmentControlPropertiesMESA :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ supportedImageAlignmentMask: u32,
+}
+
+ImageAlignmentControlCreateInfoMESA :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ maximumRequestedAlignment: u32,
+}
+
+PhysicalDeviceDepthClampControlFeaturesEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ depthClampControl: b32,
+}
+
+PipelineViewportDepthClampControlCreateInfoEXT :: struct {
+ sType: StructureType,
+ pNext: rawptr,
+ depthClampMode: DepthClampModeEXT,
+ pDepthClampRange: ^DepthClampRangeEXT,
+}
+
AccelerationStructureBuildRangeInfoKHR :: struct {
primitiveCount: u32,
primitiveOffset: u32,
@@ -7031,6 +8575,158 @@ WaylandSurfaceCreateInfoKHR :: struct {
surface: ^wl_surface,
}
+VideoAV1ColorConfigFlags :: struct {
+ bitfield: u32,
+}
+
+VideoAV1ColorConfig :: struct {
+ flags: VideoAV1ColorConfigFlags,
+ BitDepth: u8,
+ subsampling_x: u8,
+ subsampling_y: u8,
+ reserved1: u8,
+ color_primaries: VideoAV1ColorPrimaries,
+ transfer_characteristics: VideoAV1TransferCharacteristics,
+ matrix_coefficients: VideoAV1MatrixCoefficients,
+ chroma_sample_position: VideoAV1ChromaSamplePosition,
+}
+
+VideoAV1TimingInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoAV1TimingInfo :: struct {
+ flags: VideoAV1TimingInfoFlags,
+ num_units_in_display_tick: u32,
+ time_scale: u32,
+ num_ticks_per_picture_minus_1: u32,
+}
+
+VideoAV1LoopFilterFlags :: struct {
+ bitfield: u32,
+}
+
+VideoAV1LoopFilter :: struct {
+ flags: VideoAV1LoopFilterFlags,
+ loop_filter_level: [VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS]u8,
+ loop_filter_sharpness: u8,
+ update_ref_delta: u8,
+ loop_filter_ref_deltas: [VIDEO_AV1_TOTAL_REFS_PER_FRAME]i8,
+ update_mode_delta: u8,
+ loop_filter_mode_deltas: [VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS]i8,
+}
+
+VideoAV1QuantizationFlags :: struct {
+ bitfield: u32,
+}
+
+VideoAV1Quantization :: struct {
+ flags: VideoAV1QuantizationFlags,
+ base_q_idx: u8,
+ DeltaQYDc: i8,
+ DeltaQUDc: i8,
+ DeltaQUAc: i8,
+ DeltaQVDc: i8,
+ DeltaQVAc: i8,
+ qm_y: u8,
+ qm_u: u8,
+ qm_v: u8,
+}
+
+VideoAV1Segmentation :: struct {
+ FeatureEnabled: [VIDEO_AV1_MAX_SEGMENTS]u8,
+ FeatureData: [VIDEO_AV1_MAX_SEGMENTS][VIDEO_AV1_SEG_LVL_MAX]i16,
+}
+
+VideoAV1TileInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoAV1TileInfo :: struct {
+ flags: VideoAV1TileInfoFlags,
+ TileCols: u8,
+ TileRows: u8,
+ context_update_tile_id: u16,
+ tile_size_bytes_minus_1: u8,
+ reserved1: [7]u8,
+ pMiColStarts: [^]u16,
+ pMiRowStarts: [^]u16,
+ pWidthInSbsMinus1: ^u16,
+ pHeightInSbsMinus1: ^u16,
+}
+
+VideoAV1CDEF :: struct {
+ cdef_damping_minus_3: u8,
+ cdef_bits: u8,
+ cdef_y_pri_strength: [VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]u8,
+ cdef_y_sec_strength: [VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]u8,
+ cdef_uv_pri_strength: [VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]u8,
+ cdef_uv_sec_strength: [VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]u8,
+}
+
+VideoAV1LoopRestoration :: struct {
+ FrameRestorationType: [VIDEO_AV1_MAX_NUM_PLANES]VideoAV1FrameRestorationType,
+ LoopRestorationSize: [VIDEO_AV1_MAX_NUM_PLANES]u16,
+}
+
+VideoAV1GlobalMotion :: struct {
+ GmType: [VIDEO_AV1_NUM_REF_FRAMES]u8,
+ gm_params: [VIDEO_AV1_NUM_REF_FRAMES][VIDEO_AV1_GLOBAL_MOTION_PARAMS]i32,
+}
+
+VideoAV1FilmGrainFlags :: struct {
+ bitfield: u32,
+}
+
+VideoAV1FilmGrain :: struct {
+ flags: VideoAV1FilmGrainFlags,
+ grain_scaling_minus_8: u8,
+ ar_coeff_lag: u8,
+ ar_coeff_shift_minus_6: u8,
+ grain_scale_shift: u8,
+ grain_seed: u16,
+ film_grain_params_ref_idx: u8,
+ num_y_points: u8,
+ point_y_value: [VIDEO_AV1_MAX_NUM_Y_POINTS]u8,
+ point_y_scaling: [VIDEO_AV1_MAX_NUM_Y_POINTS]u8,
+ num_cb_points: u8,
+ point_cb_value: [VIDEO_AV1_MAX_NUM_CB_POINTS]u8,
+ point_cb_scaling: [VIDEO_AV1_MAX_NUM_CB_POINTS]u8,
+ num_cr_points: u8,
+ point_cr_value: [VIDEO_AV1_MAX_NUM_CR_POINTS]u8,
+ point_cr_scaling: [VIDEO_AV1_MAX_NUM_CR_POINTS]u8,
+ ar_coeffs_y_plus_128: [VIDEO_AV1_MAX_NUM_POS_LUMA]i8,
+ ar_coeffs_cb_plus_128: [VIDEO_AV1_MAX_NUM_POS_CHROMA]i8,
+ ar_coeffs_cr_plus_128: [VIDEO_AV1_MAX_NUM_POS_CHROMA]i8,
+ cb_mult: u8,
+ cb_luma_mult: u8,
+ cb_offset: u16,
+ cr_mult: u8,
+ cr_luma_mult: u8,
+ cr_offset: u16,
+}
+
+VideoAV1SequenceHeaderFlags :: struct {
+ bitfield: u32,
+}
+
+VideoAV1SequenceHeader :: struct {
+ flags: VideoAV1SequenceHeaderFlags,
+ seq_profile: VideoAV1Profile,
+ frame_width_bits_minus_1: u8,
+ frame_height_bits_minus_1: u8,
+ max_frame_width_minus_1: u16,
+ max_frame_height_minus_1: u16,
+ delta_frame_id_length_minus_2: u8,
+ additional_frame_id_length_minus_1: u8,
+ order_hint_bits_minus_1: u8,
+ seq_force_integer_mv: u8,
+ seq_force_screen_content_tools: u8,
+ reserved1: [5]u8,
+ pColorConfig: ^VideoAV1ColorConfig,
+ pTimingInfo: ^VideoAV1TimingInfo,
+}
+
VideoH264SpsVuiFlags :: struct {
bitfield: u32,
}
@@ -7351,6 +9047,49 @@ VideoH265PictureParameterSet :: struct {
pPredictorPaletteEntries: [^]VideoH265PredictorPaletteEntries,
}
+VideoDecodeAV1PictureInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoDecodeAV1PictureInfo :: struct {
+ flags: VideoDecodeAV1PictureInfoFlags,
+ frame_type: VideoAV1FrameType,
+ current_frame_id: u32,
+ OrderHint: u8,
+ primary_ref_frame: u8,
+ refresh_frame_flags: u8,
+ reserved1: u8,
+ interpolation_filter: VideoAV1InterpolationFilter,
+ TxMode: VideoAV1TxMode,
+ delta_q_res: u8,
+ delta_lf_res: u8,
+ SkipModeFrame: [VIDEO_AV1_SKIP_MODE_FRAMES]u8,
+ coded_denom: u8,
+ reserved2: [3]u8,
+ OrderHints: [VIDEO_AV1_NUM_REF_FRAMES]u8,
+ expectedFrameId: [VIDEO_AV1_NUM_REF_FRAMES]u32,
+ pTileInfo: ^VideoAV1TileInfo,
+ pQuantization: ^VideoAV1Quantization,
+ pSegmentation: ^VideoAV1Segmentation,
+ pLoopFilter: ^VideoAV1LoopFilter,
+ pCDEF: ^VideoAV1CDEF,
+ pLoopRestoration: ^VideoAV1LoopRestoration,
+ pGlobalMotion: ^VideoAV1GlobalMotion,
+ pFilmGrain: ^VideoAV1FilmGrain,
+}
+
+VideoDecodeAV1ReferenceInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoDecodeAV1ReferenceInfo :: struct {
+ flags: VideoDecodeAV1ReferenceInfoFlags,
+ frame_type: u8,
+ RefFrameSignBias: u8,
+ OrderHint: u8,
+ SavedOrderHints: [VIDEO_AV1_NUM_REF_FRAMES]u8,
+}
+
VideoDecodeH264PictureInfoFlags :: struct {
bitfield: u32,
}
@@ -7404,6 +9143,205 @@ VideoDecodeH265ReferenceInfo :: struct {
PicOrderCntVal: i32,
}
+VideoEncodeH264WeightTableFlags :: struct {
+ luma_weight_l0_flag: u32,
+ chroma_weight_l0_flag: u32,
+ luma_weight_l1_flag: u32,
+ chroma_weight_l1_flag: u32,
+}
+
+VideoEncodeH264WeightTable :: struct {
+ flags: VideoEncodeH264WeightTableFlags,
+ luma_log2_weight_denom: u8,
+ chroma_log2_weight_denom: u8,
+ luma_weight_l0: [VIDEO_H264_MAX_NUM_LIST_REF]i8,
+ luma_offset_l0: [VIDEO_H264_MAX_NUM_LIST_REF]i8,
+ chroma_weight_l0: [VIDEO_H264_MAX_NUM_LIST_REF][VIDEO_H264_MAX_CHROMA_PLANES]i8,
+ chroma_offset_l0: [VIDEO_H264_MAX_NUM_LIST_REF][VIDEO_H264_MAX_CHROMA_PLANES]i8,
+ luma_weight_l1: [VIDEO_H264_MAX_NUM_LIST_REF]i8,
+ luma_offset_l1: [VIDEO_H264_MAX_NUM_LIST_REF]i8,
+ chroma_weight_l1: [VIDEO_H264_MAX_NUM_LIST_REF][VIDEO_H264_MAX_CHROMA_PLANES]i8,
+ chroma_offset_l1: [VIDEO_H264_MAX_NUM_LIST_REF][VIDEO_H264_MAX_CHROMA_PLANES]i8,
+}
+
+VideoEncodeH264SliceHeaderFlags :: struct {
+ bitfield: u32,
+}
+
+VideoEncodeH264PictureInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoEncodeH264ReferenceInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoEncodeH264ReferenceListsInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoEncodeH264RefListModEntry :: struct {
+ modification_of_pic_nums_idc: VideoH264ModificationOfPicNumsIdc,
+ abs_diff_pic_num_minus1: u16,
+ long_term_pic_num: u16,
+}
+
+VideoEncodeH264RefPicMarkingEntry :: struct {
+ memory_management_control_operation: VideoH264MemMgmtControlOp,
+ difference_of_pic_nums_minus1: u16,
+ long_term_pic_num: u16,
+ long_term_frame_idx: u16,
+ max_long_term_frame_idx_plus1: u16,
+}
+
+VideoEncodeH264ReferenceListsInfo :: struct {
+ flags: VideoEncodeH264ReferenceListsInfoFlags,
+ num_ref_idx_l0_active_minus1: u8,
+ num_ref_idx_l1_active_minus1: u8,
+ RefPicList0: [VIDEO_H264_MAX_NUM_LIST_REF]u8,
+ RefPicList1: [VIDEO_H264_MAX_NUM_LIST_REF]u8,
+ refList0ModOpCount: u8,
+ refList1ModOpCount: u8,
+ refPicMarkingOpCount: u8,
+ reserved1: [7]u8,
+ pRefList0ModOperations: [^]VideoEncodeH264RefListModEntry,
+ pRefList1ModOperations: [^]VideoEncodeH264RefListModEntry,
+ pRefPicMarkingOperations: [^]VideoEncodeH264RefPicMarkingEntry,
+}
+
+VideoEncodeH264PictureInfo :: struct {
+ flags: VideoEncodeH264PictureInfoFlags,
+ seq_parameter_set_id: u8,
+ pic_parameter_set_id: u8,
+ idr_pic_id: u16,
+ primary_pic_type: VideoH264PictureType,
+ frame_num: u32,
+ PicOrderCnt: i32,
+ temporal_id: u8,
+ reserved1: [3]u8,
+ pRefLists: [^]VideoEncodeH264ReferenceListsInfo,
+}
+
+VideoEncodeH264ReferenceInfo :: struct {
+ flags: VideoEncodeH264ReferenceInfoFlags,
+ primary_pic_type: VideoH264PictureType,
+ FrameNum: u32,
+ PicOrderCnt: i32,
+ long_term_pic_num: u16,
+ long_term_frame_idx: u16,
+ temporal_id: u8,
+}
+
+VideoEncodeH264SliceHeader :: struct {
+ flags: VideoEncodeH264SliceHeaderFlags,
+ first_mb_in_slice: u32,
+ slice_type: VideoH264SliceType,
+ slice_alpha_c0_offset_div2: i8,
+ slice_beta_offset_div2: i8,
+ slice_qp_delta: i8,
+ reserved1: u8,
+ cabac_init_idc: VideoH264CabacInitIdc,
+ disable_deblocking_filter_idc: VideoH264DisableDeblockingFilterIdc,
+ pWeightTable: [^]VideoEncodeH264WeightTable,
+}
+
+VideoEncodeH265WeightTableFlags :: struct {
+ luma_weight_l0_flag: u16,
+ chroma_weight_l0_flag: u16,
+ luma_weight_l1_flag: u16,
+ chroma_weight_l1_flag: u16,
+}
+
+VideoEncodeH265WeightTable :: struct {
+ flags: VideoEncodeH265WeightTableFlags,
+ luma_log2_weight_denom: u8,
+ delta_chroma_log2_weight_denom: i8,
+ delta_luma_weight_l0: [VIDEO_H265_MAX_NUM_LIST_REF]i8,
+ luma_offset_l0: [VIDEO_H265_MAX_NUM_LIST_REF]i8,
+ delta_chroma_weight_l0: [VIDEO_H265_MAX_NUM_LIST_REF][VIDEO_H265_MAX_CHROMA_PLANES]i8,
+ delta_chroma_offset_l0: [VIDEO_H265_MAX_NUM_LIST_REF][VIDEO_H265_MAX_CHROMA_PLANES]i8,
+ delta_luma_weight_l1: [VIDEO_H265_MAX_NUM_LIST_REF]i8,
+ luma_offset_l1: [VIDEO_H265_MAX_NUM_LIST_REF]i8,
+ delta_chroma_weight_l1: [VIDEO_H265_MAX_NUM_LIST_REF][VIDEO_H265_MAX_CHROMA_PLANES]i8,
+ delta_chroma_offset_l1: [VIDEO_H265_MAX_NUM_LIST_REF][VIDEO_H265_MAX_CHROMA_PLANES]i8,
+}
+
+VideoEncodeH265SliceSegmentHeaderFlags :: struct {
+ bitfield: u32,
+}
+
+VideoEncodeH265SliceSegmentHeader :: struct {
+ flags: VideoEncodeH265SliceSegmentHeaderFlags,
+ slice_type: VideoH265SliceType,
+ slice_segment_address: u32,
+ collocated_ref_idx: u8,
+ MaxNumMergeCand: u8,
+ slice_cb_qp_offset: i8,
+ slice_cr_qp_offset: i8,
+ slice_beta_offset_div2: i8,
+ slice_tc_offset_div2: i8,
+ slice_act_y_qp_offset: i8,
+ slice_act_cb_qp_offset: i8,
+ slice_act_cr_qp_offset: i8,
+ slice_qp_delta: i8,
+ reserved1: u16,
+ pWeightTable: [^]VideoEncodeH265WeightTable,
+}
+
+VideoEncodeH265ReferenceListsInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoEncodeH265ReferenceListsInfo :: struct {
+ flags: VideoEncodeH265ReferenceListsInfoFlags,
+ num_ref_idx_l0_active_minus1: u8,
+ num_ref_idx_l1_active_minus1: u8,
+ RefPicList0: [VIDEO_H265_MAX_NUM_LIST_REF]u8,
+ RefPicList1: [VIDEO_H265_MAX_NUM_LIST_REF]u8,
+ list_entry_l0: [VIDEO_H265_MAX_NUM_LIST_REF]u8,
+ list_entry_l1: [VIDEO_H265_MAX_NUM_LIST_REF]u8,
+}
+
+VideoEncodeH265PictureInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoEncodeH265LongTermRefPics :: struct {
+ num_long_term_sps: u8,
+ num_long_term_pics: u8,
+ lt_idx_sps: [VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS]u8,
+ poc_lsb_lt: [VIDEO_H265_MAX_LONG_TERM_PICS]u8,
+ used_by_curr_pic_lt_flag: u16,
+ delta_poc_msb_present_flag: [VIDEO_H265_MAX_DELTA_POC]u8,
+ delta_poc_msb_cycle_lt: [VIDEO_H265_MAX_DELTA_POC]u8,
+}
+
+VideoEncodeH265PictureInfo :: struct {
+ flags: VideoEncodeH265PictureInfoFlags,
+ pic_type: VideoH265PictureType,
+ sps_video_parameter_set_id: u8,
+ pps_seq_parameter_set_id: u8,
+ pps_pic_parameter_set_id: u8,
+ short_term_ref_pic_set_idx: u8,
+ PicOrderCntVal: i32,
+ TemporalId: u8,
+ reserved1: [7]u8,
+ pRefLists: [^]VideoEncodeH265ReferenceListsInfo,
+ pShortTermRefPicSet: ^VideoH265ShortTermRefPicSet,
+ pLongTermRefPics: [^]VideoEncodeH265LongTermRefPics,
+}
+
+VideoEncodeH265ReferenceInfoFlags :: struct {
+ bitfield: u32,
+}
+
+VideoEncodeH265ReferenceInfo :: struct {
+ flags: VideoEncodeH265ReferenceInfoFlags,
+ pic_type: VideoH265PictureType,
+ PicOrderCntVal: i32,
+ TemporalId: u8,
+}
+
// Opaque structs
wl_surface :: struct {} // Opaque struct defined by Wayland
@@ -7594,6 +9532,10 @@ PhysicalDeviceMaintenance4FeaturesKHR :: PhysicalDeviceMai
PhysicalDeviceMaintenance4PropertiesKHR :: PhysicalDeviceMaintenance4Properties
DeviceBufferMemoryRequirementsKHR :: DeviceBufferMemoryRequirements
DeviceImageMemoryRequirementsKHR :: DeviceImageMemoryRequirements
+PipelineCreateFlags2KHR :: Flags64
+PipelineCreateFlag2KHR :: Flags64
+BufferUsageFlags2KHR :: Flags64
+BufferUsageFlag2KHR :: Flags64
PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT :: PhysicalDeviceTextureCompressionASTCHDRFeatures
SamplerReductionModeEXT :: SamplerReductionMode
SamplerReductionModeCreateInfoEXT :: SamplerReductionModeCreateInfo
@@ -7624,10 +9566,16 @@ AabbPositionsNV :: AabbPositionsKHR
AccelerationStructureInstanceNV :: AccelerationStructureInstanceKHR
QueueGlobalPriorityEXT :: QueueGlobalPriorityKHR
DeviceQueueGlobalPriorityCreateInfoEXT :: DeviceQueueGlobalPriorityCreateInfoKHR
+TimeDomainEXT :: TimeDomainKHR
+CalibratedTimestampInfoEXT :: CalibratedTimestampInfoKHR
+VertexInputBindingDivisorDescriptionEXT :: VertexInputBindingDivisorDescriptionKHR
+PipelineVertexInputDivisorStateCreateInfoEXT :: PipelineVertexInputDivisorStateCreateInfoKHR
+PhysicalDeviceVertexAttributeDivisorFeaturesEXT :: PhysicalDeviceVertexAttributeDivisorFeaturesKHR
PipelineCreationFeedbackFlagEXT :: PipelineCreationFeedbackFlag
PipelineCreationFeedbackFlagsEXT :: PipelineCreationFeedbackFlags
PipelineCreationFeedbackCreateInfoEXT :: PipelineCreationFeedbackCreateInfo
PipelineCreationFeedbackEXT :: PipelineCreationFeedback
+PhysicalDeviceComputeShaderDerivativesFeaturesNV :: PhysicalDeviceComputeShaderDerivativesFeaturesKHR
PhysicalDeviceFragmentShaderBarycentricFeaturesNV :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
QueryPoolCreateInfoINTEL :: QueryPoolPerformanceQueryCreateInfoINTEL
PhysicalDeviceScalarBlockLayoutFeaturesEXT :: PhysicalDeviceScalarBlockLayoutFeatures
@@ -7640,7 +9588,16 @@ ToolPurposeFlagEXT :: ToolPurposeFlag
ToolPurposeFlagsEXT :: ToolPurposeFlags
PhysicalDeviceToolPropertiesEXT :: PhysicalDeviceToolProperties
ImageStencilUsageCreateInfoEXT :: ImageStencilUsageCreateInfo
+ComponentTypeNV :: ComponentTypeKHR
+ScopeNV :: ScopeKHR
+LineRasterizationModeEXT :: LineRasterizationModeKHR
+PhysicalDeviceLineRasterizationFeaturesEXT :: PhysicalDeviceLineRasterizationFeaturesKHR
+PhysicalDeviceLineRasterizationPropertiesEXT :: PhysicalDeviceLineRasterizationPropertiesKHR
+PipelineRasterizationLineStateCreateInfoEXT :: PipelineRasterizationLineStateCreateInfoKHR
PhysicalDeviceHostQueryResetFeaturesEXT :: PhysicalDeviceHostQueryResetFeatures
+PhysicalDeviceIndexTypeUint8FeaturesEXT :: PhysicalDeviceIndexTypeUint8FeaturesKHR
+SubresourceLayout2EXT :: SubresourceLayout2KHR
+ImageSubresource2EXT :: ImageSubresource2KHR
PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT :: PhysicalDeviceShaderDemoteToHelperInvocationFeatures
PhysicalDeviceTexelBufferAlignmentPropertiesEXT :: PhysicalDeviceTexelBufferAlignmentProperties
PrivateDataSlotEXT :: PrivateDataSlot
@@ -7657,6 +9614,8 @@ MutableDescriptorTypeCreateInfoVALVE :: MutableDescriptor
PipelineInfoEXT :: PipelineInfoKHR
PhysicalDeviceGlobalPriorityQueryFeaturesEXT :: PhysicalDeviceGlobalPriorityQueryFeaturesKHR
QueueFamilyGlobalPriorityPropertiesEXT :: QueueFamilyGlobalPriorityPropertiesKHR
+PhysicalDeviceSchedulingControlsFlagsARM :: Flags64
+PhysicalDeviceSchedulingControlsFlagARM :: Flags64
MemoryDecompressionMethodFlagNV :: Flags64
MemoryDecompressionMethodFlagsNV :: Flags64
ShaderRequiredSubgroupSizeCreateInfoEXT :: PipelineShaderStageRequiredSubgroupSizeCreateInfo
diff --git a/vendor/wgpu/examples/glfw/Makefile b/vendor/wgpu/examples/glfw/Makefile
index fdecdbb91..022bfcbbc 100644
--- a/vendor/wgpu/examples/glfw/Makefile
+++ b/vendor/wgpu/examples/glfw/Makefile
@@ -8,10 +8,10 @@ PAGE_SIZE := 65536
INITIAL_MEMORY_BYTES := $(shell expr $(INITIAL_MEMORY_PAGES) \* $(PAGE_SIZE))
MAX_MEMORY_BYTES := $(shell expr $(MAX_MEMORY_PAGES) \* $(PAGE_SIZE))
-web/triangle.wasm: $(FILES) ../../wgpu.js ../../../wasm/js/runtime.js
+web/triangle.wasm: $(FILES) ../../wgpu.js ../../../../core/sys/wasm/js/odin.js
odin build . \
-target:js_wasm32 -out:web/triangle.wasm -o:size \
-extra-linker-flags:"--export-table --import-memory --initial-memory=$(INITIAL_MEMORY_BYTES) --max-memory=$(MAX_MEMORY_BYTES)"
cp ../../wgpu.js web/wgpu.js
- cp ../../../wasm/js/runtime.js web/runtime.js
+ cp ../../../../core/sys/wasm/js/odin.js web/odin.js
diff --git a/vendor/wgpu/examples/glfw/build.bat b/vendor/wgpu/examples/glfw/build.bat
index 61afcbe66..b71d4344a 100644
--- a/vendor/wgpu/examples/glfw/build.bat
+++ b/vendor/wgpu/examples/glfw/build.bat
@@ -9,4 +9,4 @@ set /a MAX_MEMORY_BYTES=%MAX_MEMORY_PAGES% * %PAGE_SIZE%
call odin.exe build . -target:js_wasm32 -out:web/triangle.wasm -o:size -extra-linker-flags:"--export-table --import-memory --initial-memory=%INITIAL_MEMORY_BYTES% --max-memory=%MAX_MEMORY_BYTES%"
copy "..\..\wgpu.js" "web\wgpu.js"
-copy "..\..\..\wasm\js\runtime.js" "web\runtime.js" \ No newline at end of file
+copy "..\..\..\..\core\sys\wasm\js\odin.js" "web\odin.js"
diff --git a/vendor/wgpu/examples/glfw/os_js.odin b/vendor/wgpu/examples/glfw/os_js.odin
index 9634f4afe..68f9ef672 100644
--- a/vendor/wgpu/examples/glfw/os_js.odin
+++ b/vendor/wgpu/examples/glfw/os_js.odin
@@ -1,7 +1,8 @@
package vendor_wgpu_example_triangle
+import "core:sys/wasm/js"
+
import "vendor:wgpu"
-import "vendor:wasm/js"
OS :: struct {
initialized: bool,
diff --git a/vendor/wgpu/examples/glfw/web/index.html b/vendor/wgpu/examples/glfw/web/index.html
index 61872e35a..a509cafbd 100644
--- a/vendor/wgpu/examples/glfw/web/index.html
+++ b/vendor/wgpu/examples/glfw/web/index.html
@@ -8,7 +8,7 @@
<body id="body" style="height: 100%; padding: 0; margin: 0; overflow: hidden;">
<canvas id="wgpu-canvas"></canvas>
- <script type="text/javascript" src="runtime.js"></script>
+ <script type="text/javascript" src="odin.js"></script>
<script type="text/javascript" src="wgpu.js"></script>
<script type="text/javascript">
const mem = new WebAssembly.Memory({ initial: 2000, maximum: 65536, shared: false });
diff --git a/vendor/wgpu/examples/sdl2/Makefile b/vendor/wgpu/examples/sdl2/Makefile
index fdecdbb91..022bfcbbc 100644
--- a/vendor/wgpu/examples/sdl2/Makefile
+++ b/vendor/wgpu/examples/sdl2/Makefile
@@ -8,10 +8,10 @@ PAGE_SIZE := 65536
INITIAL_MEMORY_BYTES := $(shell expr $(INITIAL_MEMORY_PAGES) \* $(PAGE_SIZE))
MAX_MEMORY_BYTES := $(shell expr $(MAX_MEMORY_PAGES) \* $(PAGE_SIZE))
-web/triangle.wasm: $(FILES) ../../wgpu.js ../../../wasm/js/runtime.js
+web/triangle.wasm: $(FILES) ../../wgpu.js ../../../../core/sys/wasm/js/odin.js
odin build . \
-target:js_wasm32 -out:web/triangle.wasm -o:size \
-extra-linker-flags:"--export-table --import-memory --initial-memory=$(INITIAL_MEMORY_BYTES) --max-memory=$(MAX_MEMORY_BYTES)"
cp ../../wgpu.js web/wgpu.js
- cp ../../../wasm/js/runtime.js web/runtime.js
+ cp ../../../../core/sys/wasm/js/odin.js web/odin.js
diff --git a/vendor/wgpu/examples/sdl2/build.bat b/vendor/wgpu/examples/sdl2/build.bat
index 61afcbe66..b71d4344a 100644
--- a/vendor/wgpu/examples/sdl2/build.bat
+++ b/vendor/wgpu/examples/sdl2/build.bat
@@ -9,4 +9,4 @@ set /a MAX_MEMORY_BYTES=%MAX_MEMORY_PAGES% * %PAGE_SIZE%
call odin.exe build . -target:js_wasm32 -out:web/triangle.wasm -o:size -extra-linker-flags:"--export-table --import-memory --initial-memory=%INITIAL_MEMORY_BYTES% --max-memory=%MAX_MEMORY_BYTES%"
copy "..\..\wgpu.js" "web\wgpu.js"
-copy "..\..\..\wasm\js\runtime.js" "web\runtime.js" \ No newline at end of file
+copy "..\..\..\..\core\sys\wasm\js\odin.js" "web\odin.js"
diff --git a/vendor/wgpu/examples/sdl2/os_js.odin b/vendor/wgpu/examples/sdl2/os_js.odin
index 9634f4afe..68f9ef672 100644
--- a/vendor/wgpu/examples/sdl2/os_js.odin
+++ b/vendor/wgpu/examples/sdl2/os_js.odin
@@ -1,7 +1,8 @@
package vendor_wgpu_example_triangle
+import "core:sys/wasm/js"
+
import "vendor:wgpu"
-import "vendor:wasm/js"
OS :: struct {
initialized: bool,
diff --git a/vendor/wgpu/examples/sdl2/web/index.html b/vendor/wgpu/examples/sdl2/web/index.html
index 61872e35a..a509cafbd 100644
--- a/vendor/wgpu/examples/sdl2/web/index.html
+++ b/vendor/wgpu/examples/sdl2/web/index.html
@@ -8,7 +8,7 @@
<body id="body" style="height: 100%; padding: 0; margin: 0; overflow: hidden;">
<canvas id="wgpu-canvas"></canvas>
- <script type="text/javascript" src="runtime.js"></script>
+ <script type="text/javascript" src="odin.js"></script>
<script type="text/javascript" src="wgpu.js"></script>
<script type="text/javascript">
const mem = new WebAssembly.Memory({ initial: 2000, maximum: 65536, shared: false });
diff --git a/vendor/wgpu/wgpu.js b/vendor/wgpu/wgpu.js
index c100808e3..115a90062 100644
--- a/vendor/wgpu/wgpu.js
+++ b/vendor/wgpu/wgpu.js
@@ -2452,6 +2452,16 @@ class WebGPUInterface {
/**
* @param {number} renderPassEncoderIdx
+ * @param {number} colorPtr
+ */
+ wgpuRenderPassEncoderSetBlendConstant: (renderPassEncoderIdx, colorPtr) => {
+ const renderPassEncoder = this.renderPassEncoders.get(renderPassEncoderIdx);
+ this.assert(colorPtr != 0);
+ renderPassEncoder.setBlendConstant(this.Color(colorPtr));
+ },
+
+ /**
+ * @param {number} renderPassEncoderIdx
* @param {number} bufferIdx
* @param {number} formatInt
* @param {BigInt} offset
diff --git a/vendor/wgpu/wgpu.odin b/vendor/wgpu/wgpu.odin
index ae4649aed..9854475a9 100644
--- a/vendor/wgpu/wgpu.odin
+++ b/vendor/wgpu/wgpu.odin
@@ -1299,7 +1299,8 @@ RenderPipelineDescriptor :: struct {
@(link_prefix="wgpu", default_calling_convention="c")
foreign libwgpu {
- CreateInstance :: proc(/* NULLABLE */ descriptor: /* const */ ^InstanceDescriptor = nil) -> Instance ---
+ @(link_name="wgpuCreateInstance")
+ RawCreateInstance :: proc(/* NULLABLE */ descriptor: /* const */ ^InstanceDescriptor = nil) -> Instance ---
GetProcAddress :: proc(device: Device, procName: cstring) -> Proc ---
// Methods of Adapter
@@ -1546,6 +1547,16 @@ foreign libwgpu {
TextureViewRelease :: proc(textureView: TextureView) ---
}
+// Wrappers of Instance
+
+CreateInstance :: proc "c" (/* NULLABLE */ descriptor: /* const */ ^InstanceDescriptor = nil) -> Instance {
+ when ODIN_OS != .JS {
+ wgpu_native_version_check()
+ }
+
+ return RawCreateInstance(descriptor)
+}
+
// Wrappers of Adapter
AdapterEnumerateFeatures :: proc(adapter: Adapter, allocator := context.allocator) -> []FeatureName {
@@ -1555,49 +1566,49 @@ AdapterEnumerateFeatures :: proc(adapter: Adapter, allocator := context.allocato
return features
}
-AdapterGetLimits :: proc(adapter: Adapter) -> (limits: SupportedLimits, ok: bool) {
+AdapterGetLimits :: proc "c" (adapter: Adapter) -> (limits: SupportedLimits, ok: bool) {
ok = bool(RawAdapterGetLimits(adapter, &limits))
return
}
-AdapterGetInfo :: proc(adapter: Adapter) -> (info: AdapterInfo) {
+AdapterGetInfo :: proc "c" (adapter: Adapter) -> (info: AdapterInfo) {
RawAdapterGetInfo(adapter, &info)
return
}
// Wrappers of Buffer
-BufferGetConstMappedRange :: proc(buffer: Buffer, offset: uint, size: uint) -> []byte {
+BufferGetConstMappedRange :: proc "c" (buffer: Buffer, offset: uint, size: uint) -> []byte {
return ([^]byte)(RawBufferGetConstMappedRange(buffer, offset, size))[:size]
}
-BufferGetConstMappedRangeTyped :: proc(buffer: Buffer, offset: uint, $T: typeid) -> ^T
+BufferGetConstMappedRangeTyped :: proc "c" (buffer: Buffer, offset: uint, $T: typeid) -> ^T
where !intrinsics.type_is_sliceable(T) {
return (^T)(RawBufferGetConstMappedRange(buffer, 0, size_of(T)))
}
-BufferGetConstMappedRangeSlice :: proc(buffer: Buffer, offset: uint, length: uint, $T: typeid) -> []T {
+BufferGetConstMappedRangeSlice :: proc "c" (buffer: Buffer, offset: uint, length: uint, $T: typeid) -> []T {
return ([^]T)(RawBufferGetConstMappedRange(buffer, offset, size_of(T)*length))[:length]
}
-BufferGetMappedRange :: proc(buffer: Buffer, offset: uint, size: uint) -> []byte {
+BufferGetMappedRange :: proc "c" (buffer: Buffer, offset: uint, size: uint) -> []byte {
return ([^]byte)(RawBufferGetMappedRange(buffer, offset, size))[:size]
}
-BufferGetMappedRangeTyped :: proc(buffer: Buffer, offset: uint, $T: typeid) -> ^T
+BufferGetMappedRangeTyped :: proc "c" (buffer: Buffer, offset: uint, $T: typeid) -> ^T
where !intrinsics.type_is_sliceable(T) {
return (^T)(RawBufferGetMappedRange(buffer, offset, size_of(T)))
}
-BufferGetMappedRangeSlice :: proc(buffer: Buffer, offset: uint, $T: typeid, length: uint) -> []T {
+BufferGetMappedRangeSlice :: proc "c" (buffer: Buffer, offset: uint, $T: typeid, length: uint) -> []T {
return ([^]T)(RawBufferGetMappedRange(buffer, offset, size_of(T)*length))[:length]
}
// Wrappers of ComputePassEncoder
-ComputePassEncoderSetBindGroup :: proc(computePassEncoder: ComputePassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsets: []u32 = nil) {
+ComputePassEncoderSetBindGroup :: proc "c" (computePassEncoder: ComputePassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsets: []u32 = nil) {
RawComputePassEncoderSetBindGroup(computePassEncoder, groupIndex, group, len(dynamicOffsets), raw_data(dynamicOffsets))
}
@@ -1610,7 +1621,7 @@ DeviceEnumerateFeatures :: proc(device: Device, allocator := context.allocator)
return features
}
-DeviceGetLimits :: proc(device: Device) -> (limits: SupportedLimits, ok: bool) {
+DeviceGetLimits :: proc "c" (device: Device) -> (limits: SupportedLimits, ok: bool) {
ok = bool(RawDeviceGetLimits(device, &limits))
return
}
@@ -1620,7 +1631,7 @@ BufferWithDataDescriptor :: struct {
usage: BufferUsageFlags,
}
-DeviceCreateBufferWithDataSlice :: proc(device: Device, descriptor: /* const */ ^BufferWithDataDescriptor, data: []$T) -> (buf: Buffer) {
+DeviceCreateBufferWithDataSlice :: proc "c" (device: Device, descriptor: /* const */ ^BufferWithDataDescriptor, data: []$T) -> (buf: Buffer) {
size := u64(size_of(T) * len(data))
buf = DeviceCreateBuffer(device, &{
label = descriptor.label,
@@ -1636,7 +1647,7 @@ DeviceCreateBufferWithDataSlice :: proc(device: Device, descriptor: /* const */
return
}
-DeviceCreateBufferWithDataTyped :: proc(device: Device, descriptor: /* const */ ^BufferWithDataDescriptor, data: $T) -> (buf: Buffer)
+DeviceCreateBufferWithDataTyped :: proc "c" (device: Device, descriptor: /* const */ ^BufferWithDataDescriptor, data: $T) -> (buf: Buffer)
where !intrinsics.type_is_sliceable(T) {
buf = DeviceCreateBuffer(device, &{
@@ -1660,34 +1671,34 @@ DeviceCreateBufferWithData :: proc {
// Wrappers of Queue
-QueueSubmit :: proc(queue: Queue, commands: []CommandBuffer) {
+QueueSubmit :: proc "c" (queue: Queue, commands: []CommandBuffer) {
RawQueueSubmit(queue, len(commands), raw_data(commands))
}
// Wrappers of RenderBundleEncoder
-RenderBundleEncoderSetBindGroup :: proc(renderBundleEncoder: RenderBundleEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsets: []u32 = nil) {
+RenderBundleEncoderSetBindGroup :: proc "c" (renderBundleEncoder: RenderBundleEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsets: []u32 = nil) {
RawRenderBundleEncoderSetBindGroup(renderBundleEncoder, groupIndex, group, len(dynamicOffsets), raw_data(dynamicOffsets))
}
// Wrappers of RenderPassEncoder
-RenderPassEncoderExecuteBundles :: proc(renderPassEncoder: RenderPassEncoder, bundles: []RenderBundle) {
+RenderPassEncoderExecuteBundles :: proc "c" (renderPassEncoder: RenderPassEncoder, bundles: []RenderBundle) {
RawRenderPassEncoderExecuteBundles(renderPassEncoder, len(bundles), raw_data(bundles))
}
-RenderPassEncoderSetBindGroup :: proc(renderPassEncoder: RenderPassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsets: []u32 = nil) {
+RenderPassEncoderSetBindGroup :: proc "c" (renderPassEncoder: RenderPassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsets: []u32 = nil) {
RawRenderPassEncoderSetBindGroup(renderPassEncoder, groupIndex, group, len(dynamicOffsets), raw_data(dynamicOffsets))
}
// Wrappers of Surface
-SurfaceGetCapabilities :: proc(surface: Surface, adapter: Adapter) -> (capabilities: SurfaceCapabilities) {
+SurfaceGetCapabilities :: proc "c" (surface: Surface, adapter: Adapter) -> (capabilities: SurfaceCapabilities) {
RawSurfaceGetCapabilities(surface, adapter, &capabilities)
return
}
-SurfaceGetCurrentTexture :: proc(surface: Surface) -> (surface_texture: SurfaceTexture) {
+SurfaceGetCurrentTexture :: proc "c" (surface: Surface) -> (surface_texture: SurfaceTexture) {
RawSurfaceGetCurrentTexture(surface, &surface_texture)
return
}
@@ -1698,8 +1709,8 @@ BINDINGS_VERSION :: [4]u8{22, 1, 0, 1}
BINDINGS_VERSION_STRING :: "22.1.0.1"
when ODIN_OS != .JS {
- @(private="file", init)
- wgpu_native_version_check :: proc() {
+ @(private="file")
+ wgpu_native_version_check :: proc "c" () {
v := (transmute([4]u8)GetVersion()).wzyx
if v != BINDINGS_VERSION {
@@ -1708,7 +1719,7 @@ when ODIN_OS != .JS {
n += copy(buf[n:], "bindings are for version ")
n += copy(buf[n:], BINDINGS_VERSION_STRING)
n += copy(buf[n:], ", but a different version is linked")
- panic(string(buf[:n]))
+ panic_contextless(string(buf[:n]))
}
}
@@ -1745,7 +1756,7 @@ when ODIN_OS != .JS {
RenderPassEncoderEndPipelineStatisticsQuery :: proc(renderPassEncoder: RenderPassEncoder) ---
}
- GenerateReport :: proc(instance: Instance) -> (report: GlobalReport) {
+ GenerateReport :: proc "c" (instance: Instance) -> (report: GlobalReport) {
RawGenerateReport(instance, &report)
return
}
@@ -1757,7 +1768,7 @@ when ODIN_OS != .JS {
return
}
- QueueSubmitForIndex :: proc(queue: Queue, commands: []CommandBuffer) -> SubmissionIndex {
+ QueueSubmitForIndex :: proc "c" (queue: Queue, commands: []CommandBuffer) -> SubmissionIndex {
return RawQueueSubmitForIndex(queue, len(commands), raw_data(commands))
}
}