aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Kercher <JKercher@JSM.lcl>2022-03-09 17:17:40 -0500
committerJason Kercher <JKercher@JSM.lcl>2022-03-09 17:17:40 -0500
commitd2bc41a2df1612f8b3eb8300413be8b3f8bff895 (patch)
tree8987434f10036be298ce8cb93726b6a43f372dbf
parentbea2f3644325454e7fe0e12313528359d0782843 (diff)
parentdc8d28c383a404d01dcbcb65ba84ff814da9424e (diff)
Merge remote-tracking branch 'upstream/master' into fix_odin_test
-rw-r--r--.github/FUNDING.yml1
-rw-r--r--.github/workflows/ci.yml15
-rw-r--r--.gitignore2
-rw-r--r--Makefile24
-rw-r--r--core/c/libc/errno.odin13
-rw-r--r--core/c/libc/stdio.odin25
-rw-r--r--core/c/libc/time.odin9
-rw-r--r--core/c/libc/wctype.odin5
-rw-r--r--core/compress/common.odin10
-rw-r--r--core/compress/gzip/gzip.odin4
-rw-r--r--core/compress/zlib/zlib.odin2
-rw-r--r--core/container/bit_array/bit_array.odin29
-rw-r--r--core/container/bit_array/doc.odin13
-rw-r--r--core/crypto/rand_generic.odin2
-rw-r--r--core/crypto/rand_openbsd.odin12
-rw-r--r--core/crypto/rand_windows.odin23
-rw-r--r--core/crypto/siphash/siphash.odin335
-rw-r--r--core/dynlib/lib_unix.odin2
-rw-r--r--core/encoding/varint/doc.odin27
-rw-r--r--core/encoding/varint/leb128.odin139
-rw-r--r--core/fmt/fmt.odin434
-rw-r--r--core/intrinsics/intrinsics.odin2
-rw-r--r--core/mem/doc.odin26
-rw-r--r--core/mem/virtual/virtual.odin54
-rw-r--r--core/mem/virtual/virtual_linux.odin10
-rw-r--r--core/mem/virtual/virtual_platform.odin26
-rw-r--r--core/mem/virtual/virtual_windows.odin10
-rw-r--r--core/odin/ast/ast.odin177
-rw-r--r--core/odin/ast/clone.odin200
-rw-r--r--core/odin/ast/walk.odin154
-rw-r--r--core/odin/parser/parser.odin180
-rw-r--r--core/odin/printer/visit.odin210
-rw-r--r--core/os/dir_openbsd.odin71
-rw-r--r--core/os/file_windows.odin23
-rw-r--r--core/os/os_darwin.odin14
-rw-r--r--core/os/os_freebsd.odin568
-rw-r--r--core/os/os_linux.odin40
-rw-r--r--core/os/os_openbsd.odin707
-rw-r--r--core/os/os_wasi.odin2
-rw-r--r--core/os/os_windows.odin2
-rw-r--r--core/os/stat_unix.odin2
-rw-r--r--core/os/stat_windows.odin43
-rw-r--r--core/path/filepath/path.odin5
-rw-r--r--core/path/filepath/path_unix.odin7
-rw-r--r--core/reflect/reflect.odin14
-rw-r--r--core/reflect/types.odin8
-rw-r--r--core/runtime/core.odin6
-rw-r--r--core/runtime/entry_unix.odin2
-rw-r--r--core/slice/slice.odin101
-rw-r--r--core/strconv/strconv.odin1
-rw-r--r--core/strings/strings.odin19
-rw-r--r--core/sync/channel_unix.odin2
-rw-r--r--core/sync/sync2/futex_openbsd.odin78
-rw-r--r--core/sync/sync2/primitives_openbsd.odin9
-rw-r--r--core/sync/sync2/primitives_pthreads.odin2
-rw-r--r--core/sync/sync_openbsd.odin36
-rw-r--r--core/sync/sync_unix.odin2
-rw-r--r--core/sys/darwin/xnu_system_call_helpers.odin30
-rw-r--r--core/sys/unix/pthread_openbsd.odin65
-rw-r--r--core/sys/unix/pthread_unix.odin2
-rw-r--r--core/sys/win32/user32.odin3
-rw-r--r--core/sys/windows/types.odin3
-rw-r--r--core/thread/thread_unix.odin2
-rw-r--r--core/time/time_unix.odin34
-rw-r--r--examples/all/all_vendor.odin21
-rw-r--r--examples/all/all_vendor_directx.odin10
-rw-r--r--examples/all/all_vendor_stl.odin15
-rw-r--r--examples/demo/demo.odin20
-rw-r--r--src/array.cpp4
-rw-r--r--src/bug_report.cpp27
-rw-r--r--src/build_settings.cpp69
-rw-r--r--src/check_builtin.cpp74
-rw-r--r--src/check_decl.cpp4
-rw-r--r--src/check_expr.cpp75
-rw-r--r--src/check_type.cpp18
-rw-r--r--src/checker.cpp20
-rw-r--r--src/checker_builtin_procs.hpp6
-rw-r--r--src/common.cpp4
-rw-r--r--src/common_memory.cpp19
-rw-r--r--src/entity.cpp5
-rw-r--r--src/exact_value.cpp21
-rw-r--r--src/gb/gb.h89
-rw-r--r--src/llvm_backend.cpp5
-rw-r--r--src/llvm_backend_debug.cpp2
-rw-r--r--src/llvm_backend_expr.cpp15
-rw-r--r--src/llvm_backend_proc.cpp84
-rw-r--r--src/llvm_backend_utility.cpp2
-rw-r--r--src/main.cpp100
-rw-r--r--src/parser.cpp129
-rw-r--r--src/parser.hpp10
-rw-r--r--src/threading.cpp2
-rw-r--r--src/types.cpp60
-rw-r--r--tests/core/Makefile8
-rw-r--r--tests/core/build.bat3
-rw-r--r--tests/core/compress/test_core_compress.odin7
-rw-r--r--tests/core/crypto/test_core_crypto.odin1745
-rw-r--r--tests/core/crypto_hashbin0 -> 621648 bytes
-rw-r--r--tests/core/encoding/json/test_core_json.odin (renamed from tests/core/encoding/test_core_json.odin)40
-rw-r--r--tests/core/encoding/varint/test_core_varint.odin156
-rw-r--r--tests/core/hash/test_core_hash.odin8
-rw-r--r--tests/core/image/test_core_image.odin33
-rw-r--r--tests/core/math/noise/test_core_math_noise.odin34
-rw-r--r--tests/core/odin/test_parser.odin44
-rw-r--r--tests/core/strings/test_core_strings.odin64
-rw-r--r--tests/vendor/Makefile9
-rw-r--r--tests/vendor/botan/test_vendor_botan.odin47
-rw-r--r--tests/vendor/glfw/test_vendor_glfw.odin4
-rw-r--r--vendor/ENet/unix.odin6
-rw-r--r--vendor/botan/bindings/botan.odin10
-rw-r--r--vendor/botan/blake2b/blake2b.odin2
-rw-r--r--vendor/botan/gost/gost.odin2
-rw-r--r--vendor/botan/keccak/keccak.odin2
-rw-r--r--vendor/botan/md4/md4.odin2
-rw-r--r--vendor/botan/md5/md5.odin2
-rw-r--r--vendor/botan/ripemd/ripemd.odin2
-rw-r--r--vendor/botan/sha1/sha1.odin2
-rw-r--r--vendor/botan/sha2/sha2.odin8
-rw-r--r--vendor/botan/sha3/sha3.odin8
-rw-r--r--vendor/botan/shake/shake.odin4
-rw-r--r--vendor/botan/siphash/siphash.odin253
-rw-r--r--vendor/botan/skein512/skein512.odin6
-rw-r--r--vendor/botan/sm3/sm3.odin2
-rw-r--r--vendor/botan/streebog/streebog.odin4
-rw-r--r--vendor/botan/tiger/tiger.odin6
-rw-r--r--vendor/botan/whirlpool/whirlpool.odin2
-rw-r--r--vendor/darwin/Foundation/NSArray.odin1
-rw-r--r--vendor/darwin/Foundation/NSAutoreleasePool.odin1
-rw-r--r--vendor/darwin/Foundation/NSBundle.odin1
-rw-r--r--vendor/darwin/Foundation/NSData.odin1
-rw-r--r--vendor/darwin/Foundation/NSDate.odin1
-rw-r--r--vendor/darwin/Foundation/NSDictionary.odin1
-rw-r--r--vendor/darwin/Foundation/NSEnumerator.odin1
-rw-r--r--vendor/darwin/Foundation/NSError.odin1
-rw-r--r--vendor/darwin/Foundation/NSLock.odin1
-rw-r--r--vendor/darwin/Foundation/NSNotification.odin1
-rw-r--r--vendor/darwin/Foundation/NSNumber.odin10
-rw-r--r--vendor/darwin/Foundation/NSObject.odin1
-rw-r--r--vendor/darwin/Foundation/NSRange.odin1
-rw-r--r--vendor/darwin/Foundation/NSString.odin1
-rw-r--r--vendor/darwin/Foundation/NSTypes.odin1
-rw-r--r--vendor/darwin/Foundation/NSURL.odin1
-rw-r--r--vendor/darwin/Foundation/NSWindow.odin1
-rw-r--r--vendor/darwin/Metal/MetalClasses.odin41
-rw-r--r--vendor/darwin/Metal/MetalEnums.odin3
-rw-r--r--vendor/darwin/Metal/MetalErrors.odin1
-rw-r--r--vendor/darwin/Metal/MetalProcedures.odin1
-rw-r--r--vendor/darwin/Metal/MetalTypes.odin1
-rw-r--r--vendor/darwin/QuartzCore/QuartzCore.odin1
-rw-r--r--vendor/directx/d3d11/d3d11.odin3627
-rw-r--r--vendor/directx/d3d12/d3d12.odin5102
-rw-r--r--vendor/directx/d3d12/d3d12_constants.odin531
-rw-r--r--vendor/directx/d3d_compiler/d3d_compiler.odin228
-rw-r--r--vendor/directx/d3d_compiler/d3dcompiler_47.dllbin0 -> 4410176 bytes
-rw-r--r--vendor/directx/d3d_compiler/d3dcompiler_47.libbin0 -> 8512 bytes
-rw-r--r--vendor/directx/dxgi/dxgi.odin1141
-rw-r--r--vendor/glfw/bindings/bindings.odin7
-rw-r--r--vendor/miniaudio/common.odin9
-rw-r--r--vendor/miniaudio/data_conversion.odin10
-rw-r--r--vendor/miniaudio/decoding.odin13
-rw-r--r--vendor/miniaudio/device_io_procs.odin9
-rw-r--r--vendor/miniaudio/device_io_types.odin8
-rw-r--r--vendor/miniaudio/encoding.odin11
-rw-r--r--vendor/miniaudio/filtering.odin9
-rw-r--r--vendor/miniaudio/generation.odin11
-rw-r--r--vendor/miniaudio/logging.odin11
-rw-r--r--vendor/miniaudio/src/Makefile6
-rw-r--r--vendor/miniaudio/utilities.odin11
-rw-r--r--vendor/miniaudio/vfs.odin9
-rw-r--r--vendor/portmidi/portmidi.odin4
-rw-r--r--vendor/portmidi/util.odin8
-rw-r--r--vendor/raylib/raylib.odin12
-rw-r--r--vendor/raylib/rlgl.odin10
-rw-r--r--vendor/sdl2/image/sdl_image.odin11
-rw-r--r--vendor/sdl2/mixer/sdl_mixer.odin10
-rw-r--r--vendor/sdl2/net/sdl_net.odin11
-rw-r--r--vendor/sdl2/sdl2.odin11
-rw-r--r--vendor/sdl2/sdl_audio.odin9
-rw-r--r--vendor/sdl2/sdl_blendmode.odin11
-rw-r--r--vendor/sdl2/sdl_cpuinfo.odin11
-rw-r--r--vendor/sdl2/sdl_events.odin11
-rw-r--r--vendor/sdl2/sdl_gamecontroller.odin9
-rw-r--r--vendor/sdl2/sdl_gesture_haptic.odin11
-rw-r--r--vendor/sdl2/sdl_hints.odin11
-rw-r--r--vendor/sdl2/sdl_joystick.odin11
-rw-r--r--vendor/sdl2/sdl_keyboard.odin9
-rw-r--r--vendor/sdl2/sdl_keycode.odin2
-rw-r--r--vendor/sdl2/sdl_log.odin11
-rw-r--r--vendor/sdl2/sdl_messagebox.odin9
-rw-r--r--vendor/sdl2/sdl_metal.odin11
-rw-r--r--vendor/sdl2/sdl_mouse.odin11
-rw-r--r--vendor/sdl2/sdl_mutex.odin11
-rw-r--r--vendor/sdl2/sdl_pixels.odin11
-rw-r--r--vendor/sdl2/sdl_rect.odin11
-rw-r--r--vendor/sdl2/sdl_render.odin11
-rw-r--r--vendor/sdl2/sdl_rwops.odin11
-rw-r--r--vendor/sdl2/sdl_scancode.odin2
-rw-r--r--vendor/sdl2/sdl_stdinc.odin11
-rw-r--r--vendor/sdl2/sdl_surface.odin11
-rw-r--r--vendor/sdl2/sdl_system.odin11
-rw-r--r--vendor/sdl2/sdl_syswm.odin11
-rw-r--r--vendor/sdl2/sdl_thread.odin9
-rw-r--r--vendor/sdl2/sdl_timer.odin11
-rw-r--r--vendor/sdl2/sdl_touch.odin11
-rw-r--r--vendor/sdl2/sdl_video.odin11
-rw-r--r--vendor/sdl2/sdl_vulkan.odin11
-rw-r--r--vendor/sdl2/ttf/sdl_ttf.odin11
-rw-r--r--vendor/stb/image/stb_image.odin5
-rw-r--r--vendor/stb/src/Makefile26
-rw-r--r--vendor/vulkan/_gen/create_vulkan_odin_wrapper.py139
-rw-r--r--vendor/vulkan/procedures.odin4149
210 files changed, 19214 insertions, 3824 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 89b7ffa10..885612f13 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,3 +1,4 @@
# These are supported funding model platforms
+github: odin-lang
patreon: gingerbill
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c62fcd36b..412587b3c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -38,6 +38,12 @@ jobs:
cd tests/vendor
make
timeout-minutes: 10
+ - name: Odin check examples/all for Linux i386
+ run: ./odin check examples/all -vet -strict-style -target:linux_i386
+ timeout-minutes: 10
+ - name: Odin check examples/all for OpenBSD amd64
+ run: ./odin check examples/all -vet -strict-style -target:openbsd_amd64
+ timeout-minutes: 10
build_macOS:
runs-on: macos-latest
steps:
@@ -78,6 +84,9 @@ jobs:
cd tests/vendor
make
timeout-minutes: 10
+ - name: Odin check examples/all for Darwin arm64
+ run: ./odin check examples/all -vet -strict-style -target:darwin_arm64
+ timeout-minutes: 10
build_windows:
runs-on: windows-2019
steps:
@@ -138,3 +147,9 @@ jobs:
cd tests\core\math\big
call build.bat
timeout-minutes: 10
+ - name: Odin check examples/all for Windows 32bits
+ shell: cmd
+ run: |
+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
+ odin check examples/all -strict-style -target:windows_i386
+ timeout-minutes: 10
diff --git a/.gitignore b/.gitignore
index abbdccecd..e8b3d3050 100644
--- a/.gitignore
+++ b/.gitignore
@@ -279,3 +279,5 @@ shared/
*.ll
*.sublime-workspace
+examples/bug/
+build.sh
diff --git a/Makefile b/Makefile
index d3d3c6a2d..ceff3c207 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
GIT_SHA=$(shell git rev-parse --short HEAD)
DISABLED_WARNINGS=-Wno-switch -Wno-macro-redefined -Wno-unused-value
-LDFLAGS=-pthread -ldl -lm -lstdc++
+LDFLAGS=-pthread -lm -lstdc++
CFLAGS=-std=c++14 -DGIT_SHA=\"$(GIT_SHA)\"
CFLAGS:=$(CFLAGS) -DODIN_VERSION_RAW=\"dev-$(shell date +"%Y-%m")\"
CC=clang
@@ -8,9 +8,9 @@ CC=clang
OS=$(shell uname)
ifeq ($(OS), Darwin)
-
+
ARCH=$(shell uname -m)
- LLVM_CONFIG=
+ LLVM_CONFIG=llvm-config
# allow for arm only llvm's with version 13
ifeq ($(ARCH), arm64)
@@ -27,9 +27,7 @@ ifeq ($(OS), Darwin)
LLMV_VERSION_PATTERN_REMOVE_SINGLE_STR = $(subst ",,$(LLVM_VERSION_PATTERN_REMOVE_ELEMENTS))
LLVM_VERSION_PATTERN = "^(($(LLMV_VERSION_PATTERN_REMOVE_SINGLE_STR)))"
- ifneq ($(shell llvm-config --version | grep -E $(LLVM_VERSION_PATTERN)),)
- LLVM_CONFIG=llvm-config
- else
+ ifeq ($(shell $(LLVM_CONFIG) --version | grep -E $(LLVM_VERSION_PATTERN)),)
ifeq ($(ARCH), arm64)
$(error "Requirement: llvm-config must be base version 13 for arm64")
else
@@ -37,7 +35,7 @@ ifeq ($(OS), Darwin)
endif
endif
- LDFLAGS:=$(LDFLAGS) -liconv
+ LDFLAGS:=$(LDFLAGS) -liconv -ldl
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
LDFLAGS:=$(LDFLAGS) -lLLVM-C
endif
@@ -48,13 +46,19 @@ ifeq ($(OS), Linux)
else ifneq ($(shell which llvm-config-11-64 2>/dev/null),)
LLVM_CONFIG=llvm-config-11-64
else
- ifneq ($(shell llvm-config --version | grep '^11\.'),)
- LLVM_CONFIG=llvm-config
- else
+ ifeq ($(shell $(LLVM_CONFIG) --version | grep '^11\.'),)
$(error "Requirement: llvm-config must be version 11")
endif
endif
+ LDFLAGS:=$(LDFLAGS) -ldl
+ CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
+ LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
+endif
+ifeq ($(OS), OpenBSD)
+ LLVM_CONFIG=/usr/local/bin/llvm-config
+
+ LDFLAGS:=$(LDFLAGS) -liconv
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
endif
diff --git a/core/c/libc/errno.odin b/core/c/libc/errno.odin
index ecde6af59..53437f42f 100644
--- a/core/c/libc/errno.odin
+++ b/core/c/libc/errno.odin
@@ -27,6 +27,19 @@ when ODIN_OS == .Linux || ODIN_OS == .FreeBSD {
ERANGE :: 34
}
+when ODIN_OS == .OpenBSD {
+ @(private="file")
+ @(default_calling_convention="c")
+ foreign libc {
+ @(link_name="__errno")
+ _get_errno :: proc() -> ^int ---
+ }
+
+ EDOM :: 33
+ EILSEQ :: 84
+ ERANGE :: 34
+}
+
when ODIN_OS == .Windows {
@(private="file")
@(default_calling_convention="c")
diff --git a/core/c/libc/stdio.odin b/core/c/libc/stdio.odin
index 9c4a1a708..fc65b954a 100644
--- a/core/c/libc/stdio.odin
+++ b/core/c/libc/stdio.odin
@@ -78,6 +78,31 @@ when ODIN_OS == .Linux {
}
}
+when ODIN_OS == .OpenBSD {
+ fpos_t :: i64
+
+ _IOFBF :: 0
+ _IOLBF :: 1
+ _IONBF :: 1
+
+ BUFSIZ :: 1024
+
+ EOF :: int(-1)
+
+ FOPEN_MAX :: 20
+ FILENAME_MAX :: 1024
+
+ SEEK_SET :: 0
+ SEEK_CUR :: 1
+ SEEK_END :: 2
+
+ foreign libc {
+ stderr: ^FILE
+ stdin: ^FILE
+ stdout: ^FILE
+ }
+}
+
when ODIN_OS == .Darwin {
fpos_t :: distinct i64
diff --git a/core/c/libc/time.odin b/core/c/libc/time.odin
index b3539a227..b337e139a 100644
--- a/core/c/libc/time.odin
+++ b/core/c/libc/time.odin
@@ -45,7 +45,7 @@ when ODIN_OS == .Windows {
}
}
-when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .Darwin {
+when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .Darwin || ODIN_OS == .OpenBSD {
@(default_calling_convention="c")
foreign libc {
// 7.27.2 Time manipulation functions
@@ -63,7 +63,12 @@ when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .Darwin {
strftime :: proc(s: [^]char, maxsize: size_t, format: cstring, timeptr: ^tm) -> size_t ---
}
- CLOCKS_PER_SEC :: 1000000
+ when ODIN_OS == .OpenBSD {
+ CLOCKS_PER_SEC :: 100
+ } else {
+ CLOCKS_PER_SEC :: 1000000
+ }
+
TIME_UTC :: 1
time_t :: distinct i64
diff --git a/core/c/libc/wctype.odin b/core/c/libc/wctype.odin
index 942726ba6..f833af51f 100644
--- a/core/c/libc/wctype.odin
+++ b/core/c/libc/wctype.odin
@@ -25,6 +25,11 @@ when ODIN_OS == .Darwin {
wctype_t :: distinct u32
}
+when ODIN_OS == .OpenBSD {
+ wctrans_t :: distinct rawptr
+ wctype_t :: distinct rawptr
+}
+
@(default_calling_convention="c")
foreign libc {
// 7.30.2.1 Wide character classification functions
diff --git a/core/compress/common.odin b/core/compress/common.odin
index 5f5ef2413..fb0f74e95 100644
--- a/core/compress/common.odin
+++ b/core/compress/common.odin
@@ -139,7 +139,13 @@ Context_Memory_Input :: struct #packed {
size_packed: i64,
size_unpacked: i64,
}
-#assert(size_of(Context_Memory_Input) == 64)
+when size_of(rawptr) == 8 {
+ #assert(size_of(Context_Memory_Input) == 64)
+} else {
+ // e.g. `-target:windows_i386`
+ #assert(size_of(Context_Memory_Input) == 52)
+}
+
Context_Stream_Input :: struct #packed {
input_data: []u8,
@@ -473,4 +479,4 @@ discard_to_next_byte_lsb_from_stream :: proc(z: ^Context_Stream_Input) {
consume_bits_lsb(z, discard)
}
-discard_to_next_byte_lsb :: proc{discard_to_next_byte_lsb_from_memory, discard_to_next_byte_lsb_from_stream}; \ No newline at end of file
+discard_to_next_byte_lsb :: proc{discard_to_next_byte_lsb_from_memory, discard_to_next_byte_lsb_from_stream}
diff --git a/core/compress/gzip/gzip.odin b/core/compress/gzip/gzip.odin
index 96e9c49a0..4482d4a7e 100644
--- a/core/compress/gzip/gzip.odin
+++ b/core/compress/gzip/gzip.odin
@@ -100,7 +100,7 @@ E_GZIP :: compress.GZIP_Error
E_ZLIB :: compress.ZLIB_Error
E_Deflate :: compress.Deflate_Error
-GZIP_MAX_PAYLOAD_SIZE :: int(max(u32le))
+GZIP_MAX_PAYLOAD_SIZE :: i64(max(u32le))
load :: proc{load_from_slice, load_from_file, load_from_context}
@@ -136,7 +136,7 @@ load_from_context :: proc(z: ^$C, buf: ^bytes.Buffer, known_gzip_size := -1, exp
z.output = buf
- if expected_output_size > GZIP_MAX_PAYLOAD_SIZE {
+ if i64(expected_output_size) > i64(GZIP_MAX_PAYLOAD_SIZE) {
return E_GZIP.Payload_Size_Exceeds_Max_Payload
}
diff --git a/core/compress/zlib/zlib.odin b/core/compress/zlib/zlib.odin
index d4c0f332c..d4b770929 100644
--- a/core/compress/zlib/zlib.odin
+++ b/core/compress/zlib/zlib.odin
@@ -677,4 +677,4 @@ inflate_from_byte_array_raw :: proc(input: []u8, buf: ^bytes.Buffer, raw := fals
return inflate_raw(z=&ctx, expected_output_size=expected_output_size)
}
-inflate :: proc{inflate_from_context, inflate_from_byte_array}; \ No newline at end of file
+inflate :: proc{inflate_from_context, inflate_from_byte_array}
diff --git a/core/container/bit_array/bit_array.odin b/core/container/bit_array/bit_array.odin
index 5eebe1bcb..98ef4b542 100644
--- a/core/container/bit_array/bit_array.odin
+++ b/core/container/bit_array/bit_array.odin
@@ -1,6 +1,7 @@
package dynamic_bit_array
import "core:intrinsics"
+import "core:mem"
/*
Note that these constants are dependent on the backing being a u64.
@@ -15,15 +16,16 @@ INDEX_MASK :: 63
NUM_BITS :: 64
Bit_Array :: struct {
- bits: [dynamic]u64,
- bias: int,
- max_index: int,
+ bits: [dynamic]u64,
+ bias: int,
+ max_index: int,
+ free_pointer: bool,
}
Bit_Array_Iterator :: struct {
- array: ^Bit_Array,
+ array: ^Bit_Array,
word_idx: int,
- bit_idx: uint,
+ bit_idx: uint,
}
/*
@@ -186,7 +188,7 @@ set :: proc(ba: ^Bit_Array, #any_int index: uint, allocator := context.allocator
/*
A helper function to create a Bit Array with optional bias, in case your smallest index is non-zero (including negative).
*/
-create :: proc(max_index: int, min_index := 0, allocator := context.allocator) -> (res: Bit_Array, ok: bool) #optional_ok {
+create :: proc(max_index: int, min_index := 0, allocator := context.allocator) -> (res: ^Bit_Array, ok: bool) #optional_ok {
context.allocator = allocator
size_in_bits := max_index - min_index
@@ -194,11 +196,11 @@ create :: proc(max_index: int, min_index := 0, allocator := context.allocator) -
legs := size_in_bits >> INDEX_SHIFT
- res = Bit_Array{
- bias = min_index,
- max_index = max_index,
- }
- return res, resize_if_needed(&res, legs)
+ res = new(Bit_Array)
+ res.bias = min_index
+ res.max_index = max_index
+ res.free_pointer = true
+ return res, resize_if_needed(res, legs)
}
/*
@@ -206,7 +208,7 @@ create :: proc(max_index: int, min_index := 0, allocator := context.allocator) -
*/
clear :: proc(ba: ^Bit_Array) {
if ba == nil { return }
- ba.bits = {}
+ mem.zero_slice(ba.bits[:])
}
/*
@@ -215,6 +217,9 @@ clear :: proc(ba: ^Bit_Array) {
destroy :: proc(ba: ^Bit_Array) {
if ba == nil { return }
delete(ba.bits)
+ if ba.free_pointer { // Only free if this Bit_Array was created using `create`, not when on the stack.
+ free(ba)
+ }
}
/*
diff --git a/core/container/bit_array/doc.odin b/core/container/bit_array/doc.odin
index 91e1362dd..52e252d8a 100644
--- a/core/container/bit_array/doc.odin
+++ b/core/container/bit_array/doc.odin
@@ -21,6 +21,7 @@ package dynamic_bit_array
// returns `false`, `false`, because this Bit Array wasn't created to allow negative indices.
was_set, was_retrieved := get(&bits, -1)
fmt.println(was_set, was_retrieved)
+ destroy(&bits)
}
-- A Bit Array can optionally allow for negative indices, if the mininum value was given during creation:
@@ -40,13 +41,13 @@ package dynamic_bit_array
using bit_array
bits := create(int(max(Foo)), int(min(Foo)))
- defer destroy(&bits)
+ defer destroy(bits)
- fmt.printf("Set(Bar): %v\n", set(&bits, Foo.Bar))
- fmt.printf("Get(Bar): %v, %v\n", get(&bits, Foo.Bar))
- fmt.printf("Set(Negative_Test): %v\n", set(&bits, Foo.Negative_Test))
- fmt.printf("Get(Leaves): %v, %v\n", get(&bits, Foo.Leaves))
- fmt.printf("Get(Negative_Test): %v, %v\n", get(&bits, Foo.Negative_Test))
+ fmt.printf("Set(Bar): %v\n", set(bits, Foo.Bar))
+ fmt.printf("Get(Bar): %v, %v\n", get(bits, Foo.Bar))
+ fmt.printf("Set(Negative_Test): %v\n", set(bits, Foo.Negative_Test))
+ fmt.printf("Get(Leaves): %v, %v\n", get(bits, Foo.Leaves))
+ fmt.printf("Get(Negative_Test): %v, %v\n", get(bits, Foo.Negative_Test))
fmt.printf("Freed.\n")
}
*/ \ No newline at end of file
diff --git a/core/crypto/rand_generic.odin b/core/crypto/rand_generic.odin
index be6987ee2..52abfe4d7 100644
--- a/core/crypto/rand_generic.odin
+++ b/core/crypto/rand_generic.odin
@@ -1,6 +1,6 @@
package crypto
-when ODIN_OS != .Linux {
+when ODIN_OS != .Linux && ODIN_OS != .OpenBSD && ODIN_OS != .Windows {
_rand_bytes :: proc (dst: []byte) {
unimplemented("crypto: rand_bytes not supported on this OS")
}
diff --git a/core/crypto/rand_openbsd.odin b/core/crypto/rand_openbsd.odin
new file mode 100644
index 000000000..bae97e8f0
--- /dev/null
+++ b/core/crypto/rand_openbsd.odin
@@ -0,0 +1,12 @@
+package crypto
+
+import "core:c"
+
+foreign import libc "system:c"
+foreign libc {
+ arc4random_buf :: proc "c" (buf: rawptr, nbytes: c.size_t) ---
+}
+
+_rand_bytes :: proc (dst: []byte) {
+ arc4random_buf(raw_data(dst), len(dst))
+}
diff --git a/core/crypto/rand_windows.odin b/core/crypto/rand_windows.odin
new file mode 100644
index 000000000..53b58c776
--- /dev/null
+++ b/core/crypto/rand_windows.odin
@@ -0,0 +1,23 @@
+package crypto
+
+import win32 "core:sys/windows"
+import "core:os"
+import "core:fmt"
+
+_rand_bytes :: proc(dst: []byte) {
+ ret := (os.Errno)(win32.BCryptGenRandom(nil, raw_data(dst), u32(len(dst)), win32.BCRYPT_USE_SYSTEM_PREFERRED_RNG))
+ if ret != os.ERROR_NONE {
+ switch ret {
+ case os.ERROR_INVALID_HANDLE:
+ // The handle to the first parameter is invalid.
+ // This should not happen here, since we explicitly pass nil to it
+ panic("crypto: BCryptGenRandom Invalid handle for hAlgorithm")
+ case os.ERROR_INVALID_PARAMETER:
+ // One of the parameters was invalid
+ panic("crypto: BCryptGenRandom Invalid parameter")
+ case:
+ // Unknown error
+ panic(fmt.tprintf("crypto: BCryptGenRandom failed: %d\n", ret))
+ }
+ }
+}
diff --git a/core/crypto/siphash/siphash.odin b/core/crypto/siphash/siphash.odin
new file mode 100644
index 000000000..a6c75f315
--- /dev/null
+++ b/core/crypto/siphash/siphash.odin
@@ -0,0 +1,335 @@
+package siphash
+
+/*
+ Copyright 2022 zhibog
+ Made available under the BSD-3 license.
+
+ List of contributors:
+ zhibog: Initial implementation.
+
+ Implementation of the SipHash hashing algorithm, as defined at <https://github.com/veorq/SipHash> and <https://www.aumasson.jp/siphash/siphash.pdf>
+
+ Use the specific procedures for a certain setup. The generic procdedures will default to Siphash 2-4
+*/
+
+import "core:crypto"
+import "core:crypto/util"
+
+/*
+ High level API
+*/
+
+KEY_SIZE :: 16
+DIGEST_SIZE :: 8
+
+// sum_string_1_3 will hash the given message with the key and return
+// the computed hash as a u64
+sum_string_1_3 :: proc(msg, key: string) -> u64 {
+ return sum_bytes_1_3(transmute([]byte)(msg), transmute([]byte)(key))
+}
+
+// sum_bytes_1_3 will hash the given message with the key and return
+// the computed hash as a u64
+sum_bytes_1_3 :: proc (msg, key: []byte) -> u64 {
+ ctx: Context
+ hash: u64
+ init(&ctx, key, 1, 3)
+ update(&ctx, msg)
+ final(&ctx, &hash)
+ return hash
+}
+
+// sum_string_to_buffer_1_3 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_string_to_buffer_1_3 :: proc(msg, key: string, dst: []byte) {
+ sum_bytes_to_buffer_1_3(transmute([]byte)(msg), transmute([]byte)(key), dst)
+}
+
+// sum_bytes_to_buffer_1_3 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_bytes_to_buffer_1_3 :: proc(msg, key, dst: []byte) {
+ assert(len(dst) >= DIGEST_SIZE, "crypto/siphash: Destination buffer needs to be at least of size 8")
+ hash := sum_bytes_1_3(msg, key)
+ _collect_output(dst[:], hash)
+}
+
+sum_1_3 :: proc {
+ sum_string_1_3,
+ sum_bytes_1_3,
+ sum_string_to_buffer_1_3,
+ sum_bytes_to_buffer_1_3,
+}
+
+// verify_u64_1_3 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_u64_1_3 :: proc (tag: u64 msg, key: []byte) -> bool {
+ return sum_bytes_1_3(msg, key) == tag
+}
+
+// verify_bytes will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_bytes_1_3 :: proc (tag, msg, key: []byte) -> bool {
+ derived_tag: [8]byte
+ sum_bytes_to_buffer_1_3(msg, key, derived_tag[:])
+ return crypto.compare_constant_time(derived_tag[:], tag) == 1
+}
+
+verify_1_3 :: proc {
+ verify_bytes_1_3,
+ verify_u64_1_3,
+}
+
+// sum_string_2_4 will hash the given message with the key and return
+// the computed hash as a u64
+sum_string_2_4 :: proc(msg, key: string) -> u64 {
+ return sum_bytes_2_4(transmute([]byte)(msg), transmute([]byte)(key))
+}
+
+// sum_bytes_2_4 will hash the given message with the key and return
+// the computed hash as a u64
+sum_bytes_2_4 :: proc (msg, key: []byte) -> u64 {
+ ctx: Context
+ hash: u64
+ init(&ctx, key, 2, 4)
+ update(&ctx, msg)
+ final(&ctx, &hash)
+ return hash
+}
+
+// sum_string_to_buffer_2_4 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_string_to_buffer_2_4 :: proc(msg, key: string, dst: []byte) {
+ sum_bytes_to_buffer_2_4(transmute([]byte)(msg), transmute([]byte)(key), dst)
+}
+
+// sum_bytes_to_buffer_2_4 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_bytes_to_buffer_2_4 :: proc(msg, key, dst: []byte) {
+ assert(len(dst) >= DIGEST_SIZE, "crypto/siphash: Destination buffer needs to be at least of size 8")
+ hash := sum_bytes_2_4(msg, key)
+ _collect_output(dst[:], hash)
+}
+
+sum_2_4 :: proc {
+ sum_string_2_4,
+ sum_bytes_2_4,
+ sum_string_to_buffer_2_4,
+ sum_bytes_to_buffer_2_4,
+}
+
+sum_string :: sum_string_2_4
+sum_bytes :: sum_bytes_2_4
+sum_string_to_buffer :: sum_string_to_buffer_2_4
+sum_bytes_to_buffer :: sum_bytes_to_buffer_2_4
+sum :: proc {
+ sum_string,
+ sum_bytes,
+ sum_string_to_buffer,
+ sum_bytes_to_buffer,
+}
+
+// verify_u64_2_4 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_u64_2_4 :: proc (tag: u64 msg, key: []byte) -> bool {
+ return sum_bytes_2_4(msg, key) == tag
+}
+
+// verify_bytes will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_bytes_2_4 :: proc (tag, msg, key: []byte) -> bool {
+ derived_tag: [8]byte
+ sum_bytes_to_buffer_2_4(msg, key, derived_tag[:])
+ return crypto.compare_constant_time(derived_tag[:], tag) == 1
+}
+
+verify_2_4 :: proc {
+ verify_bytes_2_4,
+ verify_u64_2_4,
+}
+
+verify_bytes :: verify_bytes_2_4
+verify_u64 :: verify_u64_2_4
+verify :: proc {
+ verify_bytes,
+ verify_u64,
+}
+
+// sum_string_4_8 will hash the given message with the key and return
+// the computed hash as a u64
+sum_string_4_8 :: proc(msg, key: string) -> u64 {
+ return sum_bytes_4_8(transmute([]byte)(msg), transmute([]byte)(key))
+}
+
+// sum_bytes_4_8 will hash the given message with the key and return
+// the computed hash as a u64
+sum_bytes_4_8 :: proc (msg, key: []byte) -> u64 {
+ ctx: Context
+ hash: u64
+ init(&ctx, key, 4, 8)
+ update(&ctx, msg)
+ final(&ctx, &hash)
+ return hash
+}
+
+// sum_string_to_buffer_4_8 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_string_to_buffer_4_8 :: proc(msg, key: string, dst: []byte) {
+ sum_bytes_to_buffer_4_8(transmute([]byte)(msg), transmute([]byte)(key), dst)
+}
+
+// sum_bytes_to_buffer_4_8 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_bytes_to_buffer_4_8 :: proc(msg, key, dst: []byte) {
+ assert(len(dst) >= DIGEST_SIZE, "crypto/siphash: Destination buffer needs to be at least of size 8")
+ hash := sum_bytes_4_8(msg, key)
+ _collect_output(dst[:], hash)
+}
+
+sum_4_8 :: proc {
+ sum_string_4_8,
+ sum_bytes_4_8,
+ sum_string_to_buffer_4_8,
+ sum_bytes_to_buffer_4_8,
+}
+
+// verify_u64_4_8 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_u64_4_8 :: proc (tag: u64 msg, key: []byte) -> bool {
+ return sum_bytes_4_8(msg, key) == tag
+}
+
+// verify_bytes will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_bytes_4_8 :: proc (tag, msg, key: []byte) -> bool {
+ derived_tag: [8]byte
+ sum_bytes_to_buffer_4_8(msg, key, derived_tag[:])
+ return crypto.compare_constant_time(derived_tag[:], tag) == 1
+}
+
+verify_4_8 :: proc {
+ verify_bytes_4_8,
+ verify_u64_4_8,
+}
+
+/*
+ Low level API
+*/
+
+init :: proc(ctx: ^Context, key: []byte, c_rounds, d_rounds: int) {
+ assert(len(key) == KEY_SIZE, "crypto/siphash: Invalid key size, want 16")
+ ctx.c_rounds = c_rounds
+ ctx.d_rounds = d_rounds
+ is_valid_setting := (ctx.c_rounds == 1 && ctx.d_rounds == 3) ||
+ (ctx.c_rounds == 2 && ctx.d_rounds == 4) ||
+ (ctx.c_rounds == 4 && ctx.d_rounds == 8)
+ assert(is_valid_setting, "crypto/siphash: Incorrect rounds set up. Valid pairs are (1,3), (2,4) and (4,8)")
+ ctx.k0 = util.U64_LE(key[:8])
+ ctx.k1 = util.U64_LE(key[8:])
+ ctx.v0 = 0x736f6d6570736575 ~ ctx.k0
+ ctx.v1 = 0x646f72616e646f6d ~ ctx.k1
+ ctx.v2 = 0x6c7967656e657261 ~ ctx.k0
+ ctx.v3 = 0x7465646279746573 ~ ctx.k1
+ ctx.is_initialized = true
+}
+
+update :: proc(ctx: ^Context, data: []byte) {
+ assert(ctx.is_initialized, "crypto/siphash: Context is not initalized")
+ ctx.last_block = len(data) / 8 * 8
+ ctx.buf = data
+ i := 0
+ m: u64
+ for i < ctx.last_block {
+ m = u64(ctx.buf[i] & 0xff)
+ i += 1
+
+ for r in u64(1)..<8 {
+ m |= u64(ctx.buf[i] & 0xff) << (r * 8)
+ i += 1
+ }
+
+ ctx.v3 ~= m
+ for _ in 0..<ctx.c_rounds {
+ _compress(ctx)
+ }
+
+ ctx.v0 ~= m
+ }
+}
+
+final :: proc(ctx: ^Context, dst: ^u64) {
+ m: u64
+ for i := len(ctx.buf) - 1; i >= ctx.last_block; i -= 1 {
+ m <<= 8
+ m |= u64(ctx.buf[i] & 0xff)
+ }
+ m |= u64(len(ctx.buf) << 56)
+
+ ctx.v3 ~= m
+
+ for _ in 0..<ctx.c_rounds {
+ _compress(ctx)
+ }
+
+ ctx.v0 ~= m
+ ctx.v2 ~= 0xff
+
+ for _ in 0..<ctx.d_rounds {
+ _compress(ctx)
+ }
+
+ dst^ = ctx.v0 ~ ctx.v1 ~ ctx.v2 ~ ctx.v3
+
+ reset(ctx)
+}
+
+reset :: proc(ctx: ^Context) {
+ ctx.k0, ctx.k1 = 0, 0
+ ctx.v0, ctx.v1 = 0, 0
+ ctx.v2, ctx.v3 = 0, 0
+ ctx.last_block = 0
+ ctx.c_rounds = 0
+ ctx.d_rounds = 0
+ ctx.is_initialized = false
+}
+
+Context :: struct {
+ v0, v1, v2, v3: u64, // State values
+ k0, k1: u64, // Split key
+ c_rounds: int, // Number of message rounds
+ d_rounds: int, // Number of finalization rounds
+ buf: []byte, // Provided data
+ last_block: int, // Offset from the last block
+ is_initialized: bool,
+}
+
+_get_byte :: #force_inline proc "contextless" (byte_num: byte, into: u64) -> byte {
+ return byte(into >> (((~byte_num) & (size_of(u64) - 1)) << 3))
+}
+
+_collect_output :: #force_inline proc "contextless" (dst: []byte, hash: u64) {
+ dst[0] = _get_byte(7, hash)
+ dst[1] = _get_byte(6, hash)
+ dst[2] = _get_byte(5, hash)
+ dst[3] = _get_byte(4, hash)
+ dst[4] = _get_byte(3, hash)
+ dst[5] = _get_byte(2, hash)
+ dst[6] = _get_byte(1, hash)
+ dst[7] = _get_byte(0, hash)
+}
+
+_compress :: #force_inline proc "contextless" (ctx: ^Context) {
+ ctx.v0 += ctx.v1
+ ctx.v1 = util.ROTL64(ctx.v1, 13)
+ ctx.v1 ~= ctx.v0
+ ctx.v0 = util.ROTL64(ctx.v0, 32)
+ ctx.v2 += ctx.v3
+ ctx.v3 = util.ROTL64(ctx.v3, 16)
+ ctx.v3 ~= ctx.v2
+ ctx.v0 += ctx.v3
+ ctx.v3 = util.ROTL64(ctx.v3, 21)
+ ctx.v3 ~= ctx.v0
+ ctx.v2 += ctx.v1
+ ctx.v1 = util.ROTL64(ctx.v1, 17)
+ ctx.v1 ~= ctx.v2
+ ctx.v2 = util.ROTL64(ctx.v2, 32)
+}
diff --git a/core/dynlib/lib_unix.odin b/core/dynlib/lib_unix.odin
index bb8affb79..e52ade153 100644
--- a/core/dynlib/lib_unix.odin
+++ b/core/dynlib/lib_unix.odin
@@ -1,4 +1,4 @@
-// +build linux, darwin, freebsd
+// +build linux, darwin, freebsd, openbsd
package dynlib
import "core:os"
diff --git a/core/encoding/varint/doc.odin b/core/encoding/varint/doc.odin
new file mode 100644
index 000000000..dd068b261
--- /dev/null
+++ b/core/encoding/varint/doc.odin
@@ -0,0 +1,27 @@
+/*
+ Implementation of the LEB128 variable integer encoding as used by DWARF encoding and DEX files, among others.
+
+ Author of this Odin package: Jeroen van Rijn
+
+ Example:
+ ```odin
+ import "core:encoding/varint"
+ import "core:fmt"
+
+ main :: proc() {
+ buf: [varint.LEB128_MAX_BYTES]u8
+
+ value := u128(42)
+
+ encode_size, encode_err := varint.encode_uleb128(buf[:], value)
+ assert(encode_size == 1 && encode_err == .None)
+
+ fmt.println(buf[:encode_size])
+
+ decoded_val, decode_size, decode_err := varint.decode_uleb128(buf[:encode_size])
+ assert(decoded_val == value && decode_size == encode_size && decode_err == .None)
+ }
+ ```
+
+*/
+package varint \ No newline at end of file
diff --git a/core/encoding/varint/leb128.odin b/core/encoding/varint/leb128.odin
new file mode 100644
index 000000000..476b9c2c9
--- /dev/null
+++ b/core/encoding/varint/leb128.odin
@@ -0,0 +1,139 @@
+/*
+ Copyright 2022 Jeroen van Rijn <nom@duclavier.com>.
+ Made available under Odin's BSD-3 license.
+
+ List of contributors:
+ Jeroen van Rijn: Initial implementation.
+*/
+
+// package varint implements variable length integer encoding and decoding using
+// the LEB128 format as used by DWARF debug info, Android .dex and other file formats.
+package varint
+
+import "core:fmt"
+
+// In theory we should use the bigint package. In practice, varints bigger than this indicate a corrupted file.
+// Instead we'll set limits on the values we'll encode/decode
+// 18 * 7 bits = 126, which means that a possible 19th byte may at most be `0b0000_0011`.
+LEB128_MAX_BYTES :: 19
+
+Error :: enum {
+ None = 0,
+ Buffer_Too_Small = 1,
+ Value_Too_Large = 2,
+}
+
+// Decode a slice of bytes encoding an unsigned LEB128 integer into value and number of bytes used.
+// Returns `size` == 0 for an invalid value, empty slice, or a varint > 18 bytes.
+decode_uleb128 :: proc(buf: []u8) -> (val: u128, size: int, err: Error) {
+ more := true
+
+ for v, i in buf {
+ size = i + 1
+
+ // 18 * 7 bits = 126, which means that a possible 19th byte may at most be 0b0000_0011.
+ if size > LEB128_MAX_BYTES || size == LEB128_MAX_BYTES && v > 0b0000_0011 {
+ return 0, 0, .Value_Too_Large
+ }
+
+ val |= u128(v & 0x7f) << uint(i * 7)
+
+ if v < 128 {
+ more = false
+ break
+ }
+ }
+
+ // If the buffer runs out before the number ends, return an error.
+ if more {
+ return 0, 0, .Buffer_Too_Small
+ }
+ return
+}
+
+// Decode a slice of bytes encoding a signed LEB128 integer into value and number of bytes used.
+// Returns `size` == 0 for an invalid value, empty slice, or a varint > 18 bytes.
+decode_ileb128 :: proc(buf: []u8) -> (val: i128, size: int, err: Error) {
+ shift: uint
+
+ if len(buf) == 0 {
+ return 0, 0, .Buffer_Too_Small
+ }
+
+ for v in buf {
+ size += 1
+
+ // 18 * 7 bits = 126, which including sign means we can have a 19th byte.
+ if size > LEB128_MAX_BYTES || size == LEB128_MAX_BYTES && v > 0x7f {
+ return 0, 0, .Value_Too_Large
+ }
+
+ val |= i128(v & 0x7f) << shift
+ shift += 7
+
+ if v < 128 { break }
+ }
+
+ if buf[size - 1] & 0x40 == 0x40 {
+ val |= max(i128) << shift
+ }
+ return
+}
+
+// Encode `val` into `buf` as an unsigned LEB128 encoded series of bytes.
+// `buf` must be appropriately sized.
+encode_uleb128 :: proc(buf: []u8, val: u128) -> (size: int, err: Error) {
+ val := val
+
+ for {
+ size += 1
+
+ if size > len(buf) {
+ fmt.println(val, buf[:size - 1])
+ return 0, .Buffer_Too_Small
+ }
+
+ low := val & 0x7f
+ val >>= 7
+
+ if val > 0 {
+ low |= 0x80 // more bytes to follow
+ }
+ buf[size - 1] = u8(low)
+
+ if val == 0 { break }
+ }
+ return
+}
+
+@(private)
+SIGN_MASK :: (i128(1) << 121) // sign extend mask
+
+// Encode `val` into `buf` as a signed LEB128 encoded series of bytes.
+// `buf` must be appropriately sized.
+encode_ileb128 :: proc(buf: []u8, val: i128) -> (size: int, err: Error) {
+ val := val
+ more := true
+
+ for more {
+ size += 1
+
+ if size > len(buf) {
+ return 0, .Buffer_Too_Small
+ }
+
+ low := val & 0x7f
+ val >>= 7
+
+ low = (low ~ SIGN_MASK) - SIGN_MASK
+
+ if (val == 0 && low & 0x40 != 0x40) || (val == -1 && low & 0x40 == 0x40) {
+ more = false
+ } else {
+ low |= 0x80
+ }
+
+ buf[size - 1] = u8(low)
+ }
+ return
+} \ No newline at end of file
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin
index 360a00b32..d006d0ef8 100644
--- a/core/fmt/fmt.odin
+++ b/core/fmt/fmt.odin
@@ -32,6 +32,8 @@ Info :: struct {
writer: io.Writer,
arg: any, // Temporary
record_level: int,
+
+ n: int, // bytes written
}
// Custom formatter signature. It returns true if the formatting was successful and false when it could not be done
@@ -196,19 +198,16 @@ wprint :: proc(w: io.Writer, args: ..any, sep := " ") -> int {
// so I am going to keep the same behaviour as `*println` for `*print`
- size0 := io.size(auto_cast w)
-
for _, i in args {
if i > 0 {
- io.write_string(fi.writer, sep)
+ io.write_string(fi.writer, sep, &fi.n)
}
fmt_value(&fi, args[i], 'v')
}
io.flush(auto_cast w)
- size1 := io.size(auto_cast w)
- return int(size1 - size0)
+ return fi.n
}
// wprintln formats using the default print settings and writes to w
@@ -216,20 +215,16 @@ wprintln :: proc(w: io.Writer, args: ..any, sep := " ") -> int {
fi: Info
fi.writer = w
- size0 := io.size(auto_cast w)
-
for _, i in args {
if i > 0 {
- io.write_string(fi.writer, sep)
+ io.write_string(fi.writer, sep, &fi.n)
}
fmt_value(&fi, args[i], 'v')
}
- io.write_byte(fi.writer, '\n')
+ io.write_byte(fi.writer, '\n', &fi.n)
io.flush(auto_cast w)
-
- size1 := io.size(auto_cast w)
- return int(size1 - size0)
+ return fi.n
}
// wprintf formats according to the specififed format string and writes to w
@@ -239,8 +234,6 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
end := len(fmt)
was_prev_index := false
- size0 := io.size(auto_cast w)
-
loop: for i := 0; i < end; /**/ {
fi = Info{writer = w, good_arg_index = true, reordered = fi.reordered}
@@ -249,7 +242,7 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
i += 1
}
if i > prev_i {
- io.write_string(fi.writer, fmt[prev_i:i])
+ io.write_string(fi.writer, fmt[prev_i:i], &fi.n)
}
if i >= end {
break loop
@@ -264,13 +257,13 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
// Skip extra one
i += 1
}
- io.write_byte(fi.writer, char)
+ io.write_byte(fi.writer, char, &fi.n)
continue loop
} else if char == '{' {
if i < end && fmt[i] == char {
// Skip extra one
i += 1
- io.write_byte(fi.writer, char)
+ io.write_byte(fi.writer, char, &fi.n)
continue loop
}
}
@@ -301,7 +294,7 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
i += 1
fi.width, arg_index, fi.width_set = int_from_arg(args, arg_index)
if !fi.width_set {
- io.write_string(w, "%!(BAD WIDTH)")
+ io.write_string(w, "%!(BAD WIDTH)", &fi.n)
}
if fi.width < 0 {
@@ -332,7 +325,7 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
fi.prec_set = false
}
if !fi.prec_set {
- io.write_string(fi.writer, "%!(BAD PRECISION)")
+ io.write_string(fi.writer, "%!(BAD PRECISION)", &fi.n)
}
was_prev_index = false
} else {
@@ -345,7 +338,7 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
}
if i >= end {
- io.write_string(fi.writer, "%!(NO VERB)")
+ io.write_string(fi.writer, "%!(NO VERB)", &fi.n)
break loop
}
@@ -354,11 +347,11 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
switch {
case verb == '%':
- io.write_byte(fi.writer, '%')
+ io.write_byte(fi.writer, '%', &fi.n)
case !fi.good_arg_index:
- io.write_string(fi.writer, "%!(BAD ARGUMENT NUMBER)")
+ io.write_string(fi.writer, "%!(BAD ARGUMENT NUMBER)", &fi.n)
case arg_index >= len(args):
- io.write_string(fi.writer, "%!(MISSING ARGUMENT)")
+ io.write_string(fi.writer, "%!(MISSING ARGUMENT)", &fi.n)
case:
fmt_arg(&fi, args[arg_index], verb)
arg_index += 1
@@ -374,14 +367,14 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
arg_index = new_arg_index
i = new_i
} else {
- io.write_string(fi.writer, "%!(BAD ARGUMENT NUMBER ")
+ io.write_string(fi.writer, "%!(BAD ARGUMENT NUMBER ", &fi.n)
// Skip over the bad argument
start_index := i
for i < end && fmt[i] != '}' && fmt[i] != ':' {
i += 1
}
fmt_arg(&fi, fmt[start_index:i], 'v')
- io.write_string(fi.writer, ")")
+ io.write_string(fi.writer, ")", &fi.n)
}
}
@@ -414,7 +407,7 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
i += 1
fi.width, arg_index, fi.width_set = int_from_arg(args, arg_index)
if !fi.width_set {
- io.write_string(fi.writer, "%!(BAD WIDTH)")
+ io.write_string(fi.writer, "%!(BAD WIDTH)", &fi.n)
}
if fi.width < 0 {
@@ -445,7 +438,7 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
fi.prec_set = false
}
if !fi.prec_set {
- io.write_string(fi.writer, "%!(BAD PRECISION)")
+ io.write_string(fi.writer, "%!(BAD PRECISION)", &fi.n)
}
was_prev_index = false
} else {
@@ -459,7 +452,7 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
if i >= end {
- io.write_string(fi.writer, "%!(NO VERB)")
+ io.write_string(fi.writer, "%!(NO VERB)", &fi.n)
break loop
}
@@ -469,7 +462,7 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
}
if i >= end {
- io.write_string(fi.writer, "%!(MISSING CLOSE BRACE)")
+ io.write_string(fi.writer, "%!(MISSING CLOSE BRACE)", &fi.n)
break loop
}
@@ -478,11 +471,11 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
switch {
case brace != '}':
- io.write_string(fi.writer, "%!(MISSING CLOSE BRACE)")
+ io.write_string(fi.writer, "%!(MISSING CLOSE BRACE)", &fi.n)
case !fi.good_arg_index:
- io.write_string(fi.writer, "%!(BAD ARGUMENT NUMBER)")
+ io.write_string(fi.writer, "%!(BAD ARGUMENT NUMBER)", &fi.n)
case arg_index >= len(args):
- io.write_string(fi.writer, "%!(MISSING ARGUMENT)")
+ io.write_string(fi.writer, "%!(MISSING ARGUMENT)", &fi.n)
case:
fmt_arg(&fi, args[arg_index], verb)
arg_index += 1
@@ -491,25 +484,24 @@ wprintf :: proc(w: io.Writer, fmt: string, args: ..any) -> int {
}
if !fi.reordered && arg_index < len(args) {
- io.write_string(fi.writer, "%!(EXTRA ")
+ io.write_string(fi.writer, "%!(EXTRA ", &fi.n)
for arg, index in args[arg_index:] {
if index > 0 {
- io.write_string(fi.writer, ", ")
+ io.write_string(fi.writer, ", ", &fi.n)
}
if arg == nil {
- io.write_string(fi.writer, "<nil>")
+ io.write_string(fi.writer, "<nil>", &fi.n)
} else {
fmt_arg(&fi, args[index], 'v')
}
}
- io.write_string(fi.writer, ")")
+ io.write_string(fi.writer, ")", &fi.n)
}
io.flush(auto_cast w)
- size1 := io.size(auto_cast w)
- return int(size1 - size0)
+ return fi.n
}
// wprint_type is a utility procedure to write a ^runtime.Type_Info value to w
@@ -597,23 +589,23 @@ int_from_arg :: proc(args: []any, arg_index: int) -> (int, int, bool) {
fmt_bad_verb :: proc(using fi: ^Info, verb: rune) {
- io.write_string(writer, "%!")
- io.write_rune(writer, verb)
- io.write_byte(writer, '(')
+ io.write_string(writer, "%!", &fi.n)
+ io.write_rune(writer, verb, &fi.n)
+ io.write_byte(writer, '(', &fi.n)
if arg.id != nil {
- reflect.write_typeid(writer, arg.id)
- io.write_byte(writer, '=')
+ reflect.write_typeid(writer, arg.id, &fi.n)
+ io.write_byte(writer, '=', &fi.n)
fmt_value(fi, arg, 'v')
} else {
- io.write_string(writer, "<nil>")
+ io.write_string(writer, "<nil>", &fi.n)
}
- io.write_byte(writer, ')')
+ io.write_byte(writer, ')', &fi.n)
}
fmt_bool :: proc(using fi: ^Info, b: bool, verb: rune) {
switch verb {
case 't', 'v':
- io.write_string(writer, b ? "true" : "false")
+ fmt_string(fi, b ? "true" : "false", 's')
case:
fmt_bad_verb(fi, verb)
}
@@ -631,7 +623,7 @@ fmt_write_padding :: proc(fi: ^Info, width: int) {
}
for i := 0; i < width; i += 1 {
- io.write_byte(fi.writer, pad_byte)
+ io.write_byte(fi.writer, pad_byte, &fi.n)
}
}
@@ -690,8 +682,8 @@ _fmt_int :: proc(fi: ^Info, u: u64, base: int, is_signed: bool, bit_size: int, d
case 16: c = 'x'
}
if c != 0 {
- io.write_byte(fi.writer, '0')
- io.write_byte(fi.writer, c)
+ io.write_byte(fi.writer, '0', &fi.n)
+ io.write_byte(fi.writer, c, &fi.n)
}
}
@@ -756,8 +748,8 @@ _fmt_int_128 :: proc(fi: ^Info, u: u128, base: int, is_signed: bool, bit_size: i
case 16: c = 'x'
}
if c != 0 {
- io.write_byte(fi.writer, '0')
- io.write_byte(fi.writer, c)
+ io.write_byte(fi.writer, '0', &fi.n)
+ io.write_byte(fi.writer, c, &fi.n)
}
}
@@ -773,9 +765,9 @@ __DIGITS_UPPER := "0123456789ABCDEFX"
fmt_rune :: proc(fi: ^Info, r: rune, verb: rune) {
switch verb {
case 'c', 'r', 'v':
- io.write_rune(fi.writer, r)
+ io.write_rune(fi.writer, r, &fi.n)
case 'q':
- strings.write_quoted_rune(fi.writer, r)
+ fi.n += strings.write_quoted_rune(fi.writer, r)
case:
fmt_int(fi, u64(r), false, 32, verb)
}
@@ -797,7 +789,7 @@ fmt_int :: proc(fi: ^Info, u: u64, is_signed: bool, bit_size: int, verb: rune) {
if r < 0 || r > utf8.MAX_RUNE {
fmt_bad_verb(fi, verb)
} else {
- io.write_string(fi.writer, "U+")
+ io.write_string(fi.writer, "U+", &fi.n)
_fmt_int(fi, u, 16, false, bit_size, __DIGITS_UPPER)
}
@@ -822,7 +814,7 @@ fmt_int_128 :: proc(fi: ^Info, u: u128, is_signed: bool, bit_size: int, verb: ru
if r < 0 || r > utf8.MAX_RUNE {
fmt_bad_verb(fi, verb)
} else {
- io.write_string(fi.writer, "U+")
+ io.write_string(fi.writer, "U+", &fi.n)
_fmt_int_128(fi, u, 16, false, bit_size, __DIGITS_UPPER)
}
@@ -833,18 +825,18 @@ fmt_int_128 :: proc(fi: ^Info, u: u128, is_signed: bool, bit_size: int, verb: ru
_pad :: proc(fi: ^Info, s: string) {
if !fi.width_set {
- io.write_string(fi.writer, s)
+ io.write_string(fi.writer, s, &fi.n)
return
}
width := fi.width - utf8.rune_count_in_string(s)
if fi.minus { // right pad
- io.write_string(fi.writer, s)
+ io.write_string(fi.writer, s, &fi.n)
fmt_write_padding(fi, width)
} else { // left pad
fmt_write_padding(fi, width)
- io.write_string(fi.writer, s)
+ io.write_string(fi.writer, s, &fi.n)
}
}
@@ -870,15 +862,15 @@ fmt_float :: proc(fi: ^Info, v: f64, bit_size: int, verb: rune) {
}
if len(b) > 1 && (b[1] == 'N' || b[1] == 'I') {
- io.write_string(fi.writer, string(b))
+ io.write_string(fi.writer, string(b), &fi.n)
return
}
if fi.plus || b[0] != '+' {
if fi.zero && fi.width_set && fi.width > len(b) {
- io.write_byte(fi.writer, b[0])
+ io.write_byte(fi.writer, b[0], &fi.n)
fmt_write_padding(fi, fi.width - len(b))
- io.write_string(fi.writer, string(b[1:]))
+ io.write_string(fi.writer, string(b[1:]), &fi.n)
} else {
_pad(fi, string(b))
}
@@ -906,15 +898,15 @@ fmt_float :: proc(fi: ^Info, v: f64, bit_size: int, verb: rune) {
}
if len(b) > 1 && (b[1] == 'N' || b[1] == 'I') {
- io.write_string(fi.writer, string(b))
+ io.write_string(fi.writer, string(b), &fi.n)
return
}
if fi.plus || str[0] != '+' {
if fi.zero && fi.width_set && fi.width > len(b) {
- io.write_byte(fi.writer, b[0])
+ io.write_byte(fi.writer, b[0], &fi.n)
fmt_write_padding(fi, fi.width - len(b))
- io.write_string(fi.writer, string(b[1:]))
+ io.write_string(fi.writer, string(b[1:]), &fi.n)
} else {
_pad(fi, string(b))
}
@@ -938,7 +930,7 @@ fmt_float :: proc(fi: ^Info, v: f64, bit_size: int, verb: rune) {
case: panic("Unhandled float size")
}
- io.write_string(fi.writer, "0h")
+ io.write_string(fi.writer, "0h", &fi.n)
_fmt_int(fi, u, 16, false, bit_size, __DIGITS_LOWER if verb == 'h' else __DIGITS_UPPER)
@@ -951,15 +943,31 @@ fmt_float :: proc(fi: ^Info, v: f64, bit_size: int, verb: rune) {
fmt_string :: proc(fi: ^Info, s: string, verb: rune) {
switch verb {
case 's', 'v':
- io.write_string(fi.writer, s)
- if fi.width_set && len(s) < fi.width {
- for _ in 0..<fi.width - len(s) {
- io.write_byte(fi.writer, ' ')
+ if fi.width_set {
+ if fi.width > len(s) {
+ if fi.minus {
+ io.write_string(fi.writer, s, &fi.n)
+ }
+
+ for _ in 0..<fi.width - len(s) {
+ io.write_byte(fi.writer, ' ', &fi.n)
+ }
+
+ if !fi.minus {
+ io.write_string(fi.writer, s, &fi.n)
+ }
+ }
+ else {
+ io.write_string(fi.writer, s[:fi.width], &fi.n)
}
}
+ else
+ {
+ io.write_string(fi.writer, s, &fi.n)
+ }
case 'q': // quoted string
- io.write_quoted_string(fi.writer, s, '"')
+ io.write_quoted_string(fi.writer, s, '"', &fi.n)
case 'x', 'X':
space := fi.space
@@ -968,7 +976,7 @@ fmt_string :: proc(fi: ^Info, s: string, verb: rune) {
for i in 0..<len(s) {
if i > 0 && space {
- io.write_byte(fi.writer, ' ')
+ io.write_byte(fi.writer, ' ', &fi.n)
}
char_set := __DIGITS_UPPER
if verb == 'x' {
@@ -990,7 +998,7 @@ fmt_pointer :: proc(fi: ^Info, p: rawptr, verb: rune) {
switch verb {
case 'p', 'v':
if !fi.hash || verb == 'v' {
- io.write_string(fi.writer, "0x")
+ io.write_string(fi.writer, "0x", &fi.n)
}
_fmt_int(fi, u, 16, false, 8*size_of(rawptr), __DIGITS_UPPER)
@@ -1052,7 +1060,7 @@ string_to_enum_value :: proc($T: typeid, s: string) -> (T, bool) {
fmt_enum :: proc(fi: ^Info, v: any, verb: rune) {
if v.id == nil || v.data == nil {
- io.write_string(fi.writer, "<nil>")
+ io.write_string(fi.writer, "<nil>", &fi.n)
return
}
@@ -1066,11 +1074,11 @@ fmt_enum :: proc(fi: ^Info, v: any, verb: rune) {
fmt_arg(fi, any{v.data, runtime.type_info_base(e.base).id}, verb)
case 's', 'v':
if str, ok := enum_value_to_string(v); ok {
- io.write_string(fi.writer, str)
+ fmt_string(fi, str, 's')
} else {
- io.write_string(fi.writer, "%!(BAD ENUM VALUE=")
+ io.write_string(fi.writer, "%!(BAD ENUM VALUE=", &fi.n)
fmt_arg(fi, any{v.data, runtime.type_info_base(e.base).id}, 'i')
- io.write_string(fi.writer, ")")
+ io.write_string(fi.writer, ")", &fi.n)
}
}
}
@@ -1164,12 +1172,12 @@ fmt_bit_set :: proc(fi: ^Info, v: any, name: string = "") {
et := runtime.type_info_base(info.elem)
if name != "" {
- io.write_string(fi.writer, name)
+ io.write_string(fi.writer, name, &fi.n)
} else {
- reflect.write_type(fi.writer, type_info)
+ reflect.write_type(fi.writer, type_info, &fi.n)
}
- io.write_byte(fi.writer, '{')
- defer io.write_byte(fi.writer, '}')
+ io.write_byte(fi.writer, '{', &fi.n)
+ defer io.write_byte(fi.writer, '}', &fi.n)
e, is_enum := et.variant.(runtime.Type_Info_Enum)
commas := 0
@@ -1179,21 +1187,21 @@ fmt_bit_set :: proc(fi: ^Info, v: any, name: string = "") {
}
if commas > 0 {
- io.write_string(fi.writer, ", ")
+ io.write_string(fi.writer, ", ", &fi.n)
}
if is_enum {
for ev, evi in e.values {
v := u64(ev)
if v == u64(i) {
- io.write_string(fi.writer, e.names[evi])
+ io.write_string(fi.writer, e.names[evi], &fi.n)
commas += 1
continue loop
}
}
}
v := i64(i) + info.lower
- io.write_i64(fi.writer, v, 10)
+ io.write_i64(fi.writer, v, 10, &fi.n)
commas += 1
}
}
@@ -1201,20 +1209,20 @@ fmt_bit_set :: proc(fi: ^Info, v: any, name: string = "") {
fmt_write_indent :: proc(fi: ^Info) {
for in 0..<fi.indent {
- io.write_byte(fi.writer, '\t')
+ io.write_byte(fi.writer, '\t', &fi.n)
}
}
fmt_write_array :: proc(fi: ^Info, array_data: rawptr, count: int, elem_size: int, elem_id: typeid, verb: rune) {
- io.write_byte(fi.writer, '[')
- defer io.write_byte(fi.writer, ']')
+ io.write_byte(fi.writer, '[', &fi.n)
+ defer io.write_byte(fi.writer, ']', &fi.n)
if count <= 0 {
return
}
if fi.hash {
- io.write_byte(fi.writer, '\n')
+ io.write_byte(fi.writer, '\n', &fi.n)
defer fmt_write_indent(fi)
indent := fi.indent
@@ -1227,11 +1235,11 @@ fmt_write_array :: proc(fi: ^Info, array_data: rawptr, count: int, elem_size: in
data := uintptr(array_data) + uintptr(i*elem_size)
fmt_arg(fi, any{rawptr(data), elem_id}, verb)
- io.write_string(fi.writer, ",\n")
+ io.write_string(fi.writer, ",\n", &fi.n)
}
} else {
for i in 0..<count {
- if i > 0 { io.write_string(fi.writer, ", ") }
+ if i > 0 { io.write_string(fi.writer, ", ", &fi.n) }
data := uintptr(array_data) + uintptr(i*elem_size)
fmt_arg(fi, any{rawptr(data), elem_id}, verb)
@@ -1246,14 +1254,14 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
n -= 1
}
for in 0..<n {
- io.write_byte(fi.writer, '0')
+ io.write_byte(fi.writer, '0', &fi.n)
}
- io.write_i64(fi.writer, i, 10)
+ io.write_i64(fi.writer, i, 10, &fi.n)
}
if v.data == nil || v.id == nil {
- io.write_string(fi.writer, "<nil>")
+ io.write_string(fi.writer, "<nil>", &fi.n)
return
}
@@ -1279,12 +1287,12 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
// Built-in Custom Formatters for core library types
switch a in v {
case runtime.Source_Code_Location:
- io.write_string(fi.writer, a.file_path)
- io.write_byte(fi.writer, '(')
- io.write_int(fi.writer, int(a.line))
- io.write_byte(fi.writer, ':')
- io.write_int(fi.writer, int(a.column))
- io.write_byte(fi.writer, ')')
+ io.write_string(fi.writer, a.file_path, &fi.n)
+ io.write_byte(fi.writer, '(', &fi.n)
+ io.write_int(fi.writer, int(a.line), 10, &fi.n)
+ io.write_byte(fi.writer, ':', &fi.n)
+ io.write_int(fi.writer, int(a.column), 10, &fi.n)
+ io.write_byte(fi.writer, ')', &fi.n)
return
case time.Duration:
@@ -1338,7 +1346,7 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
w -= 1
switch {
case u == 0:
- io.write_string(fi.writer, "0s")
+ io.write_string(fi.writer, "0s", &fi.n)
return
case u < u64(time.Microsecond):
prec = 0
@@ -1377,7 +1385,7 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
w -= 1
buf[w] = '-'
}
- io.write_string(fi.writer, string(buf[w:]))
+ io.write_string(fi.writer, string(buf[w:]), &fi.n)
return
case time.Time:
@@ -1386,20 +1394,20 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
h, min, s := time.clock(t)
ns := (t._nsec - (t._nsec/1e9 + time.UNIX_TO_ABSOLUTE)*1e9) % 1e9
write_padded_number(fi, i64(y), 4)
- io.write_byte(fi.writer, '-')
+ io.write_byte(fi.writer, '-', &fi.n)
write_padded_number(fi, i64(mon), 2)
- io.write_byte(fi.writer, '-')
+ io.write_byte(fi.writer, '-', &fi.n)
write_padded_number(fi, i64(d), 2)
- io.write_byte(fi.writer, ' ')
+ io.write_byte(fi.writer, ' ', &fi.n)
write_padded_number(fi, i64(h), 2)
- io.write_byte(fi.writer, ':')
+ io.write_byte(fi.writer, ':', &fi.n)
write_padded_number(fi, i64(min), 2)
- io.write_byte(fi.writer, ':')
+ io.write_byte(fi.writer, ':', &fi.n)
write_padded_number(fi, i64(s), 2)
- io.write_byte(fi.writer, '.')
+ io.write_byte(fi.writer, '.', &fi.n)
write_padded_number(fi, (ns), 9)
- io.write_string(fi.writer, " +0000 UTC")
+ io.write_string(fi.writer, " +0000 UTC", &fi.n)
return
}
@@ -1410,15 +1418,15 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
return
}
if b.is_raw_union {
- io.write_string(fi.writer, info.name)
- io.write_string(fi.writer, "{}")
+ io.write_string(fi.writer, info.name, &fi.n)
+ io.write_string(fi.writer, "{}", &fi.n)
return
}
is_soa := b.soa_kind != .None
- io.write_string(fi.writer, info.name)
- io.write_byte(fi.writer, '[' if is_soa else '{')
+ io.write_string(fi.writer, info.name, &fi.n)
+ io.write_byte(fi.writer, '[' if is_soa else '{', &fi.n)
hash := fi.hash; defer fi.hash = hash
indent := fi.indent; defer fi.indent -= 1
@@ -1427,13 +1435,13 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
fi.indent += 1
if hash {
- io.write_byte(fi.writer, '\n')
+ io.write_byte(fi.writer, '\n', &fi.n)
}
defer {
if hash {
- for in 0..<indent { io.write_byte(fi.writer, '\t') }
+ for in 0..<indent { io.write_byte(fi.writer, '\t', &fi.n) }
}
- io.write_byte(fi.writer, ']' if is_soa else '}')
+ io.write_byte(fi.writer, ']' if is_soa else '}', &fi.n)
}
if is_soa {
@@ -1446,37 +1454,37 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
}
for index in 0..<uintptr(b.soa_len) {
- if !hash && index > 0 { io.write_string(fi.writer, ", ") }
+ if !hash && index > 0 { io.write_string(fi.writer, ", ", &fi.n) }
field_count := -1
- if !hash && field_count > 0 { io.write_string(fi.writer, ", ") }
+ if !hash && field_count > 0 { io.write_string(fi.writer, ", ", &fi.n) }
- io.write_string(fi.writer, base_type_name)
- io.write_byte(fi.writer, '{')
- defer io.write_byte(fi.writer, '}')
+ io.write_string(fi.writer, base_type_name, &fi.n)
+ io.write_byte(fi.writer, '{', &fi.n)
+ defer io.write_byte(fi.writer, '}', &fi.n)
for name, i in b.names {
field_count += 1
- if !hash && field_count > 0 { io.write_string(fi.writer, ", ") }
+ if !hash && field_count > 0 { io.write_string(fi.writer, ", ", &fi.n) }
if hash {
fmt_write_indent(fi)
}
- io.write_string(fi.writer, name)
- io.write_string(fi.writer, " = ")
+ io.write_string(fi.writer, name, &fi.n)
+ io.write_string(fi.writer, " = ", &fi.n)
t := b.types[i].variant.(runtime.Type_Info_Array).elem
t_size := uintptr(t.size)
if reflect.is_any(t) {
- io.write_string(fi.writer, "any{}")
+ io.write_string(fi.writer, "any{}", &fi.n)
} else {
data := rawptr(uintptr(v.data) + b.offsets[i] + index*t_size)
fmt_arg(fi, any{data, t.id}, 'v')
}
- if hash { io.write_string(fi.writer, ",\n") }
+ if hash { io.write_string(fi.writer, ",\n", &fi.n) }
}
}
} else {
@@ -1489,17 +1497,17 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
fmt_write_indent(fi)
}
- io.write_string(fi.writer, name)
- io.write_string(fi.writer, " = ")
+ io.write_string(fi.writer, name, &fi.n)
+ io.write_string(fi.writer, " = ", &fi.n)
if t := b.types[i]; reflect.is_any(t) {
- io.write_string(fi.writer, "any{}")
+ io.write_string(fi.writer, "any{}", &fi.n)
} else {
data := rawptr(uintptr(v.data) + b.offsets[i])
fmt_arg(fi, any{data, t.id}, 'v')
}
- if hash { io.write_string(fi.writer, ",\n") }
+ if hash { io.write_string(fi.writer, ",\n", &fi.n) }
}
}
@@ -1519,7 +1527,7 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
case runtime.Type_Info_Pointer:
if v.id == typeid_of(^runtime.Type_Info) {
- reflect.write_type(fi.writer, (^^runtime.Type_Info)(v.data)^)
+ reflect.write_type(fi.writer, (^^runtime.Type_Info)(v.data)^, &fi.n)
} else {
ptr := (^rawptr)(v.data)^
if verb != 'p' && info.elem != nil {
@@ -1533,7 +1541,7 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
runtime.Type_Info_Dynamic_Array,
runtime.Type_Info_Map:
if ptr == nil {
- io.write_string(fi.writer, "<nil>")
+ io.write_string(fi.writer, "<nil>", &fi.n)
return
}
if fi.record_level < 1 {
@@ -1547,13 +1555,13 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
case runtime.Type_Info_Struct,
runtime.Type_Info_Union:
if ptr == nil {
- io.write_string(fi.writer, "<nil>")
+ io.write_string(fi.writer, "<nil>", &fi.n)
return
}
if fi.record_level < 1 {
fi.record_level += 1
defer fi.record_level -= 1
- io.write_byte(fi.writer, '&')
+ io.write_byte(fi.writer, '&', &fi.n)
fmt_value(fi, a, verb)
return
}
@@ -1576,13 +1584,13 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
runtime.Type_Info_Dynamic_Array,
runtime.Type_Info_Map:
if ptr == nil {
- io.write_string(fi.writer, "<nil>")
+ io.write_string(fi.writer, "<nil>", &fi.n)
return
}
if fi.record_level < 1 {
fi.record_level += 1
defer fi.record_level -= 1
- io.write_byte(fi.writer, '&')
+ io.write_byte(fi.writer, '&', &fi.n)
fmt_value(fi, a, verb)
return
}
@@ -1590,13 +1598,13 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
case runtime.Type_Info_Struct,
runtime.Type_Info_Union:
if ptr == nil {
- io.write_string(fi.writer, "<nil>")
+ io.write_string(fi.writer, "<nil>", &fi.n)
return
}
if fi.record_level < 1 {
fi.record_level += 1
defer fi.record_level -= 1
- io.write_byte(fi.writer, '&')
+ io.write_byte(fi.writer, '&', &fi.n)
fmt_value(fi, a, verb)
return
}
@@ -1615,11 +1623,11 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
case runtime.Type_Info_Enumerated_Array:
if fi.hash {
- io.write_string(fi.writer, "[\n")
+ io.write_string(fi.writer, "[\n", &fi.n)
defer {
- io.write_byte(fi.writer, '\n')
+ io.write_byte(fi.writer, '\n', &fi.n)
fmt_write_indent(fi)
- io.write_byte(fi.writer, ']')
+ io.write_byte(fi.writer, ']', &fi.n)
}
indent := fi.indent
fi.indent += 1
@@ -1630,32 +1638,32 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
idx, ok := stored_enum_value_to_string(info.index, info.min_value, i)
if ok {
- io.write_byte(fi.writer, '.')
- io.write_string(fi.writer, idx)
+ io.write_byte(fi.writer, '.', &fi.n)
+ io.write_string(fi.writer, idx, &fi.n)
} else {
- io.write_i64(fi.writer, i64(info.min_value)+i64(i))
+ io.write_i64(fi.writer, i64(info.min_value)+i64(i), 10, &fi.n)
}
- io.write_string(fi.writer, " = ")
+ io.write_string(fi.writer, " = ", &fi.n)
data := uintptr(v.data) + uintptr(i*info.elem_size)
fmt_arg(fi, any{rawptr(data), info.elem.id}, verb)
- io.write_string(fi.writer, ",\n")
+ io.write_string(fi.writer, ",\n", &fi.n)
}
} else {
- io.write_byte(fi.writer, '[')
- defer io.write_byte(fi.writer, ']')
+ io.write_byte(fi.writer, '[', &fi.n)
+ defer io.write_byte(fi.writer, ']', &fi.n)
for i in 0..<info.count {
- if i > 0 { io.write_string(fi.writer, ", ") }
+ if i > 0 { io.write_string(fi.writer, ", ", &fi.n) }
idx, ok := stored_enum_value_to_string(info.index, info.min_value, i)
if ok {
- io.write_byte(fi.writer, '.')
- io.write_string(fi.writer, idx)
+ io.write_byte(fi.writer, '.', &fi.n)
+ io.write_string(fi.writer, idx, &fi.n)
} else {
- io.write_i64(fi.writer, i64(info.min_value)+i64(i))
+ io.write_i64(fi.writer, i64(info.min_value)+i64(i), 10, &fi.n)
}
- io.write_string(fi.writer, " = ")
+ io.write_string(fi.writer, " = ", &fi.n)
data := uintptr(v.data) + uintptr(i*info.elem_size)
fmt_arg(fi, any{rawptr(data), info.elem.id}, verb)
@@ -1674,10 +1682,10 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
}
case runtime.Type_Info_Simd_Vector:
- io.write_byte(fi.writer, '<')
- defer io.write_byte(fi.writer, '>')
+ io.write_byte(fi.writer, '<', &fi.n)
+ defer io.write_byte(fi.writer, '>', &fi.n)
for i in 0..<info.count {
- if i > 0 { io.write_string(fi.writer, ", ") }
+ if i > 0 { io.write_string(fi.writer, ", ", &fi.n) }
data := uintptr(v.data) + uintptr(i*info.elem_size)
fmt_arg(fi, any{rawptr(data), info.elem.id}, verb)
@@ -1700,8 +1708,8 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
return
}
- io.write_string(fi.writer, "map[")
- defer io.write_byte(fi.writer, ']')
+ io.write_string(fi.writer, "map[", &fi.n)
+ defer io.write_byte(fi.writer, ']', &fi.n)
m := (^mem.Raw_Map)(v.data)
if m != nil {
@@ -1715,14 +1723,14 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
entry_size := ed.elem_size
for i in 0..<entries.len {
- if i > 0 { io.write_string(fi.writer, ", ") }
+ if i > 0 { io.write_string(fi.writer, ", ", &fi.n) }
data := uintptr(entries.data) + uintptr(i*entry_size)
key := data + entry_type.offsets[2]
fmt_arg(&Info{writer = fi.writer}, any{rawptr(key), info.key.id}, 'v')
- io.write_string(fi.writer, "=")
+ io.write_string(fi.writer, "=", &fi.n)
value := data + entry_type.offsets[3]
fmt_arg(fi, any{rawptr(value), info.value.id}, 'v')
@@ -1731,21 +1739,21 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
case runtime.Type_Info_Struct:
if info.is_raw_union {
- io.write_string(fi.writer, "(raw_union)")
+ io.write_string(fi.writer, "(raw_union)", &fi.n)
return
}
is_soa := info.soa_kind != .None
- io.write_byte(fi.writer, '[' if is_soa else '{')
- defer io.write_byte(fi.writer, ']' if is_soa else '}')
+ io.write_byte(fi.writer, '[' if is_soa else '{', &fi.n)
+ defer io.write_byte(fi.writer, ']' if is_soa else '}', &fi.n)
fi.indent += 1; defer fi.indent -= 1
hash := fi.hash; defer fi.hash = hash
// fi.hash = false;
- if hash { io.write_byte(fi.writer, '\n') }
+ if hash { io.write_byte(fi.writer, '\n', &fi.n) }
if is_soa {
fi.indent += 1
@@ -1774,33 +1782,33 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
for index in 0..<n {
- if !hash && index > 0 { io.write_string(fi.writer, ", ") }
+ if !hash && index > 0 { io.write_string(fi.writer, ", ", &fi.n) }
field_count := -1
- if !hash && field_count > 0 { io.write_string(fi.writer, ", ") }
+ if !hash && field_count > 0 { io.write_string(fi.writer, ", ", &fi.n) }
- io.write_string(fi.writer, base_type_name)
- io.write_byte(fi.writer, '{')
- defer io.write_byte(fi.writer, '}')
+ io.write_string(fi.writer, base_type_name, &fi.n)
+ io.write_byte(fi.writer, '{', &fi.n)
+ defer io.write_byte(fi.writer, '}', &fi.n)
for i in 0..<actual_field_count {
name := info.names[i]
field_count += 1
- if !hash && field_count > 0 { io.write_string(fi.writer, ", ") }
+ if !hash && field_count > 0 { io.write_string(fi.writer, ", ", &fi.n) }
if hash {
fmt_write_indent(fi)
}
- io.write_string(fi.writer, name)
- io.write_string(fi.writer, " = ")
+ io.write_string(fi.writer, name, &fi.n)
+ io.write_string(fi.writer, " = ", &fi.n)
if info.soa_kind == .Fixed {
t := info.types[i].variant.(runtime.Type_Info_Array).elem
t_size := uintptr(t.size)
if reflect.is_any(t) {
- io.write_string(fi.writer, "any{}")
+ io.write_string(fi.writer, "any{}", &fi.n)
} else {
data := rawptr(uintptr(v.data) + info.offsets[i] + index*t_size)
fmt_arg(fi, any{data, t.id}, 'v')
@@ -1809,7 +1817,7 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
t := info.types[i].variant.(runtime.Type_Info_Pointer).elem
t_size := uintptr(t.size)
if reflect.is_any(t) {
- io.write_string(fi.writer, "any{}")
+ io.write_string(fi.writer, "any{}", &fi.n)
} else {
field_ptr := (^^byte)(uintptr(v.data) + info.offsets[i])^
data := rawptr(uintptr(field_ptr) + index*t_size)
@@ -1817,7 +1825,7 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
}
}
- if hash { io.write_string(fi.writer, ",\n") }
+ if hash { io.write_string(fi.writer, ",\n", &fi.n) }
}
}
} else {
@@ -1825,23 +1833,23 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
for name, i in info.names {
field_count += 1
- if !hash && field_count > 0 { io.write_string(fi.writer, ", ") }
+ if !hash && field_count > 0 { io.write_string(fi.writer, ", ", &fi.n) }
if hash {
fmt_write_indent(fi)
}
- io.write_string(fi.writer, name)
- io.write_string(fi.writer, " = ")
+ io.write_string(fi.writer, name, &fi.n)
+ io.write_string(fi.writer, " = ", &fi.n)
if t := info.types[i]; reflect.is_any(t) {
- io.write_string(fi.writer, "any{}")
+ io.write_string(fi.writer, "any{}", &fi.n)
} else {
data := rawptr(uintptr(v.data) + info.offsets[i])
fmt_arg(fi, any{data, t.id}, 'v')
}
if hash {
- io.write_string(fi.writer, ",\n")
+ io.write_string(fi.writer, ",\n", &fi.n)
}
}
}
@@ -1849,14 +1857,14 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
case runtime.Type_Info_Union:
if type_info.size == 0 {
- io.write_string(fi.writer, "nil")
+ io.write_string(fi.writer, "nil", &fi.n)
return
}
if reflect.type_info_union_is_pure_maybe(info) {
if v.data == nil {
- io.write_string(fi.writer, "nil")
+ io.write_string(fi.writer, "nil", &fi.n)
} else {
id := info.variants[0].id
fmt_arg(fi, any{v.data, id}, verb)
@@ -1882,12 +1890,12 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
assert(tag >= 0)
if v.data == nil {
- io.write_string(fi.writer, "nil")
+ io.write_string(fi.writer, "nil", &fi.n)
} else if info.no_nil {
id := info.variants[tag].id
fmt_arg(fi, any{v.data, id}, verb)
} else if tag == 0 {
- io.write_string(fi.writer, "nil")
+ io.write_string(fi.writer, "nil", &fi.n)
} else {
id := info.variants[tag-1].id
fmt_arg(fi, any{v.data, id}, verb)
@@ -1899,16 +1907,16 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
case runtime.Type_Info_Procedure:
ptr := (^rawptr)(v.data)^
if ptr == nil {
- io.write_string(fi.writer, "nil")
+ io.write_string(fi.writer, "nil", &fi.n)
} else {
- reflect.write_typeid(fi.writer, v.id)
- io.write_string(fi.writer, " @ ")
+ reflect.write_typeid(fi.writer, v.id, &fi.n)
+ io.write_string(fi.writer, " @ ", &fi.n)
fmt_pointer(fi, ptr, 'p')
}
case runtime.Type_Info_Type_Id:
id := (^typeid)(v.data)^
- reflect.write_typeid(fi.writer, id)
+ reflect.write_typeid(fi.writer, id, &fi.n)
case runtime.Type_Info_Bit_Set:
fmt_bit_set(fi, v)
@@ -1925,18 +1933,18 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
if verb == 'p' {
fmt_pointer(fi, ptr, 'p')
} else if ptr == nil {
- io.write_string(fi.writer, "[]")
+ io.write_string(fi.writer, "[]", &fi.n)
} else {
len_ptr := uintptr(v.data) + uintptr(info.base_integer.size)
len_any := any{rawptr(len_ptr), info.base_integer.id}
len, _ := reflect.as_int(len_any)
slice_type := reflect.type_info_base(info.slice).variant.(runtime.Type_Info_Slice)
- io.write_byte(fi.writer, '[')
- defer io.write_byte(fi.writer, ']')
+ io.write_byte(fi.writer, '[', &fi.n)
+ defer io.write_byte(fi.writer, ']', &fi.n)
for i in 0..<len {
- if i > 0 { io.write_string(fi.writer, ", ") }
+ if i > 0 { io.write_string(fi.writer, ", ", &fi.n) }
data := uintptr(ptr) + uintptr(i*slice_type.elem_size)
fmt_arg(fi, any{rawptr(data), slice_type.elem.id}, verb)
@@ -1944,32 +1952,32 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
}
case runtime.Type_Info_Matrix:
- io.write_string(fi.writer, "matrix[")
- defer io.write_byte(fi.writer, ']')
+ io.write_string(fi.writer, "matrix[", &fi.n)
+ defer io.write_byte(fi.writer, ']', &fi.n)
fi.indent += 1
if fi.hash {
// Printed as it is written
- io.write_byte(fi.writer, '\n')
+ io.write_byte(fi.writer, '\n', &fi.n)
for row in 0..<info.row_count {
fmt_write_indent(fi)
for col in 0..<info.column_count {
- if col > 0 { io.write_string(fi.writer, ", ") }
+ if col > 0 { io.write_string(fi.writer, ", ", &fi.n) }
offset := (row + col*info.elem_stride)*info.elem_size
data := uintptr(v.data) + uintptr(offset)
fmt_arg(fi, any{rawptr(data), info.elem.id}, verb)
}
- io.write_string(fi.writer, ",\n")
+ io.write_string(fi.writer, ",\n", &fi.n)
}
} else {
// Printed in Row-Major layout to match text layout
for row in 0..<info.row_count {
- if row > 0 { io.write_string(fi.writer, "; ") }
+ if row > 0 { io.write_string(fi.writer, "; ", &fi.n) }
for col in 0..<info.column_count {
- if col > 0 { io.write_string(fi.writer, ", ") }
+ if col > 0 { io.write_string(fi.writer, ", ", &fi.n) }
offset := (row + col*info.elem_stride)*info.elem_size
@@ -1993,10 +2001,10 @@ fmt_complex :: proc(fi: ^Info, c: complex128, bits: int, verb: rune) {
r, i := real(c), imag(c)
fmt_float(fi, r, bits/2, verb)
if !fi.plus && i >= 0 {
- io.write_rune(fi.writer, '+')
+ io.write_rune(fi.writer, '+', &fi.n)
}
fmt_float(fi, i, bits/2, verb)
- io.write_rune(fi.writer, 'i')
+ io.write_rune(fi.writer, 'i', &fi.n)
case:
fmt_bad_verb(fi, verb)
@@ -2012,22 +2020,22 @@ fmt_quaternion :: proc(fi: ^Info, q: quaternion256, bits: int, verb: rune) {
fmt_float(fi, r, bits/4, verb)
if !fi.plus && i >= 0 {
- io.write_rune(fi.writer, '+')
+ io.write_rune(fi.writer, '+', &fi.n)
}
fmt_float(fi, i, bits/4, verb)
- io.write_rune(fi.writer, 'i')
+ io.write_rune(fi.writer, 'i', &fi.n)
if !fi.plus && j >= 0 {
- io.write_rune(fi.writer, '+')
+ io.write_rune(fi.writer, '+', &fi.n)
}
fmt_float(fi, j, bits/4, verb)
- io.write_rune(fi.writer, 'j')
+ io.write_rune(fi.writer, 'j', &fi.n)
if !fi.plus && k >= 0 {
- io.write_rune(fi.writer, '+')
+ io.write_rune(fi.writer, '+', &fi.n)
}
fmt_float(fi, k, bits/4, verb)
- io.write_rune(fi.writer, 'k')
+ io.write_rune(fi.writer, 'k', &fi.n)
case:
fmt_bad_verb(fi, verb)
@@ -2047,7 +2055,7 @@ fmt_arg :: proc(fi: ^Info, arg: any, verb: rune) {
switch a in arg {
case ^runtime.Type_Info: ti = a
}
- reflect.write_type(fi.writer, ti)
+ reflect.write_type(fi.writer, ti, &fi.n)
return
}
@@ -2065,12 +2073,12 @@ fmt_arg :: proc(fi: ^Info, arg: any, verb: rune) {
custom_types: switch a in arg {
case runtime.Source_Code_Location:
if fi.hash && verb == 'v' {
- io.write_string(fi.writer, a.file_path)
- io.write_byte(fi.writer, '(')
- io.write_i64(fi.writer, i64(a.line), 10)
- io.write_byte(fi.writer, ':')
- io.write_i64(fi.writer, i64(a.column), 10)
- io.write_byte(fi.writer, ')')
+ io.write_string(fi.writer, a.file_path, &fi.n)
+ io.write_byte(fi.writer, '(', &fi.n)
+ io.write_i64(fi.writer, i64(a.line), 10, &fi.n)
+ io.write_byte(fi.writer, ':', &fi.n)
+ io.write_i64(fi.writer, i64(a.column), 10, &fi.n)
+ io.write_byte(fi.writer, ')', &fi.n)
return
}
}
@@ -2122,7 +2130,7 @@ fmt_arg :: proc(fi: ^Info, arg: any, verb: rune) {
case string: fmt_string(fi, a, verb)
case cstring: fmt_cstring(fi, a, verb)
- case typeid: reflect.write_typeid(fi.writer, a)
+ case typeid: reflect.write_typeid(fi.writer, a, &fi.n)
case i16le: fmt_int(fi, u64(a), true, 16, verb)
case u16le: fmt_int(fi, u64(a), false, 16, verb)
diff --git a/core/intrinsics/intrinsics.odin b/core/intrinsics/intrinsics.odin
index 803b04d17..c3ef787bc 100644
--- a/core/intrinsics/intrinsics.odin
+++ b/core/intrinsics/intrinsics.odin
@@ -41,6 +41,8 @@ mem_copy_non_overlapping :: proc(dst, src: rawptr, len: int) ---
mem_zero :: proc(ptr: rawptr, len: int) ---
mem_zero_volatile :: proc(ptr: rawptr, len: int) ---
+unaligned_load :: proc(src: ^$T) -> T ---
+unaligned_store :: proc(dst: ^$T, val: T) -> T ---
fixed_point_mul :: proc(lhs, rhs: $T, #const scale: uint) -> T where type_is_integer(T) ---
fixed_point_div :: proc(lhs, rhs: $T, #const scale: uint) -> T where type_is_integer(T) ---
diff --git a/core/mem/doc.odin b/core/mem/doc.odin
index 2a5ee06d3..fe53dee83 100644
--- a/core/mem/doc.odin
+++ b/core/mem/doc.odin
@@ -12,22 +12,22 @@ import "core:mem"
import "core:fmt"
_main :: proc() {
- do stuff
+ do stuff
}
main :: proc() {
- track: mem.Tracking_Allocator
- mem.tracking_allocator_init(&track, context.allocator)
- context.allocator = mem.tracking_allocator(&track)
-
- _main()
-
- for _, v in track.allocation_map {
- fmt.printf("%v leaked %v bytes", v.location, v.size)
- }
- for bf in track.bad_free_array {
- fmt.printf("%v allocation %p was freed badly", bf.location, bf.memory)
- }
+ track: mem.Tracking_Allocator
+ mem.tracking_allocator_init(&track, context.allocator)
+ context.allocator = mem.tracking_allocator(&track)
+
+ _main()
+
+ for _, leak in track.allocation_map {
+ fmt.printf("%v leaked %v bytes\n", leak.location, leak.size)
+ }
+ for bad_free in track.bad_free_array {
+ fmt.printf("%v allocation %p was freed badly\n", bad_free.location, bad_free.memory)
+ }
}
```
*/
diff --git a/core/mem/virtual/virtual.odin b/core/mem/virtual/virtual.odin
index 38c654254..2035171a7 100644
--- a/core/mem/virtual/virtual.odin
+++ b/core/mem/virtual/virtual.odin
@@ -6,25 +6,25 @@ DEFAULT_PAGE_SIZE := uint(4096)
Allocator_Error :: mem.Allocator_Error
-reserve :: proc(size: uint) -> (data: []byte, err: Allocator_Error) {
+reserve :: proc "contextless" (size: uint) -> (data: []byte, err: Allocator_Error) {
return _reserve(size)
}
-commit :: proc(data: rawptr, size: uint) -> Allocator_Error {
+commit :: proc "contextless" (data: rawptr, size: uint) -> Allocator_Error {
return _commit(data, size)
}
-reserve_and_commit :: proc(size: uint) -> (data: []byte, err: Allocator_Error) {
+reserve_and_commit :: proc "contextless" (size: uint) -> (data: []byte, err: Allocator_Error) {
data = reserve(size) or_return
commit(raw_data(data), size) or_return
return
}
-decommit :: proc(data: rawptr, size: uint) {
+decommit :: proc "contextless" (data: rawptr, size: uint) {
_decommit(data, size)
}
-release :: proc(data: rawptr, size: uint) {
+release :: proc "contextless" (data: rawptr, size: uint) {
_release(data, size)
}
@@ -36,7 +36,7 @@ Protect_Flag :: enum u32 {
Protect_Flags :: distinct bit_set[Protect_Flag; u32]
Protect_No_Access :: Protect_Flags{}
-protect :: proc(data: rawptr, size: uint, flags: Protect_Flags) -> bool {
+protect :: proc "contextless" (data: rawptr, size: uint, flags: Protect_Flags) -> bool {
return _protect(data, size, flags)
}
@@ -82,11 +82,13 @@ memory_block_alloc :: proc(committed, reserved: uint, flags: Memory_Block_Flags)
pmblock := platform_memory_alloc(0, total_size) or_return
pmblock.block.base = ([^]byte)(uintptr(pmblock) + base_offset)
- commit(pmblock.block.base, committed) or_return
+ commit_err := platform_memory_commit(pmblock, uint(base_offset) + committed)
+ assert(commit_err == nil)
+
// Should be zeroed
assert(pmblock.block.used == 0)
assert(pmblock.block.prev == nil)
- if (do_protection) {
+ if do_protection {
protect(rawptr(uintptr(pmblock) + protect_offset), page_size, Protect_No_Access)
}
@@ -105,7 +107,7 @@ memory_block_alloc :: proc(committed, reserved: uint, flags: Memory_Block_Flags)
}
alloc_from_memory_block :: proc(block: ^Memory_Block, min_size, alignment: int) -> (data: []byte, err: Allocator_Error) {
- calc_alignment_offset :: proc(block: ^Memory_Block, alignment: uintptr) -> uint {
+ calc_alignment_offset :: proc "contextless" (block: ^Memory_Block, alignment: uintptr) -> uint {
alignment_offset := uint(0)
ptr := uintptr(block.base[block.used:])
mask := alignment-1
@@ -115,23 +117,37 @@ alloc_from_memory_block :: proc(block: ^Memory_Block, min_size, alignment: int)
return alignment_offset
}
-
+ do_commit_if_necessary :: proc(block: ^Memory_Block, size: uint) -> (err: Allocator_Error) {
+ if block.committed - block.used < size {
+ pmblock := (^Platform_Memory_Block)(block)
+ base_offset := uint(uintptr(block) - uintptr(pmblock))
+ platform_total_commit := base_offset + block.used + size
+
+ assert(pmblock.committed <= pmblock.reserved)
+ assert(pmblock.committed < platform_total_commit)
+
+ platform_memory_commit(pmblock, platform_total_commit) or_return
+
+ pmblock.committed = platform_total_commit
+ block.committed = pmblock.committed - base_offset
+ }
+ return nil
+ }
+
+
alignment_offset := calc_alignment_offset(block, uintptr(alignment))
-
size := uint(min_size) + alignment_offset
-
+
if block.used + size > block.reserved {
err = .Out_Of_Memory
return
}
-
- ptr := block.base[block.used:]
- ptr = ptr[alignment_offset:]
-
+ assert(block.committed <= block.reserved)
+ do_commit_if_necessary(block, size) or_return
+
+ data = block.base[block.used+alignment_offset:][:min_size]
block.used += size
- assert(block.used <= block.reserved)
-
- return ptr[:min_size], nil
+ return
}
diff --git a/core/mem/virtual/virtual_linux.odin b/core/mem/virtual/virtual_linux.odin
index 71a56e499..6ae926e47 100644
--- a/core/mem/virtual/virtual_linux.odin
+++ b/core/mem/virtual/virtual_linux.odin
@@ -58,7 +58,7 @@ madvise :: proc "contextless" (addr: rawptr, length: uint, advice: c.int) -> c.i
}
-_reserve :: proc(size: uint) -> (data: []byte, err: Allocator_Error) {
+_reserve :: proc "contextless" (size: uint) -> (data: []byte, err: Allocator_Error) {
MAP_FAILED := rawptr(~uintptr(0))
result := mmap(nil, size, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
if result == MAP_FAILED {
@@ -67,7 +67,7 @@ _reserve :: proc(size: uint) -> (data: []byte, err: Allocator_Error) {
return ([^]byte)(result)[:size], nil
}
-_commit :: proc(data: rawptr, size: uint) -> Allocator_Error {
+_commit :: proc "contextless" (data: rawptr, size: uint) -> Allocator_Error {
result := mprotect(data, size, PROT_READ|PROT_WRITE)
if result != 0 {
// TODO(bill): Handle error value correctly
@@ -75,14 +75,14 @@ _commit :: proc(data: rawptr, size: uint) -> Allocator_Error {
}
return nil
}
-_decommit :: proc(data: rawptr, size: uint) {
+_decommit :: proc "contextless" (data: rawptr, size: uint) {
mprotect(data, size, PROT_NONE)
madvise(data, size, MADV_FREE)
}
-_release :: proc(data: rawptr, size: uint) {
+_release :: proc "contextless" (data: rawptr, size: uint) {
munmap(data, size)
}
-_protect :: proc(data: rawptr, size: uint, flags: Protect_Flags) -> bool {
+_protect :: proc "contextless" (data: rawptr, size: uint, flags: Protect_Flags) -> bool {
pflags: c.int
pflags = PROT_NONE
if .Read in flags { pflags |= PROT_READ }
diff --git a/core/mem/virtual/virtual_platform.odin b/core/mem/virtual/virtual_platform.odin
index c4211ba5e..d707bc427 100644
--- a/core/mem/virtual/virtual_platform.odin
+++ b/core/mem/virtual/virtual_platform.odin
@@ -4,12 +4,13 @@ package mem_virtual
import sync "core:sync/sync2"
Platform_Memory_Block :: struct {
- block: Memory_Block,
- reserved: uint,
+ block: Memory_Block,
+ committed: uint,
+ reserved: uint,
prev, next: ^Platform_Memory_Block,
}
-platform_memory_alloc :: proc(to_commit, to_reserve: uint) -> (block: ^Platform_Memory_Block, err: Allocator_Error) {
+platform_memory_alloc :: proc "contextless" (to_commit, to_reserve: uint) -> (block: ^Platform_Memory_Block, err: Allocator_Error) {
to_commit, to_reserve := to_commit, to_reserve
to_reserve = max(to_commit, to_reserve)
@@ -20,12 +21,13 @@ platform_memory_alloc :: proc(to_commit, to_reserve: uint) -> (block: ^Platform_
commit(raw_data(data), to_commit)
block = (^Platform_Memory_Block)(raw_data(data))
- block.reserved = to_reserve
+ block.committed = to_commit
+ block.reserved = to_reserve
return
}
-platform_memory_free :: proc(block: ^Platform_Memory_Block) {
+platform_memory_free :: proc "contextless" (block: ^Platform_Memory_Block) {
if block != nil {
release(block, block.reserved)
}
@@ -52,3 +54,17 @@ platform_memory_init :: proc() {
global_platform_memory_block_sentinel_set = true
}
}
+
+platform_memory_commit :: proc "contextless" (block: ^Platform_Memory_Block, to_commit: uint) -> (err: Allocator_Error) {
+ if to_commit < block.committed {
+ return nil
+ }
+ if to_commit > block.reserved {
+ return .Out_Of_Memory
+ }
+
+
+ commit(block, to_commit) or_return
+ block.committed = to_commit
+ return nil
+}
diff --git a/core/mem/virtual/virtual_windows.odin b/core/mem/virtual/virtual_windows.odin
index 623e8d469..ef0bf6f1a 100644
--- a/core/mem/virtual/virtual_windows.odin
+++ b/core/mem/virtual/virtual_windows.odin
@@ -62,7 +62,7 @@ foreign Kernel32 {
}
-_reserve :: proc(size: uint) -> (data: []byte, err: Allocator_Error) {
+_reserve :: proc "contextless" (size: uint) -> (data: []byte, err: Allocator_Error) {
result := VirtualAlloc(nil, size, MEM_RESERVE, PAGE_READWRITE)
if result == nil {
err = .Out_Of_Memory
@@ -72,7 +72,7 @@ _reserve :: proc(size: uint) -> (data: []byte, err: Allocator_Error) {
return
}
-_commit :: proc(data: rawptr, size: uint) -> Allocator_Error {
+_commit :: proc "contextless" (data: rawptr, size: uint) -> Allocator_Error {
result := VirtualAlloc(data, size, MEM_COMMIT, PAGE_READWRITE)
if result == nil {
switch err := GetLastError(); err {
@@ -85,13 +85,13 @@ _commit :: proc(data: rawptr, size: uint) -> Allocator_Error {
}
return nil
}
-_decommit :: proc(data: rawptr, size: uint) {
+_decommit :: proc "contextless" (data: rawptr, size: uint) {
VirtualFree(data, size, MEM_DECOMMIT)
}
-_release :: proc(data: rawptr, size: uint) {
+_release :: proc "contextless" (data: rawptr, size: uint) {
VirtualFree(data, 0, MEM_RELEASE)
}
-_protect :: proc(data: rawptr, size: uint, flags: Protect_Flags) -> bool {
+_protect :: proc "contextless" (data: rawptr, size: uint, flags: Protect_Flags) -> bool {
pflags: u32
pflags = PAGE_NOACCESS
switch flags {
diff --git a/core/odin/ast/ast.odin b/core/odin/ast/ast.odin
index 8eb0def44..740299539 100644
--- a/core/odin/ast/ast.odin
+++ b/core/odin/ast/ast.odin
@@ -34,7 +34,7 @@ Node :: struct {
pos: tokenizer.Pos,
end: tokenizer.Pos,
state_flags: Node_State_Flags,
- derived: any,
+ derived: Any_Node,
}
Comment_Group :: struct {
@@ -88,9 +88,11 @@ File :: struct {
Expr :: struct {
using expr_base: Node,
+ derived_expr: Any_Expr,
}
Stmt :: struct {
using stmt_base: Node,
+ derived_stmt: Any_Stmt,
}
Decl :: struct {
using decl_base: Stmt,
@@ -541,7 +543,7 @@ unparen_expr :: proc(expr: ^Expr) -> (val: ^Expr) {
return
}
for {
- e, ok := val.derived.(Paren_Expr)
+ e, ok := val.derived.(^Paren_Expr)
if !ok || e.expr == nil {
break
}
@@ -758,4 +760,173 @@ Matrix_Type :: struct {
row_count: ^Expr,
column_count: ^Expr,
elem: ^Expr,
-} \ No newline at end of file
+}
+
+
+Any_Node :: union {
+ ^Package,
+ ^File,
+ ^Comment_Group,
+
+ ^Bad_Expr,
+ ^Ident,
+ ^Implicit,
+ ^Undef,
+ ^Basic_Lit,
+ ^Basic_Directive,
+ ^Ellipsis,
+ ^Proc_Lit,
+ ^Comp_Lit,
+ ^Tag_Expr,
+ ^Unary_Expr,
+ ^Binary_Expr,
+ ^Paren_Expr,
+ ^Selector_Expr,
+ ^Implicit_Selector_Expr,
+ ^Selector_Call_Expr,
+ ^Index_Expr,
+ ^Deref_Expr,
+ ^Slice_Expr,
+ ^Matrix_Index_Expr,
+ ^Call_Expr,
+ ^Field_Value,
+ ^Ternary_If_Expr,
+ ^Ternary_When_Expr,
+ ^Or_Else_Expr,
+ ^Or_Return_Expr,
+ ^Type_Assertion,
+ ^Type_Cast,
+ ^Auto_Cast,
+ ^Inline_Asm_Expr,
+
+ ^Proc_Group,
+
+ ^Typeid_Type,
+ ^Helper_Type,
+ ^Distinct_Type,
+ ^Poly_Type,
+ ^Proc_Type,
+ ^Pointer_Type,
+ ^Multi_Pointer_Type,
+ ^Array_Type,
+ ^Dynamic_Array_Type,
+ ^Struct_Type,
+ ^Union_Type,
+ ^Enum_Type,
+ ^Bit_Set_Type,
+ ^Map_Type,
+ ^Relative_Type,
+ ^Matrix_Type,
+
+ ^Bad_Stmt,
+ ^Empty_Stmt,
+ ^Expr_Stmt,
+ ^Tag_Stmt,
+ ^Assign_Stmt,
+ ^Block_Stmt,
+ ^If_Stmt,
+ ^When_Stmt,
+ ^Return_Stmt,
+ ^Defer_Stmt,
+ ^For_Stmt,
+ ^Range_Stmt,
+ ^Inline_Range_Stmt,
+ ^Case_Clause,
+ ^Switch_Stmt,
+ ^Type_Switch_Stmt,
+ ^Branch_Stmt,
+ ^Using_Stmt,
+
+ ^Bad_Decl,
+ ^Value_Decl,
+ ^Package_Decl,
+ ^Import_Decl,
+ ^Foreign_Block_Decl,
+ ^Foreign_Import_Decl,
+
+ ^Attribute,
+ ^Field,
+ ^Field_List,
+}
+
+
+Any_Expr :: union {
+ ^Bad_Expr,
+ ^Ident,
+ ^Implicit,
+ ^Undef,
+ ^Basic_Lit,
+ ^Basic_Directive,
+ ^Ellipsis,
+ ^Proc_Lit,
+ ^Comp_Lit,
+ ^Tag_Expr,
+ ^Unary_Expr,
+ ^Binary_Expr,
+ ^Paren_Expr,
+ ^Selector_Expr,
+ ^Implicit_Selector_Expr,
+ ^Selector_Call_Expr,
+ ^Index_Expr,
+ ^Deref_Expr,
+ ^Slice_Expr,
+ ^Matrix_Index_Expr,
+ ^Call_Expr,
+ ^Field_Value,
+ ^Ternary_If_Expr,
+ ^Ternary_When_Expr,
+ ^Or_Else_Expr,
+ ^Or_Return_Expr,
+ ^Type_Assertion,
+ ^Type_Cast,
+ ^Auto_Cast,
+ ^Inline_Asm_Expr,
+
+ ^Proc_Group,
+
+ ^Typeid_Type,
+ ^Helper_Type,
+ ^Distinct_Type,
+ ^Poly_Type,
+ ^Proc_Type,
+ ^Pointer_Type,
+ ^Multi_Pointer_Type,
+ ^Array_Type,
+ ^Dynamic_Array_Type,
+ ^Struct_Type,
+ ^Union_Type,
+ ^Enum_Type,
+ ^Bit_Set_Type,
+ ^Map_Type,
+ ^Relative_Type,
+ ^Matrix_Type,
+}
+
+
+Any_Stmt :: union {
+ ^Bad_Stmt,
+ ^Empty_Stmt,
+ ^Expr_Stmt,
+ ^Tag_Stmt,
+ ^Assign_Stmt,
+ ^Block_Stmt,
+ ^If_Stmt,
+ ^When_Stmt,
+ ^Return_Stmt,
+ ^Defer_Stmt,
+ ^For_Stmt,
+ ^Range_Stmt,
+ ^Inline_Range_Stmt,
+ ^Case_Clause,
+ ^Switch_Stmt,
+ ^Type_Switch_Stmt,
+ ^Branch_Stmt,
+ ^Using_Stmt,
+
+ ^Bad_Decl,
+ ^Value_Decl,
+ ^Package_Decl,
+ ^Import_Decl,
+ ^Foreign_Block_Decl,
+ ^Foreign_Import_Decl,
+}
diff --git a/core/odin/ast/clone.odin b/core/odin/ast/clone.odin
index 1e3058678..400c064f5 100644
--- a/core/odin/ast/clone.odin
+++ b/core/odin/ast/clone.odin
@@ -1,16 +1,25 @@
package odin_ast
+import "core:intrinsics"
import "core:mem"
import "core:fmt"
+import "core:reflect"
import "core:odin/tokenizer"
+_ :: intrinsics
new :: proc($T: typeid, pos, end: tokenizer.Pos) -> ^T {
n, _ := mem.new(T)
n.pos = pos
n.end = end
- n.derived = n^
+ n.derived = n
base: ^Node = n // dummy check
_ = base // "Use" type to make -vet happy
+ when intrinsics.type_has_field(T, "derived_expr") {
+ n.derived_expr = n
+ }
+ when intrinsics.type_has_field(T, "derived_stmt") {
+ n.derived_stmt = n
+ }
return n
}
@@ -59,232 +68,257 @@ clone_node :: proc(node: ^Node) -> ^Node {
return nil
}
- size := size_of(Node)
+ size := size_of(Node)
align := align_of(Node)
- ti := type_info_of(node.derived.id)
+ ti := reflect.union_variant_type_info(node.derived)
if ti != nil {
- size = ti.size
- align = ti.align
+ elem := ti.variant.(reflect.Type_Info_Pointer).elem
+ size = elem.size
+ align = elem.align
}
- switch in node.derived {
- case Package, File:
+ #partial switch in node.derived {
+ case ^Package, ^File:
panic("Cannot clone this node type")
}
res := cast(^Node)mem.alloc(size, align)
src: rawptr = node
if node.derived != nil {
- src = node.derived.data
+ src = (^rawptr)(&node.derived)^
}
mem.copy(res, src, size)
- res.derived.data = rawptr(res)
- res.derived.id = node.derived.id
+ res_ptr_any: any
+ res_ptr_any.data = &res
+ res_ptr_any.id = ti.id
+
+ reflect.set_union_value(res.derived, res_ptr_any)
- switch r in &res.derived {
- case Bad_Expr:
- case Ident:
- case Implicit:
- case Undef:
- case Basic_Lit:
+ res_ptr := reflect.deref(res_ptr_any)
+
+ if de := reflect.struct_field_value_by_name(res_ptr, "derived_expr", true); de != nil {
+ reflect.set_union_value(de, res_ptr_any)
+ }
+ if ds := reflect.struct_field_value_by_name(res_ptr, "derived_stmt", true); ds != nil {
+ reflect.set_union_value(ds, res_ptr_any)
+ }
- case Ellipsis:
+ if res.derived != nil do switch r in res.derived {
+ case ^Package, ^File:
+ case ^Bad_Expr:
+ case ^Ident:
+ case ^Implicit:
+ case ^Undef:
+ case ^Basic_Lit:
+ case ^Basic_Directive:
+ case ^Comment_Group:
+
+ case ^Ellipsis:
r.expr = clone(r.expr)
- case Proc_Lit:
+ case ^Proc_Lit:
r.type = auto_cast clone(r.type)
r.body = clone(r.body)
- case Comp_Lit:
+ case ^Comp_Lit:
r.type = clone(r.type)
r.elems = clone(r.elems)
- case Tag_Expr:
+ case ^Tag_Expr:
r.expr = clone(r.expr)
- case Unary_Expr:
+ case ^Unary_Expr:
r.expr = clone(r.expr)
- case Binary_Expr:
+ case ^Binary_Expr:
r.left = clone(r.left)
r.right = clone(r.right)
- case Paren_Expr:
+ case ^Paren_Expr:
r.expr = clone(r.expr)
- case Selector_Expr:
+ case ^Selector_Expr:
r.expr = clone(r.expr)
r.field = auto_cast clone(r.field)
- case Implicit_Selector_Expr:
+ case ^Implicit_Selector_Expr:
r.field = auto_cast clone(r.field)
- case Selector_Call_Expr:
+ case ^Selector_Call_Expr:
r.expr = clone(r.expr)
r.call = auto_cast clone(r.call)
- case Index_Expr:
+ case ^Index_Expr:
r.expr = clone(r.expr)
r.index = clone(r.index)
- case Matrix_Index_Expr:
+ case ^Matrix_Index_Expr:
r.expr = clone(r.expr)
r.row_index = clone(r.row_index)
r.column_index = clone(r.column_index)
- case Deref_Expr:
+ case ^Deref_Expr:
r.expr = clone(r.expr)
- case Slice_Expr:
+ case ^Slice_Expr:
r.expr = clone(r.expr)
r.low = clone(r.low)
r.high = clone(r.high)
- case Call_Expr:
+ case ^Call_Expr:
r.expr = clone(r.expr)
r.args = clone(r.args)
- case Field_Value:
+ case ^Field_Value:
r.field = clone(r.field)
r.value = clone(r.value)
- case Ternary_If_Expr:
+ case ^Ternary_If_Expr:
r.x = clone(r.x)
r.cond = clone(r.cond)
r.y = clone(r.y)
- case Ternary_When_Expr:
+ case ^Ternary_When_Expr:
r.x = clone(r.x)
r.cond = clone(r.cond)
r.y = clone(r.y)
- case Or_Else_Expr:
+ case ^Or_Else_Expr:
r.x = clone(r.x)
r.y = clone(r.y)
- case Or_Return_Expr:
+ case ^Or_Return_Expr:
r.expr = clone(r.expr)
- case Type_Assertion:
+ case ^Type_Assertion:
r.expr = clone(r.expr)
r.type = clone(r.type)
- case Type_Cast:
+ case ^Type_Cast:
r.type = clone(r.type)
r.expr = clone(r.expr)
- case Auto_Cast:
+ case ^Auto_Cast:
r.expr = clone(r.expr)
- case Inline_Asm_Expr:
+ case ^Inline_Asm_Expr:
r.param_types = clone(r.param_types)
r.return_type = clone(r.return_type)
r.constraints_string = clone(r.constraints_string)
r.asm_string = clone(r.asm_string)
- case Bad_Stmt:
+ case ^Bad_Stmt:
// empty
- case Empty_Stmt:
+ case ^Empty_Stmt:
// empty
- case Expr_Stmt:
+ case ^Expr_Stmt:
r.expr = clone(r.expr)
- case Tag_Stmt:
+ case ^Tag_Stmt:
r.stmt = clone(r.stmt)
- case Assign_Stmt:
+ case ^Assign_Stmt:
r.lhs = clone(r.lhs)
r.rhs = clone(r.rhs)
- case Block_Stmt:
+ case ^Block_Stmt:
r.label = clone(r.label)
r.stmts = clone(r.stmts)
- case If_Stmt:
+ case ^If_Stmt:
r.label = clone(r.label)
r.init = clone(r.init)
r.cond = clone(r.cond)
r.body = clone(r.body)
r.else_stmt = clone(r.else_stmt)
- case When_Stmt:
+ case ^When_Stmt:
r.cond = clone(r.cond)
r.body = clone(r.body)
r.else_stmt = clone(r.else_stmt)
- case Return_Stmt:
+ case ^Return_Stmt:
r.results = clone(r.results)
- case Defer_Stmt:
+ case ^Defer_Stmt:
r.stmt = clone(r.stmt)
- case For_Stmt:
+ case ^For_Stmt:
r.label = clone(r.label)
r.init = clone(r.init)
r.cond = clone(r.cond)
r.post = clone(r.post)
r.body = clone(r.body)
- case Range_Stmt:
+ case ^Range_Stmt:
r.label = clone(r.label)
r.vals = clone(r.vals)
r.expr = clone(r.expr)
r.body = clone(r.body)
- case Case_Clause:
+ case ^Inline_Range_Stmt:
+ r.label = clone(r.label)
+ r.val0 = clone(r.val0)
+ r.val1 = clone(r.val1)
+ r.expr = clone(r.expr)
+ r.body = clone(r.body)
+ case ^Case_Clause:
r.list = clone(r.list)
r.body = clone(r.body)
- case Switch_Stmt:
+ case ^Switch_Stmt:
r.label = clone(r.label)
r.init = clone(r.init)
r.cond = clone(r.cond)
r.body = clone(r.body)
- case Type_Switch_Stmt:
+ case ^Type_Switch_Stmt:
r.label = clone(r.label)
r.tag = clone(r.tag)
r.expr = clone(r.expr)
r.body = clone(r.body)
- case Branch_Stmt:
+ case ^Branch_Stmt:
r.label = auto_cast clone(r.label)
- case Using_Stmt:
+ case ^Using_Stmt:
r.list = clone(r.list)
- case Bad_Decl:
- case Value_Decl:
+ case ^Bad_Decl:
+ case ^Value_Decl:
r.attributes = clone(r.attributes)
r.names = clone(r.names)
r.type = clone(r.type)
r.values = clone(r.values)
- case Package_Decl:
- case Import_Decl:
- case Foreign_Block_Decl:
+ case ^Package_Decl:
+ case ^Import_Decl:
+ case ^Foreign_Block_Decl:
r.attributes = clone(r.attributes)
r.foreign_library = clone(r.foreign_library)
r.body = clone(r.body)
- case Foreign_Import_Decl:
+ case ^Foreign_Import_Decl:
r.name = auto_cast clone(r.name)
- case Proc_Group:
+ case ^Proc_Group:
r.args = clone(r.args)
- case Attribute:
+ case ^Attribute:
r.elems = clone(r.elems)
- case Field:
+ case ^Field:
r.names = clone(r.names)
r.type = clone(r.type)
r.default_value = clone(r.default_value)
- case Field_List:
+ case ^Field_List:
r.list = clone(r.list)
- case Typeid_Type:
+ case ^Typeid_Type:
r.specialization = clone(r.specialization)
- case Helper_Type:
+ case ^Helper_Type:
r.type = clone(r.type)
- case Distinct_Type:
+ case ^Distinct_Type:
r.type = clone(r.type)
- case Poly_Type:
+ case ^Poly_Type:
r.type = auto_cast clone(r.type)
r.specialization = clone(r.specialization)
- case Proc_Type:
+ case ^Proc_Type:
r.params = auto_cast clone(r.params)
r.results = auto_cast clone(r.results)
- case Pointer_Type:
+ case ^Pointer_Type:
r.elem = clone(r.elem)
- case Multi_Pointer_Type:
+ case ^Multi_Pointer_Type:
r.elem = clone(r.elem)
- case Array_Type:
+ case ^Array_Type:
r.len = clone(r.len)
r.elem = clone(r.elem)
- case Dynamic_Array_Type:
+ case ^Dynamic_Array_Type:
r.elem = clone(r.elem)
- case Struct_Type:
+ case ^Struct_Type:
r.poly_params = auto_cast clone(r.poly_params)
r.align = clone(r.align)
r.fields = auto_cast clone(r.fields)
- case Union_Type:
+ case ^Union_Type:
r.poly_params = auto_cast clone(r.poly_params)
r.align = clone(r.align)
r.variants = clone(r.variants)
- case Enum_Type:
+ case ^Enum_Type:
r.base_type = clone(r.base_type)
r.fields = clone(r.fields)
- case Bit_Set_Type:
+ case ^Bit_Set_Type:
r.elem = clone(r.elem)
r.underlying = clone(r.underlying)
- case Map_Type:
+ case ^Map_Type:
r.key = clone(r.key)
r.value = clone(r.value)
- case Matrix_Type:
+ case ^Matrix_Type:
r.row_count = clone(r.row_count)
r.column_count = clone(r.column_count)
r.elem = clone(r.elem)
+ case ^Relative_Type:
+ r.tag = clone(r.tag)
+ r.type = clone(r.type)
case:
- fmt.panicf("Unhandled node kind: %T", r)
+ fmt.panicf("Unhandled node kind: %v", r)
}
return res
diff --git a/core/odin/ast/walk.odin b/core/odin/ast/walk.odin
index d0d17cc9e..7241d283f 100644
--- a/core/odin/ast/walk.odin
+++ b/core/odin/ast/walk.odin
@@ -59,64 +59,64 @@ walk :: proc(v: ^Visitor, node: ^Node) {
}
switch n in &node.derived {
- case File:
+ case ^File:
if n.docs != nil {
walk(v, n.docs)
}
walk_stmt_list(v, n.decls[:])
- case Package:
+ case ^Package:
for _, f in n.files {
walk(v, f)
}
- case Comment_Group:
+ case ^Comment_Group:
// empty
- case Bad_Expr:
- case Ident:
- case Implicit:
- case Undef:
- case Basic_Lit:
- case Basic_Directive:
- case Ellipsis:
+ case ^Bad_Expr:
+ case ^Ident:
+ case ^Implicit:
+ case ^Undef:
+ case ^Basic_Lit:
+ case ^Basic_Directive:
+ case ^Ellipsis:
if n.expr != nil {
walk(v, n.expr)
}
- case Proc_Lit:
+ case ^Proc_Lit:
walk(v, n.type)
walk(v, n.body)
walk_expr_list(v, n.where_clauses)
- case Comp_Lit:
+ case ^Comp_Lit:
if n.type != nil {
walk(v, n.type)
}
walk_expr_list(v, n.elems)
- case Tag_Expr:
+ case ^Tag_Expr:
walk(v, n.expr)
- case Unary_Expr:
+ case ^Unary_Expr:
walk(v, n.expr)
- case Binary_Expr:
+ case ^Binary_Expr:
walk(v, n.left)
walk(v, n.right)
- case Paren_Expr:
+ case ^Paren_Expr:
walk(v, n.expr)
- case Selector_Expr:
+ case ^Selector_Expr:
walk(v, n.expr)
walk(v, n.field)
- case Implicit_Selector_Expr:
+ case ^Implicit_Selector_Expr:
walk(v, n.field)
- case Selector_Call_Expr:
+ case ^Selector_Call_Expr:
walk(v, n.expr)
walk(v, n.call)
- case Index_Expr:
+ case ^Index_Expr:
walk(v, n.expr)
walk(v, n.index)
- case Matrix_Index_Expr:
+ case ^Matrix_Index_Expr:
walk(v, n.expr)
walk(v, n.row_index)
walk(v, n.column_index)
- case Deref_Expr:
+ case ^Deref_Expr:
walk(v, n.expr)
- case Slice_Expr:
+ case ^Slice_Expr:
walk(v, n.expr)
if n.low != nil {
walk(v, n.low)
@@ -124,57 +124,57 @@ walk :: proc(v: ^Visitor, node: ^Node) {
if n.high != nil {
walk(v, n.high)
}
- case Call_Expr:
+ case ^Call_Expr:
walk(v, n.expr)
walk_expr_list(v, n.args)
- case Field_Value:
+ case ^Field_Value:
walk(v, n.field)
walk(v, n.value)
- case Ternary_If_Expr:
+ case ^Ternary_If_Expr:
walk(v, n.x)
walk(v, n.cond)
walk(v, n.y)
- case Ternary_When_Expr:
+ case ^Ternary_When_Expr:
walk(v, n.x)
walk(v, n.cond)
walk(v, n.y)
- case Or_Else_Expr:
+ case ^Or_Else_Expr:
walk(v, n.x)
walk(v, n.y)
- case Or_Return_Expr:
+ case ^Or_Return_Expr:
walk(v, n.expr)
- case Type_Assertion:
+ case ^Type_Assertion:
walk(v, n.expr)
if n.type != nil {
walk(v, n.type)
}
- case Type_Cast:
+ case ^Type_Cast:
walk(v, n.type)
walk(v, n.expr)
- case Auto_Cast:
+ case ^Auto_Cast:
walk(v, n.expr)
- case Inline_Asm_Expr:
+ case ^Inline_Asm_Expr:
walk_expr_list(v, n.param_types)
walk(v, n.return_type)
walk(v, n.constraints_string)
walk(v, n.asm_string)
- case Bad_Stmt:
- case Empty_Stmt:
- case Expr_Stmt:
+ case ^Bad_Stmt:
+ case ^Empty_Stmt:
+ case ^Expr_Stmt:
walk(v, n.expr)
- case Tag_Stmt:
+ case ^Tag_Stmt:
walk(v, n.stmt)
- case Assign_Stmt:
+ case ^Assign_Stmt:
walk_expr_list(v, n.lhs)
walk_expr_list(v, n.rhs)
- case Block_Stmt:
+ case ^Block_Stmt:
if n.label != nil {
walk(v, n.label)
}
walk_stmt_list(v, n.stmts)
- case If_Stmt:
+ case ^If_Stmt:
if n.label != nil {
walk(v, n.label)
}
@@ -186,17 +186,17 @@ walk :: proc(v: ^Visitor, node: ^Node) {
if n.else_stmt != nil {
walk(v, n.else_stmt)
}
- case When_Stmt:
+ case ^When_Stmt:
walk(v, n.cond)
walk(v, n.body)
if n.else_stmt != nil {
walk(v, n.else_stmt)
}
- case Return_Stmt:
+ case ^Return_Stmt:
walk_expr_list(v, n.results)
- case Defer_Stmt:
+ case ^Defer_Stmt:
walk(v, n.stmt)
- case For_Stmt:
+ case ^For_Stmt:
if n.label != nil {
walk(v, n.label)
}
@@ -210,7 +210,7 @@ walk :: proc(v: ^Visitor, node: ^Node) {
walk(v, n.post)
}
walk(v, n.body)
- case Range_Stmt:
+ case ^Range_Stmt:
if n.label != nil {
walk(v, n.label)
}
@@ -221,7 +221,7 @@ walk :: proc(v: ^Visitor, node: ^Node) {
}
walk(v, n.expr)
walk(v, n.body)
- case Inline_Range_Stmt:
+ case ^Inline_Range_Stmt:
if n.label != nil {
walk(v, n.label)
}
@@ -233,10 +233,10 @@ walk :: proc(v: ^Visitor, node: ^Node) {
}
walk(v, n.expr)
walk(v, n.body)
- case Case_Clause:
+ case ^Case_Clause:
walk_expr_list(v, n.list)
walk_stmt_list(v, n.body)
- case Switch_Stmt:
+ case ^Switch_Stmt:
if n.label != nil {
walk(v, n.label)
}
@@ -247,7 +247,7 @@ walk :: proc(v: ^Visitor, node: ^Node) {
walk(v, n.cond)
}
walk(v, n.body)
- case Type_Switch_Stmt:
+ case ^Type_Switch_Stmt:
if n.label != nil {
walk(v, n.label)
}
@@ -258,16 +258,16 @@ walk :: proc(v: ^Visitor, node: ^Node) {
walk(v, n.expr)
}
walk(v, n.body)
- case Branch_Stmt:
+ case ^Branch_Stmt:
if n.label != nil {
walk(v, n.label)
}
- case Using_Stmt:
+ case ^Using_Stmt:
walk_expr_list(v, n.list)
- case Bad_Decl:
- case Value_Decl:
+ case ^Bad_Decl:
+ case ^Value_Decl:
if n.docs != nil {
walk(v, n.docs)
}
@@ -280,21 +280,21 @@ walk :: proc(v: ^Visitor, node: ^Node) {
if n.comment != nil {
walk(v, n.comment)
}
- case Package_Decl:
+ case ^Package_Decl:
if n.docs != nil {
walk(v, n.docs)
}
if n.comment != nil {
walk(v, n.comment)
}
- case Import_Decl:
+ case ^Import_Decl:
if n.docs != nil {
walk(v, n.docs)
}
if n.comment != nil {
walk(v, n.comment)
}
- case Foreign_Block_Decl:
+ case ^Foreign_Block_Decl:
if n.docs != nil {
walk(v, n.docs)
}
@@ -303,7 +303,7 @@ walk :: proc(v: ^Visitor, node: ^Node) {
walk(v, n.foreign_library)
}
walk(v, n.body)
- case Foreign_Import_Decl:
+ case ^Foreign_Import_Decl:
if n.docs != nil {
walk(v, n.docs)
}
@@ -313,11 +313,11 @@ walk :: proc(v: ^Visitor, node: ^Node) {
walk(v, n.comment)
}
- case Proc_Group:
+ case ^Proc_Group:
walk_expr_list(v, n.args)
- case Attribute:
+ case ^Attribute:
walk_expr_list(v, n.elems)
- case Field:
+ case ^Field:
if n.docs != nil {
walk(v, n.docs)
}
@@ -331,31 +331,31 @@ walk :: proc(v: ^Visitor, node: ^Node) {
if n.comment != nil {
walk(v, n.comment)
}
- case Field_List:
+ case ^Field_List:
for x in n.list {
walk(v, x)
}
- case Typeid_Type:
+ case ^Typeid_Type:
if n.specialization != nil {
walk(v, n.specialization)
}
- case Helper_Type:
+ case ^Helper_Type:
walk(v, n.type)
- case Distinct_Type:
+ case ^Distinct_Type:
walk(v, n.type)
- case Poly_Type:
+ case ^Poly_Type:
walk(v, n.type)
if n.specialization != nil {
walk(v, n.specialization)
}
- case Proc_Type:
+ case ^Proc_Type:
walk(v, n.params)
walk(v, n.results)
- case Pointer_Type:
+ case ^Pointer_Type:
walk(v, n.elem)
- case Multi_Pointer_Type:
+ case ^Multi_Pointer_Type:
walk(v, n.elem)
- case Array_Type:
+ case ^Array_Type:
if n.tag != nil {
walk(v, n.tag)
}
@@ -363,12 +363,12 @@ walk :: proc(v: ^Visitor, node: ^Node) {
walk(v, n.len)
}
walk(v, n.elem)
- case Dynamic_Array_Type:
+ case ^Dynamic_Array_Type:
if n.tag != nil {
walk(v, n.tag)
}
walk(v, n.elem)
- case Struct_Type:
+ case ^Struct_Type:
if n.poly_params != nil {
walk(v, n.poly_params)
}
@@ -377,7 +377,7 @@ walk :: proc(v: ^Visitor, node: ^Node) {
}
walk_expr_list(v, n.where_clauses)
walk(v, n.fields)
- case Union_Type:
+ case ^Union_Type:
if n.poly_params != nil {
walk(v, n.poly_params)
}
@@ -386,23 +386,23 @@ walk :: proc(v: ^Visitor, node: ^Node) {
}
walk_expr_list(v, n.where_clauses)
walk_expr_list(v, n.variants)
- case Enum_Type:
+ case ^Enum_Type:
if n.base_type != nil {
walk(v, n.base_type)
}
walk_expr_list(v, n.fields)
- case Bit_Set_Type:
+ case ^Bit_Set_Type:
walk(v, n.elem)
if n.underlying != nil {
walk(v, n.underlying)
}
- case Map_Type:
+ case ^Map_Type:
walk(v, n.key)
walk(v, n.value)
- case Relative_Type:
+ case ^Relative_Type:
walk(v, n.tag)
walk(v, n.type)
- case Matrix_Type:
+ case ^Matrix_Type:
walk(v, n.row_count)
walk(v, n.column_count)
walk(v, n.elem)
diff --git a/core/odin/parser/parser.odin b/core/odin/parser/parser.odin
index cfd860bfa..1546dce2d 100644
--- a/core/odin/parser/parser.odin
+++ b/core/odin/parser/parser.odin
@@ -195,10 +195,10 @@ parse_file :: proc(p: ^Parser, file: ^ast.File) -> bool {
for p.curr_tok.kind != .EOF {
stmt := parse_stmt(p)
if stmt != nil {
- if _, ok := stmt.derived.(ast.Empty_Stmt); !ok {
+ if _, ok := stmt.derived.(^ast.Empty_Stmt); !ok {
append(&p.file.decls, stmt)
- if es, es_ok := stmt.derived.(ast.Expr_Stmt); es_ok && es.expr != nil {
- if _, pl_ok := es.expr.derived.(ast.Proc_Lit); pl_ok {
+ if es, es_ok := stmt.derived.(^ast.Expr_Stmt); es_ok && es.expr != nil {
+ if _, pl_ok := es.expr.derived.(^ast.Proc_Lit); pl_ok {
error(p, stmt.pos, "procedure literal evaluated but not used")
}
}
@@ -459,7 +459,7 @@ is_blank_ident_token :: proc(tok: tokenizer.Token) -> bool {
return false
}
is_blank_ident_node :: proc(node: ^ast.Node) -> bool {
- if ident, ok := node.derived.(ast.Ident); ok {
+ if ident, ok := node.derived.(^ast.Ident); ok {
return is_blank_ident(ident.name)
}
return true
@@ -502,34 +502,34 @@ is_semicolon_optional_for_node :: proc(p: ^Parser, node: ^ast.Node) -> bool {
return true
}
- switch n in node.derived {
- case ast.Empty_Stmt, ast.Block_Stmt:
+ #partial switch n in node.derived {
+ case ^ast.Empty_Stmt, ^ast.Block_Stmt:
return true
- case ast.If_Stmt, ast.When_Stmt,
- ast.For_Stmt, ast.Range_Stmt, ast.Inline_Range_Stmt,
- ast.Switch_Stmt, ast.Type_Switch_Stmt:
+ case ^ast.If_Stmt, ^ast.When_Stmt,
+ ^ast.For_Stmt, ^ast.Range_Stmt, ^ast.Inline_Range_Stmt,
+ ^ast.Switch_Stmt, ^ast.Type_Switch_Stmt:
return true
- case ast.Helper_Type:
+ case ^ast.Helper_Type:
return is_semicolon_optional_for_node(p, n.type)
- case ast.Distinct_Type:
+ case ^ast.Distinct_Type:
return is_semicolon_optional_for_node(p, n.type)
- case ast.Pointer_Type:
+ case ^ast.Pointer_Type:
return is_semicolon_optional_for_node(p, n.elem)
- case ast.Struct_Type, ast.Union_Type, ast.Enum_Type:
+ case ^ast.Struct_Type, ^ast.Union_Type, ^ast.Enum_Type:
// Require semicolon within a procedure body
return p.curr_proc == nil
- case ast.Proc_Lit:
+ case ^ast.Proc_Lit:
return true
- case ast.Package_Decl, ast.Import_Decl, ast.Foreign_Import_Decl:
+ case ^ast.Package_Decl, ^ast.Import_Decl, ^ast.Foreign_Import_Decl:
return true
- case ast.Foreign_Block_Decl:
+ case ^ast.Foreign_Block_Decl:
return is_semicolon_optional_for_node(p, n.body)
- case ast.Value_Decl:
+ case ^ast.Value_Decl:
if n.is_mutable {
return false
}
@@ -641,10 +641,10 @@ parse_stmt_list :: proc(p: ^Parser) -> []^ast.Stmt {
p.curr_tok.kind != .EOF {
stmt := parse_stmt(p)
if stmt != nil {
- if _, ok := stmt.derived.(ast.Empty_Stmt); !ok {
+ if _, ok := stmt.derived.(^ast.Empty_Stmt); !ok {
append(&list, stmt)
- if es, es_ok := stmt.derived.(ast.Expr_Stmt); es_ok && es.expr != nil {
- if _, pl_ok := es.expr.derived.(ast.Proc_Lit); pl_ok {
+ if es, es_ok := stmt.derived.(^ast.Expr_Stmt); es_ok && es.expr != nil {
+ if _, pl_ok := es.expr.derived.(^ast.Proc_Lit); pl_ok {
error(p, stmt.pos, "procedure literal evaluated but not used")
}
}
@@ -722,7 +722,7 @@ convert_stmt_to_expr :: proc(p: ^Parser, stmt: ^ast.Stmt, kind: string) -> ^ast.
if stmt == nil {
return nil
}
- if es, ok := stmt.derived.(ast.Expr_Stmt); ok {
+ if es, ok := stmt.derived.(^ast.Expr_Stmt); ok {
return es.expr
}
error(p, stmt.pos, "expected %s, found a simple statement", kind)
@@ -864,7 +864,7 @@ parse_for_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
if p.curr_tok.kind != .Semicolon {
cond = parse_simple_stmt(p, {Stmt_Allow_Flag.In})
- if as, ok := cond.derived.(ast.Assign_Stmt); ok && as.op.kind == .In {
+ if as, ok := cond.derived.(^ast.Assign_Stmt); ok && as.op.kind == .In {
is_range = true
}
}
@@ -906,7 +906,7 @@ parse_for_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
if is_range {
- assign_stmt := cond.derived.(ast.Assign_Stmt)
+ assign_stmt := cond.derived.(^ast.Assign_Stmt)
vals := assign_stmt.lhs[:]
rhs: ^ast.Expr
@@ -987,7 +987,7 @@ parse_switch_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
tag = as
} else {
tag = parse_simple_stmt(p, {Stmt_Allow_Flag.In})
- if as, ok := tag.derived.(ast.Assign_Stmt); ok && as.op.kind == .In {
+ if as, ok := tag.derived.(^ast.Assign_Stmt); ok && as.op.kind == .In {
is_type_switch = true
} else if parse_control_statement_semicolon_separator(p) {
init = tag
@@ -1074,14 +1074,14 @@ parse_attribute :: proc(p: ^Parser, tok: tokenizer.Token, open_kind, close_kind:
skip_possible_newline(p)
decl := parse_stmt(p)
- switch d in &decl.derived {
- case ast.Value_Decl:
+ #partial switch d in decl.derived_stmt {
+ case ^ast.Value_Decl:
if d.docs == nil { d.docs = docs }
append(&d.attributes, attribute)
- case ast.Foreign_Block_Decl:
+ case ^ast.Foreign_Block_Decl:
if d.docs == nil { d.docs = docs }
append(&d.attributes, attribute)
- case ast.Foreign_Import_Decl:
+ case ^ast.Foreign_Import_Decl:
if d.docs == nil { d.docs = docs }
append(&d.attributes, attribute)
case:
@@ -1095,11 +1095,11 @@ parse_attribute :: proc(p: ^Parser, tok: tokenizer.Token, open_kind, close_kind:
parse_foreign_block_decl :: proc(p: ^Parser) -> ^ast.Stmt {
decl := parse_stmt(p)
- switch in decl.derived {
- case ast.Empty_Stmt, ast.Bad_Stmt, ast.Bad_Decl:
+ #partial switch in decl.derived_stmt {
+ case ^ast.Empty_Stmt, ^ast.Bad_Stmt, ^ast.Bad_Decl:
// Ignore
return nil
- case ast.When_Stmt, ast.Value_Decl:
+ case ^ast.When_Stmt, ^ast.Value_Decl:
return decl
}
@@ -1303,13 +1303,13 @@ parse_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
case .Defer:
tok := advance_token(p)
stmt := parse_stmt(p)
- switch s in stmt.derived {
- case ast.Empty_Stmt:
+ #partial switch s in stmt.derived_stmt {
+ case ^ast.Empty_Stmt:
error(p, s.pos, "empty statement after defer (e.g. ';')")
- case ast.Defer_Stmt:
+ case ^ast.Defer_Stmt:
error(p, s.pos, "you cannot defer a defer statement")
stmt = s.stmt
- case ast.Return_Stmt:
+ case ^ast.Return_Stmt:
error(p, s.pos, "you cannot defer a return statement")
}
ds := ast.new(ast.Defer_Stmt, tok.pos, stmt.end)
@@ -1381,8 +1381,8 @@ parse_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
expect_token_after(p, .Colon, "identifier list")
decl := parse_value_decl(p, list, docs)
if decl != nil {
- switch d in &decl.derived {
- case ast.Value_Decl:
+ #partial switch d in decl.derived_stmt {
+ case ^ast.Value_Decl:
d.is_using = true
return decl
}
@@ -1413,9 +1413,9 @@ parse_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
return stmt
case "partial":
stmt := parse_stmt(p)
- switch s in &stmt.derived {
- case ast.Switch_Stmt: s.partial = true
- case ast.Type_Switch_Stmt: s.partial = true
+ #partial switch s in stmt.derived_stmt {
+ case ^ast.Switch_Stmt: s.partial = true
+ case ^ast.Type_Switch_Stmt: s.partial = true
case: error(p, stmt.pos, "#partial can only be applied to a switch statement")
}
return stmt
@@ -1560,11 +1560,11 @@ parse_body :: proc(p: ^Parser) -> ^ast.Block_Stmt {
}
convert_stmt_to_body :: proc(p: ^Parser, stmt: ^ast.Stmt) -> ^ast.Stmt {
- switch s in stmt.derived {
- case ast.Block_Stmt:
+ #partial switch s in stmt.derived_stmt {
+ case ^ast.Block_Stmt:
error(p, stmt.pos, "expected a normal statement rather than a block statement")
return stmt
- case ast.Empty_Stmt:
+ case ^ast.Empty_Stmt:
error(p, stmt.pos, "expected a non-empty statement")
}
@@ -1641,10 +1641,10 @@ convert_to_ident_list :: proc(p: ^Parser, list: []Expr_And_Flags, ignore_flags,
id: ^ast.Expr = ident.expr
- switch n in ident.expr.derived {
- case ast.Ident:
- case ast.Bad_Expr:
- case ast.Poly_Type:
+ #partial switch n in ident.expr.derived_expr {
+ case ^ast.Ident:
+ case ^ast.Bad_Expr:
+ case ^ast.Poly_Type:
if allow_poly_names {
if n.specialization == nil {
break
@@ -1806,21 +1806,21 @@ check_procedure_name_list :: proc(p: ^Parser, names: []^ast.Expr) -> bool {
return false
}
- _, first_is_polymorphic := names[0].derived.(ast.Poly_Type)
+ _, first_is_polymorphic := names[0].derived.(^ast.Poly_Type)
any_polymorphic_names := first_is_polymorphic
for i := 1; i < len(names); i += 1 {
name := names[i]
if first_is_polymorphic {
- if _, ok := name.derived.(ast.Poly_Type); ok {
+ if _, ok := name.derived.(^ast.Poly_Type); ok {
any_polymorphic_names = true
} else {
error(p, name.pos, "mixture of polymorphic and non-polymorphic identifiers")
return any_polymorphic_names
}
} else {
- if _, ok := name.derived.(ast.Poly_Type); ok {
+ if _, ok := name.derived.(^ast.Poly_Type); ok {
any_polymorphic_names = true
error(p, name.pos, "mixture of polymorphic and non-polymorphic identifiers")
return any_polymorphic_names
@@ -1885,7 +1885,7 @@ parse_field_list :: proc(p: ^Parser, follow: tokenizer.Token_Kind, allowed_flags
if type == nil {
return false
}
- _, ok := type.derived.(ast.Ellipsis)
+ _, ok := type.derived.(^ast.Ellipsis)
return ok
}
@@ -1903,7 +1903,7 @@ parse_field_list :: proc(p: ^Parser, follow: tokenizer.Token_Kind, allowed_flags
type = parse_var_type(p, allowed_flags)
tt := ast.unparen_expr(type)
if is_signature && !any_polymorphic_names {
- if ti, ok := tt.derived.(ast.Typeid_Type); ok && ti.specialization != nil {
+ if ti, ok := tt.derived.(^ast.Typeid_Type); ok && ti.specialization != nil {
error(p, tt.pos, "specialization of typeid is not allowed without polymorphic names")
}
}
@@ -1979,7 +1979,7 @@ parse_field_list :: proc(p: ^Parser, follow: tokenizer.Token_Kind, allowed_flags
p.curr_tok.kind != .EOF {
prefix_flags := parse_field_prefixes(p)
param := parse_var_type(p, allowed_flags & {.Typeid_Token, .Ellipsis})
- if _, ok := param.derived.(ast.Ellipsis); ok {
+ if _, ok := param.derived.(^ast.Ellipsis); ok {
if seen_ellipsis {
error(p, param.pos, "extra variadic parameter after ellipsis")
}
@@ -2006,8 +2006,8 @@ parse_field_list :: proc(p: ^Parser, follow: tokenizer.Token_Kind, allowed_flags
names := make([]^ast.Expr, 1)
names[0] = ast.new(ast.Ident, tok.pos, end_pos(tok))
- switch ident in &names[0].derived {
- case ast.Ident:
+ #partial switch ident in names[0].derived_expr {
+ case ^ast.Ident:
ident.name = tok.text
case:
unreachable()
@@ -2137,12 +2137,12 @@ parse_proc_type :: proc(p: ^Parser, tok: tokenizer.Token) -> ^ast.Proc_Type {
loop: for param in params.list {
if param.type != nil {
- if _, ok := param.type.derived.(ast.Poly_Type); ok {
+ if _, ok := param.type.derived.(^ast.Poly_Type); ok {
is_generic = true
break loop
}
for name in param.names {
- if _, ok := name.derived.(ast.Poly_Type); ok {
+ if _, ok := name.derived.(^ast.Poly_Type); ok {
is_generic = true
break loop
}
@@ -2179,13 +2179,13 @@ parse_inlining_operand :: proc(p: ^Parser, lhs: bool, tok: tokenizer.Token) -> ^
}
}
- switch e in &ast.unparen_expr(expr).derived {
- case ast.Proc_Lit:
+ #partial switch e in ast.unparen_expr(expr).derived_expr {
+ case ^ast.Proc_Lit:
if e.inlining != .None && e.inlining != pi {
error(p, expr.pos, "both 'inline' and 'no_inline' cannot be applied to a procedure literal")
}
e.inlining = pi
- case ast.Call_Expr:
+ case ^ast.Call_Expr:
if e.inlining != .None && e.inlining != pi {
error(p, expr.pos, "both 'inline' and 'no_inline' cannot be applied to a procedure call")
}
@@ -2276,9 +2276,9 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
bd.name = name.text
original_type := parse_type(p)
type := ast.unparen_expr(original_type)
- switch t in &type.derived {
- case ast.Array_Type: t.tag = bd
- case ast.Dynamic_Array_Type: t.tag = bd
+ #partial switch t in type.derived_expr {
+ case ^ast.Array_Type: t.tag = bd
+ case ^ast.Dynamic_Array_Type: t.tag = bd
case:
error(p, original_type.pos, "expected an array type after #%s", name.text)
}
@@ -2290,10 +2290,10 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
tag.name = name.text
original_expr := parse_expr(p, lhs)
expr := ast.unparen_expr(original_expr)
- switch t in &expr.derived {
- case ast.Comp_Lit:
+ #partial switch t in expr.derived_expr {
+ case ^ast.Comp_Lit:
t.tag = tag
- case ast.Array_Type:
+ case ^ast.Array_Type:
t.tag = tag
error(p, tok.pos, "#%s has been replaced with #sparse for non-contiguous enumerated array types", name.text)
case:
@@ -2308,8 +2308,8 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
tag.name = name.text
original_type := parse_type(p)
type := ast.unparen_expr(original_type)
- switch t in &type.derived {
- case ast.Array_Type:
+ #partial switch t in type.derived_expr {
+ case ^ast.Array_Type:
t.tag = tag
case:
error(p, tok.pos, "expected an enumerated array type after #%s", name.text)
@@ -2689,7 +2689,7 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
variants: [dynamic]^ast.Expr
for p.curr_tok.kind != .Close_Brace && p.curr_tok.kind != .EOF {
type := parse_type(p)
- if _, ok := type.derived.(ast.Bad_Expr); !ok {
+ if _, ok := type.derived.(^ast.Bad_Expr); !ok {
append(&variants, type)
}
if !allow_token(p, .Comma) {
@@ -2864,19 +2864,19 @@ is_literal_type :: proc(expr: ^ast.Expr) -> bool {
if val == nil {
return false
}
- switch _ in val.derived {
- case ast.Bad_Expr,
- ast.Ident,
- ast.Selector_Expr,
- ast.Array_Type,
- ast.Struct_Type,
- ast.Union_Type,
- ast.Enum_Type,
- ast.Dynamic_Array_Type,
- ast.Map_Type,
- ast.Bit_Set_Type,
- ast.Matrix_Type,
- ast.Call_Expr:
+ #partial switch _ in val.derived_expr {
+ case ^ast.Bad_Expr,
+ ^ast.Ident,
+ ^ast.Selector_Expr,
+ ^ast.Array_Type,
+ ^ast.Struct_Type,
+ ^ast.Union_Type,
+ ^ast.Enum_Type,
+ ^ast.Dynamic_Array_Type,
+ ^ast.Map_Type,
+ ^ast.Bit_Set_Type,
+ ^ast.Matrix_Type,
+ ^ast.Call_Expr:
return true
}
return false
@@ -2998,7 +2998,7 @@ parse_call_expr :: proc(p: ^Parser, operand: ^ast.Expr) -> ^ast.Expr {
ce.close = close.pos
o := ast.unparen_expr(operand)
- if se, ok := o.derived.(ast.Selector_Expr); ok && se.op.kind == .Arrow_Right {
+ if se, ok := o.derived.(^ast.Selector_Expr); ok && se.op.kind == .Arrow_Right {
sce := ast.new(ast.Selector_Call_Expr, ce.pos, ce.end)
sce.expr = o
sce.call = ce
@@ -3428,13 +3428,13 @@ parse_simple_stmt :: proc(p: ^Parser, flags: Stmt_Allow_Flags) -> ^ast.Stmt {
stmt := parse_stmt(p)
if stmt != nil {
- switch n in &stmt.derived {
- case ast.Block_Stmt: n.label = label
- case ast.If_Stmt: n.label = label
- case ast.For_Stmt: n.label = label
- case ast.Switch_Stmt: n.label = label
- case ast.Type_Switch_Stmt: n.label = label
- case ast.Range_Stmt: n.label = label
+ #partial switch n in stmt.derived_stmt {
+ case ^ast.Block_Stmt: n.label = label
+ case ^ast.If_Stmt: n.label = label
+ case ^ast.For_Stmt: n.label = label
+ case ^ast.Switch_Stmt: n.label = label
+ case ^ast.Type_Switch_Stmt: n.label = label
+ case ^ast.Range_Stmt: n.label = label
}
}
diff --git a/core/odin/printer/visit.odin b/core/odin/printer/visit.odin
index 023583bde..9eba29987 100644
--- a/core/odin/printer/visit.odin
+++ b/core/odin/printer/visit.odin
@@ -342,16 +342,16 @@ visit_decl :: proc(p: ^Printer, decl: ^ast.Decl, called_in_stmt := false) {
return
}
- switch v in &decl.derived {
- case Expr_Stmt:
+ #partial switch v in decl.derived_stmt {
+ case ^Expr_Stmt:
move_line(p, decl.pos)
visit_expr(p, v.expr)
if p.config.semicolons {
push_generic_token(p, .Semicolon, 0)
}
- case When_Stmt:
+ case ^When_Stmt:
visit_stmt(p, cast(^Stmt)decl)
- case Foreign_Import_Decl:
+ case ^Foreign_Import_Decl:
if len(v.attributes) > 0 {
sort.sort(sort_attribute(&v.attributes))
move_line(p, v.attributes[0].pos)
@@ -370,7 +370,7 @@ visit_decl :: proc(p: ^Printer, decl: ^ast.Decl, called_in_stmt := false) {
for path in v.fullpaths {
push_ident_token(p, path, 0)
}
- case Foreign_Block_Decl:
+ case ^Foreign_Block_Decl:
if len(v.attributes) > 0 {
sort.sort(sort_attribute(&v.attributes))
move_line(p, v.attributes[0].pos)
@@ -383,7 +383,7 @@ visit_decl :: proc(p: ^Printer, decl: ^ast.Decl, called_in_stmt := false) {
visit_expr(p, v.foreign_library)
visit_stmt(p, v.body)
- case Import_Decl:
+ case ^Import_Decl:
move_line(p, decl.pos)
if v.name.text != "" {
@@ -395,7 +395,7 @@ visit_decl :: proc(p: ^Printer, decl: ^ast.Decl, called_in_stmt := false) {
push_ident_token(p, v.fullpath, 1)
}
- case Value_Decl:
+ case ^Value_Decl:
if len(v.attributes) > 0 {
sort.sort(sort_attribute(&v.attributes))
move_line(p, v.attributes[0].pos)
@@ -446,10 +446,10 @@ visit_decl :: proc(p: ^Printer, decl: ^ast.Decl, called_in_stmt := false) {
add_semicolon := true
for value in v.values {
- switch a in value.derived {
- case Union_Type, Enum_Type, Struct_Type:
+ #partial switch a in value.derived {
+ case ^Union_Type, ^Enum_Type, ^Struct_Type:
add_semicolon = false || called_in_stmt
- case Proc_Lit:
+ case ^Proc_Lit:
add_semicolon = false
}
}
@@ -516,23 +516,34 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
return
}
- switch v in stmt.derived {
- case Import_Decl:
+
+ switch v in stmt.derived_stmt {
+ case ^Bad_Stmt:
+ case ^Bad_Decl:
+ case ^Package_Decl:
+
+ case ^Empty_Stmt:
+ push_generic_token(p, .Semicolon, 0)
+ case ^Tag_Stmt:
+ push_generic_token(p, .Hash, 1)
+ push_generic_token(p, v.op.kind, 1, v.op.text)
+ visit_stmt(p, v.stmt)
+
+
+ case ^Import_Decl:
visit_decl(p, cast(^Decl)stmt, true)
return
- case Value_Decl:
+ case ^Value_Decl:
visit_decl(p, cast(^Decl)stmt, true)
return
- case Foreign_Import_Decl:
+ case ^Foreign_Import_Decl:
visit_decl(p, cast(^Decl)stmt, true)
return
- case Foreign_Block_Decl:
+ case ^Foreign_Block_Decl:
visit_decl(p, cast(^Decl)stmt, true)
return
- }
- switch v in stmt.derived {
- case Using_Stmt:
+ case ^Using_Stmt:
move_line(p, v.pos)
push_generic_token(p, .Using, 1)
@@ -542,7 +553,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
if p.config.semicolons {
push_generic_token(p, .Semicolon, 0)
}
- case Block_Stmt:
+ case ^Block_Stmt:
move_line(p, v.pos)
if v.pos.line == v.end.line {
@@ -572,7 +583,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
visit_end_brace(p, v.end)
}
}
- case If_Stmt:
+ case ^If_Stmt:
move_line(p, v.pos)
if v.label != nil {
@@ -595,7 +606,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
uses_do := false
- if check_stmt, ok := v.body.derived.(Block_Stmt); ok && check_stmt.uses_do {
+ if check_stmt, ok := v.body.derived.(^Block_Stmt); ok && check_stmt.uses_do {
uses_do = true
}
@@ -626,7 +637,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
visit_stmt(p, v.else_stmt)
}
- case Switch_Stmt:
+ case ^Switch_Stmt:
move_line(p, v.pos)
if v.label != nil {
@@ -654,7 +665,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
visit_expr(p, v.cond)
visit_stmt(p, v.body)
- case Case_Clause:
+ case ^Case_Clause:
move_line(p, v.pos)
if !p.config.indent_cases {
@@ -678,7 +689,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
if !p.config.indent_cases {
indent(p)
}
- case Type_Switch_Stmt:
+ case ^Type_Switch_Stmt:
move_line(p, v.pos)
hint_current_line(p, {.Switch_Stmt})
@@ -696,7 +707,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
visit_stmt(p, v.tag)
visit_stmt(p, v.body)
- case Assign_Stmt:
+ case ^Assign_Stmt:
move_line(p, v.pos)
hint_current_line(p, {.Assign})
@@ -710,13 +721,13 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
if block_stmt && p.config.semicolons {
push_generic_token(p, .Semicolon, 0)
}
- case Expr_Stmt:
+ case ^Expr_Stmt:
move_line(p, v.pos)
visit_expr(p, v.expr)
if block_stmt && p.config.semicolons {
push_generic_token(p, .Semicolon, 0)
}
- case For_Stmt:
+ case ^For_Stmt:
// this should be simplified
move_line(p, v.pos)
@@ -753,7 +764,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
visit_stmt(p, v.body)
- case Inline_Range_Stmt:
+ case ^Inline_Range_Stmt:
move_line(p, v.pos)
if v.label != nil {
@@ -779,7 +790,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
visit_expr(p, v.expr)
visit_stmt(p, v.body)
- case Range_Stmt:
+ case ^Range_Stmt:
move_line(p, v.pos)
if v.label != nil {
@@ -805,7 +816,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
visit_expr(p, v.expr)
visit_stmt(p, v.body)
- case Return_Stmt:
+ case ^Return_Stmt:
move_line(p, v.pos)
push_generic_token(p, .Return, 1)
@@ -817,7 +828,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
if block_stmt && p.config.semicolons {
push_generic_token(p, .Semicolon, 0)
}
- case Defer_Stmt:
+ case ^Defer_Stmt:
move_line(p, v.pos)
push_generic_token(p, .Defer, 0)
@@ -826,7 +837,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
if p.config.semicolons {
push_generic_token(p, .Semicolon, 0)
}
- case When_Stmt:
+ case ^When_Stmt:
move_line(p, v.pos)
push_generic_token(p, .When, 1)
visit_expr(p, v.cond)
@@ -846,7 +857,7 @@ visit_stmt :: proc(p: ^Printer, stmt: ^ast.Stmt, block_type: Block_Type = .Gener
visit_stmt(p, v.else_stmt)
}
- case Branch_Stmt:
+ case ^Branch_Stmt:
move_line(p, v.pos)
push_generic_token(p, v.tok.kind, 0)
@@ -918,8 +929,15 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
set_source_position(p, expr.pos)
- switch v in expr.derived {
- case Inline_Asm_Expr:
+ switch v in expr.derived_expr {
+ case ^Bad_Expr:
+
+ case ^Tag_Expr:
+ push_generic_token(p, .Hash, 1)
+ push_generic_token(p, v.op.kind, 1, v.op.text)
+ visit_expr(p, v.expr)
+
+ case ^Inline_Asm_Expr:
push_generic_token(p, v.tok.kind, 1, v.tok.text)
push_generic_token(p, .Open_Paren, 1)
@@ -936,42 +954,42 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
push_generic_token(p, .Comma, 0)
visit_expr(p, v.constraints_string)
push_generic_token(p, .Close_Brace, 0)
- case Undef:
+ case ^Undef:
push_generic_token(p, .Undef, 1)
- case Auto_Cast:
+ case ^Auto_Cast:
push_generic_token(p, v.op.kind, 1)
visit_expr(p, v.expr)
- case Ternary_If_Expr:
+ case ^Ternary_If_Expr:
visit_expr(p, v.x)
push_generic_token(p, v.op1.kind, 1)
visit_expr(p, v.cond)
push_generic_token(p, v.op2.kind, 1)
visit_expr(p, v.y)
- case Ternary_When_Expr:
+ case ^Ternary_When_Expr:
visit_expr(p, v.x)
push_generic_token(p, v.op1.kind, 1)
visit_expr(p, v.cond)
push_generic_token(p, v.op2.kind, 1)
visit_expr(p, v.y)
- case Or_Else_Expr:
+ case ^Or_Else_Expr:
visit_expr(p, v.x)
push_generic_token(p, v.token.kind, 1)
visit_expr(p, v.y)
- case Or_Return_Expr:
+ case ^Or_Return_Expr:
visit_expr(p, v.expr)
push_generic_token(p, v.token.kind, 1)
- case Selector_Call_Expr:
+ case ^Selector_Call_Expr:
visit_expr(p, v.call.expr)
push_generic_token(p, .Open_Paren, 1)
visit_exprs(p, v.call.args, {.Add_Comma})
push_generic_token(p, .Close_Paren, 0)
- case Ellipsis:
+ case ^Ellipsis:
push_generic_token(p, .Ellipsis, 1)
visit_expr(p, v.expr)
- case Relative_Type:
+ case ^Relative_Type:
visit_expr(p, v.tag)
visit_expr(p, v.type)
- case Slice_Expr:
+ case ^Slice_Expr:
visit_expr(p, v.expr)
push_generic_token(p, .Open_Bracket, 0)
visit_expr(p, v.low)
@@ -981,37 +999,37 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
visit_expr(p, v.high)
}
push_generic_token(p, .Close_Bracket, 0)
- case Ident:
+ case ^Ident:
if .Enforce_Poly_Names in options {
push_generic_token(p, .Dollar, 1)
push_ident_token(p, v.name, 0)
} else {
push_ident_token(p, v.name, 1)
}
- case Deref_Expr:
+ case ^Deref_Expr:
visit_expr(p, v.expr)
push_generic_token(p, v.op.kind, 0)
- case Type_Cast:
+ case ^Type_Cast:
push_generic_token(p, v.tok.kind, 1)
push_generic_token(p, .Open_Paren, 0)
visit_expr(p, v.type)
push_generic_token(p, .Close_Paren, 0)
merge_next_token(p)
visit_expr(p, v.expr)
- case Basic_Directive:
+ case ^Basic_Directive:
push_generic_token(p, v.tok.kind, 1)
push_ident_token(p, v.name, 0)
- case Distinct_Type:
+ case ^Distinct_Type:
push_generic_token(p, .Distinct, 1)
visit_expr(p, v.type)
- case Dynamic_Array_Type:
+ case ^Dynamic_Array_Type:
visit_expr(p, v.tag)
push_generic_token(p, .Open_Bracket, 1)
push_generic_token(p, .Dynamic, 0)
push_generic_token(p, .Close_Bracket, 0)
merge_next_token(p)
visit_expr(p, v.elem)
- case Bit_Set_Type:
+ case ^Bit_Set_Type:
push_generic_token(p, .Bit_Set, 1)
push_generic_token(p, .Open_Bracket, 0)
@@ -1023,7 +1041,7 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
}
push_generic_token(p, .Close_Bracket, 0)
- case Union_Type:
+ case ^Union_Type:
push_generic_token(p, .Union, 1)
push_poly_params(p, v.poly_params)
@@ -1045,7 +1063,7 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
visit_exprs(p, v.variants, {.Add_Comma, .Trailing})
visit_end_brace(p, v.end)
}
- case Enum_Type:
+ case ^Enum_Type:
push_generic_token(p, .Enum, 1)
hint_current_line(p, {.Enum})
@@ -1068,7 +1086,7 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
}
set_source_position(p, v.end)
- case Struct_Type:
+ case ^Struct_Type:
push_generic_token(p, .Struct, 1)
hint_current_line(p, {.Struct})
@@ -1103,7 +1121,7 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
}
set_source_position(p, v.end)
- case Proc_Lit:
+ case ^Proc_Lit:
switch v.inlining {
case .None:
case .Inline:
@@ -1112,7 +1130,7 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
push_ident_token(p, "#force_no_inline", 0)
}
- visit_proc_type(p, v.type^, true)
+ visit_proc_type(p, v.type, true)
push_where_clauses(p, v.where_clauses)
@@ -1122,16 +1140,16 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
} else {
push_generic_token(p, .Undef, 1)
}
- case Proc_Type:
+ case ^Proc_Type:
visit_proc_type(p, v)
- case Basic_Lit:
+ case ^Basic_Lit:
push_generic_token(p, v.tok.kind, 1, v.tok.text)
- case Binary_Expr:
+ case ^Binary_Expr:
visit_binary_expr(p, v)
- case Implicit_Selector_Expr:
+ case ^Implicit_Selector_Expr:
push_generic_token(p, .Period, 1)
push_ident_token(p, v.field.name, 0)
- case Call_Expr:
+ case ^Call_Expr:
visit_expr(p, v.expr)
push_format_token(p,
@@ -1146,27 +1164,34 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
visit_call_exprs(p, v.args, v.ellipsis.kind == .Ellipsis)
push_generic_token(p, .Close_Paren, 0)
- case Typeid_Type:
+ case ^Typeid_Type:
push_generic_token(p, .Typeid, 1)
if v.specialization != nil {
push_generic_token(p, .Quo, 0)
visit_expr(p, v.specialization)
}
- case Selector_Expr:
+ case ^Selector_Expr:
visit_expr(p, v.expr)
push_generic_token(p, v.op.kind, 0)
visit_expr(p, v.field)
- case Paren_Expr:
+ case ^Paren_Expr:
push_generic_token(p, .Open_Paren, 1)
visit_expr(p, v.expr)
push_generic_token(p, .Close_Paren, 0)
- case Index_Expr:
+ case ^Index_Expr:
visit_expr(p, v.expr)
push_generic_token(p, .Open_Bracket, 0)
visit_expr(p, v.index)
push_generic_token(p, .Close_Bracket, 0)
- case Proc_Group:
+ case ^Matrix_Index_Expr:
+ visit_expr(p, v.expr)
+ push_generic_token(p, .Open_Bracket, 0)
+ visit_expr(p, v.row_index)
+ push_generic_token(p, .Comma, 0)
+ visit_expr(p, v.column_index)
+ push_generic_token(p, .Close_Bracket, 0)
+ case ^Proc_Group:
push_generic_token(p, v.tok.kind, 1)
if len(v.args) != 0 && v.pos.line != v.args[len(v.args) - 1].pos.line {
@@ -1181,7 +1206,7 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
push_generic_token(p, .Close_Brace, 0)
}
- case Comp_Lit:
+ case ^Comp_Lit:
if v.type != nil {
visit_expr(p, v.type)
}
@@ -1198,18 +1223,18 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
push_generic_token(p, .Close_Brace, 0)
}
- case Unary_Expr:
+ case ^Unary_Expr:
push_generic_token(p, v.op.kind, 1)
merge_next_token(p)
visit_expr(p, v.expr)
- case Field_Value:
+ case ^Field_Value:
visit_expr(p, v.field)
push_generic_token(p, .Eq, 1)
visit_expr(p, v.value)
- case Type_Assertion:
+ case ^Type_Assertion:
visit_expr(p, v.expr)
- if unary, ok := v.type.derived.(Unary_Expr); ok && unary.op.text == "?" {
+ if unary, ok := v.type.derived.(^Unary_Expr); ok && unary.op.text == "?" {
push_generic_token(p, .Period, 0)
visit_expr(p, v.type)
} else {
@@ -1219,13 +1244,13 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
push_generic_token(p, .Close_Paren, 0)
}
- case Pointer_Type:
+ case ^Pointer_Type:
push_generic_token(p, .Pointer, 1)
merge_next_token(p)
visit_expr(p, v.elem)
- case Implicit:
+ case ^Implicit:
push_generic_token(p, v.tok.kind, 1)
- case Poly_Type:
+ case ^Poly_Type:
push_generic_token(p, .Dollar, 1)
merge_next_token(p)
visit_expr(p, v.type)
@@ -1235,22 +1260,35 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, options := List_Options{}) {
merge_next_token(p)
visit_expr(p, v.specialization)
}
- case Array_Type:
+ case ^Array_Type:
visit_expr(p, v.tag)
push_generic_token(p, .Open_Bracket, 1)
visit_expr(p, v.len)
push_generic_token(p, .Close_Bracket, 0)
merge_next_token(p)
visit_expr(p, v.elem)
- case Map_Type:
+ case ^Map_Type:
push_generic_token(p, .Map, 1)
push_generic_token(p, .Open_Bracket, 0)
visit_expr(p, v.key)
push_generic_token(p, .Close_Bracket, 0)
merge_next_token(p)
visit_expr(p, v.value)
- case Helper_Type:
+ case ^Helper_Type:
visit_expr(p, v.type)
+ case ^Multi_Pointer_Type:
+ push_generic_token(p, .Open_Bracket, 1)
+ push_generic_token(p, .Pointer, 0)
+ push_generic_token(p, .Close_Bracket, 0)
+ visit_expr(p, v.elem)
+ case ^Matrix_Type:
+ push_generic_token(p, .Matrix, 1)
+ push_generic_token(p, .Open_Bracket, 0)
+ visit_expr(p, v.row_count)
+ push_generic_token(p, .Comma, 0)
+ visit_expr(p, v.column_count)
+ push_generic_token(p, .Close_Bracket, 0)
+ visit_expr(p, v.elem)
case:
panic(fmt.aprint(expr.derived))
}
@@ -1348,7 +1386,7 @@ visit_field_list :: proc(p: ^Printer, list: ^ast.Field_List, options := List_Opt
}
}
-visit_proc_type :: proc(p: ^Printer, proc_type: ast.Proc_Type, is_proc_lit := false) {
+visit_proc_type :: proc(p: ^Printer, proc_type: ^ast.Proc_Type, is_proc_lit := false) {
if is_proc_lit {
push_format_token(p, Format_Token {
kind = .Proc,
@@ -1392,7 +1430,7 @@ visit_proc_type :: proc(p: ^Printer, proc_type: ast.Proc_Type, is_proc_lit := fa
} else if len(proc_type.results.list) == 1 {
for name in proc_type.results.list[0].names {
- if ident, ok := name.derived.(ast.Ident); ok {
+ if ident, ok := name.derived.(^ast.Ident); ok {
if ident.name != "_" {
use_parens = true
}
@@ -1410,19 +1448,19 @@ visit_proc_type :: proc(p: ^Printer, proc_type: ast.Proc_Type, is_proc_lit := fa
}
}
-visit_binary_expr :: proc(p: ^Printer, binary: ast.Binary_Expr) {
+visit_binary_expr :: proc(p: ^Printer, binary: ^ast.Binary_Expr) {
move_line(p, binary.left.pos)
- if v, ok := binary.left.derived.(ast.Binary_Expr); ok {
+ if v, ok := binary.left.derived.(^ast.Binary_Expr); ok {
visit_binary_expr(p, v)
} else {
visit_expr(p, binary.left)
}
either_implicit_selector := false
- if _, ok := binary.left.derived.(ast.Implicit_Selector_Expr); ok {
+ if _, ok := binary.left.derived.(^ast.Implicit_Selector_Expr); ok {
either_implicit_selector = true
- } else if _, ok := binary.right.derived.(ast.Implicit_Selector_Expr); ok {
+ } else if _, ok := binary.right.derived.(^ast.Implicit_Selector_Expr); ok {
either_implicit_selector = true
}
@@ -1439,7 +1477,7 @@ visit_binary_expr :: proc(p: ^Printer, binary: ast.Binary_Expr) {
move_line(p, binary.right.pos)
- if v, ok := binary.right.derived.(ast.Binary_Expr); ok {
+ if v, ok := binary.right.derived.(^ast.Binary_Expr); ok {
visit_binary_expr(p, v)
} else {
visit_expr(p, binary.right)
@@ -1499,7 +1537,7 @@ visit_signature_list :: proc(p: ^Printer, list: ^ast.Field_List, remove_blank :=
named := false
for name in field.names {
- if ident, ok := name.derived.(ast.Ident); ok {
+ if ident, ok := name.derived.(^ast.Ident); ok {
//for some reason the parser uses _ to mean empty
if ident.name != "_" || !remove_blank {
named = true
diff --git a/core/os/dir_openbsd.odin b/core/os/dir_openbsd.odin
new file mode 100644
index 000000000..465fd35ae
--- /dev/null
+++ b/core/os/dir_openbsd.odin
@@ -0,0 +1,71 @@
+package os
+
+import "core:strings"
+import "core:mem"
+
+read_dir :: proc(fd: Handle, n: int, allocator := context.allocator) -> (fi: []File_Info, err: Errno) {
+ dirp: Dir
+ dirp, err = _fdopendir(fd)
+ if err != ERROR_NONE {
+ return
+ }
+
+ defer _closedir(dirp)
+
+ // XXX OpenBSD
+ dirpath: string
+ dirpath, err = absolute_path_from_handle(fd)
+
+ if err != ERROR_NONE {
+ return
+ }
+
+ defer delete(dirpath)
+
+ n := n
+ size := n
+ if n <= 0 {
+ n = -1
+ size = 100
+ }
+
+ dfi := make([dynamic]File_Info, 0, size, allocator)
+
+ for {
+ entry: Dirent
+ end_of_stream: bool
+ entry, err, end_of_stream = _readdir(dirp)
+ if err != ERROR_NONE {
+ for fi_ in dfi {
+ file_info_delete(fi_, allocator)
+ }
+ delete(dfi)
+ return
+ } else if end_of_stream {
+ break
+ }
+
+ fi_: File_Info
+ filename := cast(string)(transmute(cstring)mem.Raw_Cstring{ data = &entry.name[0] })
+
+ if filename == "." || filename == ".." {
+ continue
+ }
+
+ fullpath := strings.join( []string{ dirpath, filename }, "/", context.temp_allocator)
+ defer delete(fullpath, context.temp_allocator)
+
+ fi_, err = stat(fullpath, allocator)
+ if err != ERROR_NONE {
+ for fi__ in dfi {
+ file_info_delete(fi__, allocator)
+ }
+ delete(dfi)
+ return
+ }
+
+ append(&dfi, fi_)
+ }
+
+ return dfi[:], ERROR_NONE
+}
diff --git a/core/os/file_windows.odin b/core/os/file_windows.odin
index 8a0f2ed64..0626272d6 100644
--- a/core/os/file_windows.odin
+++ b/core/os/file_windows.odin
@@ -106,19 +106,23 @@ read_console :: proc(handle: win32.HANDLE, b: []byte) -> (n: int, err: Errno) {
BUF_SIZE :: 386
buf16: [BUF_SIZE]u16
buf8: [4*BUF_SIZE]u8
-
+
for n < len(b) && err == 0 {
- max_read := u32(min(BUF_SIZE, len(b)/4))
-
+ min_read := max(len(b)/4, 1 if len(b) > 0 else 0)
+ max_read := u32(min(BUF_SIZE, min_read))
+ if max_read == 0 {
+ break
+ }
+
single_read_length: u32
ok := win32.ReadConsoleW(handle, &buf16[0], max_read, &single_read_length, nil)
if !ok {
err = Errno(win32.GetLastError())
}
-
+
buf8_len := utf16.decode_to_utf8(buf8[:], buf16[:single_read_length])
src := buf8[:buf8_len]
-
+
ctrl_z := false
for i := 0; i < len(src) && n+i < len(b); i += 1 {
x := src[i]
@@ -129,9 +133,16 @@ read_console :: proc(handle: win32.HANDLE, b: []byte) -> (n: int, err: Errno) {
b[n] = x
n += 1
}
- if ctrl_z || single_read_length < len(buf16) {
+ if ctrl_z || single_read_length < max_read {
break
}
+
+ // NOTE(bill): if the last two values were a newline, then it is expected that
+ // this is the end of the input
+ if n >= 2 && single_read_length == max_read && string(b[n-2:n]) == "\r\n" {
+ break
+ }
+
}
return
diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin
index a011fa58a..ace622582 100644
--- a/core/os/os_darwin.odin
+++ b/core/os/os_darwin.odin
@@ -313,6 +313,7 @@ foreign libc {
@(link_name="getenv") _unix_getenv :: proc(cstring) -> cstring ---
@(link_name="getcwd") _unix_getcwd :: proc(buf: cstring, len: c.size_t) -> cstring ---
@(link_name="chdir") _unix_chdir :: proc(buf: cstring) -> c.int ---
+ @(link_name="mkdir") _unix_mkdir :: proc(buf: cstring, mode: u32) -> c.int ---
@(link_name="realpath") _unix_realpath :: proc(path: cstring, resolved_path: rawptr) -> rawptr ---
@(link_name="strerror") _darwin_string_error :: proc(num : c.int) -> cstring ---
@@ -344,9 +345,8 @@ get_last_error_string :: proc() -> string {
}
open :: proc(path: string, flags: int = O_RDWR, mode: int = 0) -> (Handle, Errno) {
- cstr := strings.clone_to_cstring(path)
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
handle := _unix_open(cstr, i32(flags), u16(mode))
- delete(cstr)
if handle == -1 {
return INVALID_HANDLE, 1
}
@@ -670,7 +670,17 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
return ERROR_NONE
}
+make_directory :: proc(path: string, mode: u32 = 0o775) -> Errno {
+ path_cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ res := _unix_mkdir(path_cstr, mode)
+ if res == -1 {
+ return Errno(get_last_error())
+ }
+ return ERROR_NONE
+}
+
exit :: proc "contextless" (code: int) -> ! {
+ runtime._cleanup_runtime_contextless()
_unix_exit(i32(code))
}
diff --git a/core/os/os_freebsd.odin b/core/os/os_freebsd.odin
index 82317532d..7fb9dd26f 100644
--- a/core/os/os_freebsd.odin
+++ b/core/os/os_freebsd.odin
@@ -7,149 +7,149 @@ import "core:runtime"
import "core:strings"
import "core:c"
-Handle :: distinct i32;
-File_Time :: distinct u64;
-Errno :: distinct i32;
-Syscall :: distinct i32;
-
-INVALID_HANDLE :: ~Handle(0);
-
-ERROR_NONE: Errno : 0;
-EPERM: Errno : 1;
-ENOENT: Errno : 2;
-ESRCH: Errno : 3;
-EINTR: Errno : 4;
-EIO: Errno : 5;
-ENXIO: Errno : 6;
-E2BIG: Errno : 7;
-ENOEXEC: Errno : 8;
-EBADF: Errno : 9;
-ECHILD: Errno : 10;
-EBEADLK: Errno : 11;
-ENOMEM: Errno : 12;
-EACCESS: Errno : 13;
-EFAULT: Errno : 14;
-ENOTBLK: Errno : 15;
-EBUSY: Errno : 16;
-EEXIST: Errno : 17;
-EXDEV: Errno : 18;
-ENODEV: Errno : 19;
-ENOTDIR: Errno : 20;
-EISDIR: Errno : 21;
-EINVAL: Errno : 22;
-ENFILE: Errno : 23;
-EMFILE: Errno : 24;
-ENOTTY: Errno : 25;
-ETXTBSY: Errno : 26;
-EFBIG: Errno : 27;
-ENOSPC: Errno : 28;
-ESPIPE: Errno : 29;
-EROFS: Errno : 30;
-EMLINK: Errno : 31;
-EPIPE: Errno : 32;
-EDOM: Errno : 33;
-ERANGE: Errno : 34; /* Result too large */
-EAGAIN: Errno : 35;
-EINPROGRESS: Errno : 36;
-EALREADY: Errno : 37;
-ENOTSOCK: Errno : 38;
-EDESTADDRREQ: Errno : 39;
-EMSGSIZE: Errno : 40;
-EPROTOTYPE: Errno : 41;
-ENOPROTOOPT: Errno : 42;
-EPROTONOSUPPORT: Errno : 43;
-ESOCKTNOSUPPORT: Errno : 44;
-EOPNOTSUPP: Errno : 45;
-EPFNOSUPPORT: Errno : 46;
-EAFNOSUPPORT: Errno : 47;
-EADDRINUSE: Errno : 48;
-EADDRNOTAVAIL: Errno : 49;
-ENETDOWN: Errno : 50;
-ENETUNREACH: Errno : 51;
-ENETRESET: Errno : 52;
-ECONNABORTED: Errno : 53;
-ECONNRESET: Errno : 54;
-ENOBUFS: Errno : 55;
-EISCONN: Errno : 56;
-ENOTCONN: Errno : 57;
-ESHUTDOWN: Errno : 58;
-ETIMEDOUT: Errno : 60;
-ECONNREFUSED: Errno : 61;
-ELOOP: Errno : 62;
-ENAMETOOLING: Errno : 63;
-EHOSTDOWN: Errno : 64;
-EHOSTUNREACH: Errno : 65;
-ENOTEMPTY: Errno : 66;
-EPROCLIM: Errno : 67;
-EUSERS: Errno : 68;
-EDQUOT: Errno : 69;
-ESTALE: Errno : 70;
-EBADRPC: Errno : 72;
-ERPCMISMATCH: Errno : 73;
-EPROGUNAVAIL: Errno : 74;
-EPROGMISMATCH: Errno : 75;
-EPROCUNAVAIL: Errno : 76;
-ENOLCK: Errno : 77;
-ENOSYS: Errno : 78;
-EFTYPE: Errno : 79;
-EAUTH: Errno : 80;
-ENEEDAUTH: Errno : 81;
-EIDRM: Errno : 82;
-ENOMSG: Errno : 83;
-EOVERFLOW: Errno : 84;
-ECANCELED: Errno : 85;
-EILSEQ: Errno : 86;
-ENOATTR: Errno : 87;
-EDOOFUS: Errno : 88;
-EBADMSG: Errno : 89;
-EMULTIHOP: Errno : 90;
-ENOLINK: Errno : 91;
-EPROTO: Errno : 92;
-ENOTCAPABLE: Errno : 93;
-ECAPMODE: Errno : 94;
-ENOTRECOVERABLE: Errno : 95;
-EOWNERDEAD: Errno : 96;
-
-O_RDONLY :: 0x00000;
-O_WRONLY :: 0x00001;
-O_RDWR :: 0x00002;
-O_CREATE :: 0x00040;
-O_EXCL :: 0x00080;
-O_NOCTTY :: 0x00100;
-O_TRUNC :: 0x00200;
-O_NONBLOCK :: 0x00800;
-O_APPEND :: 0x00400;
-O_SYNC :: 0x01000;
-O_ASYNC :: 0x02000;
-O_CLOEXEC :: 0x80000;
-
-
-SEEK_SET :: 0;
-SEEK_CUR :: 1;
-SEEK_END :: 2;
-SEEK_DATA :: 3;
-SEEK_HOLE :: 4;
-SEEK_MAX :: SEEK_HOLE;
+Handle :: distinct i32
+File_Time :: distinct u64
+Errno :: distinct i32
+Syscall :: distinct i32
+
+INVALID_HANDLE :: ~Handle(0)
+
+ERROR_NONE: Errno : 0
+EPERM: Errno : 1
+ENOENT: Errno : 2
+ESRCH: Errno : 3
+EINTR: Errno : 4
+EIO: Errno : 5
+ENXIO: Errno : 6
+E2BIG: Errno : 7
+ENOEXEC: Errno : 8
+EBADF: Errno : 9
+ECHILD: Errno : 10
+EBEADLK: Errno : 11
+ENOMEM: Errno : 12
+EACCESS: Errno : 13
+EFAULT: Errno : 14
+ENOTBLK: Errno : 15
+EBUSY: Errno : 16
+EEXIST: Errno : 17
+EXDEV: Errno : 18
+ENODEV: Errno : 19
+ENOTDIR: Errno : 20
+EISDIR: Errno : 21
+EINVAL: Errno : 22
+ENFILE: Errno : 23
+EMFILE: Errno : 24
+ENOTTY: Errno : 25
+ETXTBSY: Errno : 26
+EFBIG: Errno : 27
+ENOSPC: Errno : 28
+ESPIPE: Errno : 29
+EROFS: Errno : 30
+EMLINK: Errno : 31
+EPIPE: Errno : 32
+EDOM: Errno : 33
+ERANGE: Errno : 34 /* Result too large */
+EAGAIN: Errno : 35
+EINPROGRESS: Errno : 36
+EALREADY: Errno : 37
+ENOTSOCK: Errno : 38
+EDESTADDRREQ: Errno : 39
+EMSGSIZE: Errno : 40
+EPROTOTYPE: Errno : 41
+ENOPROTOOPT: Errno : 42
+EPROTONOSUPPORT: Errno : 43
+ESOCKTNOSUPPORT: Errno : 44
+EOPNOTSUPP: Errno : 45
+EPFNOSUPPORT: Errno : 46
+EAFNOSUPPORT: Errno : 47
+EADDRINUSE: Errno : 48
+EADDRNOTAVAIL: Errno : 49
+ENETDOWN: Errno : 50
+ENETUNREACH: Errno : 51
+ENETRESET: Errno : 52
+ECONNABORTED: Errno : 53
+ECONNRESET: Errno : 54
+ENOBUFS: Errno : 55
+EISCONN: Errno : 56
+ENOTCONN: Errno : 57
+ESHUTDOWN: Errno : 58
+ETIMEDOUT: Errno : 60
+ECONNREFUSED: Errno : 61
+ELOOP: Errno : 62
+ENAMETOOLING: Errno : 63
+EHOSTDOWN: Errno : 64
+EHOSTUNREACH: Errno : 65
+ENOTEMPTY: Errno : 66
+EPROCLIM: Errno : 67
+EUSERS: Errno : 68
+EDQUOT: Errno : 69
+ESTALE: Errno : 70
+EBADRPC: Errno : 72
+ERPCMISMATCH: Errno : 73
+EPROGUNAVAIL: Errno : 74
+EPROGMISMATCH: Errno : 75
+EPROCUNAVAIL: Errno : 76
+ENOLCK: Errno : 77
+ENOSYS: Errno : 78
+EFTYPE: Errno : 79
+EAUTH: Errno : 80
+ENEEDAUTH: Errno : 81
+EIDRM: Errno : 82
+ENOMSG: Errno : 83
+EOVERFLOW: Errno : 84
+ECANCELED: Errno : 85
+EILSEQ: Errno : 86
+ENOATTR: Errno : 87
+EDOOFUS: Errno : 88
+EBADMSG: Errno : 89
+EMULTIHOP: Errno : 90
+ENOLINK: Errno : 91
+EPROTO: Errno : 92
+ENOTCAPABLE: Errno : 93
+ECAPMODE: Errno : 94
+ENOTRECOVERABLE: Errno : 95
+EOWNERDEAD: Errno : 96
+
+O_RDONLY :: 0x00000
+O_WRONLY :: 0x00001
+O_RDWR :: 0x00002
+O_CREATE :: 0x00040
+O_EXCL :: 0x00080
+O_NOCTTY :: 0x00100
+O_TRUNC :: 0x00200
+O_NONBLOCK :: 0x00800
+O_APPEND :: 0x00400
+O_SYNC :: 0x01000
+O_ASYNC :: 0x02000
+O_CLOEXEC :: 0x80000
+
+
+SEEK_SET :: 0
+SEEK_CUR :: 1
+SEEK_END :: 2
+SEEK_DATA :: 3
+SEEK_HOLE :: 4
+SEEK_MAX :: SEEK_HOLE
// NOTE: These are OS specific!
// Do not mix these up!
-RTLD_LAZY :: 0x001;
-RTLD_NOW :: 0x002;
-//RTLD_BINDING_MASK :: 0x3; // Called MODEMASK in dlfcn.h
-RTLD_GLOBAL :: 0x100;
-RTLD_LOCAL :: 0x000;
-RTLD_TRACE :: 0x200;
-RTLD_NODELETE :: 0x01000;
-RTLD_NOLOAD :: 0x02000;
+RTLD_LAZY :: 0x001
+RTLD_NOW :: 0x002
+//RTLD_BINDING_MASK :: 0x3 // Called MODEMASK in dlfcn.h
+RTLD_GLOBAL :: 0x100
+RTLD_LOCAL :: 0x000
+RTLD_TRACE :: 0x200
+RTLD_NODELETE :: 0x01000
+RTLD_NOLOAD :: 0x02000
-args := _alloc_command_line_arguments();
+args := _alloc_command_line_arguments()
Unix_File_Time :: struct {
seconds: i64,
nanoseconds: c.long,
}
-pid_t :: u32;
+pid_t :: u32
OS_Stat :: struct {
device_id: u64,
@@ -177,297 +177,291 @@ OS_Stat :: struct {
}
// File type
-S_IFMT :: 0o170000; // Type of file mask
-S_IFIFO :: 0o010000; // Named pipe (fifo)
-S_IFCHR :: 0o020000; // Character special
-S_IFDIR :: 0o040000; // Directory
-S_IFBLK :: 0o060000; // Block special
-S_IFREG :: 0o100000; // Regular
-S_IFLNK :: 0o120000; // Symbolic link
-S_IFSOCK :: 0o140000; // Socket
-//S_ISVTX :: 0o001000; // Save swapped text even after use
+S_IFMT :: 0o170000 // Type of file mask
+S_IFIFO :: 0o010000 // Named pipe (fifo)
+S_IFCHR :: 0o020000 // Character special
+S_IFDIR :: 0o040000 // Directory
+S_IFBLK :: 0o060000 // Block special
+S_IFREG :: 0o100000 // Regular
+S_IFLNK :: 0o120000 // Symbolic link
+S_IFSOCK :: 0o140000 // Socket
+//S_ISVTX :: 0o001000 // Save swapped text even after use
// File mode
// Read, write, execute/search by owner
-S_IRWXU :: 0o0700; // RWX mask for owner
-S_IRUSR :: 0o0400; // R for owner
-S_IWUSR :: 0o0200; // W for owner
-S_IXUSR :: 0o0100; // X for owner
+S_IRWXU :: 0o0700 // RWX mask for owner
+S_IRUSR :: 0o0400 // R for owner
+S_IWUSR :: 0o0200 // W for owner
+S_IXUSR :: 0o0100 // X for owner
// Read, write, execute/search by group
-S_IRWXG :: 0o0070; // RWX mask for group
-S_IRGRP :: 0o0040; // R for group
-S_IWGRP :: 0o0020; // W for group
-S_IXGRP :: 0o0010; // X for group
+S_IRWXG :: 0o0070 // RWX mask for group
+S_IRGRP :: 0o0040 // R for group
+S_IWGRP :: 0o0020 // W for group
+S_IXGRP :: 0o0010 // X for group
// Read, write, execute/search by others
-S_IRWXO :: 0o0007; // RWX mask for other
-S_IROTH :: 0o0004; // R for other
-S_IWOTH :: 0o0002; // W for other
-S_IXOTH :: 0o0001; // X for other
+S_IRWXO :: 0o0007 // RWX mask for other
+S_IROTH :: 0o0004 // R for other
+S_IWOTH :: 0o0002 // W for other
+S_IXOTH :: 0o0001 // X for other
-S_ISUID :: 0o4000; // Set user id on execution
-S_ISGID :: 0o2000; // Set group id on execution
-S_ISVTX :: 0o1000; // Directory restrcted delete
+S_ISUID :: 0o4000 // Set user id on execution
+S_ISGID :: 0o2000 // Set group id on execution
+S_ISVTX :: 0o1000 // Directory restrcted delete
-S_ISLNK :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFLNK;
-S_ISREG :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFREG;
-S_ISDIR :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFDIR;
-S_ISCHR :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFCHR;
-S_ISBLK :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFBLK;
-S_ISFIFO :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFIFO;
-S_ISSOCK :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFSOCK;
+S_ISLNK :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFLNK
+S_ISREG :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFREG
+S_ISDIR :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFDIR
+S_ISCHR :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFCHR
+S_ISBLK :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFBLK
+S_ISFIFO :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFIFO
+S_ISSOCK :: #force_inline proc(m: u32) -> bool do return (m & S_IFMT) == S_IFSOCK
-F_OK :: 0; // Test for file existance
-X_OK :: 1; // Test for execute permission
-W_OK :: 2; // Test for write permission
-R_OK :: 4; // Test for read permission
+F_OK :: 0 // Test for file existance
+X_OK :: 1 // Test for execute permission
+W_OK :: 2 // Test for write permission
+R_OK :: 4 // Test for read permission
foreign libc {
- @(link_name="__error") __errno_location :: proc() -> ^int ---;
- @(link_name="syscall") syscall :: proc(number: Syscall, #c_vararg args: ..any) -> int ---;
-
- @(link_name="open") _unix_open :: proc(path: cstring, flags: c.int, mode: c.int) -> Handle ---;
- @(link_name="close") _unix_close :: proc(fd: Handle) -> c.int ---;
- @(link_name="read") _unix_read :: proc(fd: Handle, buf: rawptr, size: c.size_t) -> c.ssize_t ---;
- @(link_name="write") _unix_write :: proc(fd: Handle, buf: rawptr, size: c.size_t) -> c.ssize_t ---;
- @(link_name="lseek64") _unix_seek :: proc(fd: Handle, offset: i64, whence: c.int) -> i64 ---;
- @(link_name="gettid") _unix_gettid :: proc() -> u64 ---;
- @(link_name="getpagesize") _unix_getpagesize :: proc() -> c.int ---;
- @(link_name="stat64") _unix_stat :: proc(path: cstring, stat: ^OS_Stat) -> c.int ---;
- @(link_name="fstat") _unix_fstat :: proc(fd: Handle, stat: ^OS_Stat) -> c.int ---;
- @(link_name="access") _unix_access :: proc(path: cstring, mask: c.int) -> c.int ---;
-
- @(link_name="malloc") _unix_malloc :: proc(size: c.size_t) -> rawptr ---;
- @(link_name="calloc") _unix_calloc :: proc(num, size: c.size_t) -> rawptr ---;
- @(link_name="free") _unix_free :: proc(ptr: rawptr) ---;
- @(link_name="realloc") _unix_realloc :: proc(ptr: rawptr, size: c.size_t) -> rawptr ---;
- @(link_name="getenv") _unix_getenv :: proc(cstring) -> cstring ---;
- @(link_name="getcwd") _unix_getcwd :: proc(buf: cstring, len: c.size_t) -> cstring ---;
- @(link_name="chdir") _unix_chdir :: proc(buf: cstring) -> c.int ---;
-
- @(link_name="exit") _unix_exit :: proc(status: c.int) -> ! ---;
+ @(link_name="__error") __errno_location :: proc() -> ^int ---
+ @(link_name="syscall") syscall :: proc(number: Syscall, #c_vararg args: ..any) -> int ---
+
+ @(link_name="open") _unix_open :: proc(path: cstring, flags: c.int, mode: c.int) -> Handle ---
+ @(link_name="close") _unix_close :: proc(fd: Handle) -> c.int ---
+ @(link_name="read") _unix_read :: proc(fd: Handle, buf: rawptr, size: c.size_t) -> c.ssize_t ---
+ @(link_name="write") _unix_write :: proc(fd: Handle, buf: rawptr, size: c.size_t) -> c.ssize_t ---
+ @(link_name="lseek64") _unix_seek :: proc(fd: Handle, offset: i64, whence: c.int) -> i64 ---
+ @(link_name="gettid") _unix_gettid :: proc() -> u64 ---
+ @(link_name="getpagesize") _unix_getpagesize :: proc() -> c.int ---
+ @(link_name="stat64") _unix_stat :: proc(path: cstring, stat: ^OS_Stat) -> c.int ---
+ @(link_name="fstat") _unix_fstat :: proc(fd: Handle, stat: ^OS_Stat) -> c.int ---
+ @(link_name="access") _unix_access :: proc(path: cstring, mask: c.int) -> c.int ---
+
+ @(link_name="malloc") _unix_malloc :: proc(size: c.size_t) -> rawptr ---
+ @(link_name="calloc") _unix_calloc :: proc(num, size: c.size_t) -> rawptr ---
+ @(link_name="free") _unix_free :: proc(ptr: rawptr) ---
+ @(link_name="realloc") _unix_realloc :: proc(ptr: rawptr, size: c.size_t) -> rawptr ---
+ @(link_name="getenv") _unix_getenv :: proc(cstring) -> cstring ---
+ @(link_name="getcwd") _unix_getcwd :: proc(buf: cstring, len: c.size_t) -> cstring ---
+ @(link_name="chdir") _unix_chdir :: proc(buf: cstring) -> c.int ---
+
+ @(link_name="exit") _unix_exit :: proc(status: c.int) -> ! ---
}
foreign dl {
- @(link_name="dlopen") _unix_dlopen :: proc(filename: cstring, flags: c.int) -> rawptr ---;
- @(link_name="dlsym") _unix_dlsym :: proc(handle: rawptr, symbol: cstring) -> rawptr ---;
- @(link_name="dlclose") _unix_dlclose :: proc(handle: rawptr) -> c.int ---;
- @(link_name="dlerror") _unix_dlerror :: proc() -> cstring ---;
+ @(link_name="dlopen") _unix_dlopen :: proc(filename: cstring, flags: c.int) -> rawptr ---
+ @(link_name="dlsym") _unix_dlsym :: proc(handle: rawptr, symbol: cstring) -> rawptr ---
+ @(link_name="dlclose") _unix_dlclose :: proc(handle: rawptr) -> c.int ---
+ @(link_name="dlerror") _unix_dlerror :: proc() -> cstring ---
- @(link_name="pthread_getthreadid_np") pthread_getthreadid_np :: proc() -> c.int ---;
+ @(link_name="pthread_getthreadid_np") pthread_getthreadid_np :: proc() -> c.int ---
}
is_path_separator :: proc(r: rune) -> bool {
- return r == '/';
+ return r == '/'
}
get_last_error :: proc() -> int {
- return __errno_location()^;
+ return __errno_location()^
}
open :: proc(path: string, flags: int = O_RDONLY, mode: int = 0) -> (Handle, Errno) {
- cstr := strings.clone_to_cstring(path);
- handle := _unix_open(cstr, c.int(flags), c.int(mode));
- delete(cstr);
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ handle := _unix_open(cstr, c.int(flags), c.int(mode))
if handle == -1 {
- return INVALID_HANDLE, Errno(get_last_error());
+ return INVALID_HANDLE, Errno(get_last_error())
}
- return handle, ERROR_NONE;
+ return handle, ERROR_NONE
}
close :: proc(fd: Handle) -> Errno {
- result := _unix_close(fd);
+ result := _unix_close(fd)
if result == -1 {
- return Errno(get_last_error());
+ return Errno(get_last_error())
}
- return ERROR_NONE;
+ return ERROR_NONE
}
read :: proc(fd: Handle, data: []byte) -> (int, Errno) {
- bytes_read := _unix_read(fd, &data[0], c.size_t(len(data)));
+ bytes_read := _unix_read(fd, &data[0], c.size_t(len(data)))
if bytes_read == -1 {
- return -1, Errno(get_last_error());
+ return -1, Errno(get_last_error())
}
- return int(bytes_read), ERROR_NONE;
+ return int(bytes_read), ERROR_NONE
}
write :: proc(fd: Handle, data: []byte) -> (int, Errno) {
if len(data) == 0 {
- return 0, ERROR_NONE;
+ return 0, ERROR_NONE
}
- bytes_written := _unix_write(fd, &data[0], c.size_t(len(data)));
+ bytes_written := _unix_write(fd, &data[0], c.size_t(len(data)))
if bytes_written == -1 {
- return -1, Errno(get_last_error());
+ return -1, Errno(get_last_error())
}
- return int(bytes_written), ERROR_NONE;
+ return int(bytes_written), ERROR_NONE
}
seek :: proc(fd: Handle, offset: i64, whence: int) -> (i64, Errno) {
- res := _unix_seek(fd, offset, c.int(whence));
+ res := _unix_seek(fd, offset, c.int(whence))
if res == -1 {
- return -1, Errno(get_last_error());
+ return -1, Errno(get_last_error())
}
- return res, ERROR_NONE;
+ return res, ERROR_NONE
}
file_size :: proc(fd: Handle) -> (i64, Errno) {
- s, err := fstat(fd);
+ s, err := fstat(fd)
if err != ERROR_NONE {
- return -1, err;
+ return -1, err
}
- return s.size, ERROR_NONE;
+ return s.size, ERROR_NONE
}
-stdin: Handle = 0;
-stdout: Handle = 1;
-stderr: Handle = 2;
+stdin: Handle = 0
+stdout: Handle = 1
+stderr: Handle = 2
last_write_time :: proc(fd: Handle) -> (File_Time, Errno) {
- s, err := fstat(fd);
+ s, err := fstat(fd)
if err != ERROR_NONE {
- return 0, err;
+ return 0, err
}
- modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds;
- return File_Time(modified), ERROR_NONE;
+ modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds
+ return File_Time(modified), ERROR_NONE
}
last_write_time_by_name :: proc(name: string) -> (File_Time, Errno) {
- s, err := stat(name);
+ s, err := stat(name)
if err != ERROR_NONE {
- return 0, err;
+ return 0, err
}
- modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds;
- return File_Time(modified), ERROR_NONE;
+ modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds
+ return File_Time(modified), ERROR_NONE
}
stat :: proc(path: string) -> (OS_Stat, Errno) {
- cstr := strings.clone_to_cstring(path);
- defer delete(cstr);
-
- s: OS_Stat;
- result := _unix_stat(cstr, &s);
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ s: OS_Stat
+ result := _unix_stat(cstr, &s)
if result == -1 {
- return s, Errno(get_last_error());
+ return s, Errno(get_last_error())
}
- return s, ERROR_NONE;
+ return s, ERROR_NONE
}
fstat :: proc(fd: Handle) -> (OS_Stat, Errno) {
- s: OS_Stat;
- result := _unix_fstat(fd, &s);
+ s: OS_Stat
+ result := _unix_fstat(fd, &s)
if result == -1 {
- return s, Errno(get_last_error());
+ return s, Errno(get_last_error())
}
- return s, ERROR_NONE;
+ return s, ERROR_NONE
}
access :: proc(path: string, mask: int) -> (bool, Errno) {
- cstr := strings.clone_to_cstring(path);
- defer delete(cstr);
- result := _unix_access(cstr, c.int(mask));
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ result := _unix_access(cstr, c.int(mask))
if result == -1 {
- return false, Errno(get_last_error());
+ return false, Errno(get_last_error())
}
- return true, ERROR_NONE;
+ return true, ERROR_NONE
}
heap_alloc :: proc(size: int) -> rawptr {
- assert(size >= 0);
- return _unix_calloc(1, c.size_t(size));
+ assert(size >= 0)
+ return _unix_calloc(1, c.size_t(size))
}
heap_resize :: proc(ptr: rawptr, new_size: int) -> rawptr {
// NOTE: _unix_realloc doesn't guarantee new memory will be zeroed on
// POSIX platforms. Ensure your caller takes this into account.
- return _unix_realloc(ptr, c.size_t(new_size));
+ return _unix_realloc(ptr, c.size_t(new_size))
}
heap_free :: proc(ptr: rawptr) {
- _unix_free(ptr);
+ _unix_free(ptr)
}
getenv :: proc(name: string) -> (string, bool) {
- path_str := strings.clone_to_cstring(name);
- defer delete(path_str);
- cstr := _unix_getenv(path_str);
+ path_str := strings.clone_to_cstring(name, context.temp_allocator)
+ cstr := _unix_getenv(path_str)
if cstr == nil {
- return "", false;
+ return "", false
}
- return string(cstr), true;
+ return string(cstr), true
}
get_current_directory :: proc() -> string {
// NOTE(tetra): I would use PATH_MAX here, but I was not able to find
// an authoritative value for it across all systems.
// The largest value I could find was 4096, so might as well use the page size.
- page_size := get_page_size();
- buf := make([dynamic]u8, page_size);
+ page_size := get_page_size()
+ buf := make([dynamic]u8, page_size)
#no_bounds_check for {
- cwd := _unix_getcwd(cstring(&buf[0]), c.size_t(len(buf)));
+ cwd := _unix_getcwd(cstring(&buf[0]), c.size_t(len(buf)))
if cwd != nil {
- return string(cwd);
+ return string(cwd)
}
if Errno(get_last_error()) != ERANGE {
- return "";
+ return ""
}
- resize(&buf, len(buf)+page_size);
+ resize(&buf, len(buf)+page_size)
}
- unreachable();
+ unreachable()
}
set_current_directory :: proc(path: string) -> (err: Errno) {
- cstr := strings.clone_to_cstring(path, context.temp_allocator);
- res := _unix_chdir(cstr);
- if res == -1 do return Errno(get_last_error());
- return ERROR_NONE;
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ res := _unix_chdir(cstr)
+ if res == -1 do return Errno(get_last_error())
+ return ERROR_NONE
}
exit :: proc "contextless" (code: int) -> ! {
- _unix_exit(c.int(code));
+ runtime._cleanup_runtime_contextless()
+ _unix_exit(c.int(code))
}
current_thread_id :: proc "contextless" () -> int {
- return cast(int) pthread_getthreadid_np();
+ return cast(int) pthread_getthreadid_np()
}
dlopen :: proc(filename: string, flags: int) -> rawptr {
- cstr := strings.clone_to_cstring(filename);
- defer delete(cstr);
- handle := _unix_dlopen(cstr, c.int(flags));
- return handle;
+ cstr := strings.clone_to_cstring(filename, context.temp_allocator)
+ handle := _unix_dlopen(cstr, c.int(flags))
+ return handle
}
dlsym :: proc(handle: rawptr, symbol: string) -> rawptr {
- assert(handle != nil);
- cstr := strings.clone_to_cstring(symbol);
- defer delete(cstr);
- proc_handle := _unix_dlsym(handle, cstr);
- return proc_handle;
+ assert(handle != nil)
+ cstr := strings.clone_to_cstring(symbol, context.temp_allocator)
+ proc_handle := _unix_dlsym(handle, cstr)
+ return proc_handle
}
dlclose :: proc(handle: rawptr) -> bool {
- assert(handle != nil);
- return _unix_dlclose(handle) == 0;
+ assert(handle != nil)
+ return _unix_dlclose(handle) == 0
}
dlerror :: proc() -> string {
- return string(_unix_dlerror());
+ return string(_unix_dlerror())
}
get_page_size :: proc() -> int {
// NOTE(tetra): The page size never changes, so why do anything complicated
// if we don't have to.
- @static page_size := -1;
- if page_size != -1 do return page_size;
+ @static page_size := -1
+ if page_size != -1 do return page_size
- page_size = int(_unix_getpagesize());
- return page_size;
+ page_size = int(_unix_getpagesize())
+ return page_size
}
_alloc_command_line_arguments :: proc() -> []string {
- res := make([]string, len(runtime.args__));
+ res := make([]string, len(runtime.args__))
for arg, i in runtime.args__ {
- res[i] = string(arg);
+ res[i] = string(arg)
}
- return res;
+ return res
}
diff --git a/core/os/os_linux.odin b/core/os/os_linux.odin
index 140b84d8a..9716e2925 100644
--- a/core/os/os_linux.odin
+++ b/core/os/os_linux.odin
@@ -460,9 +460,8 @@ fork :: proc() -> (Pid, Errno) {
}
open :: proc(path: string, flags: int = O_RDONLY, mode: int = 0) -> (Handle, Errno) {
- cstr := strings.clone_to_cstring(path)
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
handle := _unix_open(cstr, flags, mode)
- defer delete(cstr)
if handle < 0 {
return INVALID_HANDLE, _get_errno(int(handle))
}
@@ -501,11 +500,13 @@ seek :: proc(fd: Handle, offset: i64, whence: int) -> (i64, Errno) {
}
file_size :: proc(fd: Handle) -> (i64, Errno) {
- s, err := _fstat(fd)
- if err != ERROR_NONE {
- return 0, err
- }
- return max(s.size, 0), ERROR_NONE
+ // deliberately uninitialized; the syscall fills this buffer for us
+ s: OS_Stat = ---
+ result := _unix_fstat(fd, &s)
+ if result < 0 {
+ return 0, _get_errno(result)
+ }
+ return max(s.size, 0), ERROR_NONE
}
rename :: proc(old_path, new_path: string) -> Errno {
@@ -608,8 +609,7 @@ last_write_time_by_name :: proc(name: string) -> (File_Time, Errno) {
@private
_stat :: proc(path: string) -> (OS_Stat, Errno) {
- cstr := strings.clone_to_cstring(path)
- defer delete(cstr)
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
// deliberately uninitialized; the syscall fills this buffer for us
s: OS_Stat = ---
@@ -622,8 +622,7 @@ _stat :: proc(path: string) -> (OS_Stat, Errno) {
@private
_lstat :: proc(path: string) -> (OS_Stat, Errno) {
- cstr := strings.clone_to_cstring(path)
- defer delete(cstr)
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
// deliberately uninitialized; the syscall fills this buffer for us
s: OS_Stat = ---
@@ -690,8 +689,7 @@ _readdir :: proc(dirp: Dir) -> (entry: Dirent, err: Errno, end_of_stream: bool)
@private
_readlink :: proc(path: string) -> (string, Errno) {
- path_cstr := strings.clone_to_cstring(path)
- defer delete(path_cstr)
+ path_cstr := strings.clone_to_cstring(path, context.temp_allocator)
bufsz : uint = 256
buf := make([]byte, bufsz)
@@ -727,8 +725,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
rel = "."
}
- rel_cstr := strings.clone_to_cstring(rel)
- defer delete(rel_cstr)
+ rel_cstr := strings.clone_to_cstring(rel, context.temp_allocator)
path_ptr := _unix_realpath(rel_cstr, nil)
if path_ptr == nil {
@@ -743,8 +740,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
}
access :: proc(path: string, mask: int) -> (bool, Errno) {
- cstr := strings.clone_to_cstring(path)
- defer delete(cstr)
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
result := _unix_access(cstr, mask)
if result < 0 {
return false, _get_errno(result)
@@ -768,8 +764,7 @@ heap_free :: proc(ptr: rawptr) {
}
getenv :: proc(name: string) -> (string, bool) {
- path_str := strings.clone_to_cstring(name)
- defer delete(path_str)
+ path_str := strings.clone_to_cstring(name, context.temp_allocator)
cstr := _unix_getenv(path_str)
if cstr == nil {
return "", false
@@ -807,6 +802,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
}
exit :: proc "contextless" (code: int) -> ! {
+ runtime._cleanup_runtime_contextless()
_unix_exit(c.int(code))
}
@@ -815,15 +811,13 @@ current_thread_id :: proc "contextless" () -> int {
}
dlopen :: proc(filename: string, flags: int) -> rawptr {
- cstr := strings.clone_to_cstring(filename)
- defer delete(cstr)
+ cstr := strings.clone_to_cstring(filename, context.temp_allocator)
handle := _unix_dlopen(cstr, c.int(flags))
return handle
}
dlsym :: proc(handle: rawptr, symbol: string) -> rawptr {
assert(handle != nil)
- cstr := strings.clone_to_cstring(symbol)
- defer delete(cstr)
+ cstr := strings.clone_to_cstring(symbol, context.temp_allocator)
proc_handle := _unix_dlsym(handle, cstr)
return proc_handle
}
diff --git a/core/os/os_openbsd.odin b/core/os/os_openbsd.odin
new file mode 100644
index 000000000..a99c8fef0
--- /dev/null
+++ b/core/os/os_openbsd.odin
@@ -0,0 +1,707 @@
+package os
+
+foreign import libc "system:c"
+
+import "core:strings"
+import "core:c"
+import "core:runtime"
+
+Handle :: distinct i32
+Pid :: distinct i32
+File_Time :: distinct u64
+Errno :: distinct i32
+
+INVALID_HANDLE :: ~Handle(0)
+
+ERROR_NONE: Errno: 0
+
+EPERM: Errno: 1
+ENOENT: Errno: 2
+ESRCH: Errno: 3
+EINTR: Errno: 4
+EIO: Errno: 5
+ENXIO: Errno: 6
+E2BIG: Errno: 7
+ENOEXEC: Errno: 8
+EBADF: Errno: 9
+ECHILD: Errno: 10
+EDEADLK: Errno: 11
+ENOMEM: Errno: 12
+EACCES: Errno: 13
+EFAULT: Errno: 14
+ENOTBLK: Errno: 15
+EBUSY: Errno: 16
+EEXIST: Errno: 17
+EXDEV: Errno: 18
+ENODEV: Errno: 19
+ENOTDIR: Errno: 20
+EISDIR: Errno: 21
+EINVAL: Errno: 22
+ENFILE: Errno: 23
+EMFILE: Errno: 24
+ENOTTY: Errno: 25
+ETXTBSY: Errno: 26
+EFBIG: Errno: 27
+ENOSPC: Errno: 28
+ESPIPE: Errno: 29
+EROFS: Errno: 30
+EMLINK: Errno: 31
+EPIPE: Errno: 32
+EDOM: Errno: 33
+ERANGE: Errno: 34
+EAGAIN: Errno: 35
+EWOULDBLOCK: Errno: EAGAIN
+EINPROGRESS: Errno: 36
+EALREADY: Errno: 37
+ENOTSOCK: Errno: 38
+EDESTADDRREQ: Errno: 39
+EMSGSIZE: Errno: 40
+EPROTOTYPE: Errno: 41
+ENOPROTOOPT: Errno: 42
+EPROTONOSUPPORT: Errno: 43
+ESOCKTNOSUPPORT: Errno: 44
+EOPNOTSUPP: Errno: 45
+EPFNOSUPPORT: Errno: 46
+EAFNOSUPPORT: Errno: 47
+EADDRINUSE: Errno: 48
+EADDRNOTAVAIL: Errno: 49
+ENETDOWN: Errno: 50
+ENETUNREACH: Errno: 51
+ENETRESET: Errno: 52
+ECONNABORTED: Errno: 53
+ECONNRESET: Errno: 54
+ENOBUFS: Errno: 55
+EISCONN: Errno: 56
+ENOTCONN: Errno: 57
+ESHUTDOWN: Errno: 58
+ETOOMANYREFS: Errno: 59
+ETIMEDOUT: Errno: 60
+ECONNREFUSED: Errno: 61
+ELOOP: Errno: 62
+ENAMETOOLONG: Errno: 63
+EHOSTDOWN: Errno: 64
+EHOSTUNREACH: Errno: 65
+ENOTEMPTY: Errno: 66
+EPROCLIM: Errno: 67
+EUSERS: Errno: 68
+EDQUOT: Errno: 69
+ESTALE: Errno: 70
+EREMOTE: Errno: 71
+EBADRPC: Errno: 72
+ERPCMISMATCH: Errno: 73
+EPROGUNAVAIL: Errno: 74
+EPROGMISMATCH: Errno: 75
+EPROCUNAVAIL: Errno: 76
+ENOLCK: Errno: 77
+ENOSYS: Errno: 78
+EFTYPE: Errno: 79
+EAUTH: Errno: 80
+ENEEDAUTH: Errno: 81
+EIPSEC: Errno: 82
+ENOATTR: Errno: 83
+EILSEQ: Errno: 84
+ENOMEDIUM: Errno: 85
+EMEDIUMTYPE: Errno: 86
+EOVERFLOW: Errno: 87
+ECANCELED: Errno: 88
+EIDRM: Errno: 89
+ENOMSG: Errno: 90
+ENOTSUP: Errno: 91
+EBADMSG: Errno: 92
+ENOTRECOVERABLE: Errno: 93
+EOWNERDEAD: Errno: 94
+EPROTO: Errno: 95
+
+O_RDONLY :: 0x00000
+O_WRONLY :: 0x00001
+O_RDWR :: 0x00002
+O_NONBLOCK :: 0x00004
+O_APPEND :: 0x00008
+O_ASYNC :: 0x00040
+O_SYNC :: 0x00080
+O_CREATE :: 0x00200
+O_TRUNC :: 0x00400
+O_EXCL :: 0x00800
+O_NOCTTY :: 0x08000
+O_CLOEXEC :: 0x10000
+
+SEEK_SET :: 0
+SEEK_CUR :: 1
+SEEK_END :: 2
+
+RTLD_LAZY :: 0x001
+RTLD_NOW :: 0x002
+RTLD_LOCAL :: 0x000
+RTLD_GLOBAL :: 0x100
+RTLD_TRACE :: 0x200
+RTLD_NODELETE :: 0x400
+
+MAX_PATH :: 1024
+
+// "Argv" arguments converted to Odin strings
+args := _alloc_command_line_arguments()
+
+pid_t :: i32
+time_t :: i64
+mode_t :: u32
+dev_t :: i32
+ino_t :: u64
+nlink_t :: u32
+uid_t :: u32
+gid_t :: u32
+off_t :: i64
+blkcnt_t :: u64
+blksize_t :: i32
+
+Unix_File_Time :: struct {
+ seconds: time_t,
+ nanoseconds: c.long,
+}
+
+OS_Stat :: struct {
+ mode: mode_t, // inode protection mode
+ device_id: dev_t, // inode's device
+ serial: ino_t, // inode's number
+ nlink: nlink_t, // number of hard links
+ uid: uid_t, // user ID of the file's owner
+ gid: gid_t, // group ID of the file's group
+ rdev: dev_t, // device type
+
+ last_access: Unix_File_Time, // time of last access
+ modified: Unix_File_Time, // time of last data modification
+ status_change: Unix_File_Time, // time of last file status change
+
+ size: off_t, // file size, in bytes
+ blocks: blkcnt_t, // blocks allocated for file
+ block_size: blksize_t, // optimal blocksize for I/O
+
+ flags: u32, // user defined flags for file
+ gen: u32, // file generation number
+ birthtime: Unix_File_Time, // time of file creation
+}
+
+MAXNAMLEN :: 255
+
+// NOTE(laleksic, 2021-01-21): Comment and rename these to match OS_Stat above
+Dirent :: struct {
+ ino: ino_t, // file number of entry
+ off: off_t, // offset after this entry
+ reclen: u16, // length of this record
+ type: u8, // file type
+ namlen: u8, // length of string in name
+ _padding: [4]u8,
+ name: [MAXNAMLEN + 1]byte, // name
+}
+
+Dir :: distinct rawptr // DIR*
+
+// File type
+S_IFMT :: 0o170000 // Type of file mask
+S_IFIFO :: 0o010000 // Named pipe (fifo)
+S_IFCHR :: 0o020000 // Character special
+S_IFDIR :: 0o040000 // Directory
+S_IFBLK :: 0o060000 // Block special
+S_IFREG :: 0o100000 // Regular
+S_IFLNK :: 0o120000 // Symbolic link
+S_IFSOCK :: 0o140000 // Socket
+S_ISVTX :: 0o001000 // Save swapped text even after use
+
+// File mode
+ // Read, write, execute/search by owner
+S_IRWXU :: 0o0700 // RWX mask for owner
+S_IRUSR :: 0o0400 // R for owner
+S_IWUSR :: 0o0200 // W for owner
+S_IXUSR :: 0o0100 // X for owner
+
+ // Read, write, execute/search by group
+S_IRWXG :: 0o0070 // RWX mask for group
+S_IRGRP :: 0o0040 // R for group
+S_IWGRP :: 0o0020 // W for group
+S_IXGRP :: 0o0010 // X for group
+
+ // Read, write, execute/search by others
+S_IRWXO :: 0o0007 // RWX mask for other
+S_IROTH :: 0o0004 // R for other
+S_IWOTH :: 0o0002 // W for other
+S_IXOTH :: 0o0001 // X for other
+
+S_ISUID :: 0o4000 // Set user id on execution
+S_ISGID :: 0o2000 // Set group id on execution
+S_ISTXT :: 0o1000 // Sticky bit
+
+S_ISLNK :: #force_inline proc(m: u32) -> bool { return (m & S_IFMT) == S_IFLNK }
+S_ISREG :: #force_inline proc(m: u32) -> bool { return (m & S_IFMT) == S_IFREG }
+S_ISDIR :: #force_inline proc(m: u32) -> bool { return (m & S_IFMT) == S_IFDIR }
+S_ISCHR :: #force_inline proc(m: u32) -> bool { return (m & S_IFMT) == S_IFCHR }
+S_ISBLK :: #force_inline proc(m: u32) -> bool { return (m & S_IFMT) == S_IFBLK }
+S_ISFIFO :: #force_inline proc(m: u32) -> bool { return (m & S_IFMT) == S_IFIFO }
+S_ISSOCK :: #force_inline proc(m: u32) -> bool { return (m & S_IFMT) == S_IFSOCK }
+
+F_OK :: 0x00 // Test for file existance
+X_OK :: 0x01 // Test for execute permission
+W_OK :: 0x02 // Test for write permission
+R_OK :: 0x04 // Test for read permission
+
+AT_FDCWD :: -100
+AT_EACCESS :: 0x01
+AT_SYMLINK_NOFOLLOW :: 0x02
+AT_SYMLINK_FOLLOW :: 0x04
+AT_REMOVEDIR :: 0x08
+
+@(default_calling_convention="c")
+foreign libc {
+ @(link_name="__errno") __errno :: proc() -> ^int ---
+
+ @(link_name="fork") _unix_fork :: proc() -> pid_t ---
+ @(link_name="getthrid") _unix_getthrid :: proc() -> int ---
+
+ @(link_name="open") _unix_open :: proc(path: cstring, flags: c.int, mode: c.int) -> Handle ---
+ @(link_name="close") _unix_close :: proc(fd: Handle) -> c.int ---
+ @(link_name="read") _unix_read :: proc(fd: Handle, buf: rawptr, size: c.size_t) -> c.ssize_t ---
+ @(link_name="write") _unix_write :: proc(fd: Handle, buf: rawptr, size: c.size_t) -> c.ssize_t ---
+ @(link_name="lseek") _unix_seek :: proc(fd: Handle, offset: off_t, whence: c.int) -> off_t ---
+ @(link_name="stat") _unix_stat :: proc(path: cstring, sb: ^OS_Stat) -> c.int ---
+ @(link_name="fstat") _unix_fstat :: proc(fd: Handle, sb: ^OS_Stat) -> c.int ---
+ @(link_name="lstat") _unix_lstat :: proc(path: cstring, sb: ^OS_Stat) -> c.int ---
+ @(link_name="readlink") _unix_readlink :: proc(path: cstring, buf: ^byte, bufsiz: c.size_t) -> c.ssize_t ---
+ @(link_name="access") _unix_access :: proc(path: cstring, mask: c.int) -> c.int ---
+ @(link_name="getcwd") _unix_getcwd :: proc(buf: cstring, len: c.size_t) -> cstring ---
+ @(link_name="chdir") _unix_chdir :: proc(path: cstring) -> c.int ---
+ @(link_name="rename") _unix_rename :: proc(old, new: cstring) -> c.int ---
+ @(link_name="unlink") _unix_unlink :: proc(path: cstring) -> c.int ---
+ @(link_name="rmdir") _unix_rmdir :: proc(path: cstring) -> c.int ---
+ @(link_name="mkdir") _unix_mkdir :: proc(path: cstring, mode: mode_t) -> c.int ---
+
+ @(link_name="getpagesize") _unix_getpagesize :: proc() -> c.int ---
+ @(link_name="fdopendir") _unix_fdopendir :: proc(fd: Handle) -> Dir ---
+ @(link_name="closedir") _unix_closedir :: proc(dirp: Dir) -> c.int ---
+ @(link_name="rewinddir") _unix_rewinddir :: proc(dirp: Dir) ---
+ @(link_name="readdir_r") _unix_readdir_r :: proc(dirp: Dir, entry: ^Dirent, result: ^^Dirent) -> c.int ---
+
+ @(link_name="malloc") _unix_malloc :: proc(size: c.size_t) -> rawptr ---
+ @(link_name="calloc") _unix_calloc :: proc(num, size: c.size_t) -> rawptr ---
+ @(link_name="free") _unix_free :: proc(ptr: rawptr) ---
+ @(link_name="realloc") _unix_realloc :: proc(ptr: rawptr, size: c.size_t) -> rawptr ---
+
+ @(link_name="getenv") _unix_getenv :: proc(cstring) -> cstring ---
+ @(link_name="realpath") _unix_realpath :: proc(path: cstring, resolved_path: rawptr) -> rawptr ---
+
+ @(link_name="exit") _unix_exit :: proc(status: c.int) -> ! ---
+
+ @(link_name="dlopen") _unix_dlopen :: proc(filename: cstring, flags: c.int) -> rawptr ---
+ @(link_name="dlsym") _unix_dlsym :: proc(handle: rawptr, symbol: cstring) -> rawptr ---
+ @(link_name="dlclose") _unix_dlclose :: proc(handle: rawptr) -> c.int ---
+ @(link_name="dlerror") _unix_dlerror :: proc() -> cstring ---
+}
+
+is_path_separator :: proc(r: rune) -> bool {
+ return r == '/'
+}
+
+get_last_error :: proc() -> int {
+ return __errno()^
+}
+
+fork :: proc() -> (Pid, Errno) {
+ pid := _unix_fork()
+ if pid == -1 {
+ return Pid(-1), Errno(get_last_error())
+ }
+ return Pid(pid), ERROR_NONE
+}
+
+open :: proc(path: string, flags: int = O_RDONLY, mode: int = 0) -> (Handle, Errno) {
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ handle := _unix_open(cstr, c.int(flags), c.int(mode))
+ if handle == -1 {
+ return INVALID_HANDLE, Errno(get_last_error())
+ }
+ return handle, ERROR_NONE
+}
+
+close :: proc(fd: Handle) -> Errno {
+ result := _unix_close(fd)
+ if result == -1 {
+ return Errno(get_last_error())
+ }
+ return ERROR_NONE
+}
+
+read :: proc(fd: Handle, data: []byte) -> (int, Errno) {
+ bytes_read := _unix_read(fd, &data[0], c.size_t(len(data)))
+ if bytes_read == -1 {
+ return -1, Errno(get_last_error())
+ }
+ return int(bytes_read), ERROR_NONE
+}
+
+write :: proc(fd: Handle, data: []byte) -> (int, Errno) {
+ if len(data) == 0 {
+ return 0, ERROR_NONE
+ }
+ bytes_written := _unix_write(fd, &data[0], c.size_t(len(data)))
+ if bytes_written == -1 {
+ return -1, Errno(get_last_error())
+ }
+ return int(bytes_written), ERROR_NONE
+}
+
+seek :: proc(fd: Handle, offset: i64, whence: int) -> (i64, Errno) {
+ res := _unix_seek(fd, offset, c.int(whence))
+ if res == -1 {
+ return -1, Errno(get_last_error())
+ }
+ return res, ERROR_NONE
+}
+
+file_size :: proc(fd: Handle) -> (i64, Errno) {
+ s, err := _fstat(fd)
+ if err != ERROR_NONE {
+ return -1, err
+ }
+ return s.size, ERROR_NONE
+}
+
+rename :: proc(old_path, new_path: string) -> Errno {
+ old_path_cstr := strings.clone_to_cstring(old_path, context.temp_allocator)
+ new_path_cstr := strings.clone_to_cstring(new_path, context.temp_allocator)
+ res := _unix_rename(old_path_cstr, new_path_cstr)
+ if res == -1 {
+ return Errno(get_last_error())
+ }
+ return ERROR_NONE
+}
+
+remove :: proc(path: string) -> Errno {
+ path_cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ res := _unix_unlink(path_cstr)
+ if res == -1 {
+ return Errno(get_last_error())
+ }
+ return ERROR_NONE
+}
+
+make_directory :: proc(path: string, mode: mode_t = 0o775) -> Errno {
+ path_cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ res := _unix_mkdir(path_cstr, mode)
+ if res == -1 {
+ return Errno(get_last_error())
+ }
+ return ERROR_NONE
+}
+
+remove_directory :: proc(path: string) -> Errno {
+ path_cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ res := _unix_rmdir(path_cstr)
+ if res == -1 {
+ return Errno(get_last_error())
+ }
+ return ERROR_NONE
+}
+
+is_file_handle :: proc(fd: Handle) -> bool {
+ s, err := _fstat(fd)
+ if err != ERROR_NONE {
+ return false
+ }
+ return S_ISREG(s.mode)
+}
+
+is_file_path :: proc(path: string, follow_links: bool = true) -> bool {
+ s: OS_Stat
+ err: Errno
+ if follow_links {
+ s, err = _stat(path)
+ } else {
+ s, err = _lstat(path)
+ }
+ if err != ERROR_NONE {
+ return false
+ }
+ return S_ISREG(s.mode)
+}
+
+is_dir_handle :: proc(fd: Handle) -> bool {
+ s, err := _fstat(fd)
+ if err != ERROR_NONE {
+ return false
+ }
+ return S_ISDIR(s.mode)
+}
+
+is_dir_path :: proc(path: string, follow_links: bool = true) -> bool {
+ s: OS_Stat
+ err: Errno
+ if follow_links {
+ s, err = _stat(path)
+ } else {
+ s, err = _lstat(path)
+ }
+ if err != ERROR_NONE {
+ return false
+ }
+ return S_ISDIR(s.mode)
+}
+
+is_file :: proc {is_file_path, is_file_handle}
+is_dir :: proc {is_dir_path, is_dir_handle}
+
+// NOTE(bill): Uses startup to initialize it
+
+stdin: Handle = 0
+stdout: Handle = 1
+stderr: Handle = 2
+
+/* TODO(zangent): Implement these!
+last_write_time :: proc(fd: Handle) -> File_Time {}
+last_write_time_by_name :: proc(name: string) -> File_Time {}
+*/
+last_write_time :: proc(fd: Handle) -> (File_Time, Errno) {
+ s, err := _fstat(fd)
+ if err != ERROR_NONE {
+ return 0, err
+ }
+ modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds
+ return File_Time(modified), ERROR_NONE
+}
+
+last_write_time_by_name :: proc(name: string) -> (File_Time, Errno) {
+ s, err := _stat(name)
+ if err != ERROR_NONE {
+ return 0, err
+ }
+ modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds
+ return File_Time(modified), ERROR_NONE
+}
+
+@private
+_stat :: proc(path: string) -> (OS_Stat, Errno) {
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+
+ // deliberately uninitialized
+ s: OS_Stat = ---
+ res := _unix_stat(cstr, &s)
+ if res == -1 {
+ return s, Errno(get_last_error())
+ }
+ return s, ERROR_NONE
+}
+
+@private
+_lstat :: proc(path: string) -> (OS_Stat, Errno) {
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+
+ // deliberately uninitialized
+ s: OS_Stat = ---
+ res := _unix_lstat(cstr, &s)
+ if res == -1 {
+ return s, Errno(get_last_error())
+ }
+ return s, ERROR_NONE
+}
+
+@private
+_fstat :: proc(fd: Handle) -> (OS_Stat, Errno) {
+ // deliberately uninitialized
+ s: OS_Stat = ---
+ res := _unix_fstat(fd, &s)
+ if res == -1 {
+ return s, Errno(get_last_error())
+ }
+ return s, ERROR_NONE
+}
+
+@private
+_fdopendir :: proc(fd: Handle) -> (Dir, Errno) {
+ dirp := _unix_fdopendir(fd)
+ if dirp == cast(Dir)nil {
+ return nil, Errno(get_last_error())
+ }
+ return dirp, ERROR_NONE
+}
+
+@private
+_closedir :: proc(dirp: Dir) -> Errno {
+ rc := _unix_closedir(dirp)
+ if rc != 0 {
+ return Errno(get_last_error())
+ }
+ return ERROR_NONE
+}
+
+@private
+_rewinddir :: proc(dirp: Dir) {
+ _unix_rewinddir(dirp)
+}
+
+@private
+_readdir :: proc(dirp: Dir) -> (entry: Dirent, err: Errno, end_of_stream: bool) {
+ result: ^Dirent
+ rc := _unix_readdir_r(dirp, &entry, &result)
+
+ if rc != 0 {
+ err = Errno(get_last_error())
+ return
+ }
+ err = ERROR_NONE
+
+ if result == nil {
+ end_of_stream = true
+ return
+ }
+
+ return
+}
+
+@private
+_readlink :: proc(path: string) -> (string, Errno) {
+ path_cstr := strings.clone_to_cstring(path, context.temp_allocator)
+
+ bufsz : uint = MAX_PATH
+ buf := make([]byte, MAX_PATH)
+ for {
+ rc := _unix_readlink(path_cstr, &(buf[0]), bufsz)
+ if rc == -1 {
+ delete(buf)
+ return "", Errno(get_last_error())
+ } else if rc == int(bufsz) {
+ bufsz += MAX_PATH
+ delete(buf)
+ buf = make([]byte, bufsz)
+ } else {
+ return strings.string_from_ptr(&buf[0], rc), ERROR_NONE
+ }
+ }
+ unreachable()
+}
+
+// XXX OpenBSD
+absolute_path_from_handle :: proc(fd: Handle) -> (string, Errno) {
+ return "", Errno(ENOSYS)
+}
+
+absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
+ rel := rel
+ if rel == "" {
+ rel = "."
+ }
+
+ rel_cstr := strings.clone_to_cstring(rel, context.temp_allocator)
+
+ path_ptr := _unix_realpath(rel_cstr, nil)
+ if path_ptr == nil {
+ return "", Errno(get_last_error())
+ }
+ defer _unix_free(path_ptr)
+
+ path_cstr := transmute(cstring)path_ptr
+ path = strings.clone( string(path_cstr) )
+
+ return path, ERROR_NONE
+}
+
+access :: proc(path: string, mask: int) -> (bool, Errno) {
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ res := _unix_access(cstr, c.int(mask))
+ if res == -1 {
+ return false, Errno(get_last_error())
+ }
+ return true, ERROR_NONE
+}
+
+heap_alloc :: proc(size: int) -> rawptr {
+ assert(size >= 0)
+ return _unix_calloc(1, c.size_t(size))
+}
+
+heap_resize :: proc(ptr: rawptr, new_size: int) -> rawptr {
+ // NOTE: _unix_realloc doesn't guarantee new memory will be zeroed on
+ // POSIX platforms. Ensure your caller takes this into account.
+ return _unix_realloc(ptr, c.size_t(new_size))
+}
+
+heap_free :: proc(ptr: rawptr) {
+ _unix_free(ptr)
+}
+
+getenv :: proc(name: string) -> (string, bool) {
+ path_str := strings.clone_to_cstring(name, context.temp_allocator)
+ cstr := _unix_getenv(path_str)
+ if cstr == nil {
+ return "", false
+ }
+ return string(cstr), true
+}
+
+get_current_directory :: proc() -> string {
+ buf := make([dynamic]u8, MAX_PATH)
+ for {
+ cwd := _unix_getcwd(cstring(raw_data(buf)), c.size_t(len(buf)))
+ if cwd != nil {
+ return string(cwd)
+ }
+ if Errno(get_last_error()) != ERANGE {
+ return ""
+ }
+ resize(&buf, len(buf) + MAX_PATH)
+ }
+ unreachable()
+}
+
+set_current_directory :: proc(path: string) -> (err: Errno) {
+ cstr := strings.clone_to_cstring(path, context.temp_allocator)
+ res := _unix_chdir(cstr)
+ if res == -1 {
+ return Errno(get_last_error())
+ }
+ return ERROR_NONE
+}
+
+exit :: proc "contextless" (code: int) -> ! {
+ runtime._cleanup_runtime_contextless()
+ _unix_exit(c.int(code))
+}
+
+current_thread_id :: proc "contextless" () -> int {
+ return _unix_getthrid()
+}
+
+dlopen :: proc(filename: string, flags: int) -> rawptr {
+ cstr := strings.clone_to_cstring(filename, context.temp_allocator)
+ handle := _unix_dlopen(cstr, c.int(flags))
+ return handle
+}
+dlsym :: proc(handle: rawptr, symbol: string) -> rawptr {
+ assert(handle != nil)
+ cstr := strings.clone_to_cstring(symbol, context.temp_allocator)
+ proc_handle := _unix_dlsym(handle, cstr)
+ return proc_handle
+}
+dlclose :: proc(handle: rawptr) -> bool {
+ assert(handle != nil)
+ return _unix_dlclose(handle) == 0
+}
+dlerror :: proc() -> string {
+ return string(_unix_dlerror())
+}
+
+get_page_size :: proc() -> int {
+ // NOTE(tetra): The page size never changes, so why do anything complicated
+ // if we don't have to.
+ @static page_size := -1
+ if page_size != -1 {
+ return page_size
+ }
+
+ page_size = int(_unix_getpagesize())
+ return page_size
+}
+
+
+_alloc_command_line_arguments :: proc() -> []string {
+ res := make([]string, len(runtime.args__))
+ for arg, i in runtime.args__ {
+ res[i] = string(arg)
+ }
+ return res
+}
diff --git a/core/os/os_wasi.odin b/core/os/os_wasi.odin
index d2ba166bd..7bab1b949 100644
--- a/core/os/os_wasi.odin
+++ b/core/os/os_wasi.odin
@@ -1,6 +1,7 @@
package os
import "core:sys/wasm/wasi"
+import "core:runtime"
Handle :: distinct i32
Errno :: distinct i32
@@ -93,5 +94,6 @@ heap_free :: proc(ptr: rawptr) {
exit :: proc "contextless" (code: int) -> ! {
+ runtime._cleanup_runtime_contextless()
wasi.proc_exit(wasi.exitcode_t(code))
} \ No newline at end of file
diff --git a/core/os/os_windows.odin b/core/os/os_windows.odin
index e6efb89df..fe9496e4c 100644
--- a/core/os/os_windows.odin
+++ b/core/os/os_windows.odin
@@ -2,6 +2,7 @@
package os
import win32 "core:sys/windows"
+import "core:runtime"
Handle :: distinct uintptr
File_Time :: distinct u64
@@ -128,6 +129,7 @@ get_page_size :: proc() -> int {
exit :: proc "contextless" (code: int) -> ! {
+ runtime._cleanup_runtime_contextless()
win32.ExitProcess(win32.DWORD(code))
}
diff --git a/core/os/stat_unix.odin b/core/os/stat_unix.odin
index 08c6f53c4..2aa9fc283 100644
--- a/core/os/stat_unix.odin
+++ b/core/os/stat_unix.odin
@@ -1,4 +1,4 @@
-//+build linux, darwin, freebsd
+//+build linux, darwin, freebsd, openbsd
package os
import "core:time"
diff --git a/core/os/stat_windows.odin b/core/os/stat_windows.odin
index 2d9f98fd4..964625315 100644
--- a/core/os/stat_windows.odin
+++ b/core/os/stat_windows.odin
@@ -132,26 +132,11 @@ cleanpath_strip_prefix :: proc(buf: []u16) -> []u16 {
@(private)
cleanpath_from_handle :: proc(fd: Handle) -> (string, Errno) {
- if fd == 0 {
- return "", ERROR_INVALID_HANDLE
- }
- h := win32.HANDLE(fd)
-
- MAX_PATH := win32.DWORD(260) + 1
- buf: []u16
- for {
- buf = make([]u16, MAX_PATH, context.temp_allocator)
- err := win32.GetFinalPathNameByHandleW(h, raw_data(buf), MAX_PATH, 0)
- switch Errno(err) {
- case ERROR_PATH_NOT_FOUND, ERROR_INVALID_PARAMETER:
- return "", Errno(err)
- case ERROR_NOT_ENOUGH_MEMORY:
- MAX_PATH = MAX_PATH*2 + 1
- continue
- }
- break
+ buf, err := cleanpath_from_handle_u16(fd)
+ if err != 0 {
+ return "", err
}
- return cleanpath_from_buf(buf), ERROR_NONE
+ return win32.utf16_to_utf8(buf, context.allocator), err
}
@(private)
cleanpath_from_handle_u16 :: proc(fd: Handle) -> ([]u16, Errno) {
@@ -160,21 +145,13 @@ cleanpath_from_handle_u16 :: proc(fd: Handle) -> ([]u16, Errno) {
}
h := win32.HANDLE(fd)
- MAX_PATH := win32.DWORD(260) + 1
- buf: []u16
- for {
- buf = make([]u16, MAX_PATH, context.temp_allocator)
- err := win32.GetFinalPathNameByHandleW(h, raw_data(buf), MAX_PATH, 0)
- switch Errno(err) {
- case ERROR_PATH_NOT_FOUND, ERROR_INVALID_PARAMETER:
- return nil, Errno(err)
- case ERROR_NOT_ENOUGH_MEMORY:
- MAX_PATH = MAX_PATH*2 + 1
- continue
- }
- break
+ n := win32.GetFinalPathNameByHandleW(h, nil, 0, 0)
+ if n == 0 {
+ return nil, Errno(win32.GetLastError())
}
- return cleanpath_strip_prefix(buf), ERROR_NONE
+ buf := make([]u16, max(n, win32.DWORD(260))+1, context.temp_allocator)
+ buf_len := win32.GetFinalPathNameByHandleW(h, raw_data(buf), n, 0)
+ return buf[:buf_len], ERROR_NONE
}
@(private)
cleanpath_from_buf :: proc(buf: []u16) -> string {
diff --git a/core/path/filepath/path.odin b/core/path/filepath/path.odin
index d6e36f649..ba6e11044 100644
--- a/core/path/filepath/path.odin
+++ b/core/path/filepath/path.odin
@@ -284,13 +284,14 @@ rel :: proc(base_path, target_path: string, allocator := context.allocator) -> (
}
dir :: proc(path: string, allocator := context.allocator) -> string {
+ context.allocator = allocator
vol := volume_name(path)
i := len(path) - 1
for i >= len(vol) && !is_separator(path[i]) {
i -= 1
}
- dir := clean(path[len(vol) : i+1], allocator)
- defer delete(dir, allocator)
+ dir := clean(path[len(vol) : i+1])
+ defer delete(dir)
if dir == "." && len(vol) > 2 {
return strings.clone(vol)
}
diff --git a/core/path/filepath/path_unix.odin b/core/path/filepath/path_unix.odin
index 3e49c4710..d0eaa3635 100644
--- a/core/path/filepath/path_unix.odin
+++ b/core/path/filepath/path_unix.odin
@@ -1,4 +1,4 @@
-//+build linux, darwin, freebsd
+//+build linux, darwin, freebsd, openbsd
package filepath
when ODIN_OS == .Darwin {
@@ -59,6 +59,11 @@ when ODIN_OS == .Darwin {
foreign libc {
@(link_name="__error") __error :: proc() -> ^i32 ---
}
+} else when ODIN_OS == .OpenBSD {
+ @(private)
+ foreign libc {
+ @(link_name="__errno") __error :: proc() -> ^i32 ---
+ }
} else {
@(private)
foreign libc {
diff --git a/core/reflect/reflect.odin b/core/reflect/reflect.odin
index 05b3a5da0..d05026532 100644
--- a/core/reflect/reflect.odin
+++ b/core/reflect/reflect.odin
@@ -365,6 +365,19 @@ index :: proc(val: any, i: int, loc := #caller_location) -> any {
return nil
}
+deref :: proc(val: any) -> any {
+ if val != nil {
+ ti := type_info_base(type_info_of(val.id))
+ if info, ok := ti.variant.(Type_Info_Pointer); ok {
+ return any{
+ (^rawptr)(val.data)^,
+ info.elem.id,
+ }
+ }
+ }
+ return val
+}
+
// Struct_Tag represents the type of the string of a struct field
@@ -680,7 +693,6 @@ union_variant_typeid :: proc(a: any) -> typeid {
return nil
}
panic("expected a union to reflect.union_variant_typeid")
-
}
get_union_variant_raw_tag :: proc(a: any) -> i64 {
diff --git a/core/reflect/types.odin b/core/reflect/types.odin
index a9a4a8d48..2e2149820 100644
--- a/core/reflect/types.odin
+++ b/core/reflect/types.odin
@@ -334,11 +334,11 @@ is_relative_slice :: proc(info: ^Type_Info) -> bool {
-write_typeid_builder :: proc(buf: ^strings.Builder, id: typeid) {
- write_type(buf, type_info_of(id))
+write_typeid_builder :: proc(buf: ^strings.Builder, id: typeid, n_written: ^int = nil) -> (n: int, err: io.Error) {
+ return write_type_writer(strings.to_writer(buf), type_info_of(id))
}
-write_typeid_writer :: proc(writer: io.Writer, id: typeid) {
- write_type(writer, type_info_of(id))
+write_typeid_writer :: proc(writer: io.Writer, id: typeid, n_written: ^int = nil) -> (n: int, err: io.Error) {
+ return write_type_writer(writer, type_info_of(id), n_written)
}
write_typeid :: proc{
diff --git a/core/runtime/core.odin b/core/runtime/core.odin
index 229d70417..08ca4c049 100644
--- a/core/runtime/core.odin
+++ b/core/runtime/core.odin
@@ -351,7 +351,6 @@ Context :: struct {
assertion_failure_proc: Assertion_Failure_Proc,
logger: Logger,
- user_data: any,
user_ptr: rawptr,
user_index: int,
@@ -460,6 +459,11 @@ _cleanup_runtime :: proc() {
default_temp_allocator_destroy(&global_default_temp_allocator_data)
}
+_cleanup_runtime_contextless :: proc "contextless" () {
+ context = default_context()
+ _cleanup_runtime()
+}
+
/////////////////////////////
/////////////////////////////
diff --git a/core/runtime/entry_unix.odin b/core/runtime/entry_unix.odin
index dd1e06625..1a3def200 100644
--- a/core/runtime/entry_unix.odin
+++ b/core/runtime/entry_unix.odin
@@ -1,5 +1,5 @@
//+private
-//+build linux, darwin, freebsd
+//+build linux, darwin, freebsd, openbsd
package runtime
import "core:intrinsics"
diff --git a/core/slice/slice.odin b/core/slice/slice.odin
index 5fecc76b1..520e3e1e0 100644
--- a/core/slice/slice.odin
+++ b/core/slice/slice.odin
@@ -304,7 +304,7 @@ filter :: proc(s: $S/[]$U, f: proc(U) -> bool, allocator := context.allocator) -
return r[:]
}
-scanner :: proc (s: $S/[]$U, initializer: $V, f: proc(V, U)->V, allocator := context.allocator) -> []V {
+scanner :: proc (s: $S/[]$U, initializer: $V, f: proc(V, U) -> V, allocator := context.allocator) -> []V {
if len(s) == 0 { return {} }
res := make([]V, len(s), allocator)
@@ -344,15 +344,106 @@ max :: proc(s: $S/[]$T) -> (res: T, ok: bool) where intrinsics.type_is_ordered(T
return
}
+min_max :: proc(s: $S/[]$T) -> (min, max: T, ok: bool) where intrinsics.type_is_ordered(T) {
+ if len(s) != 0 {
+ min, max = s[0], s[0]
+ ok = true
+ for v in s[1:] {
+ min = builtin.min(min, v)
+ max = builtin.max(max, v)
+ }
+ }
+ return
+}
+
+any_of :: proc(s: $S/[]$T, value: T) -> bool where intrinsics.type_is_comparable(T) {
+ for v in s {
+ if v == value {
+ return true
+ }
+ }
+ return false
+}
+
+none_of :: proc(s: $S/[]$T, value: T) -> bool where intrinsics.type_is_comparable(T) {
+ for v in s {
+ if v == value {
+ return false
+ }
+ }
+ return true
+}
+
+all_of :: proc(s: $S/[]$T, value: T) -> bool where intrinsics.type_is_comparable(T) {
+ if len(s) == 0 {
+ return false
+ }
+ for v in s {
+ if v != value {
+ return false
+ }
+ }
+ return true
+}
+
-dot_product :: proc(a, b: $S/[]$T) -> T
+any_of_proc :: proc(s: $S/[]$T, f: proc(T) -> bool) -> bool {
+ for v in s {
+ if f(v) {
+ return true
+ }
+ }
+ return false
+}
+
+none_of_proc :: proc(s: $S/[]$T, f: proc(T) -> bool) -> bool {
+ for v in s {
+ if f(v) {
+ return false
+ }
+ }
+ return true
+}
+
+all_of_proc :: proc(s: $S/[]$T, f: proc(T) -> bool) -> bool {
+ if len(s) == 0 {
+ return false
+ }
+ for v in s {
+ if !f(v) {
+ return false
+ }
+ }
+ return true
+}
+
+
+count :: proc(s: $S/[]$T, value: T) -> (n: int) where intrinsics.type_is_comparable(T) {
+ for v in s {
+ if v == value {
+ n += 1
+ }
+ }
+ return
+}
+
+count_proc :: proc(s: $S/[]$T, f: proc(T) -> bool) -> (n: int) {
+ for v in s {
+ if f(v) {
+ n += 1
+ }
+ }
+ return
+}
+
+
+dot_product :: proc(a, b: $S/[]$T) -> (r: T, ok: bool)
where intrinsics.type_is_numeric(T) {
if len(a) != len(b) {
- panic("slice.dot_product: slices of unequal length")
+ return
}
- r: T
#no_bounds_check for _, i in a {
r += a[i] * b[i]
}
- return r
+ return r, true
}
diff --git a/core/strconv/strconv.odin b/core/strconv/strconv.odin
index 6ea8b39e6..65161a820 100644
--- a/core/strconv/strconv.odin
+++ b/core/strconv/strconv.odin
@@ -895,6 +895,7 @@ unquote_string :: proc(lit: string, allocator := context.allocator) -> (res: str
if s == `""` {
return "", false, true
}
+ s = s[1:len(s)-1]
if contains_rune(s, '\n') >= 0 {
return s, false, false
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index 4daa0bacd..670da166b 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -280,10 +280,29 @@ _split :: proc(s_, sep: string, sep_save, n_: int, allocator := context.allocato
return res[:i+1]
}
+/*
+ Splits a string into parts, based on a separator.
+ Returned strings are substrings of 's'.
+ ```
+ s := "aaa.bbb.ccc.ddd.eee" // 5 parts
+ ss := split(s, ".")
+ fmt.println(ss) // [aaa, bbb, ccc, ddd, eee]
+ ```
+*/
split :: proc(s, sep: string, allocator := context.allocator) -> []string {
return _split(s, sep, 0, -1, allocator)
}
+/*
+ Splits a string into a total of 'n' parts, based on a separator.
+ Returns fewer parts if there wasn't enough occurrences of the separator.
+ Returned strings are substrings of 's'.
+ ```
+ s := "aaa.bbb.ccc.ddd.eee" // 5 parts present
+ ss := split_n(s, ".", 3) // total of 3 wanted
+ fmt.println(ss) // [aaa, bbb, ccc.ddd.eee]
+ ```
+*/
split_n :: proc(s, sep: string, n: int, allocator := context.allocator) -> []string {
return _split(s, sep, 0, n, allocator)
}
diff --git a/core/sync/channel_unix.odin b/core/sync/channel_unix.odin
index d6bac2d71..47aa46004 100644
--- a/core/sync/channel_unix.odin
+++ b/core/sync/channel_unix.odin
@@ -1,4 +1,4 @@
-// +build linux, darwin, freebsd
+// +build linux, darwin, freebsd, openbsd
package sync
import "core:time"
diff --git a/core/sync/sync2/futex_openbsd.odin b/core/sync/sync2/futex_openbsd.odin
new file mode 100644
index 000000000..dbc80747b
--- /dev/null
+++ b/core/sync/sync2/futex_openbsd.odin
@@ -0,0 +1,78 @@
+//+private
+//+build openbsd
+package sync2
+
+import "core:c"
+import "core:os"
+import "core:time"
+
+FUTEX_WAIT :: 1
+FUTEX_WAKE :: 2
+
+FUTEX_PRIVATE_FLAG :: 128
+
+FUTEX_WAIT_PRIVATE :: (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
+FUTEX_WAKE_PRIVATE :: (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
+
+foreign import libc "system:c"
+
+foreign libc {
+ @(link_name="futex")
+ _unix_futex :: proc "c" (f: ^Futex, op: c.int, val: u32, timeout: rawptr) -> c.int ---
+}
+
+_futex_wait :: proc(f: ^Futex, expected: u32) -> bool {
+ res := _unix_futex(f, FUTEX_WAIT_PRIVATE, expected, nil)
+
+ if res != -1 {
+ return true
+ }
+
+ if os.Errno(os.get_last_error()) == os.ETIMEDOUT {
+ return false
+ }
+
+ panic("futex_wait failure")
+}
+
+_futex_wait_with_timeout :: proc(f: ^Futex, expected: u32, duration: time.Duration) -> bool {
+ if duration <= 0 {
+ return false
+ }
+
+ timespec_t :: struct {
+ tv_sec: c.long,
+ tv_nsec: c.long,
+ }
+
+ res := _unix_futex(f, FUTEX_WAIT_PRIVATE, expected, &timespec_t{
+ tv_sec = (c.long)(duration/1e9),
+ tv_nsec = (c.long)(duration%1e9),
+ })
+
+ if res != -1 {
+ return true
+ }
+
+ if os.Errno(os.get_last_error()) == os.ETIMEDOUT {
+ return false
+ }
+
+ panic("futex_wait_with_timeout failure")
+}
+
+_futex_signal :: proc(f: ^Futex) {
+ res := _unix_futex(f, FUTEX_WAKE_PRIVATE, 1, nil)
+
+ if res == -1 {
+ panic("futex_wake_single failure")
+ }
+}
+
+_futex_broadcast :: proc(f: ^Futex) {
+ res := _unix_futex(f, FUTEX_WAKE_PRIVATE, u32(max(i32)), nil)
+
+ if res == -1 {
+ panic("_futex_wake_all failure")
+ }
+}
diff --git a/core/sync/sync2/primitives_openbsd.odin b/core/sync/sync2/primitives_openbsd.odin
new file mode 100644
index 000000000..ef122b02e
--- /dev/null
+++ b/core/sync/sync2/primitives_openbsd.odin
@@ -0,0 +1,9 @@
+//+build openbsd
+//+private
+package sync2
+
+import "core:os"
+
+_current_thread_id :: proc "contextless" () -> int {
+ return os.current_thread_id()
+}
diff --git a/core/sync/sync2/primitives_pthreads.odin b/core/sync/sync2/primitives_pthreads.odin
index 8d2c3986d..28053f9cc 100644
--- a/core/sync/sync2/primitives_pthreads.odin
+++ b/core/sync/sync2/primitives_pthreads.odin
@@ -1,4 +1,4 @@
-//+build linux, freebsd
+//+build linux, freebsd, openbsd
//+private
package sync2
diff --git a/core/sync/sync_openbsd.odin b/core/sync/sync_openbsd.odin
new file mode 100644
index 000000000..926655f5b
--- /dev/null
+++ b/core/sync/sync_openbsd.odin
@@ -0,0 +1,36 @@
+package sync
+
+import "core:sys/unix"
+import "core:os"
+
+current_thread_id :: proc "contextless" () -> int {
+ return os.current_thread_id()
+}
+
+// The Darwin docs say it best:
+// A semaphore is much like a lock, except that a finite number of threads can hold it simultaneously.
+// Semaphores can be thought of as being much like piles of tokens; multiple threads can take these tokens,
+// but when there are none left, a thread must wait until another thread returns one.
+Semaphore :: struct #align 16 {
+ handle: unix.sem_t,
+}
+
+semaphore_init :: proc(s: ^Semaphore, initial_count := 0) {
+ assert(unix.sem_init(&s.handle, 0, u32(initial_count)) == 0)
+}
+
+semaphore_destroy :: proc(s: ^Semaphore) {
+ assert(unix.sem_destroy(&s.handle) == 0)
+ s.handle = {}
+}
+
+semaphore_post :: proc(s: ^Semaphore, count := 1) {
+ // NOTE: SPEED: If there's one syscall to do this, we should use it instead of the loop.
+ for in 0..<count {
+ assert(unix.sem_post(&s.handle) == 0)
+ }
+}
+
+semaphore_wait_for :: proc(s: ^Semaphore) {
+ assert(unix.sem_wait(&s.handle) == 0)
+}
diff --git a/core/sync/sync_unix.odin b/core/sync/sync_unix.odin
index 114625483..b8e9d32cc 100644
--- a/core/sync/sync_unix.odin
+++ b/core/sync/sync_unix.odin
@@ -1,4 +1,4 @@
-// +build linux, darwin, freebsd
+// +build linux, darwin, freebsd, openbsd
package sync
import "core:sys/unix"
diff --git a/core/sys/darwin/xnu_system_call_helpers.odin b/core/sys/darwin/xnu_system_call_helpers.odin
index 5b060cfd3..94fe0bf47 100644
--- a/core/sys/darwin/xnu_system_call_helpers.odin
+++ b/core/sys/darwin/xnu_system_call_helpers.odin
@@ -91,8 +91,7 @@ sys_open :: proc(path: string, oflag: Open_Flags, mode: Permission) -> (c.int, b
cmode: u32 = 0
cflags: u32 = 0
- cpath: cstring = strings.clone_to_cstring(path)
- defer delete(cpath)
+ cpath: cstring = strings.clone_to_cstring(path, context.temp_allocator)
cflags = _sys_permission_mode(mode)
@@ -124,39 +123,32 @@ sys_open :: proc(path: string, oflag: Open_Flags, mode: Permission) -> (c.int, b
}
sys_mkdir :: proc(path: string, mode: Permission) -> bool {
- cpath: cstring = strings.clone_to_cstring(path)
- defer delete(cpath)
+ cpath: cstring = strings.clone_to_cstring(path, context.temp_allocator)
cflags := _sys_permission_mode(mode)
return syscall_mkdir(cpath, cflags) != -1
}
sys_mkdir_at :: proc(fd: c.int, path: string, mode: Permission) -> bool {
- cpath: cstring = strings.clone_to_cstring(path)
- defer delete(cpath)
+ cpath: cstring = strings.clone_to_cstring(path, context.temp_allocator)
cflags := _sys_permission_mode(mode)
return syscall_mkdir_at(fd, cpath, cflags) != -1
}
sys_rmdir :: proc(path: string, mode: Permission) -> bool {
- cpath: cstring = strings.clone_to_cstring(path)
- defer delete(cpath)
+ cpath: cstring = strings.clone_to_cstring(path, context.temp_allocator)
cflags := _sys_permission_mode(mode)
return syscall_rmdir(cpath, cflags) != -1
}
sys_rename :: proc(path: string, new_path: string) -> bool {
- cpath: cstring = strings.clone_to_cstring(path)
- defer delete(cpath)
- cnpath: cstring = strings.clone_to_cstring(new_path)
- defer delete(cnpath)
+ cpath: cstring = strings.clone_to_cstring(path, context.temp_allocator)
+ cnpath: cstring = strings.clone_to_cstring(new_path, context.temp_allocator)
return syscall_rename(cpath, cnpath) != -1
}
sys_rename_at :: proc(fd: c.int, path: string, to_fd: c.int, new_path: string) -> bool {
- cpath: cstring = strings.clone_to_cstring(path)
- defer delete(cpath)
- cnpath: cstring = strings.clone_to_cstring(new_path)
- defer delete(cnpath)
+ cpath: cstring = strings.clone_to_cstring(path, context.temp_allocator)
+ cnpath: cstring = strings.clone_to_cstring(new_path, context.temp_allocator)
return syscall_rename_at(fd, cpath, to_fd, cnpath) != -1
}
@@ -165,14 +157,12 @@ sys_lseek :: proc(fd: c.int, offset: i64, whence: Offset_From) -> i64 {
}
sys_chmod :: proc(path: string, mode: Permission) -> bool {
- cpath: cstring = strings.clone_to_cstring(path)
- defer delete(cpath)
+ cpath: cstring = strings.clone_to_cstring(path, context.temp_allocator)
cmode := _sys_permission_mode(mode)
return syscall_chmod(cpath, cmode) != -1
}
sys_lstat :: proc(path: string, status: ^stat) -> bool {
- cpath: cstring = strings.clone_to_cstring(path)
- defer delete(cpath)
+ cpath: cstring = strings.clone_to_cstring(path, context.temp_allocator)
return syscall_lstat(cpath, status) != -1
}
diff --git a/core/sys/unix/pthread_openbsd.odin b/core/sys/unix/pthread_openbsd.odin
new file mode 100644
index 000000000..c855f95c0
--- /dev/null
+++ b/core/sys/unix/pthread_openbsd.odin
@@ -0,0 +1,65 @@
+//+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
+
+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() ---
+}
diff --git a/core/sys/unix/pthread_unix.odin b/core/sys/unix/pthread_unix.odin
index ccd8f7844..62e3701ab 100644
--- a/core/sys/unix/pthread_unix.odin
+++ b/core/sys/unix/pthread_unix.odin
@@ -1,4 +1,4 @@
-//+build linux, darwin, freebsd
+//+build linux, darwin, freebsd, openbsd
package unix
foreign import "system:pthread"
diff --git a/core/sys/win32/user32.odin b/core/sys/win32/user32.odin
index 593fdbb8e..fdf6a91f6 100644
--- a/core/sys/win32/user32.odin
+++ b/core/sys/win32/user32.odin
@@ -101,6 +101,9 @@ foreign user32 {
}
@(link_name="GetCursorPos") get_cursor_pos :: proc(p: ^Point) -> Bool ---
@(link_name="SetCursorPos") set_cursor_pos :: proc(x, y: i32) -> Bool ---
+ @(link_name="GetCapure") get_capture :: proc(hwnd: Hwnd) -> Hwnd ---
+ @(link_name="SetCapture") set_capture :: proc(hwnd: Hwnd) -> Hwnd ---
+ @(link_name="ReleaseCapture") release_capture :: proc() -> Bool ---
@(link_name="ScreenToClient") screen_to_client :: proc(h: Hwnd, p: ^Point) -> Bool ---
@(link_name="ClientToScreen") client_to_screen :: proc(h: Hwnd, p: ^Point) -> Bool ---
@(link_name="PostQuitMessage") post_quit_message :: proc(exit_code: i32) ---
diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin
index 3e25a4c18..1407201d6 100644
--- a/core/sys/windows/types.odin
+++ b/core/sys/windows/types.odin
@@ -376,6 +376,9 @@ FILE_TYPE_DISK :: 0x0001
FILE_TYPE_CHAR :: 0x0002
FILE_TYPE_PIPE :: 0x0003
+RECT :: struct {left, top, right, bottom: LONG}
+POINT :: struct {x, y: LONG}
+
when size_of(uintptr) == 4 {
WSADATA :: struct {
diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin
index 6cb91df86..b6679bbc2 100644
--- a/core/thread/thread_unix.odin
+++ b/core/thread/thread_unix.odin
@@ -1,4 +1,4 @@
-// +build linux, darwin, freebsd
+// +build linux, darwin, freebsd, openbsd
// +private
package thread
diff --git a/core/time/time_unix.odin b/core/time/time_unix.odin
index 9c5c5cc35..37fc1fd3e 100644
--- a/core/time/time_unix.odin
+++ b/core/time/time_unix.odin
@@ -1,4 +1,4 @@
-//+build linux, darwin, freebsd
+//+build linux, darwin, freebsd, openbsd
package time
IS_SUPPORTED :: true // NOTE: Times on Darwin are UTC.
@@ -22,16 +22,28 @@ TimeSpec :: struct {
tv_nsec : i64, /* nanoseconds */
}
-CLOCK_REALTIME :: 0 // NOTE(tetra): May jump in time, when user changes the system time.
-CLOCK_MONOTONIC :: 1 // NOTE(tetra): May stand still while system is asleep.
-CLOCK_PROCESS_CPUTIME_ID :: 2
-CLOCK_THREAD_CPUTIME_ID :: 3
-CLOCK_MONOTONIC_RAW :: 4 // NOTE(tetra): "RAW" means: Not adjusted by NTP.
-CLOCK_REALTIME_COARSE :: 5 // NOTE(tetra): "COARSE" clocks are apparently much faster, but not "fine-grained."
-CLOCK_MONOTONIC_COARSE :: 6
-CLOCK_BOOTTIME :: 7 // NOTE(tetra): Same as MONOTONIC, except also including time system was asleep.
-CLOCK_REALTIME_ALARM :: 8
-CLOCK_BOOTTIME_ALARM :: 9
+when ODIN_OS == .OpenBSD {
+ CLOCK_REALTIME :: 0
+ CLOCK_PROCESS_CPUTIME_ID :: 2
+ CLOCK_MONOTONIC :: 3
+ CLOCK_THREAD_CPUTIME_ID :: 4
+ CLOCK_UPTIME :: 5
+ CLOCK_BOOTTIME :: 6
+
+ // CLOCK_MONOTONIC_RAW doesn't exist, use CLOCK_MONOTONIC
+ CLOCK_MONOTONIC_RAW :: CLOCK_MONOTONIC
+} else {
+ CLOCK_REALTIME :: 0 // NOTE(tetra): May jump in time, when user changes the system time.
+ CLOCK_MONOTONIC :: 1 // NOTE(tetra): May stand still while system is asleep.
+ CLOCK_PROCESS_CPUTIME_ID :: 2
+ CLOCK_THREAD_CPUTIME_ID :: 3
+ CLOCK_MONOTONIC_RAW :: 4 // NOTE(tetra): "RAW" means: Not adjusted by NTP.
+ CLOCK_REALTIME_COARSE :: 5 // NOTE(tetra): "COARSE" clocks are apparently much faster, but not "fine-grained."
+ CLOCK_MONOTONIC_COARSE :: 6
+ CLOCK_BOOTTIME :: 7 // NOTE(tetra): Same as MONOTONIC, except also including time system was asleep.
+ CLOCK_REALTIME_ALARM :: 8
+ CLOCK_BOOTTIME_ALARM :: 9
+}
// TODO(tetra, 2019-11-05): The original implementation of this package for Darwin used this constants.
// I do not know if Darwin programmers are used to the existance of these constants or not, so
diff --git a/examples/all/all_vendor.odin b/examples/all/all_vendor.odin
index f94e092af..f83e906a2 100644
--- a/examples/all/all_vendor.odin
+++ b/examples/all/all_vendor.odin
@@ -1,7 +1,5 @@
-//+build windows
package all
-
import botan "vendor:botan"
import ENet "vendor:ENet"
import gl "vendor:OpenGL"
@@ -17,14 +15,11 @@ import IMG "vendor:sdl2/image"
import MIX "vendor:sdl2/mixer"
import TTF "vendor:sdl2/ttf"
-import stb_easy_font "vendor:stb/easy_font"
-import stbi "vendor:stb/image"
-import stbrp "vendor:stb/rect_pack"
-import stbtt "vendor:stb/truetype"
-import stb_vorbis "vendor:stb/vorbis"
-
import vk "vendor:vulkan"
+import NS "vendor:darwin/Foundation"
+import MTL "vendor:darwin/Metal"
+import CA "vendor:darwin/QuartzCore"
_ :: botan
_ :: ENet
@@ -39,9 +34,7 @@ _ :: SDLNet
_ :: IMG
_ :: MIX
_ :: TTF
-_ :: stb_easy_font
-_ :: stbi
-_ :: stbrp
-_ :: stbtt
-_ :: stb_vorbis
-_ :: vk \ No newline at end of file
+_ :: vk
+_ :: NS
+_ :: MTL
+_ :: CA
diff --git a/examples/all/all_vendor_directx.odin b/examples/all/all_vendor_directx.odin
new file mode 100644
index 000000000..2f10d92f8
--- /dev/null
+++ b/examples/all/all_vendor_directx.odin
@@ -0,0 +1,10 @@
+//+build windows
+package all
+
+import D3D11 "vendor:directx/d3d11"
+import D3D12 "vendor:directx/d3d12"
+import DXGI "vendor:directx/dxgi"
+
+_ :: D3D11
+_ :: D3D12
+_ :: DXGI
diff --git a/examples/all/all_vendor_stl.odin b/examples/all/all_vendor_stl.odin
new file mode 100644
index 000000000..9faf53c63
--- /dev/null
+++ b/examples/all/all_vendor_stl.odin
@@ -0,0 +1,15 @@
+//+build windows, linux
+package all
+
+import stb_easy_font "vendor:stb/easy_font"
+import stbi "vendor:stb/image"
+import stbrp "vendor:stb/rect_pack"
+import stbtt "vendor:stb/truetype"
+import stb_vorbis "vendor:stb/vorbis"
+
+_ :: stb_easy_font
+_ :: stbi
+_ :: stbrp
+_ :: stbtt
+_ :: stb_vorbis
+
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin
index a4b678ae7..044860ff7 100644
--- a/examples/demo/demo.odin
+++ b/examples/demo/demo.odin
@@ -11,22 +11,28 @@ import "core:intrinsics"
import "core:math/big"
/*
- The Odin programming language is fast, concise, readable, pragmatic and open sourced.
- It is designed with the intent of replacing C with the following goals:
- * simplicity
- * high performance
- * built for modern systems
- * joy of programming
+ Odin is a general-purpose programming language with distinct typing built
+ for high performance, modern systems and data-oriented programming.
+
+ Odin is the C alternative for the Joy of Programming.
# Installing Odin
Getting Started - https://odin-lang.org/docs/install/
Instructions for downloading and install the Odin compiler and libraries.
# Learning Odin
+ Getting Started - https://odin-lang.org/docs/install/
+ Getting Started with Odin. Downloading, installing, and getting your
+ first program to compile and run.
Overview of Odin - https://odin-lang.org/docs/overview/
- An overview of the Odin programming language.
+ An overview of the Odin programming language and its features.
Frequently Asked Questions (FAQ) - https://odin-lang.org/docs/faq/
Answers to common questions about Odin.
+ Packages - https://pkg.odin-lang.org/
+ Documentation for all the official packages part of the
+ core and vendor library collections.
+ Nightly Builds - https://odin-lang.org/docs/nightly/
+ Get the latest nightly builds of Odin.
*/
the_basics :: proc() {
diff --git a/src/array.cpp b/src/array.cpp
index ac3727978..d08bd647f 100644
--- a/src/array.cpp
+++ b/src/array.cpp
@@ -89,7 +89,9 @@ template <typename T>
void slice_init(Slice<T> *s, gbAllocator const &allocator, isize count) {
GB_ASSERT(count >= 0);
s->data = gb_alloc_array(allocator, T, count);
- GB_ASSERT(s->data != nullptr);
+ if (count > 0) {
+ GB_ASSERT(s->data != nullptr);
+ }
s->count = count;
}
diff --git a/src/bug_report.cpp b/src/bug_report.cpp
index 9a1cb2254..02a2b1ba2 100644
--- a/src/bug_report.cpp
+++ b/src/bug_report.cpp
@@ -17,6 +17,11 @@
#include <sys/sysctl.h>
#endif
+#if defined(GB_SYSTEM_OPENBSD)
+ #include <sys/sysctl.h>
+ #include <sys/utsname.h>
+#endif
+
/*
NOTE(Jeroen): This prints the Windows product edition only, to be called from `print_platform_details`.
*/
@@ -242,6 +247,14 @@ void report_ram_info() {
if (sysctl(sysctls, 2, &ram_amount, &val_size, NULL, 0) != -1) {
gb_printf("%lld MiB\n", ram_amount / gb_megabytes(1));
}
+ #elif defined(GB_SYSTEM_OPENBSD)
+ uint64_t ram_amount;
+ size_t val_size = sizeof(ram_amount);
+
+ int sysctls[] = { CTL_HW, HW_PHYSMEM64 };
+ if (sysctl(sysctls, 2, &ram_amount, &val_size, NULL, 0) != -1) {
+ gb_printf("%lld MiB\n", ram_amount / gb_megabytes(1));
+ }
#else
gb_printf("Unknown.\n");
#endif
@@ -473,11 +486,11 @@ void print_bug_report_help() {
#elif defined(GB_SYSTEM_LINUX)
/*
- Try to parse `/usr/lib/os-release` for `PRETTY_NAME="Ubuntu 20.04.3 LTS`
+ Try to parse `/etc/os-release` for `PRETTY_NAME="Ubuntu 20.04.3 LTS`
*/
gbAllocator a = heap_allocator();
- gbFileContents release = gb_file_read_contents(a, 1, "/usr/lib/os-release");
+ gbFileContents release = gb_file_read_contents(a, 1, "/etc/os-release");
defer (gb_file_free_contents(&release));
b32 found = 0;
@@ -643,6 +656,14 @@ void print_bug_report_help() {
} else {
gb_printf("macOS: Unknown\n");
}
+ #elif defined(GB_SYSTEM_OPENBSD)
+ struct utsname un;
+
+ if (uname(&un) != -1) {
+ gb_printf("%s %s %s %s\n", un.sysname, un.release, un.version, un.machine);
+ } else {
+ gb_printf("OpenBSD: Unknown\n");
+ }
#else
gb_printf("Unknown\n");
@@ -657,4 +678,4 @@ void print_bug_report_help() {
And RAM info.
*/
report_ram_info();
-} \ No newline at end of file
+}
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index 610e4f847..9cb281656 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -1,4 +1,4 @@
-#if defined(GB_SYSTEM_FREEBSD)
+#if defined(GB_SYSTEM_FREEBSD) || defined(GB_SYSTEM_OPENBSD)
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
@@ -16,6 +16,7 @@ enum TargetOsKind {
TargetOs_linux,
TargetOs_essence,
TargetOs_freebsd,
+ TargetOs_openbsd,
TargetOs_wasi,
TargetOs_js,
@@ -53,6 +54,7 @@ String target_os_names[TargetOs_COUNT] = {
str_lit("linux"),
str_lit("essence"),
str_lit("freebsd"),
+ str_lit("openbsd"),
str_lit("wasi"),
str_lit("js"),
@@ -278,7 +280,7 @@ bool global_ignore_warnings(void) {
}
-gb_global TargetMetrics target_windows_386 = {
+gb_global TargetMetrics target_windows_i386 = {
TargetOs_windows,
TargetArch_i386,
4,
@@ -294,7 +296,7 @@ gb_global TargetMetrics target_windows_amd64 = {
str_lit("e-m:w-i64:64-f80:128-n8:16:32:64-S128"),
};
-gb_global TargetMetrics target_linux_386 = {
+gb_global TargetMetrics target_linux_i386 = {
TargetOs_linux,
TargetArch_i386,
4,
@@ -337,7 +339,7 @@ gb_global TargetMetrics target_darwin_arm64 = {
str_lit("e-m:o-i64:64-i128:128-n32:64-S128"), // TODO(bill): Is this correct?
};
-gb_global TargetMetrics target_freebsd_386 = {
+gb_global TargetMetrics target_freebsd_i386 = {
TargetOs_freebsd,
TargetArch_i386,
4,
@@ -354,6 +356,15 @@ gb_global TargetMetrics target_freebsd_amd64 = {
str_lit("e-m:w-i64:64-f80:128-n8:16:32:64-S128"),
};
+gb_global TargetMetrics target_openbsd_amd64 = {
+ TargetOs_openbsd,
+ TargetArch_amd64,
+ 8,
+ 16,
+ str_lit("x86_64-unknown-openbsd-elf"),
+ str_lit("e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"),
+};
+
gb_global TargetMetrics target_essence_amd64 = {
TargetOs_essence,
TargetArch_amd64,
@@ -410,13 +421,14 @@ gb_global NamedTargetMetrics named_targets[] = {
{ str_lit("darwin_amd64"), &target_darwin_amd64 },
{ str_lit("darwin_arm64"), &target_darwin_arm64 },
{ str_lit("essence_amd64"), &target_essence_amd64 },
- { str_lit("linux_386"), &target_linux_386 },
+ { str_lit("linux_i386"), &target_linux_i386 },
{ str_lit("linux_amd64"), &target_linux_amd64 },
{ str_lit("linux_arm64"), &target_linux_arm64 },
- { str_lit("windows_386"), &target_windows_386 },
+ { str_lit("windows_i386"), &target_windows_i386 },
{ str_lit("windows_amd64"), &target_windows_amd64 },
- { str_lit("freebsd_386"), &target_freebsd_386 },
+ { str_lit("freebsd_i386"), &target_freebsd_i386 },
{ str_lit("freebsd_amd64"), &target_freebsd_amd64 },
+ { str_lit("openbsd_amd64"), &target_openbsd_amd64 },
{ str_lit("freestanding_wasm32"), &target_freestanding_wasm32 },
{ str_lit("wasi_wasm32"), &target_wasi_wasm32 },
{ str_lit("js_wasm32"), &target_js_wasm32 },
@@ -722,10 +734,38 @@ String internal_odin_root_dir(void) {
len = readlink("/proc/curproc/exe", &path_buf[0], path_buf.count);
#elif defined(GB_SYSTEM_DRAGONFLYBSD)
len = readlink("/proc/curproc/file", &path_buf[0], path_buf.count);
-#else
+#elif defined(GB_SYSTEM_LINUX)
len = readlink("/proc/self/exe", &path_buf[0], path_buf.count);
+#elif defined(GB_SYSTEM_OPENBSD)
+ int error;
+ int mib[] = {
+ CTL_KERN,
+ KERN_PROC_ARGS,
+ getpid(),
+ KERN_PROC_ARGV,
+ };
+ // get argv size
+ error = sysctl(mib, 4, NULL, (size_t *) &len, NULL, 0);
+ if (error == -1) {
+ // sysctl error
+ return make_string(nullptr, 0);
+ }
+ // get argv
+ char **argv = (char **)gb_malloc(len);
+ error = sysctl(mib, 4, argv, (size_t *) &len, NULL, 0);
+ if (error == -1) {
+ // sysctl error
+ gb_mfree(argv);
+ return make_string(nullptr, 0);
+ }
+ // copy argv[0] to path_buf
+ len = gb_strlen(argv[0]);
+ if(len < path_buf.count) {
+ gb_memmove(&path_buf[0], argv[0], len);
+ }
+ gb_mfree(argv);
#endif
- if(len == 0) {
+ if(len == 0 || len == -1) {
return make_string(nullptr, 0);
}
if (len < path_buf.count) {
@@ -922,6 +962,8 @@ void init_build_context(TargetMetrics *cross_target) {
#endif
#elif defined(GB_SYSTEM_FREEBSD)
metrics = &target_freebsd_amd64;
+ #elif defined(GB_SYSTEM_OPENBSD)
+ metrics = &target_openbsd_amd64;
#elif defined(GB_CPU_ARM)
metrics = &target_linux_arm64;
#else
@@ -929,13 +971,13 @@ void init_build_context(TargetMetrics *cross_target) {
#endif
#else
#if defined(GB_SYSTEM_WINDOWS)
- metrics = &target_windows_386;
+ metrics = &target_windows_i386;
#elif defined(GB_SYSTEM_OSX)
#error "Build Error: Unsupported architecture"
#elif defined(GB_SYSTEM_FREEBSD)
- metrics = &target_freebsd_386;
+ metrics = &target_freebsd_i386;
#else
- metrics = &target_linux_386;
+ metrics = &target_linux_i386;
#endif
#endif
@@ -980,6 +1022,9 @@ void init_build_context(TargetMetrics *cross_target) {
case TargetOs_freebsd:
bc->link_flags = str_lit("-arch x86-64 ");
break;
+ case TargetOs_openbsd:
+ bc->link_flags = str_lit("-arch x86-64 ");
+ break;
}
} else if (bc->metrics.arch == TargetArch_i386) {
switch (bc->metrics.os) {
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index c7ada8e03..365d3434f 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -223,36 +223,35 @@ void add_objc_proc_type(CheckerContext *c, Ast *call, Type *return_type, Slice<T
map_set(&c->info->objc_msgSend_types, call, data);
mutex_unlock(&c->info->objc_types_mutex);
- add_package_dependency(c, "runtime", "objc_lookUpClass");
- add_package_dependency(c, "runtime", "sel_registerName");
- add_package_dependency(c, "runtime", "objc_allocateClassPair");
-
- add_package_dependency(c, "runtime", "objc_msgSend");
- add_package_dependency(c, "runtime", "objc_msgSend_fpret");
- add_package_dependency(c, "runtime", "objc_msgSend_fp2ret");
- add_package_dependency(c, "runtime", "objc_msgSend_stret");
+ try_to_add_package_dependency(c, "runtime", "objc_msgSend");
+ try_to_add_package_dependency(c, "runtime", "objc_msgSend_fpret");
+ try_to_add_package_dependency(c, "runtime", "objc_msgSend_fp2ret");
+ try_to_add_package_dependency(c, "runtime", "objc_msgSend_stret");
+}
+
+bool is_constant_string(CheckerContext *c, String const &builtin_name, Ast *expr, String *name_) {
+ Operand op = {};
+ check_expr(c, &op, expr);
+ if (op.mode == Addressing_Constant && op.value.kind == ExactValue_String) {
+ if (name_) *name_ = op.value.value_string;
+ return true;
+ }
+ gbString e = expr_to_string(op.expr);
+ gbString t = type_to_string(op.type);
+ error(op.expr, "'%.*s' expected a constant string value, got %s of type %s", LIT(builtin_name), e, t);
+ gb_string_free(t);
+ gb_string_free(e);
+ return false;
}
bool check_builtin_objc_procedure(CheckerContext *c, Operand *operand, Ast *call, i32 id, Type *type_hint) {
- auto const is_constant_string = [](CheckerContext *c, String const &builtin_name, Ast *expr, String *name_) -> bool {
- Operand op = {};
- check_expr(c, &op, expr);
- if (op.mode == Addressing_Constant && op.value.kind == ExactValue_String) {
- if (name_) *name_ = op.value.value_string;
- return true;
- }
- gbString e = expr_to_string(op.expr);
- gbString t = type_to_string(op.type);
- error(op.expr, "'%.*s' expected a constant string value, got %s of type %s", LIT(builtin_name), e, t);
- gb_string_free(t);
- gb_string_free(e);
- return false;
- };
String builtin_name = builtin_procs[id].name;
if (build_context.metrics.os != TargetOs_darwin) {
- error(call, "'%.*s' only works on darwin", LIT(builtin_name));
- return false;
+ // allow on doc generation (e.g. Metal stuff)
+ if (build_context.command_kind != Command_doc && build_context.command_kind != Command_check) {
+ error(call, "'%.*s' only works on darwin", LIT(builtin_name));
+ }
}
@@ -371,6 +370,10 @@ bool check_builtin_objc_procedure(CheckerContext *c, Operand *operand, Ast *call
}
operand->mode = Addressing_Value;
+
+ try_to_add_package_dependency(c, "runtime", "objc_lookUpClass");
+ try_to_add_package_dependency(c, "runtime", "sel_registerName");
+ try_to_add_package_dependency(c, "runtime", "objc_allocateClassPair");
return true;
} break;
}
@@ -949,7 +952,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
mode = Addressing_Constant;
value = exact_value_i64(at->EnumeratedArray.count);
type = t_untyped_integer;
- } else if (is_type_slice(op_type) && id == BuiltinProc_len) {
+ } else if ((is_type_slice(op_type) || is_type_relative_slice(op_type)) && id == BuiltinProc_len) {
mode = Addressing_Value;
} else if (is_type_dynamic_array(op_type)) {
mode = Addressing_Value;
@@ -1103,7 +1106,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
Selection sel = lookup_field(type, field_name, false);
if (sel.entity == nullptr) {
- gbString type_str = type_to_string(type);
+ gbString type_str = type_to_string_shorthand(type);
error(ce->args[0],
"'%s' has no field named '%.*s'", type_str, LIT(field_name));
gb_string_free(type_str);
@@ -1115,7 +1118,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
return false;
}
if (sel.indirect) {
- gbString type_str = type_to_string(type);
+ gbString type_str = type_to_string_shorthand(type);
error(ce->args[0],
"Field '%.*s' is embedded via a pointer in '%s'", LIT(field_name), type_str);
gb_string_free(type_str);
@@ -1176,7 +1179,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
Selection sel = lookup_field(type, field_name, false);
if (sel.entity == nullptr) {
- gbString type_str = type_to_string(type);
+ gbString type_str = type_to_string_shorthand(type);
error(ce->args[0],
"'%s' has no field named '%.*s'", type_str, LIT(field_name));
gb_string_free(type_str);
@@ -1188,7 +1191,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
return false;
}
if (sel.indirect) {
- gbString type_str = type_to_string(type);
+ gbString type_str = type_to_string_shorthand(type);
error(ce->args[0],
"Field '%.*s' is embedded via a pointer in '%s'", LIT(field_name), type_str);
gb_string_free(type_str);
@@ -3503,6 +3506,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
case TargetOs_linux:
case TargetOs_essence:
case TargetOs_freebsd:
+ case TargetOs_openbsd:
switch (build_context.metrics.arch) {
case TargetArch_i386:
case TargetArch_amd64:
@@ -4086,6 +4090,18 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
break;
}
+ case BuiltinProc_constant_utf16_cstring:
+ {
+ String value = {};
+ if (!is_constant_string(c, builtin_name, ce->args[0], &value)) {
+ return false;
+ }
+ operand->mode = Addressing_Value;
+ operand->type = alloc_type_multi_pointer(t_u16);
+ operand->value = {};
+ break;
+ }
+
}
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 45d741532..3fdd944f9 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -174,6 +174,10 @@ void check_init_constant(CheckerContext *ctx, Entity *e, Operand *operand) {
return;
}
+ if (is_type_proc(e->type)) {
+ error(e->token, "Illegal declaration of a constant procedure value");
+ }
+
e->parent_proc_decl = ctx->curr_proc_decl;
e->Constant.value = operand->value;
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 7fb0e44f2..614da2368 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -132,6 +132,62 @@ void check_did_you_mean_print(DidYouMeanAnswers *d, char const *prefix = "") {
}
}
+void populate_check_did_you_mean_objc_entity(StringSet *set, Entity *e, bool is_type) {
+ if (e->kind != Entity_TypeName) {
+ return;
+ }
+ if (e->TypeName.objc_metadata == nullptr) {
+ return;
+ }
+ TypeNameObjCMetadata *objc_metadata = e->TypeName.objc_metadata;
+ Type *t = base_type(e->type);
+ GB_ASSERT(t->kind == Type_Struct);
+
+ if (is_type) {
+ for_array(i, objc_metadata->type_entries) {
+ String name = objc_metadata->type_entries[i].name;
+ string_set_add(set, name);
+ }
+ } else {
+ for_array(i, objc_metadata->value_entries) {
+ String name = objc_metadata->value_entries[i].name;
+ string_set_add(set, name);
+ }
+ }
+
+ for_array(i, t->Struct.fields) {
+ Entity *f = t->Struct.fields[i];
+ if (f->flags & EntityFlag_Using && f->type != nullptr) {
+ if (f->type->kind == Type_Named && f->type->Named.type_name) {
+ populate_check_did_you_mean_objc_entity(set, f->type->Named.type_name, is_type);
+ }
+ }
+ }
+}
+
+
+void check_did_you_mean_objc_entity(String const &name, Entity *e, bool is_type, char const *prefix = "") {
+ ERROR_BLOCK();
+ GB_ASSERT(e->kind == Entity_TypeName);
+ GB_ASSERT(e->TypeName.objc_metadata != nullptr);
+ auto *objc_metadata = e->TypeName.objc_metadata;
+ mutex_lock(objc_metadata->mutex);
+ defer (mutex_unlock(objc_metadata->mutex));
+
+ StringSet set = {};
+ string_set_init(&set, heap_allocator());
+ defer (string_set_destroy(&set));
+ populate_check_did_you_mean_objc_entity(&set, e, is_type);
+
+
+ DidYouMeanAnswers d = did_you_mean_make(heap_allocator(), set.entries.count, name);
+ defer (did_you_mean_destroy(&d));
+ for_array(i, set.entries) {
+ did_you_mean_append(&d, set.entries[i].value);
+ }
+ check_did_you_mean_print(&d, prefix);
+}
+
void check_did_you_mean_type(String const &name, Array<Entity *> const &fields, char const *prefix = "") {
ERROR_BLOCK();
@@ -144,6 +200,7 @@ void check_did_you_mean_type(String const &name, Array<Entity *> const &fields,
check_did_you_mean_print(&d, prefix);
}
+
void check_did_you_mean_type(String const &name, Slice<Entity *> const &fields, char const *prefix = "") {
ERROR_BLOCK();
@@ -4413,14 +4470,19 @@ Entity *check_selector(CheckerContext *c, Operand *operand, Ast *node, Type *typ
if (entity == nullptr) {
gbString op_str = expr_to_string(op_expr);
- gbString type_str = type_to_string(operand->type);
+ gbString type_str = type_to_string_shorthand(operand->type);
gbString sel_str = expr_to_string(selector);
error(op_expr, "'%s' of type '%s' has no field '%s'", op_str, type_str, sel_str);
if (operand->type != nullptr && selector->kind == Ast_Ident) {
String const &name = selector->Ident.token.string;
Type *bt = base_type(operand->type);
- if (bt->kind == Type_Struct) {
+ if (operand->type->kind == Type_Named &&
+ operand->type->Named.type_name &&
+ operand->type->Named.type_name->kind == Entity_TypeName &&
+ operand->type->Named.type_name->TypeName.objc_metadata) {
+ check_did_you_mean_objc_entity(name, operand->type->Named.type_name, operand->mode == Addressing_Type);
+ } else if (bt->kind == Type_Struct) {
check_did_you_mean_type(name, bt->Struct.fields);
} else if (bt->kind == Type_Enum) {
check_did_you_mean_type(name, bt->Enum.fields);
@@ -4449,7 +4511,7 @@ Entity *check_selector(CheckerContext *c, Operand *operand, Ast *node, Type *typ
}
gbString op_str = expr_to_string(op_expr);
- gbString type_str = type_to_string(operand->type);
+ gbString type_str = type_to_string_shorthand(operand->type);
gbString sel_str = expr_to_string(selector);
error(op_expr, "Cannot access non-constant field '%s' from '%s'", sel_str, op_str);
gb_string_free(sel_str);
@@ -4474,7 +4536,7 @@ Entity *check_selector(CheckerContext *c, Operand *operand, Ast *node, Type *typ
}
gbString op_str = expr_to_string(op_expr);
- gbString type_str = type_to_string(operand->type);
+ gbString type_str = type_to_string_shorthand(operand->type);
gbString sel_str = expr_to_string(selector);
error(op_expr, "Cannot access non-constant field '%s' from '%s'", sel_str, op_str);
gb_string_free(sel_str);
@@ -4487,7 +4549,7 @@ Entity *check_selector(CheckerContext *c, Operand *operand, Ast *node, Type *typ
if (expr_entity != nullptr && is_type_polymorphic(expr_entity->type)) {
gbString op_str = expr_to_string(op_expr);
- gbString type_str = type_to_string(operand->type);
+ gbString type_str = type_to_string_shorthand(operand->type);
gbString sel_str = expr_to_string(selector);
error(op_expr, "Cannot access field '%s' from non-specialized polymorphic type '%s'", sel_str, op_str);
gb_string_free(sel_str);
@@ -9774,6 +9836,9 @@ gbString write_expr_to_string(gbString str, Ast *node, bool shorthand) {
if (f->flags&FieldFlag_const) {
str = gb_string_appendc(str, "#const ");
}
+ if (f->flags&FieldFlag_subtype) {
+ str = gb_string_appendc(str, "#subtype ");
+ }
for_array(i, f->names) {
Ast *name = f->names[i];
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 976bb7f42..64fb67723 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -144,6 +144,7 @@ void check_struct_fields(CheckerContext *ctx, Ast *node, Slice<Entity *> *fields
}
bool is_using = (p->flags&FieldFlag_using) != 0;
+ bool is_subtype = (p->flags&FieldFlag_subtype) != 0;
for_array(j, p->names) {
Ast *name = p->names[j];
@@ -158,6 +159,9 @@ void check_struct_fields(CheckerContext *ctx, Ast *node, Slice<Entity *> *fields
Entity *field = alloc_entity_field(ctx->scope, name_token, type, is_using, field_src_index);
add_entity(ctx, ctx->scope, name, field);
field->Variable.field_group_index = field_group_index;
+ if (is_subtype) {
+ field->flags |= EntityFlag_Subtype;
+ }
if (j == 0) {
field->Variable.docs = docs;
@@ -194,6 +198,20 @@ void check_struct_fields(CheckerContext *ctx, Ast *node, Slice<Entity *> *fields
populate_using_entity_scope(ctx, node, p, type);
}
+
+ if (is_subtype && p->names.count > 0) {
+ Type *first_type = fields_array[fields_array.count-1]->type;
+ Type *t = base_type(type_deref(first_type));
+
+ if (!does_field_type_allow_using(t) &&
+ p->names.count >= 1 &&
+ p->names[0]->kind == Ast_Ident) {
+ Token name_token = p->names[0]->Ident.token;
+ gbString type_str = type_to_string(first_type);
+ error(name_token, "'subtype' cannot be applied to the field '%.*s' of type '%s'", LIT(name_token.string), type_str);
+ gb_string_free(type_str);
+ }
+ }
}
*fields = slice_from_array(fields_array);
diff --git a/src/checker.cpp b/src/checker.cpp
index 81e6f256e..5a7ece263 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -225,8 +225,8 @@ bool decl_info_has_init(DeclInfo *d) {
Scope *create_scope(CheckerInfo *info, Scope *parent, isize init_elements_capacity=DEFAULT_SCOPE_CAPACITY) {
Scope *s = gb_alloc_item(permanent_allocator(), Scope);
s->parent = parent;
- string_map_init(&s->elements, permanent_allocator(), init_elements_capacity);
- ptr_set_init(&s->imported, permanent_allocator(), 0);
+ string_map_init(&s->elements, heap_allocator(), init_elements_capacity);
+ ptr_set_init(&s->imported, heap_allocator(), 0);
mutex_init(&s->mutex);
if (parent != nullptr && parent != builtin_pkg->scope) {
@@ -733,12 +733,25 @@ void add_package_dependency(CheckerContext *c, char const *package_name, char co
String n = make_string_c(name);
AstPackage *p = get_core_package(&c->checker->info, make_string_c(package_name));
Entity *e = scope_lookup(p->scope, n);
- e->flags |= EntityFlag_Used;
GB_ASSERT_MSG(e != nullptr, "%s", name);
GB_ASSERT(c->decl != nullptr);
+ e->flags |= EntityFlag_Used;
+ add_dependency(c->info, c->decl, e);
+}
+
+void try_to_add_package_dependency(CheckerContext *c, char const *package_name, char const *name) {
+ String n = make_string_c(name);
+ AstPackage *p = get_core_package(&c->checker->info, make_string_c(package_name));
+ Entity *e = scope_lookup(p->scope, n);
+ if (e == nullptr) {
+ return;
+ }
+ GB_ASSERT(c->decl != nullptr);
+ e->flags |= EntityFlag_Used;
add_dependency(c->info, c->decl, e);
}
+
void add_declaration_dependency(CheckerContext *c, Entity *e) {
if (e == nullptr) {
return;
@@ -893,6 +906,7 @@ void init_universal(void) {
{"Linux", TargetOs_linux},
{"Essence", TargetOs_essence},
{"FreeBSD", TargetOs_freebsd},
+ {"OpenBSD", TargetOs_openbsd},
{"WASI", TargetOs_wasi},
{"JS", TargetOs_js},
{"Freestanding", TargetOs_freestanding},
diff --git a/src/checker_builtin_procs.hpp b/src/checker_builtin_procs.hpp
index 19fa94ee6..cba952ddf 100644
--- a/src/checker_builtin_procs.hpp
+++ b/src/checker_builtin_procs.hpp
@@ -258,6 +258,9 @@ BuiltinProc__type_end,
BuiltinProc_objc_register_selector,
BuiltinProc_objc_register_class,
+ BuiltinProc_constant_utf16_cstring,
+
+
BuiltinProc_COUNT,
};
gb_global BuiltinProc builtin_procs[BuiltinProc_COUNT] = {
@@ -517,4 +520,7 @@ gb_global BuiltinProc builtin_procs[BuiltinProc_COUNT] = {
{STR_LIT("objc_find_class"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
{STR_LIT("objc_register_selector"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
{STR_LIT("objc_register_class"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
+
+ {STR_LIT("constant_utf16_cstring"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
+
};
diff --git a/src/common.cpp b/src/common.cpp
index ab2a46118..aaacda04b 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -848,7 +848,7 @@ ReadDirectoryError read_directory(String path, Array<FileInfo> *fi) {
return ReadDirectory_None;
}
-#elif defined(GB_SYSTEM_LINUX) || defined(GB_SYSTEM_OSX) || defined(GB_SYSTEM_FREEBSD)
+#elif defined(GB_SYSTEM_LINUX) || defined(GB_SYSTEM_OSX) || defined(GB_SYSTEM_FREEBSD) || defined(GB_SYSTEM_OPENBSD)
#include <dirent.h>
@@ -1021,7 +1021,7 @@ LoadedFileError load_file_32(char const *fullpath, LoadedFile *memory_mapped_fil
#endif
}
- gbFileContents fc = gb_file_read_contents(heap_allocator(), true, fullpath);
+ gbFileContents fc = gb_file_read_contents(permanent_allocator(), true, fullpath);
if (fc.size > I32_MAX) {
err = LoadedFile_FileTooLarge;
diff --git a/src/common_memory.cpp b/src/common_memory.cpp
index 096c35b5c..953462077 100644
--- a/src/common_memory.cpp
+++ b/src/common_memory.cpp
@@ -139,6 +139,7 @@ struct PlatformMemoryBlock {
};
+gb_global std::atomic<isize> global_platform_memory_total_usage;
gb_global PlatformMemoryBlock global_platform_memory_block_sentinel;
PlatformMemoryBlock *platform_virtual_memory_alloc(isize total_size);
@@ -158,10 +159,17 @@ void platform_virtual_memory_protect(void *memory, isize size);
PlatformMemoryBlock *platform_virtual_memory_alloc(isize total_size) {
PlatformMemoryBlock *pmblock = (PlatformMemoryBlock *)VirtualAlloc(0, total_size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
- GB_ASSERT_MSG(pmblock != nullptr, "Out of Virtual Memory, oh no...");
+ if (pmblock == nullptr) {
+ gb_printf_err("Out of Virtual memory, oh no...\n");
+ gb_printf_err("Requested: %lld bytes\n", cast(long long)total_size);
+ gb_printf_err("Total Usage: %lld bytes\n", cast(long long)global_platform_memory_total_usage);
+ GB_ASSERT_MSG(pmblock != nullptr, "Out of Virtual Memory, oh no...");
+ }
+ global_platform_memory_total_usage += total_size;
return pmblock;
}
void platform_virtual_memory_free(PlatformMemoryBlock *block) {
+ global_platform_memory_total_usage -= block->total_size;
GB_ASSERT(VirtualFree(block, 0, MEM_RELEASE));
}
void platform_virtual_memory_protect(void *memory, isize size) {
@@ -180,11 +188,18 @@ void platform_virtual_memory_protect(void *memory, isize size);
PlatformMemoryBlock *platform_virtual_memory_alloc(isize total_size) {
PlatformMemoryBlock *pmblock = (PlatformMemoryBlock *)mmap(nullptr, total_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
- GB_ASSERT_MSG(pmblock != nullptr, "Out of Virtual Memory, oh no...");
+ if (pmblock == nullptr) {
+ gb_printf_err("Out of Virtual memory, oh no...\n");
+ gb_printf_err("Requested: %lld bytes\n", cast(long long)total_size);
+ gb_printf_err("Total Usage: %lld bytes\n", cast(long long)global_platform_memory_total_usage);
+ GB_ASSERT_MSG(pmblock != nullptr, "Out of Virtual Memory, oh no...");
+ }
+ global_platform_memory_total_usage += total_size;
return pmblock;
}
void platform_virtual_memory_free(PlatformMemoryBlock *block) {
isize size = block->total_size;
+ global_platform_memory_total_usage -= size;
munmap(block, size);
}
void platform_virtual_memory_protect(void *memory, isize size) {
diff --git a/src/entity.cpp b/src/entity.cpp
index df8ee3faa..f5720293f 100644
--- a/src/entity.cpp
+++ b/src/entity.cpp
@@ -74,6 +74,7 @@ enum EntityFlag : u64 {
EntityFlag_Test = 1ull<<30,
EntityFlag_Init = 1ull<<31,
+ EntityFlag_Subtype = 1ull<<32,
EntityFlag_CustomLinkName = 1ull<<40,
EntityFlag_CustomLinkage_Internal = 1ull<<41,
@@ -86,6 +87,10 @@ enum EntityFlag : u64 {
EntityFlag_Overridden = 1ull<<63,
};
+enum : u64 {
+ EntityFlags_IsSubtype = EntityFlag_Using|EntityFlag_Subtype,
+};
+
enum EntityState : u32 {
EntityState_Unresolved = 0,
EntityState_InProgress = 1,
diff --git a/src/exact_value.cpp b/src/exact_value.cpp
index fd90278e5..f6df48951 100644
--- a/src/exact_value.cpp
+++ b/src/exact_value.cpp
@@ -50,9 +50,9 @@ struct ExactValue {
union {
bool value_bool;
String value_string;
- BigInt value_integer; // NOTE(bill): This must be an integer and not a pointer
+ BigInt value_integer;
f64 value_float;
- i64 value_pointer;
+ i64 value_pointer; // NOTE(bill): This must be an integer and not a pointer
Complex128 *value_complex;
Quaternion256 *value_quaternion;
Ast * value_compound;
@@ -630,6 +630,9 @@ void match_exact_values(ExactValue *x, ExactValue *y) {
case ExactValue_Bool:
case ExactValue_String:
case ExactValue_Quaternion:
+ case ExactValue_Pointer:
+ case ExactValue_Procedure:
+ case ExactValue_Typeid:
return;
case ExactValue_Integer:
@@ -671,9 +674,6 @@ void match_exact_values(ExactValue *x, ExactValue *y) {
return;
}
break;
-
- case ExactValue_Procedure:
- return;
}
compiler_error("match_exact_values: How'd you get here? Invalid ExactValueKind %d", x->kind);
@@ -932,6 +932,17 @@ bool compare_exact_values(TokenKind op, ExactValue x, ExactValue y) {
break;
}
+ case ExactValue_Pointer: {
+ switch (op) {
+ case Token_CmpEq: return x.value_pointer == y.value_pointer;
+ case Token_NotEq: return x.value_pointer != y.value_pointer;
+ case Token_Lt: return x.value_pointer < y.value_pointer;
+ case Token_LtEq: return x.value_pointer <= y.value_pointer;
+ case Token_Gt: return x.value_pointer > y.value_pointer;
+ case Token_GtEq: return x.value_pointer >= y.value_pointer;
+ }
+ }
+
case ExactValue_Typeid:
switch (op) {
case Token_CmpEq: return are_types_identical(x.value_typeid, y.value_typeid);
diff --git a/src/gb/gb.h b/src/gb/gb.h
index d9bf09436..b72a893f7 100644
--- a/src/gb/gb.h
+++ b/src/gb/gb.h
@@ -79,6 +79,10 @@ extern "C" {
#ifndef GB_SYSTEM_FREEBSD
#define GB_SYSTEM_FREEBSD 1
#endif
+ #elif defined(__OpenBSD__)
+ #ifndef GB_SYSTEM_OPENBSD
+ #define GB_SYSTEM_OPENBSD 1
+ #endif
#else
#error This UNIX operating system is not supported
#endif
@@ -199,7 +203,7 @@ extern "C" {
#endif
#include <stdlib.h> // NOTE(bill): malloc on linux
#include <sys/mman.h>
- #if !defined(GB_SYSTEM_OSX) && !defined(__FreeBSD__)
+ #if !defined(GB_SYSTEM_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
#include <sys/sendfile.h>
#endif
#include <sys/stat.h>
@@ -235,6 +239,12 @@ extern "C" {
#define sendfile(out, in, offset, count) sendfile(out, in, offset, count, NULL, NULL, 0)
#endif
+#if defined(GB_SYSTEM_OPENBSD)
+ #include <stdio.h>
+ #include <pthread_np.h>
+ #define lseek64 lseek
+#endif
+
#if defined(GB_SYSTEM_UNIX)
#include <semaphore.h>
#endif
@@ -783,6 +793,13 @@ typedef struct gbAffinity {
isize thread_count;
isize threads_per_core;
} gbAffinity;
+#elif defined(GB_SYSTEM_OPENBSD)
+typedef struct gbAffinity {
+ b32 is_accurate;
+ isize core_count;
+ isize thread_count;
+ isize threads_per_core;
+} gbAffinity;
#else
#error TODO(bill): Unknown system
#endif
@@ -3682,6 +3699,30 @@ isize gb_affinity_thread_count_for_core(gbAffinity *a, isize core) {
GB_ASSERT(0 <= core && core < a->core_count);
return a->threads_per_core;
}
+
+#elif defined(GB_SYSTEM_OPENBSD)
+#include <unistd.h>
+
+void gb_affinity_init(gbAffinity *a) {
+ a->core_count = sysconf(_SC_NPROCESSORS_ONLN);
+ a->threads_per_core = 1;
+ a->is_accurate = a->core_count > 0;
+ a->core_count = a->is_accurate ? a->core_count : 1;
+ a->thread_count = a->core_count;
+}
+
+void gb_affinity_destroy(gbAffinity *a) {
+ gb_unused(a);
+}
+
+b32 gb_affinity_set(gbAffinity *a, isize core, isize thread_index) {
+ return true;
+}
+
+isize gb_affinity_thread_count_for_core(gbAffinity *a, isize core) {
+ GB_ASSERT(0 <= core && core < a->core_count);
+ return a->threads_per_core;
+}
#else
#error TODO(bill): Unknown system
#endif
@@ -6025,7 +6066,7 @@ gbFileTime gb_file_last_write_time(char const *filepath) {
gb_inline b32 gb_file_copy(char const *existing_filename, char const *new_filename, b32 fail_if_exists) {
#if defined(GB_SYSTEM_OSX)
return copyfile(existing_filename, new_filename, NULL, COPYFILE_DATA) == 0;
-#else
+#elif defined(GB_SYSTEM_LINUX) || defined(GB_SYSTEM_FREEBSD)
isize size;
int existing_fd = open(existing_filename, O_RDONLY, 0);
int new_fd = open(new_filename, O_WRONLY|O_CREAT, 0666);
@@ -6042,6 +6083,49 @@ gb_inline b32 gb_file_copy(char const *existing_filename, char const *new_filena
close(existing_fd);
return size == stat_existing.st_size;
+#else
+ int new_flags = O_WRONLY | O_CREAT;
+ if (fail_if_exists) {
+ new_flags |= O_EXCL;
+ }
+ int existing_fd = open(existing_filename, O_RDONLY, 0);
+ int new_fd = open(new_filename, new_flags, 0666);
+
+ struct stat stat_existing;
+ if (fstat(existing_fd, &stat_existing) == -1) {
+ return 0;
+ }
+
+ size_t bsize = stat_existing.st_blksize > BUFSIZ ? stat_existing.st_blksize : BUFSIZ;
+ char *buf = (char *)malloc(bsize);
+ if (buf == NULL) {
+ close(new_fd);
+ close(existing_fd);
+ return 0;
+ }
+
+ isize size = 0;
+ ssize_t nread, nwrite, offset;
+ while ((nread = read(existing_fd, buf, bsize)) != -1 && nread != 0) {
+ for (offset = 0; nread; nread -= nwrite, offset += nwrite) {
+ if ((nwrite = write(new_fd, buf + offset, nread)) == -1 || nwrite == 0) {
+ free(buf);
+ close(new_fd);
+ close(existing_fd);
+ return 0;
+ }
+ size += nwrite;
+ }
+ }
+
+ free(buf);
+ close(new_fd);
+ close(existing_fd);
+
+ if (nread == -1) {
+ return 0;
+ }
+ return size == stat_existing.st_size;
#endif
}
@@ -6093,6 +6177,7 @@ gbFileContents gb_file_read_contents(gbAllocator a, b32 zero_terminate, char con
}
void gb_file_free_contents(gbFileContents *fc) {
+ if (fc == NULL || fc->size == 0) return;
GB_ASSERT_NOT_NULL(fc->data);
gb_free(fc->allocator, fc->data);
fc->data = NULL;
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index 07b8e97b2..3694f186a 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -1295,6 +1295,11 @@ void lb_generate_code(lbGenerator *gen) {
reloc_mode = LLVMRelocPIC;
}
+ if (build_context.metrics.os == TargetOs_openbsd) {
+ // Always use PIC for OpenBSD: it defaults to PIE
+ reloc_mode = LLVMRelocPIC;
+ }
+
for_array(i, gen->modules.entries) {
target_machines[i] = LLVMCreateTargetMachine(
target, target_triple, llvm_cpu,
diff --git a/src/llvm_backend_debug.cpp b/src/llvm_backend_debug.cpp
index ff1c5c7dc..b91f32bfc 100644
--- a/src/llvm_backend_debug.cpp
+++ b/src/llvm_backend_debug.cpp
@@ -962,7 +962,7 @@ void lb_add_debug_local_variable(lbProcedure *p, LLVMValueRef ptr, Type *type, T
LLVMMetadataRef llvm_debug_loc = lb_debug_location_from_token_pos(p, token.pos);
LLVMMetadataRef llvm_expr = LLVMDIBuilderCreateExpression(m->debug_builder, nullptr, 0);
lb_set_llvm_metadata(m, ptr, llvm_expr);
- LLVMDIBuilderInsertDbgValueAtEnd(m->debug_builder, storage, var_info, llvm_expr, llvm_debug_loc, block);
+ LLVMDIBuilderInsertDeclareAtEnd(m->debug_builder, storage, var_info, llvm_expr, llvm_debug_loc, block);
}
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp
index 844deb43c..026350440 100644
--- a/src/llvm_backend_expr.cpp
+++ b/src/llvm_backend_expr.cpp
@@ -2202,6 +2202,21 @@ lbValue lb_emit_comp(lbProcedure *p, TokenKind op_kind, lbValue left, lbValue ri
}
}
+ if (is_type_matrix(a) && (op_kind == Token_CmpEq || op_kind == Token_NotEq)) {
+ Type *tl = base_type(a);
+ lbValue lhs = lb_address_from_load_or_generate_local(p, left);
+ lbValue rhs = lb_address_from_load_or_generate_local(p, right);
+
+
+ // TODO(bill): Test to see if this is actually faster!!!!
+ auto args = array_make<lbValue>(permanent_allocator(), 3);
+ args[0] = lb_emit_conv(p, lhs, t_rawptr);
+ args[1] = lb_emit_conv(p, rhs, t_rawptr);
+ args[2] = lb_const_int(p->module, t_int, type_size_of(tl));
+ lbValue val = lb_emit_runtime_call(p, "memory_compare", args);
+ lbValue res = lb_emit_comp(p, op_kind, val, lb_const_nil(p->module, val.type));
+ return lb_emit_conv(p, res, t_bool);
+ }
if (is_type_array(a) || is_type_enumerated_array(a)) {
Type *tl = base_type(a);
lbValue lhs = lb_address_from_load_or_generate_local(p, left);
diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp
index 261e2819c..eb6c89b85 100644
--- a/src/llvm_backend_proc.cpp
+++ b/src/llvm_backend_proc.cpp
@@ -57,6 +57,7 @@ void lb_mem_copy_non_overlapping(lbProcedure *p, lbValue dst, lbValue src, lbVal
LLVMBuildCall(p->builder, ip, args, gb_count_of(args), "");
}
+
lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool ignore_body) {
GB_ASSERT(entity != nullptr);
GB_ASSERT(entity->kind == Entity_Procedure);
@@ -163,14 +164,6 @@ lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool ignore_body)
break;
}
-
-
- // lbCallingConventionKind cc_kind = lbCallingConvention_C;
- // // TODO(bill): Clean up this logic
- // if (build_context.metrics.os != TargetOs_js) {
- // cc_kind = lb_calling_convention_map[pt->Proc.calling_convention];
- // }
- // LLVMSetFunctionCallConv(p->value, cc_kind);
lbValue proc_value = {p->value, p->type};
lb_add_entity(m, entity, proc_value);
lb_add_member(m, p->name, proc_value);
@@ -1049,7 +1042,7 @@ lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValue const &tv,
return lb_string_len(p, v);
} else if (is_type_array(t)) {
GB_PANIC("Array lengths are constant");
- } else if (is_type_slice(t)) {
+ } else if (is_type_slice(t) || is_type_relative_slice(t)) {
return lb_slice_len(p, v);
} else if (is_type_dynamic_array(t)) {
return lb_dynamic_array_len(p, v);
@@ -1075,7 +1068,7 @@ lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValue const &tv,
GB_PANIC("Unreachable");
} else if (is_type_array(t)) {
GB_PANIC("Array lengths are constant");
- } else if (is_type_slice(t)) {
+ } else if (is_type_slice(t) || is_type_relative_slice(t)) {
return lb_slice_len(p, v);
} else if (is_type_dynamic_array(t)) {
return lb_dynamic_array_cap(p, v);
@@ -2122,6 +2115,77 @@ lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValue const &tv,
case BuiltinProc_objc_find_class: return lb_handle_objc_find_class(p, expr);
case BuiltinProc_objc_register_selector: return lb_handle_objc_register_selector(p, expr);
case BuiltinProc_objc_register_class: return lb_handle_objc_register_class(p, expr);
+
+
+ case BuiltinProc_constant_utf16_cstring:
+ {
+ auto const encode_surrogate_pair = [](Rune r, u16 *r1, u16 *r2) {
+ if (r < 0x10000 || r > 0x10ffff) {
+ *r1 = 0xfffd;
+ *r2 = 0xfffd;
+ } else {
+ r -= 0x10000;
+ *r1 = 0xd800 + ((r>>10)&0x3ff);
+ *r2 = 0xdc00 + (r&0x3ff);
+ }
+ };
+
+ lbModule *m = p->module;
+
+ auto tav = type_and_value_of_expr(ce->args[0]);
+ GB_ASSERT(tav.value.kind == ExactValue_String);
+ String value = tav.value.value_string;
+
+ LLVMTypeRef llvm_u16 = lb_type(m, t_u16);
+
+ isize max_len = value.len*2 + 1;
+ LLVMValueRef *buffer = gb_alloc_array(temporary_allocator(), LLVMValueRef, max_len);
+ isize n = 0;
+ while (value.len > 0) {
+ Rune r = 0;
+ isize w = gb_utf8_decode(value.text, value.len, &r);
+ value.text += w;
+ value.len -= w;
+ if ((0 <= r && r < 0xd800) || (0xe000 <= r && r < 0x10000)) {
+ buffer[n++] = LLVMConstInt(llvm_u16, cast(u16)r, false);
+ } else if (0x10000 <= r && r <= 0x10ffff) {
+ u16 r1, r2;
+ encode_surrogate_pair(r, &r1, &r2);
+ buffer[n++] = LLVMConstInt(llvm_u16, r1, false);
+ buffer[n++] = LLVMConstInt(llvm_u16, r2, false);
+ } else {
+ buffer[n++] = LLVMConstInt(llvm_u16, 0xfffd, false);
+ }
+ }
+
+ buffer[n++] = LLVMConstInt(llvm_u16, 0, false);
+
+ LLVMValueRef array = LLVMConstArray(llvm_u16, buffer, cast(unsigned int)n);
+
+ char *name = nullptr;
+ {
+ isize max_len = 7+8+1;
+ name = gb_alloc_array(permanent_allocator(), char, max_len);
+ u32 id = m->gen->global_array_index.fetch_add(1);
+ isize len = gb_snprintf(name, max_len, "csbs$%x", id);
+ len -= 1;
+ }
+ LLVMValueRef global_data = LLVMAddGlobal(m->mod, LLVMTypeOf(array), name);
+ LLVMSetInitializer(global_data, array);
+ LLVMSetLinkage(global_data, LLVMInternalLinkage);
+
+
+
+ LLVMValueRef indices[] = {
+ LLVMConstInt(lb_type(m, t_u32), 0, false),
+ LLVMConstInt(lb_type(m, t_u32), 0, false),
+ };
+ lbValue res = {};
+ res.type = tv.type;
+ res.value = LLVMBuildInBoundsGEP(p->builder, global_data, indices, gb_count_of(indices), "");
+ return res;
+
+ }
}
GB_PANIC("Unhandled built-in procedure %.*s", LIT(builtin_procs[id].name));
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp
index 98b7e07f0..431cfea9b 100644
--- a/src/llvm_backend_utility.cpp
+++ b/src/llvm_backend_utility.cpp
@@ -1373,7 +1373,7 @@ lbValue lb_slice_elem(lbProcedure *p, lbValue slice) {
return lb_emit_struct_ev(p, slice, 0);
}
lbValue lb_slice_len(lbProcedure *p, lbValue slice) {
- GB_ASSERT(is_type_slice(slice.type));
+ GB_ASSERT(is_type_slice(slice.type) || is_type_relative_slice(slice.type));
return lb_emit_struct_ev(p, slice, 1);
}
lbValue lb_dynamic_array_elem(lbProcedure *p, lbValue da) {
diff --git a/src/main.cpp b/src/main.cpp
index 014fbf822..aab695de2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -384,7 +384,7 @@ i32 linker_stage(lbGenerator *gen) {
// NOTE(zangent): Sometimes, you have to use -framework on MacOS.
// This allows you to specify '-f' in a #foreign_system_library,
// without having to implement any new syntax specifically for MacOS.
- #if defined(GB_SYSTEM_OSX)
+ if (build_context.metrics.os == TargetOs_darwin) {
if (string_ends_with(lib, str_lit(".framework"))) {
// framework thingie
String lib_name = lib;
@@ -400,14 +400,14 @@ i32 linker_stage(lbGenerator *gen) {
// dynamic or static system lib, just link regularly searching system library paths
lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));
}
- #else
+ } else {
// NOTE(vassvik): static libraries (.a files) in linux can be linked to directly using the full path,
// since those are statically linked to at link time. shared libraries (.so) has to be
// available at runtime wherever the executable is run, so we make require those to be
// local to the executable (unless the system collection is used, in which case we search
// the system library paths for the library file).
- if (string_ends_with(lib, str_lit(".a"))) {
- // static libs, absolute full path relative to the file in which the lib was imported from
+ if (string_ends_with(lib, str_lit(".a")) || string_ends_with(lib, str_lit(".o"))) {
+ // static libs and object files, absolute full path relative to the file in which the lib was imported from
lib_str = gb_string_append_fmt(lib_str, " -l:\"%.*s\" ", LIT(lib));
} else if (string_ends_with(lib, str_lit(".so"))) {
// dynamic lib, relative path to executable
@@ -418,7 +418,7 @@ i32 linker_stage(lbGenerator *gen) {
// dynamic or static system lib, just link regularly searching system library paths
lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));
}
- #endif
+ }
}
gbString object_files = gb_string_make(heap_allocator(), "");
@@ -456,14 +456,15 @@ i32 linker_stage(lbGenerator *gen) {
// line arguments prepared previously are incompatible with ld.
//
// Shared libraries are .dylib on MacOS and .so on Linux.
- #if defined(GB_SYSTEM_OSX)
+ if (build_context.metrics.os == TargetOs_darwin) {
output_ext = STR_LIT(".dylib");
- #else
+ } else {
output_ext = STR_LIT(".so");
- #endif
+ }
link_settings = gb_string_appendc(link_settings, "-Wl,-init,'_odin_entry_point' ");
link_settings = gb_string_appendc(link_settings, "-Wl,-fini,'_odin_exit_point' ");
- } else {
+ } else if (build_context.metrics.os != TargetOs_openbsd) {
+ // OpenBSD defaults to PIE executable. do not pass -no-pie for it.
link_settings = gb_string_appendc(link_settings, "-no-pie ");
}
if (build_context.out_filepath.len > 0) {
@@ -474,34 +475,39 @@ i32 linker_stage(lbGenerator *gen) {
}
}
- result = system_exec_command_line_app("ld-link",
- "clang -Wno-unused-command-line-argument %s -o \"%.*s%.*s\" %s "
- " %s "
- " %.*s "
- " %.*s "
- " %s "
- #if defined(GB_SYSTEM_OSX)
- // This sets a requirement of Mountain Lion and up, but the compiler doesn't work without this limit.
- // NOTE: If you change this (although this minimum is as low as you can go with Odin working)
- // make sure to also change the 'mtriple' param passed to 'opt'
- #if defined(GB_CPU_ARM)
- " -mmacosx-version-min=12.0.0 "
- #else
- " -mmacosx-version-min=10.8.0 "
- #endif
- // This points the linker to where the entry point is
- " -e _main "
- #endif
- , object_files, LIT(output_base), LIT(output_ext),
- #if defined(GB_SYSTEM_OSX)
- "-lSystem -lm -Wl,-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/usr/local/lib",
- #else
- "-lc -lm",
- #endif
- lib_str,
- LIT(build_context.link_flags),
- LIT(build_context.extra_linker_flags),
- link_settings);
+ gbString platform_lib_str = gb_string_make(heap_allocator(), "");
+ defer (gb_string_free(platform_lib_str));
+ if (build_context.metrics.os == TargetOs_darwin) {
+ platform_lib_str = gb_string_appendc(platform_lib_str, "-lSystem -lm -Wl,-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/usr/local/lib");
+ } else {
+ platform_lib_str = gb_string_appendc(platform_lib_str, "-lc -lm");
+ }
+
+ if (build_context.metrics.os == TargetOs_darwin) {
+ // This sets a requirement of Mountain Lion and up, but the compiler doesn't work without this limit.
+ // NOTE: If you change this (although this minimum is as low as you can go with Odin working)
+ // make sure to also change the 'mtriple' param passed to 'opt'
+ if (build_context.metrics.arch == TargetArch_arm64) {
+ link_settings = gb_string_appendc(link_settings, " -mmacosx-version-min=12.0.0 ");
+ } else {
+ link_settings = gb_string_appendc(link_settings, " -mmacosx-version-min=10.8.0 ");
+ }
+ // This points the linker to where the entry point is
+ link_settings = gb_string_appendc(link_settings, " -e _main ");
+ }
+
+ gbString link_command_line = gb_string_make(heap_allocator(), "clang -Wno-unused-command-line-argument ");
+ defer (gb_string_free(link_command_line));
+
+ link_command_line = gb_string_appendc(link_command_line, object_files);
+ link_command_line = gb_string_append_fmt(link_command_line, " -o \"%.*s%.*s\" ", LIT(output_base), LIT(output_ext));
+ link_command_line = gb_string_append_fmt(link_command_line, " %s ", platform_lib_str);
+ link_command_line = gb_string_append_fmt(link_command_line, " %s ", lib_str);
+ link_command_line = gb_string_append_fmt(link_command_line, " %.*s ", LIT(build_context.link_flags));
+ 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);
+
+ result = system_exec_command_line_app("ld-link", link_command_line);
if (result) {
return result;
@@ -572,14 +578,16 @@ void usage(String argv0) {
print_usage_line(0, "Usage:");
print_usage_line(1, "%.*s command [arguments]", LIT(argv0));
print_usage_line(0, "Commands:");
- print_usage_line(1, "build compile .odin file, or directory of .odin files, as an executable.");
- print_usage_line(1, " one must contain the program's entry point, all must be in the same package.");
- print_usage_line(1, "run same as 'build', but also then runs the newly compiled executable.");
- print_usage_line(1, "check parse and type check .odin file");
- print_usage_line(1, "query parse, type check, and output a .json file containing information about the program");
- print_usage_line(1, "doc generate documentation .odin file, or directory of .odin files");
- print_usage_line(1, "version print version");
- print_usage_line(1, "report print information useful to reporting a bug");
+ print_usage_line(1, "build compile .odin file, or directory of .odin files, as an executable.");
+ print_usage_line(1, " one must contain the program's entry point, all must be in the same package.");
+ print_usage_line(1, "run same as 'build', but also then runs the newly compiled executable.");
+ print_usage_line(1, "check parse, and type check an .odin file, or directory of .odin files");
+ print_usage_line(1, "query parse, type check, and output a .json file containing information about the program");
+ print_usage_line(1, "strip-semicolon parse, type check, and remove unneeded semicolons from the entire program");
+ print_usage_line(1, "test build ands runs procedures with the attribute @(test) in the initial package");
+ print_usage_line(1, "doc generate documentation .odin file, or directory of .odin files");
+ print_usage_line(1, "version print version");
+ print_usage_line(1, "report print information useful to reporting a bug");
print_usage_line(0, "");
print_usage_line(0, "For further details on a command, use -help after the command name");
print_usage_line(1, "e.g. odin build -help");
@@ -2577,7 +2585,7 @@ int main(int arg_count, char const **arg_ptr) {
// NOTE(bill): add 'shared' directory if it is not already set
if (!find_library_collection_path(str_lit("shared"), nullptr)) {
add_library_collection(str_lit("shared"),
- get_fullpath_relative(heap_allocator(), odin_root_dir(), str_lit("shared")));
+ get_fullpath_relative(heap_allocator(), odin_root_dir(), str_lit("shared")));
}
diff --git a/src/parser.cpp b/src/parser.cpp
index bd0e55b7f..94a585f35 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -57,6 +57,9 @@ isize ast_node_size(AstKind kind) {
return align_formula_isize(gb_size_of(AstCommonStuff) + ast_variant_sizes[kind], gb_align_of(void *));
}
+
+gb_global std::atomic<isize> global_total_node_memory_allocated;
+
// NOTE(bill): And this below is why is I/we need a new language! Discriminated unions are a pain in C/C++
Ast *alloc_ast_node(AstFile *f, AstKind kind) {
gbAllocator a = ast_allocator(f);
@@ -66,6 +69,9 @@ Ast *alloc_ast_node(AstFile *f, AstKind kind) {
Ast *node = cast(Ast *)gb_alloc(a, size);
node->kind = kind;
node->file_id = f ? f->id : 0;
+
+ global_total_node_memory_allocated += size;
+
return node;
}
@@ -1532,7 +1538,7 @@ void fix_advance_to_next_stmt(AstFile *f) {
Token expect_closing(AstFile *f, TokenKind kind, String context) {
if (f->curr_token.kind != kind &&
f->curr_token.kind == Token_Semicolon &&
- f->curr_token.string == "\n") {
+ (f->curr_token.string == "\n" || f->curr_token.kind == Token_EOF)) {
Token tok = f->prev_token;
tok.pos.column += cast(i32)tok.string.len;
syntax_error(tok, "Missing ',' before newline in %.*s", LIT(context));
@@ -1554,6 +1560,7 @@ void assign_removal_flag_to_semicolon(AstFile *f) {
switch (curr_token->kind) {
case Token_CloseBrace:
case Token_CloseParen:
+ case Token_EOF:
ok = true;
break;
}
@@ -3009,64 +3016,62 @@ i32 token_precedence(AstFile *f, TokenKind t) {
Ast *parse_binary_expr(AstFile *f, bool lhs, i32 prec_in) {
Ast *expr = parse_unary_expr(f, lhs);
- for (i32 prec = token_precedence(f, f->curr_token.kind); prec >= prec_in; prec--) {
- for (;;) {
- Token op = f->curr_token;
- i32 op_prec = token_precedence(f, op.kind);
- if (op_prec != prec) {
- // NOTE(bill): This will also catch operators that are not valid "binary" operators
- break;
+ for (;;) {
+ Token op = f->curr_token;
+ i32 op_prec = token_precedence(f, op.kind);
+ if (op_prec < prec_in) {
+ // NOTE(bill): This will also catch operators that are not valid "binary" operators
+ break;
+ }
+ Token prev = f->prev_token;
+ switch (op.kind) {
+ case Token_if:
+ case Token_when:
+ if (prev.pos.line < op.pos.line) {
+ // NOTE(bill): Check to see if the `if` or `when` is on the same line of the `lhs` condition
+ goto loop_end;
}
- Token prev = f->prev_token;
+ break;
+ }
+ expect_operator(f); // NOTE(bill): error checks too
+
+ if (op.kind == Token_Question) {
+ Ast *cond = expr;
+ // Token_Question
+ Ast *x = parse_expr(f, lhs);
+ Token token_c = expect_token(f, Token_Colon);
+ Ast *y = parse_expr(f, lhs);
+ expr = ast_ternary_if_expr(f, x, cond, y);
+ } else if (op.kind == Token_if || op.kind == Token_when) {
+ Ast *x = expr;
+ Ast *cond = parse_expr(f, lhs);
+ Token tok_else = expect_token(f, Token_else);
+ Ast *y = parse_expr(f, lhs);
+
switch (op.kind) {
case Token_if:
+ expr = ast_ternary_if_expr(f, x, cond, y);
+ break;
case Token_when:
- if (prev.pos.line < op.pos.line) {
- // NOTE(bill): Check to see if the `if` or `when` is on the same line of the `lhs` condition
- goto loop_end;
- }
+ expr = ast_ternary_when_expr(f, x, cond, y);
break;
}
- expect_operator(f); // NOTE(bill): error checks too
-
- if (op.kind == Token_Question) {
- Ast *cond = expr;
- // Token_Question
- Ast *x = parse_expr(f, lhs);
- Token token_c = expect_token(f, Token_Colon);
- Ast *y = parse_expr(f, lhs);
- expr = ast_ternary_if_expr(f, x, cond, y);
- } else if (op.kind == Token_if || op.kind == Token_when) {
- Ast *x = expr;
- Ast *cond = parse_expr(f, lhs);
- Token tok_else = expect_token(f, Token_else);
- Ast *y = parse_expr(f, lhs);
-
- switch (op.kind) {
- case Token_if:
- expr = ast_ternary_if_expr(f, x, cond, y);
- break;
- case Token_when:
- expr = ast_ternary_when_expr(f, x, cond, y);
- break;
- }
+ } else {
+ Ast *right = parse_binary_expr(f, false, op_prec+1);
+ if (right == nullptr) {
+ syntax_error(op, "Expected expression on the right-hand side of the binary operator '%.*s'", LIT(op.string));
+ }
+ if (op.kind == Token_or_else) {
+ // NOTE(bill): easier to handle its logic different with its own AST kind
+ expr = ast_or_else_expr(f, expr, op, right);
} else {
- Ast *right = parse_binary_expr(f, false, prec+1);
- if (right == nullptr) {
- syntax_error(op, "Expected expression on the right-hand side of the binary operator '%.*s'", LIT(op.string));
- }
- if (op.kind == Token_or_else) {
- // NOTE(bill): easier to handle its logic different with its own AST kind
- expr = ast_or_else_expr(f, expr, op, right);
- } else {
- expr = ast_binary_expr(f, op, expr, right);
- }
+ expr = ast_binary_expr(f, op, expr, right);
}
-
- lhs = false;
}
- loop_end:;
+
+ lhs = false;
}
+ loop_end:;
return expr;
}
@@ -3510,12 +3515,13 @@ enum FieldPrefixKind : i32 {
FieldPrefix_Unknown = -1,
FieldPrefix_Invalid = 0,
- FieldPrefix_using,
+ FieldPrefix_using, // implies #subtype
FieldPrefix_const,
FieldPrefix_no_alias,
FieldPrefix_c_vararg,
FieldPrefix_auto_cast,
FieldPrefix_any_int,
+ FieldPrefix_subtype, // does not imply `using` semantics
};
struct ParseFieldPrefixMapping {
@@ -3532,6 +3538,7 @@ gb_global ParseFieldPrefixMapping parse_field_prefix_mappings[] = {
{str_lit("c_vararg"), Token_Hash, FieldPrefix_c_vararg, FieldFlag_c_vararg},
{str_lit("const"), Token_Hash, FieldPrefix_const, FieldFlag_const},
{str_lit("any_int"), Token_Hash, FieldPrefix_any_int, FieldFlag_any_int},
+ {str_lit("subtype"), Token_Hash, FieldPrefix_subtype, FieldFlag_subtype},
};
@@ -4849,12 +4856,6 @@ ParseFileError init_ast_file(AstFile *f, String fullpath, TokenPos *err_pos) {
f->prev_token = f->tokens[f->prev_token_index];
f->curr_token = f->tokens[f->curr_token_index];
- isize const page_size = 4*1024;
- isize block_size = 2*f->tokens.count*gb_size_of(Ast);
- block_size = ((block_size + page_size-1)/page_size) * page_size;
- block_size = gb_clamp(block_size, page_size, DEFAULT_MINIMUM_BLOCK_SIZE);
- f->arena.minimum_block_size = block_size;
-
array_init(&f->comments, heap_allocator(), 0, 0);
array_init(&f->imports, heap_allocator(), 0, 0);
@@ -5719,6 +5720,22 @@ ParseFileError parse_packages(Parser *p, String init_filename) {
error_line("Expected either a directory or a .odin file, got '%.*s'\n", LIT(init_filename));
return ParseFile_WrongExtension;
}
+ } else if (init_fullpath.len != 0) {
+ String path = init_fullpath;
+ if (path[path.len-1] == '/') {
+ path.len -= 1;
+ }
+ if ((build_context.command_kind & Command__does_build) &&
+ build_context.build_mode == BuildMode_Executable) {
+ String short_path = filename_from_path(path);
+ char *cpath = alloc_cstring(heap_allocator(), short_path);
+ defer (gb_free(heap_allocator(), cpath));
+
+ if (gb_file_exists(cpath)) {
+ error_line("Please specify the executable name with -out:<string> as a directory exists with the same name in the current working directory");
+ return ParseFile_DirectoryAlreadyExists;
+ }
+ }
}
diff --git a/src/parser.hpp b/src/parser.hpp
index 9e93f4b26..c33d1520b 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -46,6 +46,7 @@ enum ParseFileError {
ParseFile_InvalidToken,
ParseFile_GeneralError,
ParseFile_FileTooLarge,
+ ParseFile_DirectoryAlreadyExists,
ParseFile_Count,
};
@@ -97,8 +98,6 @@ struct AstFile {
AstPackage * pkg;
Scope * scope;
- Arena arena;
-
Ast * pkg_decl;
String fullpath;
Tokenizer tokenizer;
@@ -300,6 +299,7 @@ enum FieldFlag : u32 {
FieldFlag_auto_cast = 1<<4,
FieldFlag_const = 1<<5,
FieldFlag_any_int = 1<<6,
+ FieldFlag_subtype = 1<<7,
// Internal use by the parser only
FieldFlag_Tags = 1<<10,
@@ -307,7 +307,7 @@ enum FieldFlag : u32 {
// Parameter List Restrictions
FieldFlag_Signature = FieldFlag_ellipsis|FieldFlag_using|FieldFlag_no_alias|FieldFlag_c_vararg|FieldFlag_auto_cast|FieldFlag_const|FieldFlag_any_int,
- FieldFlag_Struct = FieldFlag_using|FieldFlag_Tags,
+ FieldFlag_Struct = FieldFlag_using|FieldFlag_subtype|FieldFlag_Tags,
};
enum StmtAllowFlag {
@@ -800,10 +800,10 @@ gb_inline bool is_ast_when_stmt(Ast *node) {
return node->kind == Ast_WhenStmt;
}
-gb_global gb_thread_local Arena global_ast_arena = {};
+gb_global gb_thread_local Arena global_thread_local_ast_arena = {};
gbAllocator ast_allocator(AstFile *f) {
- Arena *arena = f ? &f->arena : &global_ast_arena;
+ Arena *arena = &global_thread_local_ast_arena;
return arena_allocator(arena);
}
diff --git a/src/threading.cpp b/src/threading.cpp
index 50d0dfed1..63e3415b2 100644
--- a/src/threading.cpp
+++ b/src/threading.cpp
@@ -486,7 +486,7 @@ void thread_set_name(Thread *t, char const *name) {
#elif defined(GB_SYSTEM_OSX)
// TODO(bill): Test if this works
pthread_setname_np(name);
-#elif defined(GB_SYSTEM_FREEBSD)
+#elif defined(GB_SYSTEM_FREEBSD) || defined(GB_SYSTEM_OPENBSD)
pthread_set_name_np(t->posix_handle, name);
#else
// TODO(bill): Test if this works
diff --git a/src/types.cpp b/src/types.cpp
index 78958146b..58ccdf5b9 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -703,7 +703,7 @@ struct TypePath;
i64 type_size_of (Type *t);
i64 type_align_of (Type *t);
i64 type_offset_of (Type *t, i32 index);
-gbString type_to_string (Type *type);
+gbString type_to_string (Type *type, bool shorthand=false);
i64 type_size_of_internal(Type *t, TypePath *path);
void init_map_internal_types(Type *type);
Type * bit_set_to_int(Type *t);
@@ -2334,7 +2334,7 @@ String lookup_subtype_polymorphic_field(Type *dst, Type *src) {
GB_ASSERT(is_type_struct(src) || is_type_union(src));
for_array(i, src->Struct.fields) {
Entity *f = src->Struct.fields[i];
- if (f->kind == Entity_Variable && f->flags & EntityFlag_Using) {
+ if (f->kind == Entity_Variable && f->flags & EntityFlags_IsSubtype) {
if (are_types_identical(dst, f->type)) {
return f->token.string;
}
@@ -2343,7 +2343,7 @@ String lookup_subtype_polymorphic_field(Type *dst, Type *src) {
return f->token.string;
}
}
- if (is_type_struct(f->type)) {
+ if ((f->flags & EntityFlag_Using) != 0 && is_type_struct(f->type)) {
String name = lookup_subtype_polymorphic_field(dst, f->type);
if (name.len > 0) {
return name;
@@ -2489,9 +2489,9 @@ bool are_types_identical_internal(Type *x, Type *y, bool check_tuple_names) {
if (xf->token.string != yf->token.string) {
return false;
}
- bool xf_is_using = (xf->flags&EntityFlag_Using) != 0;
- bool yf_is_using = (yf->flags&EntityFlag_Using) != 0;
- if (xf_is_using ^ yf_is_using) {
+ u64 xf_flags = (xf->flags&EntityFlags_IsSubtype);
+ u64 yf_flags = (yf->flags&EntityFlags_IsSubtype);
+ if (xf_flags != yf_flags) {
return false;
}
}
@@ -2623,6 +2623,17 @@ i64 union_tag_size(Type *u) {
// TODO(bill): Is this an okay approach?
i64 max_align = 1;
+
+ if (u->Union.variants.count < 1ull<<8) {
+ max_align = 1;
+ } else if (u->Union.variants.count < 1ull<<16) {
+ max_align = 2;
+ } else if (u->Union.variants.count < 1ull<<32) {
+ max_align = 4;
+ } else {
+ GB_PANIC("how many variants do you have?!");
+ }
+
for_array(i, u->Union.variants) {
Type *variant_type = u->Union.variants[i];
i64 align = type_align_of(variant_type);
@@ -3813,7 +3824,7 @@ isize check_is_assignable_to_using_subtype(Type *src, Type *dst, isize level = 0
for_array(i, src->Struct.fields) {
Entity *f = src->Struct.fields[i];
- if (f->kind != Entity_Variable || (f->flags&EntityFlag_Using) == 0) {
+ if (f->kind != Entity_Variable || (f->flags&EntityFlags_IsSubtype) == 0) {
continue;
}
@@ -3925,7 +3936,7 @@ Type *alloc_type_proc_from_types(Type **param_types, unsigned param_count, Type
-gbString write_type_to_string(gbString str, Type *type) {
+gbString write_type_to_string(gbString str, Type *type, bool shorthand=false) {
if (type == nullptr) {
return gb_string_appendc(str, "<no type>");
}
@@ -4040,15 +4051,21 @@ gbString write_type_to_string(gbString str, Type *type) {
if (type->Struct.is_raw_union) str = gb_string_appendc(str, " #raw_union");
if (type->Struct.custom_align != 0) str = gb_string_append_fmt(str, " #align %d", cast(int)type->Struct.custom_align);
str = gb_string_appendc(str, " {");
- for_array(i, type->Struct.fields) {
- Entity *f = type->Struct.fields[i];
- GB_ASSERT(f->kind == Entity_Variable);
- if (i > 0) {
- str = gb_string_appendc(str, ", ");
+
+
+ if (shorthand && type->Struct.fields.count > 16) {
+ str = gb_string_append_fmt(str, "%lld fields...", cast(long long)type->Struct.fields.count);
+ } else {
+ for_array(i, type->Struct.fields) {
+ Entity *f = type->Struct.fields[i];
+ GB_ASSERT(f->kind == Entity_Variable);
+ if (i > 0) {
+ str = gb_string_appendc(str, ", ");
+ }
+ str = gb_string_append_length(str, f->token.string.text, f->token.string.len);
+ str = gb_string_appendc(str, ": ");
+ str = write_type_to_string(str, f->type);
}
- str = gb_string_append_length(str, f->token.string.text, f->token.string.len);
- str = gb_string_appendc(str, ": ");
- str = write_type_to_string(str, f->type);
}
str = gb_string_append_rune(str, '}');
} break;
@@ -4223,13 +4240,16 @@ gbString write_type_to_string(gbString str, Type *type) {
}
-gbString type_to_string(Type *type, gbAllocator allocator) {
- return write_type_to_string(gb_string_make(allocator, ""), type);
+gbString type_to_string(Type *type, gbAllocator allocator, bool shorthand=false) {
+ return write_type_to_string(gb_string_make(allocator, ""), type, shorthand);
}
-gbString type_to_string(Type *type) {
- return write_type_to_string(gb_string_make(heap_allocator(), ""), type);
+gbString type_to_string(Type *type, bool shorthand) {
+ return write_type_to_string(gb_string_make(heap_allocator(), ""), type, shorthand);
}
+gbString type_to_string_shorthand(Type *type) {
+ return type_to_string(type, true);
+}
diff --git a/tests/core/Makefile b/tests/core/Makefile
index 1c2cee6bd..fac5b6203 100644
--- a/tests/core/Makefile
+++ b/tests/core/Makefile
@@ -1,7 +1,7 @@
ODIN=../../odin
PYTHON=$(shell which python3)
-all: download_test_assets image_test compress_test strings_test hash_test crypto_test noise_test
+all: download_test_assets image_test compress_test strings_test hash_test crypto_test noise_test encoding_test
download_test_assets:
$(PYTHON) download_assets.py
@@ -22,4 +22,8 @@ crypto_test:
$(ODIN) run crypto -out=crypto_hash -o:speed -no-bounds-check
noise_test:
- $(ODIN) run math/noise -out=test_noise \ No newline at end of file
+ $(ODIN) run math/noise -out=test_noise
+
+encoding_test:
+ $(ODIN) run encoding/json -out=test_json
+ $(ODIN) run encoding/varint -out=test_varint \ No newline at end of file
diff --git a/tests/core/build.bat b/tests/core/build.bat
index 6af39e688..0227ac6bb 100644
--- a/tests/core/build.bat
+++ b/tests/core/build.bat
@@ -35,7 +35,8 @@ echo ---
echo ---
echo Running core:encoding tests
echo ---
-%PATH_TO_ODIN% run encoding %COMMON%
+%PATH_TO_ODIN% run encoding/json %COMMON%
+%PATH_TO_ODIN% run encoding/varint %COMMON%
echo ---
echo Running core:math/noise tests
diff --git a/tests/core/compress/test_core_compress.odin b/tests/core/compress/test_core_compress.odin
index c925c0258..51952a568 100644
--- a/tests/core/compress/test_core_compress.odin
+++ b/tests/core/compress/test_core_compress.odin
@@ -30,14 +30,12 @@ when ODIN_TEST {
log :: testing.log
} else {
expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
TEST_count += 1
if !condition {
TEST_fail += 1
- fmt.println(message)
+ fmt.printf("[%v] %v\n", loc, message)
return
}
- fmt.println(" PASS")
}
log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
fmt.printf("[%v] ", loc)
@@ -52,6 +50,9 @@ main :: proc() {
gzip_test(&t)
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
@test
diff --git a/tests/core/crypto/test_core_crypto.odin b/tests/core/crypto/test_core_crypto.odin
index 2ad00be66..636632d71 100644
--- a/tests/core/crypto/test_core_crypto.odin
+++ b/tests/core/crypto/test_core_crypto.odin
@@ -1,15 +1,15 @@
package test_core_crypto
/*
- Copyright 2021 zhibog
- Made available under the BSD-3 license.
+ Copyright 2021 zhibog
+ Made available under the BSD-3 license.
- List of contributors:
- zhibog, dotbmp: Initial implementation.
- Jeroen van Rijn: Test runner setup.
+ List of contributors:
+ zhibog, dotbmp: Initial implementation.
+ Jeroen van Rijn: Test runner setup.
- Tests for the hashing algorithms within the crypto library.
- Where possible, the official test vectors are used to validate the implementation.
+ Tests for the hashing algorithms within the crypto library.
+ Where possible, the official test vectors are used to validate the implementation.
*/
import "core:testing"
@@ -36,1070 +36,1115 @@ import "core:crypto/sm3"
import "core:crypto/jh"
import "core:crypto/groestl"
import "core:crypto/haval"
+import "core:crypto/siphash"
+import "core:os"
TEST_count := 0
TEST_fail := 0
when ODIN_TEST {
- expect :: testing.expect
- log :: testing.log
+ expect :: testing.expect
+ log :: testing.log
} else {
- expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- TEST_count += 1
- if !condition {
- TEST_fail += 1
- fmt.println(message)
- return
- }
- fmt.println(" PASS")
- }
- log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- fmt.printf("log: %v\n", v)
- }
+ expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
+ TEST_count += 1
+ if !condition {
+ TEST_fail += 1
+ fmt.printf("[%v] %v\n", loc, message)
+ return
+ }
+ }
+ log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
+ fmt.printf("[%v] ", loc)
+ fmt.printf("log: %v\n", v)
+ }
}
main :: proc() {
- t := testing.T{}
- test_md2(&t)
- test_md4(&t)
- test_md5(&t)
- test_sha1(&t)
- test_sha224(&t)
- test_sha256(&t)
- test_sha384(&t)
- test_sha512(&t)
- test_sha3_224(&t)
- test_sha3_256(&t)
- test_sha3_384(&t)
- test_sha3_512(&t)
- test_shake_128(&t)
- test_shake_256(&t)
- test_keccak_224(&t)
- test_keccak_256(&t)
- test_keccak_384(&t)
- test_keccak_512(&t)
- test_whirlpool(&t)
- test_gost(&t)
- test_streebog_256(&t)
- test_streebog_512(&t)
- test_blake_224(&t)
- test_blake_256(&t)
- test_blake_384(&t)
- test_blake_512(&t)
- test_blake2b(&t)
- test_blake2s(&t)
- test_ripemd_128(&t)
- test_ripemd_160(&t)
- test_ripemd_256(&t)
- test_ripemd_320(&t)
- test_tiger_128(&t)
- test_tiger_160(&t)
- test_tiger_192(&t)
- test_tiger2_128(&t)
- test_tiger2_160(&t)
- test_tiger2_192(&t)
- test_sm3(&t)
- test_jh_224(&t)
- test_jh_256(&t)
- test_jh_384(&t)
- test_jh_512(&t)
- test_groestl_224(&t)
- test_groestl_256(&t)
- test_groestl_384(&t)
- test_groestl_512(&t)
- test_haval_128(&t)
- test_haval_160(&t)
- test_haval_192(&t)
- test_haval_224(&t)
- test_haval_256(&t)
-
- // "modern" crypto tests
- test_chacha20(&t)
- test_poly1305(&t)
- test_chacha20poly1305(&t)
- test_x25519(&t)
- test_rand_bytes(&t)
-
- bench_modern(&t)
-
- fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ t := testing.T{}
+ test_md2(&t)
+ test_md4(&t)
+ test_md5(&t)
+ test_sha1(&t)
+ test_sha224(&t)
+ test_sha256(&t)
+ test_sha384(&t)
+ test_sha512(&t)
+ test_sha3_224(&t)
+ test_sha3_256(&t)
+ test_sha3_384(&t)
+ test_sha3_512(&t)
+ test_shake_128(&t)
+ test_shake_256(&t)
+ test_keccak_224(&t)
+ test_keccak_256(&t)
+ test_keccak_384(&t)
+ test_keccak_512(&t)
+ test_whirlpool(&t)
+ test_gost(&t)
+ test_streebog_256(&t)
+ test_streebog_512(&t)
+ test_blake_224(&t)
+ test_blake_256(&t)
+ test_blake_384(&t)
+ test_blake_512(&t)
+ test_blake2b(&t)
+ test_blake2s(&t)
+ test_ripemd_128(&t)
+ test_ripemd_160(&t)
+ test_ripemd_256(&t)
+ test_ripemd_320(&t)
+ test_tiger_128(&t)
+ test_tiger_160(&t)
+ test_tiger_192(&t)
+ test_tiger2_128(&t)
+ test_tiger2_160(&t)
+ test_tiger2_192(&t)
+ test_sm3(&t)
+ test_jh_224(&t)
+ test_jh_256(&t)
+ test_jh_384(&t)
+ test_jh_512(&t)
+ test_groestl_224(&t)
+ test_groestl_256(&t)
+ test_groestl_384(&t)
+ test_groestl_512(&t)
+ test_haval_128(&t)
+ test_haval_160(&t)
+ test_haval_192(&t)
+ test_haval_224(&t)
+ test_haval_256(&t)
+ test_siphash_2_4(&t)
+
+ // "modern" crypto tests
+ test_chacha20(&t)
+ test_poly1305(&t)
+ test_chacha20poly1305(&t)
+ test_x25519(&t)
+ test_rand_bytes(&t)
+
+ bench_modern(&t)
+
+ fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
TestHash :: struct {
- hash: string,
- str: string,
+ hash: string,
+ str: string,
}
hex_string :: proc(bytes: []byte, allocator := context.temp_allocator) -> string {
- lut: [16]byte = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}
- buf := make([]byte, len(bytes) * 2, allocator)
- for i := 0; i < len(bytes); i += 1 {
- buf[i * 2 + 0] = lut[bytes[i] >> 4 & 0xf]
- buf[i * 2 + 1] = lut[bytes[i] & 0xf]
- }
- return string(buf)
+ lut: [16]byte = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}
+ buf := make([]byte, len(bytes) * 2, allocator)
+ for i := 0; i < len(bytes); i += 1 {
+ buf[i * 2 + 0] = lut[bytes[i] >> 4 & 0xf]
+ buf[i * 2 + 1] = lut[bytes[i] & 0xf]
+ }
+ return string(buf)
}
@(test)
test_md2 :: proc(t: ^testing.T) {
- // Official test vectors from https://datatracker.ietf.org/doc/html/rfc1319
- test_vectors := [?]TestHash {
- TestHash{"8350e5a3e24c153df2275c9f80692773", ""},
- TestHash{"32ec01ec4a6dac72c0ab96fb34c0b5d1", "a"},
- TestHash{"da853b0d3f88d99b30283a69e6ded6bb", "abc"},
- TestHash{"ab4f496bfb2a530b219ff33031fe06b0", "message digest"},
- TestHash{"4e8ddff3650292ab5a4108c3aa47940b", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"da33def2a42df13975352846c30338cd", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- TestHash{"d5976f79d83d3a0dc9806c3c66f3efd8", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := md2.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Official test vectors from https://datatracker.ietf.org/doc/html/rfc1319
+ test_vectors := [?]TestHash {
+ TestHash{"8350e5a3e24c153df2275c9f80692773", ""},
+ TestHash{"32ec01ec4a6dac72c0ab96fb34c0b5d1", "a"},
+ TestHash{"da853b0d3f88d99b30283a69e6ded6bb", "abc"},
+ TestHash{"ab4f496bfb2a530b219ff33031fe06b0", "message digest"},
+ TestHash{"4e8ddff3650292ab5a4108c3aa47940b", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"da33def2a42df13975352846c30338cd", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ TestHash{"d5976f79d83d3a0dc9806c3c66f3efd8", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := md2.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_md4 :: proc(t: ^testing.T) {
- // Official test vectors from https://datatracker.ietf.org/doc/html/rfc1320
- test_vectors := [?]TestHash {
- TestHash{"31d6cfe0d16ae931b73c59d7e0c089c0", ""},
- TestHash{"bde52cb31de33e46245e05fbdbd6fb24", "a"},
- TestHash{"a448017aaf21d8525fc10ae87aa6729d", "abc"},
- TestHash{"d9130a8164549fe818874806e1c7014b", "message digest"},
- TestHash{"d79e1c308aa5bbcdeea8ed63df412da9", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"043f8582f241db351ce627e153e7f0e4", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- TestHash{"e33b4ddc9c38f2199c3e7b164fcc0536", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := md4.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Official test vectors from https://datatracker.ietf.org/doc/html/rfc1320
+ test_vectors := [?]TestHash {
+ TestHash{"31d6cfe0d16ae931b73c59d7e0c089c0", ""},
+ TestHash{"bde52cb31de33e46245e05fbdbd6fb24", "a"},
+ TestHash{"a448017aaf21d8525fc10ae87aa6729d", "abc"},
+ TestHash{"d9130a8164549fe818874806e1c7014b", "message digest"},
+ TestHash{"d79e1c308aa5bbcdeea8ed63df412da9", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"043f8582f241db351ce627e153e7f0e4", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ TestHash{"e33b4ddc9c38f2199c3e7b164fcc0536", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := md4.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_md5 :: proc(t: ^testing.T) {
- // Official test vectors from https://datatracker.ietf.org/doc/html/rfc1321
- test_vectors := [?]TestHash {
- TestHash{"d41d8cd98f00b204e9800998ecf8427e", ""},
- TestHash{"0cc175b9c0f1b6a831c399e269772661", "a"},
- TestHash{"900150983cd24fb0d6963f7d28e17f72", "abc"},
- TestHash{"f96b697d7cb7938d525a2f31aaf161d0", "message digest"},
- TestHash{"c3fcd3d76192e4007dfb496cca67e13b", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"d174ab98d277d9f5a5611c2c9f419d9f", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- TestHash{"57edf4a22be3c955ac49da2e2107b67a", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := md5.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Official test vectors from https://datatracker.ietf.org/doc/html/rfc1321
+ test_vectors := [?]TestHash {
+ TestHash{"d41d8cd98f00b204e9800998ecf8427e", ""},
+ TestHash{"0cc175b9c0f1b6a831c399e269772661", "a"},
+ TestHash{"900150983cd24fb0d6963f7d28e17f72", "abc"},
+ TestHash{"f96b697d7cb7938d525a2f31aaf161d0", "message digest"},
+ TestHash{"c3fcd3d76192e4007dfb496cca67e13b", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"d174ab98d277d9f5a5611c2c9f419d9f", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ TestHash{"57edf4a22be3c955ac49da2e2107b67a", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := md5.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha1 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"da39a3ee5e6b4b0d3255bfef95601890afd80709", ""},
- TestHash{"a9993e364706816aba3e25717850c26c9cd0d89d", "abc"},
- TestHash{"f9537c23893d2014f365adf8ffe33b8eb0297ed1", "abcdbcdecdefdefgefghfghighijhi"},
- TestHash{"346fb528a24b48f563cb061470bcfd23740427ad", "jkijkljklmklmnlmnomnopnopq"},
- TestHash{"86f7e437faa5a7fce15d1ddcb9eaeaea377667b8", "a"},
- TestHash{"c729c8996ee0a6f74f4f3248e8957edf704fb624", "01234567012345670123456701234567"},
- TestHash{"84983e441c3bd26ebaae4aa1f95129e5e54670f1", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"a49b2446a02c645bf419f995b67091253a04a259", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha1.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"da39a3ee5e6b4b0d3255bfef95601890afd80709", ""},
+ TestHash{"a9993e364706816aba3e25717850c26c9cd0d89d", "abc"},
+ TestHash{"f9537c23893d2014f365adf8ffe33b8eb0297ed1", "abcdbcdecdefdefgefghfghighijhi"},
+ TestHash{"346fb528a24b48f563cb061470bcfd23740427ad", "jkijkljklmklmnlmnomnopnopq"},
+ TestHash{"86f7e437faa5a7fce15d1ddcb9eaeaea377667b8", "a"},
+ TestHash{"c729c8996ee0a6f74f4f3248e8957edf704fb624", "01234567012345670123456701234567"},
+ TestHash{"84983e441c3bd26ebaae4aa1f95129e5e54670f1", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"a49b2446a02c645bf419f995b67091253a04a259", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha1.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha224 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", ""},
- TestHash{"23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", "abc"},
- TestHash{"75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"c97ca9a559850ce97a04a96def6d99a9e0e0e2ab14e6b8df265fc0b3", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha2.hash_224(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", ""},
+ TestHash{"23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", "abc"},
+ TestHash{"75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"c97ca9a559850ce97a04a96def6d99a9e0e0e2ab14e6b8df265fc0b3", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha2.hash_224(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha256 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", ""},
- TestHash{"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "abc"},
- TestHash{"248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha2.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", ""},
+ TestHash{"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "abc"},
+ TestHash{"248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha2.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha384 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b", ""},
- TestHash{"cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7", "abc"},
- TestHash{"3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6b0455a8520bc4e6f5fe95b1fe3c8452b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha2.hash_384(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b", ""},
+ TestHash{"cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7", "abc"},
+ TestHash{"3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6b0455a8520bc4e6f5fe95b1fe3c8452b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha2.hash_384(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha512 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", ""},
- TestHash{"ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f", "abc"},
- TestHash{"204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha2.hash_512(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", ""},
+ TestHash{"ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f", "abc"},
+ TestHash{"204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha2.hash_512(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha3_224 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7", ""},
- TestHash{"e642824c3f8cf24ad09234ee7d3c766fc9a3a5168d0c94ad73b46fdf", "abc"},
- TestHash{"10241ac5187380bd501192e4e56b5280908727dd8fe0d10d4e5ad91e", "abcdbcdecdefdefgefghfghighijhi"},
- TestHash{"fd645fe07d814c397e85e85f92fe58b949f55efa4d3468b2468da45a", "jkijkljklmklmnlmnomnopnopq"},
- TestHash{"9e86ff69557ca95f405f081269685b38e3a819b309ee942f482b6a8b", "a"},
- TestHash{"6961f694b2ff3ed6f0c830d2c66da0c5e7ca9445f7c0dca679171112", "01234567012345670123456701234567"},
- TestHash{"8a24108b154ada21c9fd5574494479ba5c7e7ab76ef264ead0fcce33", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"543e6868e1666c1a643630df77367ae5a62a85070a51c14cbf665cbc", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha3.hash_224(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7", ""},
+ TestHash{"e642824c3f8cf24ad09234ee7d3c766fc9a3a5168d0c94ad73b46fdf", "abc"},
+ TestHash{"10241ac5187380bd501192e4e56b5280908727dd8fe0d10d4e5ad91e", "abcdbcdecdefdefgefghfghighijhi"},
+ TestHash{"fd645fe07d814c397e85e85f92fe58b949f55efa4d3468b2468da45a", "jkijkljklmklmnlmnomnopnopq"},
+ TestHash{"9e86ff69557ca95f405f081269685b38e3a819b309ee942f482b6a8b", "a"},
+ TestHash{"6961f694b2ff3ed6f0c830d2c66da0c5e7ca9445f7c0dca679171112", "01234567012345670123456701234567"},
+ TestHash{"8a24108b154ada21c9fd5574494479ba5c7e7ab76ef264ead0fcce33", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"543e6868e1666c1a643630df77367ae5a62a85070a51c14cbf665cbc", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha3.hash_224(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha3_256 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a", ""},
- TestHash{"3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532", "abc"},
- TestHash{"565ada1ced21278cfaffdde00dea0107964121ac25e4e978abc59412be74550a", "abcdbcdecdefdefgefghfghighijhi"},
- TestHash{"8cc1709d520f495ce972ece48b0d2e1f74ec80d53bc5c47457142158fae15d98", "jkijkljklmklmnlmnomnopnopq"},
- TestHash{"80084bf2fba02475726feb2cab2d8215eab14bc6bdd8bfb2c8151257032ecd8b", "a"},
- TestHash{"e4786de5f88f7d374b7288f225ea9f2f7654da200bab5d417e1fb52d49202767", "01234567012345670123456701234567"},
- TestHash{"41c0dba2a9d6240849100376a8235e2c82e1b9998a999e21db32dd97496d3376", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"916f6061fe879741ca6469b43971dfdb28b1a32dc36cb3254e812be27aad1d18", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha3.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a", ""},
+ TestHash{"3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532", "abc"},
+ TestHash{"565ada1ced21278cfaffdde00dea0107964121ac25e4e978abc59412be74550a", "abcdbcdecdefdefgefghfghighijhi"},
+ TestHash{"8cc1709d520f495ce972ece48b0d2e1f74ec80d53bc5c47457142158fae15d98", "jkijkljklmklmnlmnomnopnopq"},
+ TestHash{"80084bf2fba02475726feb2cab2d8215eab14bc6bdd8bfb2c8151257032ecd8b", "a"},
+ TestHash{"e4786de5f88f7d374b7288f225ea9f2f7654da200bab5d417e1fb52d49202767", "01234567012345670123456701234567"},
+ TestHash{"41c0dba2a9d6240849100376a8235e2c82e1b9998a999e21db32dd97496d3376", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"916f6061fe879741ca6469b43971dfdb28b1a32dc36cb3254e812be27aad1d18", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha3.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha3_384 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004", ""},
- TestHash{"ec01498288516fc926459f58e2c6ad8df9b473cb0fc08c2596da7cf0e49be4b298d88cea927ac7f539f1edf228376d25", "abc"},
- TestHash{"9aa92dbb716ebb573def0d5e3cdd28d6add38ada310b602b8916e690a3257b7144e5ddd3d0dbbc559c48480d34d57a9a", "abcdbcdecdefdefgefghfghighijhi"},
- TestHash{"77c90323d7392bcdee8a3e7f74f19f47b7d1b1a825ac6a2d8d882a72317879cc26597035f1fc24fe65090b125a691282", "jkijkljklmklmnlmnomnopnopq"},
- TestHash{"1815f774f320491b48569efec794d249eeb59aae46d22bf77dafe25c5edc28d7ea44f93ee1234aa88f61c91912a4ccd9", "a"},
- TestHash{"51072590ad4c51b27ff8265590d74f92de7cc55284168e414ca960087c693285b08a283c6b19d77632994cb9eb93f1be", "01234567012345670123456701234567"},
- TestHash{"991c665755eb3a4b6bbdfb75c78a492e8c56a22c5c4d7e429bfdbc32b9d4ad5aa04a1f076e62fea19eef51acd0657c22", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"79407d3b5916b59c3e30b09822974791c313fb9ecc849e406f23592d04f625dc8c709b98b43b3852b337216179aa7fc7", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha3.hash_384(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004", ""},
+ TestHash{"ec01498288516fc926459f58e2c6ad8df9b473cb0fc08c2596da7cf0e49be4b298d88cea927ac7f539f1edf228376d25", "abc"},
+ TestHash{"9aa92dbb716ebb573def0d5e3cdd28d6add38ada310b602b8916e690a3257b7144e5ddd3d0dbbc559c48480d34d57a9a", "abcdbcdecdefdefgefghfghighijhi"},
+ TestHash{"77c90323d7392bcdee8a3e7f74f19f47b7d1b1a825ac6a2d8d882a72317879cc26597035f1fc24fe65090b125a691282", "jkijkljklmklmnlmnomnopnopq"},
+ TestHash{"1815f774f320491b48569efec794d249eeb59aae46d22bf77dafe25c5edc28d7ea44f93ee1234aa88f61c91912a4ccd9", "a"},
+ TestHash{"51072590ad4c51b27ff8265590d74f92de7cc55284168e414ca960087c693285b08a283c6b19d77632994cb9eb93f1be", "01234567012345670123456701234567"},
+ TestHash{"991c665755eb3a4b6bbdfb75c78a492e8c56a22c5c4d7e429bfdbc32b9d4ad5aa04a1f076e62fea19eef51acd0657c22", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"79407d3b5916b59c3e30b09822974791c313fb9ecc849e406f23592d04f625dc8c709b98b43b3852b337216179aa7fc7", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha3.hash_384(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sha3_512 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26", ""},
- TestHash{"b751850b1a57168a5693cd924b6b096e08f621827444f70d884f5d0240d2712e10e116e9192af3c91a7ec57647e3934057340b4cf408d5a56592f8274eec53f0", "abc"},
- TestHash{"9f9a327944a35988d67effc4fa748b3c07744f736ac70b479d8e12a3d10d6884d00a7ef593690305462e9e9030a67c51636fd346fd8fa0ee28a5ac2aee103d2e", "abcdbcdecdefdefgefghfghighijhi"},
- TestHash{"dbb124a0deda966eb4d199d0844fa0beb0770ea1ccddabcd335a7939a931ac6fb4fa6aebc6573f462ced2e4e7178277803be0d24d8bc2864626d9603109b7891", "jkijkljklmklmnlmnomnopnopq"},
- TestHash{"697f2d856172cb8309d6b8b97dac4de344b549d4dee61edfb4962d8698b7fa803f4f93ff24393586e28b5b957ac3d1d369420ce53332712f997bd336d09ab02a", "a"},
- TestHash{"5679e353bc8eeea3e801ca60448b249bcfd3ac4a6c3abe429a807bcbd4c9cd12da87a5a9dc74fde64c0d44718632cae966b078397c6f9ec155c6a238f2347cf1", "01234567012345670123456701234567"},
- TestHash{"04a371e84ecfb5b8b77cb48610fca8182dd457ce6f326a0fd3d7ec2f1e91636dee691fbe0c985302ba1b0d8dc78c086346b533b49c030d99a27daf1139d6e75e", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"afebb2ef542e6579c50cad06d2e578f9f8dd6881d7dc824d26360feebf18a4fa73e3261122948efcfd492e74e82e2189ed0fb440d187f382270cb455f21dd185", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
- }
- for v, _ in test_vectors {
- computed := sha3.hash_512(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26", ""},
+ TestHash{"b751850b1a57168a5693cd924b6b096e08f621827444f70d884f5d0240d2712e10e116e9192af3c91a7ec57647e3934057340b4cf408d5a56592f8274eec53f0", "abc"},
+ TestHash{"9f9a327944a35988d67effc4fa748b3c07744f736ac70b479d8e12a3d10d6884d00a7ef593690305462e9e9030a67c51636fd346fd8fa0ee28a5ac2aee103d2e", "abcdbcdecdefdefgefghfghighijhi"},
+ TestHash{"dbb124a0deda966eb4d199d0844fa0beb0770ea1ccddabcd335a7939a931ac6fb4fa6aebc6573f462ced2e4e7178277803be0d24d8bc2864626d9603109b7891", "jkijkljklmklmnlmnomnopnopq"},
+ TestHash{"697f2d856172cb8309d6b8b97dac4de344b549d4dee61edfb4962d8698b7fa803f4f93ff24393586e28b5b957ac3d1d369420ce53332712f997bd336d09ab02a", "a"},
+ TestHash{"5679e353bc8eeea3e801ca60448b249bcfd3ac4a6c3abe429a807bcbd4c9cd12da87a5a9dc74fde64c0d44718632cae966b078397c6f9ec155c6a238f2347cf1", "01234567012345670123456701234567"},
+ TestHash{"04a371e84ecfb5b8b77cb48610fca8182dd457ce6f326a0fd3d7ec2f1e91636dee691fbe0c985302ba1b0d8dc78c086346b533b49c030d99a27daf1139d6e75e", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"afebb2ef542e6579c50cad06d2e578f9f8dd6881d7dc824d26360feebf18a4fa73e3261122948efcfd492e74e82e2189ed0fb440d187f382270cb455f21dd185", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"},
+ }
+ for v, _ in test_vectors {
+ computed := sha3.hash_512(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_shake_128 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"7f9c2ba4e88f827d616045507605853e", ""},
- TestHash{"f4202e3c5852f9182a0430fd8144f0a7", "The quick brown fox jumps over the lazy dog"},
- TestHash{"853f4538be0db9621a6cea659a06c110", "The quick brown fox jumps over the lazy dof"},
- }
- for v, _ in test_vectors {
- computed := shake.hash_128(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"7f9c2ba4e88f827d616045507605853e", ""},
+ TestHash{"f4202e3c5852f9182a0430fd8144f0a7", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"853f4538be0db9621a6cea659a06c110", "The quick brown fox jumps over the lazy dof"},
+ }
+ for v, _ in test_vectors {
+ computed := shake.hash_128(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_shake_256 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"46b9dd2b0ba88d13233b3feb743eeb243fcd52ea62b81b82b50c27646ed5762f", ""},
- TestHash{"2f671343d9b2e1604dc9dcf0753e5fe15c7c64a0d283cbbf722d411a0e36f6ca", "The quick brown fox jumps over the lazy dog"},
- TestHash{"46b1ebb2e142c38b9ac9081bef72877fe4723959640fa57119b366ce6899d401", "The quick brown fox jumps over the lazy dof"},
- }
- for v, _ in test_vectors {
- computed := shake.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"46b9dd2b0ba88d13233b3feb743eeb243fcd52ea62b81b82b50c27646ed5762f", ""},
+ TestHash{"2f671343d9b2e1604dc9dcf0753e5fe15c7c64a0d283cbbf722d411a0e36f6ca", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"46b1ebb2e142c38b9ac9081bef72877fe4723959640fa57119b366ce6899d401", "The quick brown fox jumps over the lazy dof"},
+ }
+ for v, _ in test_vectors {
+ computed := shake.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_keccak_224 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"f71837502ba8e10837bdd8d365adb85591895602fc552b48b7390abd", ""},
- TestHash{"c30411768506ebe1c2871b1ee2e87d38df342317300a9b97a95ec6a8", "abc"},
- }
- for v, _ in test_vectors {
- computed := keccak.hash_224(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"f71837502ba8e10837bdd8d365adb85591895602fc552b48b7390abd", ""},
+ TestHash{"c30411768506ebe1c2871b1ee2e87d38df342317300a9b97a95ec6a8", "abc"},
+ }
+ for v, _ in test_vectors {
+ computed := keccak.hash_224(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_keccak_256 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", ""},
- TestHash{"4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45", "abc"},
- }
- for v, _ in test_vectors {
- computed := keccak.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", ""},
+ TestHash{"4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45", "abc"},
+ }
+ for v, _ in test_vectors {
+ computed := keccak.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_keccak_384 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"2c23146a63a29acf99e73b88f8c24eaa7dc60aa771780ccc006afbfa8fe2479b2dd2b21362337441ac12b515911957ff", ""},
- TestHash{"f7df1165f033337be098e7d288ad6a2f74409d7a60b49c36642218de161b1f99f8c681e4afaf31a34db29fb763e3c28e", "abc"},
- }
- for v, _ in test_vectors {
- computed := keccak.hash_384(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"2c23146a63a29acf99e73b88f8c24eaa7dc60aa771780ccc006afbfa8fe2479b2dd2b21362337441ac12b515911957ff", ""},
+ TestHash{"f7df1165f033337be098e7d288ad6a2f74409d7a60b49c36642218de161b1f99f8c681e4afaf31a34db29fb763e3c28e", "abc"},
+ }
+ for v, _ in test_vectors {
+ computed := keccak.hash_384(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_keccak_512 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
- // https://www.di-mgt.com.au/sha_testvectors.html
- test_vectors := [?]TestHash {
- TestHash{"0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e", ""},
- TestHash{"18587dc2ea106b9a1563e32b3312421ca164c7f1f07bc922a9c83d77cea3a1e5d0c69910739025372dc14ac9642629379540c17e2a65b19d77aa511a9d00bb96", "abc"},
- }
- for v, _ in test_vectors {
- computed := keccak.hash_512(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha_all.pdf
+ // https://www.di-mgt.com.au/sha_testvectors.html
+ test_vectors := [?]TestHash {
+ TestHash{"0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e", ""},
+ TestHash{"18587dc2ea106b9a1563e32b3312421ca164c7f1f07bc922a9c83d77cea3a1e5d0c69910739025372dc14ac9642629379540c17e2a65b19d77aa511a9d00bb96", "abc"},
+ }
+ for v, _ in test_vectors {
+ computed := keccak.hash_512(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_whirlpool :: proc(t: ^testing.T) {
- // Test vectors from
- // https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
- test_vectors := [?]TestHash {
- TestHash{"19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3", ""},
- TestHash{"8aca2602792aec6f11a67206531fb7d7f0dff59413145e6973c45001d0087b42d11bc645413aeff63a42391a39145a591a92200d560195e53b478584fdae231a", "a"},
- TestHash{"33e24e6cbebf168016942df8a7174048f9cebc45cbd829c3b94b401a498acb11c5abcca7f2a1238aaf534371e87a4e4b19758965d5a35a7cad87cf5517043d97", "ab"},
- TestHash{"4e2448a4c6f486bb16b6562c73b4020bf3043e3a731bce721ae1b303d97e6d4c7181eebdb6c57e277d0e34957114cbd6c797fc9d95d8b582d225292076d4eef5", "abc"},
- TestHash{"bda164f0b930c43a1bacb5df880b205d15ac847add35145bf25d991ae74f0b72b1ac794f8aacda5fcb3c47038c954742b1857b5856519de4d1e54bfa2fa4eac5", "abcd"},
- TestHash{"5d745e26ccb20fe655d39c9e7f69455758fbae541cb892b3581e4869244ab35b4fd6078f5d28b1f1a217452a67d9801033d92724a221255a5e377fe9e9e5f0b2", "abcde"},
- TestHash{"a73e425459567308ba5f9eb2ae23570d0d0575eb1357ecf6ac88d4e0358b0ac3ea2371261f5d4c070211784b525911b9eec0ad968429bb7c7891d341cff4e811", "abcdef"},
- TestHash{"08b388f68fd3eb51906ac3d3c699b8e9c3ac65d7ceb49d2e34f8a482cbc3082bc401cead90e85a97b8647c948bf35e448740b79659f3bee42145f0bd653d1f25", "abcdefg"},
- TestHash{"1f1a84d30612820243afe2022712f9dac6d07c4c8bb41b40eacab0184c8d82275da5bcadbb35c7ca1960ff21c90acbae8c14e48d9309e4819027900e882c7ad9", "abcdefgh"},
- TestHash{"11882bc9a31ac1cf1c41dcd9fd6fdd3ccdb9b017fc7f4582680134f314d7bb49af4c71f5a920bc0a6a3c1ff9a00021bf361d9867fe636b0bc1da1552e4237de4", "abcdefghi"},
- TestHash{"717163de24809ffcf7ff6d5aba72b8d67c2129721953c252a4ddfb107614be857cbd76a9d5927de14633d6bdc9ddf335160b919db5c6f12cb2e6549181912eef", "abcdefghij"},
- TestHash{"b97de512e91e3828b40d2b0fdce9ceb3c4a71f9bea8d88e75c4fa854df36725fd2b52eb6544edcacd6f8beddfea403cb55ae31f03ad62a5ef54e42ee82c3fb35", "The quick brown fox jumps over the lazy dog"},
- TestHash{"c27ba124205f72e6847f3e19834f925cc666d0974167af915bb462420ed40cc50900d85a1f923219d832357750492d5c143011a76988344c2635e69d06f2d38c", "The quick brown fox jumps over the lazy eog"},
- }
- for v, _ in test_vectors {
- computed := whirlpool.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
+ test_vectors := [?]TestHash {
+ TestHash{"19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3", ""},
+ TestHash{"8aca2602792aec6f11a67206531fb7d7f0dff59413145e6973c45001d0087b42d11bc645413aeff63a42391a39145a591a92200d560195e53b478584fdae231a", "a"},
+ TestHash{"33e24e6cbebf168016942df8a7174048f9cebc45cbd829c3b94b401a498acb11c5abcca7f2a1238aaf534371e87a4e4b19758965d5a35a7cad87cf5517043d97", "ab"},
+ TestHash{"4e2448a4c6f486bb16b6562c73b4020bf3043e3a731bce721ae1b303d97e6d4c7181eebdb6c57e277d0e34957114cbd6c797fc9d95d8b582d225292076d4eef5", "abc"},
+ TestHash{"bda164f0b930c43a1bacb5df880b205d15ac847add35145bf25d991ae74f0b72b1ac794f8aacda5fcb3c47038c954742b1857b5856519de4d1e54bfa2fa4eac5", "abcd"},
+ TestHash{"5d745e26ccb20fe655d39c9e7f69455758fbae541cb892b3581e4869244ab35b4fd6078f5d28b1f1a217452a67d9801033d92724a221255a5e377fe9e9e5f0b2", "abcde"},
+ TestHash{"a73e425459567308ba5f9eb2ae23570d0d0575eb1357ecf6ac88d4e0358b0ac3ea2371261f5d4c070211784b525911b9eec0ad968429bb7c7891d341cff4e811", "abcdef"},
+ TestHash{"08b388f68fd3eb51906ac3d3c699b8e9c3ac65d7ceb49d2e34f8a482cbc3082bc401cead90e85a97b8647c948bf35e448740b79659f3bee42145f0bd653d1f25", "abcdefg"},
+ TestHash{"1f1a84d30612820243afe2022712f9dac6d07c4c8bb41b40eacab0184c8d82275da5bcadbb35c7ca1960ff21c90acbae8c14e48d9309e4819027900e882c7ad9", "abcdefgh"},
+ TestHash{"11882bc9a31ac1cf1c41dcd9fd6fdd3ccdb9b017fc7f4582680134f314d7bb49af4c71f5a920bc0a6a3c1ff9a00021bf361d9867fe636b0bc1da1552e4237de4", "abcdefghi"},
+ TestHash{"717163de24809ffcf7ff6d5aba72b8d67c2129721953c252a4ddfb107614be857cbd76a9d5927de14633d6bdc9ddf335160b919db5c6f12cb2e6549181912eef", "abcdefghij"},
+ TestHash{"b97de512e91e3828b40d2b0fdce9ceb3c4a71f9bea8d88e75c4fa854df36725fd2b52eb6544edcacd6f8beddfea403cb55ae31f03ad62a5ef54e42ee82c3fb35", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"c27ba124205f72e6847f3e19834f925cc666d0974167af915bb462420ed40cc50900d85a1f923219d832357750492d5c143011a76988344c2635e69d06f2d38c", "The quick brown fox jumps over the lazy eog"},
+ }
+ for v, _ in test_vectors {
+ computed := whirlpool.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_gost :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"981e5f3ca30c841487830f84fb433e13ac1101569b9c13584ac483234cd656c0", ""},
- TestHash{"e74c52dd282183bf37af0079c9f78055715a103f17e3133ceff1aacf2f403011", "a"},
- TestHash{"b285056dbf18d7392d7677369524dd14747459ed8143997e163b2986f92fd42c", "abc"},
- TestHash{"bc6041dd2aa401ebfa6e9886734174febdb4729aa972d60f549ac39b29721ba0", "message digest"},
- TestHash{"9004294a361a508c586fe53d1f1b02746765e71b765472786e4770d565830a76", "The quick brown fox jumps over the lazy dog"},
- TestHash{"73b70a39497de53a6e08c67b6d4db853540f03e9389299d9b0156ef7e85d0f61", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- TestHash{"6bc7b38989b28cf93ae8842bf9d752905910a7528a61e5bce0782de43e610c90", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- TestHash{"2cefc2f7b7bdc514e18ea57fa74ff357e7fa17d652c75f69cb1be7893ede48eb", "This is message, length=32 bytes"},
- TestHash{"c3730c5cbccacf915ac292676f21e8bd4ef75331d9405e5f1a61dc3130a65011", "Suppose the original message has length = 50 bytes"},
- }
- for v, _ in test_vectors {
- computed := gost.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"981e5f3ca30c841487830f84fb433e13ac1101569b9c13584ac483234cd656c0", ""},
+ TestHash{"e74c52dd282183bf37af0079c9f78055715a103f17e3133ceff1aacf2f403011", "a"},
+ TestHash{"b285056dbf18d7392d7677369524dd14747459ed8143997e163b2986f92fd42c", "abc"},
+ TestHash{"bc6041dd2aa401ebfa6e9886734174febdb4729aa972d60f549ac39b29721ba0", "message digest"},
+ TestHash{"9004294a361a508c586fe53d1f1b02746765e71b765472786e4770d565830a76", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"73b70a39497de53a6e08c67b6d4db853540f03e9389299d9b0156ef7e85d0f61", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ TestHash{"6bc7b38989b28cf93ae8842bf9d752905910a7528a61e5bce0782de43e610c90", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ TestHash{"2cefc2f7b7bdc514e18ea57fa74ff357e7fa17d652c75f69cb1be7893ede48eb", "This is message, length=32 bytes"},
+ TestHash{"c3730c5cbccacf915ac292676f21e8bd4ef75331d9405e5f1a61dc3130a65011", "Suppose the original message has length = 50 bytes"},
+ }
+ for v, _ in test_vectors {
+ computed := gost.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_streebog_256 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"3f539a213e97c802cc229d474c6aa32a825a360b2a933a949fd925208d9ce1bb", ""},
- TestHash{"3e7dea7f2384b6c5a3d0e24aaa29c05e89ddd762145030ec22c71a6db8b2c1f4", "The quick brown fox jumps over the lazy dog"},
- TestHash{"36816a824dcbe7d6171aa58500741f2ea2757ae2e1784ab72c5c3c6c198d71da", "The quick brown fox jumps over the lazy dog."},
- }
- for v, _ in test_vectors {
- computed := streebog.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"3f539a213e97c802cc229d474c6aa32a825a360b2a933a949fd925208d9ce1bb", ""},
+ TestHash{"3e7dea7f2384b6c5a3d0e24aaa29c05e89ddd762145030ec22c71a6db8b2c1f4", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"36816a824dcbe7d6171aa58500741f2ea2757ae2e1784ab72c5c3c6c198d71da", "The quick brown fox jumps over the lazy dog."},
+ }
+ for v, _ in test_vectors {
+ computed := streebog.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_streebog_512 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"8e945da209aa869f0455928529bcae4679e9873ab707b55315f56ceb98bef0a7362f715528356ee83cda5f2aac4c6ad2ba3a715c1bcd81cb8e9f90bf4c1c1a8a", ""},
- TestHash{"d2b793a0bb6cb5904828b5b6dcfb443bb8f33efc06ad09368878ae4cdc8245b97e60802469bed1e7c21a64ff0b179a6a1e0bb74d92965450a0adab69162c00fe", "The quick brown fox jumps over the lazy dog"},
- TestHash{"fe0c42f267d921f940faa72bd9fcf84f9f1bd7e9d055e9816e4c2ace1ec83be82d2957cd59b86e123d8f5adee80b3ca08a017599a9fc1a14d940cf87c77df070", "The quick brown fox jumps over the lazy dog."},
- }
- for v, _ in test_vectors {
- computed := streebog.hash_512(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"8e945da209aa869f0455928529bcae4679e9873ab707b55315f56ceb98bef0a7362f715528356ee83cda5f2aac4c6ad2ba3a715c1bcd81cb8e9f90bf4c1c1a8a", ""},
+ TestHash{"d2b793a0bb6cb5904828b5b6dcfb443bb8f33efc06ad09368878ae4cdc8245b97e60802469bed1e7c21a64ff0b179a6a1e0bb74d92965450a0adab69162c00fe", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"fe0c42f267d921f940faa72bd9fcf84f9f1bd7e9d055e9816e4c2ace1ec83be82d2957cd59b86e123d8f5adee80b3ca08a017599a9fc1a14d940cf87c77df070", "The quick brown fox jumps over the lazy dog."},
+ }
+ for v, _ in test_vectors {
+ computed := streebog.hash_512(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_blake_224 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"7dc5313b1c04512a174bd6503b89607aecbee0903d40a8a569c94eed", ""},
- TestHash{"304c27fdbf308aea06955e331adc6814223a21fccd24c09fde9eda7b", "ube"},
- TestHash{"cfb6848add73e1cb47994c4765df33b8f973702705a30a71fe4747a3", "BLAKE"},
- }
- for v, _ in test_vectors {
- computed := blake.hash_224(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"7dc5313b1c04512a174bd6503b89607aecbee0903d40a8a569c94eed", ""},
+ TestHash{"304c27fdbf308aea06955e331adc6814223a21fccd24c09fde9eda7b", "ube"},
+ TestHash{"cfb6848add73e1cb47994c4765df33b8f973702705a30a71fe4747a3", "BLAKE"},
+ }
+ for v, _ in test_vectors {
+ computed := blake.hash_224(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_blake_256 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"716f6e863f744b9ac22c97ec7b76ea5f5908bc5b2f67c61510bfc4751384ea7a", ""},
- TestHash{"e802fe2a73fbe5853408f051d040aeb3a76a4d7a0fc5c3415d1af090f76a2c81", "ube"},
- TestHash{"07663e00cf96fbc136cf7b1ee099c95346ba3920893d18cc8851f22ee2e36aa6", "BLAKE"},
- }
- for v, _ in test_vectors {
- computed := blake.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"716f6e863f744b9ac22c97ec7b76ea5f5908bc5b2f67c61510bfc4751384ea7a", ""},
+ TestHash{"e802fe2a73fbe5853408f051d040aeb3a76a4d7a0fc5c3415d1af090f76a2c81", "ube"},
+ TestHash{"07663e00cf96fbc136cf7b1ee099c95346ba3920893d18cc8851f22ee2e36aa6", "BLAKE"},
+ }
+ for v, _ in test_vectors {
+ computed := blake.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_blake_384 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"c6cbd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706", ""},
- TestHash{"8f22f120b2b99dd4fd32b98c8c83bd87abd6413f7317be936b1997511247fc68ae781c6f42113224ccbc1567b0e88593", "ube"},
- TestHash{"f28742f7243990875d07e6afcff962edabdf7e9d19ddea6eae31d094c7fa6d9b00c8213a02ddf1e2d9894f3162345d85", "BLAKE"},
- }
- for v, _ in test_vectors {
- computed := blake.hash_384(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"c6cbd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706", ""},
+ TestHash{"8f22f120b2b99dd4fd32b98c8c83bd87abd6413f7317be936b1997511247fc68ae781c6f42113224ccbc1567b0e88593", "ube"},
+ TestHash{"f28742f7243990875d07e6afcff962edabdf7e9d19ddea6eae31d094c7fa6d9b00c8213a02ddf1e2d9894f3162345d85", "BLAKE"},
+ }
+ for v, _ in test_vectors {
+ computed := blake.hash_384(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_blake_512 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"a8cfbbd73726062df0c6864dda65defe58ef0cc52a5625090fa17601e1eecd1b628e94f396ae402a00acc9eab77b4d4c2e852aaaa25a636d80af3fc7913ef5b8", ""},
- TestHash{"49a24ca8f230936f938c19484d46b58f13ea4448ddadafecdf01419b1e1dd922680be2de84069187973ab61b10574da2ee50cbeaade68ea9391c8ec041b76be0", "ube"},
- TestHash{"7bf805d0d8de36802b882e65d0515aa7682a2be97a9d9ec1399f4be2eff7de07684d7099124c8ac81c1c7c200d24ba68c6222e75062e04feb0e9dd589aa6e3b7", "BLAKE"},
- }
- for v, _ in test_vectors {
- computed := blake.hash_512(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"a8cfbbd73726062df0c6864dda65defe58ef0cc52a5625090fa17601e1eecd1b628e94f396ae402a00acc9eab77b4d4c2e852aaaa25a636d80af3fc7913ef5b8", ""},
+ TestHash{"49a24ca8f230936f938c19484d46b58f13ea4448ddadafecdf01419b1e1dd922680be2de84069187973ab61b10574da2ee50cbeaade68ea9391c8ec041b76be0", "ube"},
+ TestHash{"7bf805d0d8de36802b882e65d0515aa7682a2be97a9d9ec1399f4be2eff7de07684d7099124c8ac81c1c7c200d24ba68c6222e75062e04feb0e9dd589aa6e3b7", "BLAKE"},
+ }
+ for v, _ in test_vectors {
+ computed := blake.hash_512(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_blake2b :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce", ""},
- TestHash{"a8add4bdddfd93e4877d2746e62817b116364a1fa7bc148d95090bc7333b3673f82401cf7aa2e4cb1ecd90296e3f14cb5413f8ed77be73045b13914cdcd6a918", "The quick brown fox jumps over the lazy dog"},
- }
- for v, _ in test_vectors {
- computed := blake2b.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce", ""},
+ TestHash{"a8add4bdddfd93e4877d2746e62817b116364a1fa7bc148d95090bc7333b3673f82401cf7aa2e4cb1ecd90296e3f14cb5413f8ed77be73045b13914cdcd6a918", "The quick brown fox jumps over the lazy dog"},
+ }
+ for v, _ in test_vectors {
+ computed := blake2b.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_blake2s :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9", ""},
- TestHash{"606beeec743ccbeff6cbcdf5d5302aa855c256c29b88c8ed331ea1a6bf3c8812", "The quick brown fox jumps over the lazy dog"},
- }
- for v, _ in test_vectors {
- computed := blake2s.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9", ""},
+ TestHash{"606beeec743ccbeff6cbcdf5d5302aa855c256c29b88c8ed331ea1a6bf3c8812", "The quick brown fox jumps over the lazy dog"},
+ }
+ for v, _ in test_vectors {
+ computed := blake2s.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_ripemd_128 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
- test_vectors := [?]TestHash {
- TestHash{"cdf26213a150dc3ecb610f18f6b38b46", ""},
- TestHash{"86be7afa339d0fc7cfc785e72f578d33", "a"},
- TestHash{"c14a12199c66e4ba84636b0f69144c77", "abc"},
- TestHash{"9e327b3d6e523062afc1132d7df9d1b8", "message digest"},
- TestHash{"fd2aa607f71dc8f510714922b371834e", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"a1aa0689d0fafa2ddc22e88b49133a06", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"d1e959eb179c911faea4624c60c5c702", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- }
- for v, _ in test_vectors {
- computed := ripemd.hash_128(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
+ test_vectors := [?]TestHash {
+ TestHash{"cdf26213a150dc3ecb610f18f6b38b46", ""},
+ TestHash{"86be7afa339d0fc7cfc785e72f578d33", "a"},
+ TestHash{"c14a12199c66e4ba84636b0f69144c77", "abc"},
+ TestHash{"9e327b3d6e523062afc1132d7df9d1b8", "message digest"},
+ TestHash{"fd2aa607f71dc8f510714922b371834e", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"a1aa0689d0fafa2ddc22e88b49133a06", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"d1e959eb179c911faea4624c60c5c702", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ }
+ for v, _ in test_vectors {
+ computed := ripemd.hash_128(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_ripemd_160 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
- test_vectors := [?]TestHash {
- TestHash{"9c1185a5c5e9fc54612808977ee8f548b2258d31", ""},
- TestHash{"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", "a"},
- TestHash{"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", "abc"},
- TestHash{"5d0689ef49d2fae572b881b123a85ffa21595f36", "message digest"},
- TestHash{"f71c27109c692c1b56bbdceb5b9d2865b3708dbc", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"12a053384a9c0c88e405a06c27dcf49ada62eb2b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"b0e20b6e3116640286ed3a87a5713079b21f5189", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- }
- for v, _ in test_vectors {
- computed := ripemd.hash_160(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
+ test_vectors := [?]TestHash {
+ TestHash{"9c1185a5c5e9fc54612808977ee8f548b2258d31", ""},
+ TestHash{"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", "a"},
+ TestHash{"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", "abc"},
+ TestHash{"5d0689ef49d2fae572b881b123a85ffa21595f36", "message digest"},
+ TestHash{"f71c27109c692c1b56bbdceb5b9d2865b3708dbc", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"12a053384a9c0c88e405a06c27dcf49ada62eb2b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"b0e20b6e3116640286ed3a87a5713079b21f5189", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ }
+ for v, _ in test_vectors {
+ computed := ripemd.hash_160(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_ripemd_256 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
- test_vectors := [?]TestHash {
- TestHash{"02ba4c4e5f8ecd1877fc52d64d30e37a2d9774fb1e5d026380ae0168e3c5522d", ""},
- TestHash{"f9333e45d857f5d90a91bab70a1eba0cfb1be4b0783c9acfcd883a9134692925", "a"},
- TestHash{"afbd6e228b9d8cbbcef5ca2d03e6dba10ac0bc7dcbe4680e1e42d2e975459b65", "abc"},
- TestHash{"87e971759a1ce47a514d5c914c392c9018c7c46bc14465554afcdf54a5070c0e", "message digest"},
- TestHash{"649d3034751ea216776bf9a18acc81bc7896118a5197968782dd1fd97d8d5133", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"3843045583aac6c8c8d9128573e7a9809afb2a0f34ccc36ea9e72f16f6368e3f", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"5740a408ac16b720b84424ae931cbb1fe363d1d0bf4017f1a89f7ea6de77a0b8", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- }
- for v, _ in test_vectors {
- computed := ripemd.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
+ test_vectors := [?]TestHash {
+ TestHash{"02ba4c4e5f8ecd1877fc52d64d30e37a2d9774fb1e5d026380ae0168e3c5522d", ""},
+ TestHash{"f9333e45d857f5d90a91bab70a1eba0cfb1be4b0783c9acfcd883a9134692925", "a"},
+ TestHash{"afbd6e228b9d8cbbcef5ca2d03e6dba10ac0bc7dcbe4680e1e42d2e975459b65", "abc"},
+ TestHash{"87e971759a1ce47a514d5c914c392c9018c7c46bc14465554afcdf54a5070c0e", "message digest"},
+ TestHash{"649d3034751ea216776bf9a18acc81bc7896118a5197968782dd1fd97d8d5133", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"3843045583aac6c8c8d9128573e7a9809afb2a0f34ccc36ea9e72f16f6368e3f", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"5740a408ac16b720b84424ae931cbb1fe363d1d0bf4017f1a89f7ea6de77a0b8", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ }
+ for v, _ in test_vectors {
+ computed := ripemd.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_ripemd_320 :: proc(t: ^testing.T) {
- // Test vectors from
- // https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
- test_vectors := [?]TestHash {
- TestHash{"22d65d5661536cdc75c1fdf5c6de7b41b9f27325ebc61e8557177d705a0ec880151c3a32a00899b8", ""},
- TestHash{"ce78850638f92658a5a585097579926dda667a5716562cfcf6fbe77f63542f99b04705d6970dff5d", "a"},
- TestHash{"de4c01b3054f8930a79d09ae738e92301e5a17085beffdc1b8d116713e74f82fa942d64cdbc4682d", "abc"},
- TestHash{"3a8e28502ed45d422f68844f9dd316e7b98533fa3f2a91d29f84d425c88d6b4eff727df66a7c0197", "message digest"},
- TestHash{"cabdb1810b92470a2093aa6bce05952c28348cf43ff60841975166bb40ed234004b8824463e6b009", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"d034a7950cf722021ba4b84df769a5de2060e259df4c9bb4a4268c0e935bbc7470a969c9d072a1ac", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"ed544940c86d67f250d232c30b7b3e5770e0c60c8cb9a4cafe3b11388af9920e1b99230b843c86a4", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- }
- for v, _ in test_vectors {
- computed := ripemd.hash_320(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ // Test vectors from
+ // https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
+ test_vectors := [?]TestHash {
+ TestHash{"22d65d5661536cdc75c1fdf5c6de7b41b9f27325ebc61e8557177d705a0ec880151c3a32a00899b8", ""},
+ TestHash{"ce78850638f92658a5a585097579926dda667a5716562cfcf6fbe77f63542f99b04705d6970dff5d", "a"},
+ TestHash{"de4c01b3054f8930a79d09ae738e92301e5a17085beffdc1b8d116713e74f82fa942d64cdbc4682d", "abc"},
+ TestHash{"3a8e28502ed45d422f68844f9dd316e7b98533fa3f2a91d29f84d425c88d6b4eff727df66a7c0197", "message digest"},
+ TestHash{"cabdb1810b92470a2093aa6bce05952c28348cf43ff60841975166bb40ed234004b8824463e6b009", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"d034a7950cf722021ba4b84df769a5de2060e259df4c9bb4a4268c0e935bbc7470a969c9d072a1ac", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"ed544940c86d67f250d232c30b7b3e5770e0c60c8cb9a4cafe3b11388af9920e1b99230b843c86a4", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ }
+ for v, _ in test_vectors {
+ computed := ripemd.hash_320(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_tiger_128 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"3293ac630c13f0245f92bbb1766e1616", ""},
- TestHash{"77befbef2e7ef8ab2ec8f93bf587a7fc", "a"},
- TestHash{"2aab1484e8c158f2bfb8c5ff41b57a52", "abc"},
- TestHash{"d981f8cb78201a950dcf3048751e441c", "message digest"},
- TestHash{"1714a472eee57d30040412bfcc55032a", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"0f7bf9a19b9c58f2b7610df7e84f0ac3", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"8dcea680a17583ee502ba38a3c368651", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- TestHash{"1c14795529fd9f207a958f84c52f11e8", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- TestHash{"6d12a41e72e644f017b6f0e2f7b44c62", "The quick brown fox jumps over the lazy dog"},
- }
- for v, _ in test_vectors {
- computed := tiger.hash_128(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"3293ac630c13f0245f92bbb1766e1616", ""},
+ TestHash{"77befbef2e7ef8ab2ec8f93bf587a7fc", "a"},
+ TestHash{"2aab1484e8c158f2bfb8c5ff41b57a52", "abc"},
+ TestHash{"d981f8cb78201a950dcf3048751e441c", "message digest"},
+ TestHash{"1714a472eee57d30040412bfcc55032a", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"0f7bf9a19b9c58f2b7610df7e84f0ac3", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"8dcea680a17583ee502ba38a3c368651", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ TestHash{"1c14795529fd9f207a958f84c52f11e8", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ TestHash{"6d12a41e72e644f017b6f0e2f7b44c62", "The quick brown fox jumps over the lazy dog"},
+ }
+ for v, _ in test_vectors {
+ computed := tiger.hash_128(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_tiger_160 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"3293ac630c13f0245f92bbb1766e16167a4e5849", ""},
- TestHash{"77befbef2e7ef8ab2ec8f93bf587a7fc613e247f", "a"},
- TestHash{"2aab1484e8c158f2bfb8c5ff41b57a525129131c", "abc"},
- TestHash{"d981f8cb78201a950dcf3048751e441c517fca1a", "message digest"},
- TestHash{"1714a472eee57d30040412bfcc55032a0b11602f", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"0f7bf9a19b9c58f2b7610df7e84f0ac3a71c631e", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"8dcea680a17583ee502ba38a3c368651890ffbcc", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- TestHash{"1c14795529fd9f207a958f84c52f11e887fa0cab", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- TestHash{"6d12a41e72e644f017b6f0e2f7b44c6285f06dd5", "The quick brown fox jumps over the lazy dog"},
- }
- for v, _ in test_vectors {
- computed := tiger.hash_160(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"3293ac630c13f0245f92bbb1766e16167a4e5849", ""},
+ TestHash{"77befbef2e7ef8ab2ec8f93bf587a7fc613e247f", "a"},
+ TestHash{"2aab1484e8c158f2bfb8c5ff41b57a525129131c", "abc"},
+ TestHash{"d981f8cb78201a950dcf3048751e441c517fca1a", "message digest"},
+ TestHash{"1714a472eee57d30040412bfcc55032a0b11602f", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"0f7bf9a19b9c58f2b7610df7e84f0ac3a71c631e", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"8dcea680a17583ee502ba38a3c368651890ffbcc", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ TestHash{"1c14795529fd9f207a958f84c52f11e887fa0cab", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ TestHash{"6d12a41e72e644f017b6f0e2f7b44c6285f06dd5", "The quick brown fox jumps over the lazy dog"},
+ }
+ for v, _ in test_vectors {
+ computed := tiger.hash_160(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_tiger_192 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3", ""},
- TestHash{"77befbef2e7ef8ab2ec8f93bf587a7fc613e247f5f247809", "a"},
- TestHash{"2aab1484e8c158f2bfb8c5ff41b57a525129131c957b5f93", "abc"},
- TestHash{"d981f8cb78201a950dcf3048751e441c517fca1aa55a29f6", "message digest"},
- TestHash{"1714a472eee57d30040412bfcc55032a0b11602ff37beee9", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"0f7bf9a19b9c58f2b7610df7e84f0ac3a71c631e7b53f78e", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"8dcea680a17583ee502ba38a3c368651890ffbccdc49a8cc", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- TestHash{"1c14795529fd9f207a958f84c52f11e887fa0cabdfd91bfd", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- TestHash{"6d12a41e72e644f017b6f0e2f7b44c6285f06dd5d2c5b075", "The quick brown fox jumps over the lazy dog"},
- }
- for v, _ in test_vectors {
- computed := tiger.hash_192(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3", ""},
+ TestHash{"77befbef2e7ef8ab2ec8f93bf587a7fc613e247f5f247809", "a"},
+ TestHash{"2aab1484e8c158f2bfb8c5ff41b57a525129131c957b5f93", "abc"},
+ TestHash{"d981f8cb78201a950dcf3048751e441c517fca1aa55a29f6", "message digest"},
+ TestHash{"1714a472eee57d30040412bfcc55032a0b11602ff37beee9", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"0f7bf9a19b9c58f2b7610df7e84f0ac3a71c631e7b53f78e", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"8dcea680a17583ee502ba38a3c368651890ffbccdc49a8cc", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ TestHash{"1c14795529fd9f207a958f84c52f11e887fa0cabdfd91bfd", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ TestHash{"6d12a41e72e644f017b6f0e2f7b44c6285f06dd5d2c5b075", "The quick brown fox jumps over the lazy dog"},
+ }
+ for v, _ in test_vectors {
+ computed := tiger.hash_192(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_tiger2_128 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"4441be75f6018773c206c22745374b92", ""},
- TestHash{"976abff8062a2e9dcea3a1ace966ed9c", "The quick brown fox jumps over the lazy dog"},
- TestHash{"09c11330283a27efb51930aa7dc1ec62", "The quick brown fox jumps over the lazy cog"},
- }
- for v, _ in test_vectors {
- computed := tiger2.hash_128(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"4441be75f6018773c206c22745374b92", ""},
+ TestHash{"976abff8062a2e9dcea3a1ace966ed9c", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"09c11330283a27efb51930aa7dc1ec62", "The quick brown fox jumps over the lazy cog"},
+ }
+ for v, _ in test_vectors {
+ computed := tiger2.hash_128(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_tiger2_160 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"4441be75f6018773c206c22745374b924aa8313f", ""},
- TestHash{"976abff8062a2e9dcea3a1ace966ed9c19cb8555", "The quick brown fox jumps over the lazy dog"},
- TestHash{"09c11330283a27efb51930aa7dc1ec624ff738a8", "The quick brown fox jumps over the lazy cog"},
- }
- for v, _ in test_vectors {
- computed := tiger2.hash_160(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"4441be75f6018773c206c22745374b924aa8313f", ""},
+ TestHash{"976abff8062a2e9dcea3a1ace966ed9c19cb8555", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"09c11330283a27efb51930aa7dc1ec624ff738a8", "The quick brown fox jumps over the lazy cog"},
+ }
+ for v, _ in test_vectors {
+ computed := tiger2.hash_160(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_tiger2_192 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"4441be75f6018773c206c22745374b924aa8313fef919f41", ""},
- TestHash{"976abff8062a2e9dcea3a1ace966ed9c19cb85558b4976d8", "The quick brown fox jumps over the lazy dog"},
- TestHash{"09c11330283a27efb51930aa7dc1ec624ff738a8d9bdd3df", "The quick brown fox jumps over the lazy cog"},
- }
- for v, _ in test_vectors {
- computed := tiger2.hash_192(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"4441be75f6018773c206c22745374b924aa8313fef919f41", ""},
+ TestHash{"976abff8062a2e9dcea3a1ace966ed9c19cb85558b4976d8", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"09c11330283a27efb51930aa7dc1ec624ff738a8d9bdd3df", "The quick brown fox jumps over the lazy cog"},
+ }
+ for v, _ in test_vectors {
+ computed := tiger2.hash_192(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_sm3 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"1ab21d8355cfa17f8e61194831e81a8f22bec8c728fefb747ed035eb5082aa2b", ""},
- TestHash{"66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0", "abc"},
- TestHash{"debe9ff92275b8a138604889c18e5a4d6fdb70e5387e5765293dcba39c0c5732", "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd"},
- TestHash{"5fdfe814b8573ca021983970fc79b2218c9570369b4859684e2e4c3fc76cb8ea", "The quick brown fox jumps over the lazy dog"},
- TestHash{"ca27d14a42fc04c1e5ecf574a95a8c2d70ecb5805e9b429026ccac8f28b20098", "The quick brown fox jumps over the lazy cog"},
- }
- for v, _ in test_vectors {
- computed := sm3.hash(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"1ab21d8355cfa17f8e61194831e81a8f22bec8c728fefb747ed035eb5082aa2b", ""},
+ TestHash{"66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0", "abc"},
+ TestHash{"debe9ff92275b8a138604889c18e5a4d6fdb70e5387e5765293dcba39c0c5732", "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd"},
+ TestHash{"5fdfe814b8573ca021983970fc79b2218c9570369b4859684e2e4c3fc76cb8ea", "The quick brown fox jumps over the lazy dog"},
+ TestHash{"ca27d14a42fc04c1e5ecf574a95a8c2d70ecb5805e9b429026ccac8f28b20098", "The quick brown fox jumps over the lazy cog"},
+ }
+ for v, _ in test_vectors {
+ computed := sm3.hash(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_jh_224 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"2c99df889b019309051c60fecc2bd285a774940e43175b76b2626630", ""},
- TestHash{"e715f969fb61b203a97e494aab92d91a9cec52f0933436b0d63bf722", "a"},
- TestHash{"c2b1967e635bd55b6a4d36f863ac4a877be302251d68692873007281", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := jh.hash_224(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"2c99df889b019309051c60fecc2bd285a774940e43175b76b2626630", ""},
+ TestHash{"e715f969fb61b203a97e494aab92d91a9cec52f0933436b0d63bf722", "a"},
+ TestHash{"c2b1967e635bd55b6a4d36f863ac4a877be302251d68692873007281", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := jh.hash_224(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_jh_256 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"46e64619c18bb0a92a5e87185a47eef83ca747b8fcc8e1412921357e326df434", ""},
- TestHash{"d52c0c130a1bc0ae5136375637a52773e150c71efe1c968df8956f6745b05386", "a"},
- TestHash{"fc4214867025a8af94c614353b3553b10e561ae749fc18c40e5fd44a7a4ecd1b", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := jh.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"46e64619c18bb0a92a5e87185a47eef83ca747b8fcc8e1412921357e326df434", ""},
+ TestHash{"d52c0c130a1bc0ae5136375637a52773e150c71efe1c968df8956f6745b05386", "a"},
+ TestHash{"fc4214867025a8af94c614353b3553b10e561ae749fc18c40e5fd44a7a4ecd1b", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := jh.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_jh_384 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"2fe5f71b1b3290d3c017fb3c1a4d02a5cbeb03a0476481e25082434a881994b0ff99e078d2c16b105ad069b569315328", ""},
- TestHash{"77de897ca4fd5dadfbcbd1d8d4ea3c3c1426855e38661325853e92b069f3fe156729f6bbb9a5892c7c18a77f1cb9d0bb", "a"},
- TestHash{"6f73d9b9b8ed362f8180fb26020725b40bd6ca75b3b947405f26c4c37a885ce028876dc42e379d2faf6146fed3ea0e42", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := jh.hash_384(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"2fe5f71b1b3290d3c017fb3c1a4d02a5cbeb03a0476481e25082434a881994b0ff99e078d2c16b105ad069b569315328", ""},
+ TestHash{"77de897ca4fd5dadfbcbd1d8d4ea3c3c1426855e38661325853e92b069f3fe156729f6bbb9a5892c7c18a77f1cb9d0bb", "a"},
+ TestHash{"6f73d9b9b8ed362f8180fb26020725b40bd6ca75b3b947405f26c4c37a885ce028876dc42e379d2faf6146fed3ea0e42", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := jh.hash_384(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_jh_512 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"90ecf2f76f9d2c8017d979ad5ab96b87d58fc8fc4b83060f3f900774faa2c8fabe69c5f4ff1ec2b61d6b316941cedee117fb04b1f4c5bc1b919ae841c50eec4f", ""},
- TestHash{"f12c87e986daff17c481c81a99a39b603ca6bafcd320c5735523b97cb9a26f7681bad62ffad9aad0e21160a05f773fb0d1434ca4cbcb0483f480a171ada1561b", "a"},
- TestHash{"bafb8e710b35eabeb1a48220c4b0987c2c985b6e73b7b31d164bfb9d67c94d99d7bc43b474a25e647cd6cc36334b6a00a5f2a85fae74907fd2885c6168132fe7", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := jh.hash_512(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"90ecf2f76f9d2c8017d979ad5ab96b87d58fc8fc4b83060f3f900774faa2c8fabe69c5f4ff1ec2b61d6b316941cedee117fb04b1f4c5bc1b919ae841c50eec4f", ""},
+ TestHash{"f12c87e986daff17c481c81a99a39b603ca6bafcd320c5735523b97cb9a26f7681bad62ffad9aad0e21160a05f773fb0d1434ca4cbcb0483f480a171ada1561b", "a"},
+ TestHash{"bafb8e710b35eabeb1a48220c4b0987c2c985b6e73b7b31d164bfb9d67c94d99d7bc43b474a25e647cd6cc36334b6a00a5f2a85fae74907fd2885c6168132fe7", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := jh.hash_512(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_groestl_224 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"f2e180fb5947be964cd584e22e496242c6a329c577fc4ce8c36d34c3", ""},
- TestHash{"2dfa5bd326c23c451b1202d99e6cee98a98c45927e1a31077f538712", "a"},
- TestHash{"c8a3e7274d599900ae673419683c3626a2e49ed57308ed2687508bef", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := groestl.hash_224(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"f2e180fb5947be964cd584e22e496242c6a329c577fc4ce8c36d34c3", ""},
+ TestHash{"2dfa5bd326c23c451b1202d99e6cee98a98c45927e1a31077f538712", "a"},
+ TestHash{"c8a3e7274d599900ae673419683c3626a2e49ed57308ed2687508bef", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := groestl.hash_224(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_groestl_256 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"1a52d11d550039be16107f9c58db9ebcc417f16f736adb2502567119f0083467", ""},
- TestHash{"3645c245bb31223ad93c80885b719aa40b4bed0a9d9d6e7c11fe99e59ca350b5", "a"},
- TestHash{"2679d98913bee62e57fdbdde97ddb328373548c6b24fc587cc3d08f2a02a529c", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := groestl.hash_256(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"1a52d11d550039be16107f9c58db9ebcc417f16f736adb2502567119f0083467", ""},
+ TestHash{"3645c245bb31223ad93c80885b719aa40b4bed0a9d9d6e7c11fe99e59ca350b5", "a"},
+ TestHash{"2679d98913bee62e57fdbdde97ddb328373548c6b24fc587cc3d08f2a02a529c", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := groestl.hash_256(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_groestl_384 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"ac353c1095ace21439251007862d6c62f829ddbe6de4f78e68d310a9205a736d8b11d99bffe448f57a1cfa2934f044a5", ""},
- TestHash{"13fce7bd9fc69b67cc12c77e765a0a97794c585f89df39fbff32408e060d7d9225c7e80fd87da647686888bda896c342", "a"},
- TestHash{"1c446cd70a6de52c9db386f5305aae029fe5a4120bc6230b7cd3a5e1ef1949cc8e6d2548c24cd7347b5ba512628a62f6", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := groestl.hash_384(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"ac353c1095ace21439251007862d6c62f829ddbe6de4f78e68d310a9205a736d8b11d99bffe448f57a1cfa2934f044a5", ""},
+ TestHash{"13fce7bd9fc69b67cc12c77e765a0a97794c585f89df39fbff32408e060d7d9225c7e80fd87da647686888bda896c342", "a"},
+ TestHash{"1c446cd70a6de52c9db386f5305aae029fe5a4120bc6230b7cd3a5e1ef1949cc8e6d2548c24cd7347b5ba512628a62f6", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := groestl.hash_384(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_groestl_512 :: proc(t: ^testing.T) {
- test_vectors := [?]TestHash {
- TestHash{"6d3ad29d279110eef3adbd66de2a0345a77baede1557f5d099fce0c03d6dc2ba8e6d4a6633dfbd66053c20faa87d1a11f39a7fbe4a6c2f009801370308fc4ad8", ""},
- TestHash{"9ef345a835ee35d6d0d462ce45f722d84b5ca41fde9c81a98a22cfb4f7425720511b03a258cdc055bf8e9179dc9bdb5d88bed906c71125d4cf0cd39d3d7bebc7", "a"},
- TestHash{"862849fd911852cd54beefa88759db4cead0ef8e36aaf15398303c5c4cbc016d9b4c42b32081cbdcba710d2693e7663d244fae116ec29ffb40168baf44f944e7", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
- }
- for v, _ in test_vectors {
- computed := groestl.hash_512(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors := [?]TestHash {
+ TestHash{"6d3ad29d279110eef3adbd66de2a0345a77baede1557f5d099fce0c03d6dc2ba8e6d4a6633dfbd66053c20faa87d1a11f39a7fbe4a6c2f009801370308fc4ad8", ""},
+ TestHash{"9ef345a835ee35d6d0d462ce45f722d84b5ca41fde9c81a98a22cfb4f7425720511b03a258cdc055bf8e9179dc9bdb5d88bed906c71125d4cf0cd39d3d7bebc7", "a"},
+ TestHash{"862849fd911852cd54beefa88759db4cead0ef8e36aaf15398303c5c4cbc016d9b4c42b32081cbdcba710d2693e7663d244fae116ec29ffb40168baf44f944e7", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ }
+ for v, _ in test_vectors {
+ computed := groestl.hash_512(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_haval_128 :: proc(t: ^testing.T) {
- test_vectors_3 := [?]TestHash {
- TestHash{"c68f39913f901f3ddf44c707357a7d70", ""},
- TestHash{"0cd40739683e15f01ca5dbceef4059f1", "a"},
- TestHash{"9e40ed883fb63e985d299b40cda2b8f2", "abc"},
- TestHash{"3caf4a79e81adcd6d1716bcc1cef4573", "message digest"},
- TestHash{"dc502247fb3eb8376109eda32d361d82", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"44068770868768964d1f2c3bff4aa3d8", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"de5eb3f7d9eb08fae7a07d68e3047ec6", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- }
- for v, _ in test_vectors_3 {
- computed := haval.hash_128_3(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_4 := [?]TestHash {
- TestHash{"ee6bbf4d6a46a679b3a856c88538bb98", ""},
- TestHash{"5cd07f03330c3b5020b29ba75911e17d", "a"},
- }
- for v, _ in test_vectors_4 {
- computed := haval.hash_128_4(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_5 := [?]TestHash {
- TestHash{"184b8482a0c050dca54b59c7f05bf5dd", ""},
- TestHash{"f23fbe704be8494bfa7a7fb4f8ab09e5", "a"},
- }
- for v, _ in test_vectors_5 {
- computed := haval.hash_128_5(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors_3 := [?]TestHash {
+ TestHash{"c68f39913f901f3ddf44c707357a7d70", ""},
+ TestHash{"0cd40739683e15f01ca5dbceef4059f1", "a"},
+ TestHash{"9e40ed883fb63e985d299b40cda2b8f2", "abc"},
+ TestHash{"3caf4a79e81adcd6d1716bcc1cef4573", "message digest"},
+ TestHash{"dc502247fb3eb8376109eda32d361d82", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"44068770868768964d1f2c3bff4aa3d8", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"de5eb3f7d9eb08fae7a07d68e3047ec6", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ }
+ for v, _ in test_vectors_3 {
+ computed := haval.hash_128_3(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_4 := [?]TestHash {
+ TestHash{"ee6bbf4d6a46a679b3a856c88538bb98", ""},
+ TestHash{"5cd07f03330c3b5020b29ba75911e17d", "a"},
+ }
+ for v, _ in test_vectors_4 {
+ computed := haval.hash_128_4(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_5 := [?]TestHash {
+ TestHash{"184b8482a0c050dca54b59c7f05bf5dd", ""},
+ TestHash{"f23fbe704be8494bfa7a7fb4f8ab09e5", "a"},
+ }
+ for v, _ in test_vectors_5 {
+ computed := haval.hash_128_5(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_haval_160 :: proc(t: ^testing.T) {
- test_vectors_3 := [?]TestHash {
- TestHash{"d353c3ae22a25401d257643836d7231a9a95f953", ""},
- TestHash{"4da08f514a7275dbc4cece4a347385983983a830", "a"},
- TestHash{"b21e876c4d391e2a897661149d83576b5530a089", "abc"},
- TestHash{"43a47f6f1c016207f08be8115c0977bf155346da", "message digest"},
- TestHash{"eba9fa6050f24c07c29d1834a60900ea4e32e61b", "abcdefghijklmnopqrstuvwxyz"},
- TestHash{"c30bce448cf8cfe957c141e90c0a063497cdfeeb", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- TestHash{"97dc988d97caae757be7523c4e8d4ea63007a4b9", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- }
- for v, _ in test_vectors_3 {
- computed := haval.hash_160_3(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_4 := [?]TestHash {
- TestHash{"1d33aae1be4146dbaaca0b6e70d7a11f10801525", ""},
- TestHash{"e0a5be29627332034d4dd8a910a1a0e6fe04084d", "a"},
- }
- for v, _ in test_vectors_4 {
- computed := haval.hash_160_4(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_5 := [?]TestHash {
- TestHash{"255158cfc1eed1a7be7c55ddd64d9790415b933b", ""},
- TestHash{"f5147df7abc5e3c81b031268927c2b5761b5a2b5", "a"},
- }
- for v, _ in test_vectors_5 {
- computed := haval.hash_160_5(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors_3 := [?]TestHash {
+ TestHash{"d353c3ae22a25401d257643836d7231a9a95f953", ""},
+ TestHash{"4da08f514a7275dbc4cece4a347385983983a830", "a"},
+ TestHash{"b21e876c4d391e2a897661149d83576b5530a089", "abc"},
+ TestHash{"43a47f6f1c016207f08be8115c0977bf155346da", "message digest"},
+ TestHash{"eba9fa6050f24c07c29d1834a60900ea4e32e61b", "abcdefghijklmnopqrstuvwxyz"},
+ TestHash{"c30bce448cf8cfe957c141e90c0a063497cdfeeb", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ TestHash{"97dc988d97caae757be7523c4e8d4ea63007a4b9", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ }
+ for v, _ in test_vectors_3 {
+ computed := haval.hash_160_3(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_4 := [?]TestHash {
+ TestHash{"1d33aae1be4146dbaaca0b6e70d7a11f10801525", ""},
+ TestHash{"e0a5be29627332034d4dd8a910a1a0e6fe04084d", "a"},
+ }
+ for v, _ in test_vectors_4 {
+ computed := haval.hash_160_4(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_5 := [?]TestHash {
+ TestHash{"255158cfc1eed1a7be7c55ddd64d9790415b933b", ""},
+ TestHash{"f5147df7abc5e3c81b031268927c2b5761b5a2b5", "a"},
+ }
+ for v, _ in test_vectors_5 {
+ computed := haval.hash_160_5(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_haval_192 :: proc(t: ^testing.T) {
- test_vectors_3 := [?]TestHash {
- TestHash{"e9c48d7903eaf2a91c5b350151efcb175c0fc82de2289a4e", ""},
- TestHash{"b359c8835647f5697472431c142731ff6e2cddcacc4f6e08", "a"},
- }
- for v, _ in test_vectors_3 {
- computed := haval.hash_192_3(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_4 := [?]TestHash {
- TestHash{"4a8372945afa55c7dead800311272523ca19d42ea47b72da", ""},
- TestHash{"856c19f86214ea9a8a2f0c4b758b973cce72a2d8ff55505c", "a"},
- }
- for v, _ in test_vectors_4 {
- computed := haval.hash_192_4(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_5 := [?]TestHash {
- TestHash{"4839d0626f95935e17ee2fc4509387bbe2cc46cb382ffe85", ""},
- TestHash{"5ffa3b3548a6e2cfc06b7908ceb5263595df67cf9c4b9341", "a"},
- }
- for v, _ in test_vectors_5 {
- computed := haval.hash_192_5(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors_3 := [?]TestHash {
+ TestHash{"e9c48d7903eaf2a91c5b350151efcb175c0fc82de2289a4e", ""},
+ TestHash{"b359c8835647f5697472431c142731ff6e2cddcacc4f6e08", "a"},
+ }
+ for v, _ in test_vectors_3 {
+ computed := haval.hash_192_3(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_4 := [?]TestHash {
+ TestHash{"4a8372945afa55c7dead800311272523ca19d42ea47b72da", ""},
+ TestHash{"856c19f86214ea9a8a2f0c4b758b973cce72a2d8ff55505c", "a"},
+ }
+ for v, _ in test_vectors_4 {
+ computed := haval.hash_192_4(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_5 := [?]TestHash {
+ TestHash{"4839d0626f95935e17ee2fc4509387bbe2cc46cb382ffe85", ""},
+ TestHash{"5ffa3b3548a6e2cfc06b7908ceb5263595df67cf9c4b9341", "a"},
+ }
+ for v, _ in test_vectors_5 {
+ computed := haval.hash_192_5(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_haval_224 :: proc(t: ^testing.T) {
- test_vectors_3 := [?]TestHash {
- TestHash{"c5aae9d47bffcaaf84a8c6e7ccacd60a0dd1932be7b1a192b9214b6d", ""},
- TestHash{"731814ba5605c59b673e4caae4ad28eeb515b3abc2b198336794e17b", "a"},
- }
- for v, _ in test_vectors_3 {
- computed := haval.hash_224_3(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_4 := [?]TestHash {
- TestHash{"3e56243275b3b81561750550e36fcd676ad2f5dd9e15f2e89e6ed78e", ""},
- TestHash{"742f1dbeeaf17f74960558b44f08aa98bdc7d967e6c0ab8f799b3ac1", "a"},
- }
- for v, _ in test_vectors_4 {
- computed := haval.hash_224_4(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_5 := [?]TestHash {
- TestHash{"4a0513c032754f5582a758d35917ac9adf3854219b39e3ac77d1837e", ""},
- TestHash{"67b3cb8d4068e3641fa4f156e03b52978b421947328bfb9168c7655d", "a"},
- }
- for v, _ in test_vectors_5 {
- computed := haval.hash_224_5(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors_3 := [?]TestHash {
+ TestHash{"c5aae9d47bffcaaf84a8c6e7ccacd60a0dd1932be7b1a192b9214b6d", ""},
+ TestHash{"731814ba5605c59b673e4caae4ad28eeb515b3abc2b198336794e17b", "a"},
+ }
+ for v, _ in test_vectors_3 {
+ computed := haval.hash_224_3(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_4 := [?]TestHash {
+ TestHash{"3e56243275b3b81561750550e36fcd676ad2f5dd9e15f2e89e6ed78e", ""},
+ TestHash{"742f1dbeeaf17f74960558b44f08aa98bdc7d967e6c0ab8f799b3ac1", "a"},
+ }
+ for v, _ in test_vectors_4 {
+ computed := haval.hash_224_4(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_5 := [?]TestHash {
+ TestHash{"4a0513c032754f5582a758d35917ac9adf3854219b39e3ac77d1837e", ""},
+ TestHash{"67b3cb8d4068e3641fa4f156e03b52978b421947328bfb9168c7655d", "a"},
+ }
+ for v, _ in test_vectors_5 {
+ computed := haval.hash_224_5(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
}
@(test)
test_haval_256 :: proc(t: ^testing.T) {
- test_vectors_3 := [?]TestHash {
- TestHash{"4f6938531f0bc8991f62da7bbd6f7de3fad44562b8c6f4ebf146d5b4e46f7c17", ""},
- TestHash{"47c838fbb4081d9525a0ff9b1e2c05a98f625714e72db289010374e27db021d8", "a"},
- }
- for v, _ in test_vectors_3 {
- computed := haval.hash_256_3(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_4 := [?]TestHash {
- TestHash{"c92b2e23091e80e375dadce26982482d197b1a2521be82da819f8ca2c579b99b", ""},
- TestHash{"e686d2394a49b44d306ece295cf9021553221db132b36cc0ff5b593d39295899", "a"},
- }
- for v, _ in test_vectors_4 {
- computed := haval.hash_256_4(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
- test_vectors_5 := [?]TestHash {
- TestHash{"be417bb4dd5cfb76c7126f4f8eeb1553a449039307b1a3cd451dbfdc0fbbe330", ""},
- TestHash{"de8fd5ee72a5e4265af0a756f4e1a1f65c9b2b2f47cf17ecf0d1b88679a3e22f", "a"},
- }
- for v, _ in test_vectors_5 {
- computed := haval.hash_256_5(v.str)
- computed_str := hex_string(computed[:])
- expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
- }
+ test_vectors_3 := [?]TestHash {
+ TestHash{"4f6938531f0bc8991f62da7bbd6f7de3fad44562b8c6f4ebf146d5b4e46f7c17", ""},
+ TestHash{"47c838fbb4081d9525a0ff9b1e2c05a98f625714e72db289010374e27db021d8", "a"},
+ }
+ for v, _ in test_vectors_3 {
+ computed := haval.hash_256_3(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_4 := [?]TestHash {
+ TestHash{"c92b2e23091e80e375dadce26982482d197b1a2521be82da819f8ca2c579b99b", ""},
+ TestHash{"e686d2394a49b44d306ece295cf9021553221db132b36cc0ff5b593d39295899", "a"},
+ }
+ for v, _ in test_vectors_4 {
+ computed := haval.hash_256_4(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+ test_vectors_5 := [?]TestHash {
+ TestHash{"be417bb4dd5cfb76c7126f4f8eeb1553a449039307b1a3cd451dbfdc0fbbe330", ""},
+ TestHash{"de8fd5ee72a5e4265af0a756f4e1a1f65c9b2b2f47cf17ecf0d1b88679a3e22f", "a"},
+ }
+ for v, _ in test_vectors_5 {
+ computed := haval.hash_256_5(v.str)
+ computed_str := hex_string(computed[:])
+ expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
+ }
+}
+
+@(test)
+test_siphash_2_4 :: proc(t: ^testing.T) {
+ // Test vectors from
+ // https://github.com/veorq/SipHash/blob/master/vectors.h
+ test_vectors := [?]u64 {
+ 0x726fdb47dd0e0e31, 0x74f839c593dc67fd, 0x0d6c8009d9a94f5a, 0x85676696d7fb7e2d,
+ 0xcf2794e0277187b7, 0x18765564cd99a68d, 0xcbc9466e58fee3ce, 0xab0200f58b01d137,
+ 0x93f5f5799a932462, 0x9e0082df0ba9e4b0, 0x7a5dbbc594ddb9f3, 0xf4b32f46226bada7,
+ 0x751e8fbc860ee5fb, 0x14ea5627c0843d90, 0xf723ca908e7af2ee, 0xa129ca6149be45e5,
+ 0x3f2acc7f57c29bdb, 0x699ae9f52cbe4794, 0x4bc1b3f0968dd39c, 0xbb6dc91da77961bd,
+ 0xbed65cf21aa2ee98, 0xd0f2cbb02e3b67c7, 0x93536795e3a33e88, 0xa80c038ccd5ccec8,
+ 0xb8ad50c6f649af94, 0xbce192de8a85b8ea, 0x17d835b85bbb15f3, 0x2f2e6163076bcfad,
+ 0xde4daaaca71dc9a5, 0xa6a2506687956571, 0xad87a3535c49ef28, 0x32d892fad841c342,
+ 0x7127512f72f27cce, 0xa7f32346f95978e3, 0x12e0b01abb051238, 0x15e034d40fa197ae,
+ 0x314dffbe0815a3b4, 0x027990f029623981, 0xcadcd4e59ef40c4d, 0x9abfd8766a33735c,
+ 0x0e3ea96b5304a7d0, 0xad0c42d6fc585992, 0x187306c89bc215a9, 0xd4a60abcf3792b95,
+ 0xf935451de4f21df2, 0xa9538f0419755787, 0xdb9acddff56ca510, 0xd06c98cd5c0975eb,
+ 0xe612a3cb9ecba951, 0xc766e62cfcadaf96, 0xee64435a9752fe72, 0xa192d576b245165a,
+ 0x0a8787bf8ecb74b2, 0x81b3e73d20b49b6f, 0x7fa8220ba3b2ecea, 0x245731c13ca42499,
+ 0xb78dbfaf3a8d83bd, 0xea1ad565322a1a0b, 0x60e61c23a3795013, 0x6606d7e446282b93,
+ 0x6ca4ecb15c5f91e1, 0x9f626da15c9625f3, 0xe51b38608ef25f57, 0x958a324ceb064572,
+ }
+
+ key: [16]byte
+ for i in 0..<16 {
+ key[i] = byte(i)
+ }
+
+ for i in 0..<len(test_vectors) {
+ data := make([]byte, i)
+ for j in 0..<i {
+ data[j] = byte(j)
+ }
+
+ vector := test_vectors[i]
+ computed := siphash.sum_2_4(data[:], key[:])
+
+ expect(t, computed == vector, fmt.tprintf("Expected: 0x%x for input of %v, but got 0x%x instead", vector, data, computed))
+ }
}
diff --git a/tests/core/crypto_hash b/tests/core/crypto_hash
new file mode 100644
index 000000000..18b85a1e8
--- /dev/null
+++ b/tests/core/crypto_hash
Binary files differ
diff --git a/tests/core/encoding/test_core_json.odin b/tests/core/encoding/json/test_core_json.odin
index f536eb4c6..60e71bf72 100644
--- a/tests/core/encoding/test_core_json.odin
+++ b/tests/core/encoding/json/test_core_json.odin
@@ -3,37 +3,39 @@ package test_core_json
import "core:encoding/json"
import "core:testing"
import "core:fmt"
+import "core:os"
TEST_count := 0
TEST_fail := 0
when ODIN_TEST {
- expect :: testing.expect
- log :: testing.log
+ expect :: testing.expect
+ log :: testing.log
} else {
- expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- TEST_count += 1
- if !condition {
- TEST_fail += 1
- fmt.println(message)
- return
- }
- fmt.println(" PASS")
- }
- log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- fmt.printf("log: %v\n", v)
- }
+ expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
+ TEST_count += 1
+ if !condition {
+ TEST_fail += 1
+ fmt.printf("[%v] %v\n", loc, message)
+ return
+ }
+ }
+ log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
+ fmt.printf("[%v] ", loc)
+ fmt.printf("log: %v\n", v)
+ }
}
main :: proc() {
- t := testing.T{}
-
+ t := testing.T{}
+
parse_json(&t)
marshal_json(&t)
- fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
@test
diff --git a/tests/core/encoding/varint/test_core_varint.odin b/tests/core/encoding/varint/test_core_varint.odin
new file mode 100644
index 000000000..093b043d7
--- /dev/null
+++ b/tests/core/encoding/varint/test_core_varint.odin
@@ -0,0 +1,156 @@
+package test_core_varint
+
+import "core:encoding/varint"
+import "core:testing"
+import "core:fmt"
+import "core:os"
+import "core:slice"
+import "core:math/rand"
+
+TEST_count := 0
+TEST_fail := 0
+
+RANDOM_TESTS :: 100
+
+when ODIN_TEST {
+ expect :: testing.expect
+ log :: testing.log
+} else {
+ expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
+ TEST_count += 1
+ if !condition {
+ TEST_fail += 1
+ fmt.printf("[%v] %v\n", loc, message)
+ return
+ }
+ }
+ log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
+ fmt.printf("[%v] ", loc)
+ fmt.printf("log: %v\n", v)
+ }
+}
+
+main :: proc() {
+ t := testing.T{}
+
+ test_leb128(&t)
+
+ fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
+}
+
+@(test)
+test_leb128 :: proc(t: ^testing.T) {
+ buf: [varint.LEB128_MAX_BYTES]u8
+
+ for vector in ULEB_Vectors {
+ val, size, err := varint.decode_uleb128(vector.encoded)
+
+ msg := fmt.tprintf("Expected %02x to decode to %v consuming %v bytes, got %v and %v", vector.encoded, vector.value, vector.size, val, size)
+ expect(t, size == vector.size && val == vector.value, msg)
+
+ msg = fmt.tprintf("Expected decoder to return error %v, got %v", vector.error, err)
+ expect(t, err == vector.error, msg)
+
+ if err == .None { // Try to roundtrip
+ size, err = varint.encode_uleb128(buf[:], vector.value)
+
+ msg = fmt.tprintf("Expected %v to encode to %02x, got %02x", vector.value, vector.encoded, buf[:size])
+ expect(t, size == vector.size && slice.simple_equal(vector.encoded, buf[:size]), msg)
+ }
+ }
+
+ for vector in ILEB_Vectors {
+ val, size, err := varint.decode_ileb128(vector.encoded)
+
+ msg := fmt.tprintf("Expected %02x to decode to %v consuming %v bytes, got %v and %v", vector.encoded, vector.value, vector.size, val, size)
+ expect(t, size == vector.size && val == vector.value, msg)
+
+ msg = fmt.tprintf("Expected decoder to return error %v, got %v", vector.error, err)
+ expect(t, err == vector.error, msg)
+
+ if err == .None { // Try to roundtrip
+ size, err = varint.encode_ileb128(buf[:], vector.value)
+
+ msg = fmt.tprintf("Expected %v to encode to %02x, got %02x", vector.value, vector.encoded, buf[:size])
+ expect(t, size == vector.size && slice.simple_equal(vector.encoded, buf[:size]), msg)
+ }
+ }
+
+ for num_bytes in 1..uint(16) {
+ for _ in 0..RANDOM_TESTS {
+ unsigned, signed := get_random(num_bytes)
+
+ {
+ encode_size, encode_err := varint.encode_uleb128(buf[:], unsigned)
+ msg := fmt.tprintf("%v failed to encode as an unsigned LEB128 value, got %v", unsigned, encode_err)
+ expect(t, encode_err == .None, msg)
+
+ decoded, decode_size, decode_err := varint.decode_uleb128(buf[:])
+ msg = fmt.tprintf("Expected %02x to decode as %v, got %v", buf[:encode_size], unsigned, decoded)
+ expect(t, decode_err == .None && decode_size == encode_size && decoded == unsigned, msg)
+ }
+
+ {
+ encode_size, encode_err := varint.encode_ileb128(buf[:], signed)
+ msg := fmt.tprintf("%v failed to encode as a signed LEB128 value, got %v", signed, encode_err)
+ expect(t, encode_err == .None, msg)
+
+ decoded, decode_size, decode_err := varint.decode_ileb128(buf[:])
+ msg = fmt.tprintf("Expected %02x to decode as %v, got %v, err: %v", buf[:encode_size], signed, decoded, decode_err)
+ expect(t, decode_err == .None && decode_size == encode_size && decoded == signed, msg)
+ }
+ }
+ }
+}
+
+get_random :: proc(byte_count: uint) -> (u: u128, i: i128) {
+ assert(byte_count >= 0 && byte_count <= size_of(u128))
+
+ for _ in 1..byte_count {
+ u <<= 8
+ u |= u128(rand.uint32() & 0xff)
+ }
+
+ bias := i128(1 << (byte_count * 7)) - 1
+ i = i128(u) - bias
+
+ return
+}
+
+ULEB_Test_Vector :: struct {
+ encoded: []u8,
+ value: u128,
+ size: int,
+ error: varint.Error,
+}
+
+ULEB_Vectors :: []ULEB_Test_Vector{
+ { []u8{0x00}, 0, 1, .None },
+ { []u8{0x7f}, 127, 1, .None },
+ { []u8{0xE5, 0x8E, 0x26}, 624485, 3, .None },
+ { []u8{0x80}, 0, 0, .Buffer_Too_Small },
+ { []u8{}, 0, 0, .Buffer_Too_Small },
+
+ { []u8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03}, max(u128), 19, .None },
+}
+
+ILEB_Test_Vector :: struct {
+ encoded: []u8,
+ value: i128,
+ size: int,
+ error: varint.Error,
+}
+
+ILEB_Vectors :: []ILEB_Test_Vector{
+ { []u8{0x00}, 0, 1, .None },
+ { []u8{0x3f}, 63, 1, .None },
+ { []u8{0x40}, -64, 1, .None },
+ { []u8{0xC0, 0xBB, 0x78}, -123456, 3, .None },
+ { []u8{}, 0, 0, .Buffer_Too_Small },
+
+ { []u8{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7e}, min(i128), 19, .None },
+ { []u8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01}, max(i128), 19, .None },
+} \ No newline at end of file
diff --git a/tests/core/hash/test_core_hash.odin b/tests/core/hash/test_core_hash.odin
index 8baa604b6..607642339 100644
--- a/tests/core/hash/test_core_hash.odin
+++ b/tests/core/hash/test_core_hash.odin
@@ -5,6 +5,7 @@ import "core:hash"
import "core:time"
import "core:testing"
import "core:fmt"
+import "core:os"
TEST_count := 0
TEST_fail := 0
@@ -14,14 +15,12 @@ when ODIN_TEST {
log :: testing.log
} else {
expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
TEST_count += 1
if !condition {
TEST_fail += 1
- fmt.println(" FAIL:", message)
+ fmt.printf("[%v] %v\n", loc, message)
return
}
- fmt.println(" PASS")
}
log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
fmt.printf("[%v] ", loc)
@@ -35,6 +34,9 @@ main :: proc() {
test_xxhash_vectors(&t)
test_crc64_vectors(&t)
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
/*
diff --git a/tests/core/image/test_core_image.odin b/tests/core/image/test_core_image.odin
index 124166245..52005d915 100644
--- a/tests/core/image/test_core_image.odin
+++ b/tests/core/image/test_core_image.odin
@@ -32,23 +32,21 @@ TEST_count := 0
TEST_fail := 0
when ODIN_TEST {
- expect :: testing.expect
- log :: testing.log
+ expect :: testing.expect
+ log :: testing.log
} else {
- expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- TEST_count += 1
- if !condition {
- TEST_fail += 1
- fmt.println(message)
- return
- }
- fmt.println(" PASS")
- }
- log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- fmt.printf("log: %v\n", v)
- }
+ expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
+ TEST_count += 1
+ if !condition {
+ TEST_fail += 1
+ fmt.printf("[%v] %v\n", loc, message)
+ return
+ }
+ }
+ log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
+ fmt.printf("[%v] ", loc)
+ fmt.printf("log: %v\n", v)
+ }
}
I_Error :: image.Error
@@ -57,6 +55,9 @@ main :: proc() {
png_test(&t)
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
PNG_Test :: struct {
diff --git a/tests/core/math/noise/test_core_math_noise.odin b/tests/core/math/noise/test_core_math_noise.odin
index c3a3e4228..a0360e695 100644
--- a/tests/core/math/noise/test_core_math_noise.odin
+++ b/tests/core/math/noise/test_core_math_noise.odin
@@ -3,6 +3,7 @@ package test_core_math_noise
import "core:testing"
import "core:math/noise"
import "core:fmt"
+import "core:os"
TEST_count := 0
TEST_fail := 0
@@ -12,29 +13,30 @@ V3 :: noise.Vec3
V4 :: noise.Vec4
when ODIN_TEST {
- expect :: testing.expect
- log :: testing.log
+ expect :: testing.expect
+ log :: testing.log
} else {
- expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- TEST_count += 1
- if !condition {
- TEST_fail += 1
- fmt.println(message)
- return
- }
- fmt.println(" PASS")
- }
- log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- fmt.printf("log: %v\n", v)
- }
+ expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
+ TEST_count += 1
+ if !condition {
+ TEST_fail += 1
+ fmt.printf("[%v] %v\n", loc, message)
+ return
+ }
+ }
+ log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
+ fmt.printf("[%v] ", loc)
+ fmt.printf("log: %v\n", v)
+ }
}
main :: proc() {
t := testing.T{}
noise_test(&t)
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
Test_Vector :: struct {
diff --git a/tests/core/odin/test_parser.odin b/tests/core/odin/test_parser.odin
index 90d913d10..3837436bc 100644
--- a/tests/core/odin/test_parser.odin
+++ b/tests/core/odin/test_parser.odin
@@ -2,7 +2,7 @@ package test_core_odin_parser
import "core:testing"
import "core:fmt"
-
+import "core:os"
import "core:odin/parser"
@@ -10,31 +10,31 @@ TEST_count := 0
TEST_fail := 0
when ODIN_TEST {
- expect :: testing.expect
- log :: testing.log
+ expect :: testing.expect
+ log :: testing.log
} else {
- expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- TEST_count += 1
- if !condition {
- TEST_fail += 1
- fmt.println(message)
- return
- }
- fmt.println(" PASS")
- }
- log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- fmt.printf("log: %v\n", v)
- }
+ expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
+ TEST_count += 1
+ if !condition {
+ TEST_fail += 1
+ fmt.printf("[%v] %v\n", loc, message)
+ return
+ }
+ }
+ log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
+ fmt.printf("[%v] ", loc)
+ fmt.printf("log: %v\n", v)
+ }
}
-
main :: proc() {
- t := testing.T{}
- test_parse_demo(&t)
+ t := testing.T{}
+ test_parse_demo(&t)
- fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
@@ -47,4 +47,4 @@ test_parse_demo :: proc(t: ^testing.T) {
for key, value in pkg.files {
expect(t, value.syntax_error_count == 0, fmt.tprintf("%v should contain zero errors", key))
}
-}
+} \ No newline at end of file
diff --git a/tests/core/strings/test_core_strings.odin b/tests/core/strings/test_core_strings.odin
index fc1518349..70da1a73b 100644
--- a/tests/core/strings/test_core_strings.odin
+++ b/tests/core/strings/test_core_strings.odin
@@ -3,61 +3,63 @@ package test_core_image
import "core:strings"
import "core:testing"
import "core:fmt"
+import "core:os"
TEST_count := 0
TEST_fail := 0
when ODIN_TEST {
- expect :: testing.expect
- log :: testing.log
+ expect :: testing.expect
+ log :: testing.log
} else {
- expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- TEST_count += 1
- if !condition {
- TEST_fail += 1
- fmt.println(message)
- return
- }
- fmt.println(" PASS")
- }
- log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
- fmt.printf("[%v] ", loc)
- fmt.printf("log: %v\n", v)
- }
+ expect :: proc(t: ^testing.T, condition: bool, message: string, loc := #caller_location) {
+ TEST_count += 1
+ if !condition {
+ TEST_fail += 1
+ fmt.printf("[%v] %v\n", loc, message)
+ return
+ }
+ }
+ log :: proc(t: ^testing.T, v: any, loc := #caller_location) {
+ fmt.printf("[%v] ", loc)
+ fmt.printf("log: %v\n", v)
+ }
}
main :: proc() {
- t := testing.T{}
- test_index_any_small_string_not_found(&t)
- test_index_any_larger_string_not_found(&t)
- test_index_any_small_string_found(&t)
- test_index_any_larger_string_found(&t)
+ t := testing.T{}
+ test_index_any_small_string_not_found(&t)
+ test_index_any_larger_string_not_found(&t)
+ test_index_any_small_string_found(&t)
+ test_index_any_larger_string_found(&t)
- fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
@test
test_index_any_small_string_not_found :: proc(t: ^testing.T) {
- index := strings.index_any(".", "/:\"")
- log(t, index)
- expect(t, index == -1, "index_any should be negative")
+ index := strings.index_any(".", "/:\"")
+ log(t, index)
+ expect(t, index == -1, "index_any should be negative")
}
@test
test_index_any_larger_string_not_found :: proc(t: ^testing.T) {
- index := strings.index_any("aaaaaaaa.aaaaaaaa", "/:\"")
- expect(t, index == -1, "index_any should be negative")
+ index := strings.index_any("aaaaaaaa.aaaaaaaa", "/:\"")
+ expect(t, index == -1, "index_any should be negative")
}
@test
test_index_any_small_string_found :: proc(t: ^testing.T) {
- index := strings.index_any(".", "/:.\"")
- expect(t, index == 0, "index_any should be 0")
+ index := strings.index_any(".", "/:.\"")
+ expect(t, index == 0, "index_any should be 0")
}
@test
test_index_any_larger_string_found :: proc(t: ^testing.T) {
- index := strings.index_any("aaaaaaaa:aaaaaaaa", "/:\"")
- expect(t, index == 8, "index_any should be 8")
+ index := strings.index_any("aaaaaaaa:aaaaaaaa", "/:\"")
+ expect(t, index == 8, "index_any should be 8")
}
diff --git a/tests/vendor/Makefile b/tests/vendor/Makefile
index f0a456bae..341067c6e 100644
--- a/tests/vendor/Makefile
+++ b/tests/vendor/Makefile
@@ -1,6 +1,13 @@
ODIN=../../odin
+ODINFLAGS=
+
+OS=$(shell uname)
+
+ifeq ($(OS), OpenBSD)
+ ODINFLAGS:=$(ODINFLAGS) -extra-linker-flags:-L/usr/local/lib
+endif
all: botan_test
botan_test:
- $(ODIN) run botan -out=botan_hash -o:speed -no-bounds-check \ No newline at end of file
+ $(ODIN) run botan -out=botan_hash -o:speed -no-bounds-check $(ODINFLAGS)
diff --git a/tests/vendor/botan/test_vendor_botan.odin b/tests/vendor/botan/test_vendor_botan.odin
index e92410621..f0ff44ac9 100644
--- a/tests/vendor/botan/test_vendor_botan.odin
+++ b/tests/vendor/botan/test_vendor_botan.odin
@@ -14,6 +14,7 @@ package test_vendor_botan
import "core:testing"
import "core:fmt"
+import "core:os"
import "vendor:botan/md4"
import "vendor:botan/md5"
@@ -30,6 +31,7 @@ import "vendor:botan/gost"
import "vendor:botan/streebog"
import "vendor:botan/sm3"
import "vendor:botan/skein512"
+import "vendor:botan/siphash"
TEST_count := 0
TEST_fail := 0
@@ -82,8 +84,12 @@ main :: proc() {
test_sm3(&t)
test_skein512_256(&t)
test_skein512_512(&t)
+ test_siphash_2_4(&t)
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
TestHash :: struct {
@@ -575,3 +581,44 @@ test_skein512_512 :: proc(t: ^testing.T) {
expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
}
}
+
+@(test)
+test_siphash_2_4 :: proc(t: ^testing.T) {
+ // Test vectors from
+ // https://github.com/veorq/SipHash/blob/master/vectors.h
+ test_vectors := [?]u64 {
+ 0x726fdb47dd0e0e31, 0x74f839c593dc67fd, 0x0d6c8009d9a94f5a, 0x85676696d7fb7e2d,
+ 0xcf2794e0277187b7, 0x18765564cd99a68d, 0xcbc9466e58fee3ce, 0xab0200f58b01d137,
+ 0x93f5f5799a932462, 0x9e0082df0ba9e4b0, 0x7a5dbbc594ddb9f3, 0xf4b32f46226bada7,
+ 0x751e8fbc860ee5fb, 0x14ea5627c0843d90, 0xf723ca908e7af2ee, 0xa129ca6149be45e5,
+ 0x3f2acc7f57c29bdb, 0x699ae9f52cbe4794, 0x4bc1b3f0968dd39c, 0xbb6dc91da77961bd,
+ 0xbed65cf21aa2ee98, 0xd0f2cbb02e3b67c7, 0x93536795e3a33e88, 0xa80c038ccd5ccec8,
+ 0xb8ad50c6f649af94, 0xbce192de8a85b8ea, 0x17d835b85bbb15f3, 0x2f2e6163076bcfad,
+ 0xde4daaaca71dc9a5, 0xa6a2506687956571, 0xad87a3535c49ef28, 0x32d892fad841c342,
+ 0x7127512f72f27cce, 0xa7f32346f95978e3, 0x12e0b01abb051238, 0x15e034d40fa197ae,
+ 0x314dffbe0815a3b4, 0x027990f029623981, 0xcadcd4e59ef40c4d, 0x9abfd8766a33735c,
+ 0x0e3ea96b5304a7d0, 0xad0c42d6fc585992, 0x187306c89bc215a9, 0xd4a60abcf3792b95,
+ 0xf935451de4f21df2, 0xa9538f0419755787, 0xdb9acddff56ca510, 0xd06c98cd5c0975eb,
+ 0xe612a3cb9ecba951, 0xc766e62cfcadaf96, 0xee64435a9752fe72, 0xa192d576b245165a,
+ 0x0a8787bf8ecb74b2, 0x81b3e73d20b49b6f, 0x7fa8220ba3b2ecea, 0x245731c13ca42499,
+ 0xb78dbfaf3a8d83bd, 0xea1ad565322a1a0b, 0x60e61c23a3795013, 0x6606d7e446282b93,
+ 0x6ca4ecb15c5f91e1, 0x9f626da15c9625f3, 0xe51b38608ef25f57, 0x958a324ceb064572,
+ }
+
+ key: [16]byte
+ for i in 0..<16 {
+ key[i] = byte(i)
+ }
+
+ for i in 0..<len(test_vectors) {
+ data := make([]byte, i)
+ for j in 0..<i {
+ data[j] = byte(j)
+ }
+
+ vector := test_vectors[i]
+ computed := siphash.sum_2_4(data[:], key[:])
+
+ expect(t, computed == vector, fmt.tprintf("Expected: 0x%x for input of %v, but got 0x%x instead", vector, data, computed))
+ }
+} \ No newline at end of file
diff --git a/tests/vendor/glfw/test_vendor_glfw.odin b/tests/vendor/glfw/test_vendor_glfw.odin
index 252df2033..baf46aa7e 100644
--- a/tests/vendor/glfw/test_vendor_glfw.odin
+++ b/tests/vendor/glfw/test_vendor_glfw.odin
@@ -3,6 +3,7 @@ package test_vendor_glfw
import "core:testing"
import "core:fmt"
import "vendor:glfw"
+import "core:os"
GLFW_MAJOR :: 3
GLFW_MINOR :: 3
@@ -36,6 +37,9 @@ main :: proc() {
test_glfw(&t)
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
+ if TEST_fail > 0 {
+ os.exit(1)
+ }
}
@(test)
diff --git a/vendor/ENet/unix.odin b/vendor/ENet/unix.odin
index ea6b84199..05ce41e05 100644
--- a/vendor/ENet/unix.odin
+++ b/vendor/ENet/unix.odin
@@ -1,4 +1,4 @@
-//+build linux, darwin, freebsd
+//+build linux, darwin, freebsd, openbsd
package ENet
// When we implement the appropriate bindings for Unix, the section separated
@@ -14,7 +14,7 @@ import "core:c"
@(private="file") FD_ZERO :: #force_inline proc(s: ^fd_set) {
for i := size_of(fd_set) / size_of(c.long); i != 0; i -= 1 {
- s.fds_bits[i] = 0;
+ s.fds_bits[i] = 0
}
}
@@ -56,4 +56,4 @@ SOCKETSET_REMOVE :: #force_inline proc(sockset: ^SocketSet, socket: Socket) {
SOCKSET_CHECK :: #force_inline proc(sockset: ^SocketSet, socket: Socket) -> bool {
return FD_ISSET(i32(socket), cast(^fd_set)sockset)
-} \ No newline at end of file
+}
diff --git a/vendor/botan/bindings/botan.odin b/vendor/botan/bindings/botan.odin
index fdddc99a9..a12706e95 100644
--- a/vendor/botan/bindings/botan.odin
+++ b/vendor/botan/bindings/botan.odin
@@ -99,6 +99,10 @@ MAC_HMAC_SHA_384 :: "HMAC(SHA-384)"
MAC_HMAC_SHA_512 :: "HMAC(SHA-512)"
MAC_HMAC_MD5 :: "HMAC(MD5)"
+MAC_SIPHASH_1_3 :: "SipHash(1,3)"
+MAC_SIPHASH_2_4 :: "SipHash(2,4)"
+MAC_SIPHASH_4_8 :: "SipHash(4,8)"
+
hash_struct :: struct{}
hash_t :: ^hash_struct
rng_struct :: struct{}
@@ -138,9 +142,7 @@ fpe_t :: ^fpe_struct
when ODIN_OS == .Windows {
foreign import botan_lib "botan.lib"
-} else when ODIN_OS == .Linux {
- foreign import botan_lib "system:botan-2"
-} else when ODIN_OS == .Darwin {
+} else {
foreign import botan_lib "system:botan-2"
}
@@ -467,4 +469,4 @@ foreign botan_lib {
fpe_destroy :: proc(fpe: fpe_t) -> c.int ---
fpe_encrypt :: proc(fpe: fpe_t, x: mp_t, tweak: ^c.char, tweak_len: c.size_t) -> c.int ---
fpe_decrypt :: proc(fpe: fpe_t, x: mp_t, tweak: ^c.char, tweak_len: c.size_t) -> c.int ---
-} \ No newline at end of file
+}
diff --git a/vendor/botan/blake2b/blake2b.odin b/vendor/botan/blake2b/blake2b.odin
index 226502e83..67238ec74 100644
--- a/vendor/botan/blake2b/blake2b.odin
+++ b/vendor/botan/blake2b/blake2b.odin
@@ -44,7 +44,7 @@ hash_bytes :: proc "contextless" (data: []byte) -> [DIGEST_SIZE]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer will hash the given input and write the
diff --git a/vendor/botan/gost/gost.odin b/vendor/botan/gost/gost.odin
index 9f081f9cb..6bf1c5b97 100644
--- a/vendor/botan/gost/gost.odin
+++ b/vendor/botan/gost/gost.odin
@@ -44,7 +44,7 @@ hash_bytes :: proc "contextless" (data: []byte) -> [DIGEST_SIZE]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer will hash the given input and write the
diff --git a/vendor/botan/keccak/keccak.odin b/vendor/botan/keccak/keccak.odin
index 3316de017..28e7374ba 100644
--- a/vendor/botan/keccak/keccak.odin
+++ b/vendor/botan/keccak/keccak.odin
@@ -44,7 +44,7 @@ hash_bytes_512 :: proc(data: []byte) -> [DIGEST_SIZE_512]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_512 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_512(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_512(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_512 will hash the given input and write the
diff --git a/vendor/botan/md4/md4.odin b/vendor/botan/md4/md4.odin
index c8a1ad903..174676a82 100644
--- a/vendor/botan/md4/md4.odin
+++ b/vendor/botan/md4/md4.odin
@@ -44,7 +44,7 @@ hash_bytes :: proc "contextless" (data: []byte) -> [DIGEST_SIZE]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer will hash the given input and write the
diff --git a/vendor/botan/md5/md5.odin b/vendor/botan/md5/md5.odin
index 203f2d092..01e099062 100644
--- a/vendor/botan/md5/md5.odin
+++ b/vendor/botan/md5/md5.odin
@@ -44,7 +44,7 @@ hash_bytes :: proc "contextless" (data: []byte) -> [DIGEST_SIZE]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer will hash the given input and write the
diff --git a/vendor/botan/ripemd/ripemd.odin b/vendor/botan/ripemd/ripemd.odin
index 0a8195a96..230e4c0d9 100644
--- a/vendor/botan/ripemd/ripemd.odin
+++ b/vendor/botan/ripemd/ripemd.odin
@@ -44,7 +44,7 @@ hash_bytes_160 :: proc(data: []byte) -> [DIGEST_SIZE_160]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_160 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_160(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_160(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_160 will hash the given input and write the
diff --git a/vendor/botan/sha1/sha1.odin b/vendor/botan/sha1/sha1.odin
index 005b01821..1f74c8fc2 100644
--- a/vendor/botan/sha1/sha1.odin
+++ b/vendor/botan/sha1/sha1.odin
@@ -44,7 +44,7 @@ hash_bytes :: proc "contextless" (data: []byte) -> [DIGEST_SIZE]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer will hash the given input and write the
diff --git a/vendor/botan/sha2/sha2.odin b/vendor/botan/sha2/sha2.odin
index f5d6921a8..4c201cc26 100644
--- a/vendor/botan/sha2/sha2.odin
+++ b/vendor/botan/sha2/sha2.odin
@@ -47,7 +47,7 @@ hash_bytes_224 :: proc(data: []byte) -> [DIGEST_SIZE_224]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_224 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_224(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_224(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_224 will hash the given input and write the
@@ -126,7 +126,7 @@ hash_bytes_256 :: proc(data: []byte) -> [DIGEST_SIZE_256]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_256 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_256(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_256(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_256 will hash the given input and write the
@@ -205,7 +205,7 @@ hash_bytes_384 :: proc(data: []byte) -> [DIGEST_SIZE_384]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_384 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_384(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_384(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_384 will hash the given input and write the
@@ -284,7 +284,7 @@ hash_bytes_512 :: proc(data: []byte) -> [DIGEST_SIZE_512]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_512 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_512(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_512(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_512 will hash the given input and write the
diff --git a/vendor/botan/sha3/sha3.odin b/vendor/botan/sha3/sha3.odin
index cf9fa5b2b..4c1b87dda 100644
--- a/vendor/botan/sha3/sha3.odin
+++ b/vendor/botan/sha3/sha3.odin
@@ -47,7 +47,7 @@ hash_bytes_224 :: proc(data: []byte) -> [DIGEST_SIZE_224]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_224 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_224(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_224(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_224 will hash the given input and write the
@@ -126,7 +126,7 @@ hash_bytes_256 :: proc(data: []byte) -> [DIGEST_SIZE_256]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_256 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_256(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_256(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_256 will hash the given input and write the
@@ -205,7 +205,7 @@ hash_bytes_384 :: proc(data: []byte) -> [DIGEST_SIZE_384]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_384 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_384(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_384(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_384 will hash the given input and write the
@@ -284,7 +284,7 @@ hash_bytes_512 :: proc(data: []byte) -> [DIGEST_SIZE_512]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_512 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_512(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_512(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_512 will hash the given input and write the
diff --git a/vendor/botan/shake/shake.odin b/vendor/botan/shake/shake.odin
index ac8432f64..f1023b90e 100644
--- a/vendor/botan/shake/shake.odin
+++ b/vendor/botan/shake/shake.odin
@@ -45,7 +45,7 @@ hash_bytes_128 :: proc(data: []byte) -> [DIGEST_SIZE_128]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_128 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_128(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_128(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_128 will hash the given input and write the
@@ -124,7 +124,7 @@ hash_bytes_256 :: proc(data: []byte) -> [DIGEST_SIZE_256]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_256 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_256(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_256(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_256 will hash the given input and write the
diff --git a/vendor/botan/siphash/siphash.odin b/vendor/botan/siphash/siphash.odin
new file mode 100644
index 000000000..c2b7b64f4
--- /dev/null
+++ b/vendor/botan/siphash/siphash.odin
@@ -0,0 +1,253 @@
+package siphash
+
+/*
+ Copyright 2022 zhibog
+ Made available under the BSD-3 license.
+
+ List of contributors:
+ zhibog: Initial implementation.
+
+ Interface for the SipHash hashing algorithm.
+ The hash will be computed via bindings to the Botan crypto library
+
+ Use the specific procedures for a certain setup. The generic procdedures will default to Siphash 2-4
+*/
+
+import "core:crypto"
+import "core:crypto/util"
+
+import botan "../bindings"
+
+KEY_SIZE :: 16
+DIGEST_SIZE :: 8
+
+// sum_string_1_3 will hash the given message with the key and return
+// the computed hash as a u64
+sum_string_1_3 :: proc(msg, key: string) -> u64 {
+ return sum_bytes_1_3(transmute([]byte)(msg), transmute([]byte)(key))
+}
+
+// sum_bytes_1_3 will hash the given message with the key and return
+// the computed hash as a u64
+sum_bytes_1_3 :: proc (msg, key: []byte) -> u64 {
+ dst: [8]byte
+ ctx: botan.mac_t
+ init(&ctx, key[:], 1, 3)
+ update(&ctx, msg[:])
+ final(&ctx, dst[:])
+ return util.U64_LE(dst[:])
+}
+
+// sum_string_to_buffer_1_3 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_string_to_buffer_1_3 :: proc(msg, key: string, dst: []byte) {
+ sum_bytes_to_buffer_1_3(transmute([]byte)(msg), transmute([]byte)(key), dst)
+}
+
+// sum_bytes_to_buffer_1_3 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_bytes_to_buffer_1_3 :: proc(msg, key, dst: []byte) {
+ assert(len(dst) >= DIGEST_SIZE, "vendor/botan: Destination buffer needs to be at least of size 8")
+ ctx: botan.mac_t
+ init(&ctx, key[:], 1, 3)
+ update(&ctx, msg[:])
+ final(&ctx, dst[:])
+}
+
+sum_1_3 :: proc {
+ sum_string_1_3,
+ sum_bytes_1_3,
+ sum_string_to_buffer_1_3,
+ sum_bytes_to_buffer_1_3,
+}
+
+// verify_u64_1_3 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_u64_1_3 :: proc (tag: u64 msg, key: []byte) -> bool {
+ return sum_bytes_1_3(msg, key) == tag
+}
+
+// verify_bytes_1_3 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_bytes_1_3 :: proc (tag, msg, key: []byte) -> bool {
+ derived_tag: [8]byte
+ sum_bytes_to_buffer_1_3(msg, key, derived_tag[:])
+ return crypto.compare_constant_time(derived_tag[:], tag) == 1
+}
+
+verify_1_3 :: proc {
+ verify_bytes_1_3,
+ verify_u64_1_3,
+}
+
+// sum_string_2_4 will hash the given message with the key and return
+// the computed hash as a u64
+sum_string_2_4 :: proc(msg, key: string) -> u64 {
+ return sum_bytes_2_4(transmute([]byte)(msg), transmute([]byte)(key))
+}
+
+// sum_bytes_2_4 will hash the given message with the key and return
+// the computed hash as a u64
+sum_bytes_2_4 :: proc (msg, key: []byte) -> u64 {
+ dst: [8]byte
+ ctx: botan.mac_t
+ init(&ctx, key[:])
+ update(&ctx, msg[:])
+ final(&ctx, dst[:])
+ return util.U64_LE(dst[:])
+}
+
+// sum_string_to_buffer_2_4 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_string_to_buffer_2_4 :: proc(msg, key: string, dst: []byte) {
+ sum_bytes_to_buffer_2_4(transmute([]byte)(msg), transmute([]byte)(key), dst)
+}
+
+// sum_bytes_to_buffer_2_4 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_bytes_to_buffer_2_4 :: proc(msg, key, dst: []byte) {
+ assert(len(dst) >= DIGEST_SIZE, "vendor/botan: Destination buffer needs to be at least of size 8")
+ ctx: botan.mac_t
+ init(&ctx, key[:])
+ update(&ctx, msg[:])
+ final(&ctx, dst[:])
+}
+
+sum_2_4 :: proc {
+ sum_string_2_4,
+ sum_bytes_2_4,
+ sum_string_to_buffer_2_4,
+ sum_bytes_to_buffer_2_4,
+}
+
+sum_string :: sum_string_2_4
+sum_bytes :: sum_bytes_2_4
+sum_string_to_buffer :: sum_string_to_buffer_2_4
+sum_bytes_to_buffer :: sum_bytes_to_buffer_2_4
+sum :: proc {
+ sum_string,
+ sum_bytes,
+ sum_string_to_buffer,
+ sum_bytes_to_buffer,
+}
+
+
+// verify_u64_2_4 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_u64_2_4 :: proc (tag: u64 msg, key: []byte) -> bool {
+ return sum_bytes_2_4(msg, key) == tag
+}
+
+// verify_bytes_2_4 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_bytes_2_4 :: proc (tag, msg, key: []byte) -> bool {
+ derived_tag: [8]byte
+ sum_bytes_to_buffer_2_4(msg, key, derived_tag[:])
+ return crypto.compare_constant_time(derived_tag[:], tag) == 1
+}
+
+verify_2_4 :: proc {
+ verify_bytes_2_4,
+ verify_u64_2_4,
+}
+
+verify_bytes :: verify_bytes_2_4
+verify_u64 :: verify_u64_2_4
+verify :: proc {
+ verify_bytes,
+ verify_u64,
+}
+
+// sum_string_4_8 will hash the given message with the key and return
+// the computed hash as a u64
+sum_string_4_8 :: proc(msg, key: string) -> u64 {
+ return sum_bytes_4_8(transmute([]byte)(msg), transmute([]byte)(key))
+}
+
+// sum_bytes_4_8 will hash the given message with the key and return
+// the computed hash as a u64
+sum_bytes_4_8 :: proc (msg, key: []byte) -> u64 {
+ dst: [8]byte
+ ctx: botan.mac_t
+ init(&ctx, key[:], 4, 8)
+ update(&ctx, msg[:])
+ final(&ctx, dst[:])
+ return util.U64_LE(dst[:])
+}
+
+// sum_string_to_buffer_4_8 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_string_to_buffer_4_8 :: proc(msg, key: string, dst: []byte) {
+ sum_bytes_to_buffer_2_4(transmute([]byte)(msg), transmute([]byte)(key), dst)
+}
+
+// sum_bytes_to_buffer_4_8 will hash the given message with the key and write
+// the computed hash into the provided destination buffer
+sum_bytes_to_buffer_4_8 :: proc(msg, key, dst: []byte) {
+ assert(len(dst) >= DIGEST_SIZE, "vendor/botan: Destination buffer needs to be at least of size 8")
+ ctx: botan.mac_t
+ init(&ctx, key[:], 4, 8)
+ update(&ctx, msg[:])
+ final(&ctx, dst[:])
+}
+
+sum_4_8 :: proc {
+ sum_string_4_8,
+ sum_bytes_4_8,
+ sum_string_to_buffer_4_8,
+ sum_bytes_to_buffer_4_8,
+}
+
+// verify_u64_4_8 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_u64_4_8 :: proc (tag: u64 msg, key: []byte) -> bool {
+ return sum_bytes_4_8(msg, key) == tag
+}
+
+// verify_bytes_4_8 will check if the supplied tag matches with the output you
+// will get from the provided message and key
+verify_bytes_4_8 :: proc (tag, msg, key: []byte) -> bool {
+ derived_tag: [8]byte
+ sum_bytes_to_buffer_4_8(msg, key, derived_tag[:])
+ return crypto.compare_constant_time(derived_tag[:], tag) == 1
+}
+
+verify_4_8 :: proc {
+ verify_bytes_4_8,
+ verify_u64_4_8,
+}
+
+/*
+ Low level API
+*/
+
+Context :: botan.mac_t
+
+init :: proc(ctx: ^botan.mac_t, key: []byte, c_rounds := 2, d_rounds := 4) {
+ assert(len(key) == KEY_SIZE, "vendor/botan: Invalid key size, want 16")
+ is_valid_setting := (c_rounds == 1 && d_rounds == 3) ||
+ (c_rounds == 2 && d_rounds == 4) ||
+ (c_rounds == 4 && d_rounds == 8)
+ assert(is_valid_setting, "vendor/botan: Incorrect rounds set up. Valid pairs are (1,3), (2,4) and (4,8)")
+ if c_rounds == 1 && d_rounds == 3 {
+ botan.mac_init(ctx, botan.MAC_SIPHASH_1_3, 0)
+ } else if c_rounds == 2 && d_rounds == 4 {
+ botan.mac_init(ctx, botan.MAC_SIPHASH_2_4, 0)
+ } else if c_rounds == 4 && d_rounds == 8 {
+ botan.mac_init(ctx, botan.MAC_SIPHASH_4_8, 0)
+ }
+ botan.mac_set_key(ctx^, len(key) == 0 ? nil : &key[0], uint(len(key)))
+}
+
+update :: proc "contextless" (ctx: ^botan.mac_t, data: []byte) {
+ botan.mac_update(ctx^, len(data) == 0 ? nil : &data[0], uint(len(data)))
+}
+
+final :: proc(ctx: ^botan.mac_t, dst: []byte) {
+ botan.mac_final(ctx^, &dst[0])
+ reset(ctx)
+}
+
+reset :: proc(ctx: ^botan.mac_t) {
+ botan.mac_destroy(ctx^)
+} \ No newline at end of file
diff --git a/vendor/botan/skein512/skein512.odin b/vendor/botan/skein512/skein512.odin
index 490eeba03..4fed07853 100644
--- a/vendor/botan/skein512/skein512.odin
+++ b/vendor/botan/skein512/skein512.odin
@@ -47,7 +47,7 @@ hash_bytes_256 :: proc(data: []byte) -> [DIGEST_SIZE_256]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_256 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_256(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_256(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_256 will hash the given input and write the
@@ -126,7 +126,7 @@ hash_bytes_512 :: proc(data: []byte) -> [DIGEST_SIZE_512]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_512 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_512(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_512(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_512 will hash the given input and write the
@@ -205,7 +205,7 @@ hash_bytes_slice :: proc(data: []byte, bit_size: int, allocator := context.alloc
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_slice :: proc(data: string, hash: []byte, bit_size: int, allocator := context.allocator) {
- hash_bytes_to_buffer_slice(transmute([]byte)(data), hash, bit_size, allocator);
+ hash_bytes_to_buffer_slice(transmute([]byte)(data), hash, bit_size, allocator)
}
// hash_bytes_to_buffer_slice will hash the given input and write the
diff --git a/vendor/botan/sm3/sm3.odin b/vendor/botan/sm3/sm3.odin
index 7eb3f1f8d..75cf40679 100644
--- a/vendor/botan/sm3/sm3.odin
+++ b/vendor/botan/sm3/sm3.odin
@@ -44,7 +44,7 @@ hash_bytes :: proc "contextless" (data: []byte) -> [DIGEST_SIZE]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer will hash the given input and write the
diff --git a/vendor/botan/streebog/streebog.odin b/vendor/botan/streebog/streebog.odin
index cbf2047ed..20b4e6adb 100644
--- a/vendor/botan/streebog/streebog.odin
+++ b/vendor/botan/streebog/streebog.odin
@@ -45,7 +45,7 @@ hash_bytes_256 :: proc(data: []byte) -> [DIGEST_SIZE_256]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_256 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_256(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_256(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_256 will hash the given input and write the
@@ -124,7 +124,7 @@ hash_bytes_512 :: proc(data: []byte) -> [DIGEST_SIZE_512]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_512 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_512(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_512(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_512 will hash the given input and write the
diff --git a/vendor/botan/tiger/tiger.odin b/vendor/botan/tiger/tiger.odin
index b29602b26..f24dc7019 100644
--- a/vendor/botan/tiger/tiger.odin
+++ b/vendor/botan/tiger/tiger.odin
@@ -46,7 +46,7 @@ hash_bytes_128 :: proc(data: []byte) -> [DIGEST_SIZE_128]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_128 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_128(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_128(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_128 will hash the given input and write the
@@ -125,7 +125,7 @@ hash_bytes_160 :: proc(data: []byte) -> [DIGEST_SIZE_160]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_160 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_160(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_160(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_160 will hash the given input and write the
@@ -204,7 +204,7 @@ hash_bytes_192 :: proc(data: []byte) -> [DIGEST_SIZE_192]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer_192 :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer_192(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer_192(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer_192 will hash the given input and write the
diff --git a/vendor/botan/whirlpool/whirlpool.odin b/vendor/botan/whirlpool/whirlpool.odin
index 2aff3c8ed..a7c1abbe8 100644
--- a/vendor/botan/whirlpool/whirlpool.odin
+++ b/vendor/botan/whirlpool/whirlpool.odin
@@ -44,7 +44,7 @@ hash_bytes :: proc "contextless" (data: []byte) -> [DIGEST_SIZE]byte {
// computed hash to the second parameter.
// It requires that the destination buffer is at least as big as the digest size
hash_string_to_buffer :: proc(data: string, hash: []byte) {
- hash_bytes_to_buffer(transmute([]byte)(data), hash);
+ hash_bytes_to_buffer(transmute([]byte)(data), hash)
}
// hash_bytes_to_buffer will hash the given input and write the
diff --git a/vendor/darwin/Foundation/NSArray.odin b/vendor/darwin/Foundation/NSArray.odin
index 4392c2791..d6021838b 100644
--- a/vendor/darwin/Foundation/NSArray.odin
+++ b/vendor/darwin/Foundation/NSArray.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
import "core:intrinsics"
diff --git a/vendor/darwin/Foundation/NSAutoreleasePool.odin b/vendor/darwin/Foundation/NSAutoreleasePool.odin
index f0157107e..a388a7146 100644
--- a/vendor/darwin/Foundation/NSAutoreleasePool.odin
+++ b/vendor/darwin/Foundation/NSAutoreleasePool.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
@(objc_class="NSAutoreleasePool")
diff --git a/vendor/darwin/Foundation/NSBundle.odin b/vendor/darwin/Foundation/NSBundle.odin
index 2e9d0df83..5e136378b 100644
--- a/vendor/darwin/Foundation/NSBundle.odin
+++ b/vendor/darwin/Foundation/NSBundle.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
@(objc_class="NSBundle")
diff --git a/vendor/darwin/Foundation/NSData.odin b/vendor/darwin/Foundation/NSData.odin
index b5367af07..3c6369e86 100644
--- a/vendor/darwin/Foundation/NSData.odin
+++ b/vendor/darwin/Foundation/NSData.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
@(objc_class="NSData")
diff --git a/vendor/darwin/Foundation/NSDate.odin b/vendor/darwin/Foundation/NSDate.odin
index 5aef42c13..e30cb07d0 100644
--- a/vendor/darwin/Foundation/NSDate.odin
+++ b/vendor/darwin/Foundation/NSDate.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
@(objc_class="NSDate")
diff --git a/vendor/darwin/Foundation/NSDictionary.odin b/vendor/darwin/Foundation/NSDictionary.odin
index 54f2e3446..3832c05f1 100644
--- a/vendor/darwin/Foundation/NSDictionary.odin
+++ b/vendor/darwin/Foundation/NSDictionary.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
@(objc_class="NSDictionary")
diff --git a/vendor/darwin/Foundation/NSEnumerator.odin b/vendor/darwin/Foundation/NSEnumerator.odin
index 0f1bdc482..1c7ddeed2 100644
--- a/vendor/darwin/Foundation/NSEnumerator.odin
+++ b/vendor/darwin/Foundation/NSEnumerator.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
import "core:c"
diff --git a/vendor/darwin/Foundation/NSError.odin b/vendor/darwin/Foundation/NSError.odin
index 868e6acc6..23e6eaba7 100644
--- a/vendor/darwin/Foundation/NSError.odin
+++ b/vendor/darwin/Foundation/NSError.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
foreign import "system:Foundation.framework"
diff --git a/vendor/darwin/Foundation/NSLock.odin b/vendor/darwin/Foundation/NSLock.odin
index 48c3a0e23..c48b5dbad 100644
--- a/vendor/darwin/Foundation/NSLock.odin
+++ b/vendor/darwin/Foundation/NSLock.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
Locking :: struct($T: typeid) {using _: Object}
diff --git a/vendor/darwin/Foundation/NSNotification.odin b/vendor/darwin/Foundation/NSNotification.odin
index da9874bbc..ec8dddab7 100644
--- a/vendor/darwin/Foundation/NSNotification.odin
+++ b/vendor/darwin/Foundation/NSNotification.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
@(objc_class="NSNotification")
diff --git a/vendor/darwin/Foundation/NSNumber.odin b/vendor/darwin/Foundation/NSNumber.odin
index eb28b7099..9201557a3 100644
--- a/vendor/darwin/Foundation/NSNumber.odin
+++ b/vendor/darwin/Foundation/NSNumber.odin
@@ -1,10 +1,12 @@
-//+build darwin
package objc_Foundation
-import "core:c"
+when ODIN_OS == .Darwin {
+ import "core:c"
+ _ :: c
-#assert(size_of(c.long) == size_of(int))
-#assert(size_of(c.ulong) == size_of(uint))
+ #assert(size_of(c.long) == size_of(int))
+ #assert(size_of(c.ulong) == size_of(uint))
+}
@(objc_class="NSValue")
Value :: struct{using _: Copying(Value)}
diff --git a/vendor/darwin/Foundation/NSObject.odin b/vendor/darwin/Foundation/NSObject.odin
index 33ef26a23..1ce17f2f5 100644
--- a/vendor/darwin/Foundation/NSObject.odin
+++ b/vendor/darwin/Foundation/NSObject.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
import "core:intrinsics"
diff --git a/vendor/darwin/Foundation/NSRange.odin b/vendor/darwin/Foundation/NSRange.odin
index 48bce5f38..74ce595a3 100644
--- a/vendor/darwin/Foundation/NSRange.odin
+++ b/vendor/darwin/Foundation/NSRange.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
Range :: struct {
diff --git a/vendor/darwin/Foundation/NSString.odin b/vendor/darwin/Foundation/NSString.odin
index 5807db2db..45b5df37b 100644
--- a/vendor/darwin/Foundation/NSString.odin
+++ b/vendor/darwin/Foundation/NSString.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
foreign import "system:Foundation.framework"
diff --git a/vendor/darwin/Foundation/NSTypes.odin b/vendor/darwin/Foundation/NSTypes.odin
index 2cb9000e9..47f75630f 100644
--- a/vendor/darwin/Foundation/NSTypes.odin
+++ b/vendor/darwin/Foundation/NSTypes.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
import "core:intrinsics"
diff --git a/vendor/darwin/Foundation/NSURL.odin b/vendor/darwin/Foundation/NSURL.odin
index 995117a65..72e5fc906 100644
--- a/vendor/darwin/Foundation/NSURL.odin
+++ b/vendor/darwin/Foundation/NSURL.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
@(objc_class="NSURL")
diff --git a/vendor/darwin/Foundation/NSWindow.odin b/vendor/darwin/Foundation/NSWindow.odin
index 654009bda..dec5a160c 100644
--- a/vendor/darwin/Foundation/NSWindow.odin
+++ b/vendor/darwin/Foundation/NSWindow.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Foundation
import NS "vendor:darwin/Foundation"
diff --git a/vendor/darwin/Metal/MetalClasses.odin b/vendor/darwin/Metal/MetalClasses.odin
index 4bc43002d..56d40f5f2 100644
--- a/vendor/darwin/Metal/MetalClasses.odin
+++ b/vendor/darwin/Metal/MetalClasses.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Metal
import NS "vendor:darwin/Foundation"
@@ -5509,8 +5508,8 @@ Buffer_newRemoteBufferViewForDevice :: #force_inline proc(self: ^Buffer, device:
return msgSend(^Buffer, self, "newRemoteBufferViewForDevice:", device)
}
@(objc_type=Buffer, objc_name="newTexture")
-Buffer_newTexture :: #force_inline proc(self: ^Buffer, descriptor: ^TextureDescriptor, offset: NS.UInteger, bytesPerRow: NS.UInteger) -> ^Buffer {
- return msgSend(^Buffer, self, "newTextureWithDescriptor:offset:bytesPerRow:", descriptor, offset, bytesPerRow)
+Buffer_newTexture :: #force_inline proc(self: ^Buffer, descriptor: ^TextureDescriptor, offset: NS.UInteger, bytesPerRow: NS.UInteger) -> ^Texture {
+ return msgSend(^Texture, self, "newTextureWithDescriptor:offset:bytesPerRow:", descriptor, offset, bytesPerRow)
}
@(objc_type=Buffer, objc_name="remoteStorageBuffer")
Buffer_remoteStorageBuffer :: #force_inline proc(self: ^Buffer) -> ^Buffer {
@@ -6590,8 +6589,8 @@ Device_newRasterizationRateMap :: #force_inline proc(self: ^Device, descriptor:
return msgSend(^RasterizationRateMap, self, "newRasterizationRateMapWithDescriptor:", descriptor)
}
@(objc_type=Device, objc_name="newRenderPipelineStateWithDescriptorWithCompletionHandler")
-Device_newRenderPipelineStateWithDescriptorWithCompletionHandler :: #force_inline proc(self: ^Device, descriptor: ^RenderPipelineDescriptor, completionHandler: NewRenderPipelineStateCompletionHandler) {
- msgSend(nil, self, "newRenderPipelineStateWithDescriptor:completionHandler:", descriptor, completionHandler)
+Device_newRenderPipelineStateWithDescriptorWithCompletionHandler :: #force_inline proc(self: ^Device, descriptor: ^RenderPipelineDescriptor, completionHandler: NewRenderPipelineStateCompletionHandler) -> ^RenderPipelineState {
+ return msgSend(^RenderPipelineState, self, "newRenderPipelineStateWithDescriptor:completionHandler:", descriptor, completionHandler)
}
@(objc_type=Device, objc_name="newRenderPipelineState")
Device_newRenderPipelineState :: #force_inline proc(self: ^Device, descriptor: ^RenderPipelineDescriptor) -> (pipeline: ^RenderPipelineState, error: ^NS.Error) {
@@ -6599,8 +6598,8 @@ Device_newRenderPipelineState :: #force_inline proc(self: ^Device, descriptor: ^
return
}
@(objc_type=Device, objc_name="newRenderPipelineStateWithDescriptorWithOptionsAndCompletionHandler")
-Device_newRenderPipelineStateWithDescriptorWithOptionsAndCompletionHandler :: #force_inline proc(self: ^Device, descriptor: ^RenderPipelineDescriptor, options: PipelineOption, completionHandler: NewRenderPipelineStateWithReflectionCompletionHandler) {
- msgSend(nil, self, "newRenderPipelineStateWithDescriptor:options:completionHandler:", descriptor, options, completionHandler)
+Device_newRenderPipelineStateWithDescriptorWithOptionsAndCompletionHandler :: #force_inline proc(self: ^Device, descriptor: ^RenderPipelineDescriptor, options: PipelineOption, completionHandler: NewRenderPipelineStateWithReflectionCompletionHandler) -> ^RenderPipelineState {
+ return msgSend(^RenderPipelineState, self, "newRenderPipelineStateWithDescriptor:options:completionHandler:", descriptor, options, completionHandler)
}
@(objc_type=Device, objc_name="newRenderPipelineStateWithDescriptorWithReflection")
Device_newRenderPipelineStateWithDescriptorWithReflection :: #force_inline proc(self: ^Device, descriptor: ^RenderPipelineDescriptor, options: PipelineOption, reflection: ^AutoreleasedRenderPipelineReflection) -> (pipeline: ^RenderPipelineState, error: ^NS.Error) {
@@ -6608,8 +6607,8 @@ Device_newRenderPipelineStateWithDescriptorWithReflection :: #force_inline proc(
return
}
@(objc_type=Device, objc_name="newRenderPipelineStateWithTileDescriptorWithCompletionHandler")
-Device_newRenderPipelineStateWithTileDescriptorWithCompletionHandler :: #force_inline proc(self: ^Device, descriptor: ^TileRenderPipelineDescriptor, options: PipelineOption, completionHandler: NewRenderPipelineStateWithReflectionCompletionHandler) {
- msgSend(nil, self, "newRenderPipelineStateWithTileDescriptor:options:completionHandler:", descriptor, options, completionHandler)
+Device_newRenderPipelineStateWithTileDescriptorWithCompletionHandler :: #force_inline proc(self: ^Device, descriptor: ^TileRenderPipelineDescriptor, options: PipelineOption, completionHandler: NewRenderPipelineStateWithReflectionCompletionHandler) -> ^RenderPipelineState {
+ return msgSend(^RenderPipelineState, self, "newRenderPipelineStateWithTileDescriptor:options:completionHandler:", descriptor, options, completionHandler)
}
@(objc_type=Device, objc_name="newRenderPipelineStateWithTileDescriptorWithReflection")
Device_newRenderPipelineStateWithTileDescriptorWithReflection :: #force_inline proc(self: ^Device, descriptor: ^TileRenderPipelineDescriptor, options: PipelineOption, reflection: ^AutoreleasedRenderPipelineReflection) -> (pipeline: ^RenderPipelineState, error: ^NS.Error) {
@@ -6637,8 +6636,8 @@ Device_newSharedTextureWithHandle :: #force_inline proc(self: ^Device, sharedHan
return msgSend(^SharedEvent, self, "newSharedTextureWithHandle:", sharedHandle)
}
@(objc_type=Device, objc_name="newTexture")
-Device_newTexture :: #force_inline proc(self: ^Device, desc: ^TextureDescriptor) -> ^SharedEvent {
- return msgSend(^SharedEvent, self, "newTextureWithDescriptor:", desc)
+Device_newTexture :: #force_inline proc(self: ^Device, desc: ^TextureDescriptor) -> ^Texture {
+ return msgSend(^Texture, self, "newTextureWithDescriptor:", desc)
}
@(objc_type=Device, objc_name="newTextureWithIOSurface")
Device_newTextureWithIOSurface :: #force_inline proc(self: ^Device, descriptor: ^TextureDescriptor, iosurface: IOSurfaceRef, plane: NS.UInteger) -> ^Texture {
@@ -7102,24 +7101,24 @@ Heap_label :: #force_inline proc(self: ^Heap) -> ^NS.String {
return msgSend(^NS.String, self, "label")
}
@(objc_type=Heap, objc_name="maxAvailableSizeWithAlignment")
-Heap_maxAvailableSizeWithAlignment :: #force_inline proc(self: ^Heap, alignment: NS.UInteger) -> ^Heap {
- return msgSend(^Heap, self, "maxAvailableSizeWithAlignment:", alignment)
+Heap_maxAvailableSizeWithAlignment :: #force_inline proc(self: ^Heap, alignment: NS.UInteger) -> NS.UInteger {
+ return msgSend(NS.UInteger, self, "maxAvailableSizeWithAlignment:", alignment)
}
@(objc_type=Heap, objc_name="newBuffer")
-Heap_newBuffer :: #force_inline proc(self: ^Heap, length: NS.UInteger, options: ResourceOptions) -> ^Heap {
- return msgSend(^Heap, self, "newBufferWithLength:options:", length, options)
+Heap_newBuffer :: #force_inline proc(self: ^Heap, length: NS.UInteger, options: ResourceOptions) -> ^Buffer {
+ return msgSend(^Buffer, self, "newBufferWithLength:options:", length, options)
}
@(objc_type=Heap, objc_name="newBufferWithOptions")
-Heap_newBufferWithOptions :: #force_inline proc(self: ^Heap, length: NS.UInteger, options: ResourceOptions, offset: NS.UInteger) -> ^Heap {
- return msgSend(^Heap, self, "newBufferWithLength:options:offset:", length, options, offset)
+Heap_newBufferWithOptions :: #force_inline proc(self: ^Heap, length: NS.UInteger, options: ResourceOptions, offset: NS.UInteger) -> ^Buffer {
+ return msgSend(^Buffer, self, "newBufferWithLength:options:offset:", length, options, offset)
}
@(objc_type=Heap, objc_name="newTexture")
-Heap_newTexture :: #force_inline proc(self: ^Heap, desc: ^TextureDescriptor) -> ^Heap {
- return msgSend(^Heap, self, "newTextureWithDescriptor:", desc)
+Heap_newTexture :: #force_inline proc(self: ^Heap, desc: ^TextureDescriptor) -> ^Texture {
+ return msgSend(^Texture, self, "newTextureWithDescriptor:", desc)
}
@(objc_type=Heap, objc_name="newTextureWithOffset")
-Heap_newTextureWithOffset :: #force_inline proc(self: ^Heap, descriptor: ^TextureDescriptor, offset: NS.UInteger) -> ^Heap {
- return msgSend(^Heap, self, "newTextureWithDescriptor:offset:", descriptor, offset)
+Heap_newTextureWithOffset :: #force_inline proc(self: ^Heap, descriptor: ^TextureDescriptor, offset: NS.UInteger) -> ^Texture {
+ return msgSend(^Texture, self, "newTextureWithDescriptor:offset:", descriptor, offset)
}
@(objc_type=Heap, objc_name="resourceOptions")
Heap_resourceOptions :: #force_inline proc(self: ^Heap) -> ResourceOptions {
diff --git a/vendor/darwin/Metal/MetalEnums.odin b/vendor/darwin/Metal/MetalEnums.odin
index 5cfa33558..7d72483ff 100644
--- a/vendor/darwin/Metal/MetalEnums.odin
+++ b/vendor/darwin/Metal/MetalEnums.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Metal
import NS "vendor:darwin/Foundation"
@@ -27,7 +26,7 @@ AccelerationStructureInstanceDescriptorType :: enum NS.UInteger {
Default = 0,
UserID = 1,
Motion = 2,
-};
+}
DataType :: enum NS.UInteger {
diff --git a/vendor/darwin/Metal/MetalErrors.odin b/vendor/darwin/Metal/MetalErrors.odin
index da37b59ff..f214466e5 100644
--- a/vendor/darwin/Metal/MetalErrors.odin
+++ b/vendor/darwin/Metal/MetalErrors.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Metal
import NS "vendor:darwin/Foundation"
diff --git a/vendor/darwin/Metal/MetalProcedures.odin b/vendor/darwin/Metal/MetalProcedures.odin
index 24ec2f8dd..b76c7f541 100644
--- a/vendor/darwin/Metal/MetalProcedures.odin
+++ b/vendor/darwin/Metal/MetalProcedures.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Metal
import NS "vendor:darwin/Foundation"
diff --git a/vendor/darwin/Metal/MetalTypes.odin b/vendor/darwin/Metal/MetalTypes.odin
index 1aabfa83e..673769c09 100644
--- a/vendor/darwin/Metal/MetalTypes.odin
+++ b/vendor/darwin/Metal/MetalTypes.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_Metal
import NS "vendor:darwin/Foundation"
diff --git a/vendor/darwin/QuartzCore/QuartzCore.odin b/vendor/darwin/QuartzCore/QuartzCore.odin
index 7bcf216f1..fb6e04b07 100644
--- a/vendor/darwin/QuartzCore/QuartzCore.odin
+++ b/vendor/darwin/QuartzCore/QuartzCore.odin
@@ -1,4 +1,3 @@
-//+build darwin
package objc_QuartzCore
import NS "vendor:darwin/Foundation"
diff --git a/vendor/directx/d3d11/d3d11.odin b/vendor/directx/d3d11/d3d11.odin
new file mode 100644
index 000000000..2adb7925a
--- /dev/null
+++ b/vendor/directx/d3d11/d3d11.odin
@@ -0,0 +1,3627 @@
+package directx_d3d11
+
+foreign import "system:d3d11.lib"
+
+import "../dxgi"
+import "../d3d_compiler"
+
+IUnknown :: dxgi.IUnknown
+IUnknown_VTable :: dxgi.IUnknown_VTable
+
+HANDLE :: dxgi.HANDLE
+HMODULE :: dxgi.HMODULE
+HRESULT :: dxgi.HRESULT
+GUID :: dxgi.GUID
+IID :: dxgi.IID
+SIZE_T :: dxgi.SIZE_T
+BOOL :: dxgi.BOOL
+
+RECT :: dxgi.RECT
+SIZE :: dxgi.SIZE
+
+IModuleInstance :: d3d_compiler.ID3D11ModuleInstance
+IBlob :: d3d_compiler.ID3DBlob
+IModule :: d3d_compiler.ID3D11Module
+
+@(default_calling_convention="stdcall", link_prefix="D3D11")
+foreign d3d11 {
+ CreateDevice :: proc(
+ pAdapter: ^dxgi.IAdapter,
+ DriverType: DRIVER_TYPE,
+ Software: HMODULE,
+ Flags: CREATE_DEVICE_FLAGS,
+ pFeatureLevels: ^FEATURE_LEVEL,
+ FeatureLevels: u32,
+ SDKVersion: u32,
+ ppDevice: ^^IDevice,
+ pFeatureLevel: ^FEATURE_LEVEL,
+ ppImmediateContext: ^^IDeviceContext,
+ ) -> HRESULT ---
+ CreateDeviceAndSwapChain :: proc(
+ pAdapter: ^dxgi.IAdapter,
+ DriverType: DRIVER_TYPE,
+ Software: HMODULE,
+ Flags: u32,
+ pFeatureLevels: ^FEATURE_LEVEL,
+ FeatureLevels: u32,
+ SDKVersion: u32,
+ pSwapChainDesc: ^dxgi.SWAP_CHAIN_DESC,
+ ppSwapChain: ^^dxgi.ISwapChain,
+ ppDevice: ^^IDevice,
+ pFeatureLevel: ^FEATURE_LEVEL,
+ ppImmediateContext: ^^IDeviceContext,
+ ) -> HRESULT ---
+}
+
+foreign d3d11 {
+ WKPDID_D3DDebugObjectNameW: GUID
+ WKPDID_CommentStringW: GUID
+}
+
+@(link_prefix="D3D_")
+foreign d3d11 {
+ TEXTURE_LAYOUT_ROW_MAJOR: GUID
+ TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE: GUID
+}
+
+@(link_prefix="D3D11_")
+foreign d3d11 {
+ DECODER_PROFILE_MPEG2_MOCOMP: GUID
+ DECODER_PROFILE_MPEG2_IDCT: GUID
+ DECODER_PROFILE_MPEG2_VLD: GUID
+ DECODER_PROFILE_MPEG1_VLD: GUID
+ DECODER_PROFILE_MPEG2and1_VLD: GUID
+ DECODER_PROFILE_H264_MOCOMP_NOFGT: GUID
+ DECODER_PROFILE_H264_MOCOMP_FGT: GUID
+ DECODER_PROFILE_H264_IDCT_NOFGT: GUID
+ DECODER_PROFILE_H264_IDCT_FGT: GUID
+ DECODER_PROFILE_H264_VLD_NOFGT: GUID
+ DECODER_PROFILE_H264_VLD_FGT: GUID
+ DECODER_PROFILE_H264_VLD_WITHFMOASO_NOFGT: GUID
+ DECODER_PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT: GUID
+ DECODER_PROFILE_H264_VLD_STEREO_NOFGT: GUID
+ DECODER_PROFILE_H264_VLD_MULTIVIEW_NOFGT: GUID
+ DECODER_PROFILE_WMV8_POSTPROC: GUID
+ DECODER_PROFILE_WMV8_MOCOMP: GUID
+ DECODER_PROFILE_WMV9_POSTPROC: GUID
+ DECODER_PROFILE_WMV9_MOCOMP: GUID
+ DECODER_PROFILE_WMV9_IDCT: GUID
+ DECODER_PROFILE_VC1_POSTPROC: GUID
+ DECODER_PROFILE_VC1_MOCOMP: GUID
+ DECODER_PROFILE_VC1_IDCT: GUID
+ DECODER_PROFILE_VC1_VLD: GUID
+ DECODER_PROFILE_VC1_D2010: GUID
+ DECODER_PROFILE_MPEG4PT2_VLD_SIMPLE: GUID
+ DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC: GUID
+ DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC: GUID
+ DECODER_PROFILE_HEVC_VLD_MAIN: GUID
+ DECODER_PROFILE_HEVC_VLD_MAIN10: GUID
+ DECODER_PROFILE_VP9_VLD_PROFILE0: GUID
+ DECODER_PROFILE_VP9_VLD_10BIT_PROFILE2: GUID
+ DECODER_PROFILE_VP8_VLD: GUID
+
+ CRYPTO_TYPE_AES128_CTR: GUID
+ DECODER_ENCRYPTION_HW_CENC: GUID
+ DECODER_BITSTREAM_ENCRYPTION_TYPE_CENC: GUID
+ DECODER_BITSTREAM_ENCRYPTION_TYPE_CBCS: GUID
+ KEY_EXCHANGE_HW_PROTECTION: GUID
+
+ AUTHENTICATED_QUERY_PROTECTION: GUID
+ AUTHENTICATED_QUERY_CHANNEL_TYPE: GUID
+ AUTHENTICATED_QUERY_DEVICE_HANDLE: GUID
+ AUTHENTICATED_QUERY_CRYPTO_SESSION: GUID
+ AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT: GUID
+ AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS: GUID
+ AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT: GUID
+ AUTHENTICATED_QUERY_OUTPUT_ID_COUNT: GUID
+ AUTHENTICATED_QUERY_OUTPUT_ID: GUID
+ AUTHENTICATED_QUERY_ACCESSIBILITY_ATTRIBUTES: GUID
+ AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT: GUID
+ AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID: GUID
+ AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE: GUID
+ AUTHENTICATED_CONFIGURE_INITIALIZE: GUID
+ AUTHENTICATED_CONFIGURE_PROTECTION: GUID
+ AUTHENTICATED_CONFIGURE_CRYPTO_SESSION: GUID
+ AUTHENTICATED_CONFIGURE_SHARED_RESOURCE: GUID
+ AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE: GUID
+
+ KEY_EXCHANGE_RSAES_OAEP: GUID
+}
+
+FL9_1_REQ_TEXTURE1D_U_DIMENSION :: 2048
+FL9_3_REQ_TEXTURE1D_U_DIMENSION :: 4096
+FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION :: 2048
+FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION :: 4096
+FL9_1_REQ_TEXTURECUBE_DIMENSION :: 512
+FL9_3_REQ_TEXTURECUBE_DIMENSION :: 4096
+FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION :: 256
+FL9_1_DEFAULT_MAX_ANISOTROPY :: 2
+FL9_1_IA_PRIMITIVE_MAX_COUNT :: 65535
+FL9_2_IA_PRIMITIVE_MAX_COUNT :: 1048575
+FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT :: 1
+FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT :: 4
+FL9_1_MAX_TEXTURE_REPEAT :: 128
+FL9_2_MAX_TEXTURE_REPEAT :: 2048
+FL9_3_MAX_TEXTURE_REPEAT :: 8192
+
+_8BIT_INDEX_STRIP_CUT_VALUE :: 0xff
+_16BIT_INDEX_STRIP_CUT_VALUE :: 0xffff
+_32BIT_INDEX_STRIP_CUT_VALUE :: 0xffffffff
+
+ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT :: 9
+
+CLIP_OR_CULL_DISTANCE_COUNT :: 8
+CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT :: 2
+
+COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT :: 14
+COMMONSHADER_CONSTANT_BUFFER_COMPONENTS :: 4
+COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT :: 32
+COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT :: 15
+COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT :: 16
+COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS :: 4
+COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT :: 15
+COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST :: 1
+COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS :: 1
+COMMONSHADER_FLOWCONTROL_NESTING_LIMIT :: 64
+COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS :: 4
+COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT :: 1
+COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST :: 1
+COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS :: 1
+COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT :: 32
+COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS :: 1
+COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT :: 128
+COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST :: 1
+COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS :: 1
+COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT :: 128
+COMMONSHADER_SAMPLER_REGISTER_COMPONENTS :: 1
+COMMONSHADER_SAMPLER_REGISTER_COUNT :: 16
+COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST :: 1
+COMMONSHADER_SAMPLER_REGISTER_READ_PORTS :: 1
+COMMONSHADER_SAMPLER_SLOT_COUNT :: 16
+COMMONSHADER_SUBROUTINE_NESTING_LIMIT :: 32
+COMMONSHADER_TEMP_REGISTER_COMPONENTS :: 4
+COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT :: 32
+COMMONSHADER_TEMP_REGISTER_COUNT :: 4096
+COMMONSHADER_TEMP_REGISTER_READS_PER_INST :: 3
+COMMONSHADER_TEMP_REGISTER_READ_PORTS :: 3
+COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX :: 10
+COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN :: -10
+COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE :: -8
+COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE :: 7
+
+CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 256
+CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP :: 64
+CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 240
+CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP :: 68
+CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 224
+CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP :: 72
+CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 208
+CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP :: 76
+CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 192
+CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP :: 84
+CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 176
+CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP :: 92
+CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 160
+CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP :: 100
+CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 144
+CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP :: 112
+CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 128
+CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP :: 128
+CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 112
+CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP :: 144
+CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 96
+CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP :: 168
+CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 80
+CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP :: 204
+CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 64
+CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP :: 256
+CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 48
+CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP :: 340
+CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 32
+CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP :: 512
+CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 16
+CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP :: 768
+CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION :: 1
+CS_4_X_RAW_UAV_BYTE_ALIGNMENT :: 256
+CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP :: 768
+CS_4_X_THREAD_GROUP_MAX_X :: 768
+CS_4_X_THREAD_GROUP_MAX_Y :: 768
+CS_4_X_UAV_REGISTER_COUNT :: 1
+
+CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION :: 65535
+CS_TGSM_REGISTER_COUNT :: 8192
+CS_TGSM_REGISTER_READS_PER_INST :: 1
+CS_TGSM_RESOURCE_REGISTER_COMPONENTS :: 1
+CS_TGSM_RESOURCE_REGISTER_READ_PORTS :: 1
+CS_THREADGROUPID_REGISTER_COMPONENTS :: 3
+CS_THREADGROUPID_REGISTER_COUNT :: 1
+CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS :: 1
+CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT :: 1
+CS_THREADIDINGROUP_REGISTER_COMPONENTS :: 3
+CS_THREADIDINGROUP_REGISTER_COUNT :: 1
+CS_THREADID_REGISTER_COMPONENTS :: 3
+CS_THREADID_REGISTER_COUNT :: 1
+CS_THREAD_GROUP_MAX_THREADS_PER_GROUP :: 1024
+CS_THREAD_GROUP_MAX_X :: 1024
+CS_THREAD_GROUP_MAX_Y :: 1024
+CS_THREAD_GROUP_MAX_Z :: 64
+CS_THREAD_GROUP_MIN_X :: 1
+CS_THREAD_GROUP_MIN_Y :: 1
+CS_THREAD_GROUP_MIN_Z :: 1
+CS_THREAD_LOCAL_TEMP_REGISTER_POOL :: 16384
+
+DEFAULT_BLEND_FACTOR_ALPHA :: 1.0
+DEFAULT_BLEND_FACTOR_BLUE :: 1.0
+DEFAULT_BLEND_FACTOR_GREEN :: 1.0
+DEFAULT_BLEND_FACTOR_RED :: 1.0
+DEFAULT_BORDER_COLOR_COMPONENT :: 0.0
+DEFAULT_DEPTH_BIAS :: 0
+DEFAULT_DEPTH_BIAS_CLAMP :: 0.0
+DEFAULT_MAX_ANISOTROPY :: 16
+DEFAULT_MIP_LOD_BIAS :: 0.0
+DEFAULT_RENDER_TARGET_ARRAY_INDEX :: 0
+DEFAULT_SAMPLE_MASK :: 0xffffffff
+DEFAULT_SCISSOR_ENDX :: 0
+DEFAULT_SCISSOR_ENDY :: 0
+DEFAULT_SCISSOR_STARTX :: 0
+DEFAULT_SCISSOR_STARTY :: 0
+DEFAULT_SLOPE_SCALED_DEPTH_BIAS :: 0.0
+DEFAULT_STENCIL_READ_MASK :: 0xff
+DEFAULT_STENCIL_REFERENCE :: 0
+DEFAULT_STENCIL_WRITE_MASK :: 0xff
+DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX :: 0
+DEFAULT_VIEWPORT_HEIGHT :: 0
+DEFAULT_VIEWPORT_MAX_DEPTH :: 0.0
+DEFAULT_VIEWPORT_MIN_DEPTH :: 0.0
+DEFAULT_VIEWPORT_TOPLEFTX :: 0
+DEFAULT_VIEWPORT_TOPLEFTY :: 0
+DEFAULT_VIEWPORT_WIDTH :: 0
+
+DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS :: 3968
+DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS :: 4
+DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_INPUT_CONTROL_POINT_REGISTER_COUNT :: 32
+DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST :: 2
+DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS :: 1
+DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS :: 3
+DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_INPUT_DOMAIN_POINT_REGISTER_COUNT :: 1
+DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST :: 2
+DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS :: 1
+DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS :: 4
+DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT :: 32
+DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST :: 2
+DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS :: 1
+DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS :: 1
+DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT :: 1
+DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST :: 2
+DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS :: 1
+DS_OUTPUT_REGISTER_COMPONENTS :: 4
+DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_OUTPUT_REGISTER_COUNT :: 32
+
+FLOAT16_FUSED_TOLERANCE_IN_ULP :: 0.6
+FLOAT32_MAX :: 3.402823466e+38
+FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP :: 0.6
+FLOAT_TO_SRGB_EXPONENT_DENOMINATOR :: 2.4
+FLOAT_TO_SRGB_EXPONENT_NUMERATOR :: 1.0
+FLOAT_TO_SRGB_OFFSET :: 0.055
+FLOAT_TO_SRGB_SCALE_1 :: 12.92
+FLOAT_TO_SRGB_SCALE_2 :: 1.055
+FLOAT_TO_SRGB_THRESHOLD :: 0.0031308
+FTOI_INSTRUCTION_MAX_INPUT :: 2147483647.999
+FTOI_INSTRUCTION_MIN_INPUT :: -2147483648.999
+FTOU_INSTRUCTION_MAX_INPUT :: 4294967295.999
+FTOU_INSTRUCTION_MIN_INPUT :: 0.0
+GS_INPUT_INSTANCE_ID_READS_PER_INST :: 2
+GS_INPUT_INSTANCE_ID_READ_PORTS :: 1
+GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS :: 1
+GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+GS_INPUT_INSTANCE_ID_REGISTER_COUNT :: 1
+GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS :: 1
+GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT :: 32
+GS_INPUT_PRIM_CONST_REGISTER_COUNT :: 1
+GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST :: 2
+GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS :: 1
+GS_INPUT_REGISTER_COMPONENTS :: 4
+GS_INPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+GS_INPUT_REGISTER_COUNT :: 32
+GS_INPUT_REGISTER_READS_PER_INST :: 2
+GS_INPUT_REGISTER_READ_PORTS :: 1
+GS_INPUT_REGISTER_VERTICES :: 32
+GS_MAX_INSTANCE_COUNT :: 32
+GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES :: 1024
+GS_OUTPUT_ELEMENTS :: 32
+GS_OUTPUT_REGISTER_COMPONENTS :: 4
+GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+GS_OUTPUT_REGISTER_COUNT :: 32
+HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT :: 32
+HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT :: 32
+HS_CONTROL_POINT_REGISTER_COMPONENTS :: 4
+HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_CONTROL_POINT_REGISTER_READS_PER_INST :: 2
+HS_CONTROL_POINT_REGISTER_READ_PORTS :: 1
+HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND :: 0xffffffff
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS :: 1
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT :: 1
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST :: 2
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS :: 1
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS :: 1
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT :: 1
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST :: 2
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS :: 1
+HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS :: 1
+HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT :: 1
+HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST :: 2
+HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS :: 1
+HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND :: 0xffffffff
+HS_MAXTESSFACTOR_LOWER_BOUND :: 1.0
+HS_MAXTESSFACTOR_UPPER_BOUND :: 64.0
+HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS :: 3968
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS :: 1
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT :: 1
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST :: 2
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS :: 1
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS :: 4
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT :: 32
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST :: 2
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS :: 1
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS :: 128
+IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES :: 0
+IA_DEFAULT_PRIMITIVE_TOPOLOGY :: 0
+IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES :: 0
+IA_INDEX_INPUT_RESOURCE_SLOT_COUNT :: 1
+IA_INSTANCE_ID_BIT_COUNT :: 32
+IA_INTEGER_ARITHMETIC_BIT_COUNT :: 32
+IA_PATCH_MAX_CONTROL_POINT_COUNT :: 32
+IA_PRIMITIVE_ID_BIT_COUNT :: 32
+IA_VERTEX_ID_BIT_COUNT :: 32
+IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT :: 32
+IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS :: 128
+IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT :: 32
+INTEGER_DIVIDE_BY_ZERO_QUOTIENT :: 0xffffffff
+INTEGER_DIVIDE_BY_ZERO_REMAINDER :: 0xffffffff
+KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL :: 0xffffffff
+KEEP_UNORDERED_ACCESS_VIEWS :: 0xffffffff
+LINEAR_GAMMA :: 1.0
+MAJOR_VERSION :: 11
+MAX_BORDER_COLOR_COMPONENT :: 1.0
+MAX_DEPTH :: 1.0
+MAX_MAXANISOTROPY :: 16
+MAX_MULTISAMPLE_SAMPLE_COUNT :: 32
+MAX_POSITION_VALUE :: 3.402823466e+34
+MAX_TEXTURE_DIMENSION_2_TO_EXP :: 17
+MINOR_VERSION :: 0
+MIN_BORDER_COLOR_COMPONENT :: 0.0
+MIN_DEPTH :: 0.0
+MIN_MAXANISOTROPY :: 0
+MIP_LOD_BIAS_MAX :: 15.99
+MIP_LOD_BIAS_MIN :: -16.0
+MIP_LOD_FRACTIONAL_BIT_COUNT :: 8
+MIP_LOD_RANGE_BIT_COUNT :: 8
+MULTISAMPLE_ANTIALIAS_LINE_WIDTH :: 1.4
+NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT :: 0
+PIXEL_ADDRESS_RANGE_BIT_COUNT :: 15
+PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT :: 16
+PS_CS_UAV_REGISTER_COMPONENTS :: 1
+PS_CS_UAV_REGISTER_COUNT :: 8
+PS_CS_UAV_REGISTER_READS_PER_INST :: 1
+PS_CS_UAV_REGISTER_READ_PORTS :: 1
+PS_FRONTFACING_DEFAULT_VALUE :: 0xffffffff
+PS_FRONTFACING_FALSE_VALUE :: 0
+PS_FRONTFACING_TRUE_VALUE :: 0xffffffff
+PS_INPUT_REGISTER_COMPONENTS :: 4
+PS_INPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+PS_INPUT_REGISTER_COUNT :: 32
+PS_INPUT_REGISTER_READS_PER_INST :: 2
+PS_INPUT_REGISTER_READ_PORTS :: 1
+PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT :: 0.0
+PS_OUTPUT_DEPTH_REGISTER_COMPONENTS :: 1
+PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT :: 32
+PS_OUTPUT_DEPTH_REGISTER_COUNT :: 1
+PS_OUTPUT_MASK_REGISTER_COMPONENTS :: 1
+PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT :: 32
+PS_OUTPUT_MASK_REGISTER_COUNT :: 1
+PS_OUTPUT_REGISTER_COMPONENTS :: 4
+PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+PS_OUTPUT_REGISTER_COUNT :: 8
+PS_PIXEL_CENTER_FRACTIONAL_COMPONENT :: 0.5
+RAW_UAV_SRV_BYTE_ALIGNMENT :: 16
+REQ_BLEND_OBJECT_COUNT_PER_DEVICE :: 4096
+REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP :: 27
+REQ_CONSTANT_BUFFER_ELEMENT_COUNT :: 4096
+REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE :: 4096
+REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP :: 32
+REQ_DRAW_VERTEX_COUNT_2_TO_EXP :: 32
+REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION :: 16384
+REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT :: 1024
+REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT :: 4096
+REQ_MAXANISOTROPY :: 16
+REQ_MIP_LEVELS :: 15
+REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES :: 2048
+REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE :: 4096
+REQ_RENDER_TO_BUFFER_WINDOW_WIDTH :: 16384
+REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM :: 128
+REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM :: 0.25
+REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM :: 2048
+REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP :: 20
+REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE :: 4096
+REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION :: 2048
+REQ_TEXTURE1D_U_DIMENSION :: 16384
+REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION :: 2048
+REQ_TEXTURE2D_U_OR_V_DIMENSION :: 16384
+REQ_TEXTURE3D_U_V_OR_W_DIMENSION :: 2048
+REQ_TEXTURECUBE_DIMENSION :: 16384
+RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL :: 0
+SHADER_MAJOR_VERSION :: 5
+SHADER_MAX_INSTANCES :: 65535
+SHADER_MAX_INTERFACES :: 253
+SHADER_MAX_INTERFACE_CALL_SITES :: 4096
+SHADER_MAX_TYPES :: 65535
+SHADER_MINOR_VERSION :: 0
+SHIFT_INSTRUCTION_PAD_VALUE :: 0
+SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT :: 5
+SIMULTANEOUS_RENDER_TARGET_COUNT :: 8
+SO_BUFFER_MAX_STRIDE_IN_BYTES :: 2048
+SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES :: 512
+SO_BUFFER_SLOT_COUNT :: 4
+SO_DDI_REGISTER_INDEX_DENOTING_GAP :: 0xffffffff
+SO_NO_RASTERIZED_STREAM :: 0xffffffff
+SO_OUTPUT_COMPONENT_COUNT :: 128
+SO_STREAM_COUNT :: 4
+SPEC_DATE_DAY :: 16
+SPEC_DATE_YEAR :: 2011
+SPEC_VERSION :: 1.07
+SRGB_GAMMA :: 2.2
+SRGB_TO_FLOAT_DENOMINATOR_1 :: 12.92
+SRGB_TO_FLOAT_DENOMINATOR_2 :: 1.055
+SRGB_TO_FLOAT_EXPONENT :: 2.4
+SRGB_TO_FLOAT_OFFSET :: 0.055
+SRGB_TO_FLOAT_THRESHOLD :: 0.04045
+SRGB_TO_FLOAT_TOLERANCE_IN_ULP :: 0.5
+STANDARD_COMPONENT_BIT_COUNT :: 32
+STANDARD_COMPONENT_BIT_COUNT_DOUBLED :: 64
+STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE :: 4
+STANDARD_PIXEL_COMPONENT_COUNT :: 128
+STANDARD_PIXEL_ELEMENT_COUNT :: 32
+STANDARD_VECTOR_SIZE :: 4
+STANDARD_VERTEX_ELEMENT_COUNT :: 32
+STANDARD_VERTEX_TOTAL_COMPONENT_COUNT :: 64
+SUBPIXEL_FRACTIONAL_BIT_COUNT :: 8
+SUBTEXEL_FRACTIONAL_BIT_COUNT :: 8
+TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR :: 64
+TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR :: 64
+TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR :: 63
+TESSELLATOR_MAX_TESSELLATION_FACTOR :: 64
+TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR :: 2
+TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR :: 1
+TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR :: 1
+TEXEL_ADDRESS_RANGE_BIT_COUNT :: 16
+UNBOUND_MEMORY_ACCESS_RESULT :: 0
+VIEWPORT_AND_SCISSORRECT_MAX_INDEX :: 15
+VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE :: 16
+VIEWPORT_BOUNDS_MAX :: 32767
+VIEWPORT_BOUNDS_MIN :: -32768
+VS_INPUT_REGISTER_COMPONENTS :: 4
+VS_INPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+VS_INPUT_REGISTER_COUNT :: 32
+VS_INPUT_REGISTER_READS_PER_INST :: 2
+VS_INPUT_REGISTER_READ_PORTS :: 1
+VS_OUTPUT_REGISTER_COMPONENTS :: 4
+VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+VS_OUTPUT_REGISTER_COUNT :: 32
+WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT :: 10
+WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP :: 25
+WHQL_DRAW_VERTEX_COUNT_2_TO_EXP :: 25
+_1_UAV_SLOT_COUNT :: 64
+_2_TILED_RESOURCE_TILE_SIZE_IN_BYTES :: 65536
+_4_VIDEO_DECODER_MAX_HISTOGRAM_COMPONENTS :: 4
+_4_VIDEO_DECODER_HISTOGRAM_OFFSET_ALIGNMENT :: 256
+
+_FACD3D11 :: 0x87c
+
+APPEND_ALIGNED_ELEMENT :: 0xffffffff
+FILTER_REDUCTION_TYPE_MASK :: 0x3
+FILTER_REDUCTION_TYPE_SHIFT :: 7
+FILTER_TYPE_MASK :: 0x3
+MIN_FILTER_SHIFT :: 4
+MAG_FILTER_SHIFT :: 2
+MIP_FILTER_SHIFT :: 0
+COMPARISON_FILTERING_BIT :: 0x80
+ANISOTROPIC_FILTERING_BIT :: 0x40
+SDK_VERSION :: 7
+RETURN_PARAMETER_INDEX :: -1
+
+COMPONENT_MASK :: enum u32 { // TODO: make bit_set
+ X = 1,
+ Y = 2,
+ Z = 4,
+ W = 8,
+}
+
+SHADER_REQUIRES :: enum u32 { // TODO: make bit_set
+ DOUBLES = 0x00000001,
+ EARLY_DEPTH_STENCIL = 0x00000002,
+ UAVS_AT_EVERY_STAGE = 0x00000004,
+ _64_UAVS = 0x00000008,
+ MINIMUM_PRECISION = 0x00000010,
+ _11_1_DOUBLE_EXTENSIONS = 0x00000020,
+ _11_1_SHADER_EXTENSIONS = 0x00000040,
+ LEVEL_9_COMPARISON_FILTERING = 0x00000080,
+ TILED_RESOURCES = 0x00000100,
+}
+
+DRIVER_TYPE :: enum i32 {
+ UNKNOWN = 0,
+ HARDWARE = 1,
+ REFERENCE = 2,
+ NULL = 3,
+ SOFTWARE = 4,
+ WARP = 5,
+}
+
+FEATURE_LEVEL :: enum i32 {
+ _1_0_CORE = 4096,
+ _9_1 = 37120,
+ _9_2 = 37376,
+ _9_3 = 37632,
+ _10_0 = 40960,
+ _10_1 = 41216,
+ _11_0 = 45056,
+ _11_1 = 45312,
+ _12_0 = 49152,
+ _12_1 = 49408,
+}
+
+PRIMITIVE_TOPOLOGY :: enum i32 {
+ UNDEFINED = 0,
+ POINTLIST = 1,
+ LINELIST = 2,
+ LINESTRIP = 3,
+ TRIANGLELIST = 4,
+ TRIANGLESTRIP = 5,
+ LINELIST_ADJ = 10,
+ LINESTRIP_ADJ = 11,
+ TRIANGLELIST_ADJ = 12,
+ TRIANGLESTRIP_ADJ = 13,
+ _1_CONTROL_POINT_PATCHLIST = 33,
+ _2_CONTROL_POINT_PATCHLIST = 34,
+ _3_CONTROL_POINT_PATCHLIST = 35,
+ _4_CONTROL_POINT_PATCHLIST = 36,
+ _5_CONTROL_POINT_PATCHLIST = 37,
+ _6_CONTROL_POINT_PATCHLIST = 38,
+ _7_CONTROL_POINT_PATCHLIST = 39,
+ _8_CONTROL_POINT_PATCHLIST = 40,
+ _9_CONTROL_POINT_PATCHLIST = 41,
+ _10_CONTROL_POINT_PATCHLIST = 42,
+ _11_CONTROL_POINT_PATCHLIST = 43,
+ _12_CONTROL_POINT_PATCHLIST = 44,
+ _13_CONTROL_POINT_PATCHLIST = 45,
+ _14_CONTROL_POINT_PATCHLIST = 46,
+ _15_CONTROL_POINT_PATCHLIST = 47,
+ _16_CONTROL_POINT_PATCHLIST = 48,
+ _17_CONTROL_POINT_PATCHLIST = 49,
+ _18_CONTROL_POINT_PATCHLIST = 50,
+ _19_CONTROL_POINT_PATCHLIST = 51,
+ _20_CONTROL_POINT_PATCHLIST = 52,
+ _21_CONTROL_POINT_PATCHLIST = 53,
+ _22_CONTROL_POINT_PATCHLIST = 54,
+ _23_CONTROL_POINT_PATCHLIST = 55,
+ _24_CONTROL_POINT_PATCHLIST = 56,
+ _25_CONTROL_POINT_PATCHLIST = 57,
+ _26_CONTROL_POINT_PATCHLIST = 58,
+ _27_CONTROL_POINT_PATCHLIST = 59,
+ _28_CONTROL_POINT_PATCHLIST = 60,
+ _29_CONTROL_POINT_PATCHLIST = 61,
+ _30_CONTROL_POINT_PATCHLIST = 62,
+ _31_CONTROL_POINT_PATCHLIST = 63,
+ _32_CONTROL_POINT_PATCHLIST = 64,
+}
+
+PRIMITIVE :: enum i32 {
+ UNDEFINED = 0,
+ POINT = 1,
+ LINE = 2,
+ TRIANGLE = 3,
+ LINE_ADJ = 6,
+ TRIANGLE_ADJ = 7,
+ _1_CONTROL_POINT_PATCH = 8,
+ _2_CONTROL_POINT_PATCH = 9,
+ _3_CONTROL_POINT_PATCH = 10,
+ _4_CONTROL_POINT_PATCH = 11,
+ _5_CONTROL_POINT_PATCH = 12,
+ _6_CONTROL_POINT_PATCH = 13,
+ _7_CONTROL_POINT_PATCH = 14,
+ _8_CONTROL_POINT_PATCH = 15,
+ _9_CONTROL_POINT_PATCH = 16,
+ _10_CONTROL_POINT_PATCH = 17,
+ _11_CONTROL_POINT_PATCH = 18,
+ _12_CONTROL_POINT_PATCH = 19,
+ _13_CONTROL_POINT_PATCH = 20,
+ _14_CONTROL_POINT_PATCH = 21,
+ _15_CONTROL_POINT_PATCH = 22,
+ _16_CONTROL_POINT_PATCH = 23,
+ _17_CONTROL_POINT_PATCH = 24,
+ _18_CONTROL_POINT_PATCH = 25,
+ _19_CONTROL_POINT_PATCH = 26,
+ _20_CONTROL_POINT_PATCH = 27,
+ _21_CONTROL_POINT_PATCH = 28,
+ _22_CONTROL_POINT_PATCH = 29,
+ _23_CONTROL_POINT_PATCH = 30,
+ _24_CONTROL_POINT_PATCH = 31,
+ _25_CONTROL_POINT_PATCH = 32,
+ _26_CONTROL_POINT_PATCH = 33,
+ _27_CONTROL_POINT_PATCH = 34,
+ _28_CONTROL_POINT_PATCH = 35,
+ _29_CONTROL_POINT_PATCH = 36,
+ _30_CONTROL_POINT_PATCH = 37,
+ _31_CONTROL_POINT_PATCH = 38,
+ _32_CONTROL_POINT_PATCH = 39,
+}
+
+SRV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ BUFFER = 1,
+ TEXTURE1D = 2,
+ TEXTURE1DARRAY = 3,
+ TEXTURE2D = 4,
+ TEXTURE2DARRAY = 5,
+ TEXTURE2DMS = 6,
+ TEXTURE2DMSARRAY = 7,
+ TEXTURE3D = 8,
+ TEXTURECUBE = 9,
+ TEXTURECUBEARRAY = 10,
+ BUFFEREX = 11,
+}
+
+PFN_DESTRUCTION_CALLBACK :: #type proc "c" (a0: rawptr)
+
+
+ID3DDestructionNotifier_UUID_STRING :: "A06EB39A-50DA-425B-8C31-4EECD6C270F3"
+ID3DDestructionNotifier_UUID := &IID{0xA06EB39A, 0x50DA, 0x425B, {0x8C, 0x31, 0x4E, 0xEC, 0xD6, 0xC2, 0x70, 0xF3}}
+ID3DDestructionNotifier :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3ddestructionnotifier_vtable: ^ID3DDestructionNotifier_VTable,
+}
+ID3DDestructionNotifier_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ RegisterDestructionCallback: proc "stdcall" (this: ^ID3DDestructionNotifier, callbackFn: PFN_DESTRUCTION_CALLBACK, pData: rawptr, pCallbackID: ^u32) -> HRESULT,
+ UnregisterDestructionCallback: proc "stdcall" (this: ^ID3DDestructionNotifier, callbackID: u32) -> HRESULT,
+}
+
+
+SHADER_VARIABLE_CLASS :: enum i32 {
+ SCALAR = 0,
+ VECTOR = 1,
+ MATRIX_ROWS = 2,
+ MATRIX_COLUMNS = 3,
+ OBJECT = 4,
+ STRUCT = 5,
+ INTERFACE_CLASS = 6,
+ INTERFACE_POINTER = 7,
+}
+
+SHADER_VARIABLE_FLAGS :: enum u32 { // TODO: make bit_set
+ USERPACKED = 0x1,
+ USED = 0x2,
+ INTERFACE_POINTER = 0x4,
+ INTERFACE_PARAMETER = 0x8,
+}
+
+SHADER_VARIABLE_TYPE :: enum i32 {
+ VOID = 0,
+ BOOL = 1,
+ INT = 2,
+ FLOAT = 3,
+ STRING = 4,
+ TEXTURE = 5,
+ TEXTURE1D = 6,
+ TEXTURE2D = 7,
+ TEXTURE3D = 8,
+ TEXTURECUBE = 9,
+ SAMPLER = 10,
+ SAMPLER1D = 11,
+ SAMPLER2D = 12,
+ SAMPLER3D = 13,
+ SAMPLERCUBE = 14,
+ PIXELSHADER = 15,
+ VERTEXSHADER = 16,
+ PIXELFRAGMENT = 17,
+ VERTEXFRAGMENT = 18,
+ UINT = 19,
+ UINT8 = 20,
+ GEOMETRYSHADER = 21,
+ RASTERIZER = 22,
+ DEPTHSTENCIL = 23,
+ BLEND = 24,
+ BUFFER = 25,
+ CBUFFER = 26,
+ TBUFFER = 27,
+ TEXTURE1DARRAY = 28,
+ TEXTURE2DARRAY = 29,
+ RENDERTARGETVIEW = 30,
+ DEPTHSTENCILVIEW = 31,
+ TEXTURE2DMS = 32,
+ TEXTURE2DMSARRAY = 33,
+ TEXTURECUBEARRAY = 34,
+ HULLSHADER = 35,
+ DOMAINSHADER = 36,
+ INTERFACE_POINTER = 37,
+ COMPUTESHADER = 38,
+ DOUBLE = 39,
+ RWTEXTURE1D = 40,
+ RWTEXTURE1DARRAY = 41,
+ RWTEXTURE2D = 42,
+ RWTEXTURE2DARRAY = 43,
+ RWTEXTURE3D = 44,
+ RWBUFFER = 45,
+ BYTEADDRESS_BUFFER = 46,
+ RWBYTEADDRESS_BUFFER = 47,
+ STRUCTURED_BUFFER = 48,
+ RWSTRUCTURED_BUFFER = 49,
+ APPEND_STRUCTURED_BUFFER = 50,
+ CONSUME_STRUCTURED_BUFFER = 51,
+ MIN8FLOAT = 52,
+ MIN10FLOAT = 53,
+ MIN16FLOAT = 54,
+ MIN12INT = 55,
+ MIN16INT = 56,
+ MIN16UINT = 57,
+}
+
+SHADER_INPUT_FLAGS :: enum u32 { // TODO: make bit_set
+ USERPACKED = 0x1,
+ COMPARISON_SAMPLER = 0x2,
+ TEXTURE_COMPONENT_0 = 0x4,
+ TEXTURE_COMPONENT_1 = 0x8,
+ TEXTURE_COMPONENTS = 0xc,
+ UNUSED = 0x10,
+}
+
+SHADER_INPUT_TYPE :: enum i32 {
+ CBUFFER = 0,
+ TBUFFER = 1,
+ TEXTURE = 2,
+ SAMPLER = 3,
+ UAV_RWTYPED = 4,
+ STRUCTURED = 5,
+ UAV_RWSTRUCTURED = 6,
+ BYTEADDRESS = 7,
+ UAV_RWBYTEADDRESS = 8,
+ UAV_APPEND_STRUCTURED = 9,
+ UAV_CONSUME_STRUCTURED = 10,
+ UAV_RWSTRUCTURED_WITH_COUNTER = 11,
+ RTACCELERATIONSTRUCTURE = 12,
+ UAV_FEEDBACKTEXTURE = 13,
+}
+
+SHADER_CBUFFER_FLAGS :: enum u32 { // TODO: make bit_set
+ USERPACKED = 0x1,
+}
+
+CBUFFER_TYPE :: enum i32 {
+ CBUFFER = 0,
+ TBUFFER = 1,
+ INTERFACE_POINTERS = 2,
+ RESOURCE_BIND_INFO = 3,
+}
+
+NAME :: enum i32 {
+ UNDEFINED = 0,
+ POSITION = 1,
+ CLIP_DISTANCE = 2,
+ CULL_DISTANCE = 3,
+ RENDER_TARGET_ARRAY_INDEX = 4,
+ VIEWPORT_ARRAY_INDEX = 5,
+ VERTEX_ID = 6,
+ PRIMITIVE_ID = 7,
+ INSTANCE_ID = 8,
+ IS_FRONT_FACE = 9,
+ SAMPLE_INDEX = 10,
+ FINAL_QUAD_EDGE_TESSFACTOR = 11,
+ FINAL_QUAD_INSIDE_TESSFACTOR = 12,
+ FINAL_TRI_EDGE_TESSFACTOR = 13,
+ FINAL_TRI_INSIDE_TESSFACTOR = 14,
+ FINAL_LINE_DETAIL_TESSFACTOR = 15,
+ FINAL_LINE_DENSITY_TESSFACTOR = 16,
+ BARYCENTRICS = 23,
+ SHADINGRATE = 24,
+ CULLPRIMITIVE = 25,
+ TARGET = 64,
+ DEPTH = 65,
+ COVERAGE = 66,
+ DEPTH_GREATER_EQUAL = 67,
+ DEPTH_LESS_EQUAL = 68,
+ STENCIL_REF = 69,
+ INNER_COVERAGE = 70,
+}
+
+RESOURCE_RETURN_TYPE :: enum i32 {
+ UNORM = 1,
+ SNORM = 2,
+ SINT = 3,
+ UINT = 4,
+ FLOAT = 5,
+ MIXED = 6,
+ DOUBLE = 7,
+ CONTINUED = 8,
+}
+
+REGISTER_COMPONENT_TYPE :: enum i32 {
+ UNKNOWN = 0,
+ UINT32 = 1,
+ SINT32 = 2,
+ FLOAT32 = 3,
+}
+
+TESSELLATOR_DOMAIN :: enum i32 {
+ UNDEFINED = 0,
+ ISOLINE = 1,
+ TRI = 2,
+ QUAD = 3,
+}
+
+TESSELLATOR_PARTITIONING :: enum i32 {
+ UNDEFINED = 0,
+ INTEGER = 1,
+ POW2 = 2,
+ FRACTIONAL_ODD = 3,
+ FRACTIONAL_EVEN = 4,
+}
+
+TESSELLATOR_OUTPUT_PRIMITIVE :: enum i32 {
+ UNDEFINED = 0,
+ POINT = 1,
+ LINE = 2,
+ TRIANGLE_CW = 3,
+ TRIANGLE_CCW = 4,
+}
+
+MIN_PRECISION :: enum i32 {
+ DEFAULT = 0,
+ FLOAT_16 = 1,
+ FLOAT_2_8 = 2,
+ RESERVED = 3,
+ SINT_16 = 4,
+ UINT_16 = 5,
+ ANY_16 = 240,
+ ANY_10 = 241,
+}
+
+INTERPOLATION_MODE :: enum i32 {
+ UNDEFINED = 0,
+ CONSTANT = 1,
+ LINEAR = 2,
+ LINEAR_CENTROID = 3,
+ LINEAR_NOPERSPECTIVE = 4,
+ LINEAR_NOPERSPECTIVE_CENTROID = 5,
+ LINEAR_SAMPLE = 6,
+ LINEAR_NOPERSPECTIVE_SAMPLE = 7,
+}
+
+PARAMETER_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ IN = 0x1,
+ OUT = 0x2,
+}
+
+CDEFAULT :: struct {
+ _: u8,
+}
+
+INPUT_CLASSIFICATION :: enum i32 {
+ VERTEX_DATA = 0,
+ INSTANCE_DATA = 1,
+}
+
+INPUT_ELEMENT_DESC :: struct {
+ SemanticName: cstring,
+ SemanticIndex: u32,
+ Format: dxgi.FORMAT,
+ InputSlot: u32,
+ AlignedByteOffset: u32,
+ InputSlotClass: INPUT_CLASSIFICATION,
+ InstanceDataStepRate: u32,
+}
+
+FILL_MODE :: enum i32 {
+ WIREFRAME = 2,
+ SOLID = 3,
+}
+
+CULL_MODE :: enum i32 {
+ NONE = 1,
+ FRONT = 2,
+ BACK = 3,
+}
+
+SO_DECLARATION_ENTRY :: struct {
+ Stream: u32,
+ SemanticName: cstring,
+ SemanticIndex: u32,
+ StartComponent: u8,
+ ComponentCount: u8,
+ OutputSlot: u8,
+}
+
+VIEWPORT :: struct {
+ TopLeftX: f32,
+ TopLeftY: f32,
+ Width: f32,
+ Height: f32,
+ MinDepth: f32,
+ MaxDepth: f32,
+}
+
+DRAW_INSTANCED_INDIRECT_ARGS :: struct {
+ VertexCountPerInstance: u32,
+ InstanceCount: u32,
+ StartVertexLocation: u32,
+ StartInstanceLocation: u32,
+}
+
+DRAW_INDEXED_INSTANCED_INDIRECT_ARGS :: struct {
+ IndexCountPerInstance: u32,
+ InstanceCount: u32,
+ StartIndexLocation: u32,
+ BaseVertexLocation: i32,
+ StartInstanceLocation: u32,
+}
+
+RESOURCE_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ BUFFER = 1,
+ TEXTURE1D = 2,
+ TEXTURE2D = 3,
+ TEXTURE3D = 4,
+}
+
+DSV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ TEXTURE1D = 1,
+ TEXTURE1DARRAY = 2,
+ TEXTURE2D = 3,
+ TEXTURE2DARRAY = 4,
+ TEXTURE2DMS = 5,
+ TEXTURE2DMSARRAY = 6,
+}
+
+RTV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ BUFFER = 1,
+ TEXTURE1D = 2,
+ TEXTURE1DARRAY = 3,
+ TEXTURE2D = 4,
+ TEXTURE2DARRAY = 5,
+ TEXTURE2DMS = 6,
+ TEXTURE2DMSARRAY = 7,
+ TEXTURE3D = 8,
+}
+
+UAV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ BUFFER = 1,
+ TEXTURE1D = 2,
+ TEXTURE1DARRAY = 3,
+ TEXTURE2D = 4,
+ TEXTURE2DARRAY = 5,
+ TEXTURE3D = 8,
+}
+
+USAGE :: enum i32 {
+ DEFAULT = 0,
+ IMMUTABLE = 1,
+ DYNAMIC = 2,
+ STAGING = 3,
+}
+
+BIND_FLAG :: enum u32 { // TODO: make bit_set
+ VERTEX_BUFFER = 0x1,
+ INDEX_BUFFER = 0x2,
+ CONSTANT_BUFFER = 0x4,
+ SHADER_RESOURCE = 0x8,
+ STREAM_OUTPUT = 0x10,
+ RENDER_TARGET = 0x20,
+ DEPTH_STENCIL = 0x40,
+ UNORDERED_ACCESS = 0x80,
+ DECODER = 0x200,
+ VIDEO_ENCODER = 0x400,
+}
+
+CPU_ACCESS_FLAG :: enum u32 { // TODO: make bit_set
+ WRITE = 0x10000,
+ READ = 0x20000,
+
+}
+
+RESOURCE_MISC_FLAG :: enum u32 { // TODO: make bit_set
+ GENERATE_MIPS = 0x1,
+ SHARED = 0x2,
+ TEXTURECUBE = 0x4,
+ DRAWINDIRECT_ARGS = 0x10,
+ BUFFER_ALLOW_RAW_VIEWS = 0x20,
+ BUFFER_STRUCTURED = 0x40,
+ RESOURCE_CLAMP = 0x80,
+ SHARED_KEYEDMUTEX = 0x100,
+ GDI_COMPATIBLE = 0x200,
+ SHARED_NTHANDLE = 0x800,
+ RESTRICTED_CONTENT = 0x1000,
+ RESTRICT_SHARED_RESOURCE = 0x2000,
+ RESTRICT_SHARED_RESOURCE_DRIVER = 0x4000,
+ GUARDED = 0x8000,
+ TILE_POOL = 0x20000,
+ TILED = 0x40000,
+ HW_PROTECTED = 0x80000,
+}
+
+MAP :: enum i32 {
+ READ = 1,
+ WRITE = 2,
+ READ_WRITE = 3,
+ WRITE_DISCARD = 4,
+ WRITE_NO_OVERWRITE = 5,
+}
+
+MAP_FLAG :: enum u32 { // TODO: make bit_set
+ DO_NOT_WAIT = 0x100000,
+}
+
+RAISE_FLAG :: enum u32 { // TODO: make bit_set
+ DRIVER_INTERNAL_ERROR = 0x1,
+}
+
+CLEAR_FLAG :: enum u32 { // TODO: make bit_set
+ DEPTH = 0x1,
+ STENCIL = 0x2,
+}
+
+
+CRECT :: struct {
+ using d3d11_rect: RECT,
+}
+
+BOX :: struct {
+ left: u32,
+ top: u32,
+ front: u32,
+ right: u32,
+ bottom: u32,
+ back: u32,
+}
+
+CBOX :: struct {
+ using d3d11_box: BOX,
+}
+
+
+IDeviceChild_UUID_STRING :: "1841E5C8-16B0-489B-BCC8-44CFB0D5DEAE"
+IDeviceChild_UUID := &IID{0x1841E5C8, 0x16B0, 0x489B, {0xBC, 0xC8, 0x44, 0xCF, 0xB0, 0xD5, 0xDE, 0xAE}}
+IDeviceChild :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11devicechild_vtable: ^IDeviceChild_VTable,
+}
+IDeviceChild_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetDevice: proc "stdcall" (this: ^IDeviceChild, ppDevice: ^^IDevice),
+ GetPrivateData: proc "stdcall" (this: ^IDeviceChild, guid: ^GUID, pDataSize: ^u32, pData: rawptr) -> HRESULT,
+ SetPrivateData: proc "stdcall" (this: ^IDeviceChild, guid: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT,
+ SetPrivateDataInterface: proc "stdcall" (this: ^IDeviceChild, guid: ^GUID, pData: ^IUnknown) -> HRESULT,
+}
+
+
+COMPARISON_FUNC :: enum i32 {
+ NEVER = 1,
+ LESS = 2,
+ EQUAL = 3,
+ LESS_EQUAL = 4,
+ GREATER = 5,
+ NOT_EQUAL = 6,
+ GREATER_EQUAL = 7,
+ ALWAYS = 8,
+}
+
+DEPTH_WRITE_MASK :: enum i32 {
+ ZERO = 0,
+ ALL = 1,
+}
+
+STENCIL_OP :: enum i32 {
+ KEEP = 1,
+ ZERO = 2,
+ REPLACE = 3,
+ INCR_SAT = 4,
+ DECR_SAT = 5,
+ INVERT = 6,
+ INCR = 7,
+ DECR = 8,
+}
+
+DEPTH_STENCILOP_DESC :: struct {
+ StencilFailOp: STENCIL_OP,
+ StencilDepthFailOp: STENCIL_OP,
+ StencilPassOp: STENCIL_OP,
+ StencilFunc: COMPARISON_FUNC,
+}
+
+DEPTH_STENCIL_DESC :: struct {
+ DepthEnable: BOOL,
+ DepthWriteMask: DEPTH_WRITE_MASK,
+ DepthFunc: COMPARISON_FUNC,
+ StencilEnable: BOOL,
+ StencilReadMask: u8,
+ StencilWriteMask: u8,
+ FrontFace: DEPTH_STENCILOP_DESC,
+ BackFace: DEPTH_STENCILOP_DESC,
+}
+
+CDEPTH_STENCIL_DESC :: struct {
+ using d3d11_depth_stencil_desc: DEPTH_STENCIL_DESC,
+}
+
+
+IDepthStencilState_UUID_STRING :: "03823EFB-8D8F-4E1C-9AA2-F64BB2CBFDF1"
+IDepthStencilState_UUID := &IID{0x03823EFB, 0x8D8F, 0x4E1C, {0x9A, 0xA2, 0xF6, 0x4B, 0xB2, 0xCB, 0xFD, 0xF1}}
+IDepthStencilState :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11depthstencilstate_vtable: ^IDepthStencilState_VTable,
+}
+IDepthStencilState_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetDesc: proc "stdcall" (this: ^IDepthStencilState, pDesc: ^DEPTH_STENCIL_DESC),
+}
+
+
+BLEND :: enum i32 {
+ ZERO = 1,
+ ONE = 2,
+ SRC_COLOR = 3,
+ INV_SRC_COLOR = 4,
+ SRC_ALPHA = 5,
+ INV_SRC_ALPHA = 6,
+ DEST_ALPHA = 7,
+ INV_DEST_ALPHA = 8,
+ DEST_COLOR = 9,
+ INV_DEST_COLOR = 10,
+ SRC_ALPHA_SAT = 11,
+ BLEND_FACTOR = 14,
+ INV_BLEND_FACTOR = 15,
+ SRC1_COLOR = 16,
+ INV_SRC1_COLOR = 17,
+ SRC1_ALPHA = 18,
+ INV_SRC1_ALPHA = 19,
+}
+
+BLEND_OP :: enum i32 {
+ ADD = 1,
+ SUBTRACT = 2,
+ REV_SUBTRACT = 3,
+ MIN = 4,
+ MAX = 5,
+}
+
+COLOR_WRITE_ENABLE :: enum i32 { // TODO: make bit_set
+ RED = 1,
+ GREEN = 2,
+ BLUE = 4,
+ ALPHA = 8,
+ ALL = 15,
+}
+
+RENDER_TARGET_BLEND_DESC :: struct {
+ BlendEnable: BOOL,
+ SrcBlend: BLEND,
+ DestBlend: BLEND,
+ BlendOp: BLEND_OP,
+ SrcBlendAlpha: BLEND,
+ DestBlendAlpha: BLEND,
+ BlendOpAlpha: BLEND_OP,
+ RenderTargetWriteMask: u8,
+}
+
+BLEND_DESC :: struct {
+ AlphaToCoverageEnable: BOOL,
+ IndependentBlendEnable: BOOL,
+ RenderTarget: [8]RENDER_TARGET_BLEND_DESC,
+}
+
+CBLEND_DESC :: struct {
+ using d3d11_blend_desc: BLEND_DESC,
+}
+
+
+IBlendState_UUID_STRING :: "75B68FAA-347D-4159-8F45-A0640F01CD9A"
+IBlendState_UUID := &IID{0x75B68FAA, 0x347D, 0x4159, {0x8F, 0x45, 0xA0, 0x64, 0x0F, 0x01, 0xCD, 0x9A}}
+IBlendState :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11blendstate_vtable: ^IBlendState_VTable,
+}
+IBlendState_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetDesc: proc "stdcall" (this: ^IBlendState, pDesc: ^BLEND_DESC),
+}
+
+
+RASTERIZER_DESC :: struct {
+ FillMode: FILL_MODE,
+ CullMode: CULL_MODE,
+ FrontCounterClockwise: BOOL,
+ DepthBias: i32,
+ DepthBiasClamp: f32,
+ SlopeScaledDepthBias: f32,
+ DepthClipEnable: BOOL,
+ ScissorEnable: BOOL,
+ MultisampleEnable: BOOL,
+ AntialiasedLineEnable: BOOL,
+}
+
+CRASTERIZER_DESC :: struct {
+ using d3d11_rasterizer_desc: RASTERIZER_DESC,
+}
+
+
+IRasterizerState_UUID_STRING :: "9BB4AB81-AB1A-4D8F-B506-FC04200B6EE7"
+IRasterizerState_UUID := &IID{0x9BB4AB81, 0xAB1A, 0x4D8F, {0xB5, 0x06, 0xFC, 0x04, 0x20, 0x0B, 0x6E, 0xE7}}
+IRasterizerState :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11rasterizerstate_vtable: ^IRasterizerState_VTable,
+}
+IRasterizerState_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetDesc: proc "stdcall" (this: ^IRasterizerState, pDesc: ^RASTERIZER_DESC),
+}
+
+
+SUBRESOURCE_DATA :: struct {
+ pSysMem: rawptr,
+ SysMemPitch: u32,
+ SysMemSlicePitch: u32,
+}
+
+MAPPED_SUBRESOURCE :: struct {
+ pData: rawptr,
+ RowPitch: u32,
+ DepthPitch: u32,
+}
+
+
+IResource_UUID_STRING :: "DC8E63F3-D12B-4952-B47B-5E45026A862D"
+IResource_UUID := &IID{0xDC8E63F3, 0xD12B, 0x4952, {0xB4, 0x7B, 0x5E, 0x45, 0x02, 0x6A, 0x86, 0x2D}}
+IResource :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11resource_vtable: ^IResource_VTable,
+}
+IResource_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetType: proc "stdcall" (this: ^IResource, pResourceDimension: ^RESOURCE_DIMENSION),
+ SetEvictionPriority: proc "stdcall" (this: ^IResource, EvictionPriority: u32),
+ GetEvictionPriority: proc "stdcall" (this: ^IResource) -> u32,
+}
+
+
+BUFFER_DESC :: struct {
+ ByteWidth: u32,
+ Usage: USAGE,
+ BindFlags: BIND_FLAG,
+ CPUAccessFlags: CPU_ACCESS_FLAG,
+ MiscFlags: RESOURCE_MISC_FLAG,
+ StructureByteStride: u32,
+}
+
+CBUFFER_DESC :: struct {
+ using d3d11_buffer_desc: BUFFER_DESC,
+}
+
+
+IBuffer_UUID_STRING :: "48570B85-D1EE-4FCD-A250-EB350722B037"
+IBuffer_UUID := &IID{0x48570B85, 0xD1EE, 0x4FCD, {0xA2, 0x50, 0xEB, 0x35, 0x07, 0x22, 0xB0, 0x37}}
+IBuffer :: struct #raw_union {
+ #subtype id3d11resource: IResource,
+ using id3d11buffer_vtable: ^IBuffer_VTable,
+}
+IBuffer_VTable :: struct {
+ using id3d11resource_vtable: IResource_VTable,
+ GetDesc: proc "stdcall" (this: ^IBuffer, pDesc: ^BUFFER_DESC),
+}
+
+
+TEXTURE1D_DESC :: struct {
+ Width: u32,
+ MipLevels: u32,
+ ArraySize: u32,
+ Format: dxgi.FORMAT,
+ Usage: USAGE,
+ BindFlags: BIND_FLAG,
+ CPUAccessFlags: CPU_ACCESS_FLAG,
+ MiscFlags: RESOURCE_MISC_FLAG,
+}
+
+CTEXTURE1D_DESC :: struct {
+ using d3d11_texture1d_desc: TEXTURE1D_DESC,
+}
+
+
+ITexture1D_UUID_STRING :: "F8FB5C27-C6B3-4F75-A4C8-439AF2EF564C"
+ITexture1D_UUID := &IID{0xF8FB5C27, 0xC6B3, 0x4F75, {0xA4, 0xC8, 0x43, 0x9A, 0xF2, 0xEF, 0x56, 0x4C}}
+ITexture1D :: struct #raw_union {
+ #subtype id3d11resource: IResource,
+ using id3d11texture1d_vtable: ^ITexture1D_VTable,
+}
+ITexture1D_VTable :: struct {
+ using id3d11resource_vtable: IResource_VTable,
+ GetDesc: proc "stdcall" (this: ^ITexture1D, pDesc: ^TEXTURE1D_DESC),
+}
+
+
+TEXTURE2D_DESC :: struct {
+ Width: u32,
+ Height: u32,
+ MipLevels: u32,
+ ArraySize: u32,
+ Format: dxgi.FORMAT,
+ SampleDesc: dxgi.SAMPLE_DESC,
+ Usage: USAGE,
+ BindFlags: BIND_FLAG,
+ CPUAccessFlags: CPU_ACCESS_FLAG,
+ MiscFlags: RESOURCE_MISC_FLAG,
+}
+
+CTEXTURE2D_DESC :: struct {
+ using d3d11_texture2d_desc: TEXTURE2D_DESC,
+}
+
+
+ITexture2D_UUID_STRING :: "6F15AAF2-D208-4E89-9AB4-489535D34F9C"
+ITexture2D_UUID := &IID{0x6F15AAF2, 0xD208, 0x4E89, {0x9A, 0xB4, 0x48, 0x95, 0x35, 0xD3, 0x4F, 0x9C}}
+ITexture2D :: struct #raw_union {
+ #subtype id3d11resource: IResource,
+ using id3d11texture2d_vtable: ^ITexture2D_VTable,
+}
+ITexture2D_VTable :: struct {
+ using id3d11resource_vtable: IResource_VTable,
+ GetDesc: proc "stdcall" (this: ^ITexture2D, pDesc: ^TEXTURE2D_DESC),
+}
+
+
+TEXTURE3D_DESC :: struct {
+ Width: u32,
+ Height: u32,
+ Depth: u32,
+ MipLevels: u32,
+ Format: dxgi.FORMAT,
+ Usage: USAGE,
+ BindFlags: BIND_FLAG,
+ CPUAccessFlags: CPU_ACCESS_FLAG,
+ MiscFlags: RESOURCE_MISC_FLAG,
+}
+
+CTEXTURE3D_DESC :: struct {
+ using d3d11_texture3d_desc: TEXTURE3D_DESC,
+}
+
+
+ITexture3D_UUID_STRING :: "037E866E-F56D-4357-A8AF-9DABBE6E250E"
+ITexture3D_UUID := &IID{0x037E866E, 0xF56D, 0x4357, {0xA8, 0xAF, 0x9D, 0xAB, 0xBE, 0x6E, 0x25, 0x0E}}
+ITexture3D :: struct #raw_union {
+ #subtype id3d11resource: IResource,
+ using id3d11texture3d_vtable: ^ITexture3D_VTable,
+}
+ITexture3D_VTable :: struct {
+ using id3d11resource_vtable: IResource_VTable,
+ GetDesc: proc "stdcall" (this: ^ITexture3D, pDesc: ^TEXTURE3D_DESC),
+}
+
+
+TEXTURECUBE_FACE :: enum i32 {
+ POSITIVE_X = 0,
+ NEGATIVE_X = 1,
+ POSITIVE_Y = 2,
+ NEGATIVE_Y = 3,
+ POSITIVE_Z = 4,
+ NEGATIVE_Z = 5,
+}
+
+
+IView_UUID_STRING :: "839D1216-BB2E-412B-B7F4-A9DBEBE08ED1"
+IView_UUID := &IID{0x839D1216, 0xBB2E, 0x412B, {0xB7, 0xF4, 0xA9, 0xDB, 0xEB, 0xE0, 0x8E, 0xD1}}
+IView :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11view_vtable: ^IView_VTable,
+}
+IView_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetResource: proc "stdcall" (this: ^IView, ppResource: ^^IResource),
+}
+
+
+BUFFER_SRV :: struct {
+ using _: struct #raw_union {
+ FirstElement: u32,
+ ElementOffset: u32,
+ },
+ using _: struct #raw_union {
+ NumElements: u32,
+ ElementWidth: u32,
+ },
+}
+
+BUFFEREX_SRV_FLAG :: enum u32 { // TODO: make bit_set
+ RAW = 0x1,
+}
+
+BUFFEREX_SRV :: struct {
+ FirstElement: u32,
+ NumElements: u32,
+ Flags: u32,
+}
+
+TEX1D_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+}
+
+TEX1D_ARRAY_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2D_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+}
+
+TEX2D_ARRAY_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX3D_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+}
+
+TEXCUBE_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+}
+
+TEXCUBE_ARRAY_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ First2DArrayFace: u32,
+ NumCubes: u32,
+}
+
+TEX2DMS_SRV :: struct {
+ UnusedField_NothingToDefine: u32,
+}
+
+TEX2DMS_ARRAY_SRV :: struct {
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+SHADER_RESOURCE_VIEW_DESC :: struct {
+ Format: dxgi.FORMAT,
+ ViewDimension: SRV_DIMENSION,
+ using _: struct #raw_union {
+ Buffer: BUFFER_SRV,
+ Texture1D: TEX1D_SRV,
+ Texture1DArray: TEX1D_ARRAY_SRV,
+ Texture2D: TEX2D_SRV,
+ Texture2DArray: TEX2D_ARRAY_SRV,
+ Texture2DMS: TEX2DMS_SRV,
+ Texture2DMSArray: TEX2DMS_ARRAY_SRV,
+ Texture3D: TEX3D_SRV,
+ TextureCube: TEXCUBE_SRV,
+ TextureCubeArray: TEXCUBE_ARRAY_SRV,
+ BufferEx: BUFFEREX_SRV,
+ },
+}
+
+CSHADER_RESOURCE_VIEW_DESC :: struct {
+ using d3d11_shader_resource_view_desc: SHADER_RESOURCE_VIEW_DESC,
+}
+
+
+IShaderResourceView_UUID_STRING :: "B0E06FE0-8192-4E1A-B1CA-36D7414710B2"
+IShaderResourceView_UUID := &IID{0xB0E06FE0, 0x8192, 0x4E1A, {0xB1, 0xCA, 0x36, 0xD7, 0x41, 0x47, 0x10, 0xB2}}
+IShaderResourceView :: struct #raw_union {
+ #subtype id3d11view: IView,
+ using id3d11shaderresourceview_vtable: ^IShaderResourceView_VTable,
+}
+IShaderResourceView_VTable :: struct {
+ using id3d11view_vtable: IView_VTable,
+ GetDesc: proc "stdcall" (this: ^IShaderResourceView, pDesc: ^SHADER_RESOURCE_VIEW_DESC),
+}
+
+
+BUFFER_RTV :: struct {
+ using _: struct #raw_union {
+ FirstElement: u32,
+ ElementOffset: u32,
+ },
+ using _: struct #raw_union {
+ NumElements: u32,
+ ElementWidth: u32,
+ },
+}
+
+TEX1D_RTV :: struct {
+ MipSlice: u32,
+}
+
+TEX1D_ARRAY_RTV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2D_RTV :: struct {
+ MipSlice: u32,
+}
+
+TEX2DMS_RTV :: struct {
+ UnusedField_NothingToDefine: u32,
+}
+
+TEX2D_ARRAY_RTV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2DMS_ARRAY_RTV :: struct {
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX3D_RTV :: struct {
+ MipSlice: u32,
+ FirstWSlice: u32,
+ WSize: u32,
+}
+
+RENDER_TARGET_VIEW_DESC :: struct {
+ Format: dxgi.FORMAT,
+ ViewDimension: RTV_DIMENSION,
+ using _: struct #raw_union {
+ Buffer: BUFFER_RTV,
+ Texture1D: TEX1D_RTV,
+ Texture1DArray: TEX1D_ARRAY_RTV,
+ Texture2D: TEX2D_RTV,
+ Texture2DArray: TEX2D_ARRAY_RTV,
+ Texture2DMS: TEX2DMS_RTV,
+ Texture2DMSArray: TEX2DMS_ARRAY_RTV,
+ Texture3D: TEX3D_RTV,
+ },
+}
+
+CRENDER_TARGET_VIEW_DESC :: struct {
+ using d3d11_render_target_view_desc: RENDER_TARGET_VIEW_DESC,
+}
+
+
+IRenderTargetView_UUID_STRING :: "DFDBA067-0B8D-4865-875B-D7B4516CC164"
+IRenderTargetView_UUID := &IID{0xDFDBA067, 0x0B8D, 0x4865, {0x87, 0x5B, 0xD7, 0xB4, 0x51, 0x6C, 0xC1, 0x64}}
+IRenderTargetView :: struct #raw_union {
+ #subtype id3d11view: IView,
+ using id3d11rendertargetview_vtable: ^IRenderTargetView_VTable,
+}
+IRenderTargetView_VTable :: struct {
+ using id3d11view_vtable: IView_VTable,
+ GetDesc: proc "stdcall" (this: ^IRenderTargetView, pDesc: ^RENDER_TARGET_VIEW_DESC),
+}
+
+
+CVIEWPORT :: struct {
+ using d3d11_viewport: VIEWPORT,
+}
+
+TEX1D_DSV :: struct {
+ MipSlice: u32,
+}
+
+TEX1D_ARRAY_DSV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2D_DSV :: struct {
+ MipSlice: u32,
+}
+
+TEX2D_ARRAY_DSV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2DMS_DSV :: struct {
+ UnusedField_NothingToDefine: u32,
+}
+
+TEX2DMS_ARRAY_DSV :: struct {
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+DSV_FLAG :: enum u32 { // TODO: make bit_set
+ DEPTH = 0x1,
+ STENCIL = 0x2,
+}
+
+DEPTH_STENCIL_VIEW_DESC :: struct {
+ Format: dxgi.FORMAT,
+ ViewDimension: DSV_DIMENSION,
+ Flags: u32,
+ using _: struct #raw_union {
+ Texture1D: TEX1D_DSV,
+ Texture1DArray: TEX1D_ARRAY_DSV,
+ Texture2D: TEX2D_DSV,
+ Texture2DArray: TEX2D_ARRAY_DSV,
+ Texture2DMS: TEX2DMS_DSV,
+ Texture2DMSArray: TEX2DMS_ARRAY_DSV,
+ },
+}
+
+CDEPTH_STENCIL_VIEW_DESC :: struct {
+ using d3d11_depth_stencil_view_desc: DEPTH_STENCIL_VIEW_DESC,
+}
+
+
+IDepthStencilView_UUID_STRING :: "9FDAC92A-1876-48C3-AFAD-25B94F84A9B6"
+IDepthStencilView_UUID := &IID{0x9FDAC92A, 0x1876, 0x48C3, {0xAF, 0xAD, 0x25, 0xB9, 0x4F, 0x84, 0xA9, 0xB6}}
+IDepthStencilView :: struct #raw_union {
+ #subtype id3d11view: IView,
+ using id3d11depthstencilview_vtable: ^IDepthStencilView_VTable,
+}
+IDepthStencilView_VTable :: struct {
+ using id3d11view_vtable: IView_VTable,
+ GetDesc: proc "stdcall" (this: ^IDepthStencilView, pDesc: ^DEPTH_STENCIL_VIEW_DESC),
+}
+
+
+BUFFER_UAV_FLAG :: enum u32 { // TODO: make bit_set
+ RAW = 0x1,
+ APPEND = 0x2,
+ COUNTER = 0x4,
+}
+
+BUFFER_UAV :: struct {
+ FirstElement: u32,
+ NumElements: u32,
+ Flags: u32,
+}
+
+TEX1D_UAV :: struct {
+ MipSlice: u32,
+}
+
+TEX1D_ARRAY_UAV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2D_UAV :: struct {
+ MipSlice: u32,
+}
+
+TEX2D_ARRAY_UAV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX3D_UAV :: struct {
+ MipSlice: u32,
+ FirstWSlice: u32,
+ WSize: u32,
+}
+
+UNORDERED_ACCESS_VIEW_DESC :: struct {
+ Format: dxgi.FORMAT,
+ ViewDimension: UAV_DIMENSION,
+ using _: struct #raw_union {
+ Buffer: BUFFER_UAV,
+ Texture1D: TEX1D_UAV,
+ Texture1DArray: TEX1D_ARRAY_UAV,
+ Texture2D: TEX2D_UAV,
+ Texture2DArray: TEX2D_ARRAY_UAV,
+ Texture3D: TEX3D_UAV,
+ },
+}
+
+CUNORDERED_ACCESS_VIEW_DESC :: struct {
+ using d3d11_unordered_access_view_desc: UNORDERED_ACCESS_VIEW_DESC,
+}
+
+
+IUnorderedAccessView_UUID_STRING :: "28ACF509-7F5C-48F6-8611-F316010A6380"
+IUnorderedAccessView_UUID := &IID{0x28ACF509, 0x7F5C, 0x48F6, {0x86, 0x11, 0xF3, 0x16, 0x01, 0x0A, 0x63, 0x80}}
+IUnorderedAccessView :: struct #raw_union {
+ #subtype id3d11view: IView,
+ using id3d11unorderedaccessview_vtable: ^IUnorderedAccessView_VTable,
+}
+IUnorderedAccessView_VTable :: struct {
+ using id3d11view_vtable: IView_VTable,
+ GetDesc: proc "stdcall" (this: ^IUnorderedAccessView, pDesc: ^UNORDERED_ACCESS_VIEW_DESC),
+}
+
+
+
+IVertexShader_UUID_STRING :: "3B301D64-D678-4289-8897-22F8928B72F3"
+IVertexShader_UUID := &IID{0x3B301D64, 0xD678, 0x4289, {0x88, 0x97, 0x22, 0xF8, 0x92, 0x8B, 0x72, 0xF3}}
+IVertexShader :: struct {
+ using id3d11devicechild: IDeviceChild,
+}
+
+
+IHullShader_UUID_STRING :: "8E5C6061-628A-4C8E-8264-BBE45CB3D5DD"
+IHullShader_UUID := &IID{0x8E5C6061, 0x628A, 0x4C8E, {0x82, 0x64, 0xBB, 0xE4, 0x5C, 0xB3, 0xD5, 0xDD}}
+IHullShader :: struct {
+ using id3d11devicechild: IDeviceChild,
+}
+
+
+IDomainShader_UUID_STRING :: "F582C508-0F36-490C-9977-31EECE268CFA"
+IDomainShader_UUID := &IID{0xF582C508, 0x0F36, 0x490C, {0x99, 0x77, 0x31, 0xEE, 0xCE, 0x26, 0x8C, 0xFA}}
+IDomainShader :: struct {
+ using id3d11devicechild: IDeviceChild,
+}
+
+
+IGeometryShader_UUID_STRING :: "38325B96-EFFB-4022-BA02-2E795B70275C"
+IGeometryShader_UUID := &IID{0x38325B96, 0xEFFB, 0x4022, {0xBA, 0x02, 0x2E, 0x79, 0x5B, 0x70, 0x27, 0x5C}}
+IGeometryShader :: struct {
+ using id3d11devicechild: IDeviceChild,
+}
+
+
+IPixelShader_UUID_STRING :: "EA82E40D-51DC-4F33-93D4-DB7C9125AE8C"
+IPixelShader_UUID := &IID{0xEA82E40D, 0x51DC, 0x4F33, {0x93, 0xD4, 0xDB, 0x7C, 0x91, 0x25, 0xAE, 0x8C}}
+IPixelShader :: struct {
+ using id3d11devicechild: IDeviceChild,
+}
+
+
+IComputeShader_UUID_STRING :: "4F5B196E-C2BD-495E-BD01-1FDED38E4969"
+IComputeShader_UUID := &IID{0x4F5B196E, 0xC2BD, 0x495E, {0xBD, 0x01, 0x1F, 0xDE, 0xD3, 0x8E, 0x49, 0x69}}
+IComputeShader :: struct {
+ using id3d11devicechild: IDeviceChild,
+}
+
+
+IInputLayout_UUID_STRING :: "E4819DDC-4CF0-4025-BD26-5DE82A3E07B7"
+IInputLayout_UUID := &IID{0xE4819DDC, 0x4CF0, 0x4025, {0xBD, 0x26, 0x5D, 0xE8, 0x2A, 0x3E, 0x07, 0xB7}}
+IInputLayout :: struct {
+ using id3d11devicechild: IDeviceChild,
+}
+
+FILTER :: enum i32 {
+ MIN_MAG_MIP_POINT = 0,
+ MIN_MAG_POINT_MIP_LINEAR = 1,
+ MIN_POINT_MAG_LINEAR_MIP_POINT = 4,
+ MIN_POINT_MAG_MIP_LINEAR = 5,
+ MIN_LINEAR_MAG_MIP_POINT = 16,
+ MIN_LINEAR_MAG_POINT_MIP_LINEAR = 17,
+ MIN_MAG_LINEAR_MIP_POINT = 20,
+ MIN_MAG_MIP_LINEAR = 21,
+ ANISOTROPIC = 85,
+ COMPARISON_MIN_MAG_MIP_POINT = 128,
+ COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 129,
+ COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 132,
+ COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 133,
+ COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 144,
+ COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 145,
+ COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 148,
+ COMPARISON_MIN_MAG_MIP_LINEAR = 149,
+ COMPARISON_ANISOTROPIC = 213,
+ MINIMUM_MIN_MAG_MIP_POINT = 256,
+ MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 257,
+ MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 260,
+ MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 261,
+ MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 272,
+ MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 273,
+ MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 276,
+ MINIMUM_MIN_MAG_MIP_LINEAR = 277,
+ MINIMUM_ANISOTROPIC = 341,
+ MAXIMUM_MIN_MAG_MIP_POINT = 384,
+ MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 385,
+ MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 388,
+ MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 389,
+ MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 400,
+ MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 401,
+ MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 404,
+ MAXIMUM_MIN_MAG_MIP_LINEAR = 405,
+ MAXIMUM_ANISOTROPIC = 469,
+}
+
+FILTER_TYPE :: enum i32 {
+ POINT = 0,
+ LINEAR = 1,
+}
+
+FILTER_REDUCTION_TYPE :: enum i32 {
+ STANDARD = 0,
+ COMPARISON = 1,
+ MINIMUM = 2,
+ MAXIMUM = 3,
+}
+
+TEXTURE_ADDRESS_MODE :: enum i32 {
+ WRAP = 1,
+ MIRROR = 2,
+ CLAMP = 3,
+ BORDER = 4,
+ MIRROR_ONCE = 5,
+}
+
+SAMPLER_DESC :: struct {
+ Filter: FILTER,
+ AddressU: TEXTURE_ADDRESS_MODE,
+ AddressV: TEXTURE_ADDRESS_MODE,
+ AddressW: TEXTURE_ADDRESS_MODE,
+ MipLODBias: f32,
+ MaxAnisotropy: u32,
+ ComparisonFunc: COMPARISON_FUNC,
+ BorderColor: [4]f32,
+ MinLOD: f32,
+ MaxLOD: f32,
+}
+
+CSAMPLER_DESC :: struct {
+ using d3d11_sampler_desc: SAMPLER_DESC,
+}
+
+
+ISamplerState_UUID_STRING :: "DA6FEA51-564C-4487-9810-F0D0F9B4E3A5"
+ISamplerState_UUID := &IID{0xDA6FEA51, 0x564C, 0x4487, {0x98, 0x10, 0xF0, 0xD0, 0xF9, 0xB4, 0xE3, 0xA5}}
+ISamplerState :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11samplerstate_vtable: ^ISamplerState_VTable,
+}
+ISamplerState_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetDesc: proc "stdcall" (this: ^ISamplerState, pDesc: ^SAMPLER_DESC),
+}
+
+
+FORMAT_SUPPORT :: enum i32 { // TODO: make bit_set
+ BUFFER = 1,
+ IA_VERTEX_BUFFER = 2,
+ IA_INDEX_BUFFER = 4,
+ SO_BUFFER = 8,
+ TEXTURE1D = 16,
+ TEXTURE2D = 32,
+ TEXTURE3D = 64,
+ TEXTURECUBE = 128,
+ SHADER_LOAD = 256,
+ SHADER_SAMPLE = 512,
+ SHADER_SAMPLE_COMPARISON = 1024,
+ SHADER_SAMPLE_MONO_TEXT = 2048,
+ MIP = 4096,
+ MIP_AUTOGEN = 8192,
+ RENDER_TARGET = 16384,
+ BLENDABLE = 32768,
+ DEPTH_STENCIL = 65536,
+ CPU_LOCKABLE = 131072,
+ MULTISAMPLE_RESOLVE = 262144,
+ DISPLAY = 524288,
+ CAST_WITHIN_BIT_LAYOUT = 1048576,
+ MULTISAMPLE_RENDERTARGET = 2097152,
+ MULTISAMPLE_LOAD = 4194304,
+ SHADER_GATHER = 8388608,
+ BACK_BUFFER_CAST = 16777216,
+ TYPED_UNORDERED_ACCESS_VIEW = 33554432,
+ SHADER_GATHER_COMPARISON = 67108864,
+ DECODER_OUTPUT = 134217728,
+ VIDEO_PROCESSOR_OUTPUT = 268435456,
+ VIDEO_PROCESSOR_INPUT = 536870912,
+ VIDEO_ENCODER = 1073741824,
+}
+
+FORMAT_SUPPORT2 :: enum i32 { // TODO: make bit_set
+ UAV_ATOMIC_ADD = 1,
+ UAV_ATOMIC_BITWISE_OPS = 2,
+ UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 4,
+ UAV_ATOMIC_EXCHANGE = 8,
+ UAV_ATOMIC_SIGNED_MIN_OR_MAX = 16,
+ UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 32,
+ UAV_TYPED_LOAD = 64,
+ UAV_TYPED_STORE = 128,
+ OUTPUT_MERGER_LOGIC_OP = 256,
+ TILED = 512,
+ SHAREABLE = 1024,
+ MULTIPLANE_OVERLAY = 16384,
+}
+
+
+IAsynchronous_UUID_STRING :: "4B35D0CD-1E15-4258-9C98-1B1333F6DD3B"
+IAsynchronous_UUID := &IID{0x4B35D0CD, 0x1E15, 0x4258, {0x9C, 0x98, 0x1B, 0x13, 0x33, 0xF6, 0xDD, 0x3B}}
+IAsynchronous :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11asynchronous_vtable: ^IAsynchronous_VTable,
+}
+IAsynchronous_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetDataSize: proc "stdcall" (this: ^IAsynchronous) -> u32,
+}
+
+
+ASYNC_GETDATA_FLAG :: enum u32 { // TODO: make bit_set
+ DONOTFLUSH = 0x1,
+}
+
+QUERY :: enum i32 {
+ EVENT = 0,
+ OCCLUSION = 1,
+ TIMESTAMP = 2,
+ TIMESTAMP_DISJOINT = 3,
+ PIPELINE_STATISTICS = 4,
+ OCCLUSION_PREDICATE = 5,
+ SO_STATISTICS = 6,
+ SO_OVERFLOW_PREDICATE = 7,
+ SO_STATISTICS_STREAM0 = 8,
+ SO_OVERFLOW_PREDICATE_STREAM0 = 9,
+ SO_STATISTICS_STREAM1 = 10,
+ SO_OVERFLOW_PREDICATE_STREAM1 = 11,
+ SO_STATISTICS_STREAM2 = 12,
+ SO_OVERFLOW_PREDICATE_STREAM2 = 13,
+ SO_STATISTICS_STREAM3 = 14,
+ SO_OVERFLOW_PREDICATE_STREAM3 = 15,
+}
+
+QUERY_MISC_FLAG :: enum u32 { // TODO: make bit_set
+ QUERY_MISC_PREDICATEHINT = 0x1,
+}
+
+QUERY_DESC :: struct {
+ Query: QUERY,
+ MiscFlags: RESOURCE_MISC_FLAG,
+}
+
+CQUERY_DESC :: struct {
+ using d3d11_query_desc: QUERY_DESC,
+}
+
+
+IQuery_UUID_STRING :: "D6C00747-87B7-425E-B84D-44D108560AFD"
+IQuery_UUID := &IID{0xD6C00747, 0x87B7, 0x425E, {0xB8, 0x4D, 0x44, 0xD1, 0x08, 0x56, 0x0A, 0xFD}}
+IQuery :: struct #raw_union {
+ #subtype id3d11asynchronous: IAsynchronous,
+ using id3d11query_vtable: ^IQuery_VTable,
+}
+IQuery_VTable :: struct {
+ using id3d11asynchronous_vtable: IAsynchronous_VTable,
+ GetDesc: proc "stdcall" (this: ^IQuery, pDesc: ^QUERY_DESC),
+}
+
+
+
+IPredicate_UUID_STRING :: "9EB576DD-9F77-4D86-81AA-8BAB5FE490E2"
+IPredicate_UUID := &IID{0x9EB576DD, 0x9F77, 0x4D86, {0x81, 0xAA, 0x8B, 0xAB, 0x5F, 0xE4, 0x90, 0xE2}}
+IPredicate :: struct {
+ using id3d11query: IQuery,
+}
+
+QUERY_DATA_TIMESTAMP_DISJOINT :: struct {
+ Frequency: u64,
+ Disjoint: BOOL,
+}
+
+QUERY_DATA_PIPELINE_STATISTICS :: struct {
+ IAVertices: u64,
+ IAPrimitives: u64,
+ VSInvocations: u64,
+ GSInvocations: u64,
+ GSPrimitives: u64,
+ CInvocations: u64,
+ CPrimitives: u64,
+ PSInvocations: u64,
+ HSInvocations: u64,
+ DSInvocations: u64,
+ CSInvocations: u64,
+}
+
+QUERY_DATA_SO_STATISTICS :: struct {
+ NumPrimitivesWritten: u64,
+ PrimitivesStorageNeeded: u64,
+}
+
+COUNTER :: enum i32 {
+ DEVICE_DEPENDENT_0 = 1073741824,
+}
+
+COUNTER_TYPE :: enum i32 {
+ FLOAT32 = 0,
+ UINT16 = 1,
+ UINT32 = 2,
+ UINT64 = 3,
+}
+
+COUNTER_DESC :: struct {
+ Counter: COUNTER,
+ MiscFlags: RESOURCE_MISC_FLAG,
+}
+
+CCOUNTER_DESC :: struct {
+ using d3d11_counter_desc: COUNTER_DESC,
+}
+
+COUNTER_INFO :: struct {
+ LastDeviceDependentCounter: COUNTER,
+ NumSimultaneousCounters: u32,
+ NumDetectableParallelUnits: u8,
+}
+
+
+ICounter_UUID_STRING :: "6E8C49FB-A371-4770-B440-29086022B741"
+ICounter_UUID := &IID{0x6E8C49FB, 0xA371, 0x4770, {0xB4, 0x40, 0x29, 0x08, 0x60, 0x22, 0xB7, 0x41}}
+ICounter :: struct #raw_union {
+ #subtype id3d11asynchronous: IAsynchronous,
+ using id3d11counter_vtable: ^ICounter_VTable,
+}
+ICounter_VTable :: struct {
+ using id3d11asynchronous_vtable: IAsynchronous_VTable,
+ GetDesc: proc "stdcall" (this: ^ICounter, pDesc: ^COUNTER_DESC),
+}
+
+
+STANDARD_MULTISAMPLE_QUALITY_LEVELS :: enum i32 {
+ STANDARD_MULTISAMPLE_PATTERN = -1,
+ CENTER_MULTISAMPLE_PATTERN = -2,
+}
+
+DEVICE_CONTEXT_TYPE :: enum i32 {
+ IMMEDIATE = 0,
+ DEFERRED = 1,
+}
+
+CLASS_INSTANCE_DESC :: struct {
+ InstanceId: u32,
+ InstanceIndex: u32,
+ TypeId: u32,
+ ConstantBuffer: u32,
+ BaseConstantBufferOffset: u32,
+ BaseTexture: u32,
+ BaseSampler: u32,
+ Created: BOOL,
+}
+
+
+IClassInstance_UUID_STRING :: "A6CD7FAA-B0B7-4A2F-9436-8662A65797CB"
+IClassInstance_UUID := &IID{0xA6CD7FAA, 0xB0B7, 0x4A2F, {0x94, 0x36, 0x86, 0x62, 0xA6, 0x57, 0x97, 0xCB}}
+IClassInstance :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11classinstance_vtable: ^IClassInstance_VTable,
+}
+IClassInstance_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetClassLinkage: proc "stdcall" (this: ^IClassInstance, ppLinkage: ^^IClassLinkage),
+ GetDesc: proc "stdcall" (this: ^IClassInstance, pDesc: ^CLASS_INSTANCE_DESC),
+ GetInstanceName: proc "stdcall" (this: ^IClassInstance, pInstanceName: cstring, pBufferLength: ^SIZE_T),
+ GetTypeName: proc "stdcall" (this: ^IClassInstance, pTypeName: cstring, pBufferLength: ^SIZE_T),
+}
+
+
+
+IClassLinkage_UUID_STRING :: "DDF57CBA-9543-46E4-A12B-F207A0FE7FED"
+IClassLinkage_UUID := &IID{0xDDF57CBA, 0x9543, 0x46E4, {0xA1, 0x2B, 0xF2, 0x07, 0xA0, 0xFE, 0x7F, 0xED}}
+IClassLinkage :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11classlinkage_vtable: ^IClassLinkage_VTable,
+}
+IClassLinkage_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetClassInstance: proc "stdcall" (this: ^IClassLinkage, pClassInstanceName: cstring, InstanceIndex: u32, ppInstance: ^^IClassInstance) -> HRESULT,
+ CreateClassInstance: proc "stdcall" (this: ^IClassLinkage, pClassTypeName: cstring, ConstantBufferOffset: u32, ConstantVectorOffset: u32, TextureOffset: u32, SamplerOffset: u32, ppInstance: ^^IClassInstance) -> HRESULT,
+}
+
+
+
+ICommandList_UUID_STRING :: "A24BC4D1-769E-43F7-8013-98FF566C18E2"
+ICommandList_UUID := &IID{0xA24BC4D1, 0x769E, 0x43F7, {0x80, 0x13, 0x98, 0xFF, 0x56, 0x6C, 0x18, 0xE2}}
+ICommandList :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11commandlist_vtable: ^ICommandList_VTable,
+}
+ICommandList_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetContextFlags: proc "stdcall" (this: ^ICommandList) -> u32,
+}
+
+
+FEATURE :: enum i32 {
+ THREADING = 0,
+ DOUBLES = 1,
+ FORMAT_SUPPORT = 2,
+ FORMAT_SUPPORT2 = 3,
+ D3D10_X_HARDWARE_OPTIONS = 4,
+ OPTIONS = 5,
+ ARCHITECTURE_INFO = 6,
+ D3D9_OPTIONS = 7,
+ SHADER_MIN_PRECISION_SUPPORT = 8,
+ D3D9_SHADOW_SUPPORT = 9,
+ OPTIONS1 = 10,
+ D3D9_SIMPLE_INSTANCING_SUPPORT = 11,
+ MARKER_SUPPORT = 12,
+ D3D9_OPTIONS1 = 13,
+ OPTIONS2 = 14,
+ OPTIONS3 = 15,
+ GPU_VIRTUAL_ADDRESS_SUPPORT = 16,
+ OPTIONS4 = 17,
+ SHADER_CACHE = 18,
+ OPTIONS5 = 19,
+}
+
+FEATURE_DATA_THREADING :: struct {
+ DriverConcurrentCreates: BOOL,
+ DriverCommandLists: BOOL,
+}
+
+FEATURE_DATA_DOUBLES :: struct {
+ DoublePrecisionFloatShaderOps: BOOL,
+}
+
+FEATURE_DATA_FORMAT_SUPPORT :: struct {
+ InFormat: dxgi.FORMAT,
+ OutFormatSupport: u32,
+}
+
+FEATURE_DATA_FORMAT_SUPPORT2 :: struct {
+ InFormat: dxgi.FORMAT,
+ OutFormatSupport2: u32,
+}
+
+FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS :: struct {
+ ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x: BOOL,
+}
+
+FEATURE_DATA_OPTIONS :: struct {
+ OutputMergerLogicOp: BOOL,
+ UAVOnlyRenderingForcedSampleCount: BOOL,
+ DiscardAPIsSeenByDriver: BOOL,
+ FlagsForUpdateAndCopySeenByDriver: BOOL,
+ ClearView: BOOL,
+ CopyWithOverlap: BOOL,
+ ConstantBufferPartialUpdate: BOOL,
+ ConstantBufferOffsetting: BOOL,
+ MapNoOverwriteOnDynamicConstantBuffer: BOOL,
+ MapNoOverwriteOnDynamicBufferSRV: BOOL,
+ MultisampleRTVWithForcedSampleCountOne: BOOL,
+ SAD4ShaderInstructions: BOOL,
+ ExtendedDoublesShaderInstructions: BOOL,
+ ExtendedResourceSharing: BOOL,
+}
+
+FEATURE_DATA_ARCHITECTURE_INFO :: struct {
+ TileBasedDeferredRenderer: BOOL,
+}
+
+FEATURE_DATA_D3D9_OPTIONS :: struct {
+ FullNonPow2TextureSupport: BOOL,
+}
+
+FEATURE_DATA_D3D9_SHADOW_SUPPORT :: struct {
+ SupportsDepthAsTextureWithLessEqualComparisonFilter: BOOL,
+}
+
+SHADER_MIN_PRECISION_SUPPORT :: enum i32 {
+ _10_BIT = 1,
+ _16_BIT = 2,
+}
+
+FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT :: struct {
+ PixelShaderMinPrecision: u32,
+ AllOtherShaderStagesMinPrecision: u32,
+}
+
+TILED_RESOURCES_TIER :: enum i32 {
+ TILED_RESOURCES_NOT_SUPPORTED = 0,
+ _1 = 1,
+ _2 = 2,
+ _3 = 3,
+}
+
+FEATURE_DATA_OPTIONS1 :: struct {
+ TiledResourcesTier: TILED_RESOURCES_TIER,
+ MinMaxFiltering: BOOL,
+ ClearViewAlsoSupportsDepthOnlyFormats: BOOL,
+ MapOnDefaultBuffers: BOOL,
+}
+
+FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT :: struct {
+ SimpleInstancingSupported: BOOL,
+}
+
+FEATURE_DATA_MARKER_SUPPORT :: struct {
+ Profile: BOOL,
+}
+
+FEATURE_DATA_D3D9_OPTIONS1 :: struct {
+ FullNonPow2TextureSupported: BOOL,
+ DepthAsTextureWithLessEqualComparisonFilterSupported: BOOL,
+ SimpleInstancingSupported: BOOL,
+ TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported: BOOL,
+}
+
+CONSERVATIVE_RASTERIZATION_TIER :: enum i32 {
+ CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED = 0,
+ _1 = 1,
+ _2 = 2,
+ _3 = 3,
+}
+
+FEATURE_DATA_OPTIONS2 :: struct {
+ PSSpecifiedStencilRefSupported: BOOL,
+ TypedUAVLoadAdditionalFormats: BOOL,
+ ROVsSupported: BOOL,
+ ConservativeRasterizationTier: CONSERVATIVE_RASTERIZATION_TIER,
+ TiledResourcesTier: TILED_RESOURCES_TIER,
+ MapOnDefaultTextures: BOOL,
+ StandardSwizzle: BOOL,
+ UnifiedMemoryArchitecture: BOOL,
+}
+
+FEATURE_DATA_OPTIONS3 :: struct {
+ VPAndRTArrayIndexFromAnyShaderFeedingRasterizer: BOOL,
+}
+
+FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT :: struct {
+ MaxGPUVirtualAddressBitsPerResource: u32,
+ MaxGPUVirtualAddressBitsPerProcess: u32,
+}
+
+SHADER_CACHE_SUPPORT_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ AUTOMATIC_INPROC_CACHE = 0x1,
+ AUTOMATIC_DISK_CACHE = 0x2,
+}
+
+FEATURE_DATA_SHADER_CACHE :: struct {
+ SupportFlags: u32,
+}
+
+SHARED_RESOURCE_TIER :: enum i32 {
+ _0 = 0,
+ _1 = 1,
+ _2 = 2,
+ _3 = 3,
+}
+
+FEATURE_DATA_OPTIONS5 :: struct {
+ SharedResourceTier: SHARED_RESOURCE_TIER,
+}
+
+
+IDeviceContext_UUID_STRING :: "C0BFA96C-E089-44FB-8EAF-26F8796190DA"
+IDeviceContext_UUID := &IID{0xC0BFA96C, 0xE089, 0x44FB, {0x8E, 0xAF, 0x26, 0xF8, 0x79, 0x61, 0x90, 0xDA}}
+IDeviceContext :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11devicecontext_vtable: ^IDeviceContext_VTable,
+}
+IDeviceContext_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ VSSetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ PSSetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ PSSetShader: proc "stdcall" (this: ^IDeviceContext, pPixelShader: ^IPixelShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32),
+ PSSetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ VSSetShader: proc "stdcall" (this: ^IDeviceContext, pVertexShader: ^IVertexShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32),
+ DrawIndexed: proc "stdcall" (this: ^IDeviceContext, IndexCount: u32, StartIndexLocation: u32, BaseVertexLocation: i32),
+ Draw: proc "stdcall" (this: ^IDeviceContext, VertexCount: u32, StartVertexLocation: u32),
+ Map: proc "stdcall" (this: ^IDeviceContext, pResource: ^IResource, Subresource: u32, MapType: MAP, MapFlags: u32, pMappedResource: ^MAPPED_SUBRESOURCE) -> HRESULT,
+ Unmap: proc "stdcall" (this: ^IDeviceContext, pResource: ^IResource, Subresource: u32),
+ PSSetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ IASetInputLayout: proc "stdcall" (this: ^IDeviceContext, pInputLayout: ^IInputLayout),
+ IASetVertexBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppVertexBuffers: ^^IBuffer, pStrides: ^u32, pOffsets: ^u32),
+ IASetIndexBuffer: proc "stdcall" (this: ^IDeviceContext, pIndexBuffer: ^IBuffer, Format: dxgi.FORMAT, Offset: u32),
+ DrawIndexedInstanced: proc "stdcall" (this: ^IDeviceContext, IndexCountPerInstance: u32, InstanceCount: u32, StartIndexLocation: u32, BaseVertexLocation: i32, StartInstanceLocation: u32),
+ DrawInstanced: proc "stdcall" (this: ^IDeviceContext, VertexCountPerInstance: u32, InstanceCount: u32, StartVertexLocation: u32, StartInstanceLocation: u32),
+ GSSetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ GSSetShader: proc "stdcall" (this: ^IDeviceContext, pShader: ^IGeometryShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32),
+ IASetPrimitiveTopology: proc "stdcall" (this: ^IDeviceContext, Topology: PRIMITIVE_TOPOLOGY),
+ VSSetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ VSSetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ Begin: proc "stdcall" (this: ^IDeviceContext, pAsync: ^IAsynchronous),
+ End: proc "stdcall" (this: ^IDeviceContext, pAsync: ^IAsynchronous),
+ GetData: proc "stdcall" (this: ^IDeviceContext, pAsync: ^IAsynchronous, pData: rawptr, DataSize: u32, GetDataFlags: u32) -> HRESULT,
+ SetPredication: proc "stdcall" (this: ^IDeviceContext, pPredicate: ^IPredicate, PredicateValue: BOOL),
+ GSSetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ GSSetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ OMSetRenderTargets: proc "stdcall" (this: ^IDeviceContext, NumViews: u32, ppRenderTargetViews: ^^IRenderTargetView, pDepthStencilView: ^IDepthStencilView),
+ OMSetRenderTargetsAndUnorderedAccessViews: proc "stdcall" (this: ^IDeviceContext, NumRTVs: u32, ppRenderTargetViews: ^^IRenderTargetView, pDepthStencilView: ^IDepthStencilView, UAVStartSlot: u32, NumUAVs: u32, ppUnorderedAccessViews: ^^IUnorderedAccessView, pUAVInitialCounts: ^u32),
+ OMSetBlendState: proc "stdcall" (this: ^IDeviceContext, pBlendState: ^IBlendState, BlendFactor: ^[4]f32, SampleMask: u32),
+ OMSetDepthStencilState: proc "stdcall" (this: ^IDeviceContext, pDepthStencilState: ^IDepthStencilState, StencilRef: u32),
+ SOSetTargets: proc "stdcall" (this: ^IDeviceContext, NumBuffers: u32, ppSOTargets: ^^IBuffer, pOffsets: ^u32),
+ DrawAuto: proc "stdcall" (this: ^IDeviceContext),
+ DrawIndexedInstancedIndirect: proc "stdcall" (this: ^IDeviceContext, pBufferForArgs: ^IBuffer, AlignedByteOffsetForArgs: u32),
+ DrawInstancedIndirect: proc "stdcall" (this: ^IDeviceContext, pBufferForArgs: ^IBuffer, AlignedByteOffsetForArgs: u32),
+ Dispatch: proc "stdcall" (this: ^IDeviceContext, ThreadGroupCountX: u32, ThreadGroupCountY: u32, ThreadGroupCountZ: u32),
+ DispatchIndirect: proc "stdcall" (this: ^IDeviceContext, pBufferForArgs: ^IBuffer, AlignedByteOffsetForArgs: u32),
+ RSSetState: proc "stdcall" (this: ^IDeviceContext, pRasterizerState: ^IRasterizerState),
+ RSSetViewports: proc "stdcall" (this: ^IDeviceContext, NumViewports: u32, pViewports: ^VIEWPORT),
+ RSSetScissorRects: proc "stdcall" (this: ^IDeviceContext, NumRects: u32, pRects: ^RECT),
+ CopySubresourceRegion: proc "stdcall" (this: ^IDeviceContext, pDstResource: ^IResource, DstSubresource: u32, DstX: u32, DstY: u32, DstZ: u32, pSrcResource: ^IResource, SrcSubresource: u32, pSrcBox: ^BOX),
+ CopyResource: proc "stdcall" (this: ^IDeviceContext, pDstResource: ^IResource, pSrcResource: ^IResource),
+ UpdateSubresource: proc "stdcall" (this: ^IDeviceContext, pDstResource: ^IResource, DstSubresource: u32, pDstBox: ^BOX, pSrcData: rawptr, SrcRowPitch: u32, SrcDepthPitch: u32),
+ CopyStructureCount: proc "stdcall" (this: ^IDeviceContext, pDstBuffer: ^IBuffer, DstAlignedByteOffset: u32, pSrcView: ^IUnorderedAccessView),
+ ClearRenderTargetView: proc "stdcall" (this: ^IDeviceContext, pRenderTargetView: ^IRenderTargetView, ColorRGBA: ^[4]f32),
+ ClearUnorderedAccessViewUint: proc "stdcall" (this: ^IDeviceContext, pUnorderedAccessView: ^IUnorderedAccessView, Values: ^[4]u32),
+ ClearUnorderedAccessViewFloat: proc "stdcall" (this: ^IDeviceContext, pUnorderedAccessView: ^IUnorderedAccessView, Values: ^[4]f32),
+ ClearDepthStencilView: proc "stdcall" (this: ^IDeviceContext, pDepthStencilView: ^IDepthStencilView, ClearFlags: CLEAR_FLAG, Depth: f32, Stencil: u8),
+ GenerateMips: proc "stdcall" (this: ^IDeviceContext, pShaderResourceView: ^IShaderResourceView),
+ SetResourceMinLOD: proc "stdcall" (this: ^IDeviceContext, pResource: ^IResource, MinLOD: f32),
+ GetResourceMinLOD: proc "stdcall" (this: ^IDeviceContext, pResource: ^IResource) -> f32,
+ ResolveSubresource: proc "stdcall" (this: ^IDeviceContext, pDstResource: ^IResource, DstSubresource: u32, pSrcResource: ^IResource, SrcSubresource: u32, Format: dxgi.FORMAT),
+ ExecuteCommandList: proc "stdcall" (this: ^IDeviceContext, pCommandList: ^ICommandList, RestoreContextState: BOOL),
+ HSSetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ HSSetShader: proc "stdcall" (this: ^IDeviceContext, pHullShader: ^IHullShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32),
+ HSSetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ HSSetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ DSSetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ DSSetShader: proc "stdcall" (this: ^IDeviceContext, pDomainShader: ^IDomainShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32),
+ DSSetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ DSSetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ CSSetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ CSSetUnorderedAccessViews: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumUAVs: u32, ppUnorderedAccessViews: ^^IUnorderedAccessView, pUAVInitialCounts: ^u32),
+ CSSetShader: proc "stdcall" (this: ^IDeviceContext, pComputeShader: ^IComputeShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32),
+ CSSetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ CSSetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ VSGetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ PSGetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ PSGetShader: proc "stdcall" (this: ^IDeviceContext, ppPixelShader: ^^IPixelShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32),
+ PSGetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ VSGetShader: proc "stdcall" (this: ^IDeviceContext, ppVertexShader: ^^IVertexShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32),
+ PSGetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ IAGetInputLayout: proc "stdcall" (this: ^IDeviceContext, ppInputLayout: ^^IInputLayout),
+ IAGetVertexBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppVertexBuffers: ^^IBuffer, pStrides: ^u32, pOffsets: ^u32),
+ IAGetIndexBuffer: proc "stdcall" (this: ^IDeviceContext, pIndexBuffer: ^^IBuffer, Format: ^dxgi.FORMAT, Offset: ^u32),
+ GSGetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ GSGetShader: proc "stdcall" (this: ^IDeviceContext, ppGeometryShader: ^^IGeometryShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32),
+ IAGetPrimitiveTopology: proc "stdcall" (this: ^IDeviceContext, pTopology: ^PRIMITIVE_TOPOLOGY),
+ VSGetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ VSGetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ GetPredication: proc "stdcall" (this: ^IDeviceContext, ppPredicate: ^^IPredicate, pPredicateValue: ^BOOL),
+ GSGetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ GSGetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ OMGetRenderTargets: proc "stdcall" (this: ^IDeviceContext, NumViews: u32, ppRenderTargetViews: ^^IRenderTargetView, ppDepthStencilView: ^^IDepthStencilView),
+ OMGetRenderTargetsAndUnorderedAccessViews: proc "stdcall" (this: ^IDeviceContext, NumRTVs: u32, ppRenderTargetViews: ^^IRenderTargetView, ppDepthStencilView: ^^IDepthStencilView, UAVStartSlot: u32, NumUAVs: u32, ppUnorderedAccessViews: ^^IUnorderedAccessView),
+ OMGetBlendState: proc "stdcall" (this: ^IDeviceContext, ppBlendState: ^^IBlendState, BlendFactor: ^[4]f32, pSampleMask: ^u32),
+ OMGetDepthStencilState: proc "stdcall" (this: ^IDeviceContext, ppDepthStencilState: ^^IDepthStencilState, pStencilRef: ^u32),
+ SOGetTargets: proc "stdcall" (this: ^IDeviceContext, NumBuffers: u32, ppSOTargets: ^^IBuffer),
+ RSGetState: proc "stdcall" (this: ^IDeviceContext, ppRasterizerState: ^^IRasterizerState),
+ RSGetViewports: proc "stdcall" (this: ^IDeviceContext, pNumViewports: ^u32, pViewports: ^VIEWPORT),
+ RSGetScissorRects: proc "stdcall" (this: ^IDeviceContext, pNumRects: ^u32, pRects: ^RECT),
+ HSGetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ HSGetShader: proc "stdcall" (this: ^IDeviceContext, ppHullShader: ^^IHullShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32),
+ HSGetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ HSGetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ DSGetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ DSGetShader: proc "stdcall" (this: ^IDeviceContext, ppDomainShader: ^^IDomainShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32),
+ DSGetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ DSGetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ CSGetShaderResources: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView),
+ CSGetUnorderedAccessViews: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumUAVs: u32, ppUnorderedAccessViews: ^^IUnorderedAccessView),
+ CSGetShader: proc "stdcall" (this: ^IDeviceContext, ppComputeShader: ^^IComputeShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32),
+ CSGetSamplers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState),
+ CSGetConstantBuffers: proc "stdcall" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer),
+ ClearState: proc "stdcall" (this: ^IDeviceContext),
+ Flush: proc "stdcall" (this: ^IDeviceContext),
+ GetType: proc "stdcall" (this: ^IDeviceContext) -> DEVICE_CONTEXT_TYPE,
+ GetContextFlags: proc "stdcall" (this: ^IDeviceContext) -> u32,
+ FinishCommandList: proc "stdcall" (this: ^IDeviceContext, RestoreDeferredContextState: BOOL, ppCommandList: ^^ICommandList) -> HRESULT,
+}
+
+
+CVIDEO_DEFAULT :: struct {
+ _: u8,
+}
+
+APP_DEPRECATED_HRESULT :: HRESULT
+
+
+VIDEO_DECODER_DESC :: struct {
+ Guid: GUID,
+ SampleWidth: u32,
+ SampleHeight: u32,
+ OutputFormat: dxgi.FORMAT,
+}
+
+VIDEO_DECODER_CONFIG :: struct {
+ guidConfigBitstreamEncryption: GUID,
+ guidConfigMBcontrolEncryption: GUID,
+ guidConfigResidDiffEncryption: GUID,
+ ConfigBitstreamRaw: u32,
+ ConfigMBcontrolRasterOrder: u32,
+ ConfigResidDiffHost: u32,
+ ConfigSpatialResid8: u32,
+ ConfigResid8Subtraction: u32,
+ ConfigSpatialHost8or9Clipping: u32,
+ ConfigSpatialResidInterleaved: u32,
+ ConfigIntraResidUnsigned: u32,
+ ConfigResidDiffAccelerator: u32,
+ ConfigHostInverseScan: u32,
+ ConfigSpecificIDCT: u32,
+ Config4GroupedCoefs: u32,
+ ConfigMinRenderTargetBuffCount: u16,
+ ConfigDecoderSpecific: u16,
+}
+
+VIDEO_DECODER_BUFFER_TYPE :: enum i32 {
+ PICTURE_PARAMETERS = 0,
+ MACROBLOCK_CONTROL = 1,
+ RESIDUAL_DIFFERENCE = 2,
+ DEBLOCKING_CONTROL = 3,
+ INVERSE_QUANTIZATION_MATRIX = 4,
+ SLICE_CONTROL = 5,
+ BITSTREAM = 6,
+ MOTION_VECTOR = 7,
+ FILM_GRAIN = 8,
+}
+
+AES_CTR_IV :: struct {
+ IV: u64,
+ Count: u64,
+}
+
+ENCRYPTED_BLOCK_INFO :: struct {
+ NumEncryptedBytesAtBeginning: u32,
+ NumBytesInSkipPattern: u32,
+ NumBytesInEncryptPattern: u32,
+}
+
+VIDEO_DECODER_BUFFER_DESC :: struct {
+ BufferType: VIDEO_DECODER_BUFFER_TYPE,
+ BufferIndex: u32,
+ DataOffset: u32,
+ DataSize: u32,
+ FirstMBaddress: u32,
+ NumMBsInBuffer: u32,
+ Width: u32,
+ Height: u32,
+ Stride: u32,
+ ReservedBits: u32,
+
+ pIV: rawptr,
+ IVSize: u32,
+ PartialEncryption: BOOL,
+ EncryptedBlockInfo: ENCRYPTED_BLOCK_INFO,
+}
+
+VIDEO_DECODER_EXTENSION :: struct {
+ Function: u32,
+
+ pPrivateInputData: rawptr,
+ PrivateInputDataSize: u32,
+
+ pPrivateOutputData: rawptr,
+ PrivateOutputDataSize: u32,
+ ResourceCount: u32,
+
+ ppResourceList: ^^IResource,
+}
+
+
+IVideoDecoder_UUID_STRING :: "3C9C5B51-995D-48D1-9B8D-FA5CAEDED65C"
+IVideoDecoder_UUID := &IID{0x3C9C5B51, 0x995D, 0x48D1, {0x9B, 0x8D, 0xFA, 0x5C, 0xAE, 0xDE, 0xD6, 0x5C}}
+IVideoDecoder :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11videodecoder_vtable: ^IVideoDecoder_VTable,
+}
+IVideoDecoder_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetCreationParameters: proc "stdcall" (this: ^IVideoDecoder, pVideoDesc: ^VIDEO_DECODER_DESC, pConfig: ^VIDEO_DECODER_CONFIG) -> HRESULT,
+ GetDriverHandle: proc "stdcall" (this: ^IVideoDecoder, pDriverHandle: ^HANDLE) -> HRESULT,
+}
+
+
+VIDEO_PROCESSOR_FORMAT_SUPPORT :: enum i32 {
+ INPUT = 1,
+ OUTPUT = 2,
+}
+
+VIDEO_PROCESSOR_DEVICE_CAPS :: enum i32 { // TODO: make bit_set
+ LINEAR_SPACE = 1,
+ xvYCC = 2,
+ RGB_RANGE_CONVERSION = 4,
+ YCbCr_MATRIX_CONVERSION = 8,
+ NOMINAL_RANGE = 16,
+}
+
+VIDEO_PROCESSOR_FEATURE_CAPS :: enum i32 { // TODO: make bit_set
+ ALPHA_FILL = 1,
+ CONSTRICTION = 2,
+ LUMA_KEY = 4,
+ ALPHA_PALETTE = 8,
+ LEGACY = 16,
+ STEREO = 32,
+ ROTATION = 64,
+ ALPHA_STREAM = 128,
+ PIXEL_ASPECT_RATIO = 256,
+ MIRROR = 512,
+ SHADER_USAGE = 1024,
+ METADATA_HDR10 = 2048,
+}
+
+VIDEO_PROCESSOR_FILTER_CAPS :: enum i32 { // TODO: make bit_set
+ BRIGHTNESS = 1,
+ CONTRAST = 2,
+ HUE = 4,
+ SATURATION = 8,
+ NOISE_REDUCTION = 16,
+ EDGE_ENHANCEMENT = 32,
+ ANAMORPHIC_SCALING = 64,
+ STEREO_ADJUSTMENT = 128,
+}
+
+VIDEO_PROCESSOR_FORMAT_CAPS :: enum i32 { // TODO: make bit_set
+ RGB_INTERLACED = 1,
+ RGB_PROCAMP = 2,
+ RGB_LUMA_KEY = 4,
+ PALETTE_INTERLACED = 8,
+}
+
+VIDEO_PROCESSOR_AUTO_STREAM_CAPS :: enum i32 { // TODO: make bit_set
+ DENOISE = 1,
+ DERINGING = 2,
+ EDGE_ENHANCEMENT = 4,
+ COLOR_CORRECTION = 8,
+ FLESH_TONE_MAPPING = 16,
+ IMAGE_STABILIZATION = 32,
+ SUPER_RESOLUTION = 64,
+ ANAMORPHIC_SCALING = 128,
+}
+
+VIDEO_PROCESSOR_STEREO_CAPS :: enum i32 { // TODO: make bit_set
+ MONO_OFFSET = 1,
+ ROW_INTERLEAVED = 2,
+ COLUMN_INTERLEAVED = 4,
+ CHECKERBOARD = 8,
+ FLIP_MODE = 16,
+}
+
+VIDEO_PROCESSOR_CAPS :: struct {
+ DeviceCaps: u32,
+ FeatureCaps: u32,
+ FilterCaps: u32,
+ InputFormatCaps: u32,
+ AutoStreamCaps: u32,
+ StereoCaps: u32,
+ RateConversionCapsCount: u32,
+ MaxInputStreams: u32,
+ MaxStreamStates: u32,
+}
+
+VIDEO_PROCESSOR_PROCESSOR_CAPS :: enum i32 { // TODO: make bit_set
+ DEINTERLACE_BLEND = 1,
+ DEINTERLACE_BOB = 2,
+ DEINTERLACE_ADAPTIVE = 4,
+ DEINTERLACE_MOTION_COMPENSATION = 8,
+ INVERSE_TELECINE = 16,
+ FRAME_RATE_CONVERSION = 32,
+}
+
+VIDEO_PROCESSOR_ITELECINE_CAPS :: enum i32 {
+ _32 = 1,
+ _22 = 2,
+ _2224 = 4,
+ _2332 = 8,
+ _32322 = 16,
+ _55 = 32,
+ _64 = 64,
+ _87 = 128,
+ _222222222223 = 256,
+ OTHER = -2147483648,
+}
+
+VIDEO_PROCESSOR_RATE_CONVERSION_CAPS :: struct {
+ PastFrames: u32,
+ FutureFrames: u32,
+ ProcessorCaps: u32,
+ ITelecineCaps: u32,
+ CustomRateCount: u32,
+}
+
+CONTENT_PROTECTION_CAPS :: enum i32 {
+ SOFTWARE = 1,
+ HARDWARE = 2,
+ PROTECTION_ALWAYS_ON = 4,
+ PARTIAL_DECRYPTION = 8,
+ CONTENT_KEY = 16,
+ FRESHEN_SESSION_KEY = 32,
+ ENCRYPTED_READ_BACK = 64,
+ ENCRYPTED_READ_BACK_KEY = 128,
+ SEQUENTIAL_CTR_IV = 256,
+ ENCRYPT_SLICEDATA_ONLY = 512,
+ DECRYPTION_BLT = 1024,
+ HARDWARE_PROTECT_UNCOMPRESSED = 2048,
+ HARDWARE_PROTECTED_MEMORY_PAGEABLE = 4096,
+ HARDWARE_TEARDOWN = 8192,
+ HARDWARE_DRM_COMMUNICATION = 16384,
+ HARDWARE_DRM_COMMUNICATION_MULTI_THREADED = 32768,
+}
+
+
+VIDEO_CONTENT_PROTECTION_CAPS :: struct {
+ Caps: u32,
+ KeyExchangeTypeCount: u32,
+ BlockAlignmentSize: u32,
+ ProtectedMemorySize: u64,
+}
+
+VIDEO_PROCESSOR_CUSTOM_RATE :: struct {
+ CustomRate: dxgi.RATIONAL,
+ OutputFrames: u32,
+ InputInterlaced: BOOL,
+ InputFramesOrFields: u32,
+}
+
+VIDEO_PROCESSOR_FILTER :: enum i32 {
+ BRIGHTNESS = 0,
+ CONTRAST = 1,
+ HUE = 2,
+ SATURATION = 3,
+ NOISE_REDUCTION = 4,
+ EDGE_ENHANCEMENT = 5,
+ ANAMORPHIC_SCALING = 6,
+ STEREO_ADJUSTMENT = 7,
+}
+
+VIDEO_PROCESSOR_FILTER_RANGE :: struct {
+ Minimum: i32,
+ Maximum: i32,
+ Default: i32,
+ Multiplier: f32,
+}
+
+VIDEO_FRAME_FORMAT :: enum i32 {
+ PROGRESSIVE = 0,
+ INTERLACED_TOP_FIELD_FIRST = 1,
+ INTERLACED_BOTTOM_FIELD_FIRST = 2,
+}
+
+VIDEO_USAGE :: enum i32 {
+ PLAYBACK_NORMAL = 0,
+ OPTIMAL_SPEED = 1,
+ OPTIMAL_QUALITY = 2,
+}
+
+VIDEO_PROCESSOR_CONTENT_DESC :: struct {
+ InputFrameFormat: VIDEO_FRAME_FORMAT,
+ InputFrameRate: dxgi.RATIONAL,
+ InputWidth: u32,
+ InputHeight: u32,
+ OutputFrameRate: dxgi.RATIONAL,
+ OutputWidth: u32,
+ OutputHeight: u32,
+ Usage: VIDEO_USAGE,
+}
+
+
+IVideoProcessorEnumerator_UUID_STRING :: "31627037-53AB-4200-9061-05FAA9AB45F9"
+IVideoProcessorEnumerator_UUID := &IID{0x31627037, 0x53AB, 0x4200, {0x90, 0x61, 0x05, 0xFA, 0xA9, 0xAB, 0x45, 0xF9}}
+IVideoProcessorEnumerator :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11videoprocessorenumerator_vtable: ^IVideoProcessorEnumerator_VTable,
+}
+IVideoProcessorEnumerator_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetVideoProcessorContentDesc: proc "stdcall" (this: ^IVideoProcessorEnumerator, pContentDesc: ^VIDEO_PROCESSOR_CONTENT_DESC) -> HRESULT,
+ CheckVideoProcessorFormat: proc "stdcall" (this: ^IVideoProcessorEnumerator, Format: dxgi.FORMAT, pFlags: ^u32) -> HRESULT,
+ GetVideoProcessorCaps: proc "stdcall" (this: ^IVideoProcessorEnumerator, pCaps: ^VIDEO_PROCESSOR_CAPS) -> HRESULT,
+ GetVideoProcessorRateConversionCaps: proc "stdcall" (this: ^IVideoProcessorEnumerator, TypeIndex: u32, pCaps: ^VIDEO_PROCESSOR_RATE_CONVERSION_CAPS) -> HRESULT,
+ GetVideoProcessorCustomRate: proc "stdcall" (this: ^IVideoProcessorEnumerator, TypeIndex: u32, CustomRateIndex: u32, pRate: ^VIDEO_PROCESSOR_CUSTOM_RATE) -> HRESULT,
+ GetVideoProcessorFilterRange: proc "stdcall" (this: ^IVideoProcessorEnumerator, Filter: VIDEO_PROCESSOR_FILTER, pRange: ^VIDEO_PROCESSOR_FILTER_RANGE) -> HRESULT,
+}
+
+
+VIDEO_COLOR_RGBA :: struct {
+ R: f32,
+ G: f32,
+ B: f32,
+ A: f32,
+}
+
+VIDEO_COLOR_YCbCrA :: struct {
+ Y: f32,
+ Cb: f32,
+ Cr: f32,
+ A: f32,
+}
+
+VIDEO_COLOR :: struct {
+ using _: struct #raw_union {
+ YCbCr: VIDEO_COLOR_YCbCrA,
+ RGBA: VIDEO_COLOR_RGBA,
+ },
+}
+
+VIDEO_PROCESSOR_NOMINAL_RANGE :: enum i32 {
+ UNDEFINED = 0,
+ _16_235 = 1,
+ _0_255 = 2,
+}
+
+VIDEO_PROCESSOR_COLOR_SPACE_FLAG :: enum u32 {
+ Usage = 0,
+ RGB_Range = 1,
+ YCbCr_Matrix = 2,
+ YCbCr_xvYCC = 3,
+ Nominal_Range = 4,
+ Reserved = 6,
+}
+
+VIDEO_PROCESSOR_COLOR_SPACE :: distinct bit_set[VIDEO_PROCESSOR_COLOR_SPACE_FLAG; u32]
+
+VIDEO_PROCESSOR_ALPHA_FILL_MODE :: enum i32 {
+ OPAQUE = 0,
+ BACKGROUND = 1,
+ DESTINATION = 2,
+ SOURCE_STREAM = 3,
+}
+
+VIDEO_PROCESSOR_OUTPUT_RATE :: enum i32 {
+ NORMAL = 0,
+ HALF = 1,
+ CUSTOM = 2,
+}
+
+VIDEO_PROCESSOR_STEREO_FORMAT :: enum i32 {
+ MONO = 0,
+ HORIZONTAL = 1,
+ VERTICAL = 2,
+ SEPARATE = 3,
+ MONO_OFFSET = 4,
+ ROW_INTERLEAVED = 5,
+ COLUMN_INTERLEAVED = 6,
+ CHECKERBOARD = 7,
+}
+
+VIDEO_PROCESSOR_STEREO_FLIP_MODE :: enum i32 {
+ NONE = 0,
+ FRAME0 = 1,
+ FRAME1 = 2,
+}
+
+VIDEO_PROCESSOR_ROTATION :: enum i32 {
+ IDENTITY = 0,
+ _90 = 1,
+ _180 = 2,
+ _270 = 3,
+}
+
+VIDEO_PROCESSOR_STREAM :: struct {
+ Enable: BOOL,
+ OutputIndex: u32,
+ InputFrameOrField: u32,
+ PastFrames: u32,
+ FutureFrames: u32,
+
+ ppPastSurfaces: ^^IVideoProcessorInputView,
+ pInputSurface: ^IVideoProcessorInputView,
+
+ ppFutureSurfaces: ^^IVideoProcessorInputView,
+
+ ppPastSurfacesRight: ^^IVideoProcessorInputView,
+ pInputSurfaceRight: ^IVideoProcessorInputView,
+
+ ppFutureSurfacesRight: ^^IVideoProcessorInputView,
+}
+
+
+IVideoProcessor_UUID_STRING :: "1D7B0652-185F-41C6-85CE-0C5BE3D4AE6C"
+IVideoProcessor_UUID := &IID{0x1D7B0652, 0x185F, 0x41C6, {0x85, 0xCE, 0x0C, 0x5B, 0xE3, 0xD4, 0xAE, 0x6C}}
+IVideoProcessor :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11videoprocessor_vtable: ^IVideoProcessor_VTable,
+}
+IVideoProcessor_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetContentDesc: proc "stdcall" (this: ^IVideoProcessor, pDesc: ^VIDEO_PROCESSOR_CONTENT_DESC),
+ GetRateConversionCaps: proc "stdcall" (this: ^IVideoProcessor, pCaps: ^VIDEO_PROCESSOR_RATE_CONVERSION_CAPS),
+}
+
+
+OMAC :: struct {
+ Omac: [16]u8,
+}
+
+AUTHENTICATED_CHANNEL_TYPE :: enum i32 {
+ D3D11 = 1,
+ DRIVER_SOFTWARE = 2,
+ DRIVER_HARDWARE = 3,
+}
+
+
+IAuthenticatedChannel_UUID_STRING :: "3015A308-DCBD-47AA-A747-192486D14D4A"
+IAuthenticatedChannel_UUID := &IID{0x3015A308, 0xDCBD, 0x47AA, {0xA7, 0x47, 0x19, 0x24, 0x86, 0xD1, 0x4D, 0x4A}}
+IAuthenticatedChannel :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11authenticatedchannel_vtable: ^IAuthenticatedChannel_VTable,
+}
+IAuthenticatedChannel_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetCertificateSize: proc "stdcall" (this: ^IAuthenticatedChannel, pCertificateSize: ^u32) -> HRESULT,
+ GetCertificate: proc "stdcall" (this: ^IAuthenticatedChannel, CertificateSize: u32, pCertificate: cstring) -> HRESULT,
+ GetChannelHandle: proc "stdcall" (this: ^IAuthenticatedChannel, pChannelHandle: ^HANDLE),
+}
+
+
+AUTHENTICATED_QUERY_INPUT :: struct {
+ QueryType: GUID,
+ hChannel: HANDLE,
+ SequenceNumber: u32,
+}
+
+AUTHENTICATED_QUERY_OUTPUT :: struct {
+ omac: OMAC,
+ QueryType: GUID,
+ hChannel: HANDLE,
+ SequenceNumber: u32,
+ ReturnCode: HRESULT,
+}
+
+AUTHENTICATED_PROTECTION_FLAG :: enum u32 {
+ ProtectionEnabled = 0,
+ OverlayOrFullscreenRequired = 1,
+ Reserved = 2,
+}
+AUTHENTICATED_PROTECTION_FLAGS :: distinct bit_set[AUTHENTICATED_PROTECTION_FLAG; u32]
+
+AUTHENTICATED_QUERY_PROTECTION_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ ProtectionFlags: AUTHENTICATED_PROTECTION_FLAGS,
+}
+
+AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ ChannelType: AUTHENTICATED_CHANNEL_TYPE,
+}
+
+AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ DeviceHandle: HANDLE,
+}
+
+AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT :: struct {
+ Input: AUTHENTICATED_QUERY_INPUT,
+ DecoderHandle: HANDLE,
+}
+
+AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ DecoderHandle: HANDLE,
+ CryptoSessionHandle: HANDLE,
+ DeviceHandle: HANDLE,
+}
+
+AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ RestrictedSharedResourceProcessCount: u32,
+}
+
+AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT :: struct {
+ Input: AUTHENTICATED_QUERY_INPUT,
+ ProcessIndex: u32,
+}
+
+AUTHENTICATED_PROCESS_IDENTIFIER_TYPE :: enum i32 {
+ UNKNOWN = 0,
+ DWM = 1,
+ HANDLE = 2,
+}
+
+AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ ProcessIndex: u32,
+ ProcessIdentifier: AUTHENTICATED_PROCESS_IDENTIFIER_TYPE,
+ ProcessHandle: HANDLE,
+}
+
+AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ UnrestrictedProtectedSharedResourceCount: u32,
+}
+
+AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT :: struct {
+ Input: AUTHENTICATED_QUERY_INPUT,
+ DeviceHandle: HANDLE,
+ CryptoSessionHandle: HANDLE,
+}
+
+AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ DeviceHandle: HANDLE,
+ CryptoSessionHandle: HANDLE,
+ OutputIDCount: u32,
+}
+
+AUTHENTICATED_QUERY_OUTPUT_ID_INPUT :: struct {
+ Input: AUTHENTICATED_QUERY_INPUT,
+ DeviceHandle: HANDLE,
+ CryptoSessionHandle: HANDLE,
+ OutputIDIndex: u32,
+}
+
+AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ DeviceHandle: HANDLE,
+ CryptoSessionHandle: HANDLE,
+ OutputIDIndex: u32,
+ OutputID: u64,
+}
+
+BUS_TYPE :: enum i32 {
+ OTHER = 0,
+ PCI = 1,
+ PCIX = 2,
+ PCIEXPRESS = 3,
+ AGP = 4,
+ NSIDE_OF_CHIPSET = 65536,
+ RACKS_ON_MOTHER_BOARD_TO_CHIP = 131072,
+ RACKS_ON_MOTHER_BOARD_TO_SOCKET = 196608,
+ AUGHTER_BOARD_CONNECTOR = 262144,
+ AUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = 327680,
+ ON_STANDARD = -2147483648,
+}
+
+AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ BusType: BUS_TYPE,
+ AccessibleInContiguousBlocks: BOOL,
+ AccessibleInNonContiguousBlocks: BOOL,
+}
+
+AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT :: AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT
+
+AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ EncryptionGuidCount: u32,
+}
+
+AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT :: struct {
+ Input: AUTHENTICATED_QUERY_INPUT,
+ EncryptionGuidIndex: u32,
+}
+
+AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ EncryptionGuidIndex: u32,
+ EncryptionGuid: GUID,
+}
+
+AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT :: struct {
+ Output: AUTHENTICATED_QUERY_OUTPUT,
+ EncryptionGuid: GUID,
+}
+
+AUTHENTICATED_CONFIGURE_INPUT :: struct {
+ omac: OMAC,
+ ConfigureType: GUID,
+ hChannel: HANDLE,
+ SequenceNumber: u32,
+}
+
+AUTHENTICATED_CONFIGURE_OUTPUT :: struct {
+ omac: OMAC,
+ ConfigureType: GUID,
+ hChannel: HANDLE,
+ SequenceNumber: u32,
+ ReturnCode: HRESULT,
+}
+
+AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT :: struct {
+ Parameters: AUTHENTICATED_CONFIGURE_INPUT,
+ StartSequenceQuery: u32,
+ StartSequenceConfigure: u32,
+}
+
+AUTHENTICATED_CONFIGURE_PROTECTION_INPUT :: struct {
+ Parameters: AUTHENTICATED_CONFIGURE_INPUT,
+ Protections: AUTHENTICATED_PROTECTION_FLAGS,
+}
+
+AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT :: struct {
+ Parameters: AUTHENTICATED_CONFIGURE_INPUT,
+ DecoderHandle: HANDLE,
+ CryptoSessionHandle: HANDLE,
+ DeviceHandle: HANDLE,
+}
+
+AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT :: struct {
+ Parameters: AUTHENTICATED_CONFIGURE_INPUT,
+ ProcessType: AUTHENTICATED_PROCESS_IDENTIFIER_TYPE,
+ ProcessHandle: HANDLE,
+ AllowAccess: BOOL,
+}
+
+AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT :: struct {
+ Parameters: AUTHENTICATED_CONFIGURE_INPUT,
+ EncryptionGuid: GUID,
+}
+
+
+
+ICryptoSession_UUID_STRING :: "9B32F9AD-BDCC-40A6-A39D-D5C865845720"
+ICryptoSession_UUID := &IID{0x9B32F9AD, 0xBDCC, 0x40A6, {0xA3, 0x9D, 0xD5, 0xC8, 0x65, 0x84, 0x57, 0x20}}
+ICryptoSession :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11cryptosession_vtable: ^ICryptoSession_VTable,
+}
+ICryptoSession_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetCryptoType: proc "stdcall" (this: ^ICryptoSession, pCryptoType: ^GUID),
+ GetDecoderProfile: proc "stdcall" (this: ^ICryptoSession, pDecoderProfile: ^GUID),
+ GetCertificateSize: proc "stdcall" (this: ^ICryptoSession, pCertificateSize: ^u32) -> HRESULT,
+ GetCertificate: proc "stdcall" (this: ^ICryptoSession, CertificateSize: u32, pCertificate: cstring) -> HRESULT,
+ GetCryptoSessionHandle: proc "stdcall" (this: ^ICryptoSession, pCryptoSessionHandle: ^HANDLE),
+}
+
+
+VDOV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ TEXTURE2D = 1,
+}
+
+TEX2D_VDOV :: struct {
+ ArraySlice: u32,
+}
+
+VIDEO_DECODER_OUTPUT_VIEW_DESC :: struct {
+ DecodeProfile: GUID,
+ ViewDimension: VDOV_DIMENSION,
+ using _: struct #raw_union {
+ Texture2D: TEX2D_VDOV,
+ },
+}
+
+
+IVideoDecoderOutputView_UUID_STRING :: "C2931AEA-2A85-4F20-860F-FBA1FD256E18"
+IVideoDecoderOutputView_UUID := &IID{0xC2931AEA, 0x2A85, 0x4F20, {0x86, 0x0F, 0xFB, 0xA1, 0xFD, 0x25, 0x6E, 0x18}}
+IVideoDecoderOutputView :: struct #raw_union {
+ #subtype id3d11view: IView,
+ using id3d11videodecoderoutputview_vtable: ^IVideoDecoderOutputView_VTable,
+}
+IVideoDecoderOutputView_VTable :: struct {
+ using id3d11view_vtable: IView_VTable,
+ GetDesc: proc "stdcall" (this: ^IVideoDecoderOutputView, pDesc: ^VIDEO_DECODER_OUTPUT_VIEW_DESC),
+}
+
+
+VPIV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ TEXTURE2D = 1,
+}
+
+TEX2D_VPIV :: struct {
+ MipSlice: u32,
+ ArraySlice: u32,
+}
+
+VIDEO_PROCESSOR_INPUT_VIEW_DESC :: struct {
+ FourCC: u32,
+ ViewDimension: VPIV_DIMENSION,
+ using _: struct #raw_union {
+ Texture2D: TEX2D_VPIV,
+ },
+}
+
+
+IVideoProcessorInputView_UUID_STRING :: "11EC5A5F-51DC-4945-AB34-6E8C21300EA5"
+IVideoProcessorInputView_UUID := &IID{0x11EC5A5F, 0x51DC, 0x4945, {0xAB, 0x34, 0x6E, 0x8C, 0x21, 0x30, 0x0E, 0xA5}}
+IVideoProcessorInputView :: struct #raw_union {
+ #subtype id3d11view: IView,
+ using id3d11videoprocessorinputview_vtable: ^IVideoProcessorInputView_VTable,
+}
+IVideoProcessorInputView_VTable :: struct {
+ using id3d11view_vtable: IView_VTable,
+ GetDesc: proc "stdcall" (this: ^IVideoProcessorInputView, pDesc: ^VIDEO_PROCESSOR_INPUT_VIEW_DESC),
+}
+
+
+VPOV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ TEXTURE2D = 1,
+ TEXTURE2DARRAY = 2,
+}
+
+TEX2D_VPOV :: struct {
+ MipSlice: u32,
+}
+
+TEX2D_ARRAY_VPOV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+VIDEO_PROCESSOR_OUTPUT_VIEW_DESC :: struct {
+ ViewDimension: VPOV_DIMENSION,
+ using _: struct #raw_union {
+ Texture2D: TEX2D_VPOV,
+ Texture2DArray: TEX2D_ARRAY_VPOV,
+ },
+}
+
+
+IVideoProcessorOutputView_UUID_STRING :: "A048285E-25A9-4527-BD93-D68B68C44254"
+IVideoProcessorOutputView_UUID := &IID{0xA048285E, 0x25A9, 0x4527, {0xBD, 0x93, 0xD6, 0x8B, 0x68, 0xC4, 0x42, 0x54}}
+IVideoProcessorOutputView :: struct #raw_union {
+ #subtype id3d11view: IView,
+ using id3d11videoprocessoroutputview_vtable: ^IVideoProcessorOutputView_VTable,
+}
+IVideoProcessorOutputView_VTable :: struct {
+ using id3d11view_vtable: IView_VTable,
+ GetDesc: proc "stdcall" (this: ^IVideoProcessorOutputView, pDesc: ^VIDEO_PROCESSOR_OUTPUT_VIEW_DESC),
+}
+
+
+
+IVideoContext_UUID_STRING :: "61F21C45-3C0E-4A74-9CEA-67100D9AD5E4"
+IVideoContext_UUID := &IID{0x61F21C45, 0x3C0E, 0x4A74, {0x9C, 0xEA, 0x67, 0x10, 0x0D, 0x9A, 0xD5, 0xE4}}
+IVideoContext :: struct #raw_union {
+ #subtype id3d11devicechild: IDeviceChild,
+ using id3d11videocontext_vtable: ^IVideoContext_VTable,
+}
+IVideoContext_VTable :: struct {
+ using id3d11devicechild_vtable: IDeviceChild_VTable,
+ GetDecoderBuffer: proc "stdcall" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, Type: VIDEO_DECODER_BUFFER_TYPE, pBufferSize: ^u32, ppBuffer: ^rawptr) -> HRESULT,
+ ReleaseDecoderBuffer: proc "stdcall" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, Type: VIDEO_DECODER_BUFFER_TYPE) -> HRESULT,
+ DecoderBeginFrame: proc "stdcall" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, pView: ^IVideoDecoderOutputView, ContentKeySize: u32, pContentKey: rawptr) -> HRESULT,
+ DecoderEndFrame: proc "stdcall" (this: ^IVideoContext, pDecoder: ^IVideoDecoder) -> HRESULT,
+ SubmitDecoderBuffers: proc "stdcall" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, NumBuffers: u32, pBufferDesc: ^VIDEO_DECODER_BUFFER_DESC) -> HRESULT,
+ DecoderExtension: proc "stdcall" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, pExtensionData: ^VIDEO_DECODER_EXTENSION) -> APP_DEPRECATED_HRESULT,
+ VideoProcessorSetOutputTargetRect: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, Enable: BOOL, pRect: ^RECT),
+ VideoProcessorSetOutputBackgroundColor: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, YCbCr: BOOL, pColor: ^VIDEO_COLOR),
+ VideoProcessorSetOutputColorSpace: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pColorSpace: ^VIDEO_PROCESSOR_COLOR_SPACE),
+ VideoProcessorSetOutputAlphaFillMode: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, AlphaFillMode: VIDEO_PROCESSOR_ALPHA_FILL_MODE, StreamIndex: u32),
+ VideoProcessorSetOutputConstriction: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, Enable: BOOL, Size: SIZE),
+ VideoProcessorSetOutputStereoMode: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, Enable: BOOL),
+ VideoProcessorSetOutputExtension: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pExtensionGuid: ^GUID, DataSize: u32, pData: rawptr) -> APP_DEPRECATED_HRESULT,
+ VideoProcessorGetOutputTargetRect: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, Enabled: ^BOOL, pRect: ^RECT),
+ VideoProcessorGetOutputBackgroundColor: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pYCbCr: ^BOOL, pColor: ^VIDEO_COLOR),
+ VideoProcessorGetOutputColorSpace: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pColorSpace: ^VIDEO_PROCESSOR_COLOR_SPACE),
+ VideoProcessorGetOutputAlphaFillMode: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pAlphaFillMode: ^VIDEO_PROCESSOR_ALPHA_FILL_MODE, pStreamIndex: ^u32),
+ VideoProcessorGetOutputConstriction: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pEnabled: ^BOOL, pSize: ^SIZE),
+ VideoProcessorGetOutputStereoMode: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pEnabled: ^BOOL),
+ VideoProcessorGetOutputExtension: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pExtensionGuid: ^GUID, DataSize: u32, pData: rawptr) -> APP_DEPRECATED_HRESULT,
+ VideoProcessorSetStreamFrameFormat: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, FrameFormat: VIDEO_FRAME_FORMAT),
+ VideoProcessorSetStreamColorSpace: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pColorSpace: ^VIDEO_PROCESSOR_COLOR_SPACE),
+ VideoProcessorSetStreamOutputRate: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, OutputRate: VIDEO_PROCESSOR_OUTPUT_RATE, RepeatFrame: BOOL, pCustomRate: ^dxgi.RATIONAL),
+ VideoProcessorSetStreamSourceRect: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, pRect: ^RECT),
+ VideoProcessorSetStreamDestRect: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, pRect: ^RECT),
+ VideoProcessorSetStreamAlpha: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, Alpha: f32),
+ VideoProcessorSetStreamPalette: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Count: u32, pEntries: ^u32),
+ VideoProcessorSetStreamPixelAspectRatio: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, pSourceAspectRatio: ^dxgi.RATIONAL, pDestinationAspectRatio: ^dxgi.RATIONAL),
+ VideoProcessorSetStreamLumaKey: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, Lower: f32, Upper: f32),
+ VideoProcessorSetStreamStereoFormat: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, Format: VIDEO_PROCESSOR_STEREO_FORMAT, LeftViewFrame0: BOOL, BaseViewFrame0: BOOL, FlipMode: VIDEO_PROCESSOR_STEREO_FLIP_MODE, MonoOffset: i32),
+ VideoProcessorSetStreamAutoProcessingMode: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL),
+ VideoProcessorSetStreamFilter: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Filter: VIDEO_PROCESSOR_FILTER, Enable: BOOL, Level: i32),
+ VideoProcessorSetStreamExtension: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pExtensionGuid: ^GUID, DataSize: u32, pData: rawptr) -> APP_DEPRECATED_HRESULT,
+ VideoProcessorGetStreamFrameFormat: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pFrameFormat: ^VIDEO_FRAME_FORMAT),
+ VideoProcessorGetStreamColorSpace: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pColorSpace: ^VIDEO_PROCESSOR_COLOR_SPACE),
+ VideoProcessorGetStreamOutputRate: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pOutputRate: ^VIDEO_PROCESSOR_OUTPUT_RATE, pRepeatFrame: ^BOOL, pCustomRate: ^dxgi.RATIONAL),
+ VideoProcessorGetStreamSourceRect: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pRect: ^RECT),
+ VideoProcessorGetStreamDestRect: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pRect: ^RECT),
+ VideoProcessorGetStreamAlpha: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pAlpha: ^f32),
+ VideoProcessorGetStreamPalette: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Count: u32, pEntries: ^u32),
+ VideoProcessorGetStreamPixelAspectRatio: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pSourceAspectRatio: ^dxgi.RATIONAL, pDestinationAspectRatio: ^dxgi.RATIONAL),
+ VideoProcessorGetStreamLumaKey: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pLower: ^f32, pUpper: ^f32),
+ VideoProcessorGetStreamStereoFormat: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnable: ^BOOL, pFormat: ^VIDEO_PROCESSOR_STEREO_FORMAT, pLeftViewFrame0: ^BOOL, pBaseViewFrame0: ^BOOL, pFlipMode: ^VIDEO_PROCESSOR_STEREO_FLIP_MODE, MonoOffset: ^i32),
+ VideoProcessorGetStreamAutoProcessingMode: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL),
+ VideoProcessorGetStreamFilter: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Filter: VIDEO_PROCESSOR_FILTER, pEnabled: ^BOOL, pLevel: ^i32),
+ VideoProcessorGetStreamExtension: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pExtensionGuid: ^GUID, DataSize: u32, pData: rawptr) -> APP_DEPRECATED_HRESULT,
+ VideoProcessorBlt: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pView: ^IVideoProcessorOutputView, OutputFrame: u32, StreamCount: u32, pStreams: ^VIDEO_PROCESSOR_STREAM) -> HRESULT,
+ NegotiateCryptoSessionKeyExchange: proc "stdcall" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, DataSize: u32, pData: rawptr) -> HRESULT,
+ EncryptionBlt: proc "stdcall" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, pSrcSurface: ^ITexture2D, pDstSurface: ^ITexture2D, IVSize: u32, pIV: rawptr),
+ DecryptionBlt: proc "stdcall" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, pSrcSurface: ^ITexture2D, pDstSurface: ^ITexture2D, pEncryptedBlockInfo: ^ENCRYPTED_BLOCK_INFO, ContentKeySize: u32, pContentKey: rawptr, IVSize: u32, pIV: rawptr),
+ StartSessionKeyRefresh: proc "stdcall" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, RandomNumberSize: u32, pRandomNumber: rawptr),
+ FinishSessionKeyRefresh: proc "stdcall" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession),
+ GetEncryptionBltKey: proc "stdcall" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, KeySize: u32, pReadbackKey: rawptr) -> HRESULT,
+ NegotiateAuthenticatedChannelKeyExchange: proc "stdcall" (this: ^IVideoContext, pChannel: ^IAuthenticatedChannel, DataSize: u32, pData: rawptr) -> HRESULT,
+ QueryAuthenticatedChannel: proc "stdcall" (this: ^IVideoContext, pChannel: ^IAuthenticatedChannel, InputSize: u32, pInput: rawptr, OutputSize: u32, pOutput: rawptr) -> HRESULT,
+ ConfigureAuthenticatedChannel: proc "stdcall" (this: ^IVideoContext, pChannel: ^IAuthenticatedChannel, InputSize: u32, pInput: rawptr, pOutput: ^AUTHENTICATED_CONFIGURE_OUTPUT) -> HRESULT,
+ VideoProcessorSetStreamRotation: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, Rotation: VIDEO_PROCESSOR_ROTATION),
+ VideoProcessorGetStreamRotation: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnable: ^BOOL, pRotation: ^VIDEO_PROCESSOR_ROTATION),
+}
+
+
+
+IVideoDevice_UUID_STRING :: "10EC4D5B-975A-4689-B9E4-D0AAC30FE333"
+IVideoDevice_UUID := &IID{0x10EC4D5B, 0x975A, 0x4689, {0xB9, 0xE4, 0xD0, 0xAA, 0xC3, 0x0F, 0xE3, 0x33}}
+IVideoDevice :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11videodevice_vtable: ^IVideoDevice_VTable,
+}
+IVideoDevice_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ CreateVideoDecoder: proc "stdcall" (this: ^IVideoDevice, pVideoDesc: ^VIDEO_DECODER_DESC, pConfig: ^VIDEO_DECODER_CONFIG, ppDecoder: ^^IVideoDecoder) -> HRESULT,
+ CreateVideoProcessor: proc "stdcall" (this: ^IVideoDevice, pEnum: ^IVideoProcessorEnumerator, RateConversionIndex: u32, ppVideoProcessor: ^^IVideoProcessor) -> HRESULT,
+ CreateAuthenticatedChannel: proc "stdcall" (this: ^IVideoDevice, ChannelType: AUTHENTICATED_CHANNEL_TYPE, ppAuthenticatedChannel: ^^IAuthenticatedChannel) -> HRESULT,
+ CreateCryptoSession: proc "stdcall" (this: ^IVideoDevice, pCryptoType: ^GUID, pDecoderProfile: ^GUID, pKeyExchangeType: ^GUID, ppCryptoSession: ^^ICryptoSession) -> HRESULT,
+ CreateVideoDecoderOutputView: proc "stdcall" (this: ^IVideoDevice, pResource: ^IResource, pDesc: ^VIDEO_DECODER_OUTPUT_VIEW_DESC, ppVDOVView: ^^IVideoDecoderOutputView) -> HRESULT,
+ CreateVideoProcessorInputView: proc "stdcall" (this: ^IVideoDevice, pResource: ^IResource, pEnum: ^IVideoProcessorEnumerator, pDesc: ^VIDEO_PROCESSOR_INPUT_VIEW_DESC, ppVPIView: ^^IVideoProcessorInputView) -> HRESULT,
+ CreateVideoProcessorOutputView: proc "stdcall" (this: ^IVideoDevice, pResource: ^IResource, pEnum: ^IVideoProcessorEnumerator, pDesc: ^VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, ppVPOView: ^^IVideoProcessorOutputView) -> HRESULT,
+ CreateVideoProcessorEnumerator: proc "stdcall" (this: ^IVideoDevice, pDesc: ^VIDEO_PROCESSOR_CONTENT_DESC, ppEnum: ^^IVideoProcessorEnumerator) -> HRESULT,
+ GetVideoDecoderProfileCount: proc "stdcall" (this: ^IVideoDevice) -> u32,
+ GetVideoDecoderProfile: proc "stdcall" (this: ^IVideoDevice, Index: u32, pDecoderProfile: ^GUID) -> HRESULT,
+ CheckVideoDecoderFormat: proc "stdcall" (this: ^IVideoDevice, pDecoderProfile: ^GUID, Format: dxgi.FORMAT, pSupported: ^BOOL) -> HRESULT,
+ GetVideoDecoderConfigCount: proc "stdcall" (this: ^IVideoDevice, pDesc: ^VIDEO_DECODER_DESC, pCount: ^u32) -> HRESULT,
+ GetVideoDecoderConfig: proc "stdcall" (this: ^IVideoDevice, pDesc: ^VIDEO_DECODER_DESC, Index: u32, pConfig: ^VIDEO_DECODER_CONFIG) -> HRESULT,
+ GetContentProtectionCaps: proc "stdcall" (this: ^IVideoDevice, pCryptoType: ^GUID, pDecoderProfile: ^GUID, pCaps: ^VIDEO_CONTENT_PROTECTION_CAPS) -> HRESULT,
+ CheckCryptoKeyExchange: proc "stdcall" (this: ^IVideoDevice, pCryptoType: ^GUID, pDecoderProfile: ^GUID, Index: u32, pKeyExchangeType: ^GUID) -> HRESULT,
+ SetPrivateData: proc "stdcall" (this: ^IVideoDevice, guid: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT,
+ SetPrivateDataInterface: proc "stdcall" (this: ^IVideoDevice, guid: ^GUID, pData: ^IUnknown) -> HRESULT,
+}
+
+
+
+IDevice_UUID_STRING :: "DB6F6DDB-AC77-4E88-8253-819DF9BBF140"
+IDevice_UUID := &IID{0xDB6F6DDB, 0xAC77, 0x4E88, {0x82, 0x53, 0x81, 0x9D, 0xF9, 0xBB, 0xF1, 0x40}}
+IDevice :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11device_vtable: ^IDevice_VTable,
+}
+IDevice_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ CreateBuffer: proc "stdcall" (this: ^IDevice, pDesc: ^BUFFER_DESC, pInitialData: ^SUBRESOURCE_DATA, ppBuffer: ^^IBuffer) -> HRESULT,
+ CreateTexture1D: proc "stdcall" (this: ^IDevice, pDesc: ^TEXTURE1D_DESC, pInitialData: ^SUBRESOURCE_DATA, ppTexture1D: ^^ITexture1D) -> HRESULT,
+ CreateTexture2D: proc "stdcall" (this: ^IDevice, pDesc: ^TEXTURE2D_DESC, pInitialData: ^SUBRESOURCE_DATA, ppTexture2D: ^^ITexture2D) -> HRESULT,
+ CreateTexture3D: proc "stdcall" (this: ^IDevice, pDesc: ^TEXTURE3D_DESC, pInitialData: ^SUBRESOURCE_DATA, ppTexture3D: ^^ITexture3D) -> HRESULT,
+ CreateShaderResourceView: proc "stdcall" (this: ^IDevice, pResource: ^IResource, pDesc: ^SHADER_RESOURCE_VIEW_DESC, ppSRView: ^^IShaderResourceView) -> HRESULT,
+ CreateUnorderedAccessView: proc "stdcall" (this: ^IDevice, pResource: ^IResource, pDesc: ^UNORDERED_ACCESS_VIEW_DESC, ppUAView: ^^IUnorderedAccessView) -> HRESULT,
+ CreateRenderTargetView: proc "stdcall" (this: ^IDevice, pResource: ^IResource, pDesc: ^RENDER_TARGET_VIEW_DESC, ppRTView: ^^IRenderTargetView) -> HRESULT,
+ CreateDepthStencilView: proc "stdcall" (this: ^IDevice, pResource: ^IResource, pDesc: ^DEPTH_STENCIL_VIEW_DESC, ppDepthStencilView: ^^IDepthStencilView) -> HRESULT,
+ CreateInputLayout: proc "stdcall" (this: ^IDevice, pInputElementDescs: ^INPUT_ELEMENT_DESC, NumElements: u32, pShaderBytecodeWithInputSignature: rawptr, BytecodeLength: SIZE_T, ppInputLayout: ^^IInputLayout) -> HRESULT,
+ CreateVertexShader: proc "stdcall" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppVertexShader: ^^IVertexShader) -> HRESULT,
+ CreateGeometryShader: proc "stdcall" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppGeometryShader: ^^IGeometryShader) -> HRESULT,
+ CreateGeometryShaderWithStreamOutput: proc "stdcall" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pSODeclaration: ^SO_DECLARATION_ENTRY, NumEntries: u32, pBufferStrides: ^u32, NumStrides: u32, RasterizedStream: u32, pClassLinkage: ^IClassLinkage, ppGeometryShader: ^^IGeometryShader) -> HRESULT,
+ CreatePixelShader: proc "stdcall" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppPixelShader: ^^IPixelShader) -> HRESULT,
+ CreateHullShader: proc "stdcall" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppHullShader: ^^IHullShader) -> HRESULT,
+ CreateDomainShader: proc "stdcall" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppDomainShader: ^^IDomainShader) -> HRESULT,
+ CreateComputeShader: proc "stdcall" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppComputeShader: ^^IComputeShader) -> HRESULT,
+ CreateClassLinkage: proc "stdcall" (this: ^IDevice, ppLinkage: ^^IClassLinkage) -> HRESULT,
+ CreateBlendState: proc "stdcall" (this: ^IDevice, pBlendStateDesc: ^BLEND_DESC, ppBlendState: ^^IBlendState) -> HRESULT,
+ CreateDepthStencilState: proc "stdcall" (this: ^IDevice, pDepthStencilDesc: ^DEPTH_STENCIL_DESC, ppDepthStencilState: ^^IDepthStencilState) -> HRESULT,
+ CreateRasterizerState: proc "stdcall" (this: ^IDevice, pRasterizerDesc: ^RASTERIZER_DESC, ppRasterizerState: ^^IRasterizerState) -> HRESULT,
+ CreateSamplerState: proc "stdcall" (this: ^IDevice, pSamplerDesc: ^SAMPLER_DESC, ppSamplerState: ^^ISamplerState) -> HRESULT,
+ CreateQuery: proc "stdcall" (this: ^IDevice, pQueryDesc: ^QUERY_DESC, ppQuery: ^^IQuery) -> HRESULT,
+ CreatePredicate: proc "stdcall" (this: ^IDevice, pPredicateDesc: ^QUERY_DESC, ppPredicate: ^^IPredicate) -> HRESULT,
+ CreateCounter: proc "stdcall" (this: ^IDevice, pCounterDesc: ^COUNTER_DESC, ppCounter: ^^ICounter) -> HRESULT,
+ CreateDeferredContext: proc "stdcall" (this: ^IDevice, ContextFlags: u32, ppDeferredContext: ^^IDeviceContext) -> HRESULT,
+ OpenSharedResource: proc "stdcall" (this: ^IDevice, hResource: HANDLE, ReturnedInterface: ^IID, ppResource: ^rawptr) -> HRESULT,
+ CheckFormatSupport: proc "stdcall" (this: ^IDevice, Format: dxgi.FORMAT, pFormatSupport: ^u32) -> HRESULT,
+ CheckMultisampleQualityLevels: proc "stdcall" (this: ^IDevice, Format: dxgi.FORMAT, SampleCount: u32, pNumQualityLevels: ^u32) -> HRESULT,
+ CheckCounterInfo: proc "stdcall" (this: ^IDevice, pCounterInfo: ^COUNTER_INFO),
+ CheckCounter: proc "stdcall" (this: ^IDevice, pDesc: ^COUNTER_DESC, pType: ^COUNTER_TYPE, pActiveCounters: ^u32, szName: cstring, pNameLength: ^u32, szUnits: ^u8, pUnitsLength: ^u32, szDescription: cstring, pDescriptionLength: ^u32) -> HRESULT,
+ CheckFeatureSupport: proc "stdcall" (this: ^IDevice, Feature: FEATURE, pFeatureSupportData: rawptr, FeatureSupportDataSize: u32) -> HRESULT,
+ GetPrivateData: proc "stdcall" (this: ^IDevice, guid: ^GUID, pDataSize: ^u32, pData: rawptr) -> HRESULT,
+ SetPrivateData: proc "stdcall" (this: ^IDevice, guid: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT,
+ SetPrivateDataInterface: proc "stdcall" (this: ^IDevice, guid: ^GUID, pData: ^IUnknown) -> HRESULT,
+ GetFeatureLevel: proc "stdcall" (this: ^IDevice) -> FEATURE_LEVEL,
+ GetCreationFlags: proc "stdcall" (this: ^IDevice) -> u32,
+ GetDeviceRemovedReason: proc "stdcall" (this: ^IDevice) -> HRESULT,
+ GetImmediateContext: proc "stdcall" (this: ^IDevice, ppImmediateContext: ^^IDeviceContext),
+ SetExceptionMode: proc "stdcall" (this: ^IDevice, RaiseFlags: u32) -> HRESULT,
+ GetExceptionMode: proc "stdcall" (this: ^IDevice) -> u32,
+}
+
+
+CREATE_DEVICE_FLAGS :: distinct bit_set[CREATE_DEVICE_FLAG; u32]
+CREATE_DEVICE_FLAG :: enum u32 { // TODO: make bit_set
+ SINGLETHREADED = 0,
+ DEBUG = 1,
+ SWITCH_TO_REF = 2,
+ PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 3,
+ BGRA_SUPPORT = 5,
+ DEBUGGABLE = 6,
+ PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = 7,
+ DISABLE_GPU_TIMEOUT = 8,
+ VIDEO_SUPPORT = 12,
+}
+
+PFN_CREATE_DEVICE :: #type proc "c" (a0: ^dxgi.IAdapter, a1: DRIVER_TYPE, a2: HMODULE, a3: u32, a4: ^FEATURE_LEVEL, a5: u32, a6: u32, a7: ^^IDevice, a8: ^FEATURE_LEVEL, a9: ^^IDeviceContext) -> HRESULT
+PFN_CREATE_DEVICE_AND_SWAP_CHAIN :: #type proc "c" (a0: ^dxgi.IAdapter, a1: DRIVER_TYPE, a2: HMODULE, a3: u32, a4: ^FEATURE_LEVEL, a5: u32, a6: u32, a7: ^dxgi.SWAP_CHAIN_DESC, a8: ^^dxgi.ISwapChain, a9: ^^IDevice, a10: ^FEATURE_LEVEL, a11: ^^IDeviceContext) -> HRESULT
+
+SHADER_VERSION_TYPE :: enum i32 {
+ PIXEL_SHADER = 0,
+ VERTEX_SHADER = 1,
+ GEOMETRY_SHADER = 2,
+
+ HULL_SHADER = 3,
+ DOMAIN_SHADER = 4,
+ COMPUTE_SHADER = 5,
+
+ RESERVED0 = 65520,
+}
+
+SIGNATURE_PARAMETER_DESC :: struct {
+ SemanticName: cstring,
+ SemanticIndex: u32,
+ Register: u32,
+ SystemValueType: NAME,
+ ComponentType: REGISTER_COMPONENT_TYPE,
+ Mask: u8,
+
+ ReadWriteMask: u8,
+
+ Stream: u32,
+ MinPrecision: MIN_PRECISION,
+}
+
+SHADER_BUFFER_DESC :: struct {
+ Name: cstring,
+ Type: CBUFFER_TYPE,
+ Variables: u32,
+ Size: u32,
+ uFlags: u32,
+}
+
+SHADER_VARIABLE_DESC :: struct {
+ Name: cstring,
+ StartOffset: u32,
+ Size: u32,
+ uFlags: u32,
+ DefaultValue: rawptr,
+ StartTexture: u32,
+ TextureSize: u32,
+ StartSampler: u32,
+ SamplerSize: u32,
+}
+
+SHADER_TYPE_DESC :: struct {
+ Class: SHADER_VARIABLE_CLASS,
+ Type: SHADER_VARIABLE_TYPE,
+ Rows: u32,
+ Columns: u32,
+ Elements: u32,
+ Members: u32,
+ Offset: u32,
+ Name: cstring,
+}
+
+SHADER_DESC :: struct {
+ Version: u32,
+ Creator: cstring,
+ Flags: u32,
+
+ ConstantBuffers: u32,
+ BoundResources: u32,
+ InputParameters: u32,
+ OutputParameters: u32,
+
+ InstructionCount: u32,
+ TempRegisterCount: u32,
+ TempArrayCount: u32,
+ DefCount: u32,
+ DclCount: u32,
+ TextureNormalInstructions: u32,
+ TextureLoadInstructions: u32,
+ TextureCompInstructions: u32,
+ TextureBiasInstructions: u32,
+ TextureGradientInstructions: u32,
+ FloatInstructionCount: u32,
+ IntInstructionCount: u32,
+ UintInstructionCount: u32,
+ StaticFlowControlCount: u32,
+ DynamicFlowControlCount: u32,
+ MacroInstructionCount: u32,
+ ArrayInstructionCount: u32,
+ CutInstructionCount: u32,
+ EmitInstructionCount: u32,
+ GSOutputTopology: PRIMITIVE_TOPOLOGY,
+ GSMaxOutputVertexCount: u32,
+ InputPrimitive: PRIMITIVE,
+ PatchConstantParameters: u32,
+ cGSInstanceCount: u32,
+ cControlPoints: u32,
+ HSOutputPrimitive: TESSELLATOR_OUTPUT_PRIMITIVE,
+ HSPartitioning: TESSELLATOR_PARTITIONING,
+ TessellatorDomain: TESSELLATOR_DOMAIN,
+
+ cBarrierInstructions: u32,
+ cInterlockedInstructions: u32,
+ cTextureStoreInstructions: u32,
+}
+
+SHADER_INPUT_BIND_DESC :: struct {
+ Name: cstring,
+ Type: SHADER_INPUT_TYPE,
+ BindPoint: u32,
+ BindCount: u32,
+
+ uFlags: u32,
+ ReturnType: RESOURCE_RETURN_TYPE,
+ Dimension: SRV_DIMENSION,
+ NumSamples: u32,
+}
+
+LIBRARY_DESC :: struct {
+ Creator: cstring,
+ Flags: u32,
+ FunctionCount: u32,
+}
+
+FUNCTION_DESC :: struct {
+ Version: u32,
+ Creator: cstring,
+ Flags: u32,
+
+ ConstantBuffers: u32,
+ BoundResources: u32,
+
+ InstructionCount: u32,
+ TempRegisterCount: u32,
+ TempArrayCount: u32,
+ DefCount: u32,
+ DclCount: u32,
+ TextureNormalInstructions: u32,
+ TextureLoadInstructions: u32,
+ TextureCompInstructions: u32,
+ TextureBiasInstructions: u32,
+ TextureGradientInstructions: u32,
+ FloatInstructionCount: u32,
+ IntInstructionCount: u32,
+ UintInstructionCount: u32,
+ StaticFlowControlCount: u32,
+ DynamicFlowControlCount: u32,
+ MacroInstructionCount: u32,
+ ArrayInstructionCount: u32,
+ MovInstructionCount: u32,
+ MovcInstructionCount: u32,
+ ConversionInstructionCount: u32,
+ BitwiseInstructionCount: u32,
+ MinFeatureLevel: FEATURE_LEVEL,
+ RequiredFeatureFlags: u64,
+
+ Name: cstring,
+ FunctionParameterCount: i32,
+ HasReturn: BOOL,
+ Has10Level9VertexShader: BOOL,
+ Has10Level9PixelShader: BOOL,
+}
+
+PARAMETER_DESC :: struct {
+ Name: cstring,
+ SemanticName: cstring,
+ Type: SHADER_VARIABLE_TYPE,
+ Class: SHADER_VARIABLE_CLASS,
+ Rows: u32,
+ Columns: u32,
+ InterpolationMode: INTERPOLATION_MODE,
+ Flags: PARAMETER_FLAGS,
+
+ FirstInRegister: u32,
+ FirstInComponent: u32,
+ FirstOutRegister: u32,
+ FirstOutComponent: u32,
+}
+
+IShaderReflectionType :: struct {
+ using vtable: ^IShaderReflectionType_VTable,
+}
+IShaderReflectionType_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IShaderReflectionType, pDesc: ^SHADER_TYPE_DESC) -> HRESULT,
+ GetMemberTypeByIndex: proc "stdcall" (this: ^IShaderReflectionType, Index: u32) -> ^IShaderReflectionType,
+ GetMemberTypeByName: proc "stdcall" (this: ^IShaderReflectionType, Name: cstring) -> ^IShaderReflectionType,
+ GetMemberTypeName: proc "stdcall" (this: ^IShaderReflectionType, Index: u32) -> cstring,
+ IsEqual: proc "stdcall" (this: ^IShaderReflectionType, pType: ^IShaderReflectionType) -> HRESULT,
+ GetSubType: proc "stdcall" (this: ^IShaderReflectionType) -> ^IShaderReflectionType,
+ GetBaseClass: proc "stdcall" (this: ^IShaderReflectionType) -> ^IShaderReflectionType,
+ GetNumInterfaces: proc "stdcall" (this: ^IShaderReflectionType) -> u32,
+ GetInterfaceByIndex: proc "stdcall" (this: ^IShaderReflectionType, uIndex: u32) -> ^IShaderReflectionType,
+ IsOfType: proc "stdcall" (this: ^IShaderReflectionType, pType: ^IShaderReflectionType) -> HRESULT,
+ ImplementsInterface: proc "stdcall" (this: ^IShaderReflectionType, pBase: ^IShaderReflectionType) -> HRESULT,
+}
+
+IShaderReflectionVariable :: struct {
+ using vtable: ^IShaderReflectionVariable_VTable,
+}
+IShaderReflectionVariable_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IShaderReflectionVariable, pDesc: ^SHADER_VARIABLE_DESC) -> HRESULT,
+ GetType: proc "stdcall" (this: ^IShaderReflectionVariable) -> ^IShaderReflectionType,
+ GetBuffer: proc "stdcall" (this: ^IShaderReflectionVariable) -> ^IShaderReflectionConstantBuffer,
+ GetInterfaceSlot: proc "stdcall" (this: ^IShaderReflectionVariable, uArrayIndex: u32) -> u32,
+}
+
+IShaderReflectionConstantBuffer :: struct {
+ using vtable: ^IShaderReflectionConstantBuffer_VTable,
+}
+IShaderReflectionConstantBuffer_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IShaderReflectionConstantBuffer, pDesc: ^SHADER_BUFFER_DESC) -> HRESULT,
+ GetVariableByIndex: proc "stdcall" (this: ^IShaderReflectionConstantBuffer, Index: u32) -> ^IShaderReflectionVariable,
+ GetVariableByName: proc "stdcall" (this: ^IShaderReflectionConstantBuffer, Name: cstring) -> ^IShaderReflectionVariable,
+}
+
+
+IShaderReflection :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11shaderreflection_vtable: ^IShaderReflection_VTable,
+}
+IShaderReflection_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetDesc: proc "stdcall" (this: ^IShaderReflection, pDesc: ^SHADER_DESC) -> HRESULT,
+ GetConstantBufferByIndex: proc "stdcall" (this: ^IShaderReflection, Index: u32) -> ^IShaderReflectionConstantBuffer,
+ GetConstantBufferByName: proc "stdcall" (this: ^IShaderReflection, Name: cstring) -> ^IShaderReflectionConstantBuffer,
+ GetResourceBindingDesc: proc "stdcall" (this: ^IShaderReflection, ResourceIndex: u32, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT,
+ GetInputParameterDesc: proc "stdcall" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT,
+ GetOutputParameterDesc: proc "stdcall" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT,
+ GetPatchConstantParameterDesc: proc "stdcall" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT,
+ GetVariableByName: proc "stdcall" (this: ^IShaderReflection, Name: cstring) -> ^IShaderReflectionVariable,
+ GetResourceBindingDescByName: proc "stdcall" (this: ^IShaderReflection, Name: cstring, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT,
+ GetMovInstructionCount: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetMovcInstructionCount: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetConversionInstructionCount: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetBitwiseInstructionCount: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetGSInputPrimitive: proc "stdcall" (this: ^IShaderReflection) -> PRIMITIVE,
+ IsSampleFrequencyShader: proc "stdcall" (this: ^IShaderReflection) -> BOOL,
+ GetNumInterfaceSlots: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetMinFeatureLevel: proc "stdcall" (this: ^IShaderReflection, pLevel: ^FEATURE_LEVEL) -> HRESULT,
+ GetThreadGroupSize: proc "stdcall" (this: ^IShaderReflection, pSizeX: ^u32, pSizeY: ^u32, pSizeZ: ^u32) -> u32,
+ GetRequiresFlags: proc "stdcall" (this: ^IShaderReflection) -> u64,
+}
+
+
+ILibraryReflection :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11libraryreflection_vtable: ^ILibraryReflection_VTable,
+}
+ILibraryReflection_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetDesc: proc "stdcall" (this: ^ILibraryReflection, pDesc: ^LIBRARY_DESC) -> HRESULT,
+ GetFunctionByIndex: proc "stdcall" (this: ^ILibraryReflection, FunctionIndex: i32) -> ^IFunctionReflection,
+}
+
+IFunctionReflection :: struct {
+ using vtable: ^IFunctionReflection_VTable,
+}
+IFunctionReflection_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IFunctionReflection, pDesc: ^FUNCTION_DESC) -> HRESULT,
+ GetConstantBufferByIndex: proc "stdcall" (this: ^IFunctionReflection, BufferIndex: u32) -> ^IShaderReflectionConstantBuffer,
+ GetConstantBufferByName: proc "stdcall" (this: ^IFunctionReflection, Name: cstring) -> ^IShaderReflectionConstantBuffer,
+ GetResourceBindingDesc: proc "stdcall" (this: ^IFunctionReflection, ResourceIndex: u32, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT,
+ GetVariableByName: proc "stdcall" (this: ^IFunctionReflection, Name: cstring) -> ^IShaderReflectionVariable,
+ GetResourceBindingDescByName: proc "stdcall" (this: ^IFunctionReflection, Name: cstring, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT,
+ GetFunctionParameter: proc "stdcall" (this: ^IFunctionReflection, ParameterIndex: i32) -> ^IFunctionParameterReflection,
+}
+
+IFunctionParameterReflection :: struct {
+ using vtable: ^IFunctionParameterReflection_VTable,
+}
+IFunctionParameterReflection_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IFunctionParameterReflection, pDesc: ^PARAMETER_DESC) -> HRESULT,
+}
+
+
+ILinkingNode :: struct {
+ using iunknown: IUnknown,
+}
+
+IFunctionLinkingGraph :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11functionlinkinggraph_vtable: ^IFunctionLinkingGraph_VTable,
+}
+IFunctionLinkingGraph_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ CreateModuleInstance: proc "stdcall" (this: ^IFunctionLinkingGraph, ppModuleInstance: ^^IModuleInstance, ppErrorBuffer: ^^IBlob) -> HRESULT,
+ SetInputSignature: proc "stdcall" (this: ^IFunctionLinkingGraph, pInputParameters: ^PARAMETER_DESC, cInputParameters: u32, ppInputNode: ^^ILinkingNode) -> HRESULT,
+ SetOutputSignature: proc "stdcall" (this: ^IFunctionLinkingGraph, pOutputParameters: ^PARAMETER_DESC, cOutputParameters: u32, ppOutputNode: ^^ILinkingNode) -> HRESULT,
+ CallFunction: proc "stdcall" (this: ^IFunctionLinkingGraph, pModuleInstanceNamespace: cstring, pModuleWithFunctionPrototype: ^IModule, pFunctionName: cstring, ppCallNode: ^^ILinkingNode) -> HRESULT,
+ PassValue: proc "stdcall" (this: ^IFunctionLinkingGraph, pSrcNode: ^ILinkingNode, SrcParameterIndex: i32, pDstNode: ^ILinkingNode, DstParameterIndex: i32) -> HRESULT,
+ PassValueWithSwizzle: proc "stdcall" (this: ^IFunctionLinkingGraph, pSrcNode: ^ILinkingNode, SrcParameterIndex: i32, pSrcSwizzle: ^u8, pDstNode: ^ILinkingNode, DstParameterIndex: i32, pDstSwizzle: ^u8) -> HRESULT,
+ GetLastError: proc "stdcall" (this: ^IFunctionLinkingGraph, ppErrorBuffer: ^^IBlob) -> HRESULT,
+ GenerateHlsl: proc "stdcall" (this: ^IFunctionLinkingGraph, uFlags: u32, ppBuffer: ^^IBlob) -> HRESULT,
+}
diff --git a/vendor/directx/d3d12/d3d12.odin b/vendor/directx/d3d12/d3d12.odin
new file mode 100644
index 000000000..f3885ed63
--- /dev/null
+++ b/vendor/directx/d3d12/d3d12.odin
@@ -0,0 +1,5102 @@
+package directx_d3d12
+
+foreign import "system:d3d12.lib"
+
+import "../dxgi"
+import "../d3d_compiler"
+import win32 "core:sys/windows"
+
+IUnknown :: dxgi.IUnknown
+IUnknown_VTable :: dxgi.IUnknown_VTable
+
+HANDLE :: dxgi.HANDLE
+HMODULE :: dxgi.HMODULE
+HRESULT :: dxgi.HRESULT
+HWND :: dxgi.HWND
+LUID :: dxgi.LUID
+UUID :: dxgi.UUID
+GUID :: dxgi.GUID
+IID :: dxgi.IID
+SIZE_T :: dxgi.SIZE_T
+BOOL :: dxgi.BOOL
+
+RECT :: dxgi.RECT
+
+IModuleInstance :: d3d_compiler.ID3D11ModuleInstance
+IBlob :: d3d_compiler.ID3DBlob
+IModule :: d3d_compiler.ID3D11Module
+
+@(default_calling_convention="stdcall", link_prefix="D3D12")
+foreign d3d12 {
+ CreateDevice :: proc(pAdapter: ^IUnknown, MinimumFeatureLevel: FEATURE_LEVEL, riid: ^IID, ppDevice: ^rawptr) -> HRESULT ---
+ CreateRootSignatureDeserializer :: proc(pSrcData: rawptr, SrcDataSizeInBytes: SIZE_T, pRootSignatureDeserializerInterface: ^IID, ppRootSignatureDeserializer: ^rawptr) -> HRESULT ---
+ CreateVersionedRootSignatureDeserializer :: proc(pSrcData: rawptr, SrcDataSizeInBytes: SIZE_T, pRootSignatureDeserializerInterface: ^IID, ppRootSignatureDeserializer: ^rawptr) -> HRESULT ---
+ EnableExperimentalFeatures :: proc(NumFeatures: u32, pIIDs: ^IID, pConfigurationStructs: rawptr, pConfigurationStructSizes: ^u32) -> HRESULT ---
+ GetDebugInterface :: proc(riid: ^IID, ppvDebug: ^rawptr) -> HRESULT ---
+ SerializeRootSignature :: proc(pRootSignature: ^ROOT_SIGNATURE_DESC, Version: ROOT_SIGNATURE_VERSION, ppBlob: ^^IBlob, ppErrorBlob: ^^IBlob) -> HRESULT ---
+ SerializeVersionedRootSignature :: proc(pRootSignature: ^VERSIONED_ROOT_SIGNATURE_DESC, ppBlob: ^^IBlob, ppErrorBlob: ^^IBlob) -> HRESULT ---
+}
+
+foreign d3d12 {
+ WKPDID_D3DDebugObjectNameW: GUID
+ WKPDID_CommentStringW: GUID
+
+ @(link_name="DXGI_DEBUG_D3D12")
+ DEBUG_D3D12: GUID
+
+ @(link_name="D3D12_PROTECTED_RESOURCES_SESSION_HARDWARE_PROTECTED")
+ PROTECTED_RESOURCES_SESSION_HARDWARE_PROTECTED: GUID
+}
+
+@(link_prefix="D3D_")
+foreign d3d12 {
+ TEXTURE_LAYOUT_ROW_MAJOR: GUID
+ TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE: GUID
+}
+
+@(link_prefix="D3D12")
+foreign d3d12 {
+ ExperimentalShaderModels: UUID
+ TiledResourceTier4: UUID
+ MetaCommand: UUID
+}
+
+
+DRIVER_TYPE :: enum i32 {
+ UNKNOWN = 0,
+ HARDWARE = 1,
+ REFERENCE = 2,
+ NULL = 3,
+ SOFTWARE = 4,
+ WARP = 5,
+}
+
+FEATURE_LEVEL :: enum i32 {
+ _1_0_CORE = 4096,
+ _9_1 = 37120,
+ _9_2 = 37376,
+ _9_3 = 37632,
+ _10_0 = 40960,
+ _10_1 = 41216,
+ _11_0 = 45056,
+ _11_1 = 45312,
+ _12_0 = 49152,
+ _12_1 = 49408,
+}
+
+PRIMITIVE_TOPOLOGY :: enum i32 {
+ UNDEFINED = 0,
+ POINTLIST = 1,
+ LINELIST = 2,
+ LINESTRIP = 3,
+ TRIANGLELIST = 4,
+ TRIANGLESTRIP = 5,
+ LINELIST_ADJ = 10,
+ LINESTRIP_ADJ = 11,
+ TRIANGLELIST_ADJ = 12,
+ TRIANGLESTRIP_ADJ = 13,
+ _1_CONTROL_POINT_PATCHLIST = 33,
+ _2_CONTROL_POINT_PATCHLIST = 34,
+ _3_CONTROL_POINT_PATCHLIST = 35,
+ _4_CONTROL_POINT_PATCHLIST = 36,
+ _5_CONTROL_POINT_PATCHLIST = 37,
+ _6_CONTROL_POINT_PATCHLIST = 38,
+ _7_CONTROL_POINT_PATCHLIST = 39,
+ _8_CONTROL_POINT_PATCHLIST = 40,
+ _9_CONTROL_POINT_PATCHLIST = 41,
+ _10_CONTROL_POINT_PATCHLIST = 42,
+ _11_CONTROL_POINT_PATCHLIST = 43,
+ _12_CONTROL_POINT_PATCHLIST = 44,
+ _13_CONTROL_POINT_PATCHLIST = 45,
+ _14_CONTROL_POINT_PATCHLIST = 46,
+ _15_CONTROL_POINT_PATCHLIST = 47,
+ _16_CONTROL_POINT_PATCHLIST = 48,
+ _17_CONTROL_POINT_PATCHLIST = 49,
+ _18_CONTROL_POINT_PATCHLIST = 50,
+ _19_CONTROL_POINT_PATCHLIST = 51,
+ _20_CONTROL_POINT_PATCHLIST = 52,
+ _21_CONTROL_POINT_PATCHLIST = 53,
+ _22_CONTROL_POINT_PATCHLIST = 54,
+ _23_CONTROL_POINT_PATCHLIST = 55,
+ _24_CONTROL_POINT_PATCHLIST = 56,
+ _25_CONTROL_POINT_PATCHLIST = 57,
+ _26_CONTROL_POINT_PATCHLIST = 58,
+ _27_CONTROL_POINT_PATCHLIST = 59,
+ _28_CONTROL_POINT_PATCHLIST = 60,
+ _29_CONTROL_POINT_PATCHLIST = 61,
+ _30_CONTROL_POINT_PATCHLIST = 62,
+ _31_CONTROL_POINT_PATCHLIST = 63,
+ _32_CONTROL_POINT_PATCHLIST = 64,
+}
+
+PRIMITIVE :: enum i32 {
+ UNDEFINED = 0,
+ POINT = 1,
+ LINE = 2,
+ TRIANGLE = 3,
+ LINE_ADJ = 6,
+ TRIANGLE_ADJ = 7,
+ _1_CONTROL_POINT_PATCH = 8,
+ _2_CONTROL_POINT_PATCH = 9,
+ _3_CONTROL_POINT_PATCH = 10,
+ _4_CONTROL_POINT_PATCH = 11,
+ _5_CONTROL_POINT_PATCH = 12,
+ _6_CONTROL_POINT_PATCH = 13,
+ _7_CONTROL_POINT_PATCH = 14,
+ _8_CONTROL_POINT_PATCH = 15,
+ _9_CONTROL_POINT_PATCH = 16,
+ _10_CONTROL_POINT_PATCH = 17,
+ _11_CONTROL_POINT_PATCH = 18,
+ _12_CONTROL_POINT_PATCH = 19,
+ _13_CONTROL_POINT_PATCH = 20,
+ _14_CONTROL_POINT_PATCH = 21,
+ _15_CONTROL_POINT_PATCH = 22,
+ _16_CONTROL_POINT_PATCH = 23,
+ _17_CONTROL_POINT_PATCH = 24,
+ _18_CONTROL_POINT_PATCH = 25,
+ _19_CONTROL_POINT_PATCH = 26,
+ _20_CONTROL_POINT_PATCH = 27,
+ _21_CONTROL_POINT_PATCH = 28,
+ _22_CONTROL_POINT_PATCH = 29,
+ _23_CONTROL_POINT_PATCH = 30,
+ _24_CONTROL_POINT_PATCH = 31,
+ _25_CONTROL_POINT_PATCH = 32,
+ _26_CONTROL_POINT_PATCH = 33,
+ _27_CONTROL_POINT_PATCH = 34,
+ _28_CONTROL_POINT_PATCH = 35,
+ _29_CONTROL_POINT_PATCH = 36,
+ _30_CONTROL_POINT_PATCH = 37,
+ _31_CONTROL_POINT_PATCH = 38,
+ _32_CONTROL_POINT_PATCH = 39,
+}
+
+SRV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ BUFFER = 1,
+ TEXTURE1D = 2,
+ TEXTURE1DARRAY = 3,
+ TEXTURE2D = 4,
+ TEXTURE2DARRAY = 5,
+ TEXTURE2DMS = 6,
+ TEXTURE2DMSARRAY = 7,
+ TEXTURE3D = 8,
+ TEXTURECUBE = 9,
+ TEXTURECUBEARRAY = 10,
+ BUFFEREX = 11,
+ RAYTRACING_ACCELERATION_STRUCTURE = 11,
+}
+
+PFN_DESTRUCTION_CALLBACK :: #type proc "c" (a0: rawptr)
+
+
+ID3DDestructionNotifier_UUID :: "a06eb39a-50da-425b-8c31-4eecd6c270f3"
+ID3DDestructionNotifier :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3ddestructionnotifier_vtable: ^ID3DDestructionNotifier_VTable,
+}
+ID3DDestructionNotifier_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ RegisterDestructionCallback: proc "stdcall" (this: ^ID3DDestructionNotifier, callbackFn: PFN_DESTRUCTION_CALLBACK, pData: rawptr, pCallbackID: ^u32) -> HRESULT,
+ UnregisterDestructionCallback: proc "stdcall" (this: ^ID3DDestructionNotifier, callbackID: u32) -> HRESULT,
+}
+
+SHADER_VARIABLE_CLASS :: enum i32 {
+ SCALAR = 0,
+ VECTOR = 1,
+ MATRIX_ROWS = 2,
+ MATRIX_COLUMNS = 3,
+ OBJECT = 4,
+ STRUCT = 5,
+ INTERFACE_CLASS = 6,
+ INTERFACE_POINTER = 7,
+}
+
+SHADER_VARIABLE_FLAGS :: enum u32 { // TODO: make bit_set
+ USERPACKED = 0x1,
+ USED = 0x2,
+ INTERFACE_POINTER = 0x4,
+ INTERFACE_PARAMETER = 0x8,
+}
+
+SHADER_VARIABLE_TYPE :: enum i32 {
+ VOID = 0,
+ BOOL = 1,
+ INT = 2,
+ FLOAT = 3,
+ STRING = 4,
+ TEXTURE = 5,
+ TEXTURE1D = 6,
+ TEXTURE2D = 7,
+ TEXTURE3D = 8,
+ TEXTURECUBE = 9,
+ SAMPLER = 10,
+ SAMPLER1D = 11,
+ SAMPLER2D = 12,
+ SAMPLER3D = 13,
+ SAMPLERCUBE = 14,
+ PIXELSHADER = 15,
+ VERTEXSHADER = 16,
+ PIXELFRAGMENT = 17,
+ VERTEXFRAGMENT = 18,
+ UINT = 19,
+ UINT8 = 20,
+ GEOMETRYSHADER = 21,
+ RASTERIZER = 22,
+ DEPTHSTENCIL = 23,
+ BLEND = 24,
+ BUFFER = 25,
+ CBUFFER = 26,
+ TBUFFER = 27,
+ TEXTURE1DARRAY = 28,
+ TEXTURE2DARRAY = 29,
+ RENDERTARGETVIEW = 30,
+ DEPTHSTENCILVIEW = 31,
+ TEXTURE2DMS = 32,
+ TEXTURE2DMSARRAY = 33,
+ TEXTURECUBEARRAY = 34,
+ HULLSHADER = 35,
+ DOMAINSHADER = 36,
+ INTERFACE_POINTER = 37,
+ COMPUTESHADER = 38,
+ DOUBLE = 39,
+ RWTEXTURE1D = 40,
+ RWTEXTURE1DARRAY = 41,
+ RWTEXTURE2D = 42,
+ RWTEXTURE2DARRAY = 43,
+ RWTEXTURE3D = 44,
+ RWBUFFER = 45,
+ BYTEADDRESS_BUFFER = 46,
+ RWBYTEADDRESS_BUFFER = 47,
+ STRUCTURED_BUFFER = 48,
+ RWSTRUCTURED_BUFFER = 49,
+ APPEND_STRUCTURED_BUFFER = 50,
+ CONSUME_STRUCTURED_BUFFER = 51,
+ MIN8FLOAT = 52,
+ MIN10FLOAT = 53,
+ MIN16FLOAT = 54,
+ MIN12INT = 55,
+ MIN16INT = 56,
+ MIN16UINT = 57,
+}
+
+SHADER_INPUT_FLAGS :: enum u32 { // TODO: make bit_set
+ USERPACKED = 0x1,
+ COMPARISON_SAMPLER = 0x2,
+ TEXTURE_COMPONENT_0 = 0x4,
+ TEXTURE_COMPONENT_1 = 0x8,
+ TEXTURE_COMPONENTS = 0xc,
+ UNUSED = 0x10,
+}
+
+SHADER_INPUT_TYPE :: enum i32 {
+ CBUFFER = 0,
+ TBUFFER = 1,
+ TEXTURE = 2,
+ SAMPLER = 3,
+ UAV_RWTYPED = 4,
+ STRUCTURED = 5,
+ UAV_RWSTRUCTURED = 6,
+ BYTEADDRESS = 7,
+ UAV_RWBYTEADDRESS = 8,
+ UAV_APPEND_STRUCTURED = 9,
+ UAV_CONSUME_STRUCTURED = 10,
+ UAV_RWSTRUCTURED_WITH_COUNTER = 11,
+ RTACCELERATIONSTRUCTURE = 12,
+ UAV_FEEDBACKTEXTURE = 13,
+}
+
+SHADER_CBUFFER_FLAGS :: enum u32 { // TODO: make bit_set
+ USERPACKED = 0x1,
+}
+
+CBUFFER_TYPE :: enum i32 {
+ CBUFFER = 0,
+ TBUFFER = 1,
+ INTERFACE_POINTERS = 2,
+ RESOURCE_BIND_INFO = 3,
+}
+
+NAME :: enum i32 {
+ UNDEFINED = 0,
+ POSITION = 1,
+ CLIP_DISTANCE = 2,
+ CULL_DISTANCE = 3,
+ RENDER_TARGET_ARRAY_INDEX = 4,
+ VIEWPORT_ARRAY_INDEX = 5,
+ VERTEX_ID = 6,
+ PRIMITIVE_ID = 7,
+ INSTANCE_ID = 8,
+ IS_FRONT_FACE = 9,
+ SAMPLE_INDEX = 10,
+ FINAL_QUAD_EDGE_TESSFACTOR = 11,
+ FINAL_QUAD_INSIDE_TESSFACTOR = 12,
+ FINAL_TRI_EDGE_TESSFACTOR = 13,
+ FINAL_TRI_INSIDE_TESSFACTOR = 14,
+ FINAL_LINE_DETAIL_TESSFACTOR = 15,
+ FINAL_LINE_DENSITY_TESSFACTOR = 16,
+ BARYCENTRICS = 23,
+ SHADINGRATE = 24,
+ CULLPRIMITIVE = 25,
+ TARGET = 64,
+ DEPTH = 65,
+ COVERAGE = 66,
+ DEPTH_GREATER_EQUAL = 67,
+ DEPTH_LESS_EQUAL = 68,
+ STENCIL_REF = 69,
+ INNER_COVERAGE = 70,
+}
+
+RESOURCE_RETURN_TYPE :: enum i32 {
+ UNORM = 1,
+ SNORM = 2,
+ SINT = 3,
+ UINT = 4,
+ FLOAT = 5,
+ MIXED = 6,
+ DOUBLE = 7,
+ CONTINUED = 8,
+}
+
+REGISTER_COMPONENT_TYPE :: enum i32 {
+ UNKNOWN = 0,
+ UINT32 = 1,
+ SINT32 = 2,
+ FLOAT32 = 3,
+}
+
+TESSELLATOR_DOMAIN :: enum i32 {
+ UNDEFINED = 0,
+ ISOLINE = 1,
+ TRI = 2,
+ QUAD = 3,
+}
+
+TESSELLATOR_PARTITIONING :: enum i32 {
+ UNDEFINED = 0,
+ INTEGER = 1,
+ POW2 = 2,
+ FRACTIONAL_ODD = 3,
+ FRACTIONAL_EVEN = 4,
+}
+
+TESSELLATOR_OUTPUT_PRIMITIVE :: enum i32 {
+ UNDEFINED = 0,
+ POINT = 1,
+ LINE = 2,
+ TRIANGLE_CW = 3,
+ TRIANGLE_CCW = 4,
+}
+
+MIN_PRECISION :: enum i32 {
+ DEFAULT = 0,
+ FLOAT_16 = 1,
+ FLOAT_2_8 = 2,
+ RESERVED = 3,
+ SINT_16 = 4,
+ UINT_16 = 5,
+ ANY_16 = 240,
+ ANY_10 = 241,
+}
+
+INTERPOLATION_MODE :: enum i32 {
+ UNDEFINED = 0,
+ CONSTANT = 1,
+ LINEAR = 2,
+ LINEAR_CENTROID = 3,
+ LINEAR_NOPERSPECTIVE = 4,
+ LINEAR_NOPERSPECTIVE_CENTROID = 5,
+ LINEAR_SAMPLE = 6,
+ LINEAR_NOPERSPECTIVE_SAMPLE = 7,
+}
+
+PARAMETER_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ IN = 0x1,
+ OUT = 0x2,
+}
+
+
+GPU_VIRTUAL_ADDRESS :: u64
+
+COMMAND_LIST_TYPE :: enum i32 {
+ DIRECT = 0,
+ BUNDLE = 1,
+ COMPUTE = 2,
+ COPY = 3,
+ VIDEO_DECODE = 4,
+ VIDEO_PROCESS = 5,
+ VIDEO_ENCODE = 6,
+}
+
+COMMAND_QUEUE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ DISABLE_GPU_TIMEOUT = 0x1,
+}
+
+COMMAND_QUEUE_PRIORITY :: enum i32 {
+ NORMAL = 0,
+ HIGH = 100,
+ GLOBAL_REALTIME = 10000,
+}
+
+COMMAND_QUEUE_DESC :: struct {
+ Type: COMMAND_LIST_TYPE,
+ Priority: i32,
+ Flags: COMMAND_QUEUE_FLAGS,
+ NodeMask: u32,
+}
+
+PRIMITIVE_TOPOLOGY_TYPE :: enum i32 {
+ UNDEFINED = 0,
+ POINT = 1,
+ LINE = 2,
+ TRIANGLE = 3,
+ PATCH = 4,
+}
+
+INPUT_CLASSIFICATION :: enum i32 {
+ PER_VERTEX_DATA = 0,
+ PER_INSTANCE_DATA = 1,
+}
+
+INPUT_ELEMENT_DESC :: struct {
+ SemanticName: cstring,
+ SemanticIndex: u32,
+ Format: dxgi.FORMAT,
+ InputSlot: u32,
+ AlignedByteOffset: u32,
+ InputSlotClass: INPUT_CLASSIFICATION,
+ InstanceDataStepRate: u32,
+}
+
+FILL_MODE :: enum i32 {
+ WIREFRAME = 2,
+ SOLID = 3,
+}
+
+CULL_MODE :: enum i32 {
+ NONE = 1,
+ FRONT = 2,
+ BACK = 3,
+}
+
+SO_DECLARATION_ENTRY :: struct {
+ Stream: u32,
+ SemanticName: cstring,
+ SemanticIndex: u32,
+ StartComponent: u8,
+ ComponentCount: u8,
+ OutputSlot: u8,
+}
+
+VIEWPORT :: struct {
+ TopLeftX: f32,
+ TopLeftY: f32,
+ Width: f32,
+ Height: f32,
+ MinDepth: f32,
+ MaxDepth: f32,
+}
+
+BOX :: struct {
+ left: u32,
+ top: u32,
+ front: u32,
+ right: u32,
+ bottom: u32,
+ back: u32,
+}
+
+COMPARISON_FUNC :: enum i32 {
+ NEVER = 1,
+ LESS = 2,
+ EQUAL = 3,
+ LESS_EQUAL = 4,
+ GREATER = 5,
+ NOT_EQUAL = 6,
+ GREATER_EQUAL = 7,
+ ALWAYS = 8,
+}
+
+DEPTH_WRITE_MASK :: enum i32 {
+ ZERO = 0,
+ ALL = 1,
+}
+
+STENCIL_OP :: enum i32 {
+ KEEP = 1,
+ ZERO = 2,
+ REPLACE = 3,
+ INCR_SAT = 4,
+ DECR_SAT = 5,
+ INVERT = 6,
+ INCR = 7,
+ DECR = 8,
+}
+
+DEPTH_STENCILOP_DESC :: struct {
+ StencilFailOp: STENCIL_OP,
+ StencilDepthFailOp: STENCIL_OP,
+ StencilPassOp: STENCIL_OP,
+ StencilFunc: COMPARISON_FUNC,
+}
+
+DEPTH_STENCIL_DESC :: struct {
+ DepthEnable: BOOL,
+ DepthWriteMask: DEPTH_WRITE_MASK,
+ DepthFunc: COMPARISON_FUNC,
+ StencilEnable: BOOL,
+ StencilReadMask: u8,
+ StencilWriteMask: u8,
+ FrontFace: DEPTH_STENCILOP_DESC,
+ BackFace: DEPTH_STENCILOP_DESC,
+}
+
+DEPTH_STENCIL_DESC1 :: struct {
+ DepthEnable: BOOL,
+ DepthWriteMask: DEPTH_WRITE_MASK,
+ DepthFunc: COMPARISON_FUNC,
+ StencilEnable: BOOL,
+ StencilReadMask: u8,
+ StencilWriteMask: u8,
+ FrontFace: DEPTH_STENCILOP_DESC,
+ BackFace: DEPTH_STENCILOP_DESC,
+ DepthBoundsTestEnable: BOOL,
+}
+
+BLEND :: enum i32 {
+ ZERO = 1,
+ ONE = 2,
+ SRC_COLOR = 3,
+ INV_SRC_COLOR = 4,
+ SRC_ALPHA = 5,
+ INV_SRC_ALPHA = 6,
+ DEST_ALPHA = 7,
+ INV_DEST_ALPHA = 8,
+ DEST_COLOR = 9,
+ INV_DEST_COLOR = 10,
+ SRC_ALPHA_SAT = 11,
+ BLEND_FACTOR = 14,
+ INV_BLEND_FACTOR = 15,
+ SRC1_COLOR = 16,
+ INV_SRC1_COLOR = 17,
+ SRC1_ALPHA = 18,
+ INV_SRC1_ALPHA = 19,
+}
+
+BLEND_OP :: enum i32 {
+ ADD = 1,
+ SUBTRACT = 2,
+ REV_SUBTRACT = 3,
+ MIN = 4,
+ MAX = 5,
+}
+
+COLOR_WRITE_ENABLE :: enum i32 { // TODO: make bit_set
+ RED = 1,
+ GREEN = 2,
+ BLUE = 4,
+ ALPHA = 8,
+ ALL = 15,
+}
+
+LOGIC_OP :: enum i32 {
+ CLEAR = 0,
+ SET = 1,
+ COPY = 2,
+ COPY_INVERTED = 3,
+ NOOP = 4,
+ INVERT = 5,
+ AND = 6,
+ NAND = 7,
+ OR = 8,
+ NOR = 9,
+ XOR = 10,
+ EQUIV = 11,
+ AND_REVERSE = 12,
+ AND_INVERTED = 13,
+ OR_REVERSE = 14,
+ OR_INVERTED = 15,
+}
+
+RENDER_TARGET_BLEND_DESC :: struct {
+ BlendEnable: BOOL,
+ LogicOpEnable: BOOL,
+ SrcBlend: BLEND,
+ DestBlend: BLEND,
+ BlendOp: BLEND_OP,
+ SrcBlendAlpha: BLEND,
+ DestBlendAlpha: BLEND,
+ BlendOpAlpha: BLEND_OP,
+ LogicOp: LOGIC_OP,
+ RenderTargetWriteMask: u8,
+}
+
+BLEND_DESC :: struct {
+ AlphaToCoverageEnable: BOOL,
+ IndependentBlendEnable: BOOL,
+ RenderTarget: [8]RENDER_TARGET_BLEND_DESC,
+}
+
+CONSERVATIVE_RASTERIZATION_MODE :: enum i32 {
+ OFF = 0,
+ ON = 1,
+}
+
+RASTERIZER_DESC :: struct {
+ FillMode: FILL_MODE,
+ CullMode: CULL_MODE,
+ FrontCounterClockwise: BOOL,
+ DepthBias: i32,
+ DepthBiasClamp: f32,
+ SlopeScaledDepthBias: f32,
+ DepthClipEnable: BOOL,
+ MultisampleEnable: BOOL,
+ AntialiasedLineEnable: BOOL,
+ ForcedSampleCount: u32,
+ ConservativeRaster: CONSERVATIVE_RASTERIZATION_MODE,
+}
+
+
+IObject_UUID :: "c4fec28f-7966-4e95-9f94-f431cb56c3b8"
+IObject :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12object_vtable: ^IObject_VTable,
+}
+IObject_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetPrivateData: proc "stdcall" (this: ^IObject, guid: ^GUID, pDataSize: ^u32, pData: rawptr) -> HRESULT,
+ SetPrivateData: proc "stdcall" (this: ^IObject, guid: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT,
+ SetPrivateDataInterface: proc "stdcall" (this: ^IObject, guid: ^GUID, pData: ^IUnknown) -> HRESULT,
+ SetName: proc "stdcall" (this: ^IObject, Name: [^]u16) -> HRESULT,
+}
+
+
+IDeviceChild_UUID :: "905db94b-a00c-4140-9df5-2b64ca9ea357"
+IDeviceChild :: struct #raw_union {
+ #subtype id3d12object: IObject,
+ using id3d12devicechild_vtable: ^IDeviceChild_VTable,
+}
+IDeviceChild_VTable :: struct {
+ using id3d12object_vtable: IObject_VTable,
+ GetDevice: proc "stdcall" (this: ^IDeviceChild, riid: ^IID, ppvDevice: ^rawptr) -> HRESULT,
+}
+
+
+IRootSignature_UUID :: "c54a6b66-72df-4ee8-8be5-a946a1429214"
+IRootSignature :: struct {
+ using id3d12devicechild: IDeviceChild,
+}
+
+SHADER_BYTECODE :: struct {
+ pShaderBytecode: rawptr,
+ BytecodeLength: SIZE_T,
+}
+
+STREAM_OUTPUT_DESC :: struct {
+ pSODeclaration: ^SO_DECLARATION_ENTRY,
+ NumEntries: u32,
+ pBufferStrides: ^u32,
+ NumStrides: u32,
+ RasterizedStream: u32,
+}
+
+INPUT_LAYOUT_DESC :: struct {
+ pInputElementDescs: ^INPUT_ELEMENT_DESC,
+ NumElements: u32,
+}
+
+INDEX_BUFFER_STRIP_CUT_VALUE :: enum i32 {
+ DISABLED = 0,
+ _0xFFFF = 1,
+ _0xFFFFFFFF = 2,
+}
+
+CACHED_PIPELINE_STATE :: struct {
+ pCachedBlob: rawptr,
+ CachedBlobSizeInBytes: SIZE_T,
+}
+
+PIPELINE_STATE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ TOOL_DEBUG = 0x1,
+}
+
+GRAPHICS_PIPELINE_STATE_DESC :: struct {
+ pRootSignature: ^IRootSignature,
+ VS: SHADER_BYTECODE,
+ PS: SHADER_BYTECODE,
+ DS: SHADER_BYTECODE,
+ HS: SHADER_BYTECODE,
+ GS: SHADER_BYTECODE,
+ StreamOutput: STREAM_OUTPUT_DESC,
+ BlendState: BLEND_DESC,
+ SampleMask: u32,
+ RasterizerState: RASTERIZER_DESC,
+ DepthStencilState: DEPTH_STENCIL_DESC,
+ InputLayout: INPUT_LAYOUT_DESC,
+ IBStripCutValue: INDEX_BUFFER_STRIP_CUT_VALUE,
+ PrimitiveTopologyType: PRIMITIVE_TOPOLOGY_TYPE,
+ NumRenderTargets: u32,
+ RTVFormats: [8]dxgi.FORMAT,
+ DSVFormat: dxgi.FORMAT,
+ SampleDesc: dxgi.SAMPLE_DESC,
+ NodeMask: u32,
+ CachedPSO: CACHED_PIPELINE_STATE,
+ Flags: PIPELINE_STATE_FLAGS,
+}
+
+COMPUTE_PIPELINE_STATE_DESC :: struct {
+ pRootSignature: ^IRootSignature,
+ CS: SHADER_BYTECODE,
+ NodeMask: u32,
+ CachedPSO: CACHED_PIPELINE_STATE,
+ Flags: PIPELINE_STATE_FLAGS,
+}
+
+RT_FORMAT_ARRAY :: struct {
+ RTFormats: [8]dxgi.FORMAT,
+ NumRenderTargets: u32,
+}
+
+PIPELINE_STATE_STREAM_DESC :: struct {
+ SizeInBytes: SIZE_T,
+ pPipelineStateSubobjectStream: rawptr,
+}
+
+PIPELINE_STATE_SUBOBJECT_TYPE :: enum i32 {
+ ROOT_SIGNATURE = 0,
+ VS = 1,
+ PS = 2,
+ DS = 3,
+ HS = 4,
+ GS = 5,
+ CS = 6,
+ STREAM_OUTPUT = 7,
+ BLEND = 8,
+ SAMPLE_MASK = 9,
+ RASTERIZER = 10,
+ DEPTH_STENCIL = 11,
+ INPUT_LAYOUT = 12,
+ IB_STRIP_CUT_VALUE = 13,
+ PRIMITIVE_TOPOLOGY = 14,
+ RENDER_TARGET_FORMATS = 15,
+ DEPTH_STENCIL_FORMAT = 16,
+ SAMPLE_DESC = 17,
+ NODE_MASK = 18,
+ CACHED_PSO = 19,
+ FLAGS = 20,
+ DEPTH_STENCIL1 = 21,
+ VIEW_INSTANCING = 22,
+ AS = 24,
+ MS = 25,
+ MAX_VALID = 26,
+}
+
+FEATURE :: enum i32 {
+ OPTIONS = 0,
+ ARCHITECTURE = 1,
+ FEATURE_LEVELS = 2,
+ FORMAT_SUPPORT = 3,
+ MULTISAMPLE_QUALITY_LEVELS = 4,
+ FORMAT_INFO = 5,
+ GPU_VIRTUAL_ADDRESS_SUPPORT = 6,
+ SHADER_MODEL = 7,
+ OPTIONS1 = 8,
+ PROTECTED_RESOURCE_SESSION_SUPPORT = 10,
+ ROOT_SIGNATURE = 12,
+ ARCHITECTURE1 = 16,
+ OPTIONS2 = 18,
+ SHADER_CACHE = 19,
+ COMMAND_QUEUE_PRIORITY = 20,
+ OPTIONS3 = 21,
+ EXISTING_HEAPS = 22,
+ OPTIONS4 = 23,
+ SERIALIZATION = 24,
+ CROSS_NODE = 25,
+ OPTIONS5 = 27,
+ OPTIONS6 = 30,
+ QUERY_META_COMMAND = 31,
+ OPTIONS7 = 32,
+ PROTECTED_RESOURCE_SESSION_TYPE_COUNT = 33,
+ PROTECTED_RESOURCE_SESSION_TYPES = 34,
+}
+
+SHADER_MIN_PRECISION_SUPPORT :: enum i32 {
+ NONE = 0,
+ _10_BIT = 1,
+ _16_BIT = 2,
+}
+
+TILED_RESOURCES_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _1 = 1,
+ _2 = 2,
+ _3 = 3,
+ _4 = 4,
+}
+
+RESOURCE_BINDING_TIER :: enum i32 {
+ _1 = 1,
+ _2 = 2,
+ _3 = 3,
+}
+
+CONSERVATIVE_RASTERIZATION_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _1 = 1,
+ _2 = 2,
+ _3 = 3,
+}
+
+FORMAT_SUPPORT1 :: enum i32 { // TODO: make bit_set
+ NONE = 0,
+ BUFFER = 1,
+ IA_VERTEX_BUFFER = 2,
+ IA_INDEX_BUFFER = 4,
+ SO_BUFFER = 8,
+ TEXTURE1D = 16,
+ TEXTURE2D = 32,
+ TEXTURE3D = 64,
+ TEXTURECUBE = 128,
+ SHADER_LOAD = 256,
+ SHADER_SAMPLE = 512,
+ SHADER_SAMPLE_COMPARISON = 1024,
+ SHADER_SAMPLE_MONO_TEXT = 2048,
+ MIP = 4096,
+ RENDER_TARGET = 16384,
+ BLENDABLE = 32768,
+ DEPTH_STENCIL = 65536,
+ MULTISAMPLE_RESOLVE = 262144,
+ DISPLAY = 524288,
+ CAST_WITHIN_BIT_LAYOUT = 1048576,
+ MULTISAMPLE_RENDERTARGET = 2097152,
+ MULTISAMPLE_LOAD = 4194304,
+ SHADER_GATHER = 8388608,
+ BACK_BUFFER_CAST = 16777216,
+ TYPED_UNORDERED_ACCESS_VIEW = 33554432,
+ SHADER_GATHER_COMPARISON = 67108864,
+ DECODER_OUTPUT = 134217728,
+ VIDEO_PROCESSOR_OUTPUT = 268435456,
+ VIDEO_PROCESSOR_INPUT = 536870912,
+ VIDEO_ENCODER = 1073741824,
+}
+
+FORMAT_SUPPORT2 :: enum i32 { // TODO: make bit_set
+ NONE = 0,
+ UAV_ATOMIC_ADD = 1,
+ UAV_ATOMIC_BITWISE_OPS = 2,
+ UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 4,
+ UAV_ATOMIC_EXCHANGE = 8,
+ UAV_ATOMIC_SIGNED_MIN_OR_MAX = 16,
+ UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 32,
+ UAV_TYPED_LOAD = 64,
+ UAV_TYPED_STORE = 128,
+ OUTPUT_MERGER_LOGIC_OP = 256,
+ TILED = 512,
+ MULTIPLANE_OVERLAY = 16384,
+ SAMPLER_FEEDBACK = 32768,
+}
+
+MULTISAMPLE_QUALITY_LEVEL_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ TILED_RESOURCE = 0x1,
+}
+
+CROSS_NODE_SHARING_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _1_EMULATED = 1,
+ _1 = 2,
+ _2 = 3,
+ _3 = 4,
+}
+
+RESOURCE_HEAP_TIER :: enum i32 {
+ _1 = 1,
+ _2 = 2,
+}
+
+PROGRAMMABLE_SAMPLE_POSITIONS_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _1 = 1,
+ _2 = 2,
+}
+
+VIEW_INSTANCING_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _1 = 1,
+ _2 = 2,
+ _3 = 3,
+}
+
+FEATURE_DATA_OPTIONS :: struct {
+ DoublePrecisionFloatShaderOps: BOOL,
+ OutputMergerLogicOp: BOOL,
+ MinPrecisionSupport: SHADER_MIN_PRECISION_SUPPORT,
+ TiledResourcesTier: TILED_RESOURCES_TIER,
+ ResourceBindingTier: RESOURCE_BINDING_TIER,
+ PSSpecifiedStencilRefSupported: BOOL,
+ TypedUAVLoadAdditionalFormats: BOOL,
+ ROVsSupported: BOOL,
+ ConservativeRasterizationTier: CONSERVATIVE_RASTERIZATION_TIER,
+ MaxGPUVirtualAddressBitsPerResource: u32,
+ StandardSwizzle64KBSupported: BOOL,
+ CrossNodeSharingTier: CROSS_NODE_SHARING_TIER,
+ CrossAdapterRowMajorTextureSupported: BOOL,
+ VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation: BOOL,
+ ResourceHeapTier: RESOURCE_HEAP_TIER,
+}
+
+FEATURE_DATA_OPTIONS1 :: struct {
+ WaveOps: BOOL,
+ WaveLaneCountMin: u32,
+ WaveLaneCountMax: u32,
+ TotalLaneCount: u32,
+ ExpandedComputeResourceStates: BOOL,
+ Int64ShaderOps: BOOL,
+}
+
+FEATURE_DATA_OPTIONS2 :: struct {
+ DepthBoundsTestSupported: BOOL,
+ ProgrammableSamplePositionsTier: PROGRAMMABLE_SAMPLE_POSITIONS_TIER,
+}
+
+ROOT_SIGNATURE_VERSION :: enum i32 {
+ _1 = 1,
+ _1_0 = 1,
+ _1_1 = 2,
+}
+
+FEATURE_DATA_ROOT_SIGNATURE :: struct {
+ HighestVersion: ROOT_SIGNATURE_VERSION,
+}
+
+FEATURE_DATA_ARCHITECTURE :: struct {
+ NodeIndex: u32,
+ TileBasedRenderer: BOOL,
+ UMA: BOOL,
+ CacheCoherentUMA: BOOL,
+}
+
+FEATURE_DATA_ARCHITECTURE1 :: struct {
+ NodeIndex: u32,
+ TileBasedRenderer: BOOL,
+ UMA: BOOL,
+ CacheCoherentUMA: BOOL,
+ IsolatedMMU: BOOL,
+}
+
+FEATURE_DATA_FEATURE_LEVELS :: struct {
+ NumFeatureLevels: u32,
+ pFeatureLevelsRequested: ^FEATURE_LEVEL,
+ MaxSupportedFeatureLevel: FEATURE_LEVEL,
+}
+
+SHADER_MODEL :: enum i32 {
+ _5_1 = 81,
+ _6_0 = 96,
+ _6_1 = 97,
+ _6_2 = 98,
+ _6_3 = 99,
+ _6_4 = 100,
+ _6_5 = 101,
+ _6_6 = 102,
+}
+
+FEATURE_DATA_SHADER_MODEL :: struct {
+ HighestShaderModel: SHADER_MODEL,
+}
+
+FEATURE_DATA_FORMAT_SUPPORT :: struct {
+ Format: dxgi.FORMAT,
+ Support1: FORMAT_SUPPORT1,
+ Support2: FORMAT_SUPPORT2,
+}
+
+FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS :: struct {
+ Format: dxgi.FORMAT,
+ SampleCount: u32,
+ Flags: MULTISAMPLE_QUALITY_LEVEL_FLAGS,
+ NumQualityLevels: u32,
+}
+
+FEATURE_DATA_FORMAT_INFO :: struct {
+ Format: dxgi.FORMAT,
+ PlaneCount: u8,
+}
+
+FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT :: struct {
+ MaxGPUVirtualAddressBitsPerResource: u32,
+ MaxGPUVirtualAddressBitsPerProcess: u32,
+}
+
+SHADER_CACHE_SUPPORT_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ SINGLE_PSO = 0x1,
+ LIBRARY = 0x2,
+ AUTOMATIC_INPROC_CACHE = 0x4,
+ AUTOMATIC_DISK_CACHE = 0x8,
+}
+
+FEATURE_DATA_SHADER_CACHE :: struct {
+ SupportFlags: SHADER_CACHE_SUPPORT_FLAGS,
+}
+
+FEATURE_DATA_COMMAND_QUEUE_PRIORITY :: struct {
+ CommandListType: COMMAND_LIST_TYPE,
+ Priority: u32,
+ PriorityForTypeIsSupported: BOOL,
+}
+
+COMMAND_LIST_SUPPORT_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ DIRECT = 0x1,
+ BUNDLE = 0x2,
+ COMPUTE = 0x4,
+ COPY = 0x8,
+ VIDEO_DECODE = 0x10,
+ VIDEO_PROCESS = 0x20,
+ VIDEO_ENCODE = 0x40,
+}
+
+FEATURE_DATA_OPTIONS3 :: struct {
+ CopyQueueTimestampQueriesSupported: BOOL,
+ CastingFullyTypedFormatSupported: BOOL,
+ WriteBufferImmediateSupportFlags: COMMAND_LIST_SUPPORT_FLAGS,
+ ViewInstancingTier: VIEW_INSTANCING_TIER,
+ BarycentricsSupported: BOOL,
+}
+
+FEATURE_DATA_EXISTING_HEAPS :: struct {
+ Supported: BOOL,
+}
+
+SHARED_RESOURCE_COMPATIBILITY_TIER :: enum i32 {
+ _0 = 0,
+ _1 = 1,
+ _2 = 2,
+}
+
+FEATURE_DATA_OPTIONS4 :: struct {
+ MSAA64KBAlignedTextureSupported: BOOL,
+ SharedResourceCompatibilityTier: SHARED_RESOURCE_COMPATIBILITY_TIER,
+ Native16BitShaderOpsSupported: BOOL,
+}
+
+HEAP_SERIALIZATION_TIER :: enum i32 {
+ _0 = 0,
+ _10 = 10,
+}
+
+FEATURE_DATA_SERIALIZATION :: struct {
+ NodeIndex: u32,
+ HeapSerializationTier: HEAP_SERIALIZATION_TIER,
+}
+
+FEATURE_DATA_CROSS_NODE :: struct {
+ SharingTier: CROSS_NODE_SHARING_TIER,
+ AtomicShaderInstructions: BOOL,
+}
+
+RENDER_PASS_TIER :: enum i32 {
+ _0 = 0,
+ _1 = 1,
+ _2 = 2,
+}
+
+RAYTRACING_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _1_0 = 10,
+ _1_1 = 11,
+}
+
+FEATURE_DATA_OPTIONS5 :: struct {
+ SRVOnlyTiledResourceTier3: BOOL,
+ RenderPassesTier: RENDER_PASS_TIER,
+ RaytracingTier: RAYTRACING_TIER,
+}
+
+VARIABLE_SHADING_RATE_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _1 = 1,
+ _2 = 2,
+}
+
+FEATURE_DATA_OPTIONS6 :: struct {
+ AdditionalShadingRatesSupported: BOOL,
+ PerPrimitiveShadingRateSupportedWithViewportIndexing: BOOL,
+ VariableShadingRateTier: VARIABLE_SHADING_RATE_TIER,
+ ShadingRateImageTileSize: u32,
+ BackgroundProcessingSupported: BOOL,
+}
+
+MESH_SHADER_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _1 = 10,
+}
+
+SAMPLER_FEEDBACK_TIER :: enum i32 {
+ NOT_SUPPORTED = 0,
+ _0_9 = 90,
+ _1_0 = 100,
+}
+
+FEATURE_DATA_OPTIONS7 :: struct {
+ MeshShaderTier: MESH_SHADER_TIER,
+ SamplerFeedbackTier: SAMPLER_FEEDBACK_TIER,
+}
+
+FEATURE_DATA_QUERY_META_COMMAND :: struct {
+ CommandId: GUID,
+ NodeMask: u32,
+ pQueryInputData: rawptr,
+ QueryInputDataSizeInBytes: SIZE_T,
+ pQueryOutputData: rawptr,
+ QueryOutputDataSizeInBytes: SIZE_T,
+}
+
+RESOURCE_ALLOCATION_INFO :: struct {
+ SizeInBytes: u64,
+ Alignment: u64,
+}
+
+RESOURCE_ALLOCATION_INFO1 :: struct {
+ Offset: u64,
+ Alignment: u64,
+ SizeInBytes: u64,
+}
+
+HEAP_TYPE :: enum i32 {
+ DEFAULT = 1,
+ UPLOAD = 2,
+ READBACK = 3,
+ CUSTOM = 4,
+}
+
+CPU_PAGE_PROPERTY :: enum i32 {
+ UNKNOWN = 0,
+ NOT_AVAILABLE = 1,
+ WRITE_COMBINE = 2,
+ WRITE_BACK = 3,
+}
+
+MEMORY_POOL :: enum i32 {
+ UNKNOWN = 0,
+ L0 = 1,
+ L1 = 2,
+}
+
+HEAP_PROPERTIES :: struct {
+ Type: HEAP_TYPE,
+ CPUPageProperty: CPU_PAGE_PROPERTY,
+ MemoryPoolPreference: MEMORY_POOL,
+ CreationNodeMask: u32,
+ VisibleNodeMask: u32,
+}
+
+HEAP_FLAGS :: enum u32 { // TODO: make bit_set ???
+ NONE = 0x0,
+ SHARED = 0x1,
+ DENY_BUFFERS = 0x4,
+ ALLOW_DISPLAY = 0x8,
+ SHARED_CROSS_ADAPTER = 0x20,
+ DENY_RT_DS_TEXTURES = 0x40,
+ DENY_NON_RT_DS_TEXTURES = 0x80,
+ HARDWARE_PROTECTED = 0x100,
+ ALLOW_WRITE_WATCH = 0x200,
+ ALLOW_SHADER_ATOMICS = 0x400,
+ CREATE_NOT_RESIDENT = 0x800,
+ CREATE_NOT_ZEROED = 0x1000,
+ ALLOW_ALL_BUFFERS_AND_TEXTURES = 0x0,
+ ALLOW_ONLY_BUFFERS = 0xc0,
+ ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44,
+ ALLOW_ONLY_RT_DS_TEXTURES = 0x84,
+}
+
+HEAP_DESC :: struct {
+ SizeInBytes: u64,
+ Properties: HEAP_PROPERTIES,
+ Alignment: u64,
+ Flags: HEAP_FLAGS,
+}
+
+RESOURCE_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ BUFFER = 1,
+ TEXTURE1D = 2,
+ TEXTURE2D = 3,
+ TEXTURE3D = 4,
+}
+
+TEXTURE_LAYOUT :: enum i32 {
+ UNKNOWN = 0,
+ ROW_MAJOR = 1,
+ _64KB_UNDEFINED_SWIZZLE = 2,
+ _64KB_STANDARD_SWIZZLE = 3,
+}
+
+RESOURCE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ ALLOW_RENDER_TARGET = 0x1,
+ ALLOW_DEPTH_STENCIL = 0x2,
+ ALLOW_UNORDERED_ACCESS = 0x4,
+ DENY_SHADER_RESOURCE = 0x8,
+ ALLOW_CROSS_ADAPTER = 0x10,
+ ALLOW_SIMULTANEOUS_ACCESS = 0x20,
+ VIDEO_DECODE_REFERENCE_ONLY = 0x40,
+}
+
+MIP_REGION :: struct {
+ Width: u32,
+ Height: u32,
+ Depth: u32,
+}
+
+RESOURCE_DESC :: struct {
+ Dimension: RESOURCE_DIMENSION,
+ Alignment: u64,
+ Width: u64,
+ Height: u32,
+ DepthOrArraySize: u16,
+ MipLevels: u16,
+ Format: dxgi.FORMAT,
+ SampleDesc: dxgi.SAMPLE_DESC,
+ Layout: TEXTURE_LAYOUT,
+ Flags: RESOURCE_FLAGS,
+}
+
+RESOURCE_DESC1 :: struct {
+ Dimension: RESOURCE_DIMENSION,
+ Alignment: u64,
+ Width: u64,
+ Height: u32,
+ DepthOrArraySize: u16,
+ MipLevels: u16,
+ Format: dxgi.FORMAT,
+ SampleDesc: dxgi.SAMPLE_DESC,
+ Layout: TEXTURE_LAYOUT,
+ Flags: RESOURCE_FLAGS,
+ SamplerFeedbackMipRegion: MIP_REGION,
+}
+
+DEPTH_STENCIL_VALUE :: struct {
+ Depth: f32,
+ Stencil: u8,
+}
+
+CLEAR_VALUE :: struct {
+ Format: dxgi.FORMAT,
+ using _: struct #raw_union {
+ Color: [4]f32,
+ DepthStencil: DEPTH_STENCIL_VALUE,
+ },
+}
+
+RANGE :: struct {
+ Begin: SIZE_T,
+ End: SIZE_T,
+}
+
+RANGE_UINT64 :: struct {
+ Begin: u64,
+ End: u64,
+}
+
+SUBRESOURCE_RANGE_UINT64 :: struct {
+ Subresource: u32,
+ Range: RANGE_UINT64,
+}
+
+SUBRESOURCE_INFO :: struct {
+ Offset: u64,
+ RowPitch: u32,
+ DepthPitch: u32,
+}
+
+TILED_RESOURCE_COORDINATE :: struct {
+ X: u32,
+ Y: u32,
+ Z: u32,
+ Subresource: u32,
+}
+
+TILE_REGION_SIZE :: struct {
+ NumTiles: u32,
+ UseBox: BOOL,
+ Width: u32,
+ Height: u16,
+ Depth: u16,
+}
+
+TILE_RANGE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ NULL = 0x1,
+ SKIP = 0x2,
+ REUSE_SINGLE_TILE = 0x4,
+}
+
+SUBRESOURCE_TILING :: struct {
+ WidthInTiles: u32,
+ HeightInTiles: u16,
+ DepthInTiles: u16,
+ StartTileIndexInOverallResource: u32,
+}
+
+TILE_SHAPE :: struct {
+ WidthInTexels: u32,
+ HeightInTexels: u32,
+ DepthInTexels: u32,
+}
+
+PACKED_MIP_INFO :: struct {
+ NumStandardMips: u8,
+ NumPackedMips: u8,
+ NumTilesForPackedMips: u32,
+ StartTileIndexInOverallResource: u32,
+}
+
+TILE_MAPPING_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ NO_HAZARD = 0x1,
+}
+
+TILE_COPY_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ NO_HAZARD = 0x1,
+ LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2,
+ SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4,
+}
+
+RESOURCE_STATES :: enum i32 { // TODO: make bit_set
+ COMMON = 0,
+ VERTEX_AND_CONSTANT_BUFFER = 1,
+ INDEX_BUFFER = 2,
+ RENDER_TARGET = 4,
+ UNORDERED_ACCESS = 8,
+ DEPTH_WRITE = 16,
+ DEPTH_READ = 32,
+ NON_PIXEL_SHADER_RESOURCE = 64,
+ PIXEL_SHADER_RESOURCE = 128,
+ STREAM_OUT = 256,
+ INDIRECT_ARGUMENT = 512,
+ COPY_DEST = 1024,
+ COPY_SOURCE = 2048,
+ RESOLVE_DEST = 4096,
+ RESOLVE_SOURCE = 8192,
+ RAYTRACING_ACCELERATION_STRUCTURE = 4194304,
+ SHADING_RATE_SOURCE = 16777216,
+ GENERIC_READ = 2755,
+ PRESENT = 0,
+ PREDICATION = 512,
+ VIDEO_DECODE_READ = 65536,
+ VIDEO_DECODE_WRITE = 131072,
+ VIDEO_PROCESS_READ = 262144,
+ VIDEO_PROCESS_WRITE = 524288,
+ VIDEO_ENCODE_READ = 2097152,
+ VIDEO_ENCODE_WRITE = 8388608,
+}
+
+RESOURCE_BARRIER_TYPE :: enum i32 {
+ TRANSITION = 0,
+ ALIASING = 1,
+ UAV = 2,
+}
+
+RESOURCE_TRANSITION_BARRIER :: struct {
+ pResource: ^IResource,
+ Subresource: u32,
+ StateBefore: RESOURCE_STATES,
+ StateAfter: RESOURCE_STATES,
+}
+
+RESOURCE_ALIASING_BARRIER :: struct {
+ pResourceBefore: ^IResource,
+ pResourceAfter: ^IResource,
+}
+
+RESOURCE_UAV_BARRIER :: struct {
+ pResource: ^IResource,
+}
+
+RESOURCE_BARRIER_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ BEGIN_ONLY = 0x1,
+ END_ONLY = 0x2,
+}
+
+RESOURCE_BARRIER :: struct {
+ Type: RESOURCE_BARRIER_TYPE,
+ Flags: RESOURCE_BARRIER_FLAGS,
+ using _: struct #raw_union {
+ Transition: RESOURCE_TRANSITION_BARRIER,
+ Aliasing: RESOURCE_ALIASING_BARRIER,
+ UAV: RESOURCE_UAV_BARRIER,
+ },
+}
+
+SUBRESOURCE_FOOTPRINT :: struct {
+ Format: dxgi.FORMAT,
+ Width: u32,
+ Height: u32,
+ Depth: u32,
+ RowPitch: u32,
+}
+
+PLACED_SUBRESOURCE_FOOTPRINT :: struct {
+ Offset: u64,
+ Footprint: SUBRESOURCE_FOOTPRINT,
+}
+
+TEXTURE_COPY_TYPE :: enum i32 {
+ SUBRESOURCE_INDEX = 0,
+ PLACED_FOOTPRINT = 1,
+}
+
+TEXTURE_COPY_LOCATION :: struct {
+ pResource: ^IResource,
+ Type: TEXTURE_COPY_TYPE,
+}
+
+RESOLVE_MODE :: enum i32 {
+ DECOMPRESS = 0,
+ MIN = 1,
+ MAX = 2,
+ AVERAGE = 3,
+ ENCODE_SAMPLER_FEEDBACK = 4,
+ DECODE_SAMPLER_FEEDBACK = 5,
+}
+
+SAMPLE_POSITION :: struct {
+ X: i8,
+ Y: i8,
+}
+
+VIEW_INSTANCE_LOCATION :: struct {
+ ViewportArrayIndex: u32,
+ RenderTargetArrayIndex: u32,
+}
+
+VIEW_INSTANCING_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ ENABLE_VIEW_INSTANCE_MASKING = 0x1,
+}
+
+VIEW_INSTANCING_DESC :: struct {
+ ViewInstanceCount: u32,
+ pViewInstanceLocations: ^VIEW_INSTANCE_LOCATION,
+ Flags: VIEW_INSTANCING_FLAGS,
+}
+
+SHADER_COMPONENT_MAPPING :: enum i32 {
+ FROM_MEMORY_COMPONENT_0 = 0,
+ FROM_MEMORY_COMPONENT_1 = 1,
+ FROM_MEMORY_COMPONENT_2 = 2,
+ FROM_MEMORY_COMPONENT_3 = 3,
+ FORCE_VALUE_0 = 4,
+ FORCE_VALUE_1 = 5,
+}
+
+BUFFER_SRV_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ RAW = 0x1,
+}
+
+BUFFER_SRV :: struct {
+ FirstElement: u64,
+ NumElements: u32,
+ StructureByteStride: u32,
+ Flags: BUFFER_SRV_FLAGS,
+}
+
+TEX1D_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ ResourceMinLODClamp: f32,
+}
+
+TEX1D_ARRAY_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+ ResourceMinLODClamp: f32,
+}
+
+TEX2D_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ PlaneSlice: u32,
+ ResourceMinLODClamp: f32,
+}
+
+TEX2D_ARRAY_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+ PlaneSlice: u32,
+ ResourceMinLODClamp: f32,
+}
+
+TEX3D_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ ResourceMinLODClamp: f32,
+}
+
+TEXCUBE_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ ResourceMinLODClamp: f32,
+}
+
+TEXCUBE_ARRAY_SRV :: struct {
+ MostDetailedMip: u32,
+ MipLevels: u32,
+ First2DArrayFace: u32,
+ NumCubes: u32,
+ ResourceMinLODClamp: f32,
+}
+
+TEX2DMS_SRV :: struct {
+ UnusedField_NothingToDefine: u32,
+}
+
+TEX2DMS_ARRAY_SRV :: struct {
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_SRV :: struct {
+ Location: GPU_VIRTUAL_ADDRESS,
+}
+
+SHADER_RESOURCE_VIEW_DESC :: struct {
+ Format: dxgi.FORMAT,
+ ViewDimension: SRV_DIMENSION,
+ Shader4ComponentMapping: u32,
+ using _: struct #raw_union {
+ Buffer: BUFFER_SRV,
+ Texture1D: TEX1D_SRV,
+ Texture1DArray: TEX1D_ARRAY_SRV,
+ Texture2D: TEX2D_SRV,
+ Texture2DArray: TEX2D_ARRAY_SRV,
+ Texture2DMS: TEX2DMS_SRV,
+ Texture2DMSArray: TEX2DMS_ARRAY_SRV,
+ Texture3D: TEX3D_SRV,
+ TextureCube: TEXCUBE_SRV,
+ TextureCubeArray: TEXCUBE_ARRAY_SRV,
+ RaytracingAccelerationStructure: RAYTRACING_ACCELERATION_STRUCTURE_SRV,
+ },
+}
+
+CONSTANT_BUFFER_VIEW_DESC :: struct {
+ BufferLocation: GPU_VIRTUAL_ADDRESS,
+ SizeInBytes: u32,
+}
+
+FILTER :: enum i32 {
+ MIN_MAG_MIP_POINT = 0,
+ MIN_MAG_POINT_MIP_LINEAR = 1,
+ MIN_POINT_MAG_LINEAR_MIP_POINT = 4,
+ MIN_POINT_MAG_MIP_LINEAR = 5,
+ MIN_LINEAR_MAG_MIP_POINT = 16,
+ MIN_LINEAR_MAG_POINT_MIP_LINEAR = 17,
+ MIN_MAG_LINEAR_MIP_POINT = 20,
+ MIN_MAG_MIP_LINEAR = 21,
+ ANISOTROPIC = 85,
+ COMPARISON_MIN_MAG_MIP_POINT = 128,
+ COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 129,
+ COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 132,
+ COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 133,
+ COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 144,
+ COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 145,
+ COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 148,
+ COMPARISON_MIN_MAG_MIP_LINEAR = 149,
+ COMPARISON_ANISOTROPIC = 213,
+ MINIMUM_MIN_MAG_MIP_POINT = 256,
+ MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 257,
+ MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 260,
+ MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 261,
+ MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 272,
+ MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 273,
+ MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 276,
+ MINIMUM_MIN_MAG_MIP_LINEAR = 277,
+ MINIMUM_ANISOTROPIC = 341,
+ MAXIMUM_MIN_MAG_MIP_POINT = 384,
+ MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 385,
+ MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 388,
+ MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 389,
+ MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 400,
+ MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 401,
+ MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 404,
+ MAXIMUM_MIN_MAG_MIP_LINEAR = 405,
+ MAXIMUM_ANISOTROPIC = 469,
+}
+
+FILTER_TYPE :: enum i32 {
+ POINT = 0,
+ LINEAR = 1,
+}
+
+FILTER_REDUCTION_TYPE :: enum i32 {
+ STANDARD = 0,
+ COMPARISON = 1,
+ MINIMUM = 2,
+ MAXIMUM = 3,
+}
+
+TEXTURE_ADDRESS_MODE :: enum i32 {
+ WRAP = 1,
+ MIRROR = 2,
+ CLAMP = 3,
+ BORDER = 4,
+ MIRROR_ONCE = 5,
+}
+
+SAMPLER_DESC :: struct {
+ Filter: FILTER,
+ AddressU: TEXTURE_ADDRESS_MODE,
+ AddressV: TEXTURE_ADDRESS_MODE,
+ AddressW: TEXTURE_ADDRESS_MODE,
+ MipLODBias: f32,
+ MaxAnisotropy: u32,
+ ComparisonFunc: COMPARISON_FUNC,
+ BorderColor: [4]f32,
+ MinLOD: f32,
+ MaxLOD: f32,
+}
+
+BUFFER_UAV_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ RAW = 0x1,
+}
+
+BUFFER_UAV :: struct {
+ FirstElement: u64,
+ NumElements: u32,
+ StructureByteStride: u32,
+ CounterOffsetInBytes: u64,
+ Flags: BUFFER_UAV_FLAGS,
+}
+
+TEX1D_UAV :: struct {
+ MipSlice: u32,
+}
+
+TEX1D_ARRAY_UAV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2D_UAV :: struct {
+ MipSlice: u32,
+ PlaneSlice: u32,
+}
+
+TEX2D_ARRAY_UAV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+ PlaneSlice: u32,
+}
+
+TEX3D_UAV :: struct {
+ MipSlice: u32,
+ FirstWSlice: u32,
+ WSize: u32,
+}
+
+UAV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ BUFFER = 1,
+ TEXTURE1D = 2,
+ TEXTURE1DARRAY = 3,
+ TEXTURE2D = 4,
+ TEXTURE2DARRAY = 5,
+ TEXTURE3D = 8,
+}
+
+UNORDERED_ACCESS_VIEW_DESC :: struct {
+ Format: dxgi.FORMAT,
+ ViewDimension: UAV_DIMENSION,
+ using _: struct #raw_union {
+ Buffer: BUFFER_UAV,
+ Texture1D: TEX1D_UAV,
+ Texture1DArray: TEX1D_ARRAY_UAV,
+ Texture2D: TEX2D_UAV,
+ Texture2DArray: TEX2D_ARRAY_UAV,
+ Texture3D: TEX3D_UAV,
+ },
+}
+
+BUFFER_RTV :: struct {
+ FirstElement: u64,
+ NumElements: u32,
+}
+
+TEX1D_RTV :: struct {
+ MipSlice: u32,
+}
+
+TEX1D_ARRAY_RTV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2D_RTV :: struct {
+ MipSlice: u32,
+ PlaneSlice: u32,
+}
+
+TEX2DMS_RTV :: struct {
+ UnusedField_NothingToDefine: u32,
+}
+
+TEX2D_ARRAY_RTV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+ PlaneSlice: u32,
+}
+
+TEX2DMS_ARRAY_RTV :: struct {
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX3D_RTV :: struct {
+ MipSlice: u32,
+ FirstWSlice: u32,
+ WSize: u32,
+}
+
+RTV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ BUFFER = 1,
+ TEXTURE1D = 2,
+ TEXTURE1DARRAY = 3,
+ TEXTURE2D = 4,
+ TEXTURE2DARRAY = 5,
+ TEXTURE2DMS = 6,
+ TEXTURE2DMSARRAY = 7,
+ TEXTURE3D = 8,
+}
+
+RENDER_TARGET_VIEW_DESC :: struct {
+ Format: dxgi.FORMAT,
+ ViewDimension: RTV_DIMENSION,
+ using _: struct #raw_union {
+ Buffer: BUFFER_RTV,
+ Texture1D: TEX1D_RTV,
+ Texture1DArray: TEX1D_ARRAY_RTV,
+ Texture2D: TEX2D_RTV,
+ Texture2DArray: TEX2D_ARRAY_RTV,
+ Texture2DMS: TEX2DMS_RTV,
+ Texture2DMSArray: TEX2DMS_ARRAY_RTV,
+ Texture3D: TEX3D_RTV,
+ },
+}
+
+TEX1D_DSV :: struct {
+ MipSlice: u32,
+}
+
+TEX1D_ARRAY_DSV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2D_DSV :: struct {
+ MipSlice: u32,
+}
+
+TEX2D_ARRAY_DSV :: struct {
+ MipSlice: u32,
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+TEX2DMS_DSV :: struct {
+ UnusedField_NothingToDefine: u32,
+}
+
+TEX2DMS_ARRAY_DSV :: struct {
+ FirstArraySlice: u32,
+ ArraySize: u32,
+}
+
+DSV_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ READ_ONLY_DEPTH = 0x1,
+ READ_ONLY_STENCIL = 0x2,
+}
+
+DSV_DIMENSION :: enum i32 {
+ UNKNOWN = 0,
+ TEXTURE1D = 1,
+ TEXTURE1DARRAY = 2,
+ TEXTURE2D = 3,
+ TEXTURE2DARRAY = 4,
+ TEXTURE2DMS = 5,
+ TEXTURE2DMSARRAY = 6,
+}
+
+DEPTH_STENCIL_VIEW_DESC :: struct {
+ Format: dxgi.FORMAT,
+ ViewDimension: DSV_DIMENSION,
+ Flags: DSV_FLAGS,
+ using _: struct #raw_union {
+ Texture1D: TEX1D_DSV,
+ Texture1DArray: TEX1D_ARRAY_DSV,
+ Texture2D: TEX2D_DSV,
+ Texture2DArray: TEX2D_ARRAY_DSV,
+ Texture2DMS: TEX2DMS_DSV,
+ Texture2DMSArray: TEX2DMS_ARRAY_DSV,
+ },
+}
+
+CLEAR_FLAGS :: enum u32 { // TODO: make bit_set
+ DEPTH = 0x1,
+ STENCIL = 0x2,
+}
+
+FENCE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ SHARED = 0x1,
+ SHARED_CROSS_ADAPTER = 0x2,
+ NON_MONITORED = 0x4,
+}
+
+DESCRIPTOR_HEAP_TYPE :: enum i32 {
+ CBV_SRV_UAV = 0,
+ SAMPLER = 1,
+ RTV = 2,
+ DSV = 3,
+ NUM_TYPES = 4,
+}
+
+DESCRIPTOR_HEAP_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ SHADER_VISIBLE = 0x1,
+}
+
+DESCRIPTOR_HEAP_DESC :: struct {
+ Type: DESCRIPTOR_HEAP_TYPE,
+ NumDescriptors: u32,
+ Flags: DESCRIPTOR_HEAP_FLAGS,
+ NodeMask: u32,
+}
+
+DESCRIPTOR_RANGE_TYPE :: enum i32 {
+ SRV = 0,
+ UAV = 1,
+ CBV = 2,
+ SAMPLER = 3,
+}
+
+DESCRIPTOR_RANGE :: struct {
+ RangeType: DESCRIPTOR_RANGE_TYPE,
+ NumDescriptors: u32,
+ BaseShaderRegister: u32,
+ RegisterSpace: u32,
+ OffsetInDescriptorsFromTableStart: u32,
+}
+
+ROOT_DESCRIPTOR_TABLE :: struct {
+ NumDescriptorRanges: u32,
+ pDescriptorRanges: ^DESCRIPTOR_RANGE,
+}
+
+ROOT_CONSTANTS :: struct {
+ ShaderRegister: u32,
+ RegisterSpace: u32,
+ Num32BitValues: u32,
+}
+
+ROOT_DESCRIPTOR :: struct {
+ ShaderRegister: u32,
+ RegisterSpace: u32,
+}
+
+SHADER_VISIBILITY :: enum i32 {
+ ALL = 0,
+ VERTEX = 1,
+ HULL = 2,
+ DOMAIN = 3,
+ GEOMETRY = 4,
+ PIXEL = 5,
+ AMPLIFICATION = 6,
+ MESH = 7,
+}
+
+ROOT_PARAMETER_TYPE :: enum i32 {
+ DESCRIPTOR_TABLE = 0,
+ _32BIT_CONSTANTS = 1,
+ CBV = 2,
+ SRV = 3,
+ UAV = 4,
+}
+
+ROOT_PARAMETER :: struct {
+ ParameterType: ROOT_PARAMETER_TYPE,
+ using _: struct #raw_union {
+ DescriptorTable: ROOT_DESCRIPTOR_TABLE,
+ Constants: ROOT_CONSTANTS,
+ Descriptor: ROOT_DESCRIPTOR,
+ },
+ ShaderVisibility: SHADER_VISIBILITY,
+}
+
+ROOT_SIGNATURE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x1,
+ DENY_VERTEX_SHADER_ROOT_ACCESS = 0x2,
+ DENY_HULL_SHADER_ROOT_ACCESS = 0x4,
+ DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x8,
+ DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10,
+ DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20,
+ ALLOW_STREAM_OUTPUT = 0x40,
+ LOCAL_ROOT_SIGNATURE = 0x80,
+ DENY_AMPLIFICATION_SHADER_ROOT_ACCESS = 0x100,
+ DENY_MESH_SHADER_ROOT_ACCESS = 0x200,
+}
+
+STATIC_BORDER_COLOR :: enum i32 {
+ TRANSPARENT_BLACK = 0,
+ OPAQUE_BLACK = 1,
+ OPAQUE_WHITE = 2,
+}
+
+STATIC_SAMPLER_DESC :: struct {
+ Filter: FILTER,
+ AddressU: TEXTURE_ADDRESS_MODE,
+ AddressV: TEXTURE_ADDRESS_MODE,
+ AddressW: TEXTURE_ADDRESS_MODE,
+ MipLODBias: f32,
+ MaxAnisotropy: u32,
+ ComparisonFunc: COMPARISON_FUNC,
+ BorderColor: STATIC_BORDER_COLOR,
+ MinLOD: f32,
+ MaxLOD: f32,
+ ShaderRegister: u32,
+ RegisterSpace: u32,
+ ShaderVisibility: SHADER_VISIBILITY,
+}
+
+ROOT_SIGNATURE_DESC :: struct {
+ NumParameters: u32,
+ pParameters: ^ROOT_PARAMETER,
+ NumStaticSamplers: u32,
+ pStaticSamplers: ^STATIC_SAMPLER_DESC,
+ Flags: ROOT_SIGNATURE_FLAGS,
+}
+
+DESCRIPTOR_RANGE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ DESCRIPTORS_VOLATILE = 0x1,
+ DATA_VOLATILE = 0x2,
+ DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
+ DATA_STATIC = 0x8,
+ DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS = 0x10000,
+}
+
+DESCRIPTOR_RANGE1 :: struct {
+ RangeType: DESCRIPTOR_RANGE_TYPE,
+ NumDescriptors: u32,
+ BaseShaderRegister: u32,
+ RegisterSpace: u32,
+ Flags: DESCRIPTOR_RANGE_FLAGS,
+ OffsetInDescriptorsFromTableStart: u32,
+}
+
+ROOT_DESCRIPTOR_TABLE1 :: struct {
+ NumDescriptorRanges: u32,
+ pDescriptorRanges: ^DESCRIPTOR_RANGE1,
+}
+
+ROOT_DESCRIPTOR_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ DATA_VOLATILE = 0x2,
+ DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
+ DATA_STATIC = 0x8,
+}
+
+ROOT_DESCRIPTOR1 :: struct {
+ ShaderRegister: u32,
+ RegisterSpace: u32,
+ Flags: ROOT_DESCRIPTOR_FLAGS,
+}
+
+ROOT_PARAMETER1 :: struct {
+ ParameterType: ROOT_PARAMETER_TYPE,
+ using _: struct #raw_union {
+ DescriptorTable: ROOT_DESCRIPTOR_TABLE1,
+ Constants: ROOT_CONSTANTS,
+ Descriptor: ROOT_DESCRIPTOR1,
+ },
+ ShaderVisibility: SHADER_VISIBILITY,
+}
+
+ROOT_SIGNATURE_DESC1 :: struct {
+ NumParameters: u32,
+ pParameters: ^ROOT_PARAMETER1,
+ NumStaticSamplers: u32,
+ pStaticSamplers: ^STATIC_SAMPLER_DESC,
+ Flags: ROOT_SIGNATURE_FLAGS,
+}
+
+VERSIONED_ROOT_SIGNATURE_DESC :: struct {
+ Version: ROOT_SIGNATURE_VERSION,
+ using _: struct #raw_union {
+ Desc_1_0: ROOT_SIGNATURE_DESC,
+ Desc_1_1: ROOT_SIGNATURE_DESC1,
+ },
+}
+
+
+IRootSignatureDeserializer_UUID :: "34AB647B-3CC8-46AC-841B-C0965645C046"
+IRootSignatureDeserializer :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12rootsignaturedeserializer_vtable: ^IRootSignatureDeserializer_VTable,
+}
+IRootSignatureDeserializer_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetRootSignatureDesc: proc "stdcall" (this: ^IRootSignatureDeserializer) -> ^ROOT_SIGNATURE_DESC,
+}
+
+
+IVersionedRootSignatureDeserializer_UUID :: "7F91CE67-090C-4BB7-B78E-ED8FF2E31DA0"
+IVersionedRootSignatureDeserializer :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12versionedrootsignaturedeserializer_vtable: ^IVersionedRootSignatureDeserializer_VTable,
+}
+IVersionedRootSignatureDeserializer_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetRootSignatureDescAtVersion: proc "stdcall" (this: ^IVersionedRootSignatureDeserializer, convertToVersion: ROOT_SIGNATURE_VERSION, ppDesc: ^^VERSIONED_ROOT_SIGNATURE_DESC) -> HRESULT,
+ GetUnconvertedRootSignatureDesc: proc "stdcall" (this: ^IVersionedRootSignatureDeserializer) -> ^VERSIONED_ROOT_SIGNATURE_DESC,
+}
+
+PFN_SERIALIZE_ROOT_SIGNATURE :: #type proc "c" (a0: ^ROOT_SIGNATURE_DESC, a1: ROOT_SIGNATURE_VERSION, a2: ^^IBlob, a3: ^^IBlob) -> HRESULT
+PFN_CREATE_ROOT_SIGNATURE_DESERIALIZER :: #type proc "c" (a0: rawptr, a1: SIZE_T, a2: ^IID, a3: ^rawptr) -> HRESULT
+PFN_SERIALIZE_VERSIONED_ROOT_SIGNATURE :: #type proc "c" (a0: ^VERSIONED_ROOT_SIGNATURE_DESC, a1: ^^IBlob, a2: ^^IBlob) -> HRESULT
+PFN_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER :: #type proc "c" (a0: rawptr, a1: SIZE_T, a2: ^IID, a3: ^rawptr) -> HRESULT
+
+
+CPU_DESCRIPTOR_HANDLE :: struct {
+ ptr: SIZE_T,
+}
+
+GPU_DESCRIPTOR_HANDLE :: struct {
+ ptr: u64,
+}
+
+DISCARD_REGION :: struct {
+ NumRects: u32,
+ pRects: ^RECT,
+ FirstSubresource: u32,
+ NumSubresources: u32,
+}
+
+QUERY_HEAP_TYPE :: enum i32 {
+ OCCLUSION = 0,
+ TIMESTAMP = 1,
+ PIPELINE_STATISTICS = 2,
+ SO_STATISTICS = 3,
+ VIDEO_DECODE_STATISTICS = 4,
+ COPY_QUEUE_TIMESTAMP = 5,
+}
+
+QUERY_HEAP_DESC :: struct {
+ Type: QUERY_HEAP_TYPE,
+ Count: u32,
+ NodeMask: u32,
+}
+
+QUERY_TYPE :: enum i32 {
+ OCCLUSION = 0,
+ BINARY_OCCLUSION = 1,
+ TIMESTAMP = 2,
+ PIPELINE_STATISTICS = 3,
+ SO_STATISTICS_STREAM0 = 4,
+ SO_STATISTICS_STREAM1 = 5,
+ SO_STATISTICS_STREAM2 = 6,
+ SO_STATISTICS_STREAM3 = 7,
+ VIDEO_DECODE_STATISTICS = 8,
+}
+
+PREDICATION_OP :: enum i32 {
+ EQUAL_ZERO = 0,
+ NOT_EQUAL_ZERO = 1,
+}
+
+QUERY_DATA_PIPELINE_STATISTICS :: struct {
+ IAVertices: u64,
+ IAPrimitives: u64,
+ VSInvocations: u64,
+ GSInvocations: u64,
+ GSPrimitives: u64,
+ CInvocations: u64,
+ CPrimitives: u64,
+ PSInvocations: u64,
+ HSInvocations: u64,
+ DSInvocations: u64,
+ CSInvocations: u64,
+}
+
+QUERY_DATA_SO_STATISTICS :: struct {
+ NumPrimitivesWritten: u64,
+ PrimitivesStorageNeeded: u64,
+}
+
+STREAM_OUTPUT_BUFFER_VIEW :: struct {
+ BufferLocation: GPU_VIRTUAL_ADDRESS,
+ SizeInBytes: u64,
+ BufferFilledSizeLocation: GPU_VIRTUAL_ADDRESS,
+}
+
+DRAW_ARGUMENTS :: struct {
+ VertexCountPerInstance: u32,
+ InstanceCount: u32,
+ StartVertexLocation: u32,
+ StartInstanceLocation: u32,
+}
+
+DRAW_INDEXED_ARGUMENTS :: struct {
+ IndexCountPerInstance: u32,
+ InstanceCount: u32,
+ StartIndexLocation: u32,
+ BaseVertexLocation: i32,
+ StartInstanceLocation: u32,
+}
+
+DISPATCH_ARGUMENTS :: struct {
+ ThreadGroupCountX: u32,
+ ThreadGroupCountY: u32,
+ ThreadGroupCountZ: u32,
+}
+
+VERTEX_BUFFER_VIEW :: struct {
+ BufferLocation: GPU_VIRTUAL_ADDRESS,
+ SizeInBytes: u32,
+ StrideInBytes: u32,
+}
+
+INDEX_BUFFER_VIEW :: struct {
+ BufferLocation: GPU_VIRTUAL_ADDRESS,
+ SizeInBytes: u32,
+ Format: dxgi.FORMAT,
+}
+
+INDIRECT_ARGUMENT_TYPE :: enum i32 {
+ DRAW = 0,
+ DRAW_INDEXED = 1,
+ DISPATCH = 2,
+ VERTEX_BUFFER_VIEW = 3,
+ INDEX_BUFFER_VIEW = 4,
+ CONSTANT = 5,
+ CONSTANT_BUFFER_VIEW = 6,
+ SHADER_RESOURCE_VIEW = 7,
+ UNORDERED_ACCESS_VIEW = 8,
+ DISPATCH_RAYS = 9,
+ DISPATCH_MESH = 10,
+}
+
+INDIRECT_ARGUMENT_DESC :: struct {
+ Type: INDIRECT_ARGUMENT_TYPE,
+ using _: struct #raw_union {
+ VertexBuffer: struct {
+ Slot: u32,
+ },
+ Constant: struct {
+ RootParameterIndex: u32,
+ DestOffsetIn32BitValues: u32,
+ Num32BitValuesToSet: u32,
+ },
+ ConstantBufferView: struct {
+ RootParameterIndex: u32,
+ },
+ ShaderResourceView: struct {
+ RootParameterIndex: u32,
+ },
+ UnorderedAccessView: struct {
+ RootParameterIndex: u32,
+ },
+ },
+}
+
+COMMAND_SIGNATURE_DESC :: struct {
+ ByteStride: u32,
+ NumArgumentDescs: u32,
+ pArgumentDescs: ^INDIRECT_ARGUMENT_DESC,
+ NodeMask: u32,
+}
+
+
+IPageable_UUID :: "63ee58fb-1268-4835-86da-f008ce62f0d6"
+IPageable :: struct {
+ using id3d12devicechild: IDeviceChild,
+}
+
+
+IHeap_UUID :: "6b3b2502-6e51-45b3-90ee-9884265e8df3"
+IHeap :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+ using id3d12heap_vtable: ^IHeap_VTable,
+}
+IHeap_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ GetDesc: proc "stdcall" (this: ^IHeap) -> HEAP_DESC,
+}
+
+
+IResource_UUID :: "696442be-a72e-4059-bc79-5b5c98040fad"
+IResource :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+ using id3d12resource_vtable: ^IResource_VTable,
+}
+IResource_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ Map: proc "stdcall" (this: ^IResource, Subresource: u32, pReadRange: ^RANGE, ppData: ^rawptr) -> HRESULT,
+ Unmap: proc "stdcall" (this: ^IResource, Subresource: u32, pWrittenRange: ^RANGE),
+ GetDesc: proc "stdcall" (this: ^IResource) -> RESOURCE_DESC,
+ GetGPUVirtualAddress: proc "stdcall" (this: ^IResource) -> GPU_VIRTUAL_ADDRESS,
+ WriteToSubresource: proc "stdcall" (this: ^IResource, DstSubresource: u32, pDstBox: ^BOX, pSrcData: rawptr, SrcRowPitch: u32, SrcDepthPitch: u32) -> HRESULT,
+ ReadFromSubresource: proc "stdcall" (this: ^IResource, pDstData: rawptr, DstRowPitch: u32, DstDepthPitch: u32, SrcSubresource: u32, pSrcBox: ^BOX) -> HRESULT,
+ GetHeapProperties: proc "stdcall" (this: ^IResource, pHeapProperties: ^HEAP_PROPERTIES, pHeapFlags: ^HEAP_FLAGS) -> HRESULT,
+}
+
+
+ICommandAllocator_UUID :: "6102dee4-af59-4b09-b999-b44d73f09b24"
+ICommandAllocator :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+ using id3d12commandallocator_vtable: ^ICommandAllocator_VTable,
+}
+ICommandAllocator_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ Reset: proc "stdcall" (this: ^ICommandAllocator) -> HRESULT,
+}
+
+
+IFence_UUID :: "0a753dcf-c4d8-4b91-adf6-be5a60d95a76"
+IFence :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+ using id3d12fence_vtable: ^IFence_VTable,
+}
+IFence_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ GetCompletedValue: proc "stdcall" (this: ^IFence) -> u64,
+ SetEventOnCompletion: proc "stdcall" (this: ^IFence, Value: u64, hEvent: HANDLE) -> HRESULT,
+ Signal: proc "stdcall" (this: ^IFence, Value: u64) -> HRESULT,
+}
+
+
+IFence1_UUID :: "433685fe-e22b-4ca0-a8db-b5b4f4dd0e4a"
+IFence1 :: struct #raw_union {
+ #subtype id3d12fence: IFence,
+ using id3d12fence1_vtable: ^IFence1_VTable,
+}
+IFence1_VTable :: struct {
+ #subtype id3d12fence_vtable: IFence_VTable,
+ GetCreationFlags: proc "stdcall" (this: ^IFence1) -> FENCE_FLAGS,
+}
+
+
+IPipelineState_UUID :: "765a30f3-f624-4c6f-a828-ace948622445"
+IPipelineState :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+ using id3d12pipelinestate_vtable: ^IPipelineState_VTable,
+}
+IPipelineState_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ GetCachedBlob: proc "stdcall" (this: ^IPipelineState, ppBlob: ^^IBlob) -> HRESULT,
+}
+
+
+IDescriptorHeap_UUID :: "8efb471d-616c-4f49-90f7-127bb763fa51"
+IDescriptorHeap :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+ using id3d12descriptorheap_vtable: ^IDescriptorHeap_VTable,
+}
+IDescriptorHeap_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ GetDesc: proc "stdcall" (this: ^IDescriptorHeap) -> DESCRIPTOR_HEAP_DESC,
+ GetCPUDescriptorHandleForHeapStart: proc "stdcall" (this: ^IDescriptorHeap) -> CPU_DESCRIPTOR_HANDLE,
+ GetGPUDescriptorHandleForHeapStart: proc "stdcall" (this: ^IDescriptorHeap) -> GPU_DESCRIPTOR_HANDLE,
+}
+
+
+IQueryHeap_UUID :: "0d9658ae-ed45-469e-a61d-970ec583cab4"
+IQueryHeap :: struct {
+ #subtype id3d12pageable: IPageable,
+}
+
+
+ICommandSignature_UUID :: "c36a797c-ec80-4f0a-8985-a7b2475082d1"
+ICommandSignature :: struct {
+ #subtype id3d12pageable: IPageable,
+}
+
+
+ICommandList_UUID :: "7116d91c-e7e4-47ce-b8c6-ec8168f437e5"
+ICommandList :: struct #raw_union {
+ #subtype id3d12devicechild: IDeviceChild,
+ using id3d12commandlist_vtable: ^ICommandList_VTable,
+}
+ICommandList_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ GetType: proc "stdcall" (this: ^ICommandList) -> COMMAND_LIST_TYPE,
+}
+
+
+IGraphicsCommandList_UUID :: "5b160d0f-ac1b-4185-8ba8-b3ae42a5a455"
+IGraphicsCommandList :: struct #raw_union {
+ #subtype id3d12commandlist: ICommandList,
+ using id3d12graphicscommandlist_vtable: ^IGraphicsCommandList_VTable,
+}
+IGraphicsCommandList_VTable :: struct {
+ using id3d12commandlist_vtable: ICommandList_VTable,
+ Close: proc "stdcall" (this: ^IGraphicsCommandList) -> HRESULT,
+ Reset: proc "stdcall" (this: ^IGraphicsCommandList, pAllocator: ^ICommandAllocator, pInitialState: ^IPipelineState) -> HRESULT,
+ ClearState: proc "stdcall" (this: ^IGraphicsCommandList, pPipelineState: ^IPipelineState),
+ DrawInstanced: proc "stdcall" (this: ^IGraphicsCommandList, VertexCountPerInstance: u32, InstanceCount: u32, StartVertexLocation: u32, StartInstanceLocation: u32),
+ DrawIndexedInstanced: proc "stdcall" (this: ^IGraphicsCommandList, IndexCountPerInstance: u32, InstanceCount: u32, StartIndexLocation: u32, BaseVertexLocation: i32, StartInstanceLocation: u32),
+ Dispatch: proc "stdcall" (this: ^IGraphicsCommandList, ThreadGroupCountX: u32, ThreadGroupCountY: u32, ThreadGroupCountZ: u32),
+ CopyBufferRegion: proc "stdcall" (this: ^IGraphicsCommandList, pDstBuffer: ^IResource, DstOffset: u64, pSrcBuffer: ^IResource, SrcOffset: u64, NumBytes: u64),
+ CopyTextureRegion: proc "stdcall" (this: ^IGraphicsCommandList, pDst: ^TEXTURE_COPY_LOCATION, DstX: u32, DstY: u32, DstZ: u32, pSrc: ^TEXTURE_COPY_LOCATION, pSrcBox: ^BOX),
+ CopyResource: proc "stdcall" (this: ^IGraphicsCommandList, pDstResource: ^IResource, pSrcResource: ^IResource),
+ CopyTiles: proc "stdcall" (this: ^IGraphicsCommandList, pTiledResource: ^IResource, pTileRegionStartCoordinate: ^TILED_RESOURCE_COORDINATE, pTileRegionSize: ^TILE_REGION_SIZE, pBuffer: ^IResource, BufferStartOffsetInBytes: u64, Flags: TILE_COPY_FLAGS),
+ ResolveSubresource: proc "stdcall" (this: ^IGraphicsCommandList, pDstResource: ^IResource, DstSubresource: u32, pSrcResource: ^IResource, SrcSubresource: u32, Format: dxgi.FORMAT),
+ IASetPrimitiveTopology: proc "stdcall" (this: ^IGraphicsCommandList, PrimitiveTopology: PRIMITIVE_TOPOLOGY),
+ RSSetViewports: proc "stdcall" (this: ^IGraphicsCommandList, NumViewports: u32, pViewports: ^VIEWPORT),
+ RSSetScissorRects: proc "stdcall" (this: ^IGraphicsCommandList, NumRects: u32, pRects: ^RECT),
+ OMSetBlendFactor: proc "stdcall" (this: ^IGraphicsCommandList, BlendFactor: ^[4]f32),
+ OMSetStencilRef: proc "stdcall" (this: ^IGraphicsCommandList, StencilRef: u32),
+ SetPipelineState: proc "stdcall" (this: ^IGraphicsCommandList, pPipelineState: ^IPipelineState),
+ ResourceBarrier: proc "stdcall" (this: ^IGraphicsCommandList, NumBarriers: u32, pBarriers: ^RESOURCE_BARRIER),
+ ExecuteBundle: proc "stdcall" (this: ^IGraphicsCommandList, pCommandList: ^IGraphicsCommandList),
+ SetDescriptorHeaps: proc "stdcall" (this: ^IGraphicsCommandList, NumDescriptorHeaps: u32, ppDescriptorHeaps: ^^IDescriptorHeap),
+ SetComputeRootSignature: proc "stdcall" (this: ^IGraphicsCommandList, pRootSignature: ^IRootSignature),
+ SetGraphicsRootSignature: proc "stdcall" (this: ^IGraphicsCommandList, pRootSignature: ^IRootSignature),
+ SetComputeRootDescriptorTable: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BaseDescriptor: GPU_DESCRIPTOR_HANDLE),
+ SetGraphicsRootDescriptorTable: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BaseDescriptor: GPU_DESCRIPTOR_HANDLE),
+ SetComputeRoot32BitConstant: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, SrcData: u32, DestOffsetIn32BitValues: u32),
+ SetGraphicsRoot32BitConstant: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, SrcData: u32, DestOffsetIn32BitValues: u32),
+ SetComputeRoot32BitConstants: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, Num32BitValuesToSet: u32, pSrcData: rawptr, DestOffsetIn32BitValues: u32),
+ SetGraphicsRoot32BitConstants: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, Num32BitValuesToSet: u32, pSrcData: rawptr, DestOffsetIn32BitValues: u32),
+ SetComputeRootConstantBufferView: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS),
+ SetGraphicsRootConstantBufferView: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS),
+ SetComputeRootShaderResourceView: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS),
+ SetGraphicsRootShaderResourceView: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS),
+ SetComputeRootUnorderedAccessView: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS),
+ SetGraphicsRootUnorderedAccessView: proc "stdcall" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS),
+ IASetIndexBuffer: proc "stdcall" (this: ^IGraphicsCommandList, pView: ^INDEX_BUFFER_VIEW),
+ IASetVertexBuffers: proc "stdcall" (this: ^IGraphicsCommandList, StartSlot: u32, NumViews: u32, pViews: ^VERTEX_BUFFER_VIEW),
+ SOSetTargets: proc "stdcall" (this: ^IGraphicsCommandList, StartSlot: u32, NumViews: u32, pViews: ^STREAM_OUTPUT_BUFFER_VIEW),
+ OMSetRenderTargets: proc "stdcall" (this: ^IGraphicsCommandList, NumRenderTargetDescriptors: u32, pRenderTargetDescriptors: ^CPU_DESCRIPTOR_HANDLE, RTsSingleHandleToDescriptorRange: BOOL, pDepthStencilDescriptor: ^CPU_DESCRIPTOR_HANDLE),
+ ClearDepthStencilView: proc "stdcall" (this: ^IGraphicsCommandList, DepthStencilView: CPU_DESCRIPTOR_HANDLE, ClearFlags: CLEAR_FLAGS, Depth: f32, Stencil: u8, NumRects: u32, pRects: ^RECT),
+ ClearRenderTargetView: proc "stdcall" (this: ^IGraphicsCommandList, RenderTargetView: CPU_DESCRIPTOR_HANDLE, ColorRGBA: ^[4]f32, NumRects: u32, pRects: ^RECT),
+ ClearUnorderedAccessViewUint: proc "stdcall" (this: ^IGraphicsCommandList, ViewGPUHandleInCurrentHeap: GPU_DESCRIPTOR_HANDLE, ViewCPUHandle: CPU_DESCRIPTOR_HANDLE, pResource: ^IResource, Values: ^[4]u32, NumRects: u32, pRects: ^RECT),
+ ClearUnorderedAccessViewFloat: proc "stdcall" (this: ^IGraphicsCommandList, ViewGPUHandleInCurrentHeap: GPU_DESCRIPTOR_HANDLE, ViewCPUHandle: CPU_DESCRIPTOR_HANDLE, pResource: ^IResource, Values: ^[4]f32, NumRects: u32, pRects: ^RECT),
+ DiscardResource: proc "stdcall" (this: ^IGraphicsCommandList, pResource: ^IResource, pRegion: ^DISCARD_REGION),
+ BeginQuery: proc "stdcall" (this: ^IGraphicsCommandList, pQueryHeap: ^IQueryHeap, Type: QUERY_TYPE, Index: u32),
+ EndQuery: proc "stdcall" (this: ^IGraphicsCommandList, pQueryHeap: ^IQueryHeap, Type: QUERY_TYPE, Index: u32),
+ ResolveQueryData: proc "stdcall" (this: ^IGraphicsCommandList, pQueryHeap: ^IQueryHeap, Type: QUERY_TYPE, StartIndex: u32, NumQueries: u32, pDestinationBuffer: ^IResource, AlignedDestinationBufferOffset: u64),
+ SetPredication: proc "stdcall" (this: ^IGraphicsCommandList, pBuffer: ^IResource, AlignedBufferOffset: u64, Operation: PREDICATION_OP),
+ SetMarker: proc "stdcall" (this: ^IGraphicsCommandList, Metadata: u32, pData: rawptr, Size: u32),
+ BeginEvent: proc "stdcall" (this: ^IGraphicsCommandList, Metadata: u32, pData: rawptr, Size: u32),
+ EndEvent: proc "stdcall" (this: ^IGraphicsCommandList),
+ ExecuteIndirect: proc "stdcall" (this: ^IGraphicsCommandList, pCommandSignature: ^ICommandSignature, MaxCommandCount: u32, pArgumentBuffer: ^IResource, ArgumentBufferOffset: u64, pCountBuffer: ^IResource, CountBufferOffset: u64),
+}
+
+
+IGraphicsCommandList1_UUID :: "553103fb-1fe7-4557-bb38-946d7d0e7ca7"
+IGraphicsCommandList1 :: struct #raw_union {
+ #subtype id3d12graphicscommandlist: IGraphicsCommandList,
+ using id3d12graphicscommandlist1_vtable: ^IGraphicsCommandList1_VTable,
+}
+IGraphicsCommandList1_VTable :: struct {
+ using id3d12graphicscommandlist_vtable: IGraphicsCommandList_VTable,
+ AtomicCopyBufferUINT: proc "stdcall" (this: ^IGraphicsCommandList1, pDstBuffer: ^IResource, DstOffset: u64, pSrcBuffer: ^IResource, SrcOffset: u64, Dependencies: u32, ppDependentResources: ^^IResource, pDependentSubresourceRanges: ^SUBRESOURCE_RANGE_UINT64),
+ AtomicCopyBufferUINT64: proc "stdcall" (this: ^IGraphicsCommandList1, pDstBuffer: ^IResource, DstOffset: u64, pSrcBuffer: ^IResource, SrcOffset: u64, Dependencies: u32, ppDependentResources: ^^IResource, pDependentSubresourceRanges: ^SUBRESOURCE_RANGE_UINT64),
+ OMSetDepthBounds: proc "stdcall" (this: ^IGraphicsCommandList1, Min: f32, Max: f32),
+ SetSamplePositions: proc "stdcall" (this: ^IGraphicsCommandList1, NumSamplesPerPixel: u32, NumPixels: u32, pSamplePositions: ^SAMPLE_POSITION),
+ ResolveSubresourceRegion: proc "stdcall" (this: ^IGraphicsCommandList1, pDstResource: ^IResource, DstSubresource: u32, DstX: u32, DstY: u32, pSrcResource: ^IResource, SrcSubresource: u32, pSrcRect: ^RECT, Format: dxgi.FORMAT, ResolveMode: RESOLVE_MODE),
+ SetViewInstanceMask: proc "stdcall" (this: ^IGraphicsCommandList1, Mask: u32),
+}
+
+WRITEBUFFERIMMEDIATE_PARAMETER :: struct {
+ Dest: GPU_VIRTUAL_ADDRESS,
+ Value: u32,
+}
+
+WRITEBUFFERIMMEDIATE_MODE :: enum i32 {
+ DEFAULT = 0,
+ MARKER_IN = 1,
+ MARKER_OUT = 2,
+}
+
+
+IGraphicsCommandList2_UUID :: "38C3E585-FF17-412C-9150-4FC6F9D72A28"
+IGraphicsCommandList2 :: struct #raw_union {
+ #subtype id3d12graphicscommandlist1: IGraphicsCommandList1,
+ using id3d12graphicscommandlist2_vtable: ^IGraphicsCommandList2_VTable,
+}
+IGraphicsCommandList2_VTable :: struct {
+ using id3d12graphicscommandlist1_vtable: IGraphicsCommandList1_VTable,
+ WriteBufferImmediate: proc "stdcall" (this: ^IGraphicsCommandList2, Count: u32, pParams: ^WRITEBUFFERIMMEDIATE_PARAMETER, pModes: ^WRITEBUFFERIMMEDIATE_MODE),
+}
+
+
+ICommandQueue_UUID :: "0ec870a6-5d7e-4c22-8cfc-5baae07616ed"
+ICommandQueue :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+ using id3d12commandqueue_vtable: ^ICommandQueue_VTable,
+}
+ICommandQueue_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ UpdateTileMappings: proc "stdcall" (this: ^ICommandQueue, pResource: ^IResource, NumResourceRegions: u32, pResourceRegionStartCoordinates: ^TILED_RESOURCE_COORDINATE, pResourceRegionSizes: ^TILE_REGION_SIZE, pHeap: ^IHeap, NumRanges: u32, pRangeFlags: ^TILE_RANGE_FLAGS, pHeapRangeStartOffsets: ^u32, pRangeTileCounts: ^u32, Flags: TILE_MAPPING_FLAGS),
+ CopyTileMappings: proc "stdcall" (this: ^ICommandQueue, pDstResource: ^IResource, pDstRegionStartCoordinate: ^TILED_RESOURCE_COORDINATE, pSrcResource: ^IResource, pSrcRegionStartCoordinate: ^TILED_RESOURCE_COORDINATE, pRegionSize: ^TILE_REGION_SIZE, Flags: TILE_MAPPING_FLAGS),
+ ExecuteCommandLists: proc "stdcall" (this: ^ICommandQueue, NumCommandLists: u32, ppCommandLists: ^^ICommandList),
+ SetMarker: proc "stdcall" (this: ^ICommandQueue, Metadata: u32, pData: rawptr, Size: u32),
+ BeginEvent: proc "stdcall" (this: ^ICommandQueue, Metadata: u32, pData: rawptr, Size: u32),
+ EndEvent: proc "stdcall" (this: ^ICommandQueue),
+ Signal: proc "stdcall" (this: ^ICommandQueue, pFence: ^IFence, Value: u64) -> HRESULT,
+ Wait: proc "stdcall" (this: ^ICommandQueue, pFence: ^IFence, Value: u64) -> HRESULT,
+ GetTimestampFrequency: proc "stdcall" (this: ^ICommandQueue, pFrequency: ^u64) -> HRESULT,
+ GetClockCalibration: proc "stdcall" (this: ^ICommandQueue, pGpuTimestamp: ^u64, pCpuTimestamp: ^u64) -> HRESULT,
+ GetDesc: proc "stdcall" (this: ^ICommandQueue) -> COMMAND_QUEUE_DESC,
+}
+
+
+IDevice_UUID :: "189819f1-1db6-4b57-be54-1821339b85f7"
+IDevice :: struct #raw_union {
+ #subtype id3d12object: IObject,
+ using id3d12device_vtable: ^IDevice_VTable,
+}
+IDevice_VTable :: struct {
+ using id3d12object_vtable: IObject_VTable,
+ GetNodeCount: proc "stdcall" (this: ^IDevice) -> u32,
+ CreateCommandQueue: proc "stdcall" (this: ^IDevice, pDesc: ^COMMAND_QUEUE_DESC, riid: ^IID, ppCommandQueue: ^rawptr) -> HRESULT,
+ CreateCommandAllocator: proc "stdcall" (this: ^IDevice, type: COMMAND_LIST_TYPE, riid: ^IID, ppCommandAllocator: ^rawptr) -> HRESULT,
+ CreateGraphicsPipelineState: proc "stdcall" (this: ^IDevice, pDesc: ^GRAPHICS_PIPELINE_STATE_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT,
+ CreateComputePipelineState: proc "stdcall" (this: ^IDevice, pDesc: ^COMPUTE_PIPELINE_STATE_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT,
+ CreateCommandList: proc "stdcall" (this: ^IDevice, nodeMask: u32, type: COMMAND_LIST_TYPE, pCommandAllocator: ^ICommandAllocator, pInitialState: ^IPipelineState, riid: ^IID, ppCommandList: ^rawptr) -> HRESULT,
+ CheckFeatureSupport: proc "stdcall" (this: ^IDevice, Feature: FEATURE, pFeatureSupportData: rawptr, FeatureSupportDataSize: u32) -> HRESULT,
+ CreateDescriptorHeap: proc "stdcall" (this: ^IDevice, pDescriptorHeapDesc: ^DESCRIPTOR_HEAP_DESC, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT,
+ GetDescriptorHandleIncrementSize: proc "stdcall" (this: ^IDevice, DescriptorHeapType: DESCRIPTOR_HEAP_TYPE) -> u32,
+ CreateRootSignature: proc "stdcall" (this: ^IDevice, nodeMask: u32, pBlobWithRootSignature: rawptr, blobLengthInBytes: SIZE_T, riid: ^IID, ppvRootSignature: ^rawptr) -> HRESULT,
+ CreateConstantBufferView: proc "stdcall" (this: ^IDevice, pDesc: ^CONSTANT_BUFFER_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE),
+ CreateShaderResourceView: proc "stdcall" (this: ^IDevice, pResource: ^IResource, pDesc: ^SHADER_RESOURCE_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE),
+ CreateUnorderedAccessView: proc "stdcall" (this: ^IDevice, pResource: ^IResource, pCounterResource: ^IResource, pDesc: ^UNORDERED_ACCESS_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE),
+ CreateRenderTargetView: proc "stdcall" (this: ^IDevice, pResource: ^IResource, pDesc: ^RENDER_TARGET_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE),
+ CreateDepthStencilView: proc "stdcall" (this: ^IDevice, pResource: ^IResource, pDesc: ^DEPTH_STENCIL_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE),
+ CreateSampler: proc "stdcall" (this: ^IDevice, pDesc: ^SAMPLER_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE),
+ CopyDescriptors: proc "stdcall" (this: ^IDevice, NumDestDescriptorRanges: u32, pDestDescriptorRangeStarts: ^CPU_DESCRIPTOR_HANDLE, pDestDescriptorRangeSizes: ^u32, NumSrcDescriptorRanges: u32, pSrcDescriptorRangeStarts: ^CPU_DESCRIPTOR_HANDLE, pSrcDescriptorRangeSizes: ^u32, DescriptorHeapsType: DESCRIPTOR_HEAP_TYPE),
+ CopyDescriptorsSimple: proc "stdcall" (this: ^IDevice, NumDescriptors: u32, DestDescriptorRangeStart: CPU_DESCRIPTOR_HANDLE, SrcDescriptorRangeStart: CPU_DESCRIPTOR_HANDLE, DescriptorHeapsType: DESCRIPTOR_HEAP_TYPE),
+ GetResourceAllocationInfo: proc "stdcall" (this: ^IDevice, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC) -> RESOURCE_ALLOCATION_INFO,
+ GetCustomHeapProperties: proc "stdcall" (this: ^IDevice, nodeMask: u32, heapType: HEAP_TYPE) -> HEAP_PROPERTIES,
+ CreateCommittedResource: proc "stdcall" (this: ^IDevice, pHeapProperties: ^HEAP_PROPERTIES, HeapFlags: HEAP_FLAGS, pDesc: ^RESOURCE_DESC, InitialResourceState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, riidResource: ^IID, ppvResource: ^rawptr) -> HRESULT,
+ CreateHeap: proc "stdcall" (this: ^IDevice, pDesc: ^HEAP_DESC, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT,
+ CreatePlacedResource: proc "stdcall" (this: ^IDevice, pHeap: ^IHeap, HeapOffset: u64, pDesc: ^RESOURCE_DESC, InitialState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, riid: ^IID, ppvResource: ^rawptr) -> HRESULT,
+ CreateReservedResource: proc "stdcall" (this: ^IDevice, pDesc: ^RESOURCE_DESC, InitialState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, riid: ^IID, ppvResource: ^rawptr) -> HRESULT,
+ CreateSharedHandle: proc "stdcall" (this: ^IDevice, pObject: ^IDeviceChild, pAttributes: ^win32.SECURITY_ATTRIBUTES, Access: u32, Name: [^]u16, pHandle: ^HANDLE) -> HRESULT,
+ OpenSharedHandle: proc "stdcall" (this: ^IDevice, NTHandle: HANDLE, riid: ^IID, ppvObj: ^rawptr) -> HRESULT,
+ OpenSharedHandleByName: proc "stdcall" (this: ^IDevice, Name: [^]u16, Access: u32, pNTHandle: ^HANDLE) -> HRESULT,
+ MakeResident: proc "stdcall" (this: ^IDevice, NumObjects: u32, ppObjects: ^^IPageable) -> HRESULT,
+ Evict: proc "stdcall" (this: ^IDevice, NumObjects: u32, ppObjects: ^^IPageable) -> HRESULT,
+ CreateFence: proc "stdcall" (this: ^IDevice, InitialValue: u64, Flags: FENCE_FLAGS, riid: ^IID, ppFence: ^rawptr) -> HRESULT,
+ GetDeviceRemovedReason: proc "stdcall" (this: ^IDevice) -> HRESULT,
+ GetCopyableFootprints: proc "stdcall" (this: ^IDevice, pResourceDesc: ^RESOURCE_DESC, FirstSubresource: u32, NumSubresources: u32, BaseOffset: u64, pLayouts: ^PLACED_SUBRESOURCE_FOOTPRINT, pNumRows: ^u32, pRowSizeInBytes: ^u64, pTotalBytes: ^u64),
+ CreateQueryHeap: proc "stdcall" (this: ^IDevice, pDesc: ^QUERY_HEAP_DESC, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT,
+ SetStablePowerState: proc "stdcall" (this: ^IDevice, Enable: BOOL) -> HRESULT,
+ CreateCommandSignature: proc "stdcall" (this: ^IDevice, pDesc: ^COMMAND_SIGNATURE_DESC, pRootSignature: ^IRootSignature, riid: ^IID, ppvCommandSignature: ^rawptr) -> HRESULT,
+ GetResourceTiling: proc "stdcall" (this: ^IDevice, pTiledResource: ^IResource, pNumTilesForEntireResource: ^u32, pPackedMipDesc: ^PACKED_MIP_INFO, pStandardTileShapeForNonPackedMips: ^TILE_SHAPE, pNumSubresourceTilings: ^u32, FirstSubresourceTilingToGet: u32, pSubresourceTilingsForNonPackedMips: ^SUBRESOURCE_TILING),
+ GetAdapterLuid: proc "stdcall" (this: ^IDevice) -> LUID,
+}
+
+
+IPipelineLibrary_UUID :: "c64226a8-9201-46af-b4cc-53fb9ff7414f"
+IPipelineLibrary :: struct #raw_union {
+ #subtype id3d12devicechild: IDeviceChild,
+ using id3d12pipelinelibrary_vtable: ^IPipelineLibrary_VTable,
+}
+IPipelineLibrary_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ StorePipeline: proc "stdcall" (this: ^IPipelineLibrary, pName: [^]u16, pPipeline: ^IPipelineState) -> HRESULT,
+ LoadGraphicsPipeline: proc "stdcall" (this: ^IPipelineLibrary, pName: [^]u16, pDesc: ^GRAPHICS_PIPELINE_STATE_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT,
+ LoadComputePipeline: proc "stdcall" (this: ^IPipelineLibrary, pName: [^]u16, pDesc: ^COMPUTE_PIPELINE_STATE_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT,
+ GetSerializedSize: proc "stdcall" (this: ^IPipelineLibrary) -> SIZE_T,
+ Serialize: proc "stdcall" (this: ^IPipelineLibrary, pData: rawptr, DataSizeInBytes: SIZE_T) -> HRESULT,
+}
+
+
+IPipelineLibrary1_UUID :: "80eabf42-2568-4e5e-bd82-c37f86961dc3"
+IPipelineLibrary1 :: struct #raw_union {
+ #subtype id3d12pipelinelibrary: IPipelineLibrary,
+ using id3d12pipelinelibrary1_vtable: ^IPipelineLibrary1_VTable,
+}
+IPipelineLibrary1_VTable :: struct {
+ using id3d12pipelinelibrary_vtable: IPipelineLibrary_VTable,
+ LoadPipeline: proc "stdcall" (this: ^IPipelineLibrary1, pName: [^]u16, pDesc: ^PIPELINE_STATE_STREAM_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT,
+}
+
+MULTIPLE_FENCE_WAIT_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ ANY = 0x1,
+ ALL = 0x0,
+}
+
+RESIDENCY_PRIORITY :: enum i32 {
+ MINIMUM = 671088640,
+ LOW = 1342177280,
+ NORMAL = 2013265920,
+ HIGH = -1610547200,
+ MAXIMUM = -939524096,
+}
+
+
+IDevice1_UUID :: "77acce80-638e-4e65-8895-c1f23386863e"
+IDevice1 :: struct #raw_union {
+ #subtype id3d12device: IDevice,
+ using id3d12device1_vtable: ^IDevice1_VTable,
+}
+IDevice1_VTable :: struct {
+ using id3d12device_vtable: IDevice_VTable,
+ CreatePipelineLibrary: proc "stdcall" (this: ^IDevice1, pLibraryBlob: rawptr, BlobLength: SIZE_T, riid: ^IID, ppPipelineLibrary: ^rawptr) -> HRESULT,
+ SetEventOnMultipleFenceCompletion: proc "stdcall" (this: ^IDevice1, ppFences: ^^IFence, pFenceValues: ^u64, NumFences: u32, Flags: MULTIPLE_FENCE_WAIT_FLAGS, hEvent: HANDLE) -> HRESULT,
+ SetResidencyPriority: proc "stdcall" (this: ^IDevice1, NumObjects: u32, ppObjects: ^^IPageable, pPriorities: ^RESIDENCY_PRIORITY) -> HRESULT,
+}
+
+
+IDevice2_UUID :: "30baa41e-b15b-475c-a0bb-1af5c5b64328"
+IDevice2 :: struct #raw_union {
+ #subtype id3d12device1: IDevice1,
+ using id3d12device2_vtable: ^IDevice2_VTable,
+}
+IDevice2_VTable :: struct {
+ using id3d12device1_vtable: IDevice1_VTable,
+ CreatePipelineState: proc "stdcall" (this: ^IDevice2, pDesc: ^PIPELINE_STATE_STREAM_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT,
+}
+
+RESIDENCY_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ DENY_OVERBUDGET = 0x1,
+}
+
+
+IDevice3_UUID :: "81dadc15-2bad-4392-93c5-101345c4aa98"
+IDevice3 :: struct #raw_union {
+ #subtype id3d12device2: IDevice2,
+ using id3d12device3_vtable: ^IDevice3_VTable,
+}
+IDevice3_VTable :: struct {
+ using id3d12device2_vtable: IDevice2_VTable,
+ OpenExistingHeapFromAddress: proc "stdcall" (this: ^IDevice3, pAddress: rawptr, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT,
+ OpenExistingHeapFromFileMapping: proc "stdcall" (this: ^IDevice3, hFileMapping: HANDLE, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT,
+ EnqueueMakeResident: proc "stdcall" (this: ^IDevice3, Flags: RESIDENCY_FLAGS, NumObjects: u32, ppObjects: ^^IPageable, pFenceToSignal: ^IFence, FenceValueToSignal: u64) -> HRESULT,
+}
+
+COMMAND_LIST_FLAGS :: enum u32 { // TODO: make bit_set
+ COMMAND_LIST_FLAG_NONE = 0x0,
+}
+
+COMMAND_POOL_FLAGS :: enum u32 { // TODO: make bit_set
+ COMMAND_POOL_FLAG_NONE = 0x0,
+}
+
+COMMAND_RECORDER_FLAGS :: enum u32 { // TODO: make bit_set
+ COMMAND_RECORDER_FLAG_NONE = 0x0,
+}
+
+PROTECTED_SESSION_STATUS :: enum i32 {
+ OK = 0,
+ INVALID = 1,
+}
+
+
+IProtectedSession_UUID :: "A1533D18-0AC1-4084-85B9-89A96116806B"
+IProtectedSession :: struct #raw_union {
+ #subtype id3d12devicechild: IDeviceChild,
+ using id3d12protectedsession_vtable: ^IProtectedSession_VTable,
+}
+IProtectedSession_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ GetStatusFence: proc "stdcall" (this: ^IProtectedSession, riid: ^IID, ppFence: ^rawptr) -> HRESULT,
+ GetSessionStatus: proc "stdcall" (this: ^IProtectedSession) -> PROTECTED_SESSION_STATUS,
+}
+
+PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ SUPPORTED = 0x1,
+}
+
+FEATURE_DATA_PROTECTED_RESOURCE_SESSION_SUPPORT :: struct {
+ NodeIndex: u32,
+ Support: PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS,
+}
+
+PROTECTED_RESOURCE_SESSION_FLAGS :: enum u32 { // TODO: make bit_set
+ PROTECTED_RESOURCE_SESSION_FLAG_NONE = 0x0,
+}
+
+PROTECTED_RESOURCE_SESSION_DESC :: struct {
+ NodeMask: u32,
+ Flags: PROTECTED_RESOURCE_SESSION_FLAGS,
+}
+
+
+IProtectedResourceSession_UUID :: "6CD696F4-F289-40CC-8091-5A6C0A099C3D"
+IProtectedResourceSession :: struct #raw_union {
+ #subtype id3d12protectedsession: IProtectedSession,
+ using id3d12protectedresourcesession_vtable: ^IProtectedResourceSession_VTable,
+}
+IProtectedResourceSession_VTable :: struct {
+ using id3d12protectedsession_vtable: IProtectedSession_VTable,
+ GetDesc: proc "stdcall" (this: ^IProtectedResourceSession) -> PROTECTED_RESOURCE_SESSION_DESC,
+}
+
+
+IDevice4_UUID :: "e865df17-a9ee-46f9-a463-3098315aa2e5"
+IDevice4 :: struct #raw_union {
+ #subtype id3d12device3: IDevice3,
+ using id3d12device4_vtable: ^IDevice4_VTable,
+}
+IDevice4_VTable :: struct {
+ using id3d12device3_vtable: IDevice3_VTable,
+ CreateCommandList1: proc "stdcall" (this: ^IDevice4, nodeMask: u32, type: COMMAND_LIST_TYPE, flags: COMMAND_LIST_FLAGS, riid: ^IID, ppCommandList: ^rawptr) -> HRESULT,
+ CreateProtectedResourceSession: proc "stdcall" (this: ^IDevice4, pDesc: ^PROTECTED_RESOURCE_SESSION_DESC, riid: ^IID, ppSession: ^rawptr) -> HRESULT,
+ CreateCommittedResource1: proc "stdcall" (this: ^IDevice4, pHeapProperties: ^HEAP_PROPERTIES, HeapFlags: HEAP_FLAGS, pDesc: ^RESOURCE_DESC, InitialResourceState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, pProtectedSession: ^IProtectedResourceSession, riidResource: ^IID, ppvResource: ^rawptr) -> HRESULT,
+ CreateHeap1: proc "stdcall" (this: ^IDevice4, pDesc: ^HEAP_DESC, pProtectedSession: ^IProtectedResourceSession, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT,
+ CreateReservedResource1: proc "stdcall" (this: ^IDevice4, pDesc: ^RESOURCE_DESC, InitialState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, pProtectedSession: ^IProtectedResourceSession, riid: ^IID, ppvResource: ^rawptr) -> HRESULT,
+ GetResourceAllocationInfo1: proc "stdcall" (this: ^IDevice4, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC, pResourceAllocationInfo1: ^RESOURCE_ALLOCATION_INFO1) -> RESOURCE_ALLOCATION_INFO,
+}
+
+LIFETIME_STATE :: enum i32 {
+ IN_USE = 0,
+ NOT_IN_USE = 1,
+}
+
+
+ILifetimeOwner_UUID :: "e667af9f-cd56-4f46-83ce-032e595d70a8"
+ILifetimeOwner :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12lifetimeowner_vtable: ^ILifetimeOwner_VTable,
+}
+ILifetimeOwner_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ LifetimeStateUpdated: proc "stdcall" (this: ^ILifetimeOwner, NewState: LIFETIME_STATE),
+}
+
+
+ISwapChainAssistant_UUID :: "f1df64b6-57fd-49cd-8807-c0eb88b45c8f"
+ISwapChainAssistant :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12swapchainassistant_vtable: ^ISwapChainAssistant_VTable,
+}
+ISwapChainAssistant_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetLUID: proc "stdcall" (this: ^ISwapChainAssistant) -> LUID,
+ GetSwapChainObject: proc "stdcall" (this: ^ISwapChainAssistant, riid: ^IID, ppv: ^rawptr) -> HRESULT,
+ GetCurrentResourceAndCommandQueue: proc "stdcall" (this: ^ISwapChainAssistant, riidResource: ^IID, ppvResource: ^rawptr, riidQueue: ^IID, ppvQueue: ^rawptr) -> HRESULT,
+ InsertImplicitSync: proc "stdcall" (this: ^ISwapChainAssistant) -> HRESULT,
+}
+
+
+ILifetimeTracker_UUID :: "3fd03d36-4eb1-424a-a582-494ecb8ba813"
+ILifetimeTracker :: struct #raw_union {
+ #subtype id3d12devicechild: IDeviceChild,
+ using id3d12lifetimetracker_vtable: ^ILifetimeTracker_VTable,
+}
+ILifetimeTracker_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ DestroyOwnedObject: proc "stdcall" (this: ^ILifetimeTracker, pObject: ^IDeviceChild) -> HRESULT,
+}
+
+META_COMMAND_PARAMETER_TYPE :: enum i32 {
+ FLOAT = 0,
+ UINT64 = 1,
+ GPU_VIRTUAL_ADDRESS = 2,
+ CPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 3,
+ GPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 4,
+}
+
+META_COMMAND_PARAMETER_FLAGS :: enum u32 { // TODO: make bit_set
+ INPUT = 0x1,
+ OUTPUT = 0x2,
+}
+
+META_COMMAND_PARAMETER_STAGE :: enum i32 {
+ CREATION = 0,
+ INITIALIZATION = 1,
+ EXECUTION = 2,
+}
+
+META_COMMAND_PARAMETER_DESC :: struct {
+ Name: [^]u16,
+ Type: META_COMMAND_PARAMETER_TYPE,
+ Flags: META_COMMAND_PARAMETER_FLAGS,
+ RequiredResourceState: RESOURCE_STATES,
+ StructureOffset: u32,
+}
+
+GRAPHICS_STATES :: enum i32 {
+ NONE = 0,
+ IA_VERTEX_BUFFERS = 1,
+ IA_INDEX_BUFFER = 2,
+ IA_PRIMITIVE_TOPOLOGY = 4,
+ DESCRIPTOR_HEAP = 8,
+ GRAPHICS_ROOT_SIGNATURE = 16,
+ COMPUTE_ROOT_SIGNATURE = 32,
+ RS_VIEWPORTS = 64,
+ RS_SCISSOR_RECTS = 128,
+ PREDICATION = 256,
+ OM_RENDER_TARGETS = 512,
+ OM_STENCIL_REF = 1024,
+ OM_BLEND_FACTOR = 2048,
+ PIPELINE_STATE = 4096,
+ SO_TARGETS = 8192,
+ OM_DEPTH_BOUNDS = 16384,
+ SAMPLE_POSITIONS = 32768,
+ VIEW_INSTANCE_MASK = 65536,
+}
+
+META_COMMAND_DESC :: struct {
+ Id: GUID,
+ Name: [^]u16,
+ InitializationDirtyState: GRAPHICS_STATES,
+ ExecutionDirtyState: GRAPHICS_STATES,
+}
+
+
+IStateObject_UUID :: "47016943-fca8-4594-93ea-af258b55346d"
+IStateObject :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+}
+
+
+IStateObjectProperties_UUID :: "de5fa827-9bf9-4f26-89ff-d7f56fde3860"
+IStateObjectProperties :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12stateobjectproperties_vtable: ^IStateObjectProperties_VTable,
+}
+IStateObjectProperties_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetShaderIdentifier: proc "stdcall" (this: ^IStateObjectProperties, pExportName: [^]u16) -> rawptr,
+ GetShaderStackSize: proc "stdcall" (this: ^IStateObjectProperties, pExportName: [^]u16) -> u64,
+ GetPipelineStackSize: proc "stdcall" (this: ^IStateObjectProperties) -> u64,
+ SetPipelineStackSize: proc "stdcall" (this: ^IStateObjectProperties, PipelineStackSizeInBytes: u64),
+}
+
+STATE_SUBOBJECT_TYPE :: enum i32 {
+ STATE_OBJECT_CONFIG = 0,
+ GLOBAL_ROOT_SIGNATURE = 1,
+ LOCAL_ROOT_SIGNATURE = 2,
+ NODE_MASK = 3,
+ DXIL_LIBRARY = 5,
+ EXISTING_COLLECTION = 6,
+ SUBOBJECT_TO_EXPORTS_ASSOCIATION = 7,
+ DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 8,
+ RAYTRACING_SHADER_CONFIG = 9,
+ RAYTRACING_PIPELINE_CONFIG = 10,
+ HIT_GROUP = 11,
+ RAYTRACING_PIPELINE_CONFIG1 = 12,
+ MAX_VALID = 13,
+}
+
+STATE_SUBOBJECT :: struct {
+ Type: STATE_SUBOBJECT_TYPE,
+ pDesc: rawptr,
+}
+
+STATE_OBJECT_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ ALLOW_LOCAL_DEPENDENCIES_ON_EXTERNAL_DEFINITIONS = 0x1,
+ ALLOW_EXTERNAL_DEPENDENCIES_ON_LOCAL_DEFINITIONS = 0x2,
+ ALLOW_STATE_OBJECT_ADDITIONS = 0x4,
+}
+
+STATE_OBJECT_CONFIG :: struct {
+ Flags: STATE_OBJECT_FLAGS,
+}
+
+GLOBAL_ROOT_SIGNATURE :: struct {
+ pGlobalRootSignature: ^IRootSignature,
+}
+
+LOCAL_ROOT_SIGNATURE :: struct {
+ pLocalRootSignature: ^IRootSignature,
+}
+
+NODE_MASK :: struct {
+ NodeMask: u32,
+}
+
+EXPORT_FLAGS :: enum u32 { // TODO: make bit_set
+ EXPORT_FLAG_NONE = 0x0,
+}
+
+EXPORT_DESC :: struct {
+ Name: [^]u16,
+ ExportToRename: [^]u16,
+ Flags: EXPORT_FLAGS,
+}
+
+DXIL_LIBRARY_DESC :: struct {
+ DXILLibrary: SHADER_BYTECODE,
+ NumExports: u32,
+ pExports: ^EXPORT_DESC,
+}
+
+EXISTING_COLLECTION_DESC :: struct {
+ pExistingCollection: ^IStateObject,
+ NumExports: u32,
+ pExports: ^EXPORT_DESC,
+}
+
+SUBOBJECT_TO_EXPORTS_ASSOCIATION :: struct {
+ pSubobjectToAssociate: ^STATE_SUBOBJECT,
+ NumExports: u32,
+ pExports: [^]^i16,
+}
+
+DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION :: struct {
+ SubobjectToAssociate: ^i16,
+ NumExports: u32,
+ pExports: [^]^i16,
+}
+
+HIT_GROUP_TYPE :: enum i32 {
+ TRIANGLES = 0,
+ PROCEDURAL_PRIMITIVE = 1,
+}
+
+HIT_GROUP_DESC :: struct {
+ HitGroupExport: ^i16,
+ Type: HIT_GROUP_TYPE,
+ AnyHitShaderImport: ^i16,
+ ClosestHitShaderImport: ^i16,
+ IntersectionShaderImport: ^i16,
+}
+
+RAYTRACING_SHADER_CONFIG :: struct {
+ MaxPayloadSizeInBytes: u32,
+ MaxAttributeSizeInBytes: u32,
+}
+
+RAYTRACING_PIPELINE_CONFIG :: struct {
+ MaxTraceRecursionDepth: u32,
+}
+
+RAYTRACING_PIPELINE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ SKIP_TRIANGLES = 0x100,
+ SKIP_PROCEDURAL_PRIMITIVES = 0x200,
+}
+
+RAYTRACING_PIPELINE_CONFIG1 :: struct {
+ MaxTraceRecursionDepth: u32,
+ Flags: RAYTRACING_PIPELINE_FLAGS,
+}
+
+STATE_OBJECT_TYPE :: enum i32 {
+ COLLECTION = 0,
+ RAYTRACING_PIPELINE = 3,
+}
+
+STATE_OBJECT_DESC :: struct {
+ Type: STATE_OBJECT_TYPE,
+ NumSubobjects: u32,
+ pSubobjects: ^STATE_SUBOBJECT,
+}
+
+RAYTRACING_GEOMETRY_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ OPAQUE = 0x1,
+ NO_DUPLICATE_ANYHIT_INVOCATION = 0x2,
+}
+
+RAYTRACING_GEOMETRY_TYPE :: enum i32 {
+ TRIANGLES = 0,
+ PROCEDURAL_PRIMITIVE_AABBS = 1,
+}
+
+RAYTRACING_INSTANCE_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ TRIANGLE_CULL_DISABLE = 0x1,
+ TRIANGLE_FRONT_COUNTERCLOCKWISE = 0x2,
+ FORCE_OPAQUE = 0x4,
+ FORCE_NON_OPAQUE = 0x8,
+}
+
+GPU_VIRTUAL_ADDRESS_AND_STRIDE :: struct {
+ StartAddress: GPU_VIRTUAL_ADDRESS,
+ StrideInBytes: u64,
+}
+
+GPU_VIRTUAL_ADDRESS_RANGE :: struct {
+ StartAddress: GPU_VIRTUAL_ADDRESS,
+ SizeInBytes: u64,
+}
+
+GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE :: struct {
+ StartAddress: GPU_VIRTUAL_ADDRESS,
+ SizeInBytes: u64,
+ StrideInBytes: u64,
+}
+
+RAYTRACING_GEOMETRY_TRIANGLES_DESC :: struct {
+ Transform3x4: GPU_VIRTUAL_ADDRESS,
+ IndexFormat: dxgi.FORMAT,
+ VertexFormat: dxgi.FORMAT,
+ IndexCount: u32,
+ VertexCount: u32,
+ IndexBuffer: GPU_VIRTUAL_ADDRESS,
+ VertexBuffer: GPU_VIRTUAL_ADDRESS_AND_STRIDE,
+}
+
+RAYTRACING_AABB :: struct {
+ MinX: f32,
+ MinY: f32,
+ MinZ: f32,
+ MaxX: f32,
+ MaxY: f32,
+ MaxZ: f32,
+}
+
+RAYTRACING_GEOMETRY_AABBS_DESC :: struct {
+ AABBCount: u64,
+ AABBs: GPU_VIRTUAL_ADDRESS_AND_STRIDE,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ ALLOW_UPDATE = 0x1,
+ ALLOW_COMPACTION = 0x2,
+ PREFER_FAST_TRACE = 0x4,
+ PREFER_FAST_BUILD = 0x8,
+ MINIMIZE_MEMORY = 0x10,
+ PERFORM_UPDATE = 0x20,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE :: enum i32 {
+ CLONE = 0,
+ COMPACT = 1,
+ VISUALIZATION_DECODE_FOR_TOOLS = 2,
+ SERIALIZE = 3,
+ DESERIALIZE = 4,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_TYPE :: enum i32 {
+ TOP_LEVEL = 0,
+ BOTTOM_LEVEL = 1,
+}
+
+ELEMENTS_LAYOUT :: enum i32 {
+ ARRAY = 0,
+ ARRAY_OF_POINTERS = 1,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE :: enum i32 {
+ COMPACTED_SIZE = 0,
+ TOOLS_VISUALIZATION = 1,
+ SERIALIZATION = 2,
+ CURRENT_SIZE = 3,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC :: struct {
+ DestBuffer: GPU_VIRTUAL_ADDRESS,
+ InfoType: RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC :: struct {
+ CompactedSizeInBytes: u64,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC :: struct {
+ DecodedSizeInBytes: u64,
+}
+
+BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER :: struct {
+ Type: RAYTRACING_ACCELERATION_STRUCTURE_TYPE,
+ NumDescs: u32,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC :: struct {
+ SerializedSizeInBytes: u64,
+ NumBottomLevelAccelerationStructurePointers: u64,
+}
+
+SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER :: struct {
+ DriverOpaqueGUID: GUID,
+ DriverOpaqueVersioningData: [16]u8,
+}
+
+SERIALIZED_DATA_TYPE :: enum i32 {
+ SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE = 0,
+}
+
+DRIVER_MATCHING_IDENTIFIER_STATUS :: enum i32 {
+ COMPATIBLE_WITH_DEVICE = 0,
+ UNSUPPORTED_TYPE = 1,
+ UNRECOGNIZED = 2,
+ INCOMPATIBLE_VERSION = 3,
+ INCOMPATIBLE_TYPE = 4,
+}
+
+SERIALIZED_RAYTRACING_ACCELERATION_STRUCTURE_HEADER :: struct {
+ DriverMatchingIdentifier: SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER,
+ SerializedSizeInBytesIncludingHeader: u64,
+ DeserializedSizeInBytes: u64,
+ NumBottomLevelAccelerationStructurePointersAfterHeader: u64,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC :: struct {
+ CurrentSizeInBytes: u64,
+}
+
+RAYTRACING_INSTANCE_DESC :: struct {
+ Transform: [3][4]f32,
+ InstanceID: u32,
+ InstanceContributionToHitGroupIndex: u32,
+ AccelerationStructure: GPU_VIRTUAL_ADDRESS,
+}
+
+RAYTRACING_GEOMETRY_DESC :: struct {
+ Type: RAYTRACING_GEOMETRY_TYPE,
+ Flags: RAYTRACING_GEOMETRY_FLAGS,
+ using _: struct #raw_union {
+ Triangles: RAYTRACING_GEOMETRY_TRIANGLES_DESC,
+ AABBs: RAYTRACING_GEOMETRY_AABBS_DESC,
+ },
+}
+
+BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS :: struct {
+ Type: RAYTRACING_ACCELERATION_STRUCTURE_TYPE,
+ Flags: RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS,
+ NumDescs: u32,
+ DescsLayout: ELEMENTS_LAYOUT,
+ using _: struct #raw_union {
+ InstanceDescs: GPU_VIRTUAL_ADDRESS,
+ pGeometryDescs: ^RAYTRACING_GEOMETRY_DESC,
+ ppGeometryDescs: ^^RAYTRACING_GEOMETRY_DESC,
+ },
+}
+
+BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC :: struct {
+ DestAccelerationStructureData: GPU_VIRTUAL_ADDRESS,
+ Inputs: BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS,
+ SourceAccelerationStructureData: GPU_VIRTUAL_ADDRESS,
+ ScratchAccelerationStructureData: GPU_VIRTUAL_ADDRESS,
+}
+
+RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO :: struct {
+ ResultDataMaxSizeInBytes: u64,
+ ScratchDataSizeInBytes: u64,
+ UpdateScratchDataSizeInBytes: u64,
+}
+
+RAY_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ FORCE_OPAQUE = 0x1,
+ FORCE_NON_OPAQUE = 0x2,
+ ACCEPT_FIRST_HIT_AND_END_SEARCH = 0x4,
+ SKIP_CLOSEST_HIT_SHADER = 0x8,
+ CULL_BACK_FACING_TRIANGLES = 0x10,
+ CULL_FRONT_FACING_TRIANGLES = 0x20,
+ CULL_OPAQUE = 0x40,
+ CULL_NON_OPAQUE = 0x80,
+ SKIP_TRIANGLES = 0x100,
+ SKIP_PROCEDURAL_PRIMITIVES = 0x200,
+}
+
+HIT_KIND :: enum i32 {
+ TRIANGLE_FRONT_FACE = 254,
+ TRIANGLE_BACK_FACE = 255,
+}
+
+
+IDevice5_UUID :: "8b4f173b-2fea-4b80-8f58-4307191ab95d"
+IDevice5 :: struct #raw_union {
+ #subtype id3d12device4: IDevice4,
+ using id3d12device5_vtable: ^IDevice5_VTable,
+}
+IDevice5_VTable :: struct {
+ using id3d12device4_vtable: IDevice4_VTable,
+ CreateLifetimeTracker: proc "stdcall" (this: ^IDevice5, pOwner: ^ILifetimeOwner, riid: ^IID, ppvTracker: ^rawptr) -> HRESULT,
+ RemoveDevice: proc "stdcall" (this: ^IDevice5),
+ EnumerateMetaCommands: proc "stdcall" (this: ^IDevice5, pNumMetaCommands: ^u32, pDescs: ^META_COMMAND_DESC) -> HRESULT,
+ EnumerateMetaCommandParameters: proc "stdcall" (this: ^IDevice5, CommandId: ^GUID, Stage: META_COMMAND_PARAMETER_STAGE, pTotalStructureSizeInBytes: ^u32, pParameterCount: ^u32, pParameterDescs: ^META_COMMAND_PARAMETER_DESC) -> HRESULT,
+ CreateMetaCommand: proc "stdcall" (this: ^IDevice5, CommandId: ^GUID, NodeMask: u32, pCreationParametersData: rawptr, CreationParametersDataSizeInBytes: SIZE_T, riid: ^IID, ppMetaCommand: ^rawptr) -> HRESULT,
+ CreateStateObject: proc "stdcall" (this: ^IDevice5, pDesc: ^STATE_OBJECT_DESC, riid: ^IID, ppStateObject: ^rawptr) -> HRESULT,
+ GetRaytracingAccelerationStructurePrebuildInfo: proc "stdcall" (this: ^IDevice5, pDesc: ^BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS, pInfo: ^RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO),
+ CheckDriverMatchingIdentifier: proc "stdcall" (this: ^IDevice5, SerializedDataType: SERIALIZED_DATA_TYPE, pIdentifierToCheck: ^SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER) -> DRIVER_MATCHING_IDENTIFIER_STATUS,
+}
+
+AUTO_BREADCRUMB_OP :: enum i32 {
+ SETMARKER = 0,
+ BEGINEVENT = 1,
+ ENDEVENT = 2,
+ DRAWINSTANCED = 3,
+ DRAWINDEXEDINSTANCED = 4,
+ EXECUTEINDIRECT = 5,
+ DISPATCH = 6,
+ COPYBUFFERREGION = 7,
+ COPYTEXTUREREGION = 8,
+ COPYRESOURCE = 9,
+ COPYTILES = 10,
+ RESOLVESUBRESOURCE = 11,
+ CLEARRENDERTARGETVIEW = 12,
+ CLEARUNORDEREDACCESSVIEW = 13,
+ CLEARDEPTHSTENCILVIEW = 14,
+ RESOURCEBARRIER = 15,
+ EXECUTEBUNDLE = 16,
+ PRESENT = 17,
+ RESOLVEQUERYDATA = 18,
+ BEGINSUBMISSION = 19,
+ ENDSUBMISSION = 20,
+ DECODEFRAME = 21,
+ PROCESSFRAMES = 22,
+ ATOMICCOPYBUFFERUINT = 23,
+ ATOMICCOPYBUFFERUINT64 = 24,
+ RESOLVESUBRESOURCEREGION = 25,
+ WRITEBUFFERIMMEDIATE = 26,
+ DECODEFRAME1 = 27,
+ SETPROTECTEDRESOURCESESSION = 28,
+ DECODEFRAME2 = 29,
+ PROCESSFRAMES1 = 30,
+ BUILDRAYTRACINGACCELERATIONSTRUCTURE = 31,
+ EMITRAYTRACINGACCELERATIONSTRUCTUREPOSTBUILDINFO = 32,
+ COPYRAYTRACINGACCELERATIONSTRUCTURE = 33,
+ DISPATCHRAYS = 34,
+ INITIALIZEMETACOMMAND = 35,
+ EXECUTEMETACOMMAND = 36,
+ ESTIMATEMOTION = 37,
+ RESOLVEMOTIONVECTORHEAP = 38,
+ SETPIPELINESTATE1 = 39,
+ INITIALIZEEXTENSIONCOMMAND = 40,
+ EXECUTEEXTENSIONCOMMAND = 41,
+ DISPATCHMESH = 42,
+}
+
+AUTO_BREADCRUMB_NODE :: struct {
+ pCommandListDebugNameA: cstring,
+ pCommandListDebugNameW: [^]u16,
+ pCommandQueueDebugNameA: cstring,
+ pCommandQueueDebugNameW: [^]u16,
+ pCommandList: ^IGraphicsCommandList,
+ pCommandQueue: ^ICommandQueue,
+ BreadcrumbCount: u32,
+ pLastBreadcrumbValue: ^u32,
+ pCommandHistory: ^AUTO_BREADCRUMB_OP,
+ pNext: ^AUTO_BREADCRUMB_NODE,
+}
+
+DRED_BREADCRUMB_CONTEXT :: struct {
+ BreadcrumbIndex: u32,
+ pContextString: [^]u16,
+}
+
+AUTO_BREADCRUMB_NODE1 :: struct {
+ pCommandListDebugNameA: cstring,
+ pCommandListDebugNameW: [^]u16,
+ pCommandQueueDebugNameA: cstring,
+ pCommandQueueDebugNameW: [^]u16,
+ pCommandList: ^IGraphicsCommandList,
+ pCommandQueue: ^ICommandQueue,
+ BreadcrumbCount: u32,
+ pLastBreadcrumbValue: ^u32,
+ pCommandHistory: ^AUTO_BREADCRUMB_OP,
+ pNext: ^AUTO_BREADCRUMB_NODE1,
+ BreadcrumbContextsCount: u32,
+ pBreadcrumbContexts: ^DRED_BREADCRUMB_CONTEXT,
+}
+
+DRED_VERSION :: enum i32 {
+ _1_0 = 1,
+ _1_1 = 2,
+ _1_2 = 3,
+}
+
+DRED_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ FORCE_ENABLE = 0x1,
+ DISABLE_AUTOBREADCRUMBS = 0x2,
+}
+
+DRED_ENABLEMENT :: enum i32 {
+ SYSTEM_CONTROLLED = 0,
+ FORCED_OFF = 1,
+ FORCED_ON = 2,
+}
+
+DEVICE_REMOVED_EXTENDED_DATA :: struct {
+ Flags: DRED_FLAGS,
+ pHeadAutoBreadcrumbNode: ^AUTO_BREADCRUMB_NODE,
+}
+
+DRED_ALLOCATION_TYPE :: enum i32 {
+ COMMAND_QUEUE = 19,
+ COMMAND_ALLOCATOR = 20,
+ PIPELINE_STATE = 21,
+ COMMAND_LIST = 22,
+ FENCE = 23,
+ DESCRIPTOR_HEAP = 24,
+ HEAP = 25,
+ QUERY_HEAP = 27,
+ COMMAND_SIGNATURE = 28,
+ PIPELINE_LIBRARY = 29,
+ VIDEO_DECODER = 30,
+ VIDEO_PROCESSOR = 32,
+ RESOURCE = 34,
+ PASS = 35,
+ CRYPTOSESSION = 36,
+ CRYPTOSESSIONPOLICY = 37,
+ PROTECTEDRESOURCESESSION = 38,
+ VIDEO_DECODER_HEAP = 39,
+ COMMAND_POOL = 40,
+ COMMAND_RECORDER = 41,
+ STATE_OBJECT = 42,
+ METACOMMAND = 43,
+ SCHEDULINGGROUP = 44,
+ VIDEO_MOTION_ESTIMATOR = 45,
+ VIDEO_MOTION_VECTOR_HEAP = 46,
+ VIDEO_EXTENSION_COMMAND = 47,
+ INVALID = -1,
+}
+
+DRED_ALLOCATION_NODE :: struct {
+ ObjectNameA: cstring,
+ ObjectNameW: ^i16,
+ AllocationType: DRED_ALLOCATION_TYPE,
+ pNext: ^DRED_ALLOCATION_NODE,
+}
+
+DRED_ALLOCATION_NODE1 :: struct {
+ ObjectNameA: cstring,
+ ObjectNameW: ^i16,
+ AllocationType: DRED_ALLOCATION_TYPE,
+ pNext: ^DRED_ALLOCATION_NODE1,
+ pObject: ^IUnknown,
+}
+
+DRED_AUTO_BREADCRUMBS_OUTPUT :: struct {
+ pHeadAutoBreadcrumbNode: ^AUTO_BREADCRUMB_NODE,
+}
+
+DRED_AUTO_BREADCRUMBS_OUTPUT1 :: struct {
+ pHeadAutoBreadcrumbNode: ^AUTO_BREADCRUMB_NODE1,
+}
+
+DRED_PAGE_FAULT_OUTPUT :: struct {
+ PageFaultVA: GPU_VIRTUAL_ADDRESS,
+ pHeadExistingAllocationNode: ^DRED_ALLOCATION_NODE,
+ pHeadRecentFreedAllocationNode: ^DRED_ALLOCATION_NODE,
+}
+
+DRED_PAGE_FAULT_OUTPUT1 :: struct {
+ PageFaultVA: GPU_VIRTUAL_ADDRESS,
+ pHeadExistingAllocationNode: ^DRED_ALLOCATION_NODE1,
+ pHeadRecentFreedAllocationNode: ^DRED_ALLOCATION_NODE1,
+}
+
+DEVICE_REMOVED_EXTENDED_DATA1 :: struct {
+ DeviceRemovedReason: HRESULT,
+ AutoBreadcrumbsOutput: DRED_AUTO_BREADCRUMBS_OUTPUT,
+ PageFaultOutput: DRED_PAGE_FAULT_OUTPUT,
+}
+
+DEVICE_REMOVED_EXTENDED_DATA2 :: struct {
+ DeviceRemovedReason: HRESULT,
+ AutoBreadcrumbsOutput: DRED_AUTO_BREADCRUMBS_OUTPUT1,
+ PageFaultOutput: DRED_PAGE_FAULT_OUTPUT1,
+}
+
+VERSIONED_DEVICE_REMOVED_EXTENDED_DATA :: struct {
+ Version: DRED_VERSION,
+ using _: struct #raw_union {
+ Dred_1_0: DEVICE_REMOVED_EXTENDED_DATA,
+ Dred_1_1: DEVICE_REMOVED_EXTENDED_DATA1,
+ Dred_1_2: DEVICE_REMOVED_EXTENDED_DATA2,
+ },
+}
+
+
+IDeviceRemovedExtendedDataSettings_UUID :: "82BC481C-6B9B-4030-AEDB-7EE3D1DF1E63"
+IDeviceRemovedExtendedDataSettings :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12deviceremovedextendeddatasettings_vtable: ^IDeviceRemovedExtendedDataSettings_VTable,
+}
+IDeviceRemovedExtendedDataSettings_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ SetAutoBreadcrumbsEnablement: proc "stdcall" (this: ^IDeviceRemovedExtendedDataSettings, Enablement: DRED_ENABLEMENT),
+ SetPageFaultEnablement: proc "stdcall" (this: ^IDeviceRemovedExtendedDataSettings, Enablement: DRED_ENABLEMENT),
+ SetWatsonDumpEnablement: proc "stdcall" (this: ^IDeviceRemovedExtendedDataSettings, Enablement: DRED_ENABLEMENT),
+}
+
+
+IDeviceRemovedExtendedDataSettings1_UUID :: "DBD5AE51-3317-4F0A-ADF9-1D7CEDCAAE0B"
+IDeviceRemovedExtendedDataSettings1 :: struct #raw_union {
+ #subtype id3d12deviceremovedextendeddatasettings: IDeviceRemovedExtendedDataSettings,
+ using id3d12deviceremovedextendeddatasettings1_vtable: ^IDeviceRemovedExtendedDataSettings1_VTable,
+}
+IDeviceRemovedExtendedDataSettings1_VTable :: struct {
+ using id3d12deviceremovedextendeddatasettings_vtable: IDeviceRemovedExtendedDataSettings_VTable,
+ SetBreadcrumbContextEnablement: proc "stdcall" (this: ^IDeviceRemovedExtendedDataSettings1, Enablement: DRED_ENABLEMENT),
+}
+
+
+IDeviceRemovedExtendedData_UUID :: "98931D33-5AE8-4791-AA3C-1A73A2934E71"
+IDeviceRemovedExtendedData :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12deviceremovedextendeddata_vtable: ^IDeviceRemovedExtendedData_VTable,
+}
+IDeviceRemovedExtendedData_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetAutoBreadcrumbsOutput: proc "stdcall" (this: ^IDeviceRemovedExtendedData, pOutput: ^DRED_AUTO_BREADCRUMBS_OUTPUT) -> HRESULT,
+ GetPageFaultAllocationOutput: proc "stdcall" (this: ^IDeviceRemovedExtendedData, pOutput: ^DRED_PAGE_FAULT_OUTPUT) -> HRESULT,
+}
+
+
+IDeviceRemovedExtendedData1_UUID :: "9727A022-CF1D-4DDA-9EBA-EFFA653FC506"
+IDeviceRemovedExtendedData1 :: struct #raw_union {
+ #subtype id3d12deviceremovedextendeddata: IDeviceRemovedExtendedData,
+ using id3d12deviceremovedextendeddata1_vtable: ^IDeviceRemovedExtendedData1_VTable,
+}
+IDeviceRemovedExtendedData1_VTable :: struct {
+ using id3d12deviceremovedextendeddata_vtable: IDeviceRemovedExtendedData_VTable,
+ GetAutoBreadcrumbsOutput1: proc "stdcall" (this: ^IDeviceRemovedExtendedData1, pOutput: ^DRED_AUTO_BREADCRUMBS_OUTPUT1) -> HRESULT,
+ GetPageFaultAllocationOutput1: proc "stdcall" (this: ^IDeviceRemovedExtendedData1, pOutput: ^DRED_PAGE_FAULT_OUTPUT1) -> HRESULT,
+}
+
+BACKGROUND_PROCESSING_MODE :: enum i32 {
+ ALLOWED = 0,
+ ALLOW_INTRUSIVE_MEASUREMENTS = 1,
+ DISABLE_BACKGROUND_WORK = 2,
+ DISABLE_PROFILING_BY_SYSTEM = 3,
+}
+
+MEASUREMENTS_ACTION :: enum i32 {
+ KEEP_ALL = 0,
+ COMMIT_RESULTS = 1,
+ COMMIT_RESULTS_HIGH_PRIORITY = 2,
+ DISCARD_PREVIOUS = 3,
+}
+
+
+IDevice6_UUID :: "c70b221b-40e4-4a17-89af-025a0727a6dc"
+IDevice6 :: struct #raw_union {
+ #subtype id3d12device5: IDevice5,
+ using id3d12device6_vtable: ^IDevice6_VTable,
+}
+IDevice6_VTable :: struct {
+ using id3d12device5_vtable: IDevice5_VTable,
+ SetBackgroundProcessingMode: proc "stdcall" (this: ^IDevice6, Mode: BACKGROUND_PROCESSING_MODE, MeasurementsAction: MEASUREMENTS_ACTION, hEventToSignalUponCompletion: HANDLE, pbFurtherMeasurementsDesired: ^BOOL) -> HRESULT,
+}
+
+FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPE_COUNT :: struct {
+ NodeIndex: u32,
+ Count: u32,
+}
+
+FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPES :: struct {
+ NodeIndex: u32,
+ Count: u32,
+ pTypes: ^GUID,
+}
+
+PROTECTED_RESOURCE_SESSION_DESC1 :: struct {
+ NodeMask: u32,
+ Flags: PROTECTED_RESOURCE_SESSION_FLAGS,
+ ProtectionType: GUID,
+}
+
+
+IProtectedResourceSession1_UUID :: "D6F12DD6-76FB-406E-8961-4296EEFC0409"
+IProtectedResourceSession1 :: struct #raw_union {
+ #subtype id3d12protectedresourcesession: IProtectedResourceSession,
+ using id3d12protectedresourcesession1_vtable: ^IProtectedResourceSession1_VTable,
+}
+IProtectedResourceSession1_VTable :: struct {
+ using id3d12protectedresourcesession_vtable: IProtectedResourceSession_VTable,
+ GetDesc1: proc "stdcall" (this: ^IProtectedResourceSession1) -> PROTECTED_RESOURCE_SESSION_DESC1,
+}
+
+
+IDevice7_UUID :: "5c014b53-68a1-4b9b-8bd1-dd6046b9358b"
+IDevice7 :: struct #raw_union {
+ #subtype id3d12device6: IDevice6,
+ using id3d12device7_vtable: ^IDevice7_VTable,
+}
+IDevice7_VTable :: struct {
+ using id3d12device6_vtable: IDevice6_VTable,
+ AddToStateObject: proc "stdcall" (this: ^IDevice7, pAddition: ^STATE_OBJECT_DESC, pStateObjectToGrowFrom: ^IStateObject, riid: ^IID, ppNewStateObject: ^rawptr) -> HRESULT,
+ CreateProtectedResourceSession1: proc "stdcall" (this: ^IDevice7, pDesc: ^PROTECTED_RESOURCE_SESSION_DESC1, riid: ^IID, ppSession: ^rawptr) -> HRESULT,
+}
+
+
+IDevice8_UUID :: "9218E6BB-F944-4F7E-A75C-B1B2C7B701F3"
+IDevice8 :: struct #raw_union {
+ #subtype id3d12device7: IDevice7,
+ using id3d12device8_vtable: ^IDevice8_VTable,
+}
+IDevice8_VTable :: struct {
+ using id3d12device7_vtable: IDevice7_VTable,
+ GetResourceAllocationInfo2: proc "stdcall" (this: ^IDevice8, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC1, pResourceAllocationInfo1: ^RESOURCE_ALLOCATION_INFO1) -> RESOURCE_ALLOCATION_INFO,
+ CreateCommittedResource2: proc "stdcall" (this: ^IDevice8, pHeapProperties: ^HEAP_PROPERTIES, HeapFlags: HEAP_FLAGS, pDesc: ^RESOURCE_DESC1, InitialResourceState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, pProtectedSession: ^IProtectedResourceSession, riidResource: ^IID, ppvResource: ^rawptr) -> HRESULT,
+ CreatePlacedResource1: proc "stdcall" (this: ^IDevice8, pHeap: ^IHeap, HeapOffset: u64, pDesc: ^RESOURCE_DESC1, InitialState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, riid: ^IID, ppvResource: ^rawptr) -> HRESULT,
+ CreateSamplerFeedbackUnorderedAccessView: proc "stdcall" (this: ^IDevice8, pTargetedResource: ^IResource, pFeedbackResource: ^IResource, DestDescriptor: CPU_DESCRIPTOR_HANDLE),
+ GetCopyableFootprints1: proc "stdcall" (this: ^IDevice8, pResourceDesc: ^RESOURCE_DESC1, FirstSubresource: u32, NumSubresources: u32, BaseOffset: u64, pLayouts: ^PLACED_SUBRESOURCE_FOOTPRINT, pNumRows: ^u32, pRowSizeInBytes: ^u64, pTotalBytes: ^u64),
+}
+
+
+IResource1_UUID :: "9D5E227A-4430-4161-88B3-3ECA6BB16E19"
+IResource1 :: struct #raw_union {
+ #subtype id3d12resource: IResource,
+ using id3d12resource1_vtable: ^IResource1_VTable,
+}
+IResource1_VTable :: struct {
+ using id3d12resource_vtable: IResource_VTable,
+ GetProtectedResourceSession: proc "stdcall" (this: ^IResource1, riid: ^IID, ppProtectedSession: ^rawptr) -> HRESULT,
+}
+
+
+IResource2_UUID :: "BE36EC3B-EA85-4AEB-A45A-E9D76404A495"
+IResource2 :: struct #raw_union {
+ #subtype id3d12resource1: IResource1,
+ using id3d12resource2_vtable: ^IResource2_VTable,
+}
+IResource2_VTable :: struct {
+ using id3d12resource1_vtable: IResource1_VTable,
+ GetDesc1: proc "stdcall" (this: ^IResource2) -> RESOURCE_DESC1,
+}
+
+
+IHeap1_UUID :: "572F7389-2168-49E3-9693-D6DF5871BF6D"
+IHeap1 :: struct #raw_union {
+ #subtype id3d12heap: IHeap,
+ using id3d12heap1_vtable: ^IHeap1_VTable,
+}
+IHeap1_VTable :: struct {
+ using id3d12heap_vtable: IHeap_VTable,
+ GetProtectedResourceSession: proc "stdcall" (this: ^IHeap1, riid: ^IID, ppProtectedSession: ^rawptr) -> HRESULT,
+}
+
+
+IGraphicsCommandList3_UUID :: "6FDA83A7-B84C-4E38-9AC8-C7BD22016B3D"
+IGraphicsCommandList3 :: struct #raw_union {
+ #subtype id3d12graphicscommandlist2: IGraphicsCommandList2,
+ using id3d12graphicscommandlist3_vtable: ^IGraphicsCommandList3_VTable,
+}
+IGraphicsCommandList3_VTable :: struct {
+ using id3d12graphicscommandlist2_vtable: IGraphicsCommandList2_VTable,
+ SetProtectedResourceSession: proc "stdcall" (this: ^IGraphicsCommandList3, pProtectedResourceSession: ^IProtectedResourceSession),
+}
+
+RENDER_PASS_BEGINNING_ACCESS_TYPE :: enum i32 {
+ DISCARD = 0,
+ PRESERVE = 1,
+ CLEAR = 2,
+ NO_ACCESS = 3,
+}
+
+RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS :: struct {
+ ClearValue: CLEAR_VALUE,
+}
+
+RENDER_PASS_BEGINNING_ACCESS :: struct {
+ Type: RENDER_PASS_BEGINNING_ACCESS_TYPE,
+ using _: struct #raw_union {
+ Clear: RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS,
+ },
+}
+
+RENDER_PASS_ENDING_ACCESS_TYPE :: enum i32 {
+ DISCARD = 0,
+ PRESERVE = 1,
+ RESOLVE = 2,
+ NO_ACCESS = 3,
+}
+
+RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS :: struct {
+ SrcSubresource: u32,
+ DstSubresource: u32,
+ DstX: u32,
+ DstY: u32,
+ SrcRect: RECT,
+}
+
+RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS :: struct {
+ pSrcResource: ^IResource,
+ pDstResource: ^IResource,
+ SubresourceCount: u32,
+ pSubresourceParameters: ^RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS,
+ Format: dxgi.FORMAT,
+ ResolveMode: RESOLVE_MODE,
+ PreserveResolveSource: BOOL,
+}
+
+RENDER_PASS_ENDING_ACCESS :: struct {
+ Type: RENDER_PASS_ENDING_ACCESS_TYPE,
+ using _: struct #raw_union {
+ Resolve: RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS,
+ },
+}
+
+RENDER_PASS_RENDER_TARGET_DESC :: struct {
+ cpuDescriptor: CPU_DESCRIPTOR_HANDLE,
+ BeginningAccess: RENDER_PASS_BEGINNING_ACCESS,
+ EndingAccess: RENDER_PASS_ENDING_ACCESS,
+}
+
+RENDER_PASS_DEPTH_STENCIL_DESC :: struct {
+ cpuDescriptor: CPU_DESCRIPTOR_HANDLE,
+ DepthBeginningAccess: RENDER_PASS_BEGINNING_ACCESS,
+ StencilBeginningAccess: RENDER_PASS_BEGINNING_ACCESS,
+ DepthEndingAccess: RENDER_PASS_ENDING_ACCESS,
+ StencilEndingAccess: RENDER_PASS_ENDING_ACCESS,
+}
+
+RENDER_PASS_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ ALLOW_UAV_WRITES = 0x1,
+ SUSPENDING_PASS = 0x2,
+ RESUMING_PASS = 0x4,
+}
+
+
+IMetaCommand_UUID :: "DBB84C27-36CE-4FC9-B801-F048C46AC570"
+IMetaCommand :: struct #raw_union {
+ #subtype id3d12pageable: IPageable,
+ using id3d12metacommand_vtable: ^IMetaCommand_VTable,
+}
+IMetaCommand_VTable :: struct {
+ using id3d12devicechild_vtable: IDeviceChild_VTable,
+ GetRequiredParameterResourceSize: proc "stdcall" (this: ^IMetaCommand, Stage: META_COMMAND_PARAMETER_STAGE, ParameterIndex: u32) -> u64,
+}
+
+DISPATCH_RAYS_DESC :: struct {
+ RayGenerationShaderRecord: GPU_VIRTUAL_ADDRESS_RANGE,
+ MissShaderTable: GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE,
+ HitGroupTable: GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE,
+ CallableShaderTable: GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE,
+ Width: u32,
+ Height: u32,
+ Depth: u32,
+}
+
+
+IGraphicsCommandList4_UUID :: "8754318e-d3a9-4541-98cf-645b50dc4874"
+IGraphicsCommandList4 :: struct #raw_union {
+ #subtype id3d12graphicscommandlist3: IGraphicsCommandList3,
+ using id3d12graphicscommandlist4_vtable: ^IGraphicsCommandList4_VTable,
+}
+IGraphicsCommandList4_VTable :: struct {
+ using id3d12graphicscommandlist3_vtable: IGraphicsCommandList3_VTable,
+ BeginRenderPass: proc "stdcall" (this: ^IGraphicsCommandList4, NumRenderTargets: u32, pRenderTargets: ^RENDER_PASS_RENDER_TARGET_DESC, pDepthStencil: ^RENDER_PASS_DEPTH_STENCIL_DESC, Flags: RENDER_PASS_FLAGS),
+ EndRenderPass: proc "stdcall" (this: ^IGraphicsCommandList4),
+ InitializeMetaCommand: proc "stdcall" (this: ^IGraphicsCommandList4, pMetaCommand: ^IMetaCommand, pInitializationParametersData: rawptr, InitializationParametersDataSizeInBytes: SIZE_T),
+ ExecuteMetaCommand: proc "stdcall" (this: ^IGraphicsCommandList4, pMetaCommand: ^IMetaCommand, pExecutionParametersData: rawptr, ExecutionParametersDataSizeInBytes: SIZE_T),
+ BuildRaytracingAccelerationStructure: proc "stdcall" (this: ^IGraphicsCommandList4, pDesc: ^BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, NumPostbuildInfoDescs: u32, pPostbuildInfoDescs: ^RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC),
+ EmitRaytracingAccelerationStructurePostbuildInfo: proc "stdcall" (this: ^IGraphicsCommandList4, pDesc: ^RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, NumSourceAccelerationStructures: u32, pSourceAccelerationStructureData: ^GPU_VIRTUAL_ADDRESS),
+ CopyRaytracingAccelerationStructure: proc "stdcall" (this: ^IGraphicsCommandList4, DestAccelerationStructureData: GPU_VIRTUAL_ADDRESS, SourceAccelerationStructureData: GPU_VIRTUAL_ADDRESS, Mode: RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE),
+ SetPipelineState1: proc "stdcall" (this: ^IGraphicsCommandList4, pStateObject: ^IStateObject),
+ DispatchRays: proc "stdcall" (this: ^IGraphicsCommandList4, pDesc: ^DISPATCH_RAYS_DESC),
+}
+
+
+ITools_UUID :: "7071e1f0-e84b-4b33-974f-12fa49de65c5"
+ITools :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12tools_vtable: ^ITools_VTable,
+}
+ITools_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ EnableShaderInstrumentation: proc "stdcall" (this: ^ITools, bEnable: BOOL),
+ ShaderInstrumentationEnabled: proc "stdcall" (this: ^ITools) -> BOOL,
+}
+
+SUBRESOURCE_DATA :: struct {
+ pData: rawptr,
+ RowPitch: i64,
+ SlicePitch: i64,
+}
+
+MEMCPY_DEST :: struct {
+ pData: rawptr,
+ RowPitch: SIZE_T,
+ SlicePitch: SIZE_T,
+}
+
+
+IDebug_UUID :: "344488b7-6846-474b-b989-f027448245e0"
+IDebug :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12debug_vtable: ^IDebug_VTable,
+}
+IDebug_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ EnableDebugLayer: proc "stdcall" (this: ^IDebug),
+}
+
+GPU_BASED_VALIDATION_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ DISABLE_STATE_TRACKING = 0x1,
+}
+
+
+IDebug1_UUID :: "affaa4ca-63fe-4d8e-b8ad-159000af4304"
+IDebug1 :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12debug1_vtable: ^IDebug1_VTable,
+}
+IDebug1_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ EnableDebugLayer: proc "stdcall" (this: ^IDebug1),
+ SetEnableGPUBasedValidation: proc "stdcall" (this: ^IDebug1, Enable: BOOL),
+ SetEnableSynchronizedCommandQueueValidation: proc "stdcall" (this: ^IDebug1, Enable: BOOL),
+}
+
+
+IDebug2_UUID :: "93a665c4-a3b2-4e5d-b692-a26ae14e3374"
+IDebug2 :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12debug2_vtable: ^IDebug2_VTable,
+}
+IDebug2_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ SetGPUBasedValidationFlags: proc "stdcall" (this: ^IDebug2, Flags: GPU_BASED_VALIDATION_FLAGS),
+}
+
+
+IDebug3_UUID :: "5cf4e58f-f671-4ff1-a542-3686e3d153d1"
+IDebug3 :: struct #raw_union {
+ #subtype id3d12debug: IDebug,
+ using id3d12debug3_vtable: ^IDebug3_VTable,
+}
+IDebug3_VTable :: struct {
+ using id3d12debug_vtable: IDebug_VTable,
+ SetEnableGPUBasedValidation: proc "stdcall" (this: ^IDebug3, Enable: BOOL),
+ SetEnableSynchronizedCommandQueueValidation: proc "stdcall" (this: ^IDebug3, Enable: BOOL),
+ SetGPUBasedValidationFlags: proc "stdcall" (this: ^IDebug3, Flags: GPU_BASED_VALIDATION_FLAGS),
+}
+
+RLDO_FLAGS :: enum u32 { // TODO: make bit_set
+ NONE = 0x0,
+ SUMMARY = 0x1,
+ DETAIL = 0x2,
+ IGNORE_INTERNAL = 0x4,
+}
+
+DEBUG_DEVICE_PARAMETER_TYPE :: enum i32 {
+ FEATURE_FLAGS = 0,
+ GPU_BASED_VALIDATION_SETTINGS = 1,
+ GPU_SLOWDOWN_PERFORMANCE_FACTOR = 2,
+}
+
+DEBUG_FEATURE :: enum i32 { // TODO: make bit_set
+ NONE = 0,
+ ALLOW_BEHAVIOR_CHANGING_DEBUG_AIDS = 1,
+ CONSERVATIVE_RESOURCE_STATE_TRACKING = 2,
+ DISABLE_VIRTUALIZED_BUNDLES_VALIDATION = 4,
+ EMULATE_WINDOWS7 = 8,
+}
+
+GPU_BASED_VALIDATION_SHADER_PATCH_MODE :: enum i32 {
+ NONE = 0,
+ STATE_TRACKING_ONLY = 1,
+ UNGUARDED_VALIDATION = 2,
+ GUARDED_VALIDATION = 3,
+ NUM_GPU_BASED_VALIDATION_SHADER_PATCH_MODES = 4,
+}
+
+GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS :: enum u32 { // TODO: make bit_set
+ GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_NONE = 0x0,
+ GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_FRONT_LOAD_CREATE_TRACKING_ONLY_SHADERS = 0x1,
+ GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_FRONT_LOAD_CREATE_UNGUARDED_VALIDATION_SHADERS = 0x2,
+ GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_FRONT_LOAD_CREATE_GUARDED_VALIDATION_SHADERS = 0x4,
+ VALID_MASK = 0x7,
+}
+
+DEBUG_DEVICE_GPU_BASED_VALIDATION_SETTINGS :: struct {
+ MaxMessagesPerCommandList: u32,
+ DefaultShaderPatchMode: GPU_BASED_VALIDATION_SHADER_PATCH_MODE,
+ PipelineStateCreateFlags: GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS,
+}
+
+DEBUG_DEVICE_GPU_SLOWDOWN_PERFORMANCE_FACTOR :: struct {
+ SlowdownFactor: f32,
+}
+
+
+IDebugDevice1_UUID :: "a9b71770-d099-4a65-a698-3dee10020f88"
+IDebugDevice1 :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12debugdevice1_vtable: ^IDebugDevice1_VTable,
+}
+IDebugDevice1_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ SetDebugParameter: proc "stdcall" (this: ^IDebugDevice1, Type: DEBUG_DEVICE_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT,
+ GetDebugParameter: proc "stdcall" (this: ^IDebugDevice1, Type: DEBUG_DEVICE_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT,
+ ReportLiveDeviceObjects: proc "stdcall" (this: ^IDebugDevice1, Flags: RLDO_FLAGS) -> HRESULT,
+}
+
+
+IDebugDevice_UUID :: "3febd6dd-4973-4787-8194-e45f9e28923e"
+IDebugDevice :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12debugdevice_vtable: ^IDebugDevice_VTable,
+}
+IDebugDevice_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ SetFeatureMask: proc "stdcall" (this: ^IDebugDevice, Mask: DEBUG_FEATURE) -> HRESULT,
+ GetFeatureMask: proc "stdcall" (this: ^IDebugDevice) -> DEBUG_FEATURE,
+ ReportLiveDeviceObjects: proc "stdcall" (this: ^IDebugDevice, Flags: RLDO_FLAGS) -> HRESULT,
+}
+
+
+IDebugDevice2_UUID :: "60eccbc1-378d-4df1-894c-f8ac5ce4d7dd"
+IDebugDevice2 :: struct #raw_union {
+ #subtype id3d12debugdevice: IDebugDevice,
+ using id3d12debugdevice2_vtable: ^IDebugDevice2_VTable,
+}
+IDebugDevice2_VTable :: struct {
+ using id3d12debugdevice_vtable: IDebugDevice_VTable,
+ SetDebugParameter: proc "stdcall" (this: ^IDebugDevice2, Type: DEBUG_DEVICE_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT,
+ GetDebugParameter: proc "stdcall" (this: ^IDebugDevice2, Type: DEBUG_DEVICE_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT,
+}
+
+
+
+IDebugCommandQueue_UUID :: "09e0bf36-54ac-484f-8847-4baeeab6053a"
+IDebugCommandQueue :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12debugcommandqueue_vtable: ^IDebugCommandQueue_VTable,
+}
+IDebugCommandQueue_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ AssertResourceState: proc "stdcall" (this: ^IDebugCommandQueue, pResource: ^IResource, Subresource: u32, State: u32) -> BOOL,
+}
+
+DEBUG_COMMAND_LIST_PARAMETER_TYPE :: enum i32 {
+ DEBUG_COMMAND_LIST_PARAMETER_GPU_BASED_VALIDATION_SETTINGS = 0,
+}
+
+DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS :: struct {
+ ShaderPatchMode: GPU_BASED_VALIDATION_SHADER_PATCH_MODE,
+}
+
+
+IDebugCommandList1_UUID :: "102ca951-311b-4b01-b11f-ecb83e061b37"
+IDebugCommandList1 :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12debugcommandlist1_vtable: ^IDebugCommandList1_VTable,
+}
+IDebugCommandList1_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ AssertResourceState: proc "stdcall" (this: ^IDebugCommandList1, pResource: ^IResource, Subresource: u32, State: u32) -> BOOL,
+ SetDebugParameter: proc "stdcall" (this: ^IDebugCommandList1, Type: DEBUG_COMMAND_LIST_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT,
+ GetDebugParameter: proc "stdcall" (this: ^IDebugCommandList1, Type: DEBUG_COMMAND_LIST_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT,
+}
+
+
+IDebugCommandList_UUID :: "09e0bf36-54ac-484f-8847-4baeeab6053f"
+IDebugCommandList :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12debugcommandlist_vtable: ^IDebugCommandList_VTable,
+}
+IDebugCommandList_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ AssertResourceState: proc "stdcall" (this: ^IDebugCommandList, pResource: ^IResource, Subresource: u32, State: u32) -> BOOL,
+ SetFeatureMask: proc "stdcall" (this: ^IDebugCommandList, Mask: DEBUG_FEATURE) -> HRESULT,
+ GetFeatureMask: proc "stdcall" (this: ^IDebugCommandList) -> DEBUG_FEATURE,
+}
+
+
+IDebugCommandList2_UUID :: "aeb575cf-4e06-48be-ba3b-c450fc96652e"
+IDebugCommandList2 :: struct #raw_union {
+ #subtype id3d12debugcommandlist: IDebugCommandList,
+ using id3d12debugcommandlist2_vtable: ^IDebugCommandList2_VTable,
+}
+IDebugCommandList2_VTable :: struct {
+ using id3d12debugcommandlist_vtable: IDebugCommandList_VTable,
+ SetDebugParameter: proc "stdcall" (this: ^IDebugCommandList2, Type: DEBUG_COMMAND_LIST_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT,
+ GetDebugParameter: proc "stdcall" (this: ^IDebugCommandList2, Type: DEBUG_COMMAND_LIST_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT,
+}
+
+
+ISharingContract_UUID :: "0adf7d52-929c-4e61-addb-ffed30de66ef"
+ISharingContract :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12sharingcontract_vtable: ^ISharingContract_VTable,
+}
+ISharingContract_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ Present: proc "stdcall" (this: ^ISharingContract, pResource: ^IResource, Subresource: u32, window: HWND),
+ SharedFenceSignal: proc "stdcall" (this: ^ISharingContract, pFence: ^IFence, FenceValue: u64),
+ BeginCapturableWork: proc "stdcall" (this: ^ISharingContract, guid: ^GUID),
+ EndCapturableWork: proc "stdcall" (this: ^ISharingContract, guid: ^GUID),
+}
+
+MESSAGE_CATEGORY :: enum i32 {
+ APPLICATION_DEFINED = 0,
+ MISCELLANEOUS = 1,
+ INITIALIZATION = 2,
+ CLEANUP = 3,
+ COMPILATION = 4,
+ STATE_CREATION = 5,
+ STATE_SETTING = 6,
+ STATE_GETTING = 7,
+ RESOURCE_MANIPULATION = 8,
+ EXECUTION = 9,
+ SHADER = 10,
+}
+
+MESSAGE_SEVERITY :: enum i32 {
+ CORRUPTION = 0,
+ ERROR = 1,
+ WARNING = 2,
+ INFO = 3,
+ MESSAGE = 4,
+}
+
+MESSAGE_ID :: enum i32 {
+ UNKNOWN = 0,
+ STRING_FROM_APPLICATION = 1,
+ CORRUPTED_THIS = 2,
+ CORRUPTED_PARAMETER1 = 3,
+ CORRUPTED_PARAMETER2 = 4,
+ CORRUPTED_PARAMETER3 = 5,
+ CORRUPTED_PARAMETER4 = 6,
+ CORRUPTED_PARAMETER5 = 7,
+ CORRUPTED_PARAMETER6 = 8,
+ CORRUPTED_PARAMETER7 = 9,
+ CORRUPTED_PARAMETER8 = 10,
+ CORRUPTED_PARAMETER9 = 11,
+ CORRUPTED_PARAMETER10 = 12,
+ CORRUPTED_PARAMETER11 = 13,
+ CORRUPTED_PARAMETER12 = 14,
+ CORRUPTED_PARAMETER13 = 15,
+ CORRUPTED_PARAMETER14 = 16,
+ CORRUPTED_PARAMETER15 = 17,
+ CORRUPTED_MULTITHREADING = 18,
+ MESSAGE_REPORTING_OUTOFMEMORY = 19,
+ GETPRIVATEDATA_MOREDATA = 20,
+ SETPRIVATEDATA_INVALIDFREEDATA = 21,
+ SETPRIVATEDATA_CHANGINGPARAMS = 24,
+ SETPRIVATEDATA_OUTOFMEMORY = 25,
+ CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT = 26,
+ CREATESHADERRESOURCEVIEW_INVALIDDESC = 27,
+ CREATESHADERRESOURCEVIEW_INVALIDFORMAT = 28,
+ CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANESLICE = 29,
+ CREATESHADERRESOURCEVIEW_INVALIDPLANESLICE = 30,
+ CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS = 31,
+ CREATESHADERRESOURCEVIEW_INVALIDRESOURCE = 32,
+ CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT = 35,
+ CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT = 36,
+ CREATERENDERTARGETVIEW_INVALIDDESC = 37,
+ CREATERENDERTARGETVIEW_INVALIDFORMAT = 38,
+ CREATERENDERTARGETVIEW_INVALIDVIDEOPLANESLICE = 39,
+ CREATERENDERTARGETVIEW_INVALIDPLANESLICE = 40,
+ CREATERENDERTARGETVIEW_INVALIDDIMENSIONS = 41,
+ CREATERENDERTARGETVIEW_INVALIDRESOURCE = 42,
+ CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT = 45,
+ CREATEDEPTHSTENCILVIEW_INVALIDDESC = 46,
+ CREATEDEPTHSTENCILVIEW_INVALIDFORMAT = 47,
+ CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS = 48,
+ CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE = 49,
+ CREATEINPUTLAYOUT_OUTOFMEMORY = 52,
+ CREATEINPUTLAYOUT_TOOMANYELEMENTS = 53,
+ CREATEINPUTLAYOUT_INVALIDFORMAT = 54,
+ CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT = 55,
+ CREATEINPUTLAYOUT_INVALIDSLOT = 56,
+ CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS = 57,
+ CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH = 58,
+ CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE = 59,
+ CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE = 60,
+ CREATEINPUTLAYOUT_INVALIDALIGNMENT = 61,
+ CREATEINPUTLAYOUT_DUPLICATESEMANTIC = 62,
+ CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE = 63,
+ CREATEINPUTLAYOUT_NULLSEMANTIC = 64,
+ CREATEINPUTLAYOUT_MISSINGELEMENT = 65,
+ CREATEVERTEXSHADER_OUTOFMEMORY = 66,
+ CREATEVERTEXSHADER_INVALIDSHADERBYTECODE = 67,
+ CREATEVERTEXSHADER_INVALIDSHADERTYPE = 68,
+ CREATEGEOMETRYSHADER_OUTOFMEMORY = 69,
+ CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE = 70,
+ CREATEGEOMETRYSHADER_INVALIDSHADERTYPE = 71,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY = 72,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE = 73,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE = 74,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES = 75,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED = 76,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED = 79,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT = 80,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT = 81,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT = 82,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT = 83,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION = 84,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT = 85,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE = 86,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC = 87,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH = 88,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS = 89,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX = 90,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE = 91,
+ CREATEPIXELSHADER_OUTOFMEMORY = 92,
+ CREATEPIXELSHADER_INVALIDSHADERBYTECODE = 93,
+ CREATEPIXELSHADER_INVALIDSHADERTYPE = 94,
+ CREATERASTERIZERSTATE_INVALIDFILLMODE = 95,
+ CREATERASTERIZERSTATE_INVALIDCULLMODE = 96,
+ CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP = 97,
+ CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS = 98,
+ CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK = 100,
+ CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC = 101,
+ CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP = 102,
+ CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP = 103,
+ CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP = 104,
+ CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC = 105,
+ CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP = 106,
+ CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP = 107,
+ CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP = 108,
+ CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC = 109,
+ CREATEBLENDSTATE_INVALIDSRCBLEND = 111,
+ CREATEBLENDSTATE_INVALIDDESTBLEND = 112,
+ CREATEBLENDSTATE_INVALIDBLENDOP = 113,
+ CREATEBLENDSTATE_INVALIDSRCBLENDALPHA = 114,
+ CREATEBLENDSTATE_INVALIDDESTBLENDALPHA = 115,
+ CREATEBLENDSTATE_INVALIDBLENDOPALPHA = 116,
+ CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK = 117,
+ CLEARDEPTHSTENCILVIEW_INVALID = 135,
+ COMMAND_LIST_DRAW_ROOT_SIGNATURE_NOT_SET = 200,
+ COMMAND_LIST_DRAW_ROOT_SIGNATURE_MISMATCH = 201,
+ COMMAND_LIST_DRAW_VERTEX_BUFFER_NOT_SET = 202,
+ COMMAND_LIST_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL = 209,
+ COMMAND_LIST_DRAW_VERTEX_BUFFER_TOO_SMALL = 210,
+ COMMAND_LIST_DRAW_INDEX_BUFFER_NOT_SET = 211,
+ COMMAND_LIST_DRAW_INDEX_BUFFER_FORMAT_INVALID = 212,
+ COMMAND_LIST_DRAW_INDEX_BUFFER_TOO_SMALL = 213,
+ COMMAND_LIST_DRAW_INVALID_PRIMITIVETOPOLOGY = 219,
+ COMMAND_LIST_DRAW_VERTEX_STRIDE_UNALIGNED = 221,
+ COMMAND_LIST_DRAW_INDEX_OFFSET_UNALIGNED = 222,
+ DEVICE_REMOVAL_PROCESS_AT_FAULT = 232,
+ DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT = 233,
+ DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT = 234,
+ CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC = 239,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC = 240,
+ CREATEINPUTLAYOUT_TYPE_MISMATCH = 245,
+ CREATEINPUTLAYOUT_EMPTY_LAYOUT = 253,
+ LIVE_OBJECT_SUMMARY = 255,
+ LIVE_DEVICE = 274,
+ LIVE_SWAPCHAIN = 275,
+ CREATEDEPTHSTENCILVIEW_INVALIDFLAGS = 276,
+ CREATEVERTEXSHADER_INVALIDCLASSLINKAGE = 277,
+ CREATEGEOMETRYSHADER_INVALIDCLASSLINKAGE = 278,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAMTORASTERIZER = 280,
+ CREATEPIXELSHADER_INVALIDCLASSLINKAGE = 283,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAM = 284,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDENTRIES = 285,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTRIDES = 286,
+ CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTRIDES = 287,
+ CREATEHULLSHADER_OUTOFMEMORY = 289,
+ CREATEHULLSHADER_INVALIDSHADERBYTECODE = 290,
+ CREATEHULLSHADER_INVALIDSHADERTYPE = 291,
+ CREATEHULLSHADER_INVALIDCLASSLINKAGE = 292,
+ CREATEDOMAINSHADER_OUTOFMEMORY = 294,
+ CREATEDOMAINSHADER_INVALIDSHADERBYTECODE = 295,
+ CREATEDOMAINSHADER_INVALIDSHADERTYPE = 296,
+ CREATEDOMAINSHADER_INVALIDCLASSLINKAGE = 297,
+ RESOURCE_UNMAP_NOTMAPPED = 310,
+ DEVICE_CHECKFEATURESUPPORT_MISMATCHED_DATA_SIZE = 318,
+ CREATECOMPUTESHADER_OUTOFMEMORY = 321,
+ CREATECOMPUTESHADER_INVALIDSHADERBYTECODE = 322,
+ CREATECOMPUTESHADER_INVALIDCLASSLINKAGE = 323,
+ DEVICE_CREATEVERTEXSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 331,
+ DEVICE_CREATEHULLSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 332,
+ DEVICE_CREATEDOMAINSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 333,
+ DEVICE_CREATEGEOMETRYSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 334,
+ DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEFLOATOPSNOTSUPPORTED = 335,
+ DEVICE_CREATEPIXELSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 336,
+ DEVICE_CREATECOMPUTESHADER_DOUBLEFLOATOPSNOTSUPPORTED = 337,
+ CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE = 340,
+ CREATEUNORDEREDACCESSVIEW_INVALIDDESC = 341,
+ CREATEUNORDEREDACCESSVIEW_INVALIDFORMAT = 342,
+ CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANESLICE = 343,
+ CREATEUNORDEREDACCESSVIEW_INVALIDPLANESLICE = 344,
+ CREATEUNORDEREDACCESSVIEW_INVALIDDIMENSIONS = 345,
+ CREATEUNORDEREDACCESSVIEW_UNRECOGNIZEDFORMAT = 346,
+ CREATEUNORDEREDACCESSVIEW_INVALIDFLAGS = 354,
+ CREATERASTERIZERSTATE_INVALIDFORCEDSAMPLECOUNT = 401,
+ CREATEBLENDSTATE_INVALIDLOGICOPS = 403,
+ DEVICE_CREATEVERTEXSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 410,
+ DEVICE_CREATEHULLSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 412,
+ DEVICE_CREATEDOMAINSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 414,
+ DEVICE_CREATEGEOMETRYSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 416,
+ DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEEXTENSIONSNOTSUPPORTED = 418,
+ DEVICE_CREATEPIXELSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 420,
+ DEVICE_CREATECOMPUTESHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 422,
+ DEVICE_CREATEVERTEXSHADER_UAVSNOTSUPPORTED = 425,
+ DEVICE_CREATEHULLSHADER_UAVSNOTSUPPORTED = 426,
+ DEVICE_CREATEDOMAINSHADER_UAVSNOTSUPPORTED = 427,
+ DEVICE_CREATEGEOMETRYSHADER_UAVSNOTSUPPORTED = 428,
+ DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UAVSNOTSUPPORTED = 429,
+ DEVICE_CREATEPIXELSHADER_UAVSNOTSUPPORTED = 430,
+ DEVICE_CREATECOMPUTESHADER_UAVSNOTSUPPORTED = 431,
+ DEVICE_CLEARVIEW_INVALIDSOURCERECT = 447,
+ DEVICE_CLEARVIEW_EMPTYRECT = 448,
+ UPDATETILEMAPPINGS_INVALID_PARAMETER = 493,
+ COPYTILEMAPPINGS_INVALID_PARAMETER = 494,
+ CREATEDEVICE_INVALIDARGS = 506,
+ CREATEDEVICE_WARNING = 507,
+ RESOURCE_BARRIER_INVALID_TYPE = 519,
+ RESOURCE_BARRIER_NULL_POINTER = 520,
+ RESOURCE_BARRIER_INVALID_SUBRESOURCE = 521,
+ RESOURCE_BARRIER_RESERVED_BITS = 522,
+ RESOURCE_BARRIER_MISSING_BIND_FLAGS = 523,
+ RESOURCE_BARRIER_MISMATCHING_MISC_FLAGS = 524,
+ RESOURCE_BARRIER_MATCHING_STATES = 525,
+ RESOURCE_BARRIER_INVALID_COMBINATION = 526,
+ RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH = 527,
+ RESOURCE_BARRIER_INVALID_RESOURCE = 528,
+ RESOURCE_BARRIER_SAMPLE_COUNT = 529,
+ RESOURCE_BARRIER_INVALID_FLAGS = 530,
+ RESOURCE_BARRIER_INVALID_COMBINED_FLAGS = 531,
+ RESOURCE_BARRIER_INVALID_FLAGS_FOR_FORMAT = 532,
+ RESOURCE_BARRIER_INVALID_SPLIT_BARRIER = 533,
+ RESOURCE_BARRIER_UNMATCHED_END = 534,
+ RESOURCE_BARRIER_UNMATCHED_BEGIN = 535,
+ RESOURCE_BARRIER_INVALID_FLAG = 536,
+ RESOURCE_BARRIER_INVALID_COMMAND_LIST_TYPE = 537,
+ INVALID_SUBRESOURCE_STATE = 538,
+ COMMAND_ALLOCATOR_CONTENTION = 540,
+ COMMAND_ALLOCATOR_RESET = 541,
+ COMMAND_ALLOCATOR_RESET_BUNDLE = 542,
+ COMMAND_ALLOCATOR_CANNOT_RESET = 543,
+ COMMAND_LIST_OPEN = 544,
+ INVALID_BUNDLE_API = 546,
+ COMMAND_LIST_CLOSED = 547,
+ WRONG_COMMAND_ALLOCATOR_TYPE = 549,
+ COMMAND_ALLOCATOR_SYNC = 552,
+ COMMAND_LIST_SYNC = 553,
+ SET_DESCRIPTOR_HEAP_INVALID = 554,
+ CREATE_COMMANDQUEUE = 557,
+ CREATE_COMMANDALLOCATOR = 558,
+ CREATE_PIPELINESTATE = 559,
+ CREATE_COMMANDLIST12 = 560,
+ CREATE_RESOURCE = 562,
+ CREATE_DESCRIPTORHEAP = 563,
+ CREATE_ROOTSIGNATURE = 564,
+ CREATE_LIBRARY = 565,
+ CREATE_HEAP = 566,
+ CREATE_MONITOREDFENCE = 567,
+ CREATE_QUERYHEAP = 568,
+ CREATE_COMMANDSIGNATURE = 569,
+ LIVE_COMMANDQUEUE = 570,
+ LIVE_COMMANDALLOCATOR = 571,
+ LIVE_PIPELINESTATE = 572,
+ LIVE_COMMANDLIST12 = 573,
+ LIVE_RESOURCE = 575,
+ LIVE_DESCRIPTORHEAP = 576,
+ LIVE_ROOTSIGNATURE = 577,
+ LIVE_LIBRARY = 578,
+ LIVE_HEAP = 579,
+ LIVE_MONITOREDFENCE = 580,
+ LIVE_QUERYHEAP = 581,
+ LIVE_COMMANDSIGNATURE = 582,
+ DESTROY_COMMANDQUEUE = 583,
+ DESTROY_COMMANDALLOCATOR = 584,
+ DESTROY_PIPELINESTATE = 585,
+ DESTROY_COMMANDLIST12 = 586,
+ DESTROY_RESOURCE = 588,
+ DESTROY_DESCRIPTORHEAP = 589,
+ DESTROY_ROOTSIGNATURE = 590,
+ DESTROY_LIBRARY = 591,
+ DESTROY_HEAP = 592,
+ DESTROY_MONITOREDFENCE = 593,
+ DESTROY_QUERYHEAP = 594,
+ DESTROY_COMMANDSIGNATURE = 595,
+ CREATERESOURCE_INVALIDDIMENSIONS = 597,
+ CREATERESOURCE_INVALIDMISCFLAGS = 599,
+ CREATERESOURCE_INVALIDARG_RETURN = 602,
+ CREATERESOURCE_OUTOFMEMORY_RETURN = 603,
+ CREATERESOURCE_INVALIDDESC = 604,
+ POSSIBLY_INVALID_SUBRESOURCE_STATE = 607,
+ INVALID_USE_OF_NON_RESIDENT_RESOURCE = 608,
+ POSSIBLE_INVALID_USE_OF_NON_RESIDENT_RESOURCE = 609,
+ BUNDLE_PIPELINE_STATE_MISMATCH = 610,
+ PRIMITIVE_TOPOLOGY_MISMATCH_PIPELINE_STATE = 611,
+ RENDER_TARGET_FORMAT_MISMATCH_PIPELINE_STATE = 613,
+ RENDER_TARGET_SAMPLE_DESC_MISMATCH_PIPELINE_STATE = 614,
+ DEPTH_STENCIL_FORMAT_MISMATCH_PIPELINE_STATE = 615,
+ DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_PIPELINE_STATE = 616,
+ CREATESHADER_INVALIDBYTECODE = 622,
+ CREATEHEAP_NULLDESC = 623,
+ CREATEHEAP_INVALIDSIZE = 624,
+ CREATEHEAP_UNRECOGNIZEDHEAPTYPE = 625,
+ CREATEHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES = 626,
+ CREATEHEAP_UNRECOGNIZEDMEMORYPOOL = 627,
+ CREATEHEAP_INVALIDPROPERTIES = 628,
+ CREATEHEAP_INVALIDALIGNMENT = 629,
+ CREATEHEAP_UNRECOGNIZEDMISCFLAGS = 630,
+ CREATEHEAP_INVALIDMISCFLAGS = 631,
+ CREATEHEAP_INVALIDARG_RETURN = 632,
+ CREATEHEAP_OUTOFMEMORY_RETURN = 633,
+ CREATERESOURCEANDHEAP_NULLHEAPPROPERTIES = 634,
+ CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPTYPE = 635,
+ CREATERESOURCEANDHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES = 636,
+ CREATERESOURCEANDHEAP_UNRECOGNIZEDMEMORYPOOL = 637,
+ CREATERESOURCEANDHEAP_INVALIDHEAPPROPERTIES = 638,
+ CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPMISCFLAGS = 639,
+ CREATERESOURCEANDHEAP_INVALIDHEAPMISCFLAGS = 640,
+ CREATERESOURCEANDHEAP_INVALIDARG_RETURN = 641,
+ CREATERESOURCEANDHEAP_OUTOFMEMORY_RETURN = 642,
+ GETCUSTOMHEAPPROPERTIES_UNRECOGNIZEDHEAPTYPE = 643,
+ GETCUSTOMHEAPPROPERTIES_INVALIDHEAPTYPE = 644,
+ CREATE_DESCRIPTOR_HEAP_INVALID_DESC = 645,
+ INVALID_DESCRIPTOR_HANDLE = 646,
+ CREATERASTERIZERSTATE_INVALID_CONSERVATIVERASTERMODE = 647,
+ CREATE_CONSTANT_BUFFER_VIEW_INVALID_RESOURCE = 649,
+ CREATE_CONSTANT_BUFFER_VIEW_INVALID_DESC = 650,
+ CREATE_UNORDEREDACCESS_VIEW_INVALID_COUNTER_USAGE = 652,
+ COPY_DESCRIPTORS_INVALID_RANGES = 653,
+ COPY_DESCRIPTORS_WRITE_ONLY_DESCRIPTOR = 654,
+ CREATEGRAPHICSPIPELINESTATE_RTV_FORMAT_NOT_UNKNOWN = 655,
+ CREATEGRAPHICSPIPELINESTATE_INVALID_RENDER_TARGET_COUNT = 656,
+ CREATEGRAPHICSPIPELINESTATE_VERTEX_SHADER_NOT_SET = 657,
+ CREATEGRAPHICSPIPELINESTATE_INPUTLAYOUT_NOT_SET = 658,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_HS_DS_SIGNATURE_MISMATCH = 659,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERINDEX = 660,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_COMPONENTTYPE = 661,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERMASK = 662,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SYSTEMVALUE = 663,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = 664,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_MINPRECISION = 665,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = 666,
+ CREATEGRAPHICSPIPELINESTATE_HS_XOR_DS_MISMATCH = 667,
+ CREATEGRAPHICSPIPELINESTATE_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH = 668,
+ CREATEGRAPHICSPIPELINESTATE_HS_DS_CONTROL_POINT_COUNT_MISMATCH = 669,
+ CREATEGRAPHICSPIPELINESTATE_HS_DS_TESSELLATOR_DOMAIN_MISMATCH = 670,
+ CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = 671,
+ CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_FORCED_SAMPLE_COUNT = 672,
+ CREATEGRAPHICSPIPELINESTATE_INVALID_PRIMITIVETOPOLOGY = 673,
+ CREATEGRAPHICSPIPELINESTATE_INVALID_SYSTEMVALUE = 674,
+ CREATEGRAPHICSPIPELINESTATE_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = 675,
+ CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = 676,
+ CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_TYPE_MISMATCH = 677,
+ CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS = 678,
+ CREATEGRAPHICSPIPELINESTATE_RENDERTARGETVIEW_NOT_SET = 679,
+ CREATEGRAPHICSPIPELINESTATE_DEPTHSTENCILVIEW_NOT_SET = 680,
+ CREATEGRAPHICSPIPELINESTATE_GS_INPUT_PRIMITIVE_MISMATCH = 681,
+ CREATEGRAPHICSPIPELINESTATE_POSITION_NOT_PRESENT = 682,
+ CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE_FLAGS = 683,
+ CREATEGRAPHICSPIPELINESTATE_INVALID_INDEX_BUFFER_PROPERTIES = 684,
+ CREATEGRAPHICSPIPELINESTATE_INVALID_SAMPLE_DESC = 685,
+ CREATEGRAPHICSPIPELINESTATE_HS_ROOT_SIGNATURE_MISMATCH = 686,
+ CREATEGRAPHICSPIPELINESTATE_DS_ROOT_SIGNATURE_MISMATCH = 687,
+ CREATEGRAPHICSPIPELINESTATE_VS_ROOT_SIGNATURE_MISMATCH = 688,
+ CREATEGRAPHICSPIPELINESTATE_GS_ROOT_SIGNATURE_MISMATCH = 689,
+ CREATEGRAPHICSPIPELINESTATE_PS_ROOT_SIGNATURE_MISMATCH = 690,
+ CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE = 691,
+ EXECUTE_BUNDLE_OPEN_BUNDLE = 692,
+ EXECUTE_BUNDLE_DESCRIPTOR_HEAP_MISMATCH = 693,
+ EXECUTE_BUNDLE_TYPE = 694,
+ DRAW_EMPTY_SCISSOR_RECTANGLE = 695,
+ CREATE_ROOT_SIGNATURE_BLOB_NOT_FOUND = 696,
+ CREATE_ROOT_SIGNATURE_DESERIALIZE_FAILED = 697,
+ CREATE_ROOT_SIGNATURE_INVALID_CONFIGURATION = 698,
+ CREATE_ROOT_SIGNATURE_NOT_SUPPORTED_ON_DEVICE = 699,
+ CREATERESOURCEANDHEAP_NULLRESOURCEPROPERTIES = 700,
+ CREATERESOURCEANDHEAP_NULLHEAP = 701,
+ GETRESOURCEALLOCATIONINFO_INVALIDRDESCS = 702,
+ MAKERESIDENT_NULLOBJECTARRAY = 703,
+ EVICT_NULLOBJECTARRAY = 705,
+ SET_DESCRIPTOR_TABLE_INVALID = 708,
+ SET_ROOT_CONSTANT_INVALID = 709,
+ SET_ROOT_CONSTANT_BUFFER_VIEW_INVALID = 710,
+ SET_ROOT_SHADER_RESOURCE_VIEW_INVALID = 711,
+ SET_ROOT_UNORDERED_ACCESS_VIEW_INVALID = 712,
+ SET_VERTEX_BUFFERS_INVALID_DESC = 713,
+ SET_INDEX_BUFFER_INVALID_DESC = 715,
+ SET_STREAM_OUTPUT_BUFFERS_INVALID_DESC = 717,
+ CREATERESOURCE_UNRECOGNIZEDDIMENSIONALITY = 718,
+ CREATERESOURCE_UNRECOGNIZEDLAYOUT = 719,
+ CREATERESOURCE_INVALIDDIMENSIONALITY = 720,
+ CREATERESOURCE_INVALIDALIGNMENT = 721,
+ CREATERESOURCE_INVALIDMIPLEVELS = 722,
+ CREATERESOURCE_INVALIDSAMPLEDESC = 723,
+ CREATERESOURCE_INVALIDLAYOUT = 724,
+ SET_INDEX_BUFFER_INVALID = 725,
+ SET_VERTEX_BUFFERS_INVALID = 726,
+ SET_STREAM_OUTPUT_BUFFERS_INVALID = 727,
+ SET_RENDER_TARGETS_INVALID = 728,
+ CREATEQUERY_HEAP_INVALID_PARAMETERS = 729,
+ BEGIN_END_QUERY_INVALID_PARAMETERS = 731,
+ CLOSE_COMMAND_LIST_OPEN_QUERY = 732,
+ RESOLVE_QUERY_DATA_INVALID_PARAMETERS = 733,
+ SET_PREDICATION_INVALID_PARAMETERS = 734,
+ TIMESTAMPS_NOT_SUPPORTED = 735,
+ CREATERESOURCE_UNRECOGNIZEDFORMAT = 737,
+ CREATERESOURCE_INVALIDFORMAT = 738,
+ GETCOPYABLEFOOTPRINTS_INVALIDSUBRESOURCERANGE = 739,
+ GETCOPYABLEFOOTPRINTS_INVALIDBASEOFFSET = 740,
+ GETCOPYABLELAYOUT_INVALIDSUBRESOURCERANGE = 739,
+ GETCOPYABLELAYOUT_INVALIDBASEOFFSET = 740,
+ RESOURCE_BARRIER_INVALID_HEAP = 741,
+ CREATE_SAMPLER_INVALID = 742,
+ CREATECOMMANDSIGNATURE_INVALID = 743,
+ EXECUTE_INDIRECT_INVALID_PARAMETERS = 744,
+ GETGPUVIRTUALADDRESS_INVALID_RESOURCE_DIMENSION = 745,
+ CREATERESOURCE_INVALIDCLEARVALUE = 815,
+ CREATERESOURCE_UNRECOGNIZEDCLEARVALUEFORMAT = 816,
+ CREATERESOURCE_INVALIDCLEARVALUEFORMAT = 817,
+ CREATERESOURCE_CLEARVALUEDENORMFLUSH = 818,
+ CLEARRENDERTARGETVIEW_MISMATCHINGCLEARVALUE = 820,
+ CLEARDEPTHSTENCILVIEW_MISMATCHINGCLEARVALUE = 821,
+ MAP_INVALIDHEAP = 822,
+ UNMAP_INVALIDHEAP = 823,
+ MAP_INVALIDRESOURCE = 824,
+ UNMAP_INVALIDRESOURCE = 825,
+ MAP_INVALIDSUBRESOURCE = 826,
+ UNMAP_INVALIDSUBRESOURCE = 827,
+ MAP_INVALIDRANGE = 828,
+ UNMAP_INVALIDRANGE = 829,
+ MAP_INVALIDDATAPOINTER = 832,
+ MAP_INVALIDARG_RETURN = 833,
+ MAP_OUTOFMEMORY_RETURN = 834,
+ EXECUTECOMMANDLISTS_BUNDLENOTSUPPORTED = 835,
+ EXECUTECOMMANDLISTS_COMMANDLISTMISMATCH = 836,
+ EXECUTECOMMANDLISTS_OPENCOMMANDLIST = 837,
+ EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST = 838,
+ COPYBUFFERREGION_NULLDST = 839,
+ COPYBUFFERREGION_INVALIDDSTRESOURCEDIMENSION = 840,
+ COPYBUFFERREGION_DSTRANGEOUTOFBOUNDS = 841,
+ COPYBUFFERREGION_NULLSRC = 842,
+ COPYBUFFERREGION_INVALIDSRCRESOURCEDIMENSION = 843,
+ COPYBUFFERREGION_SRCRANGEOUTOFBOUNDS = 844,
+ COPYBUFFERREGION_INVALIDCOPYFLAGS = 845,
+ COPYTEXTUREREGION_NULLDST = 846,
+ COPYTEXTUREREGION_UNRECOGNIZEDDSTTYPE = 847,
+ COPYTEXTUREREGION_INVALIDDSTRESOURCEDIMENSION = 848,
+ COPYTEXTUREREGION_INVALIDDSTRESOURCE = 849,
+ COPYTEXTUREREGION_INVALIDDSTSUBRESOURCE = 850,
+ COPYTEXTUREREGION_INVALIDDSTOFFSET = 851,
+ COPYTEXTUREREGION_UNRECOGNIZEDDSTFORMAT = 852,
+ COPYTEXTUREREGION_INVALIDDSTFORMAT = 853,
+ COPYTEXTUREREGION_INVALIDDSTDIMENSIONS = 854,
+ COPYTEXTUREREGION_INVALIDDSTROWPITCH = 855,
+ COPYTEXTUREREGION_INVALIDDSTPLACEMENT = 856,
+ COPYTEXTUREREGION_INVALIDDSTDSPLACEDFOOTPRINTFORMAT = 857,
+ COPYTEXTUREREGION_DSTREGIONOUTOFBOUNDS = 858,
+ COPYTEXTUREREGION_NULLSRC = 859,
+ COPYTEXTUREREGION_UNRECOGNIZEDSRCTYPE = 860,
+ COPYTEXTUREREGION_INVALIDSRCRESOURCEDIMENSION = 861,
+ COPYTEXTUREREGION_INVALIDSRCRESOURCE = 862,
+ COPYTEXTUREREGION_INVALIDSRCSUBRESOURCE = 863,
+ COPYTEXTUREREGION_INVALIDSRCOFFSET = 864,
+ COPYTEXTUREREGION_UNRECOGNIZEDSRCFORMAT = 865,
+ COPYTEXTUREREGION_INVALIDSRCFORMAT = 866,
+ COPYTEXTUREREGION_INVALIDSRCDIMENSIONS = 867,
+ COPYTEXTUREREGION_INVALIDSRCROWPITCH = 868,
+ COPYTEXTUREREGION_INVALIDSRCPLACEMENT = 869,
+ COPYTEXTUREREGION_INVALIDSRCDSPLACEDFOOTPRINTFORMAT = 870,
+ COPYTEXTUREREGION_SRCREGIONOUTOFBOUNDS = 871,
+ COPYTEXTUREREGION_INVALIDDSTCOORDINATES = 872,
+ COPYTEXTUREREGION_INVALIDSRCBOX = 873,
+ COPYTEXTUREREGION_FORMATMISMATCH = 874,
+ COPYTEXTUREREGION_EMPTYBOX = 875,
+ COPYTEXTUREREGION_INVALIDCOPYFLAGS = 876,
+ RESOLVESUBRESOURCE_INVALID_SUBRESOURCE_INDEX = 877,
+ RESOLVESUBRESOURCE_INVALID_FORMAT = 878,
+ RESOLVESUBRESOURCE_RESOURCE_MISMATCH = 879,
+ RESOLVESUBRESOURCE_INVALID_SAMPLE_COUNT = 880,
+ CREATECOMPUTEPIPELINESTATE_INVALID_SHADER = 881,
+ CREATECOMPUTEPIPELINESTATE_CS_ROOT_SIGNATURE_MISMATCH = 882,
+ CREATECOMPUTEPIPELINESTATE_MISSING_ROOT_SIGNATURE = 883,
+ CREATEPIPELINESTATE_INVALIDCACHEDBLOB = 884,
+ CREATEPIPELINESTATE_CACHEDBLOBADAPTERMISMATCH = 885,
+ CREATEPIPELINESTATE_CACHEDBLOBDRIVERVERSIONMISMATCH = 886,
+ CREATEPIPELINESTATE_CACHEDBLOBDESCMISMATCH = 887,
+ CREATEPIPELINESTATE_CACHEDBLOBIGNORED = 888,
+ WRITETOSUBRESOURCE_INVALIDHEAP = 889,
+ WRITETOSUBRESOURCE_INVALIDRESOURCE = 890,
+ WRITETOSUBRESOURCE_INVALIDBOX = 891,
+ WRITETOSUBRESOURCE_INVALIDSUBRESOURCE = 892,
+ WRITETOSUBRESOURCE_EMPTYBOX = 893,
+ READFROMSUBRESOURCE_INVALIDHEAP = 894,
+ READFROMSUBRESOURCE_INVALIDRESOURCE = 895,
+ READFROMSUBRESOURCE_INVALIDBOX = 896,
+ READFROMSUBRESOURCE_INVALIDSUBRESOURCE = 897,
+ READFROMSUBRESOURCE_EMPTYBOX = 898,
+ TOO_MANY_NODES_SPECIFIED = 899,
+ INVALID_NODE_INDEX = 900,
+ GETHEAPPROPERTIES_INVALIDRESOURCE = 901,
+ NODE_MASK_MISMATCH = 902,
+ COMMAND_LIST_OUTOFMEMORY = 903,
+ COMMAND_LIST_MULTIPLE_SWAPCHAIN_BUFFER_REFERENCES = 904,
+ COMMAND_LIST_TOO_MANY_SWAPCHAIN_REFERENCES = 905,
+ COMMAND_QUEUE_TOO_MANY_SWAPCHAIN_REFERENCES = 906,
+ EXECUTECOMMANDLISTS_WRONGSWAPCHAINBUFFERREFERENCE = 907,
+ COMMAND_LIST_SETRENDERTARGETS_INVALIDNUMRENDERTARGETS = 908,
+ CREATE_QUEUE_INVALID_TYPE = 909,
+ CREATE_QUEUE_INVALID_FLAGS = 910,
+ CREATESHAREDRESOURCE_INVALIDFLAGS = 911,
+ CREATESHAREDRESOURCE_INVALIDFORMAT = 912,
+ CREATESHAREDHEAP_INVALIDFLAGS = 913,
+ REFLECTSHAREDPROPERTIES_UNRECOGNIZEDPROPERTIES = 914,
+ REFLECTSHAREDPROPERTIES_INVALIDSIZE = 915,
+ REFLECTSHAREDPROPERTIES_INVALIDOBJECT = 916,
+ KEYEDMUTEX_INVALIDOBJECT = 917,
+ KEYEDMUTEX_INVALIDKEY = 918,
+ KEYEDMUTEX_WRONGSTATE = 919,
+ CREATE_QUEUE_INVALID_PRIORITY = 920,
+ OBJECT_DELETED_WHILE_STILL_IN_USE = 921,
+ CREATEPIPELINESTATE_INVALID_FLAGS = 922,
+ HEAP_ADDRESS_RANGE_HAS_NO_RESOURCE = 923,
+ COMMAND_LIST_DRAW_RENDER_TARGET_DELETED = 924,
+ CREATEGRAPHICSPIPELINESTATE_ALL_RENDER_TARGETS_HAVE_UNKNOWN_FORMAT = 925,
+ HEAP_ADDRESS_RANGE_INTERSECTS_MULTIPLE_BUFFERS = 926,
+ EXECUTECOMMANDLISTS_GPU_WRITTEN_READBACK_RESOURCE_MAPPED = 927,
+ UNMAP_RANGE_NOT_EMPTY = 929,
+ MAP_INVALID_NULLRANGE = 930,
+ UNMAP_INVALID_NULLRANGE = 931,
+ NO_GRAPHICS_API_SUPPORT = 932,
+ NO_COMPUTE_API_SUPPORT = 933,
+ RESOLVESUBRESOURCE_RESOURCE_FLAGS_NOT_SUPPORTED = 934,
+ GPU_BASED_VALIDATION_ROOT_ARGUMENT_UNINITIALIZED = 935,
+ GPU_BASED_VALIDATION_DESCRIPTOR_HEAP_INDEX_OUT_OF_BOUNDS = 936,
+ GPU_BASED_VALIDATION_DESCRIPTOR_TABLE_REGISTER_INDEX_OUT_OF_BOUNDS = 937,
+ GPU_BASED_VALIDATION_DESCRIPTOR_UNINITIALIZED = 938,
+ GPU_BASED_VALIDATION_DESCRIPTOR_TYPE_MISMATCH = 939,
+ GPU_BASED_VALIDATION_SRV_RESOURCE_DIMENSION_MISMATCH = 940,
+ GPU_BASED_VALIDATION_UAV_RESOURCE_DIMENSION_MISMATCH = 941,
+ GPU_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE = 942,
+ COPYRESOURCE_NULLDST = 943,
+ COPYRESOURCE_INVALIDDSTRESOURCE = 944,
+ COPYRESOURCE_NULLSRC = 945,
+ COPYRESOURCE_INVALIDSRCRESOURCE = 946,
+ RESOLVESUBRESOURCE_NULLDST = 947,
+ RESOLVESUBRESOURCE_INVALIDDSTRESOURCE = 948,
+ RESOLVESUBRESOURCE_NULLSRC = 949,
+ RESOLVESUBRESOURCE_INVALIDSRCRESOURCE = 950,
+ PIPELINE_STATE_TYPE_MISMATCH = 951,
+ COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_NOT_SET = 952,
+ COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_MISMATCH = 953,
+ RESOURCE_BARRIER_ZERO_BARRIERS = 954,
+ BEGIN_END_EVENT_MISMATCH = 955,
+ RESOURCE_BARRIER_POSSIBLE_BEFORE_AFTER_MISMATCH = 956,
+ RESOURCE_BARRIER_MISMATCHING_BEGIN_END = 957,
+ GPU_BASED_VALIDATION_INVALID_RESOURCE = 958,
+ USE_OF_ZERO_REFCOUNT_OBJECT = 959,
+ OBJECT_EVICTED_WHILE_STILL_IN_USE = 960,
+ GPU_BASED_VALIDATION_ROOT_DESCRIPTOR_ACCESS_OUT_OF_BOUNDS = 961,
+ CREATEPIPELINELIBRARY_INVALIDLIBRARYBLOB = 962,
+ CREATEPIPELINELIBRARY_DRIVERVERSIONMISMATCH = 963,
+ CREATEPIPELINELIBRARY_ADAPTERVERSIONMISMATCH = 964,
+ CREATEPIPELINELIBRARY_UNSUPPORTED = 965,
+ CREATE_PIPELINELIBRARY = 966,
+ LIVE_PIPELINELIBRARY = 967,
+ DESTROY_PIPELINELIBRARY = 968,
+ STOREPIPELINE_NONAME = 969,
+ STOREPIPELINE_DUPLICATENAME = 970,
+ LOADPIPELINE_NAMENOTFOUND = 971,
+ LOADPIPELINE_INVALIDDESC = 972,
+ PIPELINELIBRARY_SERIALIZE_NOTENOUGHMEMORY = 973,
+ CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_RT_OUTPUT_MISMATCH = 974,
+ SETEVENTONMULTIPLEFENCECOMPLETION_INVALIDFLAGS = 975,
+ CREATE_QUEUE_VIDEO_NOT_SUPPORTED = 976,
+ CREATE_COMMAND_ALLOCATOR_VIDEO_NOT_SUPPORTED = 977,
+ CREATEQUERY_HEAP_VIDEO_DECODE_STATISTICS_NOT_SUPPORTED = 978,
+ CREATE_VIDEODECODECOMMANDLIST = 979,
+ CREATE_VIDEODECODER = 980,
+ CREATE_VIDEODECODESTREAM = 981,
+ LIVE_VIDEODECODECOMMANDLIST = 982,
+ LIVE_VIDEODECODER = 983,
+ LIVE_VIDEODECODESTREAM = 984,
+ DESTROY_VIDEODECODECOMMANDLIST = 985,
+ DESTROY_VIDEODECODER = 986,
+ DESTROY_VIDEODECODESTREAM = 987,
+ DECODE_FRAME_INVALID_PARAMETERS = 988,
+ DEPRECATED_API = 989,
+ RESOURCE_BARRIER_MISMATCHING_COMMAND_LIST_TYPE = 990,
+ COMMAND_LIST_DESCRIPTOR_TABLE_NOT_SET = 991,
+ COMMAND_LIST_ROOT_CONSTANT_BUFFER_VIEW_NOT_SET = 992,
+ COMMAND_LIST_ROOT_SHADER_RESOURCE_VIEW_NOT_SET = 993,
+ COMMAND_LIST_ROOT_UNORDERED_ACCESS_VIEW_NOT_SET = 994,
+ DISCARD_INVALID_SUBRESOURCE_RANGE = 995,
+ DISCARD_ONE_SUBRESOURCE_FOR_MIPS_WITH_RECTS = 996,
+ DISCARD_NO_RECTS_FOR_NON_TEXTURE2D = 997,
+ COPY_ON_SAME_SUBRESOURCE = 998,
+ SETRESIDENCYPRIORITY_INVALID_PAGEABLE = 999,
+ GPU_BASED_VALIDATION_UNSUPPORTED = 1000,
+ STATIC_DESCRIPTOR_INVALID_DESCRIPTOR_CHANGE = 1001,
+ DATA_STATIC_DESCRIPTOR_INVALID_DATA_CHANGE = 1002,
+ DATA_STATIC_WHILE_SET_AT_EXECUTE_DESCRIPTOR_INVALID_DATA_CHANGE = 1003,
+ EXECUTE_BUNDLE_STATIC_DESCRIPTOR_DATA_STATIC_NOT_SET = 1004,
+ GPU_BASED_VALIDATION_RESOURCE_ACCESS_OUT_OF_BOUNDS = 1005,
+ GPU_BASED_VALIDATION_SAMPLER_MODE_MISMATCH = 1006,
+ CREATE_FENCE_INVALID_FLAGS = 1007,
+ RESOURCE_BARRIER_DUPLICATE_SUBRESOURCE_TRANSITIONS = 1008,
+ SETRESIDENCYPRIORITY_INVALID_PRIORITY = 1009,
+ CREATE_DESCRIPTOR_HEAP_LARGE_NUM_DESCRIPTORS = 1013,
+ BEGIN_EVENT = 1014,
+ END_EVENT = 1015,
+ CREATEDEVICE_DEBUG_LAYER_STARTUP_OPTIONS = 1016,
+ CREATEDEPTHSTENCILSTATE_DEPTHBOUNDSTEST_UNSUPPORTED = 1017,
+ CREATEPIPELINESTATE_DUPLICATE_SUBOBJECT = 1018,
+ CREATEPIPELINESTATE_UNKNOWN_SUBOBJECT = 1019,
+ CREATEPIPELINESTATE_ZERO_SIZE_STREAM = 1020,
+ CREATEPIPELINESTATE_INVALID_STREAM = 1021,
+ CREATEPIPELINESTATE_CANNOT_DEDUCE_TYPE = 1022,
+ COMMAND_LIST_STATIC_DESCRIPTOR_RESOURCE_DIMENSION_MISMATCH = 1023,
+ CREATE_COMMAND_QUEUE_INSUFFICIENT_PRIVILEGE_FOR_GLOBAL_REALTIME = 1024,
+ CREATE_COMMAND_QUEUE_INSUFFICIENT_HARDWARE_SUPPORT_FOR_GLOBAL_REALTIME = 1025,
+ ATOMICCOPYBUFFER_INVALID_ARCHITECTURE = 1026,
+ ATOMICCOPYBUFFER_NULL_DST = 1027,
+ ATOMICCOPYBUFFER_INVALID_DST_RESOURCE_DIMENSION = 1028,
+ ATOMICCOPYBUFFER_DST_RANGE_OUT_OF_BOUNDS = 1029,
+ ATOMICCOPYBUFFER_NULL_SRC = 1030,
+ ATOMICCOPYBUFFER_INVALID_SRC_RESOURCE_DIMENSION = 1031,
+ ATOMICCOPYBUFFER_SRC_RANGE_OUT_OF_BOUNDS = 1032,
+ ATOMICCOPYBUFFER_INVALID_OFFSET_ALIGNMENT = 1033,
+ ATOMICCOPYBUFFER_NULL_DEPENDENT_RESOURCES = 1034,
+ ATOMICCOPYBUFFER_NULL_DEPENDENT_SUBRESOURCE_RANGES = 1035,
+ ATOMICCOPYBUFFER_INVALID_DEPENDENT_RESOURCE = 1036,
+ ATOMICCOPYBUFFER_INVALID_DEPENDENT_SUBRESOURCE_RANGE = 1037,
+ ATOMICCOPYBUFFER_DEPENDENT_SUBRESOURCE_OUT_OF_BOUNDS = 1038,
+ ATOMICCOPYBUFFER_DEPENDENT_RANGE_OUT_OF_BOUNDS = 1039,
+ ATOMICCOPYBUFFER_ZERO_DEPENDENCIES = 1040,
+ DEVICE_CREATE_SHARED_HANDLE_INVALIDARG = 1041,
+ DESCRIPTOR_HANDLE_WITH_INVALID_RESOURCE = 1042,
+ SETDEPTHBOUNDS_INVALIDARGS = 1043,
+ GPU_BASED_VALIDATION_RESOURCE_STATE_IMPRECISE = 1044,
+ COMMAND_LIST_PIPELINE_STATE_NOT_SET = 1045,
+ CREATEGRAPHICSPIPELINESTATE_SHADER_MODEL_MISMATCH = 1046,
+ OBJECT_ACCESSED_WHILE_STILL_IN_USE = 1047,
+ PROGRAMMABLE_MSAA_UNSUPPORTED = 1048,
+ SETSAMPLEPOSITIONS_INVALIDARGS = 1049,
+ RESOLVESUBRESOURCEREGION_INVALID_RECT = 1050,
+ CREATE_VIDEODECODECOMMANDQUEUE = 1051,
+ CREATE_VIDEOPROCESSCOMMANDLIST = 1052,
+ CREATE_VIDEOPROCESSCOMMANDQUEUE = 1053,
+ LIVE_VIDEODECODECOMMANDQUEUE = 1054,
+ LIVE_VIDEOPROCESSCOMMANDLIST = 1055,
+ LIVE_VIDEOPROCESSCOMMANDQUEUE = 1056,
+ DESTROY_VIDEODECODECOMMANDQUEUE = 1057,
+ DESTROY_VIDEOPROCESSCOMMANDLIST = 1058,
+ DESTROY_VIDEOPROCESSCOMMANDQUEUE = 1059,
+ CREATE_VIDEOPROCESSOR = 1060,
+ CREATE_VIDEOPROCESSSTREAM = 1061,
+ LIVE_VIDEOPROCESSOR = 1062,
+ LIVE_VIDEOPROCESSSTREAM = 1063,
+ DESTROY_VIDEOPROCESSOR = 1064,
+ DESTROY_VIDEOPROCESSSTREAM = 1065,
+ PROCESS_FRAME_INVALID_PARAMETERS = 1066,
+ COPY_INVALIDLAYOUT = 1067,
+ CREATE_CRYPTO_SESSION = 1068,
+ CREATE_CRYPTO_SESSION_POLICY = 1069,
+ CREATE_PROTECTED_RESOURCE_SESSION = 1070,
+ LIVE_CRYPTO_SESSION = 1071,
+ LIVE_CRYPTO_SESSION_POLICY = 1072,
+ LIVE_PROTECTED_RESOURCE_SESSION = 1073,
+ DESTROY_CRYPTO_SESSION = 1074,
+ DESTROY_CRYPTO_SESSION_POLICY = 1075,
+ DESTROY_PROTECTED_RESOURCE_SESSION = 1076,
+ PROTECTED_RESOURCE_SESSION_UNSUPPORTED = 1077,
+ FENCE_INVALIDOPERATION = 1078,
+ CREATEQUERY_HEAP_COPY_QUEUE_TIMESTAMPS_NOT_SUPPORTED = 1079,
+ SAMPLEPOSITIONS_MISMATCH_DEFERRED = 1080,
+ SAMPLEPOSITIONS_MISMATCH_RECORDTIME_ASSUMEDFROMFIRSTUSE = 1081,
+ SAMPLEPOSITIONS_MISMATCH_RECORDTIME_ASSUMEDFROMCLEAR = 1082,
+ CREATE_VIDEODECODERHEAP = 1083,
+ LIVE_VIDEODECODERHEAP = 1084,
+ DESTROY_VIDEODECODERHEAP = 1085,
+ OPENEXISTINGHEAP_INVALIDARG_RETURN = 1086,
+ OPENEXISTINGHEAP_OUTOFMEMORY_RETURN = 1087,
+ OPENEXISTINGHEAP_INVALIDADDRESS = 1088,
+ OPENEXISTINGHEAP_INVALIDHANDLE = 1089,
+ WRITEBUFFERIMMEDIATE_INVALID_DEST = 1090,
+ WRITEBUFFERIMMEDIATE_INVALID_MODE = 1091,
+ WRITEBUFFERIMMEDIATE_INVALID_ALIGNMENT = 1092,
+ WRITEBUFFERIMMEDIATE_NOT_SUPPORTED = 1093,
+ SETVIEWINSTANCEMASK_INVALIDARGS = 1094,
+ VIEW_INSTANCING_UNSUPPORTED = 1095,
+ VIEW_INSTANCING_INVALIDARGS = 1096,
+ COPYTEXTUREREGION_MISMATCH_DECODE_REFERENCE_ONLY_FLAG = 1097,
+ COPYRESOURCE_MISMATCH_DECODE_REFERENCE_ONLY_FLAG = 1098,
+ CREATE_VIDEO_DECODE_HEAP_CAPS_FAILURE = 1099,
+ CREATE_VIDEO_DECODE_HEAP_CAPS_UNSUPPORTED = 1100,
+ VIDEO_DECODE_SUPPORT_INVALID_INPUT = 1101,
+ CREATE_VIDEO_DECODER_UNSUPPORTED = 1102,
+ CREATEGRAPHICSPIPELINESTATE_METADATA_ERROR = 1103,
+ CREATEGRAPHICSPIPELINESTATE_VIEW_INSTANCING_VERTEX_SIZE_EXCEEDED = 1104,
+ CREATEGRAPHICSPIPELINESTATE_RUNTIME_INTERNAL_ERROR = 1105,
+ NO_VIDEO_API_SUPPORT = 1106,
+ VIDEO_PROCESS_SUPPORT_INVALID_INPUT = 1107,
+ CREATE_VIDEO_PROCESSOR_CAPS_FAILURE = 1108,
+ VIDEO_PROCESS_SUPPORT_UNSUPPORTED_FORMAT = 1109,
+ VIDEO_DECODE_FRAME_INVALID_ARGUMENT = 1110,
+ ENQUEUE_MAKE_RESIDENT_INVALID_FLAGS = 1111,
+ OPENEXISTINGHEAP_UNSUPPORTED = 1112,
+ VIDEO_PROCESS_FRAMES_INVALID_ARGUMENT = 1113,
+ VIDEO_DECODE_SUPPORT_UNSUPPORTED = 1114,
+ CREATE_COMMANDRECORDER = 1115,
+ LIVE_COMMANDRECORDER = 1116,
+ DESTROY_COMMANDRECORDER = 1117,
+ CREATE_COMMAND_RECORDER_VIDEO_NOT_SUPPORTED = 1118,
+ CREATE_COMMAND_RECORDER_INVALID_SUPPORT_FLAGS = 1119,
+ CREATE_COMMAND_RECORDER_INVALID_FLAGS = 1120,
+ CREATE_COMMAND_RECORDER_MORE_RECORDERS_THAN_LOGICAL_PROCESSORS = 1121,
+ CREATE_COMMANDPOOL = 1122,
+ LIVE_COMMANDPOOL = 1123,
+ DESTROY_COMMANDPOOL = 1124,
+ CREATE_COMMAND_POOL_INVALID_FLAGS = 1125,
+ CREATE_COMMAND_LIST_VIDEO_NOT_SUPPORTED = 1126,
+ COMMAND_RECORDER_SUPPORT_FLAGS_MISMATCH = 1127,
+ COMMAND_RECORDER_CONTENTION = 1128,
+ COMMAND_RECORDER_USAGE_WITH_CREATECOMMANDLIST_COMMAND_LIST = 1129,
+ COMMAND_ALLOCATOR_USAGE_WITH_CREATECOMMANDLIST1_COMMAND_LIST = 1130,
+ CANNOT_EXECUTE_EMPTY_COMMAND_LIST = 1131,
+ CANNOT_RESET_COMMAND_POOL_WITH_OPEN_COMMAND_LISTS = 1132,
+ CANNOT_USE_COMMAND_RECORDER_WITHOUT_CURRENT_TARGET = 1133,
+ CANNOT_CHANGE_COMMAND_RECORDER_TARGET_WHILE_RECORDING = 1134,
+ COMMAND_POOL_SYNC = 1135,
+ EVICT_UNDERFLOW = 1136,
+ CREATE_META_COMMAND = 1137,
+ LIVE_META_COMMAND = 1138,
+ DESTROY_META_COMMAND = 1139,
+ COPYBUFFERREGION_INVALID_DST_RESOURCE = 1140,
+ COPYBUFFERREGION_INVALID_SRC_RESOURCE = 1141,
+ ATOMICCOPYBUFFER_INVALID_DST_RESOURCE = 1142,
+ ATOMICCOPYBUFFER_INVALID_SRC_RESOURCE = 1143,
+ CREATEPLACEDRESOURCEONBUFFER_NULL_BUFFER = 1144,
+ CREATEPLACEDRESOURCEONBUFFER_NULL_RESOURCE_DESC = 1145,
+ CREATEPLACEDRESOURCEONBUFFER_UNSUPPORTED = 1146,
+ CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_DIMENSION = 1147,
+ CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_FLAGS = 1148,
+ CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_OFFSET = 1149,
+ CREATEPLACEDRESOURCEONBUFFER_INVALID_RESOURCE_DIMENSION = 1150,
+ CREATEPLACEDRESOURCEONBUFFER_INVALID_RESOURCE_FLAGS = 1151,
+ CREATEPLACEDRESOURCEONBUFFER_OUTOFMEMORY_RETURN = 1152,
+ CANNOT_CREATE_GRAPHICS_AND_VIDEO_COMMAND_RECORDER = 1153,
+ UPDATETILEMAPPINGS_POSSIBLY_MISMATCHING_PROPERTIES = 1154,
+ CREATE_COMMAND_LIST_INVALID_COMMAND_LIST_TYPE = 1155,
+ CLEARUNORDEREDACCESSVIEW_INCOMPATIBLE_WITH_STRUCTURED_BUFFERS = 1156,
+ COMPUTE_ONLY_DEVICE_OPERATION_UNSUPPORTED = 1157,
+ BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INVALID = 1158,
+ EMIT_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_INVALID = 1159,
+ COPY_RAYTRACING_ACCELERATION_STRUCTURE_INVALID = 1160,
+ DISPATCH_RAYS_INVALID = 1161,
+ GET_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO_INVALID = 1162,
+ CREATE_LIFETIMETRACKER = 1163,
+ LIVE_LIFETIMETRACKER = 1164,
+ DESTROY_LIFETIMETRACKER = 1165,
+ DESTROYOWNEDOBJECT_OBJECTNOTOWNED = 1166,
+ CREATE_TRACKEDWORKLOAD = 1167,
+ LIVE_TRACKEDWORKLOAD = 1168,
+ DESTROY_TRACKEDWORKLOAD = 1169,
+ RENDER_PASS_ERROR = 1170,
+ META_COMMAND_ID_INVALID = 1171,
+ META_COMMAND_UNSUPPORTED_PARAMS = 1172,
+ META_COMMAND_FAILED_ENUMERATION = 1173,
+ META_COMMAND_PARAMETER_SIZE_MISMATCH = 1174,
+ UNINITIALIZED_META_COMMAND = 1175,
+ META_COMMAND_INVALID_GPU_VIRTUAL_ADDRESS = 1176,
+ CREATE_VIDEOENCODECOMMANDLIST = 1177,
+ LIVE_VIDEOENCODECOMMANDLIST = 1178,
+ DESTROY_VIDEOENCODECOMMANDLIST = 1179,
+ CREATE_VIDEOENCODECOMMANDQUEUE = 1180,
+ LIVE_VIDEOENCODECOMMANDQUEUE = 1181,
+ DESTROY_VIDEOENCODECOMMANDQUEUE = 1182,
+ CREATE_VIDEOMOTIONESTIMATOR = 1183,
+ LIVE_VIDEOMOTIONESTIMATOR = 1184,
+ DESTROY_VIDEOMOTIONESTIMATOR = 1185,
+ CREATE_VIDEOMOTIONVECTORHEAP = 1186,
+ LIVE_VIDEOMOTIONVECTORHEAP = 1187,
+ DESTROY_VIDEOMOTIONVECTORHEAP = 1188,
+ MULTIPLE_TRACKED_WORKLOADS = 1189,
+ MULTIPLE_TRACKED_WORKLOAD_PAIRS = 1190,
+ OUT_OF_ORDER_TRACKED_WORKLOAD_PAIR = 1191,
+ CANNOT_ADD_TRACKED_WORKLOAD = 1192,
+ INCOMPLETE_TRACKED_WORKLOAD_PAIR = 1193,
+ CREATE_STATE_OBJECT_ERROR = 1194,
+ GET_SHADER_IDENTIFIER_ERROR = 1195,
+ GET_SHADER_STACK_SIZE_ERROR = 1196,
+ GET_PIPELINE_STACK_SIZE_ERROR = 1197,
+ SET_PIPELINE_STACK_SIZE_ERROR = 1198,
+ GET_SHADER_IDENTIFIER_SIZE_INVALID = 1199,
+ CHECK_DRIVER_MATCHING_IDENTIFIER_INVALID = 1200,
+ CHECK_DRIVER_MATCHING_IDENTIFIER_DRIVER_REPORTED_ISSUE = 1201,
+ RENDER_PASS_INVALID_RESOURCE_BARRIER = 1202,
+ RENDER_PASS_DISALLOWED_API_CALLED = 1203,
+ RENDER_PASS_CANNOT_NEST_RENDER_PASSES = 1204,
+ RENDER_PASS_CANNOT_END_WITHOUT_BEGIN = 1205,
+ RENDER_PASS_CANNOT_CLOSE_COMMAND_LIST = 1206,
+ RENDER_PASS_GPU_WORK_WHILE_SUSPENDED = 1207,
+ RENDER_PASS_MISMATCHING_SUSPEND_RESUME = 1208,
+ RENDER_PASS_NO_PRIOR_SUSPEND_WITHIN_EXECUTECOMMANDLISTS = 1209,
+ RENDER_PASS_NO_SUBSEQUENT_RESUME_WITHIN_EXECUTECOMMANDLISTS = 1210,
+ TRACKED_WORKLOAD_COMMAND_QUEUE_MISMATCH = 1211,
+ TRACKED_WORKLOAD_NOT_SUPPORTED = 1212,
+ RENDER_PASS_MISMATCHING_NO_ACCESS = 1213,
+ RENDER_PASS_UNSUPPORTED_RESOLVE = 1214,
+ CLEARUNORDEREDACCESSVIEW_INVALID_RESOURCE_PTR = 1215,
+ WINDOWS7_FENCE_OUTOFORDER_SIGNAL = 1216,
+ WINDOWS7_FENCE_OUTOFORDER_WAIT = 1217,
+ VIDEO_CREATE_MOTION_ESTIMATOR_INVALID_ARGUMENT = 1218,
+ VIDEO_CREATE_MOTION_VECTOR_HEAP_INVALID_ARGUMENT = 1219,
+ ESTIMATE_MOTION_INVALID_ARGUMENT = 1220,
+ RESOLVE_MOTION_VECTOR_HEAP_INVALID_ARGUMENT = 1221,
+ GETGPUVIRTUALADDRESS_INVALID_HEAP_TYPE = 1222,
+ SET_BACKGROUND_PROCESSING_MODE_INVALID_ARGUMENT = 1223,
+ CREATE_COMMAND_LIST_INVALID_COMMAND_LIST_TYPE_FOR_FEATURE_LEVEL = 1224,
+ CREATE_VIDEOEXTENSIONCOMMAND = 1225,
+ LIVE_VIDEOEXTENSIONCOMMAND = 1226,
+ DESTROY_VIDEOEXTENSIONCOMMAND = 1227,
+ INVALID_VIDEO_EXTENSION_COMMAND_ID = 1228,
+ VIDEO_EXTENSION_COMMAND_INVALID_ARGUMENT = 1229,
+ CREATE_ROOT_SIGNATURE_NOT_UNIQUE_IN_DXIL_LIBRARY = 1230,
+ VARIABLE_SHADING_RATE_NOT_ALLOWED_WITH_TIR = 1231,
+ GEOMETRY_SHADER_OUTPUTTING_BOTH_VIEWPORT_ARRAY_INDEX_AND_SHADING_RATE_NOT_SUPPORTED_ON_DEVICE = 1232,
+ RSSETSHADING_RATE_INVALID_SHADING_RATE = 1233,
+ RSSETSHADING_RATE_SHADING_RATE_NOT_PERMITTED_BY_CAP = 1234,
+ RSSETSHADING_RATE_INVALID_COMBINER = 1235,
+ RSSETSHADINGRATEIMAGE_REQUIRES_TIER_2 = 1236,
+ RSSETSHADINGRATE_REQUIRES_TIER_1 = 1237,
+ SHADING_RATE_IMAGE_INCORRECT_FORMAT = 1238,
+ SHADING_RATE_IMAGE_INCORRECT_ARRAY_SIZE = 1239,
+ SHADING_RATE_IMAGE_INCORRECT_MIP_LEVEL = 1240,
+ SHADING_RATE_IMAGE_INCORRECT_SAMPLE_COUNT = 1241,
+ SHADING_RATE_IMAGE_INCORRECT_SAMPLE_QUALITY = 1242,
+ NON_RETAIL_SHADER_MODEL_WONT_VALIDATE = 1243,
+ CREATEGRAPHICSPIPELINESTATE_AS_ROOT_SIGNATURE_MISMATCH = 1244,
+ CREATEGRAPHICSPIPELINESTATE_MS_ROOT_SIGNATURE_MISMATCH = 1245,
+ ADD_TO_STATE_OBJECT_ERROR = 1246,
+ CREATE_PROTECTED_RESOURCE_SESSION_INVALID_ARGUMENT = 1247,
+ CREATEGRAPHICSPIPELINESTATE_MS_PSO_DESC_MISMATCH = 1248,
+ CREATEPIPELINESTATE_MS_INCOMPLETE_TYPE = 1249,
+ CREATEGRAPHICSPIPELINESTATE_AS_NOT_MS_MISMATCH = 1250,
+ CREATEGRAPHICSPIPELINESTATE_MS_NOT_PS_MISMATCH = 1251,
+ NONZERO_SAMPLER_FEEDBACK_MIP_REGION_WITH_INCOMPATIBLE_FORMAT = 1252,
+ CREATEGRAPHICSPIPELINESTATE_INPUTLAYOUT_SHADER_MISMATCH = 1253,
+ EMPTY_DISPATCH = 1254,
+ RESOURCE_FORMAT_REQUIRES_SAMPLER_FEEDBACK_CAPABILITY = 1255,
+ SAMPLER_FEEDBACK_MAP_INVALID_MIP_REGION = 1256,
+ SAMPLER_FEEDBACK_MAP_INVALID_DIMENSION = 1257,
+ SAMPLER_FEEDBACK_MAP_INVALID_SAMPLE_COUNT = 1258,
+ SAMPLER_FEEDBACK_MAP_INVALID_SAMPLE_QUALITY = 1259,
+ SAMPLER_FEEDBACK_MAP_INVALID_LAYOUT = 1260,
+ SAMPLER_FEEDBACK_MAP_REQUIRES_UNORDERED_ACCESS_FLAG = 1261,
+ SAMPLER_FEEDBACK_CREATE_UAV_NULL_ARGUMENTS = 1262,
+ SAMPLER_FEEDBACK_UAV_REQUIRES_SAMPLER_FEEDBACK_CAPABILITY = 1263,
+ SAMPLER_FEEDBACK_CREATE_UAV_REQUIRES_FEEDBACK_MAP_FORMAT = 1264,
+ CREATEMESHSHADER_INVALIDSHADERBYTECODE = 1265,
+ CREATEMESHSHADER_OUTOFMEMORY = 1266,
+ CREATEMESHSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE = 1267,
+ RESOLVESUBRESOURCE_SAMPLER_FEEDBACK_TRANSCODE_INVALID_FORMAT = 1268,
+ RESOLVESUBRESOURCE_SAMPLER_FEEDBACK_INVALID_MIP_LEVEL_COUNT = 1269,
+ RESOLVESUBRESOURCE_SAMPLER_FEEDBACK_TRANSCODE_ARRAY_SIZE_MISMATCH = 1270,
+ SAMPLER_FEEDBACK_CREATE_UAV_MISMATCHING_TARGETED_RESOURCE = 1271,
+ CREATEMESHSHADER_OUTPUTEXCEEDSMAXSIZE = 1272,
+ CREATEMESHSHADER_GROUPSHAREDEXCEEDSMAXSIZE = 1273,
+ VERTEX_SHADER_OUTPUTTING_BOTH_VIEWPORT_ARRAY_INDEX_AND_SHADING_RATE_NOT_SUPPORTED_ON_DEVICE = 1274,
+ MESH_SHADER_OUTPUTTING_BOTH_VIEWPORT_ARRAY_INDEX_AND_SHADING_RATE_NOT_SUPPORTED_ON_DEVICE = 1275,
+ CREATEMESHSHADER_MISMATCHEDASMSPAYLOADSIZE = 1276,
+ CREATE_ROOT_SIGNATURE_UNBOUNDED_STATIC_DESCRIPTORS = 1277,
+ CREATEAMPLIFICATIONSHADER_INVALIDSHADERBYTECODE = 1278,
+ CREATEAMPLIFICATIONSHADER_OUTOFMEMORY = 1279,
+ MESSAGES_END = 1280,
+}
+
+MESSAGE :: struct {
+ Category: MESSAGE_CATEGORY,
+ Severity: MESSAGE_SEVERITY,
+ ID: MESSAGE_ID,
+ pDescription: cstring,
+ DescriptionByteLength: SIZE_T,
+}
+
+INFO_QUEUE_FILTER_DESC :: struct {
+ NumCategories: u32,
+ pCategoryList: ^MESSAGE_CATEGORY,
+ NumSeverities: u32,
+ pSeverityList: ^MESSAGE_SEVERITY,
+ NumIDs: u32,
+ pIDList: ^MESSAGE_ID,
+}
+
+INFO_QUEUE_FILTER :: struct {
+ AllowList: INFO_QUEUE_FILTER_DESC,
+ DenyList: INFO_QUEUE_FILTER_DESC,
+}
+
+
+IInfoQueue_UUID :: "0742a90b-c387-483f-b946-30a7e4e61458"
+IInfoQueue :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12infoqueue_vtable: ^IInfoQueue_VTable,
+}
+IInfoQueue_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ SetMessageCountLimit: proc "stdcall" (this: ^IInfoQueue, MessageCountLimit: u64) -> HRESULT,
+ ClearStoredMessages: proc "stdcall" (this: ^IInfoQueue),
+ GetMessageA: proc "stdcall" (this: ^IInfoQueue, MessageIndex: u64, pMessage: ^MESSAGE, pMessageByteLength: ^SIZE_T) -> HRESULT,
+ GetNumMessagesAllowedByStorageFilter: proc "stdcall" (this: ^IInfoQueue) -> u64,
+ GetNumMessagesDeniedByStorageFilter: proc "stdcall" (this: ^IInfoQueue) -> u64,
+ GetNumStoredMessages: proc "stdcall" (this: ^IInfoQueue) -> u64,
+ GetNumStoredMessagesAllowedByRetrievalFilter: proc "stdcall" (this: ^IInfoQueue) -> u64,
+ GetNumMessagesDiscardedByMessageCountLimit: proc "stdcall" (this: ^IInfoQueue) -> u64,
+ GetMessageCountLimit: proc "stdcall" (this: ^IInfoQueue) -> u64,
+ AddStorageFilterEntries: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT,
+ GetStorageFilter: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT,
+ ClearStorageFilter: proc "stdcall" (this: ^IInfoQueue),
+ PushEmptyStorageFilter: proc "stdcall" (this: ^IInfoQueue) -> HRESULT,
+ PushCopyOfStorageFilter: proc "stdcall" (this: ^IInfoQueue) -> HRESULT,
+ PushStorageFilter: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT,
+ PopStorageFilter: proc "stdcall" (this: ^IInfoQueue),
+ GetStorageFilterStackSize: proc "stdcall" (this: ^IInfoQueue) -> u32,
+ AddRetrievalFilterEntries: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT,
+ GetRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT,
+ ClearRetrievalFilter: proc "stdcall" (this: ^IInfoQueue),
+ PushEmptyRetrievalFilter: proc "stdcall" (this: ^IInfoQueue) -> HRESULT,
+ PushCopyOfRetrievalFilter: proc "stdcall" (this: ^IInfoQueue) -> HRESULT,
+ PushRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT,
+ PopRetrievalFilter: proc "stdcall" (this: ^IInfoQueue),
+ GetRetrievalFilterStackSize: proc "stdcall" (this: ^IInfoQueue) -> u32,
+ AddMessage: proc "stdcall" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY, Severity: MESSAGE_SEVERITY, ID: MESSAGE_ID, pDescription: cstring) -> HRESULT,
+ AddApplicationMessage: proc "stdcall" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY, pDescription: cstring) -> HRESULT,
+ SetBreakOnCategory: proc "stdcall" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY, bEnable: BOOL) -> HRESULT,
+ SetBreakOnSeverity: proc "stdcall" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY, bEnable: BOOL) -> HRESULT,
+ SetBreakOnID: proc "stdcall" (this: ^IInfoQueue, ID: MESSAGE_ID, bEnable: BOOL) -> HRESULT,
+ GetBreakOnCategory: proc "stdcall" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY) -> BOOL,
+ GetBreakOnSeverity: proc "stdcall" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY) -> BOOL,
+ GetBreakOnID: proc "stdcall" (this: ^IInfoQueue, ID: MESSAGE_ID) -> BOOL,
+ SetMuteDebugOutput: proc "stdcall" (this: ^IInfoQueue, bMute: BOOL),
+ GetMuteDebugOutput: proc "stdcall" (this: ^IInfoQueue) -> BOOL,
+}
+
+PFN_CREATE_DEVICE :: #type proc "c" (a0: ^IUnknown, a1: FEATURE_LEVEL, a2: ^IID, a3: ^rawptr) -> HRESULT
+PFN_GET_DEBUG_INTERFACE :: #type proc "c" (a0: ^IID, a1: ^rawptr) -> HRESULT
+
+AXIS_SHADING_RATE :: enum i32 {
+ _1X = 0,
+ _2X = 1,
+ _4X = 2,
+}
+
+SHADING_RATE :: enum i32 {
+ _1X1 = 0,
+ _1X2 = 1,
+ _2X1 = 4,
+ _2X2 = 5,
+ _2X4 = 6,
+ _4X2 = 9,
+ _4X4 = 10,
+}
+
+SHADING_RATE_COMBINER :: enum i32 {
+ PASSTHROUGH = 0,
+ OVERRIDE = 1,
+ MIN = 2,
+ MAX = 3,
+ SUM = 4,
+}
+
+
+IGraphicsCommandList5_UUID :: "55050859-4024-474c-87f5-6472eaee44ea"
+IGraphicsCommandList5 :: struct #raw_union {
+ #subtype id3d12graphicscommandlist4: IGraphicsCommandList4,
+ using id3d12graphicscommandlist5_vtable: ^IGraphicsCommandList5_VTable,
+}
+IGraphicsCommandList5_VTable :: struct {
+ using id3d12graphicscommandlist4_vtable: IGraphicsCommandList4_VTable,
+ RSSetShadingRate: proc "stdcall" (this: ^IGraphicsCommandList5, baseShadingRate: SHADING_RATE, combiners: ^SHADING_RATE_COMBINER),
+ RSSetShadingRateImage: proc "stdcall" (this: ^IGraphicsCommandList5, shadingRateImage: ^IResource),
+}
+
+DISPATCH_MESH_ARGUMENTS :: struct {
+ ThreadGroupCountX: u32,
+ ThreadGroupCountY: u32,
+ ThreadGroupCountZ: u32,
+}
+
+
+IGraphicsCommandList6_UUID :: "c3827890-e548-4cfa-96cf-5689a9370f80"
+IGraphicsCommandList6 :: struct #raw_union {
+ #subtype id3d12graphicscommandlist5: IGraphicsCommandList5,
+ using id3d12graphicscommandlist6_vtable: ^IGraphicsCommandList6_VTable,
+}
+IGraphicsCommandList6_VTable :: struct {
+ using id3d12graphicscommandlist5_vtable: IGraphicsCommandList5_VTable,
+ DispatchMesh: proc "stdcall" (this: ^IGraphicsCommandList6, ThreadGroupCountX: u32, ThreadGroupCountY: u32, ThreadGroupCountZ: u32),
+}
+
+SHADER_VERSION_TYPE :: enum i32 {
+ PIXEL_SHADER = 0,
+ VERTEX_SHADER = 1,
+ GEOMETRY_SHADER = 2,
+
+ HULL_SHADER = 3,
+ DOMAIN_SHADER = 4,
+ COMPUTE_SHADER = 5,
+
+ RESERVED0 = 65520,
+}
+
+SIGNATURE_PARAMETER_DESC :: struct {
+ SemanticName: cstring,
+ SemanticIndex: u32,
+ Register: u32,
+ SystemValueType: NAME,
+ ComponentType: REGISTER_COMPONENT_TYPE,
+ Mask: u8,
+
+ ReadWriteMask: u8,
+
+ Stream: u32,
+ MinPrecision: MIN_PRECISION,
+}
+
+SHADER_BUFFER_DESC :: struct {
+ Name: cstring,
+ Type: CBUFFER_TYPE,
+ Variables: u32,
+ Size: u32,
+ uFlags: u32,
+}
+
+SHADER_VARIABLE_DESC :: struct {
+ Name: cstring,
+ StartOffset: u32,
+ Size: u32,
+ uFlags: u32,
+ DefaultValue: rawptr,
+ StartTexture: u32,
+ TextureSize: u32,
+ StartSampler: u32,
+ SamplerSize: u32,
+}
+
+SHADER_TYPE_DESC :: struct {
+ Class: SHADER_VARIABLE_CLASS,
+ Type: SHADER_VARIABLE_TYPE,
+ Rows: u32,
+ Columns: u32,
+ Elements: u32,
+ Members: u32,
+ Offset: u32,
+ Name: cstring,
+}
+SHADER_DESC :: struct {
+ Version: u32,
+ Creator: cstring,
+ Flags: u32,
+
+ ConstantBuffers: u32,
+ BoundResources: u32,
+ InputParameters: u32,
+ OutputParameters: u32,
+
+ InstructionCount: u32,
+ TempRegisterCount: u32,
+ TempArrayCount: u32,
+ DefCount: u32,
+ DclCount: u32,
+ TextureNormalInstructions: u32,
+ TextureLoadInstructions: u32,
+ TextureCompInstructions: u32,
+ TextureBiasInstructions: u32,
+ TextureGradientInstructions: u32,
+ FloatInstructionCount: u32,
+ IntInstructionCount: u32,
+ UintInstructionCount: u32,
+ StaticFlowControlCount: u32,
+ DynamicFlowControlCount: u32,
+ MacroInstructionCount: u32,
+ ArrayInstructionCount: u32,
+ CutInstructionCount: u32,
+ EmitInstructionCount: u32,
+ GSOutputTopology: PRIMITIVE_TOPOLOGY,
+ GSMaxOutputVertexCount: u32,
+ InputPrimitive: PRIMITIVE,
+ PatchConstantParameters: u32,
+ cGSInstanceCount: u32,
+ cControlPoints: u32,
+ HSOutputPrimitive: TESSELLATOR_OUTPUT_PRIMITIVE,
+ HSPartitioning: TESSELLATOR_PARTITIONING,
+ TessellatorDomain: TESSELLATOR_DOMAIN,
+
+ cBarrierInstructions: u32,
+ cInterlockedInstructions: u32,
+ cTextureStoreInstructions: u32,
+}
+
+SHADER_INPUT_BIND_DESC :: struct {
+ Name: cstring,
+ Type: SHADER_INPUT_TYPE,
+ BindPoint: u32,
+ BindCount: u32,
+
+ uFlags: u32,
+ ReturnType: RESOURCE_RETURN_TYPE,
+ Dimension: SRV_DIMENSION,
+ NumSamples: u32,
+ Space: u32,
+ uID: u32,
+}
+
+LIBRARY_DESC :: struct {
+ Creator: cstring,
+ Flags: u32,
+ FunctionCount: u32,
+}
+
+FUNCTION_DESC :: struct {
+ Version: u32,
+ Creator: cstring,
+ Flags: u32,
+
+ ConstantBuffers: u32,
+ BoundResources: u32,
+
+ InstructionCount: u32,
+ TempRegisterCount: u32,
+ TempArrayCount: u32,
+ DefCount: u32,
+ DclCount: u32,
+ TextureNormalInstructions: u32,
+ TextureLoadInstructions: u32,
+ TextureCompInstructions: u32,
+ TextureBiasInstructions: u32,
+ TextureGradientInstructions: u32,
+ FloatInstructionCount: u32,
+ IntInstructionCount: u32,
+ UintInstructionCount: u32,
+ StaticFlowControlCount: u32,
+ DynamicFlowControlCount: u32,
+ MacroInstructionCount: u32,
+ ArrayInstructionCount: u32,
+ MovInstructionCount: u32,
+ MovcInstructionCount: u32,
+ ConversionInstructionCount: u32,
+ BitwiseInstructionCount: u32,
+ MinFeatureLevel: FEATURE_LEVEL,
+ RequiredFeatureFlags: u64,
+
+ Name: cstring,
+ FunctionParameterCount: i32,
+ HasReturn: BOOL,
+ Has10Level9VertexShader: BOOL,
+ Has10Level9PixelShader: BOOL,
+}
+
+PARAMETER_DESC :: struct {
+ Name: cstring,
+ SemanticName: cstring,
+ Type: SHADER_VARIABLE_TYPE,
+ Class: SHADER_VARIABLE_CLASS,
+ Rows: u32,
+ Columns: u32,
+ InterpolationMode: INTERPOLATION_MODE,
+ Flags: PARAMETER_FLAGS,
+
+ FirstInRegister: u32,
+ FirstInComponent: u32,
+ FirstOutRegister: u32,
+ FirstOutComponent: u32,
+}
+
+IShaderReflectionType :: struct {
+ vtable: ^IShaderReflectionType_VTable,
+}
+IShaderReflectionType_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IShaderReflectionType, pDesc: ^SHADER_TYPE_DESC) -> HRESULT,
+ GetMemberTypeByIndex: proc "stdcall" (this: ^IShaderReflectionType, Index: u32) -> ^IShaderReflectionType,
+ GetMemberTypeByName: proc "stdcall" (this: ^IShaderReflectionType, Name: cstring) -> ^IShaderReflectionType,
+ GetMemberTypeName: proc "stdcall" (this: ^IShaderReflectionType, Index: u32) -> cstring,
+ IsEqual: proc "stdcall" (this: ^IShaderReflectionType, pType: ^IShaderReflectionType) -> HRESULT,
+ GetSubType: proc "stdcall" (this: ^IShaderReflectionType) -> ^IShaderReflectionType,
+ GetBaseClass: proc "stdcall" (this: ^IShaderReflectionType) -> ^IShaderReflectionType,
+ GetNumInterfaces: proc "stdcall" (this: ^IShaderReflectionType) -> u32,
+ GetInterfaceByIndex: proc "stdcall" (this: ^IShaderReflectionType, uIndex: u32) -> ^IShaderReflectionType,
+ IsOfType: proc "stdcall" (this: ^IShaderReflectionType, pType: ^IShaderReflectionType) -> HRESULT,
+ ImplementsInterface: proc "stdcall" (this: ^IShaderReflectionType, pBase: ^IShaderReflectionType) -> HRESULT,
+}
+
+IShaderReflectionVariable :: struct {
+ vtable: ^IShaderReflectionVariable_VTable,
+}
+IShaderReflectionVariable_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IShaderReflectionVariable, pDesc: ^SHADER_VARIABLE_DESC) -> HRESULT,
+ GetType: proc "stdcall" (this: ^IShaderReflectionVariable) -> ^IShaderReflectionType,
+ GetBuffer: proc "stdcall" (this: ^IShaderReflectionVariable) -> ^IShaderReflectionConstantBuffer,
+ GetInterfaceSlot: proc "stdcall" (this: ^IShaderReflectionVariable, uArrayIndex: u32) -> u32,
+}
+
+IShaderReflectionConstantBuffer :: struct {
+ vtable: ^IShaderReflectionConstantBuffer_VTable,
+}
+IShaderReflectionConstantBuffer_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IShaderReflectionConstantBuffer, pDesc: ^SHADER_BUFFER_DESC) -> HRESULT,
+ GetVariableByIndex: proc "stdcall" (this: ^IShaderReflectionConstantBuffer, Index: u32) -> ^IShaderReflectionVariable,
+ GetVariableByName: proc "stdcall" (this: ^IShaderReflectionConstantBuffer, Name: cstring) -> ^IShaderReflectionVariable,
+}
+
+IShaderReflection :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12shaderreflection_vtable: ^IShaderReflection_VTable,
+}
+IShaderReflection_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetDesc: proc "stdcall" (this: ^IShaderReflection, pDesc: ^SHADER_DESC) -> HRESULT,
+ GetConstantBufferByIndex: proc "stdcall" (this: ^IShaderReflection, Index: u32) -> ^IShaderReflectionConstantBuffer,
+ GetConstantBufferByName: proc "stdcall" (this: ^IShaderReflection, Name: cstring) -> ^IShaderReflectionConstantBuffer,
+ GetResourceBindingDesc: proc "stdcall" (this: ^IShaderReflection, ResourceIndex: u32, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT,
+ GetInputParameterDesc: proc "stdcall" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT,
+ GetOutputParameterDesc: proc "stdcall" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT,
+ GetPatchConstantParameterDesc: proc "stdcall" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT,
+ GetVariableByName: proc "stdcall" (this: ^IShaderReflection, Name: cstring) -> ^IShaderReflectionVariable,
+ GetResourceBindingDescByName: proc "stdcall" (this: ^IShaderReflection, Name: cstring, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT,
+ GetMovInstructionCount: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetMovcInstructionCount: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetConversionInstructionCount: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetBitwiseInstructionCount: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetGSInputPrimitive: proc "stdcall" (this: ^IShaderReflection) -> PRIMITIVE,
+ IsSampleFrequencyShader: proc "stdcall" (this: ^IShaderReflection) -> BOOL,
+ GetNumInterfaceSlots: proc "stdcall" (this: ^IShaderReflection) -> u32,
+ GetMinFeatureLevel: proc "stdcall" (this: ^IShaderReflection, pLevel: ^FEATURE_LEVEL) -> HRESULT,
+ GetThreadGroupSize: proc "stdcall" (this: ^IShaderReflection, pSizeX: ^u32, pSizeY: ^u32, pSizeZ: ^u32) -> u32,
+ GetRequiresFlags: proc "stdcall" (this: ^IShaderReflection) -> u64,
+}
+
+ILibraryReflection :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d12libraryreflection_vtable: ^ILibraryReflection_VTable,
+}
+ILibraryReflection_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetDesc: proc "stdcall" (this: ^ILibraryReflection, pDesc: ^LIBRARY_DESC) -> HRESULT,
+ GetFunctionByIndex: proc "stdcall" (this: ^ILibraryReflection, FunctionIndex: i32) -> ^IFunctionReflection,
+}
+
+IFunctionReflection :: struct {
+ vtable: ^IFunctionReflection_VTable,
+}
+IFunctionReflection_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IFunctionReflection, pDesc: ^FUNCTION_DESC) -> HRESULT,
+ GetConstantBufferByIndex: proc "stdcall" (this: ^IFunctionReflection, BufferIndex: u32) -> ^IShaderReflectionConstantBuffer,
+ GetConstantBufferByName: proc "stdcall" (this: ^IFunctionReflection, Name: cstring) -> ^IShaderReflectionConstantBuffer,
+ GetResourceBindingDesc: proc "stdcall" (this: ^IFunctionReflection, ResourceIndex: u32, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT,
+ GetVariableByName: proc "stdcall" (this: ^IFunctionReflection, Name: cstring) -> ^IShaderReflectionVariable,
+ GetResourceBindingDescByName: proc "stdcall" (this: ^IFunctionReflection, Name: cstring, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT,
+ GetFunctionParameter: proc "stdcall" (this: ^IFunctionReflection, ParameterIndex: i32) -> ^IFunctionParameterReflection,
+}
+
+IFunctionParameterReflection :: struct {
+ vtable: ^IFunctionParameterReflection_VTable,
+}
+IFunctionParameterReflection_VTable :: struct {
+ GetDesc: proc "stdcall" (this: ^IFunctionParameterReflection, pDesc: ^PARAMETER_DESC) -> HRESULT,
+}
diff --git a/vendor/directx/d3d12/d3d12_constants.odin b/vendor/directx/d3d12/d3d12_constants.odin
new file mode 100644
index 000000000..3f83dca6b
--- /dev/null
+++ b/vendor/directx/d3d12/d3d12_constants.odin
@@ -0,0 +1,531 @@
+package directx_d3d12
+
+FL9_1_REQ_TEXTURE1D_U_DIMENSION :: 2048
+FL9_3_REQ_TEXTURE1D_U_DIMENSION :: 4096
+FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION :: 2048
+FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION :: 4096
+FL9_1_REQ_TEXTURECUBE_DIMENSION :: 512
+FL9_3_REQ_TEXTURECUBE_DIMENSION :: 4096
+FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION :: 256
+FL9_1_DEFAULT_MAX_ANISOTROPY :: 2
+FL9_1_IA_PRIMITIVE_MAX_COUNT :: 65535
+FL9_2_IA_PRIMITIVE_MAX_COUNT :: 1048575
+FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT :: 1
+FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT :: 4
+FL9_1_MAX_TEXTURE_REPEAT :: 128
+FL9_2_MAX_TEXTURE_REPEAT :: 2048
+FL9_3_MAX_TEXTURE_REPEAT :: 8192
+
+COMPONENT_MASK_X :: 1
+COMPONENT_MASK_Y :: 2
+COMPONENT_MASK_Z :: 4
+COMPONENT_MASK_W :: 8
+
+_16BIT_INDEX_STRIP_CUT_VALUE :: 0xffff
+_32BIT_INDEX_STRIP_CUT_VALUE :: 0xffffffff
+_8BIT_INDEX_STRIP_CUT_VALUE :: 0xff
+
+APPEND_ALIGNED_ELEMENT :: 0xffffffff
+ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT :: 9
+
+CLIP_OR_CULL_DISTANCE_COUNT :: 8
+CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT :: 2
+
+COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT :: 14
+COMMONSHADER_CONSTANT_BUFFER_COMPONENTS :: 4
+COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT :: 32
+COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT :: 15
+COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT :: 16
+COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS :: 4
+COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT :: 15
+COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST :: 1
+COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS :: 1
+COMMONSHADER_FLOWCONTROL_NESTING_LIMIT :: 64
+COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS :: 4
+COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT :: 1
+COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST :: 1
+COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS :: 1
+COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT :: 32
+COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS :: 1
+COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT :: 128
+COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST :: 1
+COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS :: 1
+COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT :: 128
+COMMONSHADER_SAMPLER_REGISTER_COMPONENTS :: 1
+COMMONSHADER_SAMPLER_REGISTER_COUNT :: 16
+COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST :: 1
+COMMONSHADER_SAMPLER_REGISTER_READ_PORTS :: 1
+COMMONSHADER_SAMPLER_SLOT_COUNT :: 16
+COMMONSHADER_SUBROUTINE_NESTING_LIMIT :: 32
+COMMONSHADER_TEMP_REGISTER_COMPONENTS :: 4
+COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT :: 32
+COMMONSHADER_TEMP_REGISTER_COUNT :: 4096
+COMMONSHADER_TEMP_REGISTER_READS_PER_INST :: 3
+COMMONSHADER_TEMP_REGISTER_READ_PORTS :: 3
+COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX :: 10
+COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN :: -10
+COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE :: -8
+COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE :: 7
+
+CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT :: 256
+
+CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 256
+CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP :: 64
+CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 240
+CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP :: 68
+CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 224
+CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP :: 72
+CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 208
+CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP :: 76
+CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 192
+CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP :: 84
+CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 176
+CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP :: 92
+CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 160
+CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP :: 100
+CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 144
+CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP :: 112
+CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 128
+CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP :: 128
+CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 112
+CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP :: 144
+CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 96
+CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP :: 168
+CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 80
+CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP :: 204
+CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 64
+CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP :: 256
+CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 48
+CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP :: 340
+CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 32
+CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP :: 512
+CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD :: 16
+CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP :: 768
+CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION :: 1
+CS_4_X_RAW_UAV_BYTE_ALIGNMENT :: 256
+CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP :: 768
+CS_4_X_THREAD_GROUP_MAX_X :: 768
+CS_4_X_THREAD_GROUP_MAX_Y :: 768
+CS_4_X_UAV_REGISTER_COUNT :: 1
+
+CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION :: 65535
+CS_TGSM_REGISTER_COUNT :: 8192
+CS_TGSM_REGISTER_READS_PER_INST :: 1
+CS_TGSM_RESOURCE_REGISTER_COMPONENTS :: 1
+CS_TGSM_RESOURCE_REGISTER_READ_PORTS :: 1
+CS_THREADGROUPID_REGISTER_COMPONENTS :: 3
+CS_THREADGROUPID_REGISTER_COUNT :: 1
+CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS :: 1
+CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT :: 1
+CS_THREADIDINGROUP_REGISTER_COMPONENTS :: 3
+CS_THREADIDINGROUP_REGISTER_COUNT :: 1
+CS_THREADID_REGISTER_COMPONENTS :: 3
+CS_THREADID_REGISTER_COUNT :: 1
+CS_THREAD_GROUP_MAX_THREADS_PER_GROUP :: 1024
+CS_THREAD_GROUP_MAX_X :: 1024
+CS_THREAD_GROUP_MAX_Y :: 1024
+CS_THREAD_GROUP_MAX_Z :: 64
+CS_THREAD_GROUP_MIN_X :: 1
+CS_THREAD_GROUP_MIN_Y :: 1
+CS_THREAD_GROUP_MIN_Z :: 1
+CS_THREAD_LOCAL_TEMP_REGISTER_POOL :: 16384
+
+DEFAULT_BLEND_FACTOR_ALPHA :: 1.0
+DEFAULT_BLEND_FACTOR_BLUE :: 1.0
+DEFAULT_BLEND_FACTOR_GREEN :: 1.0
+DEFAULT_BLEND_FACTOR_RED :: 1.0
+DEFAULT_BORDER_COLOR_COMPONENT :: 0.0
+DEFAULT_DEPTH_BIAS :: 0
+DEFAULT_DEPTH_BIAS_CLAMP :: 0.0
+DEFAULT_MAX_ANISOTROPY :: 16
+DEFAULT_MIP_LOD_BIAS :: 0.0
+DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT :: 4194304
+DEFAULT_RENDER_TARGET_ARRAY_INDEX :: 0
+
+DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT :: 65536
+DEFAULT_SAMPLE_MASK :: 0xffffffff
+DEFAULT_SCISSOR_ENDX :: 0
+DEFAULT_SCISSOR_ENDY :: 0
+DEFAULT_SCISSOR_STARTX :: 0
+DEFAULT_SCISSOR_STARTY :: 0
+DEFAULT_SLOPE_SCALED_DEPTH_BIAS :: 0.0
+DEFAULT_STENCIL_READ_MASK :: 0xff
+DEFAULT_STENCIL_REFERENCE :: 0
+DEFAULT_STENCIL_WRITE_MASK :: 0xff
+DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX :: 0
+DEFAULT_VIEWPORT_HEIGHT :: 0
+DEFAULT_VIEWPORT_MAX_DEPTH :: 0.0
+DEFAULT_VIEWPORT_MIN_DEPTH :: 0.0
+DEFAULT_VIEWPORT_TOPLEFTX :: 0
+DEFAULT_VIEWPORT_TOPLEFTY :: 0
+DEFAULT_VIEWPORT_WIDTH :: 0
+
+DESCRIPTOR_RANGE_OFFSET_APPEND :: 0xffffffff
+
+DRIVER_RESERVED_REGISTER_SPACE_VALUES_END :: 0xfffffff7
+DRIVER_RESERVED_REGISTER_SPACE_VALUES_START :: 0xfffffff0
+
+DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS :: 3968
+DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS :: 4
+DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_INPUT_CONTROL_POINT_REGISTER_COUNT :: 32
+DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST :: 2
+DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS :: 1
+DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS :: 3
+DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_INPUT_DOMAIN_POINT_REGISTER_COUNT :: 1
+DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST :: 2
+DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS :: 1
+DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS :: 4
+DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT :: 32
+DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST :: 2
+DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS :: 1
+DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS :: 1
+DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT :: 1
+DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST :: 2
+DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS :: 1
+DS_OUTPUT_REGISTER_COMPONENTS :: 4
+DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+DS_OUTPUT_REGISTER_COUNT :: 32
+
+FLOAT16_FUSED_TOLERANCE_IN_ULP :: 0.6
+FLOAT32_MAX :: 3.402823466e+38
+FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP :: 0.6
+FLOAT_TO_SRGB_EXPONENT_DENOMINATOR :: 2.4
+FLOAT_TO_SRGB_EXPONENT_NUMERATOR :: 1.0
+FLOAT_TO_SRGB_OFFSET :: 0.055
+FLOAT_TO_SRGB_SCALE_1 :: 12.92
+FLOAT_TO_SRGB_SCALE_2 :: 1.055
+FLOAT_TO_SRGB_THRESHOLD :: 0.0031308
+FTOI_INSTRUCTION_MAX_INPUT :: 2147483647.999
+FTOI_INSTRUCTION_MIN_INPUT :: -2147483648.999
+FTOU_INSTRUCTION_MAX_INPUT :: 4294967295.999
+FTOU_INSTRUCTION_MIN_INPUT :: 0.0
+
+GS_INPUT_INSTANCE_ID_READS_PER_INST :: 2
+GS_INPUT_INSTANCE_ID_READ_PORTS :: 1
+GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS :: 1
+GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+GS_INPUT_INSTANCE_ID_REGISTER_COUNT :: 1
+GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS :: 1
+GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT :: 32
+GS_INPUT_PRIM_CONST_REGISTER_COUNT :: 1
+GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST :: 2
+GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS :: 1
+GS_INPUT_REGISTER_COMPONENTS :: 4
+GS_INPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+GS_INPUT_REGISTER_COUNT :: 32
+GS_INPUT_REGISTER_READS_PER_INST :: 2
+GS_INPUT_REGISTER_READ_PORTS :: 1
+GS_INPUT_REGISTER_VERTICES :: 32
+GS_MAX_INSTANCE_COUNT :: 32
+GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES :: 1024
+GS_OUTPUT_ELEMENTS :: 32
+GS_OUTPUT_REGISTER_COMPONENTS :: 4
+GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+GS_OUTPUT_REGISTER_COUNT :: 32
+
+HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT :: 32
+HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT :: 32
+HS_CONTROL_POINT_REGISTER_COMPONENTS :: 4
+HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_CONTROL_POINT_REGISTER_READS_PER_INST :: 2
+HS_CONTROL_POINT_REGISTER_READ_PORTS :: 1
+HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND :: 0xffffffff
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS :: 1
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT :: 1
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST :: 2
+HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS :: 1
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS :: 1
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT :: 1
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST :: 2
+HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS :: 1
+HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS :: 1
+HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT :: 1
+HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST :: 2
+HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS :: 1
+HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND :: 0xffffffff
+HS_MAXTESSFACTOR_LOWER_BOUND :: 1.0
+HS_MAXTESSFACTOR_UPPER_BOUND :: 64.0
+HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS :: 3968
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS :: 1
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT :: 1
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST :: 2
+HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS :: 1
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS :: 4
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT :: 32
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT :: 32
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST :: 2
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS :: 1
+HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS :: 128
+
+IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES :: 0
+IA_DEFAULT_PRIMITIVE_TOPOLOGY :: 0
+IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES :: 0
+IA_INDEX_INPUT_RESOURCE_SLOT_COUNT :: 1
+IA_INSTANCE_ID_BIT_COUNT :: 32
+IA_INTEGER_ARITHMETIC_BIT_COUNT :: 32
+IA_PATCH_MAX_CONTROL_POINT_COUNT :: 32
+IA_PRIMITIVE_ID_BIT_COUNT :: 32
+IA_VERTEX_ID_BIT_COUNT :: 32
+IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT :: 32
+IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS :: 128
+IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT :: 32
+
+INTEGER_DIVIDE_BY_ZERO_QUOTIENT :: 0xffffffff
+INTEGER_DIVIDE_BY_ZERO_REMAINDER :: 0xffffffff
+
+KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL :: 0xffffffff
+KEEP_UNORDERED_ACCESS_VIEWS :: 0xffffffff
+
+LINEAR_GAMMA :: 1.0
+MAJOR_VERSION :: 12
+
+MAX_BORDER_COLOR_COMPONENT :: 1.0
+MAX_DEPTH :: 1.0
+MAX_LIVE_STATIC_SAMPLERS :: 2032
+MAX_MAXANISOTROPY :: 16
+MAX_MULTISAMPLE_SAMPLE_COUNT :: 32
+MAX_POSITION_VALUE :: 3.402823466e+34D3D12_MAX_ROOT_COST :: 64
+MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1 :: 1000000
+MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 :: 1000000
+MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE :: 2048
+MAX_TEXTURE_DIMENSION_2_TO_EXP :: 17
+MAX_VIEW_INSTANCE_COUNT :: 4
+
+MINOR_VERSION :: 0
+
+MIN_BORDER_COLOR_COMPONENT :: 0.0
+MIN_DEPTH :: 0.0
+MIN_MAXANISOTROPY :: 0
+
+MIP_LOD_BIAS_MAX :: 15.99
+MIP_LOD_BIAS_MIN :: -16.0
+MIP_LOD_FRACTIONAL_BIT_COUNT :: 8
+MIP_LOD_RANGE_BIT_COUNT :: 8
+
+MULTISAMPLE_ANTIALIAS_LINE_WIDTH :: 1.4
+NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT :: 0
+
+OS_RESERVED_REGISTER_SPACE_VALUES_END :: 0xffffffff
+OS_RESERVED_REGISTER_SPACE_VALUES_START :: 0xfffffff8
+
+PACKED_TILE :: 0xffffffff
+
+PIXEL_ADDRESS_RANGE_BIT_COUNT :: 15
+
+PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT :: 16
+
+PS_CS_UAV_REGISTER_COMPONENTS :: 1
+PS_CS_UAV_REGISTER_COUNT :: 8
+PS_CS_UAV_REGISTER_READS_PER_INST :: 1
+PS_CS_UAV_REGISTER_READ_PORTS :: 1
+PS_FRONTFACING_DEFAULT_VALUE :: 0xffffffff
+PS_FRONTFACING_FALSE_VALUE :: 0
+PS_FRONTFACING_TRUE_VALUE :: 0xffffffff
+PS_INPUT_REGISTER_COMPONENTS :: 4
+PS_INPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+PS_INPUT_REGISTER_COUNT :: 32
+PS_INPUT_REGISTER_READS_PER_INST :: 2
+PS_INPUT_REGISTER_READ_PORTS :: 1
+PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT :: 0.0
+PS_OUTPUT_DEPTH_REGISTER_COMPONENTS :: 1
+PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT :: 32
+PS_OUTPUT_DEPTH_REGISTER_COUNT :: 1
+PS_OUTPUT_MASK_REGISTER_COMPONENTS :: 1
+PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT :: 32
+PS_OUTPUT_MASK_REGISTER_COUNT :: 1
+PS_OUTPUT_REGISTER_COMPONENTS :: 4
+PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+PS_OUTPUT_REGISTER_COUNT :: 8
+PS_PIXEL_CENTER_FRACTIONAL_COMPONENT :: 0.5
+
+RAW_UAV_SRV_BYTE_ALIGNMENT :: 16
+
+RAYTRACING_AABB_BYTE_ALIGNMENT :: 8
+RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT :: 256
+RAYTRACING_INSTANCE_DESCS_BYTE_ALIGNMENT :: 16
+RAYTRACING_MAX_ATTRIBUTE_SIZE_IN_BYTES :: 32
+RAYTRACING_MAX_DECLARABLE_TRACE_RECURSION_DEPTH :: 31
+RAYTRACING_MAX_GEOMETRIES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE :: 16777216
+RAYTRACING_MAX_INSTANCES_PER_TOP_LEVEL_ACCELERATION_STRUCTURE :: 16777216
+RAYTRACING_MAX_PRIMITIVES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE :: 536870912
+RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS :: 1073741824
+RAYTRACING_MAX_SHADER_RECORD_STRIDE :: 4096
+RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT :: 32
+RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT :: 64
+RAYTRACING_TRANSFORM3X4_BYTE_ALIGNMENT :: 16
+
+REQ_BLEND_OBJECT_COUNT_PER_DEVICE :: 4096
+REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP :: 27
+REQ_CONSTANT_BUFFER_ELEMENT_COUNT :: 4096
+REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE :: 4096
+REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP :: 32
+REQ_DRAW_VERTEX_COUNT_2_TO_EXP :: 32
+REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION :: 16384
+REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT :: 1024
+REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT :: 4096
+REQ_MAXANISOTROPY :: 16
+REQ_MIP_LEVELS :: 15
+REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES :: 2048
+REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE :: 4096
+REQ_RENDER_TO_BUFFER_WINDOW_WIDTH :: 16384
+REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM :: 128
+REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM :: 0.25
+REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM :: 2048
+REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP :: 20
+REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE :: 4096
+REQ_SUBRESOURCES :: 30720
+REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION :: 2048
+REQ_TEXTURE1D_U_DIMENSION :: 16384
+REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION :: 2048
+REQ_TEXTURE2D_U_OR_V_DIMENSION :: 16384
+REQ_TEXTURE3D_U_V_OR_W_DIMENSION :: 2048
+REQ_TEXTURECUBE_DIMENSION :: 16384
+
+RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL :: 0
+
+RESOURCE_BARRIER_ALL_SUBRESOURCES :: 0xffffffff
+
+RS_SET_SHADING_RATE_COMBINER_COUNT :: 2
+
+SHADER_IDENTIFIER_SIZE_IN_BYTES :: 32
+SHADER_MAJOR_VERSION :: 5
+SHADER_MAX_INSTANCES :: 65535
+SHADER_MAX_INTERFACES :: 253
+SHADER_MAX_INTERFACE_CALL_SITES :: 4096
+SHADER_MAX_TYPES :: 65535
+SHADER_MINOR_VERSION :: 1
+
+SHIFT_INSTRUCTION_PAD_VALUE :: 0
+SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT :: 5
+
+SIMULTANEOUS_RENDER_TARGET_COUNT :: 8
+
+SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT :: 65536
+SMALL_RESOURCE_PLACEMENT_ALIGNMENT :: 4096
+
+SO_BUFFER_MAX_STRIDE_IN_BYTES :: 2048
+SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES :: 512
+SO_BUFFER_SLOT_COUNT :: 4
+SO_DDI_REGISTER_INDEX_DENOTING_GAP :: 0xffffffff
+SO_NO_RASTERIZED_STREAM :: 0xffffffff
+SO_OUTPUT_COMPONENT_COUNT :: 128
+SO_STREAM_COUNT :: 4
+
+SPEC_DATE_DAY :: 14
+SPEC_DATE_MONTH :: 11
+SPEC_DATE_YEAR :: 2014
+SPEC_VERSION :: 1.16
+
+SRGB_GAMMA :: 2.2
+SRGB_TO_FLOAT_DENOMINATOR_1 :: 12.92
+SRGB_TO_FLOAT_DENOMINATOR_2 :: 1.055
+SRGB_TO_FLOAT_EXPONENT :: 2.4
+SRGB_TO_FLOAT_OFFSET :: 0.055
+SRGB_TO_FLOAT_THRESHOLD :: 0.04045
+SRGB_TO_FLOAT_TOLERANCE_IN_ULP :: 0.5
+
+STANDARD_COMPONENT_BIT_COUNT :: 32
+STANDARD_COMPONENT_BIT_COUNT_DOUBLED :: 64
+STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE :: 4
+STANDARD_PIXEL_COMPONENT_COUNT :: 128
+STANDARD_PIXEL_ELEMENT_COUNT :: 32
+STANDARD_VECTOR_SIZE :: 4
+STANDARD_VERTEX_ELEMENT_COUNT :: 32
+STANDARD_VERTEX_TOTAL_COMPONENT_COUNT :: 64
+
+SUBPIXEL_FRACTIONAL_BIT_COUNT :: 8
+SUBTEXEL_FRACTIONAL_BIT_COUNT :: 8
+
+SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END :: 0xffffffff
+SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START :: 0xfffffff0
+
+TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR :: 64
+TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR :: 64
+TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR :: 63
+TESSELLATOR_MAX_TESSELLATION_FACTOR :: 64
+TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR :: 2
+TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR :: 1
+TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR :: 1
+
+TEXEL_ADDRESS_RANGE_BIT_COUNT :: 16
+
+TEXTURE_DATA_PITCH_ALIGNMENT :: 256
+TEXTURE_DATA_PLACEMENT_ALIGNMENT :: 512
+
+TILED_RESOURCE_TILE_SIZE_IN_BYTES :: 65536
+
+TRACKED_WORKLOAD_MAX_INSTANCES :: 32
+
+UAV_COUNTER_PLACEMENT_ALIGNMENT :: 4096
+UAV_SLOT_COUNT :: 64
+
+UNBOUND_MEMORY_ACCESS_RESULT :: 0
+
+VIDEO_DECODE_MAX_ARGUMENTS :: 10
+VIDEO_DECODE_MAX_HISTOGRAM_COMPONENTS :: 4
+VIDEO_DECODE_MIN_BITSTREAM_OFFSET_ALIGNMENT :: 256
+VIDEO_DECODE_MIN_HISTOGRAM_OFFSET_ALIGNMENT :: 256
+VIDEO_DECODE_STATUS_MACROBLOCKS_AFFECTED_UNKNOWN :: 0xffffffff
+VIDEO_PROCESS_MAX_FILTERS :: 32
+VIDEO_PROCESS_STEREO_VIEWS :: 2
+
+VIEWPORT_AND_SCISSORRECT_MAX_INDEX :: 15
+VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE :: 16
+VIEWPORT_BOUNDS_MAX :: 32767
+VIEWPORT_BOUNDS_MIN :: -32768
+
+VS_INPUT_REGISTER_COMPONENTS :: 4
+VS_INPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+VS_INPUT_REGISTER_COUNT :: 32
+VS_INPUT_REGISTER_READS_PER_INST :: 2
+VS_INPUT_REGISTER_READ_PORTS :: 1
+VS_OUTPUT_REGISTER_COMPONENTS :: 4
+VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT :: 32
+VS_OUTPUT_REGISTER_COUNT :: 32
+
+WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT :: 10
+WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP :: 25
+WHQL_DRAW_VERTEX_COUNT_2_TO_EXP :: 25
+
+SHADER_COMPONENT_MAPPING_MASK :: 0x7
+SHADER_COMPONENT_MAPPING_SHIFT :: 3
+
+FILTER_REDUCTION_TYPE_MASK :: 0x3
+FILTER_REDUCTION_TYPE_SHIFT :: 7
+FILTER_TYPE_MASK :: 0x3
+
+MIN_FILTER_SHIFT :: 4
+MAG_FILTER_SHIFT :: 2
+MIP_FILTER_SHIFT :: 0
+
+ANISOTROPIC_FILTERING_BIT :: 0x40
+
+INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT :: 1024
+
+SHADING_RATE_X_AXIS_SHIFT :: 2
+SHADING_RATE_VALID_MASK :: 3
+
+RETURN_PARAMETER_INDEX :: -1
+
+SHADER_REQUIRES_DOUBLES :: 0x00000001
+SHADER_REQUIRES_EARLY_DEPTH_STENCIL :: 0x00000002
+SHADER_REQUIRES_UAVS_AT_EVERY_STAGE :: 0x00000004
+SHADER_REQUIRES_64_UAVS :: 0x00000008
+SHADER_REQUIRES_MINIMUM_PRECISION :: 0x00000010
+SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS :: 0x00000020
+SHADER_REQUIRES_11_1_SHADER_EXTENSIONS :: 0x00000040
+SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING :: 0x00000080
+SHADER_REQUIRES_TILED_RESOURCES :: 0x00000100
+SHADER_REQUIRES_STENCIL_REF :: 0x00000200
+SHADER_REQUIRES_INNER_COVERAGE :: 0x00000400
+SHADER_REQUIRES_TYPED_UAV_LOAD_ADDITIONAL_FORMATS :: 0x00000800
+SHADER_REQUIRES_ROVS :: 0x00001000
+SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER :: 0x00002000
diff --git a/vendor/directx/d3d_compiler/d3d_compiler.odin b/vendor/directx/d3d_compiler/d3d_compiler.odin
new file mode 100644
index 000000000..2506f239c
--- /dev/null
+++ b/vendor/directx/d3d_compiler/d3d_compiler.odin
@@ -0,0 +1,228 @@
+package directx_d3d_compiler
+
+foreign import d3dcompiler "d3dcompiler_47.lib"
+
+D3DCOMPILER_DLL_A :: "d3dcompiler_47.dll"
+COMPILER_VERSION :: 47
+
+
+import "../dxgi"
+
+BOOL :: dxgi.BOOL
+IID :: dxgi.IID
+SIZE_T :: dxgi.SIZE_T
+HRESULT :: dxgi.HRESULT
+IUnknown :: dxgi.IUnknown
+IUnknown_VTable :: dxgi.IUnknown_VTable
+
+@(default_calling_convention="stdcall", link_prefix="D3D")
+foreign d3dcompiler {
+ ReadFileToBlob :: proc(pFileName: [^]u16, ppContents: ^^ID3DBlob) -> HRESULT ---
+ WriteBlobToFile :: proc(pBlob: ^ID3DBlob, pFileName: [^]u16, bOverwrite: BOOL) -> HRESULT ---
+ Compile :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, pSourceName: cstring, pDefines: ^SHADER_MACRO, pInclude: ^ID3DInclude, pEntrypoint: cstring, pTarget: cstring, Flags1: u32, Flags2: u32, ppCode: ^^ID3DBlob, ppErrorMsgs: ^^ID3DBlob) -> HRESULT ---
+ Compile2 :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, pSourceName: cstring, pDefines: ^SHADER_MACRO, pInclude: ^ID3DInclude, pEntrypoint: cstring, pTarget: cstring, Flags1: u32, Flags2: u32, SecondaryDataFlags: u32, pSecondaryData: rawptr, SecondaryDataSize: SIZE_T, ppCode: ^^ID3DBlob, ppErrorMsgs: ^^ID3DBlob) -> HRESULT ---
+ CompileFromFile :: proc(pFileName: [^]u16, pDefines: ^SHADER_MACRO, pInclude: ^ID3DInclude, pEntrypoint: cstring, pTarget: cstring, Flags1: u32, Flags2: u32, ppCode: ^^ID3DBlob, ppErrorMsgs: ^^ID3DBlob) -> HRESULT ---
+ Preprocess :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, pSourceName: cstring, pDefines: ^SHADER_MACRO, pInclude: ^ID3DInclude, ppCodeText: ^^ID3DBlob, ppErrorMsgs: ^^ID3DBlob) -> HRESULT ---
+ GetDebugInfo :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, ppDebugInfo: ^^ID3DBlob) -> HRESULT ---
+ Reflect :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, pInterface: ^IID, ppReflector: ^rawptr) -> HRESULT ---
+ ReflectLibrary :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, riid: ^IID, ppReflector: ^rawptr) -> HRESULT ---
+ Disassemble :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, Flags: u32, szComments: cstring, ppDisassembly: ^^ID3DBlob) -> HRESULT ---
+ DisassembleRegion :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, Flags: u32, szComments: cstring, StartByteOffset: SIZE_T, NumInsts: SIZE_T, pFinishByteOffset: ^SIZE_T, ppDisassembly: ^^ID3DBlob) -> HRESULT ---
+ CreateLinker :: proc(ppLinker: ^^ID3D11Linker) -> HRESULT ---
+ LoadModule :: proc(pSrcData: rawptr, cbSrcDataSize: SIZE_T, ppModule: ^^ID3D11Module) -> HRESULT ---
+ GetTraceInstructionOffsets :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, Flags: u32, StartInstIndex: SIZE_T, NumInsts: SIZE_T, pOffsets: ^SIZE_T, pTotalInsts: ^SIZE_T) -> HRESULT ---
+ GetInputSignatureBlob :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, ppSignatureBlob: ^^ID3DBlob) -> HRESULT ---
+ GetOutputSignatureBlob :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, ppSignatureBlob: ^^ID3DBlob) -> HRESULT ---
+ GetInputAndOutputSignatureBlob :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, ppSignatureBlob: ^^ID3DBlob) -> HRESULT ---
+ StripShader :: proc(pShaderBytecode: rawptr, BytecodeLength: SIZE_T, uStripFlags: u32, ppStrippedBlob: ^^ID3DBlob) -> HRESULT ---
+ GetBlobPart :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, Part: BLOB_PART, Flags: u32, ppPart: ^^ID3DBlob) -> HRESULT ---
+ SetBlobPart :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, Part: BLOB_PART, Flags: u32, pPart: rawptr, PartSize: SIZE_T, ppNewShader: ^^ID3DBlob) -> HRESULT ---
+ CreateBlob :: proc(Size: SIZE_T, ppBlob: ^^ID3DBlob) -> HRESULT ---
+ CompressShaders :: proc(uNumShaders: u32, pShaderData: ^SHADER_DATA, uFlags: u32, ppCompressedData: ^^ID3DBlob) -> HRESULT ---
+ DecompressShaders :: proc(pSrcData: rawptr, SrcDataSize: SIZE_T, uNumShaders: u32, uStartIndex: u32, pIndices: ^u32, uFlags: u32, ppShaders: ^^ID3DBlob, pTotalShaders: ^u32) -> HRESULT ---
+ Disassemble10Effect :: proc(pEffect: ^ID3D10Effect, Flags: u32, ppDisassembly: ^^ID3DBlob) -> HRESULT ---
+}
+
+
+
+D3DCOMPILE :: enum u32 { // TODO: make bit_field
+ DEBUG = 1 << 0,
+ SKIP_VALIDATION = 1 << 1,
+ SKIP_OPTIMIZATION = 1 << 2,
+ PACK_MATRIX_ROW_MAJOR = 1 << 3,
+ PACK_MATRIX_COLUMN_MAJOR = 1 << 4,
+ PARTIAL_PRECISION = 1 << 5,
+ FORCE_VS_SOFTWARE_NO_OPT = 1 << 6,
+ FORCE_PS_SOFTWARE_NO_OPT = 1 << 7,
+ NO_PRESHADER = 1 << 8,
+ AVOID_FLOW_CONTROL = 1 << 9,
+ PREFER_FLOW_CONTROL = 1 << 10,
+ ENABLE_STRICTNESS = 1 << 11,
+ ENABLE_BACKWARDS_COMPATIBILITY = 1 << 12,
+ IEEE_STRICTNESS = 1 << 13,
+ OPTIMIZATION_LEVEL0 = 1 << 14,
+ OPTIMIZATION_LEVEL1 = 0,
+ OPTIMIZATION_LEVEL2 = (1 << 14)|(1 << 15), // Added manually
+ OPTIMIZATION_LEVEL3 = 1 << 15,
+ RESERVED16 = 1 << 16,
+ RESERVED17 = 1 << 17,
+ WARNINGS_ARE_ERRORS = 1 << 18,
+ RESOURCES_MAY_ALIAS = 1 << 19,
+ ENABLE_UNBOUNDED_DESCRIPTOR_TABLES = 1 << 20,
+ ALL_RESOURCES_BOUND = 1 << 21,
+ DEBUG_NAME_FOR_SOURCE = 1 << 22,
+ DEBUG_NAME_FOR_BINARY = 1 << 23,
+}
+
+EFFECT :: enum u32 { // TODO: make bit_field
+ CHILD_EFFECT = 1 << 0,
+ ALLOW_SLOW_OPS = 1 << 1,
+}
+
+FLAGS2 :: enum u32 { // TODO: make bit_field
+ FORCE_ROOT_SIGNATURE_LATEST = 0,
+ FORCE_ROOT_SIGNATURE_1_0 = 1 << 4,
+ FORCE_ROOT_SIGNATURE_1_1 = 1 << 5,
+}
+
+SECDATA :: enum u32 { // TODO: make bit_field
+ MERGE_UAV_SLOTS = 0x00000001,
+ PRESERVE_TEMPLATE_SLOTS = 0x00000002,
+ REQUIRE_TEMPLATE_MATCH = 0x00000004,
+}
+
+DISASM_ENABLE_COLOR_CODE :: 0x00000001
+DISASM_ENABLE_DEFAULT_VALUE_PRINTS :: 0x00000002
+DISASM_ENABLE_INSTRUCTION_NUMBERING :: 0x00000004
+DISASM_ENABLE_INSTRUCTION_CYCLE :: 0x00000008
+DISASM_DISABLE_DEBUG_INFO :: 0x00000010
+DISASM_ENABLE_INSTRUCTION_OFFSET :: 0x00000020
+DISASM_INSTRUCTION_ONLY :: 0x00000040
+DISASM_PRINT_HEX_LITERALS :: 0x00000080
+
+GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE :: 0x00000001
+
+COMPRESS_SHADER_KEEP_ALL_PARTS :: 0x00000001
+
+SHADER_MACRO :: struct {
+ Name: cstring,
+ Definition: cstring,
+}
+
+ID3D10Blob_UUID_STRING :: "8BA5FB08-5195-40E2-AC58-0D989C3A0102"
+ID3D10Blob_UUID := &IID{0x8BA5FB08, 0x5195, 0x40E2, {0xAC, 0x58, 0x0D, 0x98, 0x9C, 0x3A, 0x01, 0x02}}
+ID3D10Blob :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d10blob_vtable: ^ID3D10Blob_VTable,
+}
+ID3D10Blob_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetBufferPointer: proc "stdcall" (this: ^ID3D10Blob) -> rawptr,
+ GetBufferSize: proc "stdcall" (this: ^ID3D10Blob) -> SIZE_T,
+}
+
+
+ID3DBlob :: ID3D10Blob
+ID3DBlob_VTable :: ID3D10Blob_VTable
+
+
+INCLUDE_TYPE :: enum i32 {
+ INCLUDE_LOCAL = 0,
+ INCLUDE_SYSTEM = 1,
+ _10_INCLUDE_LOCAL = 0,
+ _10_INCLUDE_SYSTEM = 1,
+ INCLUDE_FORCE_DWORD = 2147483647,
+}
+
+ID3DInclude :: struct {
+ vtable: ^ID3DInclude_VTable,
+}
+ID3DInclude_VTable :: struct {
+ Open: proc "stdcall" (this: ^ID3DInclude, IncludeType: INCLUDE_TYPE, pFileName: cstring, pParentData: rawptr, ppData: ^rawptr, pBytes: ^u32) -> HRESULT,
+ Close: proc "stdcall" (this: ^ID3DInclude, pData: rawptr) -> HRESULT,
+}
+
+
+ID3D11Module :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11module_vtable: ^ID3D11Module_VTable,
+}
+ID3D11Module_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ CreateInstance: proc "stdcall" (this: ^ID3D11Module, pNamespace: cstring, ppModuleInstance: ^^ID3D11ModuleInstance) -> HRESULT,
+}
+
+
+ID3D11ModuleInstance :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11moduleinstance_vtable: ^ID3D11ModuleInstance_VTable,
+}
+ID3D11ModuleInstance_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ BindConstantBuffer: proc "stdcall" (this: ^ID3D11ModuleInstance, uSrcSlot: u32, uDstSlot: u32, cbDstOffset: u32) -> HRESULT,
+ BindConstantBufferByName: proc "stdcall" (this: ^ID3D11ModuleInstance, pName: cstring, uDstSlot: u32, cbDstOffset: u32) -> HRESULT,
+ BindResource: proc "stdcall" (this: ^ID3D11ModuleInstance, uSrcSlot: u32, uDstSlot: u32, uCount: u32) -> HRESULT,
+ BindResourceByName: proc "stdcall" (this: ^ID3D11ModuleInstance, pName: cstring, uDstSlot: u32, uCount: u32) -> HRESULT,
+ BindSampler: proc "stdcall" (this: ^ID3D11ModuleInstance, uSrcSlot: u32, uDstSlot: u32, uCount: u32) -> HRESULT,
+ BindSamplerByName: proc "stdcall" (this: ^ID3D11ModuleInstance, pName: cstring, uDstSlot: u32, uCount: u32) -> HRESULT,
+ BindUnorderedAccessView: proc "stdcall" (this: ^ID3D11ModuleInstance, uSrcSlot: u32, uDstSlot: u32, uCount: u32) -> HRESULT,
+ BindUnorderedAccessViewByName: proc "stdcall" (this: ^ID3D11ModuleInstance, pName: cstring, uDstSlot: u32, uCount: u32) -> HRESULT,
+ BindResourceAsUnorderedAccessView: proc "stdcall" (this: ^ID3D11ModuleInstance, uSrcSrvSlot: u32, uDstUavSlot: u32, uCount: u32) -> HRESULT,
+ BindResourceAsUnorderedAccessViewByName: proc "stdcall" (this: ^ID3D11ModuleInstance, pSrvName: cstring, uDstUavSlot: u32, uCount: u32) -> HRESULT,
+}
+
+
+ID3D11Linker :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using id3d11linker_vtable: ^ID3D11Linker_VTable,
+}
+ID3D11Linker_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ Link: proc "stdcall" (this: ^ID3D11Linker, pEntry: ^ID3D11ModuleInstance, pEntryName: cstring, pTargetName: cstring, uFlags: u32, ppShaderBlob: ^^ID3DBlob, ppErrorBuffer: ^^ID3DBlob) -> HRESULT,
+ UseLibrary: proc "stdcall" (this: ^ID3D11Linker, pLibraryMI: ^ID3D11ModuleInstance) -> HRESULT,
+ AddClipPlaneFromCBuffer: proc "stdcall" (this: ^ID3D11Linker, uCBufferSlot: u32, uCBufferEntry: u32) -> HRESULT,
+}
+
+
+pD3DCompile :: #type proc "c" (a0: rawptr, a1: SIZE_T, a2: cstring, a3: ^SHADER_MACRO, a4: ^ID3DInclude, a5: cstring, a6: cstring, a7: u32, a8: u32, a9: ^^ID3DBlob, a10: ^^ID3DBlob) -> HRESULT
+pD3DPreprocess :: #type proc "c" (a0: rawptr, a1: SIZE_T, a2: cstring, a3: ^SHADER_MACRO, a4: ^ID3DInclude, a5: ^^ID3DBlob, a6: ^^ID3DBlob) -> HRESULT
+pD3DDisassemble :: #type proc "c" (a0: rawptr, a1: SIZE_T, a2: u32, a3: cstring, a4: ^^ID3DBlob) -> HRESULT
+
+D3DCOMPILER_STRIP_FLAGS :: enum u32 { // TODO: make bit_field
+ REFLECTION_DATA = 0x1,
+ DEBUG_INFO = 0x2,
+ TEST_BLOBS = 0x4,
+ PRIVATE_DATA = 0x8,
+ ROOT_SIGNATURE = 0x10,
+ FORCE_DWORD = 0x7fffffff,
+}
+
+BLOB_PART :: enum i32 {
+ INPUT_SIGNATURE_BLOB = 0,
+ OUTPUT_SIGNATURE_BLOB = 1,
+ INPUT_AND_OUTPUT_SIGNATURE_BLOB = 2,
+ PATCH_CONSTANT_SIGNATURE_BLOB = 3,
+ ALL_SIGNATURE_BLOB = 4,
+ DEBUG_INFO = 5,
+ LEGACY_SHADER = 6,
+ XNA_PREPASS_SHADER = 7,
+ XNA_SHADER = 8,
+ PDB = 9,
+ PRIVATE_DATA = 10,
+ ROOT_SIGNATURE = 11,
+ DEBUG_NAME = 12,
+
+ TEST_ALTERNATE_SHADER = 32768,
+ TEST_COMPILE_DETAILS = 32769,
+ TEST_COMPILE_PERF = 32770,
+ TEST_COMPILE_REPORT = 32771,
+}
+
+SHADER_DATA :: struct {
+ pBytecode: rawptr,
+ BytecodeLength: SIZE_T,
+}
+
+ID3D10Effect :: struct {
+ // ????
+}
diff --git a/vendor/directx/d3d_compiler/d3dcompiler_47.dll b/vendor/directx/d3d_compiler/d3dcompiler_47.dll
new file mode 100644
index 000000000..d30a17652
--- /dev/null
+++ b/vendor/directx/d3d_compiler/d3dcompiler_47.dll
Binary files differ
diff --git a/vendor/directx/d3d_compiler/d3dcompiler_47.lib b/vendor/directx/d3d_compiler/d3dcompiler_47.lib
new file mode 100644
index 000000000..022890ad9
--- /dev/null
+++ b/vendor/directx/d3d_compiler/d3dcompiler_47.lib
Binary files differ
diff --git a/vendor/directx/dxgi/dxgi.odin b/vendor/directx/dxgi/dxgi.odin
new file mode 100644
index 000000000..70c5a9e71
--- /dev/null
+++ b/vendor/directx/dxgi/dxgi.odin
@@ -0,0 +1,1141 @@
+package directx_dxgi
+
+foreign import dxgi {
+ "system:dxgi.lib",
+ "system:user32.lib",
+ "system:gdi32.lib",
+}
+
+import win32 "core:sys/windows"
+
+LUID :: win32.LUID
+IID :: win32.GUID
+UUID :: win32.GUID
+GUID :: win32.GUID
+HANDLE :: win32.HANDLE
+HRESULT :: win32.HRESULT
+HMONITOR :: win32.HMONITOR
+HWND :: win32.HWND
+HMODULE :: win32.HMODULE
+HDC :: win32.HANDLE
+BOOL :: win32.BOOL
+LARGE_INTEGER :: win32.LARGE_INTEGER
+SIZE_T :: win32.SIZE_T
+ULONG :: win32.ULONG
+LONG :: win32.LONG
+RECT :: win32.RECT
+POINT :: win32.POINT
+SIZE :: win32.SIZE
+
+IUnknown :: struct {
+ using _iunknown_vtable: ^IUnknown_VTable,
+}
+IUnknown_VTable :: struct {
+ QueryInterface: proc "stdcall" (this: ^IUnknown, riid: ^IID, ppvObject: ^rawptr) -> HRESULT,
+ AddRef: proc "stdcall" (this: ^IUnknown) -> ULONG,
+ Release: proc "stdcall" (this: ^IUnknown) -> ULONG,
+}
+
+@(default_calling_convention="stdcall")
+foreign dxgi {
+ CreateDXGIFactory :: proc(riid: ^IID, ppFactory: rawptr) -> HRESULT ---
+ CreateDXGIFactory1 :: proc(riid: ^IID, ppFactory: rawptr) -> HRESULT ---
+ CreateDXGIFactory2 :: proc(Flags: u32, riid: ^IID, ppFactory: rawptr) -> HRESULT ---
+ DXGIGetDebugInterface1 :: proc(Flags: u32, riid: ^IID, pDebug: rawptr) -> HRESULT ---
+}
+
+STANDARD_MULTISAMPLE_QUALITY_PATTERN :: 0xffffffff
+CENTER_MULTISAMPLE_QUALITY_PATTERN :: 0xfffffffe
+FORMAT_DEFINED :: 1
+_FACDXGI :: 0x87a
+
+CPU_ACCESS :: enum u32 {
+ NONE = 0,
+ DYNAMIC = 1,
+ READ_WRITE = 2,
+ SCRATCH = 3,
+ FIELD = 15,
+}
+
+USAGE :: enum u32 { // TODO: convert to bit_set
+ SHADER_INPUT = 0x00000010,
+ RENDER_TARGET_OUTPUT = 0x00000020,
+ BACK_BUFFER = 0x00000040,
+ SHARED = 0x00000080,
+ READ_ONLY = 0x00000100,
+ DISCARD_ON_PRESENT = 0x00000200,
+ UNORDERED_ACCESS = 0x00000400,
+}
+
+RESOURCE_PRIORITY :: enum u32 {
+ MINIMUM = 0x28000000,
+ LOW = 0x50000000,
+ NORMAL = 0x78000000,
+ HIGH = 0xa0000000,
+ MAXIMUM = 0xc8000000,
+}
+
+MAP :: enum u32 { // TODO: convert to bit_set
+ READ = 1,
+ WRITE = 2,
+ DISCARD = 4,
+}
+
+ENUM_MODES :: enum u32 { // TODO: convert to bit_set
+ INTERLACED = 1,
+ SCALING = 2,
+ STEREO = 4,
+ DISABLED_STEREO = 8,
+}
+
+MAX_SWAP_CHAIN_BUFFERS :: 16
+PRESENT :: enum u32 { // TODO: convert to bit_set
+ TEST = 0x00000001,
+ DO_NOT_SEQUENCE = 0x00000002,
+ RESTART = 0x00000004,
+ DO_NOT_WAIT = 0x00000008,
+ STEREO_PREFER_RIGHT = 0x00000010,
+ STEREO_TEMPORARY_MONO = 0x00000020,
+ RESTRICT_TO_OUTPUT = 0x00000040,
+ USE_DURATION = 0x00000100,
+ ALLOW_TEARING = 0x00000200,
+}
+
+MWA :: enum u32 { // TODO: convert to bit_set
+ NO_WINDOW_CHANGES = 1 << 0,
+ NO_ALT_ENTER = 1 << 1,
+ NO_PRINT_SCREEN = 1 << 2,
+ VALID = 0x7,
+}
+
+SHARED_RESOURCE_READ :: 0x80000000
+SHARED_RESOURCE_WRITE :: 1
+CREATE_FACTORY_DEBUG :: 0x1
+
+RATIONAL :: struct {
+ Numerator: u32,
+ Denominator: u32,
+}
+
+SAMPLE_DESC :: struct {
+ Count: u32,
+ Quality: u32,
+}
+
+COLOR_SPACE_TYPE :: enum i32 {
+ RGB_FULL_G22_NONE_P709 = 0,
+ RGB_FULL_G10_NONE_P709 = 1,
+ RGB_STUDIO_G22_NONE_P709 = 2,
+ RGB_STUDIO_G22_NONE_P2020 = 3,
+ RESERVED = 4,
+ YCBCR_FULL_G22_NONE_P709_X601 = 5,
+ YCBCR_STUDIO_G22_LEFT_P601 = 6,
+ YCBCR_FULL_G22_LEFT_P601 = 7,
+ YCBCR_STUDIO_G22_LEFT_P709 = 8,
+ YCBCR_FULL_G22_LEFT_P709 = 9,
+ YCBCR_STUDIO_G22_LEFT_P2020 = 10,
+ YCBCR_FULL_G22_LEFT_P2020 = 11,
+ RGB_FULL_G2084_NONE_P2020 = 12,
+ YCBCR_STUDIO_G2084_LEFT_P2020 = 13,
+ RGB_STUDIO_G2084_NONE_P2020 = 14,
+ YCBCR_STUDIO_G22_TOPLEFT_P2020 = 15,
+ YCBCR_STUDIO_G2084_TOPLEFT_P2020 = 16,
+ RGB_FULL_G22_NONE_P2020 = 17,
+ YCBCR_STUDIO_GHLG_TOPLEFT_P2020 = 18,
+ YCBCR_FULL_GHLG_TOPLEFT_P2020 = 19,
+ RGB_STUDIO_G24_NONE_P709 = 20,
+ RGB_STUDIO_G24_NONE_P2020 = 21,
+ YCBCR_STUDIO_G24_LEFT_P709 = 22,
+ YCBCR_STUDIO_G24_LEFT_P2020 = 23,
+ YCBCR_STUDIO_G24_TOPLEFT_P2020 = 24,
+ CUSTOM = -1,
+}
+
+FORMAT :: enum i32 {
+ UNKNOWN = 0,
+ R32G32B32A32_TYPELESS = 1,
+ R32G32B32A32_FLOAT = 2,
+ R32G32B32A32_UINT = 3,
+ R32G32B32A32_SINT = 4,
+ R32G32B32_TYPELESS = 5,
+ R32G32B32_FLOAT = 6,
+ R32G32B32_UINT = 7,
+ R32G32B32_SINT = 8,
+ R16G16B16A16_TYPELESS = 9,
+ R16G16B16A16_FLOAT = 10,
+ R16G16B16A16_UNORM = 11,
+ R16G16B16A16_UINT = 12,
+ R16G16B16A16_SNORM = 13,
+ R16G16B16A16_SINT = 14,
+ R32G32_TYPELESS = 15,
+ R32G32_FLOAT = 16,
+ R32G32_UINT = 17,
+ R32G32_SINT = 18,
+ R32G8X24_TYPELESS = 19,
+ D32_FLOAT_S8X24_UINT = 20,
+ R32_FLOAT_X8X24_TYPELESS = 21,
+ X32_TYPELESS_G8X24_UINT = 22,
+ R10G10B10A2_TYPELESS = 23,
+ R10G10B10A2_UNORM = 24,
+ R10G10B10A2_UINT = 25,
+ R11G11B10_FLOAT = 26,
+ R8G8B8A8_TYPELESS = 27,
+ R8G8B8A8_UNORM = 28,
+ R8G8B8A8_UNORM_SRGB = 29,
+ R8G8B8A8_UINT = 30,
+ R8G8B8A8_SNORM = 31,
+ R8G8B8A8_SINT = 32,
+ R16G16_TYPELESS = 33,
+ R16G16_FLOAT = 34,
+ R16G16_UNORM = 35,
+ R16G16_UINT = 36,
+ R16G16_SNORM = 37,
+ R16G16_SINT = 38,
+ R32_TYPELESS = 39,
+ D32_FLOAT = 40,
+ R32_FLOAT = 41,
+ R32_UINT = 42,
+ R32_SINT = 43,
+ R24G8_TYPELESS = 44,
+ D24_UNORM_S8_UINT = 45,
+ R24_UNORM_X8_TYPELESS = 46,
+ X24_TYPELESS_G8_UINT = 47,
+ R8G8_TYPELESS = 48,
+ R8G8_UNORM = 49,
+ R8G8_UINT = 50,
+ R8G8_SNORM = 51,
+ R8G8_SINT = 52,
+ R16_TYPELESS = 53,
+ R16_FLOAT = 54,
+ D16_UNORM = 55,
+ R16_UNORM = 56,
+ R16_UINT = 57,
+ R16_SNORM = 58,
+ R16_SINT = 59,
+ R8_TYPELESS = 60,
+ R8_UNORM = 61,
+ R8_UINT = 62,
+ R8_SNORM = 63,
+ R8_SINT = 64,
+ A8_UNORM = 65,
+ R1_UNORM = 66,
+ R9G9B9E5_SHAREDEXP = 67,
+ R8G8_B8G8_UNORM = 68,
+ G8R8_G8B8_UNORM = 69,
+ BC1_TYPELESS = 70,
+ BC1_UNORM = 71,
+ BC1_UNORM_SRGB = 72,
+ BC2_TYPELESS = 73,
+ BC2_UNORM = 74,
+ BC2_UNORM_SRGB = 75,
+ BC3_TYPELESS = 76,
+ BC3_UNORM = 77,
+ BC3_UNORM_SRGB = 78,
+ BC4_TYPELESS = 79,
+ BC4_UNORM = 80,
+ BC4_SNORM = 81,
+ BC5_TYPELESS = 82,
+ BC5_UNORM = 83,
+ BC5_SNORM = 84,
+ B5G6R5_UNORM = 85,
+ B5G5R5A1_UNORM = 86,
+ B8G8R8A8_UNORM = 87,
+ B8G8R8X8_UNORM = 88,
+ R10G10B10_XR_BIAS_A2_UNORM = 89,
+ B8G8R8A8_TYPELESS = 90,
+ B8G8R8A8_UNORM_SRGB = 91,
+ B8G8R8X8_TYPELESS = 92,
+ B8G8R8X8_UNORM_SRGB = 93,
+ BC6H_TYPELESS = 94,
+ BC6H_UF16 = 95,
+ BC6H_SF16 = 96,
+ BC7_TYPELESS = 97,
+ BC7_UNORM = 98,
+ BC7_UNORM_SRGB = 99,
+ AYUV = 100,
+ Y410 = 101,
+ Y416 = 102,
+ NV12 = 103,
+ P010 = 104,
+ P016 = 105,
+ _420_OPAQUE = 106,
+ YUY2 = 107,
+ Y210 = 108,
+ Y216 = 109,
+ NV11 = 110,
+ AI44 = 111,
+ IA44 = 112,
+ P8 = 113,
+ A8P8 = 114,
+ B4G4R4A4_UNORM = 115,
+
+ P208 = 130,
+ V208 = 131,
+ V408 = 132,
+
+ SAMPLER_FEEDBACK_MIN_MIP_OPAQUE = 189,
+ SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE = 190,
+
+ FORCE_UINT = -1,
+}
+
+RGB :: struct {
+ Red: f32,
+ Green: f32,
+ Blue: f32,
+}
+
+D3DCOLORVALUE :: struct {
+ r: f32,
+ g: f32,
+ b: f32,
+ a: f32,
+}
+
+RGBA :: D3DCOLORVALUE
+
+GAMMA_CONTROL :: struct {
+ Scale: RGB,
+ Offset: RGB,
+ GammaCurve: [1025]RGB,
+}
+
+GAMMA_CONTROL_CAPABILITIES :: struct {
+ ScaleAndOffsetSupported: BOOL,
+ MaxConvertedValue: f32,
+ MinConvertedValue: f32,
+ NumGammaControlPoints: u32,
+ ControlPointPositions: [1025]f32,
+}
+
+MODE_SCANLINE_ORDER :: enum i32 {
+ UNSPECIFIED = 0,
+ PROGRESSIVE = 1,
+ UPPER_FIELD_FIRST = 2,
+ LOWER_FIELD_FIRST = 3,
+}
+
+MODE_SCALING :: enum i32 {
+ UNSPECIFIED = 0,
+ CENTERED = 1,
+ STRETCHED = 2,
+}
+
+MODE_ROTATION :: enum i32 {
+ UNSPECIFIED = 0,
+ IDENTITY = 1,
+ ROTATE90 = 2,
+ ROTATE180 = 3,
+ ROTATE270 = 4,
+}
+
+MODE_DESC :: struct {
+ Width: u32,
+ Height: u32,
+ RefreshRate: RATIONAL,
+ Format: FORMAT,
+ ScanlineOrdering: MODE_SCANLINE_ORDER,
+ Scaling: MODE_SCALING,
+}
+
+JPEG_DC_HUFFMAN_TABLE :: struct {
+ CodeCounts: [12]u8,
+ CodeValues: [12]u8,
+}
+
+JPEG_AC_HUFFMAN_TABLE :: struct {
+ CodeCounts: [16]u8,
+ CodeValues: [162]u8,
+}
+
+JPEG_QUANTIZATION_TABLE :: struct {
+ Elements: [64]u8,
+}
+
+FRAME_STATISTICS :: struct {
+ PresentCount: u32,
+ PresentRefreshCount: u32,
+ SyncRefreshCount: u32,
+ SyncQPCTime: LARGE_INTEGER,
+ SyncGPUTime: LARGE_INTEGER,
+}
+
+MAPPED_RECT :: struct {
+ Pitch: i32,
+ pBits: [^]u8,
+}
+
+ADAPTER_DESC :: struct {
+ Description: [128]i16,
+ VendorId: u32,
+ DeviceId: u32,
+ SubSysId: u32,
+ Revision: u32,
+ DedicatedVideoMemory: SIZE_T,
+ DedicatedSystemMemory: SIZE_T,
+ SharedSystemMemory: SIZE_T,
+ AdapterLuid: LUID,
+}
+
+OUTPUT_DESC :: struct {
+ DeviceName: [32]i16,
+ DesktopCoordinates: RECT,
+ AttachedToDesktop: BOOL,
+ Rotation: MODE_ROTATION,
+ Monitor: HMONITOR,
+}
+
+SHARED_RESOURCE :: struct {
+ Handle: HANDLE,
+}
+
+RESIDENCY :: enum i32 {
+ FULLY_RESIDENT = 1,
+ RESIDENT_IN_SHARED_MEMORY = 2,
+ EVICTED_TO_DISK = 3,
+}
+
+SURFACE_DESC :: struct {
+ Width: u32,
+ Height: u32,
+ Format: FORMAT,
+ SampleDesc: SAMPLE_DESC,
+}
+
+SWAP_EFFECT :: enum i32 {
+ DISCARD = 0,
+ SEQUENTIAL = 1,
+ FLIP_SEQUENTIAL = 3,
+ FLIP_DISCARD = 4,
+}
+
+SWAP_CHAIN_FLAG :: enum u32 { // TODO: convert to bit_set
+ NONPREROTATED = 0x1,
+ ALLOW_MODE_SWITCH = 0x2,
+ GDI_COMPATIBLE = 0x4,
+ RESTRICTED_CONTENT = 0x8,
+ RESTRICT_SHARED_RESOURCE_DRIVER = 0x10,
+ DISPLAY_ONLY = 0x20,
+ FRAME_LATENCY_WAITABLE_OBJECT = 0x40,
+ FOREGROUND_LAYER = 0x80,
+ FULLSCREEN_VIDEO = 0x100,
+ YUV_VIDEO = 0x200,
+ HW_PROTECTED = 0x400,
+ ALLOW_TEARING = 0x800,
+ RESTRICTED_TO_ALL_HOLOGRAPHIC_DISPLAYS = 0x1000,
+}
+
+SWAP_CHAIN_DESC :: struct {
+ BufferDesc: MODE_DESC,
+ SampleDesc: SAMPLE_DESC,
+ BufferUsage: USAGE,
+ BufferCount: u32,
+ OutputWindow: HWND,
+ Windowed: BOOL,
+ SwapEffect: SWAP_EFFECT,
+ Flags: u32,
+}
+
+
+IObject_UUID_STRING :: "AEC22FB8-76F3-4639-9BE0-28EB43A67A2E"
+IObject_UUID := &IID{0xAEC22FB8, 0x76F3, 0x4639, {0x9B, 0xE0, 0x28, 0xEB, 0x43, 0xA6, 0x7A, 0x2E}}
+IObject :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using vtable: ^IObject_VTable,
+}
+IObject_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ SetPrivateData: proc "stdcall" (this: ^IObject, Name: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT,
+ SetPrivateDataInterface: proc "stdcall" (this: ^IObject, Name: ^GUID, pUnknown: ^IUnknown) -> HRESULT,
+ GetPrivateData: proc "stdcall" (this: ^IObject, Name: ^GUID, pDataSize: ^u32, pData: rawptr) -> HRESULT,
+ GetParent: proc "stdcall" (this: ^IObject, riid: ^IID, ppParent: ^rawptr) -> HRESULT,
+}
+
+IDeviceSubObject_UUID_STRING :: "3D3E0379-F9DE-4D58-BB6C-18D62992F1A6"
+IDeviceSubObject_UUID := &IID{0x3D3E0379, 0xF9DE, 0x4D58, {0xBB, 0x6C, 0x18, 0xD6, 0x29, 0x92, 0xF1, 0xA6}}
+IDeviceSubObject :: struct #raw_union {
+ #subtype idxgiobject: IObject,
+ using idxgidevicesubobject_vtable: ^IDeviceSubObject_VTable,
+}
+IDeviceSubObject_VTable :: struct {
+ using idxgiobject_vtable: IObject_VTable,
+ GetDevice: proc "stdcall" (this: ^IDeviceSubObject, riid: ^IID, ppDevice: ^rawptr) -> HRESULT,
+}
+
+IResource_UUID_STRING :: "035F3AB4-482E-4E50-B41F-8A7F8BD8960B"
+IResource_UUID := &IID{0x035F3AB4, 0x482E, 0x4E50, {0xB4, 0x1F, 0x8A, 0x7F, 0x8B, 0xD8, 0x96, 0x0B}}
+IResource :: struct #raw_union {
+ #subtype idxgidevicesubobject: IDeviceSubObject,
+ using idxgiresource_vtable: ^IResource_VTable,
+}
+IResource_VTable :: struct {
+ using idxgidevicesubobject_vtable: IDeviceSubObject_VTable,
+ GetSharedHandle: proc "stdcall" (this: ^IResource, pSharedHandle: ^HANDLE) -> HRESULT,
+ GetUsage: proc "stdcall" (this: ^IResource, pUsage: ^USAGE) -> HRESULT,
+ SetEvictionPriority: proc "stdcall" (this: ^IResource, EvictionPriority: u32) -> HRESULT,
+ GetEvictionPriority: proc "stdcall" (this: ^IResource, pEvictionPriority: ^u32) -> HRESULT,
+}
+
+IKeyedMutex_UUID_STRING :: "9D8E1289-D7B3-465F-8126-250E349AF85D"
+IKeyedMutex_UUID := &IID{0x9D8E1289, 0xD7B3, 0x465F, {0x81, 0x26, 0x25, 0x0E, 0x34, 0x9A, 0xF8, 0x5D}}
+IKeyedMutex :: struct #raw_union {
+ #subtype idxgidevicesubobject: IDeviceSubObject,
+ using idxgikeyedmutex_vtable: ^IKeyedMutex_VTable,
+}
+IKeyedMutex_VTable :: struct {
+ using idxgidevicesubobject_vtable: IDeviceSubObject_VTable,
+ AcquireSync: proc "stdcall" (this: ^IKeyedMutex, Key: u64, dwMilliseconds: u32) -> HRESULT,
+ ReleaseSync: proc "stdcall" (this: ^IKeyedMutex, Key: u64) -> HRESULT,
+}
+
+ISurface_UUID_STRING :: "CAFCB56C-6AC3-4889-BF47-9E23BBD260EC"
+ISurface_UUID := &IID{0xCAFCB56C, 0x6AC3, 0x4889, {0xBF, 0x47, 0x9E, 0x23, 0xBB, 0xD2, 0x60, 0xEC}}
+ISurface :: struct #raw_union {
+ #subtype idxgidevicesubobject: IDeviceSubObject,
+ using idxgisurface_vtable: ^ISurface_VTable,
+}
+ISurface_VTable :: struct {
+ using idxgidevicesubobject_vtable: IDeviceSubObject_VTable,
+ GetDesc: proc "stdcall" (this: ^ISurface, pDesc: ^SURFACE_DESC) -> HRESULT,
+ Map: proc "stdcall" (this: ^ISurface, pLockedRect: ^MAPPED_RECT, MapFlags: u32) -> HRESULT,
+ Unmap: proc "stdcall" (this: ^ISurface) -> HRESULT,
+}
+
+ISurface1_UUID_STRING :: "4AE63092-6327-4C1B-80AE-BFE12EA32B86"
+ISurface1_UUID := &IID{0x4AE63092, 0x6327, 0x4C1B, {0x80, 0xAE, 0xBF, 0xE1, 0x2E, 0xA3, 0x2B, 0x86}}
+ISurface1 :: struct #raw_union {
+ #subtype idxgisurface: ISurface,
+ using idxgisurface1_vtable: ^ISurface1_VTable,
+}
+ISurface1_VTable :: struct {
+ using idxgisurface_vtable: ISurface_VTable,
+ GetDC: proc "stdcall" (this: ^ISurface1, Discard: BOOL, phdc: ^HDC) -> HRESULT,
+ ReleaseDC: proc "stdcall" (this: ^ISurface1, pDirtyRect: ^RECT) -> HRESULT,
+}
+
+IAdapter_UUID_STRING :: "2411E7E1-12AC-4CCF-BD14-9798E8534DC0"
+IAdapter_UUID := &IID{0x2411E7E1, 0x12AC, 0x4CCF, {0xBD, 0x14, 0x97, 0x98, 0xE8, 0x53, 0x4D, 0xC0}}
+IAdapter :: struct #raw_union {
+ #subtype idxgiobject: IObject,
+ using idxgiadapter_vtable: ^IAdapter_VTable,
+}
+IAdapter_VTable :: struct {
+ using idxgiobject_vtable: IObject_VTable,
+ EnumOutputs: proc "stdcall" (this: ^IAdapter, Output: u32, ppOutput: ^^IOutput) -> HRESULT,
+ GetDesc: proc "stdcall" (this: ^IAdapter, pDesc: ^ADAPTER_DESC) -> HRESULT,
+ CheckInterfaceSupport: proc "stdcall" (this: ^IAdapter, InterfaceName: ^GUID, pUMDVersion: ^LARGE_INTEGER) -> HRESULT,
+}
+
+IOutput_UUID_STRING :: "AE02EEDB-C735-4690-8D52-5A8DC20213AA"
+IOutput_UUID := &IID{0xAE02EEDB, 0xC735, 0x4690, {0x8D, 0x52, 0x5A, 0x8D, 0xC2, 0x02, 0x13, 0xAA}}
+IOutput :: struct #raw_union {
+ #subtype idxgiobject: IObject,
+ using idxgioutput_vtable: ^IOutput_VTable,
+}
+IOutput_VTable :: struct {
+ using idxgiobject_vtable: IObject_VTable,
+ GetDesc: proc "stdcall" (this: ^IOutput, pDesc: ^OUTPUT_DESC) -> HRESULT,
+ GetDisplayModeList: proc "stdcall" (this: ^IOutput, EnumFormat: FORMAT, Flags: u32, pNumModes: ^u32, pDesc: ^MODE_DESC) -> HRESULT,
+ FindClosestMatchingMode: proc "stdcall" (this: ^IOutput, pModeToMatch: ^MODE_DESC, pClosestMatch: ^MODE_DESC, pConcernedDevice: ^IUnknown) -> HRESULT,
+ WaitForVBlank: proc "stdcall" (this: ^IOutput) -> HRESULT,
+ TakeOwnership: proc "stdcall" (this: ^IOutput, pDevice: ^IUnknown, Exclusive: BOOL) -> HRESULT,
+ ReleaseOwnership: proc "stdcall" (this: ^IOutput),
+ GetGammaControlCapabilities: proc "stdcall" (this: ^IOutput, pGammaCaps: ^GAMMA_CONTROL_CAPABILITIES) -> HRESULT,
+ SetGammaControl: proc "stdcall" (this: ^IOutput, pArray: ^GAMMA_CONTROL) -> HRESULT,
+ GetGammaControl: proc "stdcall" (this: ^IOutput, pArray: ^GAMMA_CONTROL) -> HRESULT,
+ SetDisplaySurface: proc "stdcall" (this: ^IOutput, pScanoutSurface: ^ISurface) -> HRESULT,
+ GetDisplaySurfaceData: proc "stdcall" (this: ^IOutput, pDestination: ^ISurface) -> HRESULT,
+ GetFrameStatistics: proc "stdcall" (this: ^IOutput, pStats: ^FRAME_STATISTICS) -> HRESULT,
+}
+
+ISwapChain_UUID_STRING :: "310D36A0-D2E7-4C0A-AA04-6A9D23B8886A"
+ISwapChain_UUID := &IID{0x310D36A0, 0xD2E7, 0x4C0A, {0xAA, 0x04, 0x6A, 0x9D, 0x23, 0xB8, 0x88, 0x6A}}
+ISwapChain :: struct #raw_union {
+ #subtype idxgidevicesubobject: IDeviceSubObject,
+ using idxgiswapchain_vtable: ^ISwapChain_VTable,
+}
+ISwapChain_VTable :: struct {
+ using idxgidevicesubobject_vtable: IDeviceSubObject_VTable,
+ Present: proc "stdcall" (this: ^ISwapChain, SyncInterval: u32, Flags: u32) -> HRESULT,
+ GetBuffer: proc "stdcall" (this: ^ISwapChain, Buffer: u32, riid: ^IID, ppSurface: ^rawptr) -> HRESULT,
+ SetFullscreenState: proc "stdcall" (this: ^ISwapChain, Fullscreen: BOOL, pTarget: ^IOutput) -> HRESULT,
+ GetFullscreenState: proc "stdcall" (this: ^ISwapChain, pFullscreen: ^BOOL, ppTarget: ^^IOutput) -> HRESULT,
+ GetDesc: proc "stdcall" (this: ^ISwapChain, pDesc: ^SWAP_CHAIN_DESC) -> HRESULT,
+ ResizeBuffers: proc "stdcall" (this: ^ISwapChain, BufferCount: u32, Width: u32, Height: u32, NewFormat: FORMAT, SwapChainFlags: u32) -> HRESULT,
+ ResizeTarget: proc "stdcall" (this: ^ISwapChain, pNewTargetParameters: ^MODE_DESC) -> HRESULT,
+ GetContainingOutput: proc "stdcall" (this: ^ISwapChain, ppOutput: ^^IOutput) -> HRESULT,
+ GetFrameStatistics: proc "stdcall" (this: ^ISwapChain, pStats: ^FRAME_STATISTICS) -> HRESULT,
+ GetLastPresentCount: proc "stdcall" (this: ^ISwapChain, pLastPresentCount: ^u32) -> HRESULT,
+}
+
+IFactory_UUID_STRING :: "7B7166EC-21C7-44AE-B21A-C9AE321AE369"
+IFactory_UUID := &IID{0x7B7166EC, 0x21C7, 0x44AE, {0xB2, 0x1A, 0xC9, 0xAE, 0x32, 0x1A, 0xE3, 0x69}}
+IFactory :: struct #raw_union {
+ #subtype idxgiobject: IObject,
+ using idxgifactory_vtable: ^IFactory_VTable,
+}
+IFactory_VTable :: struct {
+ using idxgiobject_vtable: IObject_VTable,
+ EnumAdapters: proc "stdcall" (this: ^IFactory, Adapter: u32, ppAdapter: ^^IAdapter) -> HRESULT,
+ MakeWindowAssociation: proc "stdcall" (this: ^IFactory, WindowHandle: HWND, Flags: u32) -> HRESULT,
+ GetWindowAssociation: proc "stdcall" (this: ^IFactory, pWindowHandle: ^HWND) -> HRESULT,
+ CreateSwapChain: proc "stdcall" (this: ^IFactory, pDevice: ^IUnknown, pDesc: ^SWAP_CHAIN_DESC, ppSwapChain: ^^ISwapChain) -> HRESULT,
+ CreateSoftwareAdapter: proc "stdcall" (this: ^IFactory, Module: HMODULE, ppAdapter: ^^IAdapter) -> HRESULT,
+}
+IDevice_UUID_STRING :: "54EC77FA-1377-44E6-8C32-88FD5F44C84C"
+IDevice_UUID := &IID{0x54EC77FA, 0x1377, 0x44E6, {0x8C, 0x32, 0x88, 0xFD, 0x5F, 0x44, 0xC8, 0x4C}}
+IDevice :: struct #raw_union {
+ #subtype idxgiobject: IObject,
+ using idxgidevice_vtable: ^IDevice_VTable,
+}
+IDevice_VTable :: struct {
+ using idxgiobject_vtable: IObject_VTable,
+ GetAdapter: proc "stdcall" (this: ^IDevice, pAdapter: ^^IAdapter) -> HRESULT,
+ CreateSurface: proc "stdcall" (this: ^IDevice, pDesc: ^SURFACE_DESC, NumSurfaces: u32, Usage: USAGE, pSharedResource: ^SHARED_RESOURCE, ppSurface: ^^ISurface) -> HRESULT,
+ QueryResourceResidency: proc "stdcall" (this: ^IDevice, ppResources: ^^IUnknown, pResidencyStatus: ^RESIDENCY, NumResources: u32) -> HRESULT,
+ SetGPUThreadPriority: proc "stdcall" (this: ^IDevice, Priority: i32) -> HRESULT,
+ GetGPUThreadPriority: proc "stdcall" (this: ^IDevice, pPriority: ^i32) -> HRESULT,
+}
+ADAPTER_FLAG :: enum u32 { // TODO: convert to bit_set
+ NONE = 0x0,
+ REMOTE = 0x1,
+ SOFTWARE = 0x2,
+ FORCE_DWORD = 0xffffffff,
+}
+
+ADAPTER_DESC1 :: struct {
+ Description: [128]i16,
+ VendorId: u32,
+ DeviceId: u32,
+ SubSysId: u32,
+ Revision: u32,
+ DedicatedVideoMemory: SIZE_T,
+ DedicatedSystemMemory: SIZE_T,
+ SharedSystemMemory: SIZE_T,
+ AdapterLuid: LUID,
+ Flags: u32,
+}
+
+DISPLAY_COLOR_SPACE :: struct {
+ PrimaryCoordinates: [8][2]f32,
+ WhitePoints: [16][2]f32,
+}
+
+
+IFactory1_UUID_STRING :: "770AAE78-F26F-4DBA-A829-253C83D1B387"
+IFactory1_UUID := &IID{0x770AAE78, 0xF26F, 0x4DBA, {0xA8, 0x29, 0x25, 0x3C, 0x83, 0xD1, 0xB3, 0x87}}
+IFactory1 :: struct #raw_union {
+ #subtype idxgifactory: IFactory,
+ using idxgifactory1_vtable: ^IFactory1_VTable,
+}
+IFactory1_VTable :: struct {
+ using idxgifactory_vtable: IFactory_VTable,
+ EnumAdapters1: proc "stdcall" (this: ^IFactory1, Adapter: u32, ppAdapter: ^^IAdapter1) -> HRESULT,
+ IsCurrent: proc "stdcall" (this: ^IFactory1) -> BOOL,
+}
+
+IAdapter1_UUID_STRING :: "29038F61-3839-4626-91FD-086879011A05"
+IAdapter1_UUID := &IID{0x29038F61, 0x3839, 0x4626, {0x91, 0xFD, 0x08, 0x68, 0x79, 0x01, 0x1A, 0x05}}
+IAdapter1 :: struct #raw_union {
+ #subtype idxgiadapter: IAdapter,
+ using idxgiadapter1_vtable: ^IAdapter1_VTable,
+}
+IAdapter1_VTable :: struct {
+ using idxgiadapter_vtable: IAdapter_VTable,
+ GetDesc1: proc "stdcall" (this: ^IAdapter1, pDesc: ^ADAPTER_DESC1) -> HRESULT,
+}
+
+IDevice1_UUID_STRING :: "77DB970F-6276-48BA-BA28-070143B4392C"
+IDevice1_UUID := &IID{0x77DB970F, 0x6276, 0x48BA, {0xBA, 0x28, 0x07, 0x01, 0x43, 0xB4, 0x39, 0x2C}}
+IDevice1 :: struct #raw_union {
+ #subtype idxgidevice: IDevice,
+ using idxgidevice1_vtable: ^IDevice1_VTable,
+}
+IDevice1_VTable :: struct {
+ using idxgidevice_vtable: IDevice_VTable,
+ SetMaximumFrameLatency: proc "stdcall" (this: ^IDevice1, MaxLatency: u32) -> HRESULT,
+ GetMaximumFrameLatency: proc "stdcall" (this: ^IDevice1, pMaxLatency: ^u32) -> HRESULT,
+}
+
+IDisplayControl_UUID_STRING :: "EA9DBF1A-C88E-4486-854A-98AA0138F30C"
+IDisplayControl_UUID := &IID{0xEA9DBF1A, 0xC88E, 0x4486, {0x85, 0x4A, 0x98, 0xAA, 0x01, 0x38, 0xF3, 0x0C}}
+IDisplayControl :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using idxgidisplaycontrol_vtable: ^IDisplayControl_VTable,
+}
+IDisplayControl_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ IsStereoEnabled: proc "stdcall" (this: ^IDisplayControl) -> BOOL,
+ SetStereoEnabled: proc "stdcall" (this: ^IDisplayControl, enabled: BOOL),
+}
+OUTDUPL_MOVE_RECT :: struct {
+ SourcePoint: POINT,
+ DestinationRect: RECT,
+}
+
+OUTDUPL_DESC :: struct {
+ ModeDesc: MODE_DESC,
+ Rotation: MODE_ROTATION,
+ DesktopImageInSystemMemory: BOOL,
+}
+
+OUTDUPL_POINTER_POSITION :: struct {
+ Position: POINT,
+ Visible: BOOL,
+}
+
+OUTDUPL_POINTER_SHAPE_TYPE :: enum i32 {
+ MONOCHROME = 1,
+ COLOR = 2,
+ MASKED_COLOR = 4,
+}
+
+OUTDUPL_POINTER_SHAPE_INFO :: struct {
+ Type: u32,
+ Width: u32,
+ Height: u32,
+ Pitch: u32,
+ HotSpot: POINT,
+}
+
+OUTDUPL_FRAME_INFO :: struct {
+ LastPresentTime: LARGE_INTEGER,
+ LastMouseUpdateTime: LARGE_INTEGER,
+ AccumulatedFrames: u32,
+ RectsCoalesced: BOOL,
+ ProtectedContentMaskedOut: BOOL,
+ PointerPosition: OUTDUPL_POINTER_POSITION,
+ TotalMetadataBufferSize: u32,
+ PointerShapeBufferSize: u32,
+}
+
+
+IOutputDuplication_UUID_STRING :: "191CFAC3-A341-470D-B26E-A864F428319C"
+IOutputDuplication_UUID := &IID{0x191CFAC3, 0xA341, 0x470D, {0xB2, 0x6E, 0xA8, 0x64, 0xF4, 0x28, 0x31, 0x9C}}
+IOutputDuplication :: struct #raw_union {
+ #subtype idxgiobject: IObject,
+ using idxgioutputduplication_vtable: ^IOutputDuplication_VTable,
+}
+IOutputDuplication_VTable :: struct {
+ using idxgiobject_vtable: IObject_VTable,
+ GetDesc: proc "stdcall" (this: ^IOutputDuplication, pDesc: ^OUTDUPL_DESC),
+ AcquireNextFrame: proc "stdcall" (this: ^IOutputDuplication, TimeoutInMilliseconds: u32, pFrameInfo: ^OUTDUPL_FRAME_INFO, ppDesktopResource: ^^IResource) -> HRESULT,
+ GetFrameDirtyRects: proc "stdcall" (this: ^IOutputDuplication, DirtyRectsBufferSize: u32, pDirtyRectsBuffer: ^RECT, pDirtyRectsBufferSizeRequired: ^u32) -> HRESULT,
+ GetFrameMoveRects: proc "stdcall" (this: ^IOutputDuplication, MoveRectsBufferSize: u32, pMoveRectBuffer: ^OUTDUPL_MOVE_RECT, pMoveRectsBufferSizeRequired: ^u32) -> HRESULT,
+ GetFramePointerShape: proc "stdcall" (this: ^IOutputDuplication, PointerShapeBufferSize: u32, pPointerShapeBuffer: rawptr, pPointerShapeBufferSizeRequired: ^u32, pPointerShapeInfo: ^OUTDUPL_POINTER_SHAPE_INFO) -> HRESULT,
+ MapDesktopSurface: proc "stdcall" (this: ^IOutputDuplication, pLockedRect: ^MAPPED_RECT) -> HRESULT,
+ UnMapDesktopSurface: proc "stdcall" (this: ^IOutputDuplication) -> HRESULT,
+ ReleaseFrame: proc "stdcall" (this: ^IOutputDuplication) -> HRESULT,
+}
+ALPHA_MODE :: enum i32 {
+ UNSPECIFIED = 0,
+ PREMULTIPLIED = 1,
+ STRAIGHT = 2,
+ IGNORE = 3,
+ FORCE_DWORD = -1,
+}
+
+
+ISurface2_UUID_STRING :: "ABA496DD-B617-4CB8-A866-BC44D7EB1FA2"
+ISurface2_UUID := &IID{0xABA496DD, 0xB617, 0x4CB8, {0xA8, 0x66, 0xBC, 0x44, 0xD7, 0xEB, 0x1F, 0xA2}}
+ISurface2 :: struct #raw_union {
+ #subtype idxgisurface1: ISurface1,
+ using idxgisurface2_vtable: ^ISurface2_VTable,
+}
+ISurface2_VTable :: struct {
+ using idxgisurface1_vtable: ISurface1_VTable,
+ GetResource: proc "stdcall" (this: ^ISurface2, riid: ^IID, ppParentResource: ^rawptr, pSubresourceIndex: ^u32) -> HRESULT,
+}
+
+IResource1_UUID_STRING :: "30961379-4609-4A41-998E-54FE567EE0C1"
+IResource1_UUID := &IID{0x30961379, 0x4609, 0x4A41, {0x99, 0x8E, 0x54, 0xFE, 0x56, 0x7E, 0xE0, 0xC1}}
+IResource1 :: struct #raw_union {
+ #subtype idxgiresource: IResource,
+ using idxgiresource1_vtable: ^IResource1_VTable,
+}
+IResource1_VTable :: struct {
+ using idxgiresource_vtable: IResource_VTable,
+ CreateSubresourceSurface: proc "stdcall" (this: ^IResource1, index: u32, ppSurface: ^^ISurface2) -> HRESULT,
+ CreateSharedHandle: proc "stdcall" (this: ^IResource1, pAttributes: ^win32.SECURITY_ATTRIBUTES, dwAccess: u32, lpName: ^i16, pHandle: ^HANDLE) -> HRESULT,
+}
+OFFER_RESOURCE_PRIORITY :: enum i32 {
+ LOW = 1,
+ NORMAL = 2,
+ HIGH = 3,
+}
+
+
+IDevice2_UUID_STRING :: "05008617-FBFD-4051-A790-144884B4F6A9"
+IDevice2_UUID := &IID{0x05008617, 0xFBFD, 0x4051, {0xA7, 0x90, 0x14, 0x48, 0x84, 0xB4, 0xF6, 0xA9}}
+IDevice2 :: struct #raw_union {
+ #subtype idxgidevice1: IDevice1,
+ using idxgidevice2_vtable: ^IDevice2_VTable,
+}
+IDevice2_VTable :: struct {
+ using idxgidevice1_vtable: IDevice1_VTable,
+ OfferResources: proc "stdcall" (this: ^IDevice2, NumResources: u32, ppResources: ^^IResource, Priority: OFFER_RESOURCE_PRIORITY) -> HRESULT,
+ ReclaimResources: proc "stdcall" (this: ^IDevice2, NumResources: u32, ppResources: ^^IResource, pDiscarded: ^BOOL) -> HRESULT,
+ EnqueueSetEvent: proc "stdcall" (this: ^IDevice2, hEvent: HANDLE) -> HRESULT,
+}
+MODE_DESC1 :: struct {
+ Width: u32,
+ Height: u32,
+ RefreshRate: RATIONAL,
+ Format: FORMAT,
+ ScanlineOrdering: MODE_SCANLINE_ORDER,
+ Scaling: MODE_SCALING,
+ Stereo: BOOL,
+}
+
+SCALING :: enum i32 {
+ STRETCH = 0,
+ NONE = 1,
+ ASPECT_RATIO_STRETCH = 2,
+}
+
+SWAP_CHAIN_DESC1 :: struct {
+ Width: u32,
+ Height: u32,
+ Format: FORMAT,
+ Stereo: BOOL,
+ SampleDesc: SAMPLE_DESC,
+ BufferUsage: USAGE,
+ BufferCount: u32,
+ Scaling: SCALING,
+ SwapEffect: SWAP_EFFECT,
+ AlphaMode: ALPHA_MODE,
+ Flags: u32,
+}
+
+SWAP_CHAIN_FULLSCREEN_DESC :: struct {
+ RefreshRate: RATIONAL,
+ ScanlineOrdering: MODE_SCANLINE_ORDER,
+ Scaling: MODE_SCALING,
+ Windowed: BOOL,
+}
+
+PRESENT_PARAMETERS :: struct {
+ DirtyRectsCount: u32,
+
+ pDirtyRects: [^]RECT,
+ pScrollRect: ^RECT,
+ pScrollOffset: ^POINT,
+}
+
+
+ISwapChain1_UUID_STRING :: "790A45F7-0D42-4876-983A-0A55CFE6F4AA"
+ISwapChain1_UUID := &IID{0x790A45F7, 0x0D42, 0x4876, {0x98, 0x3A, 0x0A, 0x55, 0xCF, 0xE6, 0xF4, 0xAA}}
+ISwapChain1 :: struct #raw_union {
+ #subtype idxgiswapchain: ISwapChain,
+ using idxgiswapchain1_vtable: ^ISwapChain1_VTable,
+}
+ISwapChain1_VTable :: struct {
+ using idxgiswapchain_vtable: ISwapChain_VTable,
+ GetDesc1: proc "stdcall" (this: ^ISwapChain1, pDesc: ^SWAP_CHAIN_DESC1) -> HRESULT,
+ GetFullscreenDesc: proc "stdcall" (this: ^ISwapChain1, pDesc: ^SWAP_CHAIN_FULLSCREEN_DESC) -> HRESULT,
+ GetHwnd: proc "stdcall" (this: ^ISwapChain1, pHwnd: ^HWND) -> HRESULT,
+ GetCoreWindow: proc "stdcall" (this: ^ISwapChain1, refiid: ^IID, ppUnk: ^rawptr) -> HRESULT,
+ Present1: proc "stdcall" (this: ^ISwapChain1, SyncInterval: u32, PresentFlags: u32, pPresentParameters: ^PRESENT_PARAMETERS) -> HRESULT,
+ IsTemporaryMonoSupported: proc "stdcall" (this: ^ISwapChain1) -> BOOL,
+ GetRestrictToOutput: proc "stdcall" (this: ^ISwapChain1, ppRestrictToOutput: ^^IOutput) -> HRESULT,
+ SetBackgroundColor: proc "stdcall" (this: ^ISwapChain1, pColor: ^RGBA) -> HRESULT,
+ GetBackgroundColor: proc "stdcall" (this: ^ISwapChain1, pColor: ^RGBA) -> HRESULT,
+ SetRotation: proc "stdcall" (this: ^ISwapChain1, Rotation: MODE_ROTATION) -> HRESULT,
+ GetRotation: proc "stdcall" (this: ^ISwapChain1, pRotation: ^MODE_ROTATION) -> HRESULT,
+}
+
+IFactory2_UUID_STRING :: "50C83A1C-E072-4C48-87B0-3630FA36A6D0"
+IFactory2_UUID := &IID{0x50C83A1C, 0xE072, 0x4C48, {0x87, 0xB0, 0x36, 0x30, 0xFA, 0x36, 0xA6, 0xD0}}
+IFactory2 :: struct #raw_union {
+ #subtype idxgifactory1: IFactory1,
+ using idxgifactory2_vtable: ^IFactory2_VTable,
+}
+IFactory2_VTable :: struct {
+ using idxgifactory1_vtable: IFactory1_VTable,
+ IsWindowedStereoEnabled: proc "stdcall" (this: ^IFactory2) -> BOOL,
+ CreateSwapChainForHwnd: proc "stdcall" (this: ^IFactory2, pDevice: ^IUnknown, hWnd: HWND, pDesc: ^SWAP_CHAIN_DESC1, pFullscreenDesc: ^SWAP_CHAIN_FULLSCREEN_DESC, pRestrictToOutput: ^IOutput, ppSwapChain: ^^ISwapChain1) -> HRESULT,
+ CreateSwapChainForCoreWindow: proc "stdcall" (this: ^IFactory2, pDevice: ^IUnknown, pWindow: ^IUnknown, pDesc: ^SWAP_CHAIN_DESC1, pRestrictToOutput: ^IOutput, ppSwapChain: ^^ISwapChain1) -> HRESULT,
+ GetSharedResourceAdapterLuid: proc "stdcall" (this: ^IFactory2, hResource: HANDLE, pLuid: ^LUID) -> HRESULT,
+ RegisterStereoStatusWindow: proc "stdcall" (this: ^IFactory2, WindowHandle: HWND, wMsg: u32, pdwCookie: ^u32) -> HRESULT,
+ RegisterStereoStatusEvent: proc "stdcall" (this: ^IFactory2, hEvent: HANDLE, pdwCookie: ^u32) -> HRESULT,
+ UnregisterStereoStatus: proc "stdcall" (this: ^IFactory2, dwCookie: u32),
+ RegisterOcclusionStatusWindow: proc "stdcall" (this: ^IFactory2, WindowHandle: HWND, wMsg: u32, pdwCookie: ^u32) -> HRESULT,
+ RegisterOcclusionStatusEvent: proc "stdcall" (this: ^IFactory2, hEvent: HANDLE, pdwCookie: ^u32) -> HRESULT,
+ UnregisterOcclusionStatus: proc "stdcall" (this: ^IFactory2, dwCookie: u32),
+ CreateSwapChainForComposition: proc "stdcall" (this: ^IFactory2, pDevice: ^IUnknown, pDesc: ^SWAP_CHAIN_DESC1, pRestrictToOutput: ^IOutput, ppSwapChain: ^^ISwapChain1) -> HRESULT,
+}
+GRAPHICS_PREEMPTION_GRANULARITY :: enum i32 {
+ DMA_BUFFER_BOUNDARY = 0,
+ PRIMITIVE_BOUNDARY = 1,
+ TRIANGLE_BOUNDARY = 2,
+ PIXEL_BOUNDARY = 3,
+ INSTRUCTION_BOUNDARY = 4,
+}
+
+COMPUTE_PREEMPTION_GRANULARITY :: enum i32 {
+ DMA_BUFFER_BOUNDARY = 0,
+ DISPATCH_BOUNDARY = 1,
+ THREAD_GROUP_BOUNDARY = 2,
+ THREAD_BOUNDARY = 3,
+ INSTRUCTION_BOUNDARY = 4,
+}
+
+ADAPTER_DESC2 :: struct {
+ Description: [128]i16,
+ VendorId: u32,
+ DeviceId: u32,
+ SubSysId: u32,
+ Revision: u32,
+ DedicatedVideoMemory: SIZE_T,
+ DedicatedSystemMemory: SIZE_T,
+ SharedSystemMemory: SIZE_T,
+ AdapterLuid: LUID,
+ Flags: u32,
+ GraphicsPreemptionGranularity: GRAPHICS_PREEMPTION_GRANULARITY,
+ ComputePreemptionGranularity: COMPUTE_PREEMPTION_GRANULARITY,
+}
+
+
+IAdapter2_UUID_STRING :: "0AA1AE0A-FA0E-4B84-8644-E05FF8E5ACB5"
+IAdapter2_UUID := &IID{0x0AA1AE0A, 0xFA0E, 0x4B84, {0x86, 0x44, 0xE0, 0x5F, 0xF8, 0xE5, 0xAC, 0xB5}}
+IAdapter2 :: struct #raw_union {
+ #subtype idxgiadapter1: IAdapter1,
+ using idxgiadapter2_vtable: ^IAdapter2_VTable,
+}
+IAdapter2_VTable :: struct {
+ using idxgiadapter1_vtable: IAdapter1_VTable,
+ GetDesc2: proc "stdcall" (this: ^IAdapter2, pDesc: ^ADAPTER_DESC2) -> HRESULT,
+}
+
+IOutput1_UUID_STRING :: "00CDDEA8-939B-4B83-A340-A685226666CC"
+IOutput1_UUID := &IID{0x00CDDEA8, 0x939B, 0x4B83, {0xA3, 0x40, 0xA6, 0x85, 0x22, 0x66, 0x66, 0xCC}}
+IOutput1 :: struct #raw_union {
+ #subtype idxgioutput: IOutput,
+ using idxgioutput1_vtable: ^IOutput1_VTable,
+}
+IOutput1_VTable :: struct {
+ using idxgioutput_vtable: IOutput_VTable,
+ GetDisplayModeList1: proc "stdcall" (this: ^IOutput1, EnumFormat: FORMAT, Flags: u32, pNumModes: ^u32, pDesc: ^MODE_DESC1) -> HRESULT,
+ FindClosestMatchingMode1: proc "stdcall" (this: ^IOutput1, pModeToMatch: ^MODE_DESC1, pClosestMatch: ^MODE_DESC1, pConcernedDevice: ^IUnknown) -> HRESULT,
+ GetDisplaySurfaceData1: proc "stdcall" (this: ^IOutput1, pDestination: ^IResource) -> HRESULT,
+ DuplicateOutput: proc "stdcall" (this: ^IOutput1, pDevice: ^IUnknown, ppOutputDuplication: ^^IOutputDuplication) -> HRESULT,
+}
+IDevice3_UUID_STRING :: "6007896C-3244-4AFD-BF18-A6D3BEDA5023"
+IDevice3_UUID := &IID{0x6007896C, 0x3244, 0x4AFD, {0xBF, 0x18, 0xA6, 0xD3, 0xBE, 0xDA, 0x50, 0x23}}
+IDevice3 :: struct #raw_union {
+ #subtype idxgidevice2: IDevice2,
+ using idxgidevice3_vtable: ^IDevice3_VTable,
+}
+IDevice3_VTable :: struct {
+ using idxgidevice2_vtable: IDevice2_VTable,
+ Trim: proc "stdcall" (this: ^IDevice3),
+}
+MATRIX_3X2_F :: struct {
+ _11: f32,
+ _12: f32,
+ _21: f32,
+ _22: f32,
+ _31: f32,
+ _32: f32,
+}
+
+
+ISwapChain2_UUID_STRING :: "A8BE2AC4-199F-4946-B331-79599FB98DE7"
+ISwapChain2_UUID := &IID{0xA8BE2AC4, 0x199F, 0x4946, {0xB3, 0x31, 0x79, 0x59, 0x9F, 0xB9, 0x8D, 0xE7}}
+ISwapChain2 :: struct #raw_union {
+ #subtype idxgiswapchain1: ISwapChain1,
+ using idxgiswapchain2_vtable: ^ISwapChain2_VTable,
+}
+ISwapChain2_VTable :: struct {
+ using idxgiswapchain1_vtable: ISwapChain1_VTable,
+ SetSourceSize: proc "stdcall" (this: ^ISwapChain2, Width: u32, Height: u32) -> HRESULT,
+ GetSourceSize: proc "stdcall" (this: ^ISwapChain2, pWidth: ^u32, pHeight: ^u32) -> HRESULT,
+ SetMaximumFrameLatency: proc "stdcall" (this: ^ISwapChain2, MaxLatency: u32) -> HRESULT,
+ GetMaximumFrameLatency: proc "stdcall" (this: ^ISwapChain2, pMaxLatency: ^u32) -> HRESULT,
+ GetFrameLatencyWaitableObject: proc "stdcall" (this: ^ISwapChain2) -> HANDLE,
+ SetMatrixTransform: proc "stdcall" (this: ^ISwapChain2, pMatrix: ^MATRIX_3X2_F) -> HRESULT,
+ GetMatrixTransform: proc "stdcall" (this: ^ISwapChain2, pMatrix: ^MATRIX_3X2_F) -> HRESULT,
+}
+
+IOutput2_UUID_STRING :: "595E39D1-2724-4663-99B1-DA969DE28364"
+IOutput2_UUID := &IID{0x595E39D1, 0x2724, 0x4663, {0x99, 0xB1, 0xDA, 0x96, 0x9D, 0xE2, 0x83, 0x64}}
+IOutput2 :: struct #raw_union {
+ #subtype idxgioutput1: IOutput1,
+ using idxgioutput2_vtable: ^IOutput2_VTable,
+}
+IOutput2_VTable :: struct {
+ using idxgioutput1_vtable: IOutput1_VTable,
+ SupportsOverlays: proc "stdcall" (this: ^IOutput2) -> BOOL,
+}
+
+IFactory3_UUID_STRING :: "25483823-CD46-4C7D-86CA-47AA95B837BD"
+IFactory3_UUID := &IID{0x25483823, 0xCD46, 0x4C7D, {0x86, 0xCA, 0x47, 0xAA, 0x95, 0xB8, 0x37, 0xBD}}
+IFactory3 :: struct #raw_union {
+ #subtype idxgifactory2: IFactory2,
+ using idxgifactory3_vtable: ^IFactory3_VTable,
+}
+IFactory3_VTable :: struct {
+ using idxgifactory2_vtable: IFactory2_VTable,
+ GetCreationFlags: proc "stdcall" (this: ^IFactory3) -> u32,
+}
+DECODE_SWAP_CHAIN_DESC :: struct {
+ Flags: u32,
+}
+
+MULTIPLANE_OVERLAY_YCbCr_FLAGS :: enum u32 { // TODO: convert to bit_set
+ NOMINAL_RANGE = 0x1,
+ BT709 = 0x2,
+ xvYCC = 0x4,
+}
+
+
+IDecodeSwapChain_UUID_STRING :: "2633066B-4514-4C7A-8FD8-12EA98059D18"
+IDecodeSwapChain_UUID := &IID{0x2633066B, 0x4514, 0x4C7A, {0x8F, 0xD8, 0x12, 0xEA, 0x98, 0x05, 0x9D, 0x18}}
+IDecodeSwapChain :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using idxgidecodeswapchain_vtable: ^IDecodeSwapChain_VTable,
+}
+IDecodeSwapChain_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ PresentBuffer: proc "stdcall" (this: ^IDecodeSwapChain, BufferToPresent: u32, SyncInterval: u32, Flags: u32) -> HRESULT,
+ SetSourceRect: proc "stdcall" (this: ^IDecodeSwapChain, pRect: ^RECT) -> HRESULT,
+ SetTargetRect: proc "stdcall" (this: ^IDecodeSwapChain, pRect: ^RECT) -> HRESULT,
+ SetDestSize: proc "stdcall" (this: ^IDecodeSwapChain, Width: u32, Height: u32) -> HRESULT,
+ GetSourceRect: proc "stdcall" (this: ^IDecodeSwapChain, pRect: ^RECT) -> HRESULT,
+ GetTargetRect: proc "stdcall" (this: ^IDecodeSwapChain, pRect: ^RECT) -> HRESULT,
+ GetDestSize: proc "stdcall" (this: ^IDecodeSwapChain, pWidth: ^u32, pHeight: ^u32) -> HRESULT,
+ SetColorSpace: proc "stdcall" (this: ^IDecodeSwapChain, ColorSpace: MULTIPLANE_OVERLAY_YCbCr_FLAGS) -> HRESULT,
+ GetColorSpace: proc "stdcall" (this: ^IDecodeSwapChain) -> MULTIPLANE_OVERLAY_YCbCr_FLAGS,
+}
+
+IFactoryMedia_UUID_STRING :: "41E7D1F2-A591-4F7B-A2E5-FA9C843E1C12"
+IFactoryMedia_UUID := &IID{0x41E7D1F2, 0xA591, 0x4F7B, {0xA2, 0xE5, 0xFA, 0x9C, 0x84, 0x3E, 0x1C, 0x12}}
+IFactoryMedia :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using idxgifactorymedia_vtable: ^IFactoryMedia_VTable,
+}
+IFactoryMedia_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ CreateSwapChainForCompositionSurfaceHandle: proc "stdcall" (this: ^IFactoryMedia, pDevice: ^IUnknown, hSurface: HANDLE, pDesc: ^SWAP_CHAIN_DESC1, pRestrictToOutput: ^IOutput, ppSwapChain: ^^ISwapChain1) -> HRESULT,
+ CreateDecodeSwapChainForCompositionSurfaceHandle: proc "stdcall" (this: ^IFactoryMedia, pDevice: ^IUnknown, hSurface: HANDLE, pDesc: ^DECODE_SWAP_CHAIN_DESC, pYuvDecodeBuffers: ^IResource, pRestrictToOutput: ^IOutput, ppSwapChain: ^^IDecodeSwapChain) -> HRESULT,
+}
+FRAME_PRESENTATION_MODE :: enum i32 {
+ COMPOSED = 0,
+ OVERLAY = 1,
+ NONE = 2,
+ COMPOSITION_FAILURE = 3,
+}
+
+FRAME_STATISTICS_MEDIA :: struct {
+ PresentCount: u32,
+ PresentRefreshCount: u32,
+ SyncRefreshCount: u32,
+ SyncQPCTime: LARGE_INTEGER,
+ SyncGPUTime: LARGE_INTEGER,
+ CompositionMode: FRAME_PRESENTATION_MODE,
+ ApprovedPresentDuration: u32,
+}
+
+
+ISwapChainMedia_UUID_STRING :: "DD95B90B-F05F-4F6A-BD65-25BFB264BD84"
+ISwapChainMedia_UUID := &IID{0xDD95B90B, 0xF05F, 0x4F6A, {0xBD, 0x65, 0x25, 0xBF, 0xB2, 0x64, 0xBD, 0x84}}
+ISwapChainMedia :: struct #raw_union {
+ #subtype iunknown: IUnknown,
+ using idxgiswapchainmedia_vtable: ^ISwapChainMedia_VTable,
+}
+ISwapChainMedia_VTable :: struct {
+ using iunknown_vtable: IUnknown_VTable,
+ GetFrameStatisticsMedia: proc "stdcall" (this: ^ISwapChainMedia, pStats: ^FRAME_STATISTICS_MEDIA) -> HRESULT,
+ SetPresentDuration: proc "stdcall" (this: ^ISwapChainMedia, Duration: u32) -> HRESULT,
+ CheckPresentDurationSupport: proc "stdcall" (this: ^ISwapChainMedia, DesiredPresentDuration: u32, pClosestSmallerPresentDuration: ^u32, pClosestLargerPresentDuration: ^u32) -> HRESULT,
+}
+OVERLAY_SUPPORT_FLAG :: enum u32 { // TODO: convert to bit_set
+ DIRECT = 0x1,
+ SCALING = 0x2,
+}
+
+
+IOutput3_UUID_STRING :: "8A6BB301-7E7E-41F4-A8E0-5B32F7F99B18"
+IOutput3_UUID := &IID{0x8A6BB301, 0x7E7E, 0x41F4, {0xA8, 0xE0, 0x5B, 0x32, 0xF7, 0xF9, 0x9B, 0x18}}
+IOutput3 :: struct #raw_union {
+ #subtype idxgioutput2: IOutput2,
+ using idxgioutput3_vtable: ^IOutput3_VTable,
+}
+IOutput3_VTable :: struct {
+ using idxgioutput2_vtable: IOutput2_VTable,
+ CheckOverlaySupport: proc "stdcall" (this: ^IOutput3, EnumFormat: FORMAT, pConcernedDevice: ^IUnknown, pFlags: ^u32) -> HRESULT,
+}
+SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG :: enum u32 { // TODO: convert to bit_set
+ PRESENT = 0x1,
+ OVERLAY_PRESENT = 0x2,
+}
+
+
+ISwapChain3_UUID_STRING :: "94D99BDB-F1F8-4AB0-B236-7DA0170EDAB1"
+ISwapChain3_UUID := &IID{0x94D99BDB, 0xF1F8, 0x4AB0, {0xB2, 0x36, 0x7D, 0xA0, 0x17, 0x0E, 0xDA, 0xB1}}
+ISwapChain3 :: struct #raw_union {
+ #subtype idxgiswapchain2: ISwapChain2,
+ using idxgiswapchain3_vtable: ^ISwapChain3_VTable,
+}
+ISwapChain3_VTable :: struct {
+ using idxgiswapchain2_vtable: ISwapChain2_VTable,
+ GetCurrentBackBufferIndex: proc "stdcall" (this: ^ISwapChain3) -> u32,
+ CheckColorSpaceSupport: proc "stdcall" (this: ^ISwapChain3, ColorSpace: COLOR_SPACE_TYPE, pColorSpaceSupport: ^u32) -> HRESULT,
+ SetColorSpace1: proc "stdcall" (this: ^ISwapChain3, ColorSpace: COLOR_SPACE_TYPE) -> HRESULT,
+ ResizeBuffers1: proc "stdcall" (this: ^ISwapChain3, BufferCount: u32, Width: u32, Height: u32, Format: FORMAT, SwapChainFlags: u32, pCreationNodeMask: ^u32, ppPresentQueue: ^^IUnknown) -> HRESULT,
+}
+OVERLAY_COLOR_SPACE_SUPPORT_FLAG :: enum u32 { // TODO: convert to bit_set
+ PRESENT = 0x1,
+}
+
+
+IOutput4_UUID_STRING :: "DC7DCA35-2196-414D-9F53-617884032A60"
+IOutput4_UUID := &IID{0xDC7DCA35, 0x2196, 0x414D, {0x9F, 0x53, 0x61, 0x78, 0x84, 0x03, 0x2A, 0x60}}
+IOutput4 :: struct #raw_union {
+ #subtype idxgioutput3: IOutput3,
+ using idxgioutput4_vtable: ^IOutput4_VTable,
+}
+IOutput4_VTable :: struct {
+ using idxgioutput3_vtable: IOutput3_VTable,
+ CheckOverlayColorSpaceSupport: proc "stdcall" (this: ^IOutput4, Format: FORMAT, ColorSpace: COLOR_SPACE_TYPE, pConcernedDevice: ^IUnknown, pFlags: ^u32) -> HRESULT,
+}
+
+IFactory4_UUID_STRING :: "1BC6EA02-EF36-464F-BF0C-21CA39E5168A"
+IFactory4_UUID := &IID{0x1BC6EA02, 0xEF36, 0x464F, {0xBF, 0x0C, 0x21, 0xCA, 0x39, 0xE5, 0x16, 0x8A}}
+IFactory4 :: struct #raw_union {
+ #subtype idxgifactory3: IFactory3,
+ using idxgifactory4_vtable: ^IFactory4_VTable,
+}
+IFactory4_VTable :: struct {
+ using idxgifactory3_vtable: IFactory3_VTable,
+ EnumAdapterByLuid: proc "stdcall" (this: ^IFactory4, AdapterLuid: LUID, riid: ^IID, ppvAdapter: ^rawptr) -> HRESULT,
+ EnumWarpAdapter: proc "stdcall" (this: ^IFactory4, riid: ^IID, ppvAdapter: ^rawptr) -> HRESULT,
+}
+MEMORY_SEGMENT_GROUP :: enum i32 {
+ LOCAL = 0,
+ NON_LOCAL = 1,
+}
+
+QUERY_VIDEO_MEMORY_INFO :: struct {
+ Budget: u64,
+ CurrentUsage: u64,
+ AvailableForReservation: u64,
+ CurrentReservation: u64,
+}
+
+
+IAdapter3_UUID_STRING :: "645967A4-1392-4310-A798-8053CE3E93FD"
+IAdapter3_UUID := &IID{0x645967A4, 0x1392, 0x4310, {0xA7, 0x98, 0x80, 0x53, 0xCE, 0x3E, 0x93, 0xFD}}
+IAdapter3 :: struct #raw_union {
+ #subtype idxgiadapter2: IAdapter2,
+ using idxgiadapter3_vtable: ^IAdapter3_VTable,
+}
+IAdapter3_VTable :: struct {
+ using idxgiadapter2_vtable: IAdapter2_VTable,
+ RegisterHardwareContentProtectionTeardownStatusEvent: proc "stdcall" (this: ^IAdapter3, hEvent: HANDLE, pdwCookie: ^u32) -> HRESULT,
+ UnregisterHardwareContentProtectionTeardownStatus: proc "stdcall" (this: ^IAdapter3, dwCookie: u32),
+ QueryVideoMemoryInfo: proc "stdcall" (this: ^IAdapter3, NodeIndex: u32, MemorySegmentGroup: MEMORY_SEGMENT_GROUP, pVideoMemoryInfo: ^QUERY_VIDEO_MEMORY_INFO) -> HRESULT,
+ SetVideoMemoryReservation: proc "stdcall" (this: ^IAdapter3, NodeIndex: u32, MemorySegmentGroup: MEMORY_SEGMENT_GROUP, Reservation: u64) -> HRESULT,
+ RegisterVideoMemoryBudgetChangeNotificationEvent: proc "stdcall" (this: ^IAdapter3, hEvent: HANDLE, pdwCookie: ^u32) -> HRESULT,
+ UnregisterVideoMemoryBudgetChangeNotification: proc "stdcall" (this: ^IAdapter3, dwCookie: u32),
+} \ No newline at end of file
diff --git a/vendor/glfw/bindings/bindings.odin b/vendor/glfw/bindings/bindings.odin
index f4e39015e..aa1578153 100644
--- a/vendor/glfw/bindings/bindings.odin
+++ b/vendor/glfw/bindings/bindings.odin
@@ -3,8 +3,6 @@ package glfw_bindings
import "core:c"
import vk "vendor:vulkan"
-when ODIN_OS == .Linux { foreign import glfw "system:glfw" } // TODO: Add the billion-or-so static libs to link to in linux
-when ODIN_OS == .Darwin { foreign import glfw "system:glfw" }
when ODIN_OS == .Windows {
foreign import glfw {
"../lib/glfw3_mt.lib",
@@ -12,6 +10,11 @@ when ODIN_OS == .Windows {
"system:gdi32.lib",
"system:shell32.lib",
}
+} else when ODIN_OS == .Linux {
+ // TODO: Add the billion-or-so static libs to link to in linux
+ foreign import glfw "system:glfw"
+} else {
+ foreign import glfw "system:glfw"
}
#assert(size_of(c.int) == size_of(b32))
diff --git a/vendor/miniaudio/common.odin b/vendor/miniaudio/common.odin
index 75b66101f..89e3d6bd2 100644
--- a/vendor/miniaudio/common.odin
+++ b/vendor/miniaudio/common.odin
@@ -2,8 +2,13 @@ package miniaudio
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
handle :: distinct rawptr
diff --git a/vendor/miniaudio/data_conversion.odin b/vendor/miniaudio/data_conversion.odin
index 8a53cc19e..7167270a1 100644
--- a/vendor/miniaudio/data_conversion.odin
+++ b/vendor/miniaudio/data_conversion.odin
@@ -2,9 +2,13 @@ package miniaudio
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
-
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
/************************************************************************************************************************************************************
*************************************************************************************************************************************************************
diff --git a/vendor/miniaudio/decoding.odin b/vendor/miniaudio/decoding.odin
index 52b315f10..dcf3b7a1a 100644
--- a/vendor/miniaudio/decoding.odin
+++ b/vendor/miniaudio/decoding.odin
@@ -2,10 +2,13 @@ package miniaudio
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
-
-
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
/************************************************************************************************************************************************************
@@ -164,4 +167,4 @@ foreign lib {
decode_from_vfs :: proc(pVFS: ^vfs, pFilePath: cstring, pConfig: ^decoder_config, pFrameCountOut: ^u64, ppPCMFramesOut: ^rawptr) -> result ---
decode_file :: proc(pFilePath: cstring, pConfig: ^decoder_config, pFrameCountOut: ^u64, ppPCMFramesOut: ^rawptr) -> result ---
decode_memory :: proc(pData: rawptr, dataSize: c.size_t, pConfig: ^decoder_config, pFrameCountOut: ^u64, ppPCMFramesOut: ^rawptr) -> result ---
-} \ No newline at end of file
+}
diff --git a/vendor/miniaudio/device_io_procs.odin b/vendor/miniaudio/device_io_procs.odin
index 8d6609186..7cff3f621 100644
--- a/vendor/miniaudio/device_io_procs.odin
+++ b/vendor/miniaudio/device_io_procs.odin
@@ -1,7 +1,12 @@
package miniaudio
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
import "core:c"
diff --git a/vendor/miniaudio/device_io_types.odin b/vendor/miniaudio/device_io_types.odin
index 7778e85cf..e05f94665 100644
--- a/vendor/miniaudio/device_io_types.odin
+++ b/vendor/miniaudio/device_io_types.odin
@@ -6,7 +6,7 @@ SUPPORT_WASAPI :: ODIN_OS == .Windows
SUPPORT_DSOUND :: ODIN_OS == .Windows
SUPPORT_WINMM :: ODIN_OS == .Windows
SUPPORT_COREAUDIO :: ODIN_OS == .Darwin
-SUPPORT_SNDIO :: false // ODIN_OS == .OpenBSD
+SUPPORT_SNDIO :: ODIN_OS == .OpenBSD
SUPPORT_AUDIO4 :: false // ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD
SUPPORT_OSS :: ODIN_OS == .FreeBSD
SUPPORT_PULSEAUDIO :: ODIN_OS == .Linux
@@ -739,8 +739,8 @@ context_type :: struct {
pa_stream_writable_size: proc "system" (),
pa_stream_readable_size: proc "system" (),
- /*pa_mainloop**/ pMainLoop: ptr,
- /*pa_context**/ pPulseContext: ptr,
+ /*pa_mainloop**/ pMainLoop: rawptr,
+ /*pa_context**/ pPulseContext: rawptr,
} when SUPPORT_PULSEAUDIO else struct {}),
jack: (struct {
@@ -791,7 +791,7 @@ context_type :: struct {
AudioUnitInitialize: proc "system" (),
AudioUnitRender: proc "system" (),
- /*AudioComponent*/ component: ptr,
+ /*AudioComponent*/ component: rawptr,
noAudioSessionDeactivate: b32, /* For tracking whether or not the iOS audio session should be explicitly deactivated. Set from the config in ma_context_init__coreaudio(). */
} when SUPPORT_COREAUDIO else struct {}),
diff --git a/vendor/miniaudio/encoding.odin b/vendor/miniaudio/encoding.odin
index 83f9d5252..9b84108dc 100644
--- a/vendor/miniaudio/encoding.odin
+++ b/vendor/miniaudio/encoding.odin
@@ -2,8 +2,13 @@ package miniaudio
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
/************************************************************************************************************************************************************
@@ -49,4 +54,4 @@ foreign lib {
encoder_init_file_w :: proc(pFilePath: [^]c.wchar_t, pConfig: ^encoder_config, pEncoder: ^encoder) -> result ---
encoder_uninit :: proc(pEncoder: ^encoder) ---
encoder_write_pcm_frames :: proc(pEncoder: ^encoder, FramesIn: rawptr, frameCount: u64) -> u64 ---
-} \ No newline at end of file
+}
diff --git a/vendor/miniaudio/filtering.odin b/vendor/miniaudio/filtering.odin
index 4956da173..9949f6338 100644
--- a/vendor/miniaudio/filtering.odin
+++ b/vendor/miniaudio/filtering.odin
@@ -1,7 +1,12 @@
package miniaudio
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
/**************************************************************************************************************************************************************
diff --git a/vendor/miniaudio/generation.odin b/vendor/miniaudio/generation.odin
index c241f00b1..97b7d453c 100644
--- a/vendor/miniaudio/generation.odin
+++ b/vendor/miniaudio/generation.odin
@@ -2,8 +2,13 @@ package miniaudio
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
waveform_type :: enum c.int {
sine,
@@ -82,4 +87,4 @@ foreign lib {
noise_set_amplitude :: proc(pNoise: ^noise, amplitude: f64) -> result ---
noise_set_seed :: proc(pNoise: ^noise, seed: i32) -> result ---
noise_set_type :: proc(pNoise: ^noise, type: noise_type) -> result ---
-} \ No newline at end of file
+}
diff --git a/vendor/miniaudio/logging.odin b/vendor/miniaudio/logging.odin
index 35aa54bc9..0c14a10c2 100644
--- a/vendor/miniaudio/logging.odin
+++ b/vendor/miniaudio/logging.odin
@@ -2,8 +2,13 @@ package miniaudio
import c "core:c/libc"
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
MAX_LOG_CALLBACKS :: 4
@@ -32,4 +37,4 @@ foreign lib {
log_post :: proc(pLog: ^log, level: u32, pMessage: cstring) -> result ---
log_postv :: proc(pLog: ^log, level: u32, pFormat: cstring, args: c.va_list) -> result ---
log_postf :: proc(pLog: ^log, level: u32, pFormat: cstring, #c_vararg args: ..any) -> result ---
-} \ No newline at end of file
+}
diff --git a/vendor/miniaudio/src/Makefile b/vendor/miniaudio/src/Makefile
index 7ff72ebdc..3c61b5e2f 100644
--- a/vendor/miniaudio/src/Makefile
+++ b/vendor/miniaudio/src/Makefile
@@ -1,6 +1,6 @@
all:
mkdir -p ../lib
- gcc -c -O2 -Os -fPIC miniaudio.c
- ar rcs ../lib/miniaudio.a miniaudio.o
- #gcc -fPIC -shared -Wl,-soname=miniaudio.so -o ../lib/miniaudio.so miniaudio.o
+ $(CC) -c -O2 -Os -fPIC miniaudio.c
+ $(AR) rcs ../lib/miniaudio.a miniaudio.o
+ #$(CC) -fPIC -shared -Wl,-soname=miniaudio.so -o ../lib/miniaudio.so miniaudio.o
rm *.o
diff --git a/vendor/miniaudio/utilities.odin b/vendor/miniaudio/utilities.odin
index 19307a77d..9ced019f5 100644
--- a/vendor/miniaudio/utilities.odin
+++ b/vendor/miniaudio/utilities.odin
@@ -1,7 +1,12 @@
package miniaudio
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
@(default_calling_convention="c", link_prefix="ma_")
foreign lib {
@@ -228,4 +233,4 @@ foreign lib {
audio_buffer_get_cursor_in_pcm_frames :: proc(pAudioBuffer: ^audio_buffer, pCursor: ^u64) -> result ---
audio_buffer_get_length_in_pcm_frames :: proc(pAudioBuffer: ^audio_buffer, pLength: ^u64) -> result ---
audio_buffer_get_available_frames :: proc(pAudioBuffer: ^audio_buffer, pAvailableFrames: ^u64) -> result ---
-} \ No newline at end of file
+}
diff --git a/vendor/miniaudio/vfs.odin b/vendor/miniaudio/vfs.odin
index 547fbd265..85571341e 100644
--- a/vendor/miniaudio/vfs.odin
+++ b/vendor/miniaudio/vfs.odin
@@ -2,8 +2,13 @@ package miniaudio
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
-when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
+when ODIN_OS == .Windows {
+ foreign import lib "lib/miniaudio.lib"
+} else when ODIN_OS == .Linux {
+ foreign import lib "lib/miniaudio.a"
+} else {
+ foreign import lib "system:miniaudio"
+}
/************************************************************************************************************************************************************
diff --git a/vendor/portmidi/portmidi.odin b/vendor/portmidi/portmidi.odin
index 40fd18b8b..a3db4191c 100644
--- a/vendor/portmidi/portmidi.odin
+++ b/vendor/portmidi/portmidi.odin
@@ -9,6 +9,8 @@ when ODIN_OS == .Windows {
"system:Winmm.lib",
"system:Advapi32.lib",
}
+} else {
+ foreign import lib "system:portmidi"
}
#assert(size_of(b32) == size_of(c.int))
@@ -519,4 +521,4 @@ foreign lib {
WriteSysEx() writes a timestamped system-exclusive midi message.
*/
WriteSysEx :: proc(stream: Stream, whence: Timestamp, msg: cstring) -> Error ---
-} \ No newline at end of file
+}
diff --git a/vendor/portmidi/util.odin b/vendor/portmidi/util.odin
index ca2e1f4ca..caf73f8ad 100644
--- a/vendor/portmidi/util.odin
+++ b/vendor/portmidi/util.odin
@@ -7,7 +7,11 @@ package portmidi
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "portmidi_s.lib" }
+when ODIN_OS == .Windows {
+ foreign import lib "portmidi_s.lib"
+} else {
+ foreign import lib "system:portmidi"
+}
Queue :: distinct rawptr
@@ -118,4 +122,4 @@ foreign lib {
state, returns .NoError if successfully set overflow state.
*/
SetOverflow :: proc(queue: Queue) -> Error ---
-} \ No newline at end of file
+}
diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin
index 0c8248683..ec057cd78 100644
--- a/vendor/raylib/raylib.odin
+++ b/vendor/raylib/raylib.odin
@@ -99,15 +99,17 @@ when ODIN_OS == .Windows {
"system:User32.lib",
"system:Shell32.lib",
}
-}
-when ODIN_OS == .Linux {
+} else when ODIN_OS == .Linux {
foreign import lib {
"linux/libraylib.a",
"system:dl",
"system:pthread",
}
+} else when ODIN_OS == .Darwin {
+ foreign import lib "macos/libraylib.a"
+} else {
+ foreign import lib "system:raylib"
}
-when ODIN_OS == .Darwin { foreign import lib "macos/libraylib.a" }
VERSION :: "4.0"
@@ -1150,9 +1152,9 @@ foreign lib {
DrawRectangleGradientH :: proc(posX, posY, width, height: c.int, color1: Color, color2: Color) --- // Draw a horizontal-gradient-filled rectangle
DrawRectangleGradientEx :: proc(rec: Rectangle, col1, col2, col3, col4: Color) --- // Draw a gradient-filled rectangle with custom vertex colors
DrawRectangleLines :: proc(posX, posY, width, height: c.int, color: Color) --- // Draw rectangle outline
- DrawRectangleLinesEx :: proc(rec: Rectangle, lineThick: c.int, color: Color) --- // Draw rectangle outline with extended parameters
+ DrawRectangleLinesEx :: proc(rec: Rectangle, lineThick: f32, color: Color) --- // Draw rectangle outline with extended parameters
DrawRectangleRounded :: proc(rec: Rectangle, roundness: f32, segments: c.int, color: Color) --- // Draw rectangle with rounded edges
- DrawRectangleRoundedLines :: proc(rec: Rectangle, roundness: f32, segments: c.int, lineThick: c.int, color: Color) --- // Draw rectangle with rounded edges outline
+ DrawRectangleRoundedLines :: proc(rec: Rectangle, roundness: f32, segments: c.int, lineThick: f32, color: Color) --- // Draw rectangle with rounded edges outline
DrawTriangle :: proc(v1, v2, v3: Vector2, color: Color) --- // Draw a color-filled triangle (vertex in counter-clockwise order!)
DrawTriangleLines :: proc(v1, v2, v3: Vector2, color: Color) --- // Draw triangle outline (vertex in counter-clockwise order!)
DrawTriangleFan :: proc(points: [^]Vector2, pointsCount: c.int, color: Color) --- // Draw a triangle fan defined by points (first vertex is the center)
diff --git a/vendor/raylib/rlgl.odin b/vendor/raylib/rlgl.odin
index 936a34765..7e7f2feea 100644
--- a/vendor/raylib/rlgl.odin
+++ b/vendor/raylib/rlgl.odin
@@ -10,9 +10,13 @@ when ODIN_OS == .Windows {
"system:User32.lib",
"system:Shell32.lib",
}
+} else when ODIN_OS == .Linux {
+ foreign import lib "linux/libraylib.a"
+} else when ODIN_OS == .Darwin {
+ foreign import lib "macos/libraylib.a"
+} else {
+ foreign import lib "system:raylib"
}
-when ODIN_OS == .Linux { foreign import lib "linux/libraylib.a" }
-when ODIN_OS == .Darwin { foreign import lib "macos/libraylib.a" }
GRAPHICS_API_OPENGL_11 :: false
GRAPHICS_API_OPENGL_21 :: true
@@ -378,4 +382,4 @@ foreign lib {
// Quick and dirty cube/quad buffers load->draw->unload
rlLoadDrawCube :: proc() --- // Load and draw a cube
rlLoadDrawQuad :: proc() --- // Load and draw a quad
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/image/sdl_image.odin b/vendor/sdl2/image/sdl_image.odin
index 30a7db6a8..204ec9a0d 100644
--- a/vendor/sdl2/image/sdl_image.odin
+++ b/vendor/sdl2/image/sdl_image.odin
@@ -3,10 +3,11 @@ package sdl2_image
import "core:c"
import SDL ".."
-when ODIN_OS == .Windows { foreign import lib "SDL2_image.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2_image" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2_image" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2_image" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2_image.lib"
+} else {
+ foreign import lib "system:SDL2_image"
+}
bool :: SDL.bool
@@ -119,4 +120,4 @@ foreign lib {
/* Individual loading functions */
LoadGIFAnimation_RW :: proc(src: ^SDL.RWops) -> ^Animation ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/mixer/sdl_mixer.odin b/vendor/sdl2/mixer/sdl_mixer.odin
index 7fa3f216f..b0c16871d 100644
--- a/vendor/sdl2/mixer/sdl_mixer.odin
+++ b/vendor/sdl2/mixer/sdl_mixer.odin
@@ -3,11 +3,11 @@ package sdl2_mixer
import "core:c"
import SDL ".."
-when ODIN_OS == .Windows { foreign import lib "SDL2_mixer.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2_mixer" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2_mixer" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2_mixer" }
-
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2_mixer.lib"
+} else {
+ foreign import lib "system:SDL2_mixer"
+}
MAJOR_VERSION :: 2
MINOR_VERSION :: 0
diff --git a/vendor/sdl2/net/sdl_net.odin b/vendor/sdl2/net/sdl_net.odin
index b3e2c2e62..579f245e5 100644
--- a/vendor/sdl2/net/sdl_net.odin
+++ b/vendor/sdl2/net/sdl_net.odin
@@ -3,10 +3,11 @@ package sdl2_net
import "core:c"
import SDL ".."
-when ODIN_OS == .Windows { foreign import lib "SDL2_net.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2_net" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2_net" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2_net" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2_net.lib"
+} else {
+ foreign import lib "system:SDL2_net"
+}
bool :: SDL.bool
@@ -188,4 +189,4 @@ Read16 :: #force_inline proc "c" (areap: rawptr) -> u16 {
Read32 :: #force_inline proc "c" (areap: rawptr) -> u32 {
area := (^[4]u8)(areap)
return u32(area[0])<<24 | u32(area[1])<<16 | u32(area[2])<<8 | u32(area[3])
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl2.odin b/vendor/sdl2/sdl2.odin
index e36c002dd..24ecc38e6 100644
--- a/vendor/sdl2/sdl2.odin
+++ b/vendor/sdl2/sdl2.odin
@@ -25,10 +25,11 @@ package sdl2
import "core:c"
import "core:intrinsics"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
version :: struct {
major: u8, /**< major version */
@@ -314,4 +315,4 @@ foreign lib {
IsShapedWindow :: proc(window: ^Window) -> bool ---
SetWindowShape :: proc(window: ^Window, shape: ^Surface, shape_mode: ^WindowShapeMode) -> c.int ---
GetShapedWindowMode :: proc(window: ^Window, shape_mode: ^WindowShapeMode) -> c.int ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_audio.odin b/vendor/sdl2/sdl_audio.odin
index a03031165..28a59d947 100644
--- a/vendor/sdl2/sdl_audio.odin
+++ b/vendor/sdl2/sdl_audio.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
/**
* \brief Audio format flags.
diff --git a/vendor/sdl2/sdl_blendmode.odin b/vendor/sdl2/sdl_blendmode.odin
index 525cf0f38..4fde5111b 100644
--- a/vendor/sdl2/sdl_blendmode.odin
+++ b/vendor/sdl2/sdl_blendmode.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
/**
* \brief The blend mode used in SDL_RenderCopy() and drawing operations.
@@ -62,4 +63,4 @@ BlendFactor :: enum c.int {
foreign lib {
ComposeCustomBlendMode :: proc(srcColorFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation,
srcAlphaFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) -> BlendMode ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_cpuinfo.odin b/vendor/sdl2/sdl_cpuinfo.odin
index 7d2e681fe..c5175e4d5 100644
--- a/vendor/sdl2/sdl_cpuinfo.odin
+++ b/vendor/sdl2/sdl_cpuinfo.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
/* This is a guess for the cacheline size used for padding.
* Most x86 processors have a 64 byte cache line.
@@ -41,4 +42,4 @@ foreign lib {
SIMDAlloc :: proc(len: c.size_t) -> rawptr ---
SIMDRealloc :: proc(mem: rawptr, len: c.size_t) -> rawptr ---
SIMDFree :: proc(ptr: rawptr) ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_events.odin b/vendor/sdl2/sdl_events.odin
index 3f58b51c3..29f6e8a43 100644
--- a/vendor/sdl2/sdl_events.odin
+++ b/vendor/sdl2/sdl_events.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
RELEASED :: 0
PRESSED :: 1
@@ -498,4 +499,4 @@ foreign lib {
FilterEvents :: proc(filter: EventFilter, userdata: rawptr) ---
EventState :: proc(type: EventType, state: c.int) -> u8 ---
RegisterEvents :: proc(numevents: c.int) -> u32 ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_gamecontroller.odin b/vendor/sdl2/sdl_gamecontroller.odin
index 9fef6b1ab..76e0b8966 100644
--- a/vendor/sdl2/sdl_gamecontroller.odin
+++ b/vendor/sdl2/sdl_gamecontroller.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
GameController :: struct {}
diff --git a/vendor/sdl2/sdl_gesture_haptic.odin b/vendor/sdl2/sdl_gesture_haptic.odin
index 1c8616e99..a21e0df06 100644
--- a/vendor/sdl2/sdl_gesture_haptic.odin
+++ b/vendor/sdl2/sdl_gesture_haptic.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
// Gesture
@@ -259,4 +260,4 @@ foreign lib {
HapticRumbleInit :: proc(haptic: ^Haptic) -> c.int ---
HapticRumblePlay :: proc(haptic: ^Haptic, strength: f32, length: u32) -> c.int ---
HapticRumbleStop :: proc(haptic: ^Haptic) -> c.int ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_hints.odin b/vendor/sdl2/sdl_hints.odin
index a84e5a090..913d4ea12 100644
--- a/vendor/sdl2/sdl_hints.odin
+++ b/vendor/sdl2/sdl_hints.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
HINT_ACCELEROMETER_AS_JOYSTICK :: "SDL_ACCELEROMETER_AS_JOYSTICK"
HINT_ALLOW_ALT_TAB_WHILE_GRABBED :: "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
@@ -146,4 +147,4 @@ foreign lib {
AddHintCallback :: proc(name: cstring, callback: HintCallback, userdata: rawptr) ---
DelHintCallback :: proc(name: cstring, callback: HintCallback, userdata: rawptr) ---
ClearHints :: proc() ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_joystick.odin b/vendor/sdl2/sdl_joystick.odin
index 1178eae24..35ca5cdcc 100644
--- a/vendor/sdl2/sdl_joystick.odin
+++ b/vendor/sdl2/sdl_joystick.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
Joystick :: struct {}
@@ -106,4 +107,4 @@ foreign lib {
JoystickSendEffect :: proc(joystick: ^Joystick, data: rawptr, size: c.int) -> c.int ---
JoystickClose :: proc(joystick: ^Joystick) ---
JoystickCurrentPowerLevel :: proc(joystick: ^Joystick) -> JoystickPowerLevel ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_keyboard.odin b/vendor/sdl2/sdl_keyboard.odin
index a68c644ab..f880286aa 100644
--- a/vendor/sdl2/sdl_keyboard.odin
+++ b/vendor/sdl2/sdl_keyboard.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
Keysym :: struct {
scancode: Scancode, /**< SDL physical key code - see ::SDL_Scancode for details */
diff --git a/vendor/sdl2/sdl_keycode.odin b/vendor/sdl2/sdl_keycode.odin
index 73637f072..c03fdc2a9 100644
--- a/vendor/sdl2/sdl_keycode.odin
+++ b/vendor/sdl2/sdl_keycode.odin
@@ -327,4 +327,4 @@ KMOD_RESERVED :: Keymod{.RESERVED}
KMOD_CTRL :: Keymod{.LCTRL, .RCTRL}
KMOD_SHIFT :: Keymod{.LSHIFT, .RSHIFT}
KMOD_ALT :: Keymod{.LALT, .RALT}
-KMOD_GUI :: Keymod{.LGUI, .RGUI}; \ No newline at end of file
+KMOD_GUI :: Keymod{.LGUI, .RGUI}
diff --git a/vendor/sdl2/sdl_log.odin b/vendor/sdl2/sdl_log.odin
index d42d82b77..09b7eaef0 100644
--- a/vendor/sdl2/sdl_log.odin
+++ b/vendor/sdl2/sdl_log.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
MAX_LOG_MESSAGE :: 4096
@@ -74,4 +75,4 @@ foreign lib {
// LogMessageV :: proc(category: c.int, priority: LogPriority, fmt: cstring, ap: va_list) ---
LogGetOutputFunction :: proc(callback: ^LogOutputFunction, userdata: ^rawptr) ---
LogSetOutputFunction :: proc(callback: LogOutputFunction, userdata: rawptr) ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_messagebox.odin b/vendor/sdl2/sdl_messagebox.odin
index c66cc4911..6228704ac 100644
--- a/vendor/sdl2/sdl_messagebox.odin
+++ b/vendor/sdl2/sdl_messagebox.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
MessageBoxFlag :: enum u32 {
_ = 0,
diff --git a/vendor/sdl2/sdl_metal.odin b/vendor/sdl2/sdl_metal.odin
index 953c6d45f..1eccf7f5a 100644
--- a/vendor/sdl2/sdl_metal.odin
+++ b/vendor/sdl2/sdl_metal.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
MetalView :: distinct rawptr
@@ -15,4 +16,4 @@ foreign lib {
Metal_DestroyView :: proc(view: MetalView) ---
Metal_GetLayer :: proc(view: MetalView) -> rawptr ---
Metal_GetDrawableSize :: proc(window: ^Window, w, h: ^c.int) ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_mouse.odin b/vendor/sdl2/sdl_mouse.odin
index 5ca8d9b5e..13220c94b 100644
--- a/vendor/sdl2/sdl_mouse.odin
+++ b/vendor/sdl2/sdl_mouse.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
Cursor :: struct {}
@@ -61,4 +62,4 @@ foreign lib {
GetDefaultCursor :: proc() -> ^Cursor ---
FreeCursor :: proc(cursor: ^Cursor) ---
ShowCursor :: proc(toggle: c.int) -> c.int ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_mutex.odin b/vendor/sdl2/sdl_mutex.odin
index 6b9c96319..1fd5849e0 100644
--- a/vendor/sdl2/sdl_mutex.odin
+++ b/vendor/sdl2/sdl_mutex.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
MUTEX_TIMEDOUT :: 1
MUTEX_MAXWAIT :: ~u32(0)
@@ -41,4 +42,4 @@ foreign lib {
CondBroadcast :: proc(cv: ^cond) -> c.int ---
CondWait :: proc(cv: ^cond, m: ^mutex) -> c.int ---
CondWaitTimeout :: proc(cv: ^cond, m: ^mutex, ms: u32) -> c.int ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_pixels.odin b/vendor/sdl2/sdl_pixels.odin
index 3cd2da5f4..8ee06aa1a 100644
--- a/vendor/sdl2/sdl_pixels.odin
+++ b/vendor/sdl2/sdl_pixels.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
ALPHA_OPAQUE :: 255
ALPHA_TRANSPARENT :: 0
@@ -234,4 +235,4 @@ foreign lib {
GetRGB :: proc(pixel: u32, format: ^PixelFormat, r, g, b: ^u8) ---
GetRGBA :: proc(pixel: u32, format: ^PixelFormat, r, g, b, a: ^u8) ---
CalculateGammaRamp :: proc(gamma: f32, ramp: ^[256]u16) ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_rect.odin b/vendor/sdl2/sdl_rect.odin
index b0d6242be..852309cd2 100644
--- a/vendor/sdl2/sdl_rect.odin
+++ b/vendor/sdl2/sdl_rect.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
Point :: struct {
x: c.int,
@@ -47,4 +48,4 @@ foreign lib {
UnionRect :: proc(A, B: ^Rect, result: ^Rect) ---
EnclosePoints :: proc(points: [^]Point, count: c.int, clip: ^Rect, result: ^Rect) -> bool ---
IntersectRectAndLine :: proc(rect: ^Rect, X1, Y1, X2, Y2: ^c.int) -> bool ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_render.odin b/vendor/sdl2/sdl_render.odin
index 435c40570..57845235b 100644
--- a/vendor/sdl2/sdl_render.odin
+++ b/vendor/sdl2/sdl_render.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
RendererFlag :: enum u32 {
SOFTWARE = 0, /**< The renderer is a software fallback */
@@ -140,4 +141,4 @@ foreign lib {
GL_UnbindTexture :: proc(texture: ^Texture) -> c.int ---
RenderGetMetalLayer :: proc(renderer: ^Renderer) -> rawptr ---
RenderGetMetalCommandEncoder :: proc(renderer: ^Renderer) -> rawptr ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_rwops.odin b/vendor/sdl2/sdl_rwops.odin
index 3bee66290..86fb23c75 100644
--- a/vendor/sdl2/sdl_rwops.odin
+++ b/vendor/sdl2/sdl_rwops.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
/* RWops Types */
RWOPS_UNKNOWN :: 0 /**< Unknown stream type */
@@ -105,4 +106,4 @@ foreign lib {
WriteBE32 :: proc(dst: ^RWops, value: ^u32) -> c.size_t ---
WriteLE64 :: proc(dst: ^RWops, value: ^u64) -> c.size_t ---
WriteBE64 :: proc(dst: ^RWops, value: ^u64) -> c.size_t ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_scancode.odin b/vendor/sdl2/sdl_scancode.odin
index d27bba7f7..ca2169778 100644
--- a/vendor/sdl2/sdl_scancode.odin
+++ b/vendor/sdl2/sdl_scancode.odin
@@ -539,4 +539,4 @@ SCANCODE_APP1 :: Scancode.APP1
SCANCODE_APP2 :: Scancode.APP2
SCANCODE_AUDIOREWIND :: Scancode.AUDIOREWIND
-SCANCODE_AUDIOFASTFORWARD :: Scancode.AUDIOFASTFORWARD; \ No newline at end of file
+SCANCODE_AUDIOFASTFORWARD :: Scancode.AUDIOFASTFORWARD
diff --git a/vendor/sdl2/sdl_stdinc.odin b/vendor/sdl2/sdl_stdinc.odin
index 9bd5df4da..97722f4fe 100644
--- a/vendor/sdl2/sdl_stdinc.odin
+++ b/vendor/sdl2/sdl_stdinc.odin
@@ -5,10 +5,11 @@ import "core:intrinsics"
import "core:runtime"
_, _ :: intrinsics, runtime
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
bool :: distinct b32
#assert(size_of(bool) == size_of(c.int))
@@ -160,4 +161,4 @@ iconv_utf8_ucs2 :: proc "c" (s: string) -> [^]u16 {
iconv_utf8_utf32 :: iconv_utf8_ucs4
iconv_utf8_ucs4 :: proc "c" (s: string) -> [^]rune {
return cast([^]rune)iconv_string("UCS-4-INTERNAL", "UTF-8", cstring(raw_data(s)), len(s)+1)
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_surface.odin b/vendor/sdl2/sdl_surface.odin
index e5a5da7ef..f50de35f7 100644
--- a/vendor/sdl2/sdl_surface.odin
+++ b/vendor/sdl2/sdl_surface.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
SWSURFACE :: 0 /**< Just here for compatibility */
PREALLOC :: 0x00000001 /**< Surface uses preallocated memory */
@@ -108,4 +109,4 @@ foreign lib {
SetYUVConversionMode :: proc(mode: YUV_CONVERSION_MODE) ---
GetYUVConversionMode :: proc() -> YUV_CONVERSION_MODE ---
GetYUVConversionModeForResolution :: proc(width, height: c.int) -> YUV_CONVERSION_MODE ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_system.odin b/vendor/sdl2/sdl_system.odin
index 89ae4c707..d9b6b98df 100644
--- a/vendor/sdl2/sdl_system.odin
+++ b/vendor/sdl2/sdl_system.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
// General
@(default_calling_convention="c", link_prefix="SDL_")
@@ -122,4 +123,4 @@ foreign lib {
AndroidGetExternalStoragePath :: proc() -> cstring ---
AndroidRequestPermission :: proc(permission: cstring) -> bool ---
AndroidShowToast :: proc(message: cstring, duration, gravity, xoffset, yoffset: c.int) -> c.int ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_syswm.odin b/vendor/sdl2/sdl_syswm.odin
index 37da1d298..62ca9d628 100644
--- a/vendor/sdl2/sdl_syswm.odin
+++ b/vendor/sdl2/sdl_syswm.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
SYSWM_TYPE :: enum c.int {
UNKNOWN,
@@ -105,4 +106,4 @@ SysWMinfo :: struct {
@(default_calling_convention="c", link_prefix="SDL_")
foreign lib {
GetWindowWMInfo :: proc(window: ^Window, info: ^SysWMinfo) -> bool ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_thread.odin b/vendor/sdl2/sdl_thread.odin
index 98354438b..5d1c0bd37 100644
--- a/vendor/sdl2/sdl_thread.odin
+++ b/vendor/sdl2/sdl_thread.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
Thread :: struct {}
diff --git a/vendor/sdl2/sdl_timer.odin b/vendor/sdl2/sdl_timer.odin
index 357fdd437..d71ed2da5 100644
--- a/vendor/sdl2/sdl_timer.odin
+++ b/vendor/sdl2/sdl_timer.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
TimerCallback :: proc "c" (interval: u32, param: rawptr) -> u32
TimerID :: distinct c.int
@@ -22,4 +23,4 @@ foreign lib {
Delay :: proc(ms: u32) ---
AddTimer :: proc(interval: u32, callback: TimerCallback, param: rawptr) -> TimerID ---
RemoveTimer :: proc(id: TimerID) -> bool ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_touch.odin b/vendor/sdl2/sdl_touch.odin
index d90939cb9..f2a8cc695 100644
--- a/vendor/sdl2/sdl_touch.odin
+++ b/vendor/sdl2/sdl_touch.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
TouchID :: distinct i64
FingerID :: distinct i64
@@ -34,4 +35,4 @@ foreign lib {
GetTouchDeviceType :: proc(touchID: TouchID) -> TouchDeviceType ---
GetNumTouchFingers :: proc(touchID: TouchID) -> c.int ---
GetTouchFinger :: proc(touchID: TouchID, index: c.int) -> ^Finger ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_video.odin b/vendor/sdl2/sdl_video.odin
index 01aaee1e7..86b564541 100644
--- a/vendor/sdl2/sdl_video.odin
+++ b/vendor/sdl2/sdl_video.odin
@@ -2,10 +2,11 @@ package sdl2
import "core:c"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
DisplayMode :: struct {
format: u32, /**< pixel format */
@@ -310,4 +311,4 @@ foreign lib {
// Used by vendor:OpenGL
gl_set_proc_address :: proc(p: rawptr, name: cstring) {
(^rawptr)(p)^ = GL_GetProcAddress(name)
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/sdl_vulkan.odin b/vendor/sdl2/sdl_vulkan.odin
index 66b054524..33bb8e51c 100644
--- a/vendor/sdl2/sdl_vulkan.odin
+++ b/vendor/sdl2/sdl_vulkan.odin
@@ -3,10 +3,11 @@ package sdl2
import "core:c"
import vk "vendor:vulkan"
-when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2.lib"
+} else {
+ foreign import lib "system:SDL2"
+}
VkInstance :: vk.Instance
VkSurfaceKHR :: vk.SurfaceKHR
@@ -22,4 +23,4 @@ foreign lib {
Vulkan_GetInstanceExtensions :: proc(window: ^Window, pCount: ^c.uint, pNames: [^]cstring) -> bool ---
Vulkan_CreateSurface :: proc(window: ^Window, instance: VkInstance, surface: ^VkSurfaceKHR) -> bool ---
Vulkan_GetDrawableSize :: proc(window: ^Window, w, h: ^c.int) ---
-} \ No newline at end of file
+}
diff --git a/vendor/sdl2/ttf/sdl_ttf.odin b/vendor/sdl2/ttf/sdl_ttf.odin
index 8cd1df505..ca9beded0 100644
--- a/vendor/sdl2/ttf/sdl_ttf.odin
+++ b/vendor/sdl2/ttf/sdl_ttf.odin
@@ -3,10 +3,11 @@ package sdl2_ttf
import "core:c"
import SDL ".."
-when ODIN_OS == .Windows { foreign import lib "SDL2_ttf.lib" }
-when ODIN_OS == .Linux { foreign import lib "system:SDL2_ttf" }
-when ODIN_OS == .Darwin { foreign import lib "system:SDL2_ttf" }
-when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2_ttf" }
+when ODIN_OS == .Windows {
+ foreign import lib "SDL2_ttf.lib"
+} else {
+ foreign import lib "system:SDL2_ttf"
+}
bool :: SDL.bool
@@ -163,4 +164,4 @@ foreign lib {
SetFontSDF :: proc(font: ^Font, on_off: bool) -> c.int ---
GetFontSDF :: proc(font: ^Font) -> bool ---
-} \ No newline at end of file
+}
diff --git a/vendor/stb/image/stb_image.odin b/vendor/stb/image/stb_image.odin
index 8a3582792..4f7e43171 100644
--- a/vendor/stb/image/stb_image.odin
+++ b/vendor/stb/image/stb_image.odin
@@ -74,8 +74,9 @@ foreign stbi {
info_from_memory :: proc(buffer: [^]byte, len: c.int, x, y, comp: ^c.int) -> c.int ---
info_from_callbacks :: proc(clbk: ^Io_Callbacks, user: rawptr, x, y, comp: ^c.int) -> c.int ---
- is_16_bit :: proc(filename: cstring) -> b32 ---
- is_16_bit_from_file :: proc(f: ^c.FILE) -> b32 ---
+ is_16_bit :: proc(filename: cstring) -> b32 ---
+ is_16_bit_from_file :: proc(f: ^c.FILE) -> b32 ---
+ is_16_bit_from_memory :: proc(buffer: [^]byte, len: c.int) -> c.int ---
// for image formats that explicitly notate that they have premultiplied alpha,
// we just return the colors as stored in the file. set this flag to force
diff --git a/vendor/stb/src/Makefile b/vendor/stb/src/Makefile
index c65aa7263..5504fede9 100644
--- a/vendor/stb/src/Makefile
+++ b/vendor/stb/src/Makefile
@@ -1,16 +1,16 @@
all:
mkdir -p ../lib
- gcc -c -O2 -Os -fPIC stb_image.c stb_image_write.c stb_image_resize.c stb_truetype.c stb_rect_pack.c stb_vorbis.c
- ar rcs ../lib/stb_image.a stb_image.o
- ar rcs ../lib/stb_image_write.a stb_image_write.o
- ar rcs ../lib/stb_image_resize.a stb_image_resize.o
- ar rcs ../lib/stb_truetype.a stb_truetype.o
- ar rcs ../lib/stb_rect_pack.a stb_rect_pack.o
- #ar rcs ../lib/stb_vorbis_pack.a stb_vorbis_pack.o
- #gcc -fPIC -shared -Wl,-soname=stb_image.so -o ../lib/stb_image.so stb_image.o
- #gcc -fPIC -shared -Wl,-soname=stb_image_write.so -o ../lib/stb_image_write.so stb_image_write.o
- #gcc -fPIC -shared -Wl,-soname=stb_image_resize.so -o ../lib/stb_image_resize.so stb_image_resize.o
- #gcc -fPIC -shared -Wl,-soname=stb_truetype.so -o ../lib/stb_truetype.so stb_image_truetype.o
- #gcc -fPIC -shared -Wl,-soname=stb_rect_pack.so -o ../lib/stb_rect_pack.so stb_rect_packl.o
- #gcc -fPIC -shared -Wl,-soname=stb_vorbis.so -o ../lib/stb_vorbis.so stb_vorbisl.o
+ $(CC) -c -O2 -Os -fPIC stb_image.c stb_image_write.c stb_image_resize.c stb_truetype.c stb_rect_pack.c stb_vorbis.c
+ $(AR) rcs ../lib/stb_image.a stb_image.o
+ $(AR) rcs ../lib/stb_image_write.a stb_image_write.o
+ $(AR) rcs ../lib/stb_image_resize.a stb_image_resize.o
+ $(AR) rcs ../lib/stb_truetype.a stb_truetype.o
+ $(AR) rcs ../lib/stb_rect_pack.a stb_rect_pack.o
+ #$(AR) rcs ../lib/stb_vorbis_pack.a stb_vorbis_pack.o
+ #$(CC) -fPIC -shared -Wl,-soname=stb_image.so -o ../lib/stb_image.so stb_image.o
+ #$(CC) -fPIC -shared -Wl,-soname=stb_image_write.so -o ../lib/stb_image_write.so stb_image_write.o
+ #$(CC) -fPIC -shared -Wl,-soname=stb_image_resize.so -o ../lib/stb_image_resize.so stb_image_resize.o
+ #$(CC) -fPIC -shared -Wl,-soname=stb_truetype.so -o ../lib/stb_truetype.so stb_image_truetype.o
+ #$(CC) -fPIC -shared -Wl,-soname=stb_rect_pack.so -o ../lib/stb_rect_pack.so stb_rect_packl.o
+ #$(CC) -fPIC -shared -Wl,-soname=stb_vorbis.so -o ../lib/stb_vorbis.so stb_vorbisl.o
rm *.o
diff --git a/vendor/vulkan/_gen/create_vulkan_odin_wrapper.py b/vendor/vulkan/_gen/create_vulkan_odin_wrapper.py
index e7fb234c8..f1949f973 100644
--- a/vendor/vulkan/_gen/create_vulkan_odin_wrapper.py
+++ b/vendor/vulkan/_gen/create_vulkan_odin_wrapper.py
@@ -444,7 +444,7 @@ procedure_map = {}
def parse_procedures(f):
data = re.findall(r"typedef (\w+\*?) \(\w+ \*(\w+)\)\((.+?)\);", src, re.S)
- ff = []
+ group_ff = {"Loader":[], "Misc":[], "Instance":[], "Device":[]}
for rt, name, fields in data:
proc_name = no_vk(name)
@@ -464,18 +464,32 @@ def parse_procedures(f):
ts += " -> {}".format(rt_str)
procedure_map[proc_name] = ts
- ff.append( (proc_name, ts) )
- max_len = max(len(n) for n, t in ff)
+ fields_types_name = [do_type(t) for t in re.findall(r"(?:\s*|)(.+?)\s*\w+(?:,|$)", fields)]
+ table_name = fields_types_name[0]
+ nn = (proc_name, ts)
+ if table_name in ('Device', 'Queue', 'CommandBuffer') and proc_name != 'GetDeviceProcAddr':
+ group_ff["Device"].append(nn)
+ elif table_name in ('Instance', 'PhysicalDevice') or proc_name == 'GetDeviceProcAddr':
+ group_ff["Instance"].append(nn)
+ elif table_name in ('rawptr', '', 'DebugReportFlagsEXT') or proc_name == 'GetInstanceProcAddr':
+ group_ff["Misc"].append(nn)
+ else:
+ group_ff["Loader"].append(nn)
+
f.write("import \"core:c\"\n\n")
- f.write("// Procedure Types\n\n");
- for n, t in ff:
- f.write("{} :: #type {}\n".format(n.ljust(max_len), t.replace('"c"', '"system"')))
+ for group_name, ff in group_ff.items():
+ ff.sort()
+ f.write("// {} Procedure Types\n".format(group_name))
+ max_len = max(len(n) for n, t in ff)
+ for n, t in ff:
+ f.write("{} :: #type {}\n".format(n.ljust(max_len), t.replace('"c"', '"system"')))
+ f.write("\n")
def group_functions(f):
data = re.findall(r"typedef (\w+\*?) \(\w+ \*(\w+)\)\((.+?)\);", src, re.S)
- group_map = {"Instance":[], "Device":[], "Loader":[]}
+ group_map = {"Loader":[], "Instance":[], "Device":[]}
for rt, vkname, fields in data:
fields_types_name = [do_type(t) for t in re.findall(r"(?:\s*|)(.+?)\s*\w+(?:,|$)", fields)]
@@ -493,6 +507,8 @@ def group_functions(f):
pass
else:
group_map["Loader"].append(nn)
+ for _, group in group_map.items():
+ group.sort()
for group_name, group_lines in group_map.items():
f.write("// {} Procedures\n".format(group_name))
@@ -502,7 +518,7 @@ def group_functions(f):
f.write('{}: {}\n'.format(remove_prefix(name, "Proc"), name.rjust(max_len)))
f.write("\n")
- f.write("load_proc_addresses :: proc(set_proc_address: SetProcAddressType) {\n")
+ f.write("load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {\n")
for group_name, group_lines in group_map.items():
f.write("\t// {} Procedures\n".format(group_name))
max_len = max(len(name) for name, _ in group_lines)
@@ -514,7 +530,77 @@ def group_functions(f):
remove_prefix(vk_name, 'Proc'),
))
f.write("\n")
- f.write("}\n")
+ f.write("}\n\n")
+
+ f.write("// Device Procedure VTable\n")
+ f.write("Device_VTable :: struct {\n")
+ max_len = max(len(name) for name, _ in group_map["Device"])
+ for name, vk_name in group_map["Device"]:
+ f.write('\t{}: {},\n'.format(remove_prefix(name, "Proc"), name.rjust(max_len)))
+ f.write("}\n\n")
+
+ f.write("load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable) {\n")
+ for name, vk_name in group_map["Device"]:
+ k = max_len - len(name)
+ f.write('\tvtable.{}{} = auto_cast GetDeviceProcAddr(device, "vk{}")\n'.format(
+ remove_prefix(name, 'Proc'),
+ "".ljust(k),
+ remove_prefix(vk_name, 'Proc'),
+ ))
+ f.write("}\n\n")
+
+ f.write("load_proc_addresses_device :: proc(device: Device) {\n")
+ max_len = max(len(name) for name, _ in group_map["Device"])
+ for name, vk_name in group_map["Device"]:
+ k = max_len - len(name)
+ f.write('\t{}{} = auto_cast GetDeviceProcAddr(device, "vk{}")\n'.format(
+ remove_prefix(name, 'Proc'),
+ "".ljust(k),
+ remove_prefix(vk_name, 'Proc'),
+ ))
+ f.write("}\n\n")
+
+ f.write("load_proc_addresses_instance :: proc(instance: Instance) {\n")
+ max_len = max(len(name) for name, _ in group_map["Instance"])
+ for name, vk_name in group_map["Instance"]:
+ k = max_len - len(name)
+ f.write('\t{}{} = auto_cast GetInstanceProcAddr(instance, "vk{}")\n'.format(
+ remove_prefix(name, 'Proc'),
+ "".ljust(k),
+ remove_prefix(vk_name, 'Proc'),
+ ))
+ f.write("\n\t// Device Procedures (may call into dispatch)\n")
+ max_len = max(len(name) for name, _ in group_map["Device"])
+ for name, vk_name in group_map["Device"]:
+ k = max_len - len(name)
+ f.write('\t{}{} = auto_cast GetInstanceProcAddr(instance, "vk{}")\n'.format(
+ remove_prefix(name, 'Proc'),
+ "".ljust(k),
+ remove_prefix(vk_name, 'Proc'),
+ ))
+ f.write("}\n\n")
+
+ f.write("load_proc_addresses_global :: proc(vk_get_instance_proc_addr: rawptr) {\n")
+ f.write("\tGetInstanceProcAddr = auto_cast vk_get_instance_proc_addr\n\n")
+ max_len = max(len(name) for name, _ in group_map["Loader"])
+ for name, vk_name in group_map["Loader"]:
+ k = max_len - len(name)
+ f.write('\t{}{} = auto_cast GetInstanceProcAddr(nil, "vk{}")\n'.format(
+ remove_prefix(name, 'Proc'),
+ "".ljust(k),
+ remove_prefix(vk_name, 'Proc'),
+ ))
+ f.write("}\n\n")
+
+ f.write("""
+load_proc_addresses :: proc{
+\tload_proc_addresses_global,
+\tload_proc_addresses_instance,
+\tload_proc_addresses_device,
+\tload_proc_addresses_device_vtable,
+\tload_proc_addresses_custom,
+}\n
+"""[1::])
@@ -581,14 +667,14 @@ MAX_GLOBAL_PRIORITY_SIZE_EXT :: 16
parse_handles_def(f)
f.write("\n\n")
parse_flags_def(f)
- with open("../enums.odin", 'w', encoding='utf-8') as f:
- f.write(BASE)
- f.write("\n")
- parse_enums(f)
- f.write("\n\n")
- with open("../structs.odin", 'w', encoding='utf-8') as f:
- f.write(BASE)
- f.write("""
+with open("../enums.odin", 'w', encoding='utf-8') as f:
+ f.write(BASE)
+ f.write("\n")
+ parse_enums(f)
+ f.write("\n\n")
+with open("../structs.odin", 'w', encoding='utf-8') as f:
+ f.write(BASE)
+ f.write("""
import "core:c"
when ODIN_OS == .Windows {
@@ -622,13 +708,12 @@ CAMetalLayer :: struct {}
/********************************/
""")
- f.write("\n")
- parse_structs(f)
- f.write("\n\n")
- with open("../procedures.odin", 'w', encoding='utf-8') as f:
- f.write(BASE)
- f.write("\n")
- parse_procedures(f)
- f.write("\n")
- group_functions(f)
- f.write("\n\n") \ No newline at end of file
+ f.write("\n")
+ parse_structs(f)
+ f.write("\n\n")
+with open("../procedures.odin", 'w', encoding='utf-8') as f:
+ f.write(BASE)
+ f.write("\n")
+ parse_procedures(f)
+ f.write("\n")
+ group_functions(f)
diff --git a/vendor/vulkan/procedures.odin b/vendor/vulkan/procedures.odin
index b40523b6d..7557d3c36 100644
--- a/vendor/vulkan/procedures.odin
+++ b/vendor/vulkan/procedures.odin
@@ -5,1412 +5,3025 @@ package vulkan
import "core:c"
-// Procedure Types
+// Loader Procedure Types
+ProcCreateInstance :: #type proc "system" (pCreateInfo: ^InstanceCreateInfo, pAllocator: ^AllocationCallbacks, pInstance: ^Instance) -> Result
+ProcDebugUtilsMessengerCallbackEXT :: #type proc "system" (messageSeverity: DebugUtilsMessageSeverityFlagsEXT, messageTypes: DebugUtilsMessageTypeFlagsEXT, pCallbackData: ^DebugUtilsMessengerCallbackDataEXT, pUserData: rawptr) -> b32
+ProcDeviceMemoryReportCallbackEXT :: #type proc "system" (pCallbackData: ^DeviceMemoryReportCallbackDataEXT, pUserData: rawptr)
+ProcEnumerateInstanceExtensionProperties :: #type proc "system" (pLayerName: cstring, pPropertyCount: ^u32, pProperties: [^]ExtensionProperties) -> Result
+ProcEnumerateInstanceLayerProperties :: #type proc "system" (pPropertyCount: ^u32, pProperties: [^]LayerProperties) -> Result
+ProcEnumerateInstanceVersion :: #type proc "system" (pApiVersion: ^u32) -> Result
-ProcAllocationFunction :: #type proc "system" (pUserData: rawptr, size: int, alignment: int, allocationScope: SystemAllocationScope) -> rawptr
-ProcFreeFunction :: #type proc "system" (pUserData: rawptr, pMemory: rawptr)
-ProcInternalAllocationNotification :: #type proc "system" (pUserData: rawptr, size: int, allocationType: InternalAllocationType, allocationScope: SystemAllocationScope)
-ProcInternalFreeNotification :: #type proc "system" (pUserData: rawptr, size: int, allocationType: InternalAllocationType, allocationScope: SystemAllocationScope)
-ProcReallocationFunction :: #type proc "system" (pUserData: rawptr, pOriginal: rawptr, size: int, alignment: int, allocationScope: SystemAllocationScope) -> rawptr
-ProcVoidFunction :: #type proc "system" ()
-ProcCreateInstance :: #type proc "system" (pCreateInfo: ^InstanceCreateInfo, pAllocator: ^AllocationCallbacks, pInstance: ^Instance) -> Result
-ProcDestroyInstance :: #type proc "system" (instance: Instance, pAllocator: ^AllocationCallbacks)
-ProcEnumeratePhysicalDevices :: #type proc "system" (instance: Instance, pPhysicalDeviceCount: ^u32, pPhysicalDevices: [^]PhysicalDevice) -> Result
-ProcGetPhysicalDeviceFeatures :: #type proc "system" (physicalDevice: PhysicalDevice, pFeatures: [^]PhysicalDeviceFeatures)
-ProcGetPhysicalDeviceFormatProperties :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, pFormatProperties: [^]FormatProperties)
-ProcGetPhysicalDeviceImageFormatProperties :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, type: ImageType, tiling: ImageTiling, usage: ImageUsageFlags, flags: ImageCreateFlags, pImageFormatProperties: [^]ImageFormatProperties) -> Result
-ProcGetPhysicalDeviceProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pProperties: [^]PhysicalDeviceProperties)
-ProcGetPhysicalDeviceQueueFamilyProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pQueueFamilyPropertyCount: ^u32, pQueueFamilyProperties: [^]QueueFamilyProperties)
-ProcGetPhysicalDeviceMemoryProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pMemoryProperties: [^]PhysicalDeviceMemoryProperties)
-ProcGetInstanceProcAddr :: #type proc "system" (instance: Instance, pName: cstring) -> ProcVoidFunction
-ProcGetDeviceProcAddr :: #type proc "system" (device: Device, pName: cstring) -> ProcVoidFunction
+// Misc Procedure Types
+ProcAllocationFunction :: #type proc "system" (pUserData: rawptr, size: int, alignment: int, allocationScope: SystemAllocationScope) -> rawptr
+ProcDebugReportCallbackEXT :: #type proc "system" (flags: DebugReportFlagsEXT, objectType: DebugReportObjectTypeEXT, object: u64, location: int, messageCode: i32, pLayerPrefix: cstring, pMessage: cstring, pUserData: rawptr) -> b32
+ProcFreeFunction :: #type proc "system" (pUserData: rawptr, pMemory: rawptr)
+ProcInternalAllocationNotification :: #type proc "system" (pUserData: rawptr, size: int, allocationType: InternalAllocationType, allocationScope: SystemAllocationScope)
+ProcInternalFreeNotification :: #type proc "system" (pUserData: rawptr, size: int, allocationType: InternalAllocationType, allocationScope: SystemAllocationScope)
+ProcReallocationFunction :: #type proc "system" (pUserData: rawptr, pOriginal: rawptr, size: int, alignment: int, allocationScope: SystemAllocationScope) -> rawptr
+ProcVoidFunction :: #type proc "system" ()
+
+// Instance Procedure Types
+ProcAcquireDrmDisplayEXT :: #type proc "system" (physicalDevice: PhysicalDevice, drmFd: i32, display: DisplayKHR) -> Result
+ProcAcquireWinrtDisplayNV :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR) -> Result
+ProcCreateDebugReportCallbackEXT :: #type proc "system" (instance: Instance, pCreateInfo: ^DebugReportCallbackCreateInfoEXT, pAllocator: ^AllocationCallbacks, pCallback: ^DebugReportCallbackEXT) -> Result
+ProcCreateDebugUtilsMessengerEXT :: #type proc "system" (instance: Instance, pCreateInfo: ^DebugUtilsMessengerCreateInfoEXT, pAllocator: ^AllocationCallbacks, pMessenger: ^DebugUtilsMessengerEXT) -> Result
ProcCreateDevice :: #type proc "system" (physicalDevice: PhysicalDevice, pCreateInfo: ^DeviceCreateInfo, pAllocator: ^AllocationCallbacks, pDevice: ^Device) -> Result
-ProcDestroyDevice :: #type proc "system" (device: Device, pAllocator: ^AllocationCallbacks)
-ProcEnumerateInstanceExtensionProperties :: #type proc "system" (pLayerName: cstring, pPropertyCount: ^u32, pProperties: [^]ExtensionProperties) -> Result
+ProcCreateDisplayModeKHR :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR, pCreateInfo: ^DisplayModeCreateInfoKHR, pAllocator: ^AllocationCallbacks, pMode: ^DisplayModeKHR) -> Result
+ProcCreateDisplayPlaneSurfaceKHR :: #type proc "system" (instance: Instance, pCreateInfo: ^DisplaySurfaceCreateInfoKHR, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
+ProcCreateHeadlessSurfaceEXT :: #type proc "system" (instance: Instance, pCreateInfo: ^HeadlessSurfaceCreateInfoEXT, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
+ProcCreateIOSSurfaceMVK :: #type proc "system" (instance: Instance, pCreateInfo: ^IOSSurfaceCreateInfoMVK, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
+ProcCreateMacOSSurfaceMVK :: #type proc "system" (instance: Instance, pCreateInfo: ^MacOSSurfaceCreateInfoMVK, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
+ProcCreateMetalSurfaceEXT :: #type proc "system" (instance: Instance, pCreateInfo: ^MetalSurfaceCreateInfoEXT, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
+ProcCreateWin32SurfaceKHR :: #type proc "system" (instance: Instance, pCreateInfo: ^Win32SurfaceCreateInfoKHR, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
+ProcDebugReportMessageEXT :: #type proc "system" (instance: Instance, flags: DebugReportFlagsEXT, objectType: DebugReportObjectTypeEXT, object: u64, location: int, messageCode: i32, pLayerPrefix: cstring, pMessage: cstring)
+ProcDestroyDebugReportCallbackEXT :: #type proc "system" (instance: Instance, callback: DebugReportCallbackEXT, pAllocator: ^AllocationCallbacks)
+ProcDestroyDebugUtilsMessengerEXT :: #type proc "system" (instance: Instance, messenger: DebugUtilsMessengerEXT, pAllocator: ^AllocationCallbacks)
+ProcDestroyInstance :: #type proc "system" (instance: Instance, pAllocator: ^AllocationCallbacks)
+ProcDestroySurfaceKHR :: #type proc "system" (instance: Instance, surface: SurfaceKHR, pAllocator: ^AllocationCallbacks)
ProcEnumerateDeviceExtensionProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pLayerName: cstring, pPropertyCount: ^u32, pProperties: [^]ExtensionProperties) -> Result
-ProcEnumerateInstanceLayerProperties :: #type proc "system" (pPropertyCount: ^u32, pProperties: [^]LayerProperties) -> Result
ProcEnumerateDeviceLayerProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]LayerProperties) -> Result
-ProcGetDeviceQueue :: #type proc "system" (device: Device, queueFamilyIndex: u32, queueIndex: u32, pQueue: ^Queue)
-ProcQueueSubmit :: #type proc "system" (queue: Queue, submitCount: u32, pSubmits: [^]SubmitInfo, fence: Fence) -> Result
-ProcQueueWaitIdle :: #type proc "system" (queue: Queue) -> Result
-ProcDeviceWaitIdle :: #type proc "system" (device: Device) -> Result
-ProcAllocateMemory :: #type proc "system" (device: Device, pAllocateInfo: ^MemoryAllocateInfo, pAllocator: ^AllocationCallbacks, pMemory: ^DeviceMemory) -> Result
-ProcFreeMemory :: #type proc "system" (device: Device, memory: DeviceMemory, pAllocator: ^AllocationCallbacks)
-ProcMapMemory :: #type proc "system" (device: Device, memory: DeviceMemory, offset: DeviceSize, size: DeviceSize, flags: MemoryMapFlags, ppData: ^rawptr) -> Result
-ProcUnmapMemory :: #type proc "system" (device: Device, memory: DeviceMemory)
-ProcFlushMappedMemoryRanges :: #type proc "system" (device: Device, memoryRangeCount: u32, pMemoryRanges: [^]MappedMemoryRange) -> Result
-ProcInvalidateMappedMemoryRanges :: #type proc "system" (device: Device, memoryRangeCount: u32, pMemoryRanges: [^]MappedMemoryRange) -> Result
-ProcGetDeviceMemoryCommitment :: #type proc "system" (device: Device, memory: DeviceMemory, pCommittedMemoryInBytes: [^]DeviceSize)
-ProcBindBufferMemory :: #type proc "system" (device: Device, buffer: Buffer, memory: DeviceMemory, memoryOffset: DeviceSize) -> Result
-ProcBindImageMemory :: #type proc "system" (device: Device, image: Image, memory: DeviceMemory, memoryOffset: DeviceSize) -> Result
-ProcGetBufferMemoryRequirements :: #type proc "system" (device: Device, buffer: Buffer, pMemoryRequirements: [^]MemoryRequirements)
-ProcGetImageMemoryRequirements :: #type proc "system" (device: Device, image: Image, pMemoryRequirements: [^]MemoryRequirements)
-ProcGetImageSparseMemoryRequirements :: #type proc "system" (device: Device, image: Image, pSparseMemoryRequirementCount: ^u32, pSparseMemoryRequirements: [^]SparseImageMemoryRequirements)
-ProcGetPhysicalDeviceSparseImageFormatProperties :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, type: ImageType, samples: SampleCountFlags, usage: ImageUsageFlags, tiling: ImageTiling, pPropertyCount: ^u32, pProperties: [^]SparseImageFormatProperties)
-ProcQueueBindSparse :: #type proc "system" (queue: Queue, bindInfoCount: u32, pBindInfo: ^BindSparseInfo, fence: Fence) -> Result
-ProcCreateFence :: #type proc "system" (device: Device, pCreateInfo: ^FenceCreateInfo, pAllocator: ^AllocationCallbacks, pFence: ^Fence) -> Result
-ProcDestroyFence :: #type proc "system" (device: Device, fence: Fence, pAllocator: ^AllocationCallbacks)
-ProcResetFences :: #type proc "system" (device: Device, fenceCount: u32, pFences: [^]Fence) -> Result
-ProcGetFenceStatus :: #type proc "system" (device: Device, fence: Fence) -> Result
-ProcWaitForFences :: #type proc "system" (device: Device, fenceCount: u32, pFences: [^]Fence, waitAll: b32, timeout: u64) -> Result
-ProcCreateSemaphore :: #type proc "system" (device: Device, pCreateInfo: ^SemaphoreCreateInfo, pAllocator: ^AllocationCallbacks, pSemaphore: ^Semaphore) -> Result
-ProcDestroySemaphore :: #type proc "system" (device: Device, semaphore: Semaphore, pAllocator: ^AllocationCallbacks)
-ProcCreateEvent :: #type proc "system" (device: Device, pCreateInfo: ^EventCreateInfo, pAllocator: ^AllocationCallbacks, pEvent: ^Event) -> Result
-ProcDestroyEvent :: #type proc "system" (device: Device, event: Event, pAllocator: ^AllocationCallbacks)
-ProcGetEventStatus :: #type proc "system" (device: Device, event: Event) -> Result
-ProcSetEvent :: #type proc "system" (device: Device, event: Event) -> Result
-ProcResetEvent :: #type proc "system" (device: Device, event: Event) -> Result
-ProcCreateQueryPool :: #type proc "system" (device: Device, pCreateInfo: ^QueryPoolCreateInfo, pAllocator: ^AllocationCallbacks, pQueryPool: ^QueryPool) -> Result
-ProcDestroyQueryPool :: #type proc "system" (device: Device, queryPool: QueryPool, pAllocator: ^AllocationCallbacks)
-ProcGetQueryPoolResults :: #type proc "system" (device: Device, queryPool: QueryPool, firstQuery: u32, queryCount: u32, dataSize: int, pData: rawptr, stride: DeviceSize, flags: QueryResultFlags) -> Result
-ProcCreateBuffer :: #type proc "system" (device: Device, pCreateInfo: ^BufferCreateInfo, pAllocator: ^AllocationCallbacks, pBuffer: ^Buffer) -> Result
-ProcDestroyBuffer :: #type proc "system" (device: Device, buffer: Buffer, pAllocator: ^AllocationCallbacks)
-ProcCreateBufferView :: #type proc "system" (device: Device, pCreateInfo: ^BufferViewCreateInfo, pAllocator: ^AllocationCallbacks, pView: ^BufferView) -> Result
-ProcDestroyBufferView :: #type proc "system" (device: Device, bufferView: BufferView, pAllocator: ^AllocationCallbacks)
-ProcCreateImage :: #type proc "system" (device: Device, pCreateInfo: ^ImageCreateInfo, pAllocator: ^AllocationCallbacks, pImage: ^Image) -> Result
-ProcDestroyImage :: #type proc "system" (device: Device, image: Image, pAllocator: ^AllocationCallbacks)
-ProcGetImageSubresourceLayout :: #type proc "system" (device: Device, image: Image, pSubresource: ^ImageSubresource, pLayout: ^SubresourceLayout)
-ProcCreateImageView :: #type proc "system" (device: Device, pCreateInfo: ^ImageViewCreateInfo, pAllocator: ^AllocationCallbacks, pView: ^ImageView) -> Result
-ProcDestroyImageView :: #type proc "system" (device: Device, imageView: ImageView, pAllocator: ^AllocationCallbacks)
-ProcCreateShaderModule :: #type proc "system" (device: Device, pCreateInfo: ^ShaderModuleCreateInfo, pAllocator: ^AllocationCallbacks, pShaderModule: ^ShaderModule) -> Result
-ProcDestroyShaderModule :: #type proc "system" (device: Device, shaderModule: ShaderModule, pAllocator: ^AllocationCallbacks)
-ProcCreatePipelineCache :: #type proc "system" (device: Device, pCreateInfo: ^PipelineCacheCreateInfo, pAllocator: ^AllocationCallbacks, pPipelineCache: ^PipelineCache) -> Result
-ProcDestroyPipelineCache :: #type proc "system" (device: Device, pipelineCache: PipelineCache, pAllocator: ^AllocationCallbacks)
-ProcGetPipelineCacheData :: #type proc "system" (device: Device, pipelineCache: PipelineCache, pDataSize: ^int, pData: rawptr) -> Result
-ProcMergePipelineCaches :: #type proc "system" (device: Device, dstCache: PipelineCache, srcCacheCount: u32, pSrcCaches: [^]PipelineCache) -> Result
-ProcCreateGraphicsPipelines :: #type proc "system" (device: Device, pipelineCache: PipelineCache, createInfoCount: u32, pCreateInfos: [^]GraphicsPipelineCreateInfo, pAllocator: ^AllocationCallbacks, pPipelines: [^]Pipeline) -> Result
-ProcCreateComputePipelines :: #type proc "system" (device: Device, pipelineCache: PipelineCache, createInfoCount: u32, pCreateInfos: [^]ComputePipelineCreateInfo, pAllocator: ^AllocationCallbacks, pPipelines: [^]Pipeline) -> Result
-ProcDestroyPipeline :: #type proc "system" (device: Device, pipeline: Pipeline, pAllocator: ^AllocationCallbacks)
-ProcCreatePipelineLayout :: #type proc "system" (device: Device, pCreateInfo: ^PipelineLayoutCreateInfo, pAllocator: ^AllocationCallbacks, pPipelineLayout: ^PipelineLayout) -> Result
-ProcDestroyPipelineLayout :: #type proc "system" (device: Device, pipelineLayout: PipelineLayout, pAllocator: ^AllocationCallbacks)
-ProcCreateSampler :: #type proc "system" (device: Device, pCreateInfo: ^SamplerCreateInfo, pAllocator: ^AllocationCallbacks, pSampler: ^Sampler) -> Result
-ProcDestroySampler :: #type proc "system" (device: Device, sampler: Sampler, pAllocator: ^AllocationCallbacks)
-ProcCreateDescriptorSetLayout :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorSetLayoutCreateInfo, pAllocator: ^AllocationCallbacks, pSetLayout: ^DescriptorSetLayout) -> Result
-ProcDestroyDescriptorSetLayout :: #type proc "system" (device: Device, descriptorSetLayout: DescriptorSetLayout, pAllocator: ^AllocationCallbacks)
-ProcCreateDescriptorPool :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorPoolCreateInfo, pAllocator: ^AllocationCallbacks, pDescriptorPool: ^DescriptorPool) -> Result
-ProcDestroyDescriptorPool :: #type proc "system" (device: Device, descriptorPool: DescriptorPool, pAllocator: ^AllocationCallbacks)
-ProcResetDescriptorPool :: #type proc "system" (device: Device, descriptorPool: DescriptorPool, flags: DescriptorPoolResetFlags) -> Result
-ProcAllocateDescriptorSets :: #type proc "system" (device: Device, pAllocateInfo: ^DescriptorSetAllocateInfo, pDescriptorSets: [^]DescriptorSet) -> Result
-ProcFreeDescriptorSets :: #type proc "system" (device: Device, descriptorPool: DescriptorPool, descriptorSetCount: u32, pDescriptorSets: [^]DescriptorSet) -> Result
-ProcUpdateDescriptorSets :: #type proc "system" (device: Device, descriptorWriteCount: u32, pDescriptorWrites: [^]WriteDescriptorSet, descriptorCopyCount: u32, pDescriptorCopies: [^]CopyDescriptorSet)
-ProcCreateFramebuffer :: #type proc "system" (device: Device, pCreateInfo: ^FramebufferCreateInfo, pAllocator: ^AllocationCallbacks, pFramebuffer: ^Framebuffer) -> Result
-ProcDestroyFramebuffer :: #type proc "system" (device: Device, framebuffer: Framebuffer, pAllocator: ^AllocationCallbacks)
-ProcCreateRenderPass :: #type proc "system" (device: Device, pCreateInfo: ^RenderPassCreateInfo, pAllocator: ^AllocationCallbacks, pRenderPass: [^]RenderPass) -> Result
-ProcDestroyRenderPass :: #type proc "system" (device: Device, renderPass: RenderPass, pAllocator: ^AllocationCallbacks)
-ProcGetRenderAreaGranularity :: #type proc "system" (device: Device, renderPass: RenderPass, pGranularity: ^Extent2D)
-ProcCreateCommandPool :: #type proc "system" (device: Device, pCreateInfo: ^CommandPoolCreateInfo, pAllocator: ^AllocationCallbacks, pCommandPool: ^CommandPool) -> Result
-ProcDestroyCommandPool :: #type proc "system" (device: Device, commandPool: CommandPool, pAllocator: ^AllocationCallbacks)
-ProcResetCommandPool :: #type proc "system" (device: Device, commandPool: CommandPool, flags: CommandPoolResetFlags) -> Result
-ProcAllocateCommandBuffers :: #type proc "system" (device: Device, pAllocateInfo: ^CommandBufferAllocateInfo, pCommandBuffers: [^]CommandBuffer) -> Result
-ProcFreeCommandBuffers :: #type proc "system" (device: Device, commandPool: CommandPool, commandBufferCount: u32, pCommandBuffers: [^]CommandBuffer)
-ProcBeginCommandBuffer :: #type proc "system" (commandBuffer: CommandBuffer, pBeginInfo: ^CommandBufferBeginInfo) -> Result
-ProcEndCommandBuffer :: #type proc "system" (commandBuffer: CommandBuffer) -> Result
-ProcResetCommandBuffer :: #type proc "system" (commandBuffer: CommandBuffer, flags: CommandBufferResetFlags) -> Result
-ProcCmdBindPipeline :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, pipeline: Pipeline)
-ProcCmdSetViewport :: #type proc "system" (commandBuffer: CommandBuffer, firstViewport: u32, viewportCount: u32, pViewports: [^]Viewport)
-ProcCmdSetScissor :: #type proc "system" (commandBuffer: CommandBuffer, firstScissor: u32, scissorCount: u32, pScissors: [^]Rect2D)
-ProcCmdSetLineWidth :: #type proc "system" (commandBuffer: CommandBuffer, lineWidth: f32)
-ProcCmdSetDepthBias :: #type proc "system" (commandBuffer: CommandBuffer, depthBiasConstantFactor: f32, depthBiasClamp: f32, depthBiasSlopeFactor: f32)
-ProcCmdSetBlendConstants :: #type proc "system" (commandBuffer: CommandBuffer)
-ProcCmdSetDepthBounds :: #type proc "system" (commandBuffer: CommandBuffer, minDepthBounds: f32, maxDepthBounds: f32)
-ProcCmdSetStencilCompareMask :: #type proc "system" (commandBuffer: CommandBuffer, faceMask: StencilFaceFlags, compareMask: u32)
-ProcCmdSetStencilWriteMask :: #type proc "system" (commandBuffer: CommandBuffer, faceMask: StencilFaceFlags, writeMask: u32)
-ProcCmdSetStencilReference :: #type proc "system" (commandBuffer: CommandBuffer, faceMask: StencilFaceFlags, reference: u32)
-ProcCmdBindDescriptorSets :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, layout: PipelineLayout, firstSet: u32, descriptorSetCount: u32, pDescriptorSets: [^]DescriptorSet, dynamicOffsetCount: u32, pDynamicOffsets: [^]u32)
-ProcCmdBindIndexBuffer :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, indexType: IndexType)
-ProcCmdBindVertexBuffers :: #type proc "system" (commandBuffer: CommandBuffer, firstBinding: u32, bindingCount: u32, pBuffers: [^]Buffer, pOffsets: [^]DeviceSize)
-ProcCmdDraw :: #type proc "system" (commandBuffer: CommandBuffer, vertexCount: u32, instanceCount: u32, firstVertex: u32, firstInstance: u32)
-ProcCmdDrawIndexed :: #type proc "system" (commandBuffer: CommandBuffer, indexCount: u32, instanceCount: u32, firstIndex: u32, vertexOffset: i32, firstInstance: u32)
-ProcCmdDrawIndirect :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, drawCount: u32, stride: u32)
-ProcCmdDrawIndexedIndirect :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, drawCount: u32, stride: u32)
-ProcCmdDispatch :: #type proc "system" (commandBuffer: CommandBuffer, groupCountX: u32, groupCountY: u32, groupCountZ: u32)
-ProcCmdDispatchIndirect :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize)
-ProcCmdCopyBuffer :: #type proc "system" (commandBuffer: CommandBuffer, srcBuffer: Buffer, dstBuffer: Buffer, regionCount: u32, pRegions: [^]BufferCopy)
-ProcCmdCopyImage :: #type proc "system" (commandBuffer: CommandBuffer, srcImage: Image, srcImageLayout: ImageLayout, dstImage: Image, dstImageLayout: ImageLayout, regionCount: u32, pRegions: [^]ImageCopy)
-ProcCmdBlitImage :: #type proc "system" (commandBuffer: CommandBuffer, srcImage: Image, srcImageLayout: ImageLayout, dstImage: Image, dstImageLayout: ImageLayout, regionCount: u32, pRegions: [^]ImageBlit, filter: Filter)
-ProcCmdCopyBufferToImage :: #type proc "system" (commandBuffer: CommandBuffer, srcBuffer: Buffer, dstImage: Image, dstImageLayout: ImageLayout, regionCount: u32, pRegions: [^]BufferImageCopy)
-ProcCmdCopyImageToBuffer :: #type proc "system" (commandBuffer: CommandBuffer, srcImage: Image, srcImageLayout: ImageLayout, dstBuffer: Buffer, regionCount: u32, pRegions: [^]BufferImageCopy)
-ProcCmdUpdateBuffer :: #type proc "system" (commandBuffer: CommandBuffer, dstBuffer: Buffer, dstOffset: DeviceSize, dataSize: DeviceSize, pData: rawptr)
-ProcCmdFillBuffer :: #type proc "system" (commandBuffer: CommandBuffer, dstBuffer: Buffer, dstOffset: DeviceSize, size: DeviceSize, data: u32)
-ProcCmdClearColorImage :: #type proc "system" (commandBuffer: CommandBuffer, image: Image, imageLayout: ImageLayout, pColor: ^ClearColorValue, rangeCount: u32, pRanges: [^]ImageSubresourceRange)
-ProcCmdClearDepthStencilImage :: #type proc "system" (commandBuffer: CommandBuffer, image: Image, imageLayout: ImageLayout, pDepthStencil: ^ClearDepthStencilValue, rangeCount: u32, pRanges: [^]ImageSubresourceRange)
-ProcCmdClearAttachments :: #type proc "system" (commandBuffer: CommandBuffer, attachmentCount: u32, pAttachments: [^]ClearAttachment, rectCount: u32, pRects: [^]ClearRect)
-ProcCmdResolveImage :: #type proc "system" (commandBuffer: CommandBuffer, srcImage: Image, srcImageLayout: ImageLayout, dstImage: Image, dstImageLayout: ImageLayout, regionCount: u32, pRegions: [^]ImageResolve)
-ProcCmdSetEvent :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, stageMask: PipelineStageFlags)
-ProcCmdResetEvent :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, stageMask: PipelineStageFlags)
-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)
-ProcCmdPipelineBarrier :: #type proc "system" (commandBuffer: CommandBuffer, srcStageMask: PipelineStageFlags, dstStageMask: PipelineStageFlags, dependencyFlags: DependencyFlags, memoryBarrierCount: u32, pMemoryBarriers: [^]MemoryBarrier, bufferMemoryBarrierCount: u32, pBufferMemoryBarriers: [^]BufferMemoryBarrier, imageMemoryBarrierCount: u32, pImageMemoryBarriers: [^]ImageMemoryBarrier)
-ProcCmdBeginQuery :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32, flags: QueryControlFlags)
-ProcCmdEndQuery :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32)
-ProcCmdResetQueryPool :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, firstQuery: u32, queryCount: u32)
-ProcCmdWriteTimestamp :: #type proc "system" (commandBuffer: CommandBuffer, pipelineStage: PipelineStageFlags, queryPool: QueryPool, query: u32)
-ProcCmdCopyQueryPoolResults :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, firstQuery: u32, queryCount: u32, dstBuffer: Buffer, dstOffset: DeviceSize, stride: DeviceSize, flags: QueryResultFlags)
-ProcCmdPushConstants :: #type proc "system" (commandBuffer: CommandBuffer, layout: PipelineLayout, stageFlags: ShaderStageFlags, offset: u32, size: u32, pValues: rawptr)
-ProcCmdBeginRenderPass :: #type proc "system" (commandBuffer: CommandBuffer, pRenderPassBegin: ^RenderPassBeginInfo, contents: SubpassContents)
-ProcCmdNextSubpass :: #type proc "system" (commandBuffer: CommandBuffer, contents: SubpassContents)
-ProcCmdEndRenderPass :: #type proc "system" (commandBuffer: CommandBuffer)
-ProcCmdExecuteCommands :: #type proc "system" (commandBuffer: CommandBuffer, commandBufferCount: u32, pCommandBuffers: [^]CommandBuffer)
-ProcEnumerateInstanceVersion :: #type proc "system" (pApiVersion: ^u32) -> Result
-ProcBindBufferMemory2 :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindBufferMemoryInfo) -> Result
-ProcBindImageMemory2 :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindImageMemoryInfo) -> Result
-ProcGetDeviceGroupPeerMemoryFeatures :: #type proc "system" (device: Device, heapIndex: u32, localDeviceIndex: u32, remoteDeviceIndex: u32, pPeerMemoryFeatures: [^]PeerMemoryFeatureFlags)
-ProcCmdSetDeviceMask :: #type proc "system" (commandBuffer: CommandBuffer, deviceMask: u32)
-ProcCmdDispatchBase :: #type proc "system" (commandBuffer: CommandBuffer, baseGroupX: u32, baseGroupY: u32, baseGroupZ: u32, groupCountX: u32, groupCountY: u32, groupCountZ: u32)
ProcEnumeratePhysicalDeviceGroups :: #type proc "system" (instance: Instance, pPhysicalDeviceGroupCount: ^u32, pPhysicalDeviceGroupProperties: [^]PhysicalDeviceGroupProperties) -> Result
-ProcGetImageMemoryRequirements2 :: #type proc "system" (device: Device, pInfo: ^ImageMemoryRequirementsInfo2, pMemoryRequirements: [^]MemoryRequirements2)
-ProcGetBufferMemoryRequirements2 :: #type proc "system" (device: Device, pInfo: ^BufferMemoryRequirementsInfo2, pMemoryRequirements: [^]MemoryRequirements2)
-ProcGetImageSparseMemoryRequirements2 :: #type proc "system" (device: Device, pInfo: ^ImageSparseMemoryRequirementsInfo2, pSparseMemoryRequirementCount: ^u32, pSparseMemoryRequirements: [^]SparseImageMemoryRequirements2)
-ProcGetPhysicalDeviceFeatures2 :: #type proc "system" (physicalDevice: PhysicalDevice, pFeatures: [^]PhysicalDeviceFeatures2)
-ProcGetPhysicalDeviceProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pProperties: [^]PhysicalDeviceProperties2)
-ProcGetPhysicalDeviceFormatProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, pFormatProperties: [^]FormatProperties2)
-ProcGetPhysicalDeviceImageFormatProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pImageFormatInfo: ^PhysicalDeviceImageFormatInfo2, pImageFormatProperties: [^]ImageFormatProperties2) -> Result
-ProcGetPhysicalDeviceQueueFamilyProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pQueueFamilyPropertyCount: ^u32, pQueueFamilyProperties: [^]QueueFamilyProperties2)
-ProcGetPhysicalDeviceMemoryProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pMemoryProperties: [^]PhysicalDeviceMemoryProperties2)
-ProcGetPhysicalDeviceSparseImageFormatProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pFormatInfo: ^PhysicalDeviceSparseImageFormatInfo2, pPropertyCount: ^u32, pProperties: [^]SparseImageFormatProperties2)
-ProcTrimCommandPool :: #type proc "system" (device: Device, commandPool: CommandPool, flags: CommandPoolTrimFlags)
-ProcGetDeviceQueue2 :: #type proc "system" (device: Device, pQueueInfo: ^DeviceQueueInfo2, pQueue: ^Queue)
-ProcCreateSamplerYcbcrConversion :: #type proc "system" (device: Device, pCreateInfo: ^SamplerYcbcrConversionCreateInfo, pAllocator: ^AllocationCallbacks, pYcbcrConversion: ^SamplerYcbcrConversion) -> Result
-ProcDestroySamplerYcbcrConversion :: #type proc "system" (device: Device, ycbcrConversion: SamplerYcbcrConversion, pAllocator: ^AllocationCallbacks)
-ProcCreateDescriptorUpdateTemplate :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorUpdateTemplateCreateInfo, pAllocator: ^AllocationCallbacks, pDescriptorUpdateTemplate: ^DescriptorUpdateTemplate) -> Result
-ProcDestroyDescriptorUpdateTemplate :: #type proc "system" (device: Device, descriptorUpdateTemplate: DescriptorUpdateTemplate, pAllocator: ^AllocationCallbacks)
-ProcUpdateDescriptorSetWithTemplate :: #type proc "system" (device: Device, descriptorSet: DescriptorSet, descriptorUpdateTemplate: DescriptorUpdateTemplate, pData: rawptr)
+ProcEnumeratePhysicalDeviceGroupsKHR :: #type proc "system" (instance: Instance, pPhysicalDeviceGroupCount: ^u32, pPhysicalDeviceGroupProperties: [^]PhysicalDeviceGroupProperties) -> Result
+ProcEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: #type proc "system" (physicalDevice: PhysicalDevice, queueFamilyIndex: u32, pCounterCount: ^u32, pCounters: [^]PerformanceCounterKHR, pCounterDescriptions: [^]PerformanceCounterDescriptionKHR) -> Result
+ProcEnumeratePhysicalDevices :: #type proc "system" (instance: Instance, pPhysicalDeviceCount: ^u32, pPhysicalDevices: [^]PhysicalDevice) -> Result
+ProcGetDisplayModeProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR, pPropertyCount: ^u32, pProperties: [^]DisplayModeProperties2KHR) -> Result
+ProcGetDisplayModePropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR, pPropertyCount: ^u32, pProperties: [^]DisplayModePropertiesKHR) -> Result
+ProcGetDisplayPlaneCapabilities2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pDisplayPlaneInfo: ^DisplayPlaneInfo2KHR, pCapabilities: [^]DisplayPlaneCapabilities2KHR) -> Result
+ProcGetDisplayPlaneCapabilitiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, mode: DisplayModeKHR, planeIndex: u32, pCapabilities: [^]DisplayPlaneCapabilitiesKHR) -> Result
+ProcGetDisplayPlaneSupportedDisplaysKHR :: #type proc "system" (physicalDevice: PhysicalDevice, planeIndex: u32, pDisplayCount: ^u32, pDisplays: [^]DisplayKHR) -> Result
+ProcGetDrmDisplayEXT :: #type proc "system" (physicalDevice: PhysicalDevice, drmFd: i32, connectorId: u32, display: ^DisplayKHR) -> Result
+ProcGetInstanceProcAddr :: #type proc "system" (instance: Instance, pName: cstring) -> ProcVoidFunction
+ProcGetPhysicalDeviceCalibrateableTimeDomainsEXT :: #type proc "system" (physicalDevice: PhysicalDevice, pTimeDomainCount: ^u32, pTimeDomains: [^]TimeDomainEXT) -> 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
+ProcGetPhysicalDeviceDisplayProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]DisplayProperties2KHR) -> Result
+ProcGetPhysicalDeviceDisplayPropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]DisplayPropertiesKHR) -> Result
ProcGetPhysicalDeviceExternalBufferProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalBufferInfo: ^PhysicalDeviceExternalBufferInfo, pExternalBufferProperties: [^]ExternalBufferProperties)
+ProcGetPhysicalDeviceExternalBufferPropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalBufferInfo: ^PhysicalDeviceExternalBufferInfo, pExternalBufferProperties: [^]ExternalBufferProperties)
ProcGetPhysicalDeviceExternalFenceProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalFenceInfo: ^PhysicalDeviceExternalFenceInfo, pExternalFenceProperties: [^]ExternalFenceProperties)
+ProcGetPhysicalDeviceExternalFencePropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalFenceInfo: ^PhysicalDeviceExternalFenceInfo, pExternalFenceProperties: [^]ExternalFenceProperties)
+ProcGetPhysicalDeviceExternalImageFormatPropertiesNV :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, type: ImageType, tiling: ImageTiling, usage: ImageUsageFlags, flags: ImageCreateFlags, externalHandleType: ExternalMemoryHandleTypeFlagsNV, pExternalImageFormatProperties: [^]ExternalImageFormatPropertiesNV) -> Result
ProcGetPhysicalDeviceExternalSemaphoreProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalSemaphoreInfo: ^PhysicalDeviceExternalSemaphoreInfo, pExternalSemaphoreProperties: [^]ExternalSemaphoreProperties)
-ProcGetDescriptorSetLayoutSupport :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorSetLayoutCreateInfo, pSupport: ^DescriptorSetLayoutSupport)
-ProcCmdDrawIndirectCount :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
-ProcCmdDrawIndexedIndirectCount :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
-ProcCreateRenderPass2 :: #type proc "system" (device: Device, pCreateInfo: ^RenderPassCreateInfo2, pAllocator: ^AllocationCallbacks, pRenderPass: [^]RenderPass) -> Result
-ProcCmdBeginRenderPass2 :: #type proc "system" (commandBuffer: CommandBuffer, pRenderPassBegin: ^RenderPassBeginInfo, pSubpassBeginInfo: ^SubpassBeginInfo)
-ProcCmdNextSubpass2 :: #type proc "system" (commandBuffer: CommandBuffer, pSubpassBeginInfo: ^SubpassBeginInfo, pSubpassEndInfo: ^SubpassEndInfo)
-ProcCmdEndRenderPass2 :: #type proc "system" (commandBuffer: CommandBuffer, pSubpassEndInfo: ^SubpassEndInfo)
-ProcResetQueryPool :: #type proc "system" (device: Device, queryPool: QueryPool, firstQuery: u32, queryCount: u32)
-ProcGetSemaphoreCounterValue :: #type proc "system" (device: Device, semaphore: Semaphore, pValue: ^u64) -> Result
-ProcWaitSemaphores :: #type proc "system" (device: Device, pWaitInfo: ^SemaphoreWaitInfo, timeout: u64) -> Result
-ProcSignalSemaphore :: #type proc "system" (device: Device, pSignalInfo: ^SemaphoreSignalInfo) -> Result
-ProcGetBufferDeviceAddress :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> DeviceAddress
-ProcGetBufferOpaqueCaptureAddress :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> u64
-ProcGetDeviceMemoryOpaqueCaptureAddress :: #type proc "system" (device: Device, pInfo: ^DeviceMemoryOpaqueCaptureAddressInfo) -> u64
-ProcDestroySurfaceKHR :: #type proc "system" (instance: Instance, surface: SurfaceKHR, pAllocator: ^AllocationCallbacks)
-ProcGetPhysicalDeviceSurfaceSupportKHR :: #type proc "system" (physicalDevice: PhysicalDevice, queueFamilyIndex: u32, surface: SurfaceKHR, pSupported: ^b32) -> Result
-ProcGetPhysicalDeviceSurfaceCapabilitiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pSurfaceCapabilities: [^]SurfaceCapabilitiesKHR) -> Result
-ProcGetPhysicalDeviceSurfaceFormatsKHR :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pSurfaceFormatCount: ^u32, pSurfaceFormats: [^]SurfaceFormatKHR) -> Result
-ProcGetPhysicalDeviceSurfacePresentModesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pPresentModeCount: ^u32, pPresentModes: [^]PresentModeKHR) -> Result
-ProcCreateSwapchainKHR :: #type proc "system" (device: Device, pCreateInfo: ^SwapchainCreateInfoKHR, pAllocator: ^AllocationCallbacks, pSwapchain: ^SwapchainKHR) -> Result
-ProcDestroySwapchainKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pAllocator: ^AllocationCallbacks)
-ProcGetSwapchainImagesKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pSwapchainImageCount: ^u32, pSwapchainImages: [^]Image) -> Result
-ProcAcquireNextImageKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR, timeout: u64, semaphore: Semaphore, fence: Fence, pImageIndex: ^u32) -> Result
-ProcQueuePresentKHR :: #type proc "system" (queue: Queue, pPresentInfo: ^PresentInfoKHR) -> Result
-ProcGetDeviceGroupPresentCapabilitiesKHR :: #type proc "system" (device: Device, pDeviceGroupPresentCapabilities: [^]DeviceGroupPresentCapabilitiesKHR) -> Result
-ProcGetDeviceGroupSurfacePresentModesKHR :: #type proc "system" (device: Device, surface: SurfaceKHR, pModes: [^]DeviceGroupPresentModeFlagsKHR) -> Result
-ProcGetPhysicalDevicePresentRectanglesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pRectCount: ^u32, pRects: [^]Rect2D) -> Result
-ProcAcquireNextImage2KHR :: #type proc "system" (device: Device, pAcquireInfo: ^AcquireNextImageInfoKHR, pImageIndex: ^u32) -> Result
-ProcGetPhysicalDeviceDisplayPropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]DisplayPropertiesKHR) -> Result
-ProcGetPhysicalDeviceDisplayPlanePropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]DisplayPlanePropertiesKHR) -> Result
-ProcGetDisplayPlaneSupportedDisplaysKHR :: #type proc "system" (physicalDevice: PhysicalDevice, planeIndex: u32, pDisplayCount: ^u32, pDisplays: [^]DisplayKHR) -> Result
-ProcGetDisplayModePropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR, pPropertyCount: ^u32, pProperties: [^]DisplayModePropertiesKHR) -> Result
-ProcCreateDisplayModeKHR :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR, pCreateInfo: ^DisplayModeCreateInfoKHR, pAllocator: ^AllocationCallbacks, pMode: ^DisplayModeKHR) -> Result
-ProcGetDisplayPlaneCapabilitiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, mode: DisplayModeKHR, planeIndex: u32, pCapabilities: [^]DisplayPlaneCapabilitiesKHR) -> Result
-ProcCreateDisplayPlaneSurfaceKHR :: #type proc "system" (instance: Instance, pCreateInfo: ^DisplaySurfaceCreateInfoKHR, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
-ProcCreateSharedSwapchainsKHR :: #type proc "system" (device: Device, swapchainCount: u32, pCreateInfos: [^]SwapchainCreateInfoKHR, pAllocator: ^AllocationCallbacks, pSwapchains: [^]SwapchainKHR) -> Result
+ProcGetPhysicalDeviceExternalSemaphorePropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalSemaphoreInfo: ^PhysicalDeviceExternalSemaphoreInfo, pExternalSemaphoreProperties: [^]ExternalSemaphoreProperties)
+ProcGetPhysicalDeviceFeatures :: #type proc "system" (physicalDevice: PhysicalDevice, pFeatures: [^]PhysicalDeviceFeatures)
+ProcGetPhysicalDeviceFeatures2 :: #type proc "system" (physicalDevice: PhysicalDevice, pFeatures: [^]PhysicalDeviceFeatures2)
ProcGetPhysicalDeviceFeatures2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pFeatures: [^]PhysicalDeviceFeatures2)
-ProcGetPhysicalDeviceProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pProperties: [^]PhysicalDeviceProperties2)
+ProcGetPhysicalDeviceFormatProperties :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, pFormatProperties: [^]FormatProperties)
+ProcGetPhysicalDeviceFormatProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, pFormatProperties: [^]FormatProperties2)
ProcGetPhysicalDeviceFormatProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, pFormatProperties: [^]FormatProperties2)
+ProcGetPhysicalDeviceFragmentShadingRatesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pFragmentShadingRateCount: ^u32, pFragmentShadingRates: [^]PhysicalDeviceFragmentShadingRateKHR) -> Result
+ProcGetPhysicalDeviceImageFormatProperties :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, type: ImageType, tiling: ImageTiling, usage: ImageUsageFlags, flags: ImageCreateFlags, pImageFormatProperties: [^]ImageFormatProperties) -> Result
+ProcGetPhysicalDeviceImageFormatProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pImageFormatInfo: ^PhysicalDeviceImageFormatInfo2, pImageFormatProperties: [^]ImageFormatProperties2) -> Result
ProcGetPhysicalDeviceImageFormatProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pImageFormatInfo: ^PhysicalDeviceImageFormatInfo2, pImageFormatProperties: [^]ImageFormatProperties2) -> Result
-ProcGetPhysicalDeviceQueueFamilyProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pQueueFamilyPropertyCount: ^u32, pQueueFamilyProperties: [^]QueueFamilyProperties2)
+ProcGetPhysicalDeviceMemoryProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pMemoryProperties: [^]PhysicalDeviceMemoryProperties)
+ProcGetPhysicalDeviceMemoryProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pMemoryProperties: [^]PhysicalDeviceMemoryProperties2)
ProcGetPhysicalDeviceMemoryProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pMemoryProperties: [^]PhysicalDeviceMemoryProperties2)
-ProcGetPhysicalDeviceSparseImageFormatProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pFormatInfo: ^PhysicalDeviceSparseImageFormatInfo2, pPropertyCount: ^u32, pProperties: [^]SparseImageFormatProperties2)
-ProcGetDeviceGroupPeerMemoryFeaturesKHR :: #type proc "system" (device: Device, heapIndex: u32, localDeviceIndex: u32, remoteDeviceIndex: u32, pPeerMemoryFeatures: [^]PeerMemoryFeatureFlags)
-ProcCmdSetDeviceMaskKHR :: #type proc "system" (commandBuffer: CommandBuffer, deviceMask: u32)
-ProcCmdDispatchBaseKHR :: #type proc "system" (commandBuffer: CommandBuffer, baseGroupX: u32, baseGroupY: u32, baseGroupZ: u32, groupCountX: u32, groupCountY: u32, groupCountZ: u32)
-ProcTrimCommandPoolKHR :: #type proc "system" (device: Device, commandPool: CommandPool, flags: CommandPoolTrimFlags)
-ProcEnumeratePhysicalDeviceGroupsKHR :: #type proc "system" (instance: Instance, pPhysicalDeviceGroupCount: ^u32, pPhysicalDeviceGroupProperties: [^]PhysicalDeviceGroupProperties) -> Result
-ProcGetPhysicalDeviceExternalBufferPropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalBufferInfo: ^PhysicalDeviceExternalBufferInfo, pExternalBufferProperties: [^]ExternalBufferProperties)
-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
-ProcGetPhysicalDeviceExternalSemaphorePropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalSemaphoreInfo: ^PhysicalDeviceExternalSemaphoreInfo, pExternalSemaphoreProperties: [^]ExternalSemaphoreProperties)
-ProcImportSemaphoreFdKHR :: #type proc "system" (device: Device, pImportSemaphoreFdInfo: ^ImportSemaphoreFdInfoKHR) -> Result
-ProcGetSemaphoreFdKHR :: #type proc "system" (device: Device, pGetFdInfo: ^SemaphoreGetFdInfoKHR, pFd: ^c.int) -> Result
-ProcCmdPushDescriptorSetKHR :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, layout: PipelineLayout, set: u32, descriptorWriteCount: u32, pDescriptorWrites: [^]WriteDescriptorSet)
-ProcCmdPushDescriptorSetWithTemplateKHR :: #type proc "system" (commandBuffer: CommandBuffer, descriptorUpdateTemplate: DescriptorUpdateTemplate, layout: PipelineLayout, set: u32, pData: rawptr)
-ProcCreateDescriptorUpdateTemplateKHR :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorUpdateTemplateCreateInfo, pAllocator: ^AllocationCallbacks, pDescriptorUpdateTemplate: ^DescriptorUpdateTemplate) -> Result
-ProcDestroyDescriptorUpdateTemplateKHR :: #type proc "system" (device: Device, descriptorUpdateTemplate: DescriptorUpdateTemplate, pAllocator: ^AllocationCallbacks)
-ProcUpdateDescriptorSetWithTemplateKHR :: #type proc "system" (device: Device, descriptorSet: DescriptorSet, descriptorUpdateTemplate: DescriptorUpdateTemplate, pData: rawptr)
-ProcCreateRenderPass2KHR :: #type proc "system" (device: Device, pCreateInfo: ^RenderPassCreateInfo2, pAllocator: ^AllocationCallbacks, pRenderPass: [^]RenderPass) -> Result
-ProcCmdBeginRenderPass2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pRenderPassBegin: ^RenderPassBeginInfo, pSubpassBeginInfo: ^SubpassBeginInfo)
-ProcCmdNextSubpass2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pSubpassBeginInfo: ^SubpassBeginInfo, pSubpassEndInfo: ^SubpassEndInfo)
-ProcCmdEndRenderPass2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pSubpassEndInfo: ^SubpassEndInfo)
-ProcGetSwapchainStatusKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR) -> Result
-ProcGetPhysicalDeviceExternalFencePropertiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pExternalFenceInfo: ^PhysicalDeviceExternalFenceInfo, pExternalFenceProperties: [^]ExternalFenceProperties)
-ProcImportFenceFdKHR :: #type proc "system" (device: Device, pImportFenceFdInfo: ^ImportFenceFdInfoKHR) -> Result
-ProcGetFenceFdKHR :: #type proc "system" (device: Device, pGetFdInfo: ^FenceGetFdInfoKHR, pFd: ^c.int) -> Result
-ProcEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: #type proc "system" (physicalDevice: PhysicalDevice, queueFamilyIndex: u32, pCounterCount: ^u32, pCounters: [^]PerformanceCounterKHR, pCounterDescriptions: [^]PerformanceCounterDescriptionKHR) -> Result
+ProcGetPhysicalDeviceMultisamplePropertiesEXT :: #type proc "system" (physicalDevice: PhysicalDevice, samples: SampleCountFlags, pMultisampleProperties: [^]MultisamplePropertiesEXT)
+ProcGetPhysicalDevicePresentRectanglesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pRectCount: ^u32, pRects: [^]Rect2D) -> Result
+ProcGetPhysicalDeviceProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pProperties: [^]PhysicalDeviceProperties)
+ProcGetPhysicalDeviceProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pProperties: [^]PhysicalDeviceProperties2)
+ProcGetPhysicalDeviceProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pProperties: [^]PhysicalDeviceProperties2)
ProcGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPerformanceQueryCreateInfo: ^QueryPoolPerformanceCreateInfoKHR, pNumPasses: [^]u32)
-ProcAcquireProfilingLockKHR :: #type proc "system" (device: Device, pInfo: ^AcquireProfilingLockInfoKHR) -> Result
-ProcReleaseProfilingLockKHR :: #type proc "system" (device: Device)
+ProcGetPhysicalDeviceQueueFamilyProperties :: #type proc "system" (physicalDevice: PhysicalDevice, pQueueFamilyPropertyCount: ^u32, pQueueFamilyProperties: [^]QueueFamilyProperties)
+ProcGetPhysicalDeviceQueueFamilyProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pQueueFamilyPropertyCount: ^u32, pQueueFamilyProperties: [^]QueueFamilyProperties2)
+ProcGetPhysicalDeviceQueueFamilyProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pQueueFamilyPropertyCount: ^u32, pQueueFamilyProperties: [^]QueueFamilyProperties2)
+ProcGetPhysicalDeviceSparseImageFormatProperties :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, type: ImageType, samples: SampleCountFlags, usage: ImageUsageFlags, tiling: ImageTiling, pPropertyCount: ^u32, pProperties: [^]SparseImageFormatProperties)
+ProcGetPhysicalDeviceSparseImageFormatProperties2 :: #type proc "system" (physicalDevice: PhysicalDevice, pFormatInfo: ^PhysicalDeviceSparseImageFormatInfo2, pPropertyCount: ^u32, pProperties: [^]SparseImageFormatProperties2)
+ProcGetPhysicalDeviceSparseImageFormatProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pFormatInfo: ^PhysicalDeviceSparseImageFormatInfo2, pPropertyCount: ^u32, pProperties: [^]SparseImageFormatProperties2)
+ProcGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV :: #type proc "system" (physicalDevice: PhysicalDevice, pCombinationCount: ^u32, pCombinations: [^]FramebufferMixedSamplesCombinationNV) -> Result
+ProcGetPhysicalDeviceSurfaceCapabilities2EXT :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pSurfaceCapabilities: [^]SurfaceCapabilities2EXT) -> Result
ProcGetPhysicalDeviceSurfaceCapabilities2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pSurfaceInfo: ^PhysicalDeviceSurfaceInfo2KHR, pSurfaceCapabilities: [^]SurfaceCapabilities2KHR) -> Result
+ProcGetPhysicalDeviceSurfaceCapabilitiesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pSurfaceCapabilities: [^]SurfaceCapabilitiesKHR) -> Result
ProcGetPhysicalDeviceSurfaceFormats2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pSurfaceInfo: ^PhysicalDeviceSurfaceInfo2KHR, pSurfaceFormatCount: ^u32, pSurfaceFormats: [^]SurfaceFormat2KHR) -> Result
-ProcGetPhysicalDeviceDisplayProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]DisplayProperties2KHR) -> Result
-ProcGetPhysicalDeviceDisplayPlaneProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]DisplayPlaneProperties2KHR) -> Result
-ProcGetDisplayModeProperties2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR, pPropertyCount: ^u32, pProperties: [^]DisplayModeProperties2KHR) -> Result
-ProcGetDisplayPlaneCapabilities2KHR :: #type proc "system" (physicalDevice: PhysicalDevice, pDisplayPlaneInfo: ^DisplayPlaneInfo2KHR, pCapabilities: [^]DisplayPlaneCapabilities2KHR) -> Result
-ProcGetImageMemoryRequirements2KHR :: #type proc "system" (device: Device, pInfo: ^ImageMemoryRequirementsInfo2, pMemoryRequirements: [^]MemoryRequirements2)
-ProcGetBufferMemoryRequirements2KHR :: #type proc "system" (device: Device, pInfo: ^BufferMemoryRequirementsInfo2, pMemoryRequirements: [^]MemoryRequirements2)
-ProcGetImageSparseMemoryRequirements2KHR :: #type proc "system" (device: Device, pInfo: ^ImageSparseMemoryRequirementsInfo2, pSparseMemoryRequirementCount: ^u32, pSparseMemoryRequirements: [^]SparseImageMemoryRequirements2)
-ProcCreateSamplerYcbcrConversionKHR :: #type proc "system" (device: Device, pCreateInfo: ^SamplerYcbcrConversionCreateInfo, pAllocator: ^AllocationCallbacks, pYcbcrConversion: ^SamplerYcbcrConversion) -> Result
-ProcDestroySamplerYcbcrConversionKHR :: #type proc "system" (device: Device, ycbcrConversion: SamplerYcbcrConversion, pAllocator: ^AllocationCallbacks)
-ProcBindBufferMemory2KHR :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindBufferMemoryInfo) -> Result
-ProcBindImageMemory2KHR :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindImageMemoryInfo) -> Result
-ProcGetDescriptorSetLayoutSupportKHR :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorSetLayoutCreateInfo, pSupport: ^DescriptorSetLayoutSupport)
-ProcCmdDrawIndirectCountKHR :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
-ProcCmdDrawIndexedIndirectCountKHR :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
-ProcGetSemaphoreCounterValueKHR :: #type proc "system" (device: Device, semaphore: Semaphore, pValue: ^u64) -> Result
-ProcWaitSemaphoresKHR :: #type proc "system" (device: Device, pWaitInfo: ^SemaphoreWaitInfo, timeout: u64) -> Result
-ProcSignalSemaphoreKHR :: #type proc "system" (device: Device, pSignalInfo: ^SemaphoreSignalInfo) -> Result
-ProcGetPhysicalDeviceFragmentShadingRatesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, pFragmentShadingRateCount: ^u32, pFragmentShadingRates: [^]PhysicalDeviceFragmentShadingRateKHR) -> Result
-ProcCmdSetFragmentShadingRateKHR :: #type proc "system" (commandBuffer: CommandBuffer, pFragmentSize: ^Extent2D)
-ProcWaitForPresentKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR, presentId: u64, timeout: u64) -> Result
-ProcGetBufferDeviceAddressKHR :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> DeviceAddress
-ProcGetBufferOpaqueCaptureAddressKHR :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> u64
-ProcGetDeviceMemoryOpaqueCaptureAddressKHR :: #type proc "system" (device: Device, pInfo: ^DeviceMemoryOpaqueCaptureAddressInfo) -> u64
-ProcCreateDeferredOperationKHR :: #type proc "system" (device: Device, pAllocator: ^AllocationCallbacks, pDeferredOperation: ^DeferredOperationKHR) -> Result
-ProcDestroyDeferredOperationKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR, pAllocator: ^AllocationCallbacks)
-ProcGetDeferredOperationMaxConcurrencyKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR) -> u32
-ProcGetDeferredOperationResultKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR) -> Result
-ProcDeferredOperationJoinKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR) -> 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
-ProcGetPipelineExecutableInternalRepresentationsKHR :: #type proc "system" (device: Device, pExecutableInfo: ^PipelineExecutableInfoKHR, pInternalRepresentationCount: ^u32, pInternalRepresentations: [^]PipelineExecutableInternalRepresentationKHR) -> Result
-ProcCmdSetEvent2KHR :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, pDependencyInfo: ^DependencyInfoKHR)
-ProcCmdResetEvent2KHR :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, stageMask: PipelineStageFlags2KHR)
-ProcCmdWaitEvents2KHR :: #type proc "system" (commandBuffer: CommandBuffer, eventCount: u32, pEvents: [^]Event, pDependencyInfos: [^]DependencyInfoKHR)
-ProcCmdPipelineBarrier2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pDependencyInfo: ^DependencyInfoKHR)
-ProcCmdWriteTimestamp2KHR :: #type proc "system" (commandBuffer: CommandBuffer, stage: PipelineStageFlags2KHR, queryPool: QueryPool, query: u32)
-ProcQueueSubmit2KHR :: #type proc "system" (queue: Queue, submitCount: u32, pSubmits: [^]SubmitInfo2KHR, fence: Fence) -> Result
-ProcCmdWriteBufferMarker2AMD :: #type proc "system" (commandBuffer: CommandBuffer, stage: PipelineStageFlags2KHR, dstBuffer: Buffer, dstOffset: DeviceSize, marker: u32)
-ProcGetQueueCheckpointData2NV :: #type proc "system" (queue: Queue, pCheckpointDataCount: ^u32, pCheckpointData: ^CheckpointData2NV)
-ProcCmdCopyBuffer2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pCopyBufferInfo: ^CopyBufferInfo2KHR)
-ProcCmdCopyImage2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pCopyImageInfo: ^CopyImageInfo2KHR)
-ProcCmdCopyBufferToImage2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pCopyBufferToImageInfo: ^CopyBufferToImageInfo2KHR)
-ProcCmdCopyImageToBuffer2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pCopyImageToBufferInfo: ^CopyImageToBufferInfo2KHR)
-ProcCmdBlitImage2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pBlitImageInfo: ^BlitImageInfo2KHR)
-ProcCmdResolveImage2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pResolveImageInfo: ^ResolveImageInfo2KHR)
-ProcDebugReportCallbackEXT :: #type proc "system" (flags: DebugReportFlagsEXT, objectType: DebugReportObjectTypeEXT, object: u64, location: int, messageCode: i32, pLayerPrefix: cstring, pMessage: cstring, pUserData: rawptr) -> b32
-ProcCreateDebugReportCallbackEXT :: #type proc "system" (instance: Instance, pCreateInfo: ^DebugReportCallbackCreateInfoEXT, pAllocator: ^AllocationCallbacks, pCallback: ^DebugReportCallbackEXT) -> Result
-ProcDestroyDebugReportCallbackEXT :: #type proc "system" (instance: Instance, callback: DebugReportCallbackEXT, pAllocator: ^AllocationCallbacks)
-ProcDebugReportMessageEXT :: #type proc "system" (instance: Instance, flags: DebugReportFlagsEXT, objectType: DebugReportObjectTypeEXT, object: u64, location: int, messageCode: i32, pLayerPrefix: cstring, pMessage: cstring)
-ProcDebugMarkerSetObjectTagEXT :: #type proc "system" (device: Device, pTagInfo: ^DebugMarkerObjectTagInfoEXT) -> Result
-ProcDebugMarkerSetObjectNameEXT :: #type proc "system" (device: Device, pNameInfo: ^DebugMarkerObjectNameInfoEXT) -> Result
-ProcCmdDebugMarkerBeginEXT :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^DebugMarkerMarkerInfoEXT)
-ProcCmdDebugMarkerEndEXT :: #type proc "system" (commandBuffer: CommandBuffer)
-ProcCmdDebugMarkerInsertEXT :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^DebugMarkerMarkerInfoEXT)
-ProcCmdBindTransformFeedbackBuffersEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstBinding: u32, bindingCount: u32, pBuffers: [^]Buffer, pOffsets: [^]DeviceSize, pSizes: [^]DeviceSize)
-ProcCmdBeginTransformFeedbackEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstCounterBuffer: u32, counterBufferCount: u32, pCounterBuffers: [^]Buffer, pCounterBufferOffsets: [^]DeviceSize)
-ProcCmdEndTransformFeedbackEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstCounterBuffer: u32, counterBufferCount: u32, pCounterBuffers: [^]Buffer, pCounterBufferOffsets: [^]DeviceSize)
-ProcCmdBeginQueryIndexedEXT :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32, flags: QueryControlFlags, index: u32)
-ProcCmdEndQueryIndexedEXT :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32, index: u32)
-ProcCmdDrawIndirectByteCountEXT :: #type proc "system" (commandBuffer: CommandBuffer, instanceCount: u32, firstInstance: u32, counterBuffer: Buffer, counterBufferOffset: DeviceSize, counterOffset: u32, vertexStride: u32)
-ProcCreateCuModuleNVX :: #type proc "system" (device: Device, pCreateInfo: ^CuModuleCreateInfoNVX, pAllocator: ^AllocationCallbacks, pModule: ^CuModuleNVX) -> Result
-ProcCreateCuFunctionNVX :: #type proc "system" (device: Device, pCreateInfo: ^CuFunctionCreateInfoNVX, pAllocator: ^AllocationCallbacks, pFunction: ^CuFunctionNVX) -> Result
-ProcDestroyCuModuleNVX :: #type proc "system" (device: Device, module: CuModuleNVX, pAllocator: ^AllocationCallbacks)
-ProcDestroyCuFunctionNVX :: #type proc "system" (device: Device, function: CuFunctionNVX, pAllocator: ^AllocationCallbacks)
-ProcCmdCuLaunchKernelNVX :: #type proc "system" (commandBuffer: CommandBuffer, pLaunchInfo: ^CuLaunchInfoNVX)
-ProcGetImageViewHandleNVX :: #type proc "system" (device: Device, pInfo: ^ImageViewHandleInfoNVX) -> u32
-ProcGetImageViewAddressNVX :: #type proc "system" (device: Device, imageView: ImageView, pProperties: [^]ImageViewAddressPropertiesNVX) -> Result
-ProcCmdDrawIndirectCountAMD :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
-ProcCmdDrawIndexedIndirectCountAMD :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
-ProcGetShaderInfoAMD :: #type proc "system" (device: Device, pipeline: Pipeline, shaderStage: ShaderStageFlags, infoType: ShaderInfoTypeAMD, pInfoSize: ^int, pInfo: rawptr) -> Result
-ProcGetPhysicalDeviceExternalImageFormatPropertiesNV :: #type proc "system" (physicalDevice: PhysicalDevice, format: Format, type: ImageType, tiling: ImageTiling, usage: ImageUsageFlags, flags: ImageCreateFlags, externalHandleType: ExternalMemoryHandleTypeFlagsNV, pExternalImageFormatProperties: [^]ExternalImageFormatPropertiesNV) -> Result
-ProcCmdBeginConditionalRenderingEXT :: #type proc "system" (commandBuffer: CommandBuffer, pConditionalRenderingBegin: ^ConditionalRenderingBeginInfoEXT)
-ProcCmdEndConditionalRenderingEXT :: #type proc "system" (commandBuffer: CommandBuffer)
-ProcCmdSetViewportWScalingNV :: #type proc "system" (commandBuffer: CommandBuffer, firstViewport: u32, viewportCount: u32, pViewportWScalings: [^]ViewportWScalingNV)
-ProcReleaseDisplayEXT :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR) -> Result
-ProcGetPhysicalDeviceSurfaceCapabilities2EXT :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pSurfaceCapabilities: [^]SurfaceCapabilities2EXT) -> Result
-ProcDisplayPowerControlEXT :: #type proc "system" (device: Device, display: DisplayKHR, pDisplayPowerInfo: ^DisplayPowerInfoEXT) -> 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
-ProcGetSwapchainCounterEXT :: #type proc "system" (device: Device, swapchain: SwapchainKHR, counter: SurfaceCounterFlagsEXT, pCounterValue: ^u64) -> Result
-ProcGetRefreshCycleDurationGOOGLE :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pDisplayTimingProperties: [^]RefreshCycleDurationGOOGLE) -> Result
-ProcGetPastPresentationTimingGOOGLE :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pPresentationTimingCount: ^u32, pPresentationTimings: [^]PastPresentationTimingGOOGLE) -> Result
-ProcCmdSetDiscardRectangleEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstDiscardRectangle: u32, discardRectangleCount: u32, pDiscardRectangles: [^]Rect2D)
-ProcSetHdrMetadataEXT :: #type proc "system" (device: Device, swapchainCount: u32, pSwapchains: [^]SwapchainKHR, pMetadata: ^HdrMetadataEXT)
-ProcDebugUtilsMessengerCallbackEXT :: #type proc "system" (messageSeverity: DebugUtilsMessageSeverityFlagsEXT, messageTypes: DebugUtilsMessageTypeFlagsEXT, pCallbackData: ^DebugUtilsMessengerCallbackDataEXT, pUserData: rawptr) -> b32
-ProcSetDebugUtilsObjectNameEXT :: #type proc "system" (device: Device, pNameInfo: ^DebugUtilsObjectNameInfoEXT) -> Result
-ProcSetDebugUtilsObjectTagEXT :: #type proc "system" (device: Device, pTagInfo: ^DebugUtilsObjectTagInfoEXT) -> Result
-ProcQueueBeginDebugUtilsLabelEXT :: #type proc "system" (queue: Queue, pLabelInfo: ^DebugUtilsLabelEXT)
-ProcQueueEndDebugUtilsLabelEXT :: #type proc "system" (queue: Queue)
-ProcQueueInsertDebugUtilsLabelEXT :: #type proc "system" (queue: Queue, pLabelInfo: ^DebugUtilsLabelEXT)
-ProcCmdBeginDebugUtilsLabelEXT :: #type proc "system" (commandBuffer: CommandBuffer, pLabelInfo: ^DebugUtilsLabelEXT)
-ProcCmdEndDebugUtilsLabelEXT :: #type proc "system" (commandBuffer: CommandBuffer)
-ProcCmdInsertDebugUtilsLabelEXT :: #type proc "system" (commandBuffer: CommandBuffer, pLabelInfo: ^DebugUtilsLabelEXT)
-ProcCreateDebugUtilsMessengerEXT :: #type proc "system" (instance: Instance, pCreateInfo: ^DebugUtilsMessengerCreateInfoEXT, pAllocator: ^AllocationCallbacks, pMessenger: ^DebugUtilsMessengerEXT) -> Result
-ProcDestroyDebugUtilsMessengerEXT :: #type proc "system" (instance: Instance, messenger: DebugUtilsMessengerEXT, pAllocator: ^AllocationCallbacks)
-ProcSubmitDebugUtilsMessageEXT :: #type proc "system" (instance: Instance, messageSeverity: DebugUtilsMessageSeverityFlagsEXT, messageTypes: DebugUtilsMessageTypeFlagsEXT, pCallbackData: ^DebugUtilsMessengerCallbackDataEXT)
-ProcCmdSetSampleLocationsEXT :: #type proc "system" (commandBuffer: CommandBuffer, pSampleLocationsInfo: ^SampleLocationsInfoEXT)
-ProcGetPhysicalDeviceMultisamplePropertiesEXT :: #type proc "system" (physicalDevice: PhysicalDevice, samples: SampleCountFlags, pMultisampleProperties: [^]MultisamplePropertiesEXT)
-ProcGetImageDrmFormatModifierPropertiesEXT :: #type proc "system" (device: Device, image: Image, pProperties: [^]ImageDrmFormatModifierPropertiesEXT) -> Result
-ProcCreateValidationCacheEXT :: #type proc "system" (device: Device, pCreateInfo: ^ValidationCacheCreateInfoEXT, pAllocator: ^AllocationCallbacks, pValidationCache: ^ValidationCacheEXT) -> Result
-ProcDestroyValidationCacheEXT :: #type proc "system" (device: Device, validationCache: ValidationCacheEXT, pAllocator: ^AllocationCallbacks)
-ProcMergeValidationCachesEXT :: #type proc "system" (device: Device, dstCache: ValidationCacheEXT, srcCacheCount: u32, pSrcCaches: [^]ValidationCacheEXT) -> Result
-ProcGetValidationCacheDataEXT :: #type proc "system" (device: Device, validationCache: ValidationCacheEXT, pDataSize: ^int, pData: rawptr) -> Result
-ProcCmdBindShadingRateImageNV :: #type proc "system" (commandBuffer: CommandBuffer, imageView: ImageView, imageLayout: ImageLayout)
-ProcCmdSetViewportShadingRatePaletteNV :: #type proc "system" (commandBuffer: CommandBuffer, firstViewport: u32, viewportCount: u32, pShadingRatePalettes: [^]ShadingRatePaletteNV)
-ProcCmdSetCoarseSampleOrderNV :: #type proc "system" (commandBuffer: CommandBuffer, sampleOrderType: CoarseSampleOrderTypeNV, customSampleOrderCount: u32, pCustomSampleOrders: [^]CoarseSampleOrderCustomNV)
-ProcCreateAccelerationStructureNV :: #type proc "system" (device: Device, pCreateInfo: ^AccelerationStructureCreateInfoNV, pAllocator: ^AllocationCallbacks, pAccelerationStructure: ^AccelerationStructureNV) -> Result
-ProcDestroyAccelerationStructureNV :: #type proc "system" (device: Device, accelerationStructure: AccelerationStructureNV, pAllocator: ^AllocationCallbacks)
-ProcGetAccelerationStructureMemoryRequirementsNV :: #type proc "system" (device: Device, pInfo: ^AccelerationStructureMemoryRequirementsInfoNV, pMemoryRequirements: [^]MemoryRequirements2KHR)
-ProcBindAccelerationStructureMemoryNV :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindAccelerationStructureMemoryInfoNV) -> Result
-ProcCmdBuildAccelerationStructureNV :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^AccelerationStructureInfoNV, instanceData: Buffer, instanceOffset: DeviceSize, update: b32, dst: AccelerationStructureNV, src: AccelerationStructureNV, scratch: Buffer, scratchOffset: DeviceSize)
-ProcCmdCopyAccelerationStructureNV :: #type proc "system" (commandBuffer: CommandBuffer, dst: AccelerationStructureNV, src: AccelerationStructureNV, mode: CopyAccelerationStructureModeKHR)
-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)
-ProcCreateRayTracingPipelinesNV :: #type proc "system" (device: Device, pipelineCache: PipelineCache, createInfoCount: u32, pCreateInfos: [^]RayTracingPipelineCreateInfoNV, pAllocator: ^AllocationCallbacks, pPipelines: [^]Pipeline) -> Result
-ProcGetRayTracingShaderGroupHandlesKHR :: #type proc "system" (device: Device, pipeline: Pipeline, firstGroup: u32, groupCount: u32, dataSize: int, pData: rawptr) -> Result
-ProcGetRayTracingShaderGroupHandlesNV :: #type proc "system" (device: Device, pipeline: Pipeline, firstGroup: u32, groupCount: u32, dataSize: int, pData: rawptr) -> Result
-ProcGetAccelerationStructureHandleNV :: #type proc "system" (device: Device, accelerationStructure: AccelerationStructureNV, dataSize: int, pData: rawptr) -> Result
-ProcCmdWriteAccelerationStructuresPropertiesNV :: #type proc "system" (commandBuffer: CommandBuffer, accelerationStructureCount: u32, pAccelerationStructures: [^]AccelerationStructureNV, queryType: QueryType, queryPool: QueryPool, firstQuery: u32)
-ProcCompileDeferredNV :: #type proc "system" (device: Device, pipeline: Pipeline, shader: u32) -> Result
-ProcGetMemoryHostPointerPropertiesEXT :: #type proc "system" (device: Device, handleType: ExternalMemoryHandleTypeFlags, pHostPointer: rawptr, pMemoryHostPointerProperties: [^]MemoryHostPointerPropertiesEXT) -> Result
-ProcCmdWriteBufferMarkerAMD :: #type proc "system" (commandBuffer: CommandBuffer, pipelineStage: PipelineStageFlags, dstBuffer: Buffer, dstOffset: DeviceSize, marker: u32)
-ProcGetPhysicalDeviceCalibrateableTimeDomainsEXT :: #type proc "system" (physicalDevice: PhysicalDevice, pTimeDomainCount: ^u32, pTimeDomains: [^]TimeDomainEXT) -> Result
-ProcGetCalibratedTimestampsEXT :: #type proc "system" (device: Device, timestampCount: u32, pTimestampInfos: [^]CalibratedTimestampInfoEXT, pTimestamps: [^]u64, pMaxDeviation: ^u64) -> Result
-ProcCmdDrawMeshTasksNV :: #type proc "system" (commandBuffer: CommandBuffer, taskCount: u32, firstTask: u32)
-ProcCmdDrawMeshTasksIndirectNV :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, drawCount: u32, stride: u32)
-ProcCmdDrawMeshTasksIndirectCountNV :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
-ProcCmdSetExclusiveScissorNV :: #type proc "system" (commandBuffer: CommandBuffer, firstExclusiveScissor: u32, exclusiveScissorCount: u32, pExclusiveScissors: [^]Rect2D)
-ProcCmdSetCheckpointNV :: #type proc "system" (commandBuffer: CommandBuffer, pCheckpointMarker: rawptr)
-ProcGetQueueCheckpointDataNV :: #type proc "system" (queue: Queue, pCheckpointDataCount: ^u32, pCheckpointData: ^CheckpointDataNV)
-ProcInitializePerformanceApiINTEL :: #type proc "system" (device: Device, pInitializeInfo: ^InitializePerformanceApiInfoINTEL) -> Result
-ProcUninitializePerformanceApiINTEL :: #type proc "system" (device: Device)
-ProcCmdSetPerformanceMarkerINTEL :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^PerformanceMarkerInfoINTEL) -> Result
-ProcCmdSetPerformanceStreamMarkerINTEL :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^PerformanceStreamMarkerInfoINTEL) -> Result
-ProcCmdSetPerformanceOverrideINTEL :: #type proc "system" (commandBuffer: CommandBuffer, pOverrideInfo: ^PerformanceOverrideInfoINTEL) -> Result
-ProcAcquirePerformanceConfigurationINTEL :: #type proc "system" (device: Device, pAcquireInfo: ^PerformanceConfigurationAcquireInfoINTEL, pConfiguration: ^PerformanceConfigurationINTEL) -> Result
-ProcReleasePerformanceConfigurationINTEL :: #type proc "system" (device: Device, configuration: PerformanceConfigurationINTEL) -> Result
-ProcQueueSetPerformanceConfigurationINTEL :: #type proc "system" (queue: Queue, configuration: PerformanceConfigurationINTEL) -> Result
-ProcGetPerformanceParameterINTEL :: #type proc "system" (device: Device, parameter: PerformanceParameterTypeINTEL, pValue: ^PerformanceValueINTEL) -> Result
-ProcSetLocalDimmingAMD :: #type proc "system" (device: Device, swapChain: SwapchainKHR, localDimmingEnable: b32)
-ProcGetBufferDeviceAddressEXT :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> DeviceAddress
+ProcGetPhysicalDeviceSurfaceFormatsKHR :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pSurfaceFormatCount: ^u32, pSurfaceFormats: [^]SurfaceFormatKHR) -> Result
+ProcGetPhysicalDeviceSurfacePresentModes2EXT :: #type proc "system" (physicalDevice: PhysicalDevice, pSurfaceInfo: ^PhysicalDeviceSurfaceInfo2KHR, pPresentModeCount: ^u32, pPresentModes: [^]PresentModeKHR) -> Result
+ProcGetPhysicalDeviceSurfacePresentModesKHR :: #type proc "system" (physicalDevice: PhysicalDevice, surface: SurfaceKHR, pPresentModeCount: ^u32, pPresentModes: [^]PresentModeKHR) -> Result
+ProcGetPhysicalDeviceSurfaceSupportKHR :: #type proc "system" (physicalDevice: PhysicalDevice, queueFamilyIndex: u32, surface: SurfaceKHR, pSupported: ^b32) -> Result
ProcGetPhysicalDeviceToolPropertiesEXT :: #type proc "system" (physicalDevice: PhysicalDevice, pToolCount: ^u32, pToolProperties: [^]PhysicalDeviceToolPropertiesEXT) -> Result
-ProcGetPhysicalDeviceCooperativeMatrixPropertiesNV :: #type proc "system" (physicalDevice: PhysicalDevice, pPropertyCount: ^u32, pProperties: [^]CooperativeMatrixPropertiesNV) -> Result
-ProcGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV :: #type proc "system" (physicalDevice: PhysicalDevice, pCombinationCount: ^u32, pCombinations: [^]FramebufferMixedSamplesCombinationNV) -> Result
-ProcCreateHeadlessSurfaceEXT :: #type proc "system" (instance: Instance, pCreateInfo: ^HeadlessSurfaceCreateInfoEXT, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
-ProcCmdSetLineStippleEXT :: #type proc "system" (commandBuffer: CommandBuffer, lineStippleFactor: u32, lineStipplePattern: u16)
-ProcResetQueryPoolEXT :: #type proc "system" (device: Device, queryPool: QueryPool, firstQuery: u32, queryCount: u32)
-ProcCmdSetCullModeEXT :: #type proc "system" (commandBuffer: CommandBuffer, cullMode: CullModeFlags)
-ProcCmdSetFrontFaceEXT :: #type proc "system" (commandBuffer: CommandBuffer, frontFace: FrontFace)
-ProcCmdSetPrimitiveTopologyEXT :: #type proc "system" (commandBuffer: CommandBuffer, primitiveTopology: PrimitiveTopology)
-ProcCmdSetViewportWithCountEXT :: #type proc "system" (commandBuffer: CommandBuffer, viewportCount: u32, pViewports: [^]Viewport)
-ProcCmdSetScissorWithCountEXT :: #type proc "system" (commandBuffer: CommandBuffer, scissorCount: u32, pScissors: [^]Rect2D)
-ProcCmdBindVertexBuffers2EXT :: #type proc "system" (commandBuffer: CommandBuffer, firstBinding: u32, bindingCount: u32, pBuffers: [^]Buffer, pOffsets: [^]DeviceSize, pSizes: [^]DeviceSize, pStrides: [^]DeviceSize)
-ProcCmdSetDepthTestEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthTestEnable: b32)
-ProcCmdSetDepthWriteEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthWriteEnable: b32)
-ProcCmdSetDepthCompareOpEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthCompareOp: CompareOp)
-ProcCmdSetDepthBoundsTestEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthBoundsTestEnable: b32)
-ProcCmdSetStencilTestEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, stencilTestEnable: b32)
-ProcCmdSetStencilOpEXT :: #type proc "system" (commandBuffer: CommandBuffer, faceMask: StencilFaceFlags, failOp: StencilOp, passOp: StencilOp, depthFailOp: StencilOp, compareOp: CompareOp)
-ProcGetGeneratedCommandsMemoryRequirementsNV :: #type proc "system" (device: Device, pInfo: ^GeneratedCommandsMemoryRequirementsInfoNV, pMemoryRequirements: [^]MemoryRequirements2)
-ProcCmdPreprocessGeneratedCommandsNV :: #type proc "system" (commandBuffer: CommandBuffer, pGeneratedCommandsInfo: ^GeneratedCommandsInfoNV)
-ProcCmdExecuteGeneratedCommandsNV :: #type proc "system" (commandBuffer: CommandBuffer, isPreprocessed: b32, pGeneratedCommandsInfo: ^GeneratedCommandsInfoNV)
-ProcCmdBindPipelineShaderGroupNV :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, pipeline: Pipeline, groupIndex: u32)
-ProcCreateIndirectCommandsLayoutNV :: #type proc "system" (device: Device, pCreateInfo: ^IndirectCommandsLayoutCreateInfoNV, pAllocator: ^AllocationCallbacks, pIndirectCommandsLayout: ^IndirectCommandsLayoutNV) -> Result
-ProcDestroyIndirectCommandsLayoutNV :: #type proc "system" (device: Device, indirectCommandsLayout: IndirectCommandsLayoutNV, pAllocator: ^AllocationCallbacks)
-ProcDeviceMemoryReportCallbackEXT :: #type proc "system" (pCallbackData: ^DeviceMemoryReportCallbackDataEXT, pUserData: rawptr)
-ProcAcquireDrmDisplayEXT :: #type proc "system" (physicalDevice: PhysicalDevice, drmFd: i32, display: DisplayKHR) -> Result
-ProcGetDrmDisplayEXT :: #type proc "system" (physicalDevice: PhysicalDevice, drmFd: i32, connectorId: u32, display: ^DisplayKHR) -> Result
-ProcCreatePrivateDataSlotEXT :: #type proc "system" (device: Device, pCreateInfo: ^PrivateDataSlotCreateInfoEXT, pAllocator: ^AllocationCallbacks, pPrivateDataSlot: ^PrivateDataSlotEXT) -> Result
-ProcDestroyPrivateDataSlotEXT :: #type proc "system" (device: Device, privateDataSlot: PrivateDataSlotEXT, pAllocator: ^AllocationCallbacks)
-ProcSetPrivateDataEXT :: #type proc "system" (device: Device, objectType: ObjectType, objectHandle: u64, privateDataSlot: PrivateDataSlotEXT, data: u64) -> Result
-ProcGetPrivateDataEXT :: #type proc "system" (device: Device, objectType: ObjectType, objectHandle: u64, privateDataSlot: PrivateDataSlotEXT, pData: ^u64)
-ProcCmdSetFragmentShadingRateEnumNV :: #type proc "system" (commandBuffer: CommandBuffer, shadingRate: FragmentShadingRateNV)
-ProcAcquireWinrtDisplayNV :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR) -> Result
-ProcGetWinrtDisplayNV :: #type proc "system" (physicalDevice: PhysicalDevice, deviceRelativeId: u32, pDisplay: ^DisplayKHR) -> Result
-ProcCmdSetVertexInputEXT :: #type proc "system" (commandBuffer: CommandBuffer, vertexBindingDescriptionCount: u32, pVertexBindingDescriptions: [^]VertexInputBindingDescription2EXT, vertexAttributeDescriptionCount: u32, pVertexAttributeDescriptions: [^]VertexInputAttributeDescription2EXT)
-ProcGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI :: #type proc "system" (device: Device, renderpass: RenderPass, pMaxWorkgroupSize: ^Extent2D) -> Result
-ProcCmdSubpassShadingHUAWEI :: #type proc "system" (commandBuffer: CommandBuffer)
-ProcCmdBindInvocationMaskHUAWEI :: #type proc "system" (commandBuffer: CommandBuffer, imageView: ImageView, imageLayout: ImageLayout)
-ProcGetMemoryRemoteAddressNV :: #type proc "system" (device: Device, pMemoryGetRemoteAddressInfo: ^MemoryGetRemoteAddressInfoNV, pAddress: [^]RemoteAddressNV) -> Result
-ProcCmdSetPatchControlPointsEXT :: #type proc "system" (commandBuffer: CommandBuffer, patchControlPoints: u32)
-ProcCmdSetRasterizerDiscardEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, rasterizerDiscardEnable: b32)
-ProcCmdSetDepthBiasEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthBiasEnable: b32)
-ProcCmdSetLogicOpEXT :: #type proc "system" (commandBuffer: CommandBuffer, logicOp: LogicOp)
-ProcCmdSetPrimitiveRestartEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, primitiveRestartEnable: b32)
-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)
-ProcSetDeviceMemoryPriorityEXT :: #type proc "system" (device: Device, memory: DeviceMemory, priority: f32)
-ProcCreateAccelerationStructureKHR :: #type proc "system" (device: Device, pCreateInfo: ^AccelerationStructureCreateInfoKHR, pAllocator: ^AllocationCallbacks, pAccelerationStructure: ^AccelerationStructureKHR) -> Result
-ProcDestroyAccelerationStructureKHR :: #type proc "system" (device: Device, accelerationStructure: AccelerationStructureKHR, pAllocator: ^AllocationCallbacks)
-ProcCmdBuildAccelerationStructuresKHR :: #type proc "system" (commandBuffer: CommandBuffer, infoCount: u32, pInfos: [^]AccelerationStructureBuildGeometryInfoKHR, ppBuildRangeInfos: ^[^]AccelerationStructureBuildRangeInfoKHR)
-ProcCmdBuildAccelerationStructuresIndirectKHR :: #type proc "system" (commandBuffer: CommandBuffer, infoCount: u32, pInfos: [^]AccelerationStructureBuildGeometryInfoKHR, pIndirectDeviceAddresses: [^]DeviceAddress, pIndirectStrides: [^]u32, ppMaxPrimitiveCounts: ^[^]u32)
-ProcBuildAccelerationStructuresKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, infoCount: u32, pInfos: [^]AccelerationStructureBuildGeometryInfoKHR, ppBuildRangeInfos: ^[^]AccelerationStructureBuildRangeInfoKHR) -> Result
-ProcCopyAccelerationStructureKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyAccelerationStructureInfoKHR) -> Result
-ProcCopyAccelerationStructureToMemoryKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyAccelerationStructureToMemoryInfoKHR) -> Result
-ProcCopyMemoryToAccelerationStructureKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyMemoryToAccelerationStructureInfoKHR) -> Result
-ProcWriteAccelerationStructuresPropertiesKHR :: #type proc "system" (device: Device, accelerationStructureCount: u32, pAccelerationStructures: [^]AccelerationStructureKHR, queryType: QueryType, dataSize: int, pData: rawptr, stride: int) -> Result
-ProcCmdCopyAccelerationStructureKHR :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^CopyAccelerationStructureInfoKHR)
-ProcCmdCopyAccelerationStructureToMemoryKHR :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^CopyAccelerationStructureToMemoryInfoKHR)
-ProcCmdCopyMemoryToAccelerationStructureKHR :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^CopyMemoryToAccelerationStructureInfoKHR)
-ProcGetAccelerationStructureDeviceAddressKHR :: #type proc "system" (device: Device, pInfo: ^AccelerationStructureDeviceAddressInfoKHR) -> DeviceAddress
-ProcCmdWriteAccelerationStructuresPropertiesKHR :: #type proc "system" (commandBuffer: CommandBuffer, accelerationStructureCount: u32, pAccelerationStructures: [^]AccelerationStructureKHR, queryType: QueryType, queryPool: QueryPool, firstQuery: u32)
-ProcGetDeviceAccelerationStructureCompatibilityKHR :: #type proc "system" (device: Device, pVersionInfo: ^AccelerationStructureVersionInfoKHR, pCompatibility: ^AccelerationStructureCompatibilityKHR)
-ProcGetAccelerationStructureBuildSizesKHR :: #type proc "system" (device: Device, buildType: AccelerationStructureBuildTypeKHR, pBuildInfo: ^AccelerationStructureBuildGeometryInfoKHR, pMaxPrimitiveCounts: [^]u32, pSizeInfo: ^AccelerationStructureBuildSizesInfoKHR)
-ProcCmdTraceRaysKHR :: #type proc "system" (commandBuffer: CommandBuffer, pRaygenShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pMissShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pHitShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pCallableShaderBindingTable: [^]StridedDeviceAddressRegionKHR, width: u32, height: u32, depth: u32)
-ProcCreateRayTracingPipelinesKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pipelineCache: PipelineCache, createInfoCount: u32, pCreateInfos: [^]RayTracingPipelineCreateInfoKHR, pAllocator: ^AllocationCallbacks, pPipelines: [^]Pipeline) -> Result
-ProcGetRayTracingCaptureReplayShaderGroupHandlesKHR :: #type proc "system" (device: Device, pipeline: Pipeline, firstGroup: u32, groupCount: u32, dataSize: int, pData: rawptr) -> Result
-ProcCmdTraceRaysIndirectKHR :: #type proc "system" (commandBuffer: CommandBuffer, pRaygenShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pMissShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pHitShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pCallableShaderBindingTable: [^]StridedDeviceAddressRegionKHR, indirectDeviceAddress: DeviceAddress)
-ProcGetRayTracingShaderGroupStackSizeKHR :: #type proc "system" (device: Device, pipeline: Pipeline, group: u32, groupShader: ShaderGroupShaderKHR) -> DeviceSize
-ProcCmdSetRayTracingPipelineStackSizeKHR :: #type proc "system" (commandBuffer: CommandBuffer, pipelineStackSize: u32)
-ProcCreateWin32SurfaceKHR :: #type proc "system" (instance: Instance, pCreateInfo: ^Win32SurfaceCreateInfoKHR, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
ProcGetPhysicalDeviceWin32PresentationSupportKHR :: #type proc "system" (physicalDevice: PhysicalDevice, queueFamilyIndex: u32) -> b32
-ProcGetMemoryWin32HandleKHR :: #type proc "system" (device: Device, pGetWin32HandleInfo: ^MemoryGetWin32HandleInfoKHR, pHandle: ^HANDLE) -> Result
-ProcGetMemoryWin32HandlePropertiesKHR :: #type proc "system" (device: Device, handleType: ExternalMemoryHandleTypeFlags, handle: HANDLE, pMemoryWin32HandleProperties: [^]MemoryWin32HandlePropertiesKHR) -> Result
-ProcImportSemaphoreWin32HandleKHR :: #type proc "system" (device: Device, pImportSemaphoreWin32HandleInfo: ^ImportSemaphoreWin32HandleInfoKHR) -> Result
-ProcGetSemaphoreWin32HandleKHR :: #type proc "system" (device: Device, pGetWin32HandleInfo: ^SemaphoreGetWin32HandleInfoKHR, pHandle: ^HANDLE) -> Result
-ProcImportFenceWin32HandleKHR :: #type proc "system" (device: Device, pImportFenceWin32HandleInfo: ^ImportFenceWin32HandleInfoKHR) -> Result
-ProcGetFenceWin32HandleKHR :: #type proc "system" (device: Device, pGetWin32HandleInfo: ^FenceGetWin32HandleInfoKHR, pHandle: ^HANDLE) -> Result
-ProcGetMemoryWin32HandleNV :: #type proc "system" (device: Device, memory: DeviceMemory, handleType: ExternalMemoryHandleTypeFlagsNV, pHandle: ^HANDLE) -> Result
-ProcGetPhysicalDeviceSurfacePresentModes2EXT :: #type proc "system" (physicalDevice: PhysicalDevice, pSurfaceInfo: ^PhysicalDeviceSurfaceInfo2KHR, pPresentModeCount: ^u32, pPresentModes: [^]PresentModeKHR) -> Result
-ProcAcquireFullScreenExclusiveModeEXT :: #type proc "system" (device: Device, swapchain: SwapchainKHR) -> Result
-ProcReleaseFullScreenExclusiveModeEXT :: #type proc "system" (device: Device, swapchain: SwapchainKHR) -> Result
-ProcGetDeviceGroupSurfacePresentModes2EXT :: #type proc "system" (device: Device, pSurfaceInfo: ^PhysicalDeviceSurfaceInfo2KHR, pModes: [^]DeviceGroupPresentModeFlagsKHR) -> Result
-ProcCreateMetalSurfaceEXT :: #type proc "system" (instance: Instance, pCreateInfo: ^MetalSurfaceCreateInfoEXT, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
-ProcCreateMacOSSurfaceMVK :: #type proc "system" (instance: Instance, pCreateInfo: ^MacOSSurfaceCreateInfoMVK, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
-ProcCreateIOSSurfaceMVK :: #type proc "system" (instance: Instance, pCreateInfo: ^IOSSurfaceCreateInfoMVK, pAllocator: ^AllocationCallbacks, pSurface: ^SurfaceKHR) -> Result
+ProcGetWinrtDisplayNV :: #type proc "system" (physicalDevice: PhysicalDevice, deviceRelativeId: u32, pDisplay: ^DisplayKHR) -> Result
+ProcReleaseDisplayEXT :: #type proc "system" (physicalDevice: PhysicalDevice, display: DisplayKHR) -> Result
+ProcSubmitDebugUtilsMessageEXT :: #type proc "system" (instance: Instance, messageSeverity: DebugUtilsMessageSeverityFlagsEXT, messageTypes: DebugUtilsMessageTypeFlagsEXT, pCallbackData: ^DebugUtilsMessengerCallbackDataEXT)
+
+// Device Procedure Types
+ProcAcquireFullScreenExclusiveModeEXT :: #type proc "system" (device: Device, swapchain: SwapchainKHR) -> Result
+ProcAcquireNextImage2KHR :: #type proc "system" (device: Device, pAcquireInfo: ^AcquireNextImageInfoKHR, pImageIndex: ^u32) -> Result
+ProcAcquireNextImageKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR, timeout: u64, semaphore: Semaphore, fence: Fence, pImageIndex: ^u32) -> Result
+ProcAcquirePerformanceConfigurationINTEL :: #type proc "system" (device: Device, pAcquireInfo: ^PerformanceConfigurationAcquireInfoINTEL, pConfiguration: ^PerformanceConfigurationINTEL) -> Result
+ProcAcquireProfilingLockKHR :: #type proc "system" (device: Device, pInfo: ^AcquireProfilingLockInfoKHR) -> Result
+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
+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
+ProcBindBufferMemory2 :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindBufferMemoryInfo) -> Result
+ProcBindBufferMemory2KHR :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindBufferMemoryInfo) -> Result
+ProcBindImageMemory :: #type proc "system" (device: Device, image: Image, memory: DeviceMemory, memoryOffset: DeviceSize) -> Result
+ProcBindImageMemory2 :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindImageMemoryInfo) -> Result
+ProcBindImageMemory2KHR :: #type proc "system" (device: Device, bindInfoCount: u32, pBindInfos: [^]BindImageMemoryInfo) -> Result
+ProcBuildAccelerationStructuresKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, infoCount: u32, pInfos: [^]AccelerationStructureBuildGeometryInfoKHR, ppBuildRangeInfos: ^[^]AccelerationStructureBuildRangeInfoKHR) -> Result
+ProcCmdBeginConditionalRenderingEXT :: #type proc "system" (commandBuffer: CommandBuffer, pConditionalRenderingBegin: ^ConditionalRenderingBeginInfoEXT)
+ProcCmdBeginDebugUtilsLabelEXT :: #type proc "system" (commandBuffer: CommandBuffer, pLabelInfo: ^DebugUtilsLabelEXT)
+ProcCmdBeginQuery :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32, flags: QueryControlFlags)
+ProcCmdBeginQueryIndexedEXT :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32, flags: QueryControlFlags, index: u32)
+ProcCmdBeginRenderPass :: #type proc "system" (commandBuffer: CommandBuffer, pRenderPassBegin: ^RenderPassBeginInfo, contents: SubpassContents)
+ProcCmdBeginRenderPass2 :: #type proc "system" (commandBuffer: CommandBuffer, pRenderPassBegin: ^RenderPassBeginInfo, pSubpassBeginInfo: ^SubpassBeginInfo)
+ProcCmdBeginRenderPass2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pRenderPassBegin: ^RenderPassBeginInfo, pSubpassBeginInfo: ^SubpassBeginInfo)
+ProcCmdBeginTransformFeedbackEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstCounterBuffer: u32, counterBufferCount: u32, pCounterBuffers: [^]Buffer, pCounterBufferOffsets: [^]DeviceSize)
+ProcCmdBindDescriptorSets :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, layout: PipelineLayout, firstSet: u32, descriptorSetCount: u32, pDescriptorSets: [^]DescriptorSet, dynamicOffsetCount: u32, pDynamicOffsets: [^]u32)
+ProcCmdBindIndexBuffer :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: 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)
+ProcCmdBindShadingRateImageNV :: #type proc "system" (commandBuffer: CommandBuffer, imageView: ImageView, imageLayout: ImageLayout)
+ProcCmdBindTransformFeedbackBuffersEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstBinding: u32, bindingCount: u32, pBuffers: [^]Buffer, pOffsets: [^]DeviceSize, pSizes: [^]DeviceSize)
+ProcCmdBindVertexBuffers :: #type proc "system" (commandBuffer: CommandBuffer, firstBinding: u32, bindingCount: u32, pBuffers: [^]Buffer, pOffsets: [^]DeviceSize)
+ProcCmdBindVertexBuffers2EXT :: #type proc "system" (commandBuffer: CommandBuffer, firstBinding: u32, bindingCount: u32, pBuffers: [^]Buffer, pOffsets: [^]DeviceSize, pSizes: [^]DeviceSize, pStrides: [^]DeviceSize)
+ProcCmdBlitImage :: #type proc "system" (commandBuffer: CommandBuffer, srcImage: Image, srcImageLayout: ImageLayout, dstImage: Image, dstImageLayout: ImageLayout, regionCount: u32, pRegions: [^]ImageBlit, filter: Filter)
+ProcCmdBlitImage2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pBlitImageInfo: ^BlitImageInfo2KHR)
+ProcCmdBuildAccelerationStructureNV :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^AccelerationStructureInfoNV, instanceData: Buffer, instanceOffset: DeviceSize, update: b32, dst: AccelerationStructureNV, src: AccelerationStructureNV, scratch: Buffer, scratchOffset: DeviceSize)
+ProcCmdBuildAccelerationStructuresIndirectKHR :: #type proc "system" (commandBuffer: CommandBuffer, infoCount: u32, pInfos: [^]AccelerationStructureBuildGeometryInfoKHR, pIndirectDeviceAddresses: [^]DeviceAddress, pIndirectStrides: [^]u32, ppMaxPrimitiveCounts: ^[^]u32)
+ProcCmdBuildAccelerationStructuresKHR :: #type proc "system" (commandBuffer: CommandBuffer, infoCount: u32, pInfos: [^]AccelerationStructureBuildGeometryInfoKHR, ppBuildRangeInfos: ^[^]AccelerationStructureBuildRangeInfoKHR)
+ProcCmdClearAttachments :: #type proc "system" (commandBuffer: CommandBuffer, attachmentCount: u32, pAttachments: [^]ClearAttachment, rectCount: u32, pRects: [^]ClearRect)
+ProcCmdClearColorImage :: #type proc "system" (commandBuffer: CommandBuffer, image: Image, imageLayout: ImageLayout, pColor: ^ClearColorValue, rangeCount: u32, pRanges: [^]ImageSubresourceRange)
+ProcCmdClearDepthStencilImage :: #type proc "system" (commandBuffer: CommandBuffer, image: Image, imageLayout: ImageLayout, pDepthStencil: ^ClearDepthStencilValue, rangeCount: u32, pRanges: [^]ImageSubresourceRange)
+ProcCmdCopyAccelerationStructureKHR :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^CopyAccelerationStructureInfoKHR)
+ProcCmdCopyAccelerationStructureNV :: #type proc "system" (commandBuffer: CommandBuffer, dst: AccelerationStructureNV, src: AccelerationStructureNV, mode: CopyAccelerationStructureModeKHR)
+ProcCmdCopyAccelerationStructureToMemoryKHR :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^CopyAccelerationStructureToMemoryInfoKHR)
+ProcCmdCopyBuffer :: #type proc "system" (commandBuffer: CommandBuffer, srcBuffer: Buffer, dstBuffer: Buffer, regionCount: u32, pRegions: [^]BufferCopy)
+ProcCmdCopyBuffer2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pCopyBufferInfo: ^CopyBufferInfo2KHR)
+ProcCmdCopyBufferToImage :: #type proc "system" (commandBuffer: CommandBuffer, srcBuffer: Buffer, dstImage: Image, dstImageLayout: ImageLayout, regionCount: u32, pRegions: [^]BufferImageCopy)
+ProcCmdCopyBufferToImage2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pCopyBufferToImageInfo: ^CopyBufferToImageInfo2KHR)
+ProcCmdCopyImage :: #type proc "system" (commandBuffer: CommandBuffer, srcImage: Image, srcImageLayout: ImageLayout, dstImage: Image, dstImageLayout: ImageLayout, regionCount: u32, pRegions: [^]ImageCopy)
+ProcCmdCopyImage2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pCopyImageInfo: ^CopyImageInfo2KHR)
+ProcCmdCopyImageToBuffer :: #type proc "system" (commandBuffer: CommandBuffer, srcImage: Image, srcImageLayout: ImageLayout, dstBuffer: Buffer, regionCount: u32, pRegions: [^]BufferImageCopy)
+ProcCmdCopyImageToBuffer2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pCopyImageToBufferInfo: ^CopyImageToBufferInfo2KHR)
+ProcCmdCopyMemoryToAccelerationStructureKHR :: #type proc "system" (commandBuffer: CommandBuffer, pInfo: ^CopyMemoryToAccelerationStructureInfoKHR)
+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)
+ProcCmdDebugMarkerBeginEXT :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^DebugMarkerMarkerInfoEXT)
+ProcCmdDebugMarkerEndEXT :: #type proc "system" (commandBuffer: CommandBuffer)
+ProcCmdDebugMarkerInsertEXT :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^DebugMarkerMarkerInfoEXT)
+ProcCmdDispatch :: #type proc "system" (commandBuffer: CommandBuffer, groupCountX: u32, groupCountY: u32, groupCountZ: u32)
+ProcCmdDispatchBase :: #type proc "system" (commandBuffer: CommandBuffer, baseGroupX: u32, baseGroupY: u32, baseGroupZ: u32, groupCountX: u32, groupCountY: u32, groupCountZ: u32)
+ProcCmdDispatchBaseKHR :: #type proc "system" (commandBuffer: CommandBuffer, baseGroupX: u32, baseGroupY: u32, baseGroupZ: u32, groupCountX: u32, groupCountY: u32, groupCountZ: u32)
+ProcCmdDispatchIndirect :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize)
+ProcCmdDraw :: #type proc "system" (commandBuffer: CommandBuffer, vertexCount: u32, instanceCount: u32, firstVertex: u32, firstInstance: u32)
+ProcCmdDrawIndexed :: #type proc "system" (commandBuffer: CommandBuffer, indexCount: u32, instanceCount: u32, firstIndex: u32, vertexOffset: i32, firstInstance: u32)
+ProcCmdDrawIndexedIndirect :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, drawCount: u32, stride: u32)
+ProcCmdDrawIndexedIndirectCount :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
+ProcCmdDrawIndexedIndirectCountAMD :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
+ProcCmdDrawIndexedIndirectCountKHR :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
+ProcCmdDrawIndirect :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, drawCount: u32, stride: u32)
+ProcCmdDrawIndirectByteCountEXT :: #type proc "system" (commandBuffer: CommandBuffer, instanceCount: u32, firstInstance: u32, counterBuffer: Buffer, counterBufferOffset: DeviceSize, counterOffset: u32, vertexStride: u32)
+ProcCmdDrawIndirectCount :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
+ProcCmdDrawIndirectCountAMD :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
+ProcCmdDrawIndirectCountKHR :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
+ProcCmdDrawMeshTasksIndirectCountNV :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, countBuffer: Buffer, countBufferOffset: DeviceSize, maxDrawCount: u32, stride: u32)
+ProcCmdDrawMeshTasksIndirectNV :: #type proc "system" (commandBuffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, drawCount: u32, stride: u32)
+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)
+ProcCmdEndConditionalRenderingEXT :: #type proc "system" (commandBuffer: CommandBuffer)
+ProcCmdEndDebugUtilsLabelEXT :: #type proc "system" (commandBuffer: CommandBuffer)
+ProcCmdEndQuery :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32)
+ProcCmdEndQueryIndexedEXT :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, query: u32, index: u32)
+ProcCmdEndRenderPass :: #type proc "system" (commandBuffer: CommandBuffer)
+ProcCmdEndRenderPass2 :: #type proc "system" (commandBuffer: CommandBuffer, pSubpassEndInfo: ^SubpassEndInfo)
+ProcCmdEndRenderPass2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pSubpassEndInfo: ^SubpassEndInfo)
+ProcCmdEndTransformFeedbackEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstCounterBuffer: u32, counterBufferCount: u32, pCounterBuffers: [^]Buffer, pCounterBufferOffsets: [^]DeviceSize)
+ProcCmdExecuteCommands :: #type proc "system" (commandBuffer: CommandBuffer, commandBufferCount: u32, pCommandBuffers: [^]CommandBuffer)
+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)
+ProcCmdNextSubpass :: #type proc "system" (commandBuffer: CommandBuffer, contents: SubpassContents)
+ProcCmdNextSubpass2 :: #type proc "system" (commandBuffer: CommandBuffer, pSubpassBeginInfo: ^SubpassBeginInfo, pSubpassEndInfo: ^SubpassEndInfo)
+ProcCmdNextSubpass2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pSubpassBeginInfo: ^SubpassBeginInfo, pSubpassEndInfo: ^SubpassEndInfo)
+ProcCmdPipelineBarrier :: #type proc "system" (commandBuffer: CommandBuffer, srcStageMask: PipelineStageFlags, dstStageMask: PipelineStageFlags, dependencyFlags: DependencyFlags, memoryBarrierCount: u32, pMemoryBarriers: [^]MemoryBarrier, bufferMemoryBarrierCount: u32, pBufferMemoryBarriers: [^]BufferMemoryBarrier, imageMemoryBarrierCount: u32, pImageMemoryBarriers: [^]ImageMemoryBarrier)
+ProcCmdPipelineBarrier2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pDependencyInfo: ^DependencyInfoKHR)
+ProcCmdPreprocessGeneratedCommandsNV :: #type proc "system" (commandBuffer: CommandBuffer, pGeneratedCommandsInfo: ^GeneratedCommandsInfoNV)
+ProcCmdPushConstants :: #type proc "system" (commandBuffer: CommandBuffer, layout: PipelineLayout, stageFlags: ShaderStageFlags, offset: u32, size: u32, pValues: rawptr)
+ProcCmdPushDescriptorSetKHR :: #type proc "system" (commandBuffer: CommandBuffer, pipelineBindPoint: PipelineBindPoint, layout: PipelineLayout, set: u32, descriptorWriteCount: u32, pDescriptorWrites: [^]WriteDescriptorSet)
+ProcCmdPushDescriptorSetWithTemplateKHR :: #type proc "system" (commandBuffer: CommandBuffer, descriptorUpdateTemplate: DescriptorUpdateTemplate, layout: PipelineLayout, set: u32, pData: rawptr)
+ProcCmdResetEvent :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, stageMask: PipelineStageFlags)
+ProcCmdResetEvent2KHR :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, stageMask: PipelineStageFlags2KHR)
+ProcCmdResetQueryPool :: #type proc "system" (commandBuffer: CommandBuffer, queryPool: QueryPool, firstQuery: u32, queryCount: u32)
+ProcCmdResolveImage :: #type proc "system" (commandBuffer: CommandBuffer, srcImage: Image, srcImageLayout: ImageLayout, dstImage: Image, dstImageLayout: ImageLayout, regionCount: u32, pRegions: [^]ImageResolve)
+ProcCmdResolveImage2KHR :: #type proc "system" (commandBuffer: CommandBuffer, pResolveImageInfo: ^ResolveImageInfo2KHR)
+ProcCmdSetBlendConstants :: #type proc "system" (commandBuffer: CommandBuffer)
+ProcCmdSetCheckpointNV :: #type proc "system" (commandBuffer: CommandBuffer, pCheckpointMarker: rawptr)
+ProcCmdSetCoarseSampleOrderNV :: #type proc "system" (commandBuffer: CommandBuffer, sampleOrderType: CoarseSampleOrderTypeNV, customSampleOrderCount: u32, pCustomSampleOrders: [^]CoarseSampleOrderCustomNV)
+ProcCmdSetCullModeEXT :: #type proc "system" (commandBuffer: CommandBuffer, cullMode: CullModeFlags)
+ProcCmdSetDepthBias :: #type proc "system" (commandBuffer: CommandBuffer, depthBiasConstantFactor: f32, depthBiasClamp: f32, depthBiasSlopeFactor: f32)
+ProcCmdSetDepthBiasEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthBiasEnable: b32)
+ProcCmdSetDepthBounds :: #type proc "system" (commandBuffer: CommandBuffer, minDepthBounds: f32, maxDepthBounds: f32)
+ProcCmdSetDepthBoundsTestEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthBoundsTestEnable: b32)
+ProcCmdSetDepthCompareOpEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthCompareOp: CompareOp)
+ProcCmdSetDepthTestEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthTestEnable: b32)
+ProcCmdSetDepthWriteEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, depthWriteEnable: b32)
+ProcCmdSetDeviceMask :: #type proc "system" (commandBuffer: CommandBuffer, deviceMask: u32)
+ProcCmdSetDeviceMaskKHR :: #type proc "system" (commandBuffer: CommandBuffer, deviceMask: u32)
+ProcCmdSetDiscardRectangleEXT :: #type proc "system" (commandBuffer: CommandBuffer, firstDiscardRectangle: u32, discardRectangleCount: u32, pDiscardRectangles: [^]Rect2D)
+ProcCmdSetEvent :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, stageMask: PipelineStageFlags)
+ProcCmdSetEvent2KHR :: #type proc "system" (commandBuffer: CommandBuffer, event: Event, pDependencyInfo: ^DependencyInfoKHR)
+ProcCmdSetExclusiveScissorNV :: #type proc "system" (commandBuffer: CommandBuffer, firstExclusiveScissor: u32, exclusiveScissorCount: u32, pExclusiveScissors: [^]Rect2D)
+ProcCmdSetFragmentShadingRateEnumNV :: #type proc "system" (commandBuffer: CommandBuffer, shadingRate: FragmentShadingRateNV)
+ProcCmdSetFragmentShadingRateKHR :: #type proc "system" (commandBuffer: CommandBuffer, pFragmentSize: ^Extent2D)
+ProcCmdSetFrontFaceEXT :: #type proc "system" (commandBuffer: CommandBuffer, frontFace: FrontFace)
+ProcCmdSetLineStippleEXT :: #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)
+ProcCmdSetPatchControlPointsEXT :: #type proc "system" (commandBuffer: CommandBuffer, patchControlPoints: u32)
+ProcCmdSetPerformanceMarkerINTEL :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^PerformanceMarkerInfoINTEL) -> Result
+ProcCmdSetPerformanceOverrideINTEL :: #type proc "system" (commandBuffer: CommandBuffer, pOverrideInfo: ^PerformanceOverrideInfoINTEL) -> Result
+ProcCmdSetPerformanceStreamMarkerINTEL :: #type proc "system" (commandBuffer: CommandBuffer, pMarkerInfo: ^PerformanceStreamMarkerInfoINTEL) -> Result
+ProcCmdSetPrimitiveRestartEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, primitiveRestartEnable: b32)
+ProcCmdSetPrimitiveTopologyEXT :: #type proc "system" (commandBuffer: CommandBuffer, primitiveTopology: PrimitiveTopology)
+ProcCmdSetRasterizerDiscardEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, rasterizerDiscardEnable: b32)
+ProcCmdSetRayTracingPipelineStackSizeKHR :: #type proc "system" (commandBuffer: CommandBuffer, pipelineStackSize: u32)
+ProcCmdSetSampleLocationsEXT :: #type proc "system" (commandBuffer: CommandBuffer, pSampleLocationsInfo: ^SampleLocationsInfoEXT)
+ProcCmdSetScissor :: #type proc "system" (commandBuffer: CommandBuffer, firstScissor: u32, scissorCount: u32, pScissors: [^]Rect2D)
+ProcCmdSetScissorWithCountEXT :: #type proc "system" (commandBuffer: CommandBuffer, scissorCount: u32, pScissors: [^]Rect2D)
+ProcCmdSetStencilCompareMask :: #type proc "system" (commandBuffer: CommandBuffer, faceMask: StencilFaceFlags, compareMask: u32)
+ProcCmdSetStencilOpEXT :: #type proc "system" (commandBuffer: CommandBuffer, faceMask: StencilFaceFlags, failOp: StencilOp, passOp: StencilOp, depthFailOp: StencilOp, compareOp: CompareOp)
+ProcCmdSetStencilReference :: #type proc "system" (commandBuffer: CommandBuffer, faceMask: StencilFaceFlags, reference: u32)
+ProcCmdSetStencilTestEnableEXT :: #type proc "system" (commandBuffer: CommandBuffer, stencilTestEnable: b32)
+ProcCmdSetStencilWriteMask :: #type proc "system" (commandBuffer: CommandBuffer, faceMask: StencilFaceFlags, writeMask: u32)
+ProcCmdSetVertexInputEXT :: #type proc "system" (commandBuffer: CommandBuffer, vertexBindingDescriptionCount: u32, pVertexBindingDescriptions: [^]VertexInputBindingDescription2EXT, vertexAttributeDescriptionCount: u32, pVertexAttributeDescriptions: [^]VertexInputAttributeDescription2EXT)
+ProcCmdSetViewport :: #type proc "system" (commandBuffer: CommandBuffer, firstViewport: u32, viewportCount: u32, pViewports: [^]Viewport)
+ProcCmdSetViewportShadingRatePaletteNV :: #type proc "system" (commandBuffer: CommandBuffer, firstViewport: u32, viewportCount: u32, pShadingRatePalettes: [^]ShadingRatePaletteNV)
+ProcCmdSetViewportWScalingNV :: #type proc "system" (commandBuffer: CommandBuffer, firstViewport: u32, viewportCount: u32, pViewportWScalings: [^]ViewportWScalingNV)
+ProcCmdSetViewportWithCountEXT :: #type proc "system" (commandBuffer: CommandBuffer, viewportCount: u32, pViewports: [^]Viewport)
+ProcCmdSubpassShadingHUAWEI :: #type proc "system" (commandBuffer: CommandBuffer)
+ProcCmdTraceRaysIndirectKHR :: #type proc "system" (commandBuffer: CommandBuffer, pRaygenShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pMissShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pHitShaderBindingTable: [^]StridedDeviceAddressRegionKHR, pCallableShaderBindingTable: [^]StridedDeviceAddressRegionKHR, indirectDeviceAddress: DeviceAddress)
+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)
+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)
+ProcCmdWaitEvents2KHR :: #type proc "system" (commandBuffer: CommandBuffer, eventCount: u32, pEvents: [^]Event, pDependencyInfos: [^]DependencyInfoKHR)
+ProcCmdWriteAccelerationStructuresPropertiesKHR :: #type proc "system" (commandBuffer: CommandBuffer, accelerationStructureCount: u32, pAccelerationStructures: [^]AccelerationStructureKHR, queryType: QueryType, queryPool: QueryPool, firstQuery: u32)
+ProcCmdWriteAccelerationStructuresPropertiesNV :: #type proc "system" (commandBuffer: CommandBuffer, accelerationStructureCount: u32, pAccelerationStructures: [^]AccelerationStructureNV, queryType: QueryType, queryPool: QueryPool, firstQuery: u32)
+ProcCmdWriteBufferMarker2AMD :: #type proc "system" (commandBuffer: CommandBuffer, stage: PipelineStageFlags2KHR, dstBuffer: Buffer, dstOffset: DeviceSize, marker: u32)
+ProcCmdWriteBufferMarkerAMD :: #type proc "system" (commandBuffer: CommandBuffer, pipelineStage: PipelineStageFlags, dstBuffer: Buffer, dstOffset: DeviceSize, marker: u32)
+ProcCmdWriteTimestamp :: #type proc "system" (commandBuffer: CommandBuffer, pipelineStage: PipelineStageFlags, queryPool: QueryPool, query: u32)
+ProcCmdWriteTimestamp2KHR :: #type proc "system" (commandBuffer: CommandBuffer, stage: PipelineStageFlags2KHR, queryPool: QueryPool, query: u32)
+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
+ProcCopyMemoryToAccelerationStructureKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pInfo: ^CopyMemoryToAccelerationStructureInfoKHR) -> Result
+ProcCreateAccelerationStructureKHR :: #type proc "system" (device: Device, pCreateInfo: ^AccelerationStructureCreateInfoKHR, pAllocator: ^AllocationCallbacks, pAccelerationStructure: ^AccelerationStructureKHR) -> Result
+ProcCreateAccelerationStructureNV :: #type proc "system" (device: Device, pCreateInfo: ^AccelerationStructureCreateInfoNV, pAllocator: ^AllocationCallbacks, pAccelerationStructure: ^AccelerationStructureNV) -> Result
+ProcCreateBuffer :: #type proc "system" (device: Device, pCreateInfo: ^BufferCreateInfo, pAllocator: ^AllocationCallbacks, pBuffer: ^Buffer) -> Result
+ProcCreateBufferView :: #type proc "system" (device: Device, pCreateInfo: ^BufferViewCreateInfo, pAllocator: ^AllocationCallbacks, pView: ^BufferView) -> Result
+ProcCreateCommandPool :: #type proc "system" (device: Device, pCreateInfo: ^CommandPoolCreateInfo, pAllocator: ^AllocationCallbacks, pCommandPool: ^CommandPool) -> Result
+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
+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
+ProcCreateDescriptorUpdateTemplate :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorUpdateTemplateCreateInfo, pAllocator: ^AllocationCallbacks, pDescriptorUpdateTemplate: ^DescriptorUpdateTemplate) -> Result
+ProcCreateDescriptorUpdateTemplateKHR :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorUpdateTemplateCreateInfo, pAllocator: ^AllocationCallbacks, pDescriptorUpdateTemplate: ^DescriptorUpdateTemplate) -> Result
+ProcCreateEvent :: #type proc "system" (device: Device, pCreateInfo: ^EventCreateInfo, pAllocator: ^AllocationCallbacks, pEvent: ^Event) -> Result
+ProcCreateFence :: #type proc "system" (device: Device, pCreateInfo: ^FenceCreateInfo, pAllocator: ^AllocationCallbacks, pFence: ^Fence) -> Result
+ProcCreateFramebuffer :: #type proc "system" (device: Device, pCreateInfo: ^FramebufferCreateInfo, pAllocator: ^AllocationCallbacks, pFramebuffer: ^Framebuffer) -> Result
+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
+ProcCreateIndirectCommandsLayoutNV :: #type proc "system" (device: Device, pCreateInfo: ^IndirectCommandsLayoutCreateInfoNV, pAllocator: ^AllocationCallbacks, pIndirectCommandsLayout: ^IndirectCommandsLayoutNV) -> 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
+ProcCreatePrivateDataSlotEXT :: #type proc "system" (device: Device, pCreateInfo: ^PrivateDataSlotCreateInfoEXT, pAllocator: ^AllocationCallbacks, pPrivateDataSlot: ^PrivateDataSlotEXT) -> Result
+ProcCreateQueryPool :: #type proc "system" (device: Device, pCreateInfo: ^QueryPoolCreateInfo, pAllocator: ^AllocationCallbacks, pQueryPool: ^QueryPool) -> Result
+ProcCreateRayTracingPipelinesKHR :: #type proc "system" (device: Device, deferredOperation: DeferredOperationKHR, pipelineCache: PipelineCache, createInfoCount: u32, pCreateInfos: [^]RayTracingPipelineCreateInfoKHR, pAllocator: ^AllocationCallbacks, pPipelines: [^]Pipeline) -> Result
+ProcCreateRayTracingPipelinesNV :: #type proc "system" (device: Device, pipelineCache: PipelineCache, createInfoCount: u32, pCreateInfos: [^]RayTracingPipelineCreateInfoNV, pAllocator: ^AllocationCallbacks, pPipelines: [^]Pipeline) -> Result
+ProcCreateRenderPass :: #type proc "system" (device: Device, pCreateInfo: ^RenderPassCreateInfo, pAllocator: ^AllocationCallbacks, pRenderPass: [^]RenderPass) -> Result
+ProcCreateRenderPass2 :: #type proc "system" (device: Device, pCreateInfo: ^RenderPassCreateInfo2, pAllocator: ^AllocationCallbacks, pRenderPass: [^]RenderPass) -> Result
+ProcCreateRenderPass2KHR :: #type proc "system" (device: Device, pCreateInfo: ^RenderPassCreateInfo2, pAllocator: ^AllocationCallbacks, pRenderPass: [^]RenderPass) -> Result
+ProcCreateSampler :: #type proc "system" (device: Device, pCreateInfo: ^SamplerCreateInfo, pAllocator: ^AllocationCallbacks, pSampler: ^Sampler) -> Result
+ProcCreateSamplerYcbcrConversion :: #type proc "system" (device: Device, pCreateInfo: ^SamplerYcbcrConversionCreateInfo, pAllocator: ^AllocationCallbacks, pYcbcrConversion: ^SamplerYcbcrConversion) -> Result
+ProcCreateSamplerYcbcrConversionKHR :: #type proc "system" (device: Device, pCreateInfo: ^SamplerYcbcrConversionCreateInfo, pAllocator: ^AllocationCallbacks, pYcbcrConversion: ^SamplerYcbcrConversion) -> Result
+ProcCreateSemaphore :: #type proc "system" (device: Device, pCreateInfo: ^SemaphoreCreateInfo, pAllocator: ^AllocationCallbacks, pSemaphore: ^Semaphore) -> Result
+ProcCreateShaderModule :: #type proc "system" (device: Device, pCreateInfo: ^ShaderModuleCreateInfo, pAllocator: ^AllocationCallbacks, pShaderModule: ^ShaderModule) -> Result
+ProcCreateSharedSwapchainsKHR :: #type proc "system" (device: Device, swapchainCount: u32, pCreateInfos: [^]SwapchainCreateInfoKHR, pAllocator: ^AllocationCallbacks, pSwapchains: [^]SwapchainKHR) -> Result
+ProcCreateSwapchainKHR :: #type proc "system" (device: Device, pCreateInfo: ^SwapchainCreateInfoKHR, pAllocator: ^AllocationCallbacks, pSwapchain: ^SwapchainKHR) -> Result
+ProcCreateValidationCacheEXT :: #type proc "system" (device: Device, pCreateInfo: ^ValidationCacheCreateInfoEXT, pAllocator: ^AllocationCallbacks, pValidationCache: ^ValidationCacheEXT) -> Result
+ProcDebugMarkerSetObjectNameEXT :: #type proc "system" (device: Device, pNameInfo: ^DebugMarkerObjectNameInfoEXT) -> Result
+ProcDebugMarkerSetObjectTagEXT :: #type proc "system" (device: Device, pTagInfo: ^DebugMarkerObjectTagInfoEXT) -> Result
+ProcDeferredOperationJoinKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR) -> Result
+ProcDestroyAccelerationStructureKHR :: #type proc "system" (device: Device, accelerationStructure: AccelerationStructureKHR, pAllocator: ^AllocationCallbacks)
+ProcDestroyAccelerationStructureNV :: #type proc "system" (device: Device, accelerationStructure: AccelerationStructureNV, pAllocator: ^AllocationCallbacks)
+ProcDestroyBuffer :: #type proc "system" (device: Device, buffer: Buffer, pAllocator: ^AllocationCallbacks)
+ProcDestroyBufferView :: #type proc "system" (device: Device, bufferView: BufferView, pAllocator: ^AllocationCallbacks)
+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)
+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)
+ProcDestroyDescriptorUpdateTemplate :: #type proc "system" (device: Device, descriptorUpdateTemplate: DescriptorUpdateTemplate, pAllocator: ^AllocationCallbacks)
+ProcDestroyDescriptorUpdateTemplateKHR :: #type proc "system" (device: Device, descriptorUpdateTemplate: DescriptorUpdateTemplate, pAllocator: ^AllocationCallbacks)
+ProcDestroyDevice :: #type proc "system" (device: Device, pAllocator: ^AllocationCallbacks)
+ProcDestroyEvent :: #type proc "system" (device: Device, event: Event, pAllocator: ^AllocationCallbacks)
+ProcDestroyFence :: #type proc "system" (device: Device, fence: Fence, pAllocator: ^AllocationCallbacks)
+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)
+ProcDestroyIndirectCommandsLayoutNV :: #type proc "system" (device: Device, indirectCommandsLayout: IndirectCommandsLayoutNV, pAllocator: ^AllocationCallbacks)
+ProcDestroyPipeline :: #type proc "system" (device: Device, pipeline: Pipeline, pAllocator: ^AllocationCallbacks)
+ProcDestroyPipelineCache :: #type proc "system" (device: Device, pipelineCache: PipelineCache, pAllocator: ^AllocationCallbacks)
+ProcDestroyPipelineLayout :: #type proc "system" (device: Device, pipelineLayout: PipelineLayout, pAllocator: ^AllocationCallbacks)
+ProcDestroyPrivateDataSlotEXT :: #type proc "system" (device: Device, privateDataSlot: PrivateDataSlotEXT, pAllocator: ^AllocationCallbacks)
+ProcDestroyQueryPool :: #type proc "system" (device: Device, queryPool: QueryPool, pAllocator: ^AllocationCallbacks)
+ProcDestroyRenderPass :: #type proc "system" (device: Device, renderPass: RenderPass, pAllocator: ^AllocationCallbacks)
+ProcDestroySampler :: #type proc "system" (device: Device, sampler: Sampler, pAllocator: ^AllocationCallbacks)
+ProcDestroySamplerYcbcrConversion :: #type proc "system" (device: Device, ycbcrConversion: SamplerYcbcrConversion, pAllocator: ^AllocationCallbacks)
+ProcDestroySamplerYcbcrConversionKHR :: #type proc "system" (device: Device, ycbcrConversion: SamplerYcbcrConversion, pAllocator: ^AllocationCallbacks)
+ProcDestroySemaphore :: #type proc "system" (device: Device, semaphore: Semaphore, pAllocator: ^AllocationCallbacks)
+ProcDestroyShaderModule :: #type proc "system" (device: Device, shaderModule: ShaderModule, pAllocator: ^AllocationCallbacks)
+ProcDestroySwapchainKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pAllocator: ^AllocationCallbacks)
+ProcDestroyValidationCacheEXT :: #type proc "system" (device: Device, validationCache: ValidationCacheEXT, pAllocator: ^AllocationCallbacks)
+ProcDeviceWaitIdle :: #type proc "system" (device: Device) -> Result
+ProcDisplayPowerControlEXT :: #type proc "system" (device: Device, display: DisplayKHR, pDisplayPowerInfo: ^DisplayPowerInfoEXT) -> Result
+ProcEndCommandBuffer :: #type proc "system" (commandBuffer: CommandBuffer) -> Result
+ProcFlushMappedMemoryRanges :: #type proc "system" (device: Device, memoryRangeCount: u32, pMemoryRanges: [^]MappedMemoryRange) -> Result
+ProcFreeCommandBuffers :: #type proc "system" (device: Device, commandPool: CommandPool, commandBufferCount: u32, pCommandBuffers: [^]CommandBuffer)
+ProcFreeDescriptorSets :: #type proc "system" (device: Device, descriptorPool: DescriptorPool, descriptorSetCount: u32, pDescriptorSets: [^]DescriptorSet) -> Result
+ProcFreeMemory :: #type proc "system" (device: Device, memory: DeviceMemory, pAllocator: ^AllocationCallbacks)
+ProcGetAccelerationStructureBuildSizesKHR :: #type proc "system" (device: Device, buildType: AccelerationStructureBuildTypeKHR, pBuildInfo: ^AccelerationStructureBuildGeometryInfoKHR, pMaxPrimitiveCounts: [^]u32, pSizeInfo: ^AccelerationStructureBuildSizesInfoKHR)
+ProcGetAccelerationStructureDeviceAddressKHR :: #type proc "system" (device: Device, pInfo: ^AccelerationStructureDeviceAddressInfoKHR) -> DeviceAddress
+ProcGetAccelerationStructureHandleNV :: #type proc "system" (device: Device, accelerationStructure: AccelerationStructureNV, dataSize: int, pData: rawptr) -> Result
+ProcGetAccelerationStructureMemoryRequirementsNV :: #type proc "system" (device: Device, pInfo: ^AccelerationStructureMemoryRequirementsInfoNV, pMemoryRequirements: [^]MemoryRequirements2KHR)
+ProcGetBufferDeviceAddress :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> DeviceAddress
+ProcGetBufferDeviceAddressEXT :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> DeviceAddress
+ProcGetBufferDeviceAddressKHR :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> DeviceAddress
+ProcGetBufferMemoryRequirements :: #type proc "system" (device: Device, buffer: Buffer, pMemoryRequirements: [^]MemoryRequirements)
+ProcGetBufferMemoryRequirements2 :: #type proc "system" (device: Device, pInfo: ^BufferMemoryRequirementsInfo2, pMemoryRequirements: [^]MemoryRequirements2)
+ProcGetBufferMemoryRequirements2KHR :: #type proc "system" (device: Device, pInfo: ^BufferMemoryRequirementsInfo2, pMemoryRequirements: [^]MemoryRequirements2)
+ProcGetBufferOpaqueCaptureAddress :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> u64
+ProcGetBufferOpaqueCaptureAddressKHR :: #type proc "system" (device: Device, pInfo: ^BufferDeviceAddressInfo) -> u64
+ProcGetCalibratedTimestampsEXT :: #type proc "system" (device: Device, timestampCount: u32, pTimestampInfos: [^]CalibratedTimestampInfoEXT, pTimestamps: [^]u64, pMaxDeviation: ^u64) -> Result
+ProcGetDeferredOperationMaxConcurrencyKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR) -> u32
+ProcGetDeferredOperationResultKHR :: #type proc "system" (device: Device, operation: DeferredOperationKHR) -> Result
+ProcGetDescriptorSetLayoutSupport :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorSetLayoutCreateInfo, pSupport: ^DescriptorSetLayoutSupport)
+ProcGetDescriptorSetLayoutSupportKHR :: #type proc "system" (device: Device, pCreateInfo: ^DescriptorSetLayoutCreateInfo, pSupport: ^DescriptorSetLayoutSupport)
+ProcGetDeviceAccelerationStructureCompatibilityKHR :: #type proc "system" (device: Device, pVersionInfo: ^AccelerationStructureVersionInfoKHR, pCompatibility: ^AccelerationStructureCompatibilityKHR)
+ProcGetDeviceGroupPeerMemoryFeatures :: #type proc "system" (device: Device, heapIndex: u32, localDeviceIndex: u32, remoteDeviceIndex: u32, pPeerMemoryFeatures: [^]PeerMemoryFeatureFlags)
+ProcGetDeviceGroupPeerMemoryFeaturesKHR :: #type proc "system" (device: Device, heapIndex: u32, localDeviceIndex: u32, remoteDeviceIndex: u32, pPeerMemoryFeatures: [^]PeerMemoryFeatureFlags)
+ProcGetDeviceGroupPresentCapabilitiesKHR :: #type proc "system" (device: Device, pDeviceGroupPresentCapabilities: [^]DeviceGroupPresentCapabilitiesKHR) -> Result
+ProcGetDeviceGroupSurfacePresentModes2EXT :: #type proc "system" (device: Device, pSurfaceInfo: ^PhysicalDeviceSurfaceInfo2KHR, pModes: [^]DeviceGroupPresentModeFlagsKHR) -> Result
+ProcGetDeviceGroupSurfacePresentModesKHR :: #type proc "system" (device: Device, surface: SurfaceKHR, pModes: [^]DeviceGroupPresentModeFlagsKHR) -> Result
+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
+ProcGetDeviceProcAddr :: #type proc "system" (device: Device, pName: cstring) -> ProcVoidFunction
+ProcGetDeviceQueue :: #type proc "system" (device: Device, queueFamilyIndex: u32, queueIndex: u32, pQueue: ^Queue)
+ProcGetDeviceQueue2 :: #type proc "system" (device: Device, pQueueInfo: ^DeviceQueueInfo2, pQueue: ^Queue)
+ProcGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI :: #type proc "system" (device: Device, renderpass: RenderPass, pMaxWorkgroupSize: ^Extent2D) -> 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
+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)
+ProcGetImageMemoryRequirements2 :: #type proc "system" (device: Device, pInfo: ^ImageMemoryRequirementsInfo2, pMemoryRequirements: [^]MemoryRequirements2)
+ProcGetImageMemoryRequirements2KHR :: #type proc "system" (device: Device, pInfo: ^ImageMemoryRequirementsInfo2, pMemoryRequirements: [^]MemoryRequirements2)
+ProcGetImageSparseMemoryRequirements :: #type proc "system" (device: Device, image: Image, pSparseMemoryRequirementCount: ^u32, pSparseMemoryRequirements: [^]SparseImageMemoryRequirements)
+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)
+ProcGetImageViewAddressNVX :: #type proc "system" (device: Device, imageView: ImageView, pProperties: [^]ImageViewAddressPropertiesNVX) -> Result
+ProcGetImageViewHandleNVX :: #type proc "system" (device: Device, pInfo: ^ImageViewHandleInfoNVX) -> u32
+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
+ProcGetMemoryRemoteAddressNV :: #type proc "system" (device: Device, pMemoryGetRemoteAddressInfo: ^MemoryGetRemoteAddressInfoNV, pAddress: [^]RemoteAddressNV) -> Result
+ProcGetMemoryWin32HandleKHR :: #type proc "system" (device: Device, pGetWin32HandleInfo: ^MemoryGetWin32HandleInfoKHR, pHandle: ^HANDLE) -> Result
+ProcGetMemoryWin32HandleNV :: #type proc "system" (device: Device, memory: DeviceMemory, handleType: ExternalMemoryHandleTypeFlagsNV, pHandle: ^HANDLE) -> Result
+ProcGetMemoryWin32HandlePropertiesKHR :: #type proc "system" (device: Device, handleType: ExternalMemoryHandleTypeFlags, handle: HANDLE, pMemoryWin32HandleProperties: [^]MemoryWin32HandlePropertiesKHR) -> Result
+ProcGetPastPresentationTimingGOOGLE :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pPresentationTimingCount: ^u32, pPresentationTimings: [^]PastPresentationTimingGOOGLE) -> Result
+ProcGetPerformanceParameterINTEL :: #type proc "system" (device: Device, parameter: PerformanceParameterTypeINTEL, pValue: ^PerformanceValueINTEL) -> 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
+ProcGetPrivateDataEXT :: #type proc "system" (device: Device, objectType: ObjectType, objectHandle: u64, privateDataSlot: PrivateDataSlotEXT, pData: ^u64)
+ProcGetQueryPoolResults :: #type proc "system" (device: Device, queryPool: QueryPool, firstQuery: u32, queryCount: u32, dataSize: int, pData: rawptr, stride: DeviceSize, flags: QueryResultFlags) -> Result
+ProcGetQueueCheckpointData2NV :: #type proc "system" (queue: Queue, pCheckpointDataCount: ^u32, pCheckpointData: ^CheckpointData2NV)
+ProcGetQueueCheckpointDataNV :: #type proc "system" (queue: Queue, pCheckpointDataCount: ^u32, pCheckpointData: ^CheckpointDataNV)
+ProcGetRayTracingCaptureReplayShaderGroupHandlesKHR :: #type proc "system" (device: Device, pipeline: Pipeline, firstGroup: u32, groupCount: u32, dataSize: int, pData: rawptr) -> Result
+ProcGetRayTracingShaderGroupHandlesKHR :: #type proc "system" (device: Device, pipeline: Pipeline, firstGroup: u32, groupCount: u32, dataSize: int, pData: rawptr) -> Result
+ProcGetRayTracingShaderGroupHandlesNV :: #type proc "system" (device: Device, pipeline: Pipeline, firstGroup: u32, groupCount: u32, dataSize: int, pData: rawptr) -> Result
+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)
+ProcGetSemaphoreCounterValue :: #type proc "system" (device: Device, semaphore: Semaphore, pValue: ^u64) -> Result
+ProcGetSemaphoreCounterValueKHR :: #type proc "system" (device: Device, semaphore: Semaphore, pValue: ^u64) -> Result
+ProcGetSemaphoreFdKHR :: #type proc "system" (device: Device, pGetFdInfo: ^SemaphoreGetFdInfoKHR, pFd: ^c.int) -> Result
+ProcGetSemaphoreWin32HandleKHR :: #type proc "system" (device: Device, pGetWin32HandleInfo: ^SemaphoreGetWin32HandleInfoKHR, pHandle: ^HANDLE) -> Result
+ProcGetShaderInfoAMD :: #type proc "system" (device: Device, pipeline: Pipeline, shaderStage: ShaderStageFlags, infoType: ShaderInfoTypeAMD, pInfoSize: ^int, pInfo: rawptr) -> Result
+ProcGetSwapchainCounterEXT :: #type proc "system" (device: Device, swapchain: SwapchainKHR, counter: SurfaceCounterFlagsEXT, pCounterValue: ^u64) -> Result
+ProcGetSwapchainImagesKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR, pSwapchainImageCount: ^u32, pSwapchainImages: [^]Image) -> Result
+ProcGetSwapchainStatusKHR :: #type proc "system" (device: Device, swapchain: SwapchainKHR) -> Result
+ProcGetValidationCacheDataEXT :: #type proc "system" (device: Device, validationCache: ValidationCacheEXT, pDataSize: ^int, pData: rawptr) -> Result
+ProcImportFenceFdKHR :: #type proc "system" (device: Device, pImportFenceFdInfo: ^ImportFenceFdInfoKHR) -> Result
+ProcImportFenceWin32HandleKHR :: #type proc "system" (device: Device, pImportFenceWin32HandleInfo: ^ImportFenceWin32HandleInfoKHR) -> Result
+ProcImportSemaphoreFdKHR :: #type proc "system" (device: Device, pImportSemaphoreFdInfo: ^ImportSemaphoreFdInfoKHR) -> Result
+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
+ProcMapMemory :: #type proc "system" (device: Device, memory: DeviceMemory, offset: DeviceSize, size: DeviceSize, flags: MemoryMapFlags, ppData: ^rawptr) -> Result
+ProcMergePipelineCaches :: #type proc "system" (device: Device, dstCache: PipelineCache, srcCacheCount: u32, pSrcCaches: [^]PipelineCache) -> Result
+ProcMergeValidationCachesEXT :: #type proc "system" (device: Device, dstCache: ValidationCacheEXT, srcCacheCount: u32, pSrcCaches: [^]ValidationCacheEXT) -> Result
+ProcQueueBeginDebugUtilsLabelEXT :: #type proc "system" (queue: Queue, pLabelInfo: ^DebugUtilsLabelEXT)
+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)
+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
+ProcQueueSubmit2KHR :: #type proc "system" (queue: Queue, submitCount: u32, pSubmits: [^]SubmitInfo2KHR, fence: Fence) -> Result
+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
+ProcReleaseFullScreenExclusiveModeEXT :: #type proc "system" (device: Device, swapchain: SwapchainKHR) -> Result
+ProcReleasePerformanceConfigurationINTEL :: #type proc "system" (device: Device, configuration: PerformanceConfigurationINTEL) -> Result
+ProcReleaseProfilingLockKHR :: #type proc "system" (device: Device)
+ProcResetCommandBuffer :: #type proc "system" (commandBuffer: CommandBuffer, flags: CommandBufferResetFlags) -> Result
+ProcResetCommandPool :: #type proc "system" (device: Device, commandPool: CommandPool, flags: CommandPoolResetFlags) -> Result
+ProcResetDescriptorPool :: #type proc "system" (device: Device, descriptorPool: DescriptorPool, flags: DescriptorPoolResetFlags) -> Result
+ProcResetEvent :: #type proc "system" (device: Device, event: Event) -> Result
+ProcResetFences :: #type proc "system" (device: Device, fenceCount: u32, pFences: [^]Fence) -> Result
+ProcResetQueryPool :: #type proc "system" (device: Device, queryPool: QueryPool, firstQuery: u32, queryCount: u32)
+ProcResetQueryPoolEXT :: #type proc "system" (device: Device, queryPool: QueryPool, firstQuery: u32, queryCount: u32)
+ProcSetDebugUtilsObjectNameEXT :: #type proc "system" (device: Device, pNameInfo: ^DebugUtilsObjectNameInfoEXT) -> Result
+ProcSetDebugUtilsObjectTagEXT :: #type proc "system" (device: Device, pTagInfo: ^DebugUtilsObjectTagInfoEXT) -> Result
+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)
+ProcSetLocalDimmingAMD :: #type proc "system" (device: Device, swapChain: SwapchainKHR, localDimmingEnable: b32)
+ProcSetPrivateDataEXT :: #type proc "system" (device: Device, objectType: ObjectType, objectHandle: u64, privateDataSlot: PrivateDataSlotEXT, data: u64) -> Result
+ProcSignalSemaphore :: #type proc "system" (device: Device, pSignalInfo: ^SemaphoreSignalInfo) -> Result
+ProcSignalSemaphoreKHR :: #type proc "system" (device: Device, pSignalInfo: ^SemaphoreSignalInfo) -> 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)
+ProcUnmapMemory :: #type proc "system" (device: Device, memory: DeviceMemory)
+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)
+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
+ProcWaitSemaphores :: #type proc "system" (device: Device, pWaitInfo: ^SemaphoreWaitInfo, timeout: u64) -> Result
+ProcWaitSemaphoresKHR :: #type proc "system" (device: Device, pWaitInfo: ^SemaphoreWaitInfo, timeout: u64) -> Result
+ProcWriteAccelerationStructuresPropertiesKHR :: #type proc "system" (device: Device, accelerationStructureCount: u32, pAccelerationStructures: [^]AccelerationStructureKHR, queryType: QueryType, dataSize: int, pData: rawptr, stride: int) -> Result
+
+
+// Loader Procedures
+CreateInstance: ProcCreateInstance
+DebugUtilsMessengerCallbackEXT: ProcDebugUtilsMessengerCallbackEXT
+DeviceMemoryReportCallbackEXT: ProcDeviceMemoryReportCallbackEXT
+EnumerateInstanceExtensionProperties: ProcEnumerateInstanceExtensionProperties
+EnumerateInstanceLayerProperties: ProcEnumerateInstanceLayerProperties
+EnumerateInstanceVersion: ProcEnumerateInstanceVersion
// Instance Procedures
-DestroyInstance: ProcDestroyInstance
-EnumeratePhysicalDevices: ProcEnumeratePhysicalDevices
-GetPhysicalDeviceFeatures: ProcGetPhysicalDeviceFeatures
-GetPhysicalDeviceFormatProperties: ProcGetPhysicalDeviceFormatProperties
-GetPhysicalDeviceImageFormatProperties: ProcGetPhysicalDeviceImageFormatProperties
-GetPhysicalDeviceProperties: ProcGetPhysicalDeviceProperties
-GetPhysicalDeviceQueueFamilyProperties: ProcGetPhysicalDeviceQueueFamilyProperties
-GetPhysicalDeviceMemoryProperties: ProcGetPhysicalDeviceMemoryProperties
-GetInstanceProcAddr: ProcGetInstanceProcAddr
+AcquireDrmDisplayEXT: ProcAcquireDrmDisplayEXT
+AcquireWinrtDisplayNV: ProcAcquireWinrtDisplayNV
+CreateDebugReportCallbackEXT: ProcCreateDebugReportCallbackEXT
+CreateDebugUtilsMessengerEXT: ProcCreateDebugUtilsMessengerEXT
CreateDevice: ProcCreateDevice
+CreateDisplayModeKHR: ProcCreateDisplayModeKHR
+CreateDisplayPlaneSurfaceKHR: ProcCreateDisplayPlaneSurfaceKHR
+CreateHeadlessSurfaceEXT: ProcCreateHeadlessSurfaceEXT
+CreateIOSSurfaceMVK: ProcCreateIOSSurfaceMVK
+CreateMacOSSurfaceMVK: ProcCreateMacOSSurfaceMVK
+CreateMetalSurfaceEXT: ProcCreateMetalSurfaceEXT
+CreateWin32SurfaceKHR: ProcCreateWin32SurfaceKHR
+DebugReportMessageEXT: ProcDebugReportMessageEXT
+DestroyDebugReportCallbackEXT: ProcDestroyDebugReportCallbackEXT
+DestroyDebugUtilsMessengerEXT: ProcDestroyDebugUtilsMessengerEXT
+DestroyInstance: ProcDestroyInstance
+DestroySurfaceKHR: ProcDestroySurfaceKHR
EnumerateDeviceExtensionProperties: ProcEnumerateDeviceExtensionProperties
EnumerateDeviceLayerProperties: ProcEnumerateDeviceLayerProperties
-GetPhysicalDeviceSparseImageFormatProperties: ProcGetPhysicalDeviceSparseImageFormatProperties
EnumeratePhysicalDeviceGroups: ProcEnumeratePhysicalDeviceGroups
-GetPhysicalDeviceFeatures2: ProcGetPhysicalDeviceFeatures2
-GetPhysicalDeviceProperties2: ProcGetPhysicalDeviceProperties2
-GetPhysicalDeviceFormatProperties2: ProcGetPhysicalDeviceFormatProperties2
-GetPhysicalDeviceImageFormatProperties2: ProcGetPhysicalDeviceImageFormatProperties2
-GetPhysicalDeviceQueueFamilyProperties2: ProcGetPhysicalDeviceQueueFamilyProperties2
-GetPhysicalDeviceMemoryProperties2: ProcGetPhysicalDeviceMemoryProperties2
-GetPhysicalDeviceSparseImageFormatProperties2: ProcGetPhysicalDeviceSparseImageFormatProperties2
+EnumeratePhysicalDeviceGroupsKHR: ProcEnumeratePhysicalDeviceGroupsKHR
+EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR: ProcEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
+EnumeratePhysicalDevices: ProcEnumeratePhysicalDevices
+GetDisplayModeProperties2KHR: ProcGetDisplayModeProperties2KHR
+GetDisplayModePropertiesKHR: ProcGetDisplayModePropertiesKHR
+GetDisplayPlaneCapabilities2KHR: ProcGetDisplayPlaneCapabilities2KHR
+GetDisplayPlaneCapabilitiesKHR: ProcGetDisplayPlaneCapabilitiesKHR
+GetDisplayPlaneSupportedDisplaysKHR: ProcGetDisplayPlaneSupportedDisplaysKHR
+GetDrmDisplayEXT: ProcGetDrmDisplayEXT
+GetInstanceProcAddr: ProcGetInstanceProcAddr
+GetPhysicalDeviceCalibrateableTimeDomainsEXT: ProcGetPhysicalDeviceCalibrateableTimeDomainsEXT
+GetPhysicalDeviceCooperativeMatrixPropertiesNV: ProcGetPhysicalDeviceCooperativeMatrixPropertiesNV
+GetPhysicalDeviceDisplayPlaneProperties2KHR: ProcGetPhysicalDeviceDisplayPlaneProperties2KHR
+GetPhysicalDeviceDisplayPlanePropertiesKHR: ProcGetPhysicalDeviceDisplayPlanePropertiesKHR
+GetPhysicalDeviceDisplayProperties2KHR: ProcGetPhysicalDeviceDisplayProperties2KHR
+GetPhysicalDeviceDisplayPropertiesKHR: ProcGetPhysicalDeviceDisplayPropertiesKHR
GetPhysicalDeviceExternalBufferProperties: ProcGetPhysicalDeviceExternalBufferProperties
+GetPhysicalDeviceExternalBufferPropertiesKHR: ProcGetPhysicalDeviceExternalBufferPropertiesKHR
GetPhysicalDeviceExternalFenceProperties: ProcGetPhysicalDeviceExternalFenceProperties
+GetPhysicalDeviceExternalFencePropertiesKHR: ProcGetPhysicalDeviceExternalFencePropertiesKHR
+GetPhysicalDeviceExternalImageFormatPropertiesNV: ProcGetPhysicalDeviceExternalImageFormatPropertiesNV
GetPhysicalDeviceExternalSemaphoreProperties: ProcGetPhysicalDeviceExternalSemaphoreProperties
-DestroySurfaceKHR: ProcDestroySurfaceKHR
-GetPhysicalDeviceSurfaceSupportKHR: ProcGetPhysicalDeviceSurfaceSupportKHR
-GetPhysicalDeviceSurfaceCapabilitiesKHR: ProcGetPhysicalDeviceSurfaceCapabilitiesKHR
-GetPhysicalDeviceSurfaceFormatsKHR: ProcGetPhysicalDeviceSurfaceFormatsKHR
-GetPhysicalDeviceSurfacePresentModesKHR: ProcGetPhysicalDeviceSurfacePresentModesKHR
-GetPhysicalDevicePresentRectanglesKHR: ProcGetPhysicalDevicePresentRectanglesKHR
-GetPhysicalDeviceDisplayPropertiesKHR: ProcGetPhysicalDeviceDisplayPropertiesKHR
-GetPhysicalDeviceDisplayPlanePropertiesKHR: ProcGetPhysicalDeviceDisplayPlanePropertiesKHR
-GetDisplayPlaneSupportedDisplaysKHR: ProcGetDisplayPlaneSupportedDisplaysKHR
-GetDisplayModePropertiesKHR: ProcGetDisplayModePropertiesKHR
-CreateDisplayModeKHR: ProcCreateDisplayModeKHR
-GetDisplayPlaneCapabilitiesKHR: ProcGetDisplayPlaneCapabilitiesKHR
-CreateDisplayPlaneSurfaceKHR: ProcCreateDisplayPlaneSurfaceKHR
+GetPhysicalDeviceExternalSemaphorePropertiesKHR: ProcGetPhysicalDeviceExternalSemaphorePropertiesKHR
+GetPhysicalDeviceFeatures: ProcGetPhysicalDeviceFeatures
+GetPhysicalDeviceFeatures2: ProcGetPhysicalDeviceFeatures2
GetPhysicalDeviceFeatures2KHR: ProcGetPhysicalDeviceFeatures2KHR
-GetPhysicalDeviceProperties2KHR: ProcGetPhysicalDeviceProperties2KHR
+GetPhysicalDeviceFormatProperties: ProcGetPhysicalDeviceFormatProperties
+GetPhysicalDeviceFormatProperties2: ProcGetPhysicalDeviceFormatProperties2
GetPhysicalDeviceFormatProperties2KHR: ProcGetPhysicalDeviceFormatProperties2KHR
+GetPhysicalDeviceFragmentShadingRatesKHR: ProcGetPhysicalDeviceFragmentShadingRatesKHR
+GetPhysicalDeviceImageFormatProperties: ProcGetPhysicalDeviceImageFormatProperties
+GetPhysicalDeviceImageFormatProperties2: ProcGetPhysicalDeviceImageFormatProperties2
GetPhysicalDeviceImageFormatProperties2KHR: ProcGetPhysicalDeviceImageFormatProperties2KHR
-GetPhysicalDeviceQueueFamilyProperties2KHR: ProcGetPhysicalDeviceQueueFamilyProperties2KHR
+GetPhysicalDeviceMemoryProperties: ProcGetPhysicalDeviceMemoryProperties
+GetPhysicalDeviceMemoryProperties2: ProcGetPhysicalDeviceMemoryProperties2
GetPhysicalDeviceMemoryProperties2KHR: ProcGetPhysicalDeviceMemoryProperties2KHR
-GetPhysicalDeviceSparseImageFormatProperties2KHR: ProcGetPhysicalDeviceSparseImageFormatProperties2KHR
-EnumeratePhysicalDeviceGroupsKHR: ProcEnumeratePhysicalDeviceGroupsKHR
-GetPhysicalDeviceExternalBufferPropertiesKHR: ProcGetPhysicalDeviceExternalBufferPropertiesKHR
-GetPhysicalDeviceExternalSemaphorePropertiesKHR: ProcGetPhysicalDeviceExternalSemaphorePropertiesKHR
-GetPhysicalDeviceExternalFencePropertiesKHR: ProcGetPhysicalDeviceExternalFencePropertiesKHR
-EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR: ProcEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
+GetPhysicalDeviceMultisamplePropertiesEXT: ProcGetPhysicalDeviceMultisamplePropertiesEXT
+GetPhysicalDevicePresentRectanglesKHR: ProcGetPhysicalDevicePresentRectanglesKHR
+GetPhysicalDeviceProperties: ProcGetPhysicalDeviceProperties
+GetPhysicalDeviceProperties2: ProcGetPhysicalDeviceProperties2
+GetPhysicalDeviceProperties2KHR: ProcGetPhysicalDeviceProperties2KHR
GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR: ProcGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
+GetPhysicalDeviceQueueFamilyProperties: ProcGetPhysicalDeviceQueueFamilyProperties
+GetPhysicalDeviceQueueFamilyProperties2: ProcGetPhysicalDeviceQueueFamilyProperties2
+GetPhysicalDeviceQueueFamilyProperties2KHR: ProcGetPhysicalDeviceQueueFamilyProperties2KHR
+GetPhysicalDeviceSparseImageFormatProperties: ProcGetPhysicalDeviceSparseImageFormatProperties
+GetPhysicalDeviceSparseImageFormatProperties2: ProcGetPhysicalDeviceSparseImageFormatProperties2
+GetPhysicalDeviceSparseImageFormatProperties2KHR: ProcGetPhysicalDeviceSparseImageFormatProperties2KHR
+GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV: ProcGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV
+GetPhysicalDeviceSurfaceCapabilities2EXT: ProcGetPhysicalDeviceSurfaceCapabilities2EXT
GetPhysicalDeviceSurfaceCapabilities2KHR: ProcGetPhysicalDeviceSurfaceCapabilities2KHR
+GetPhysicalDeviceSurfaceCapabilitiesKHR: ProcGetPhysicalDeviceSurfaceCapabilitiesKHR
GetPhysicalDeviceSurfaceFormats2KHR: ProcGetPhysicalDeviceSurfaceFormats2KHR
-GetPhysicalDeviceDisplayProperties2KHR: ProcGetPhysicalDeviceDisplayProperties2KHR
-GetPhysicalDeviceDisplayPlaneProperties2KHR: ProcGetPhysicalDeviceDisplayPlaneProperties2KHR
-GetDisplayModeProperties2KHR: ProcGetDisplayModeProperties2KHR
-GetDisplayPlaneCapabilities2KHR: ProcGetDisplayPlaneCapabilities2KHR
-GetPhysicalDeviceFragmentShadingRatesKHR: ProcGetPhysicalDeviceFragmentShadingRatesKHR
-CreateDebugReportCallbackEXT: ProcCreateDebugReportCallbackEXT
-DestroyDebugReportCallbackEXT: ProcDestroyDebugReportCallbackEXT
-DebugReportMessageEXT: ProcDebugReportMessageEXT
-GetPhysicalDeviceExternalImageFormatPropertiesNV: ProcGetPhysicalDeviceExternalImageFormatPropertiesNV
-ReleaseDisplayEXT: ProcReleaseDisplayEXT
-GetPhysicalDeviceSurfaceCapabilities2EXT: ProcGetPhysicalDeviceSurfaceCapabilities2EXT
-CreateDebugUtilsMessengerEXT: ProcCreateDebugUtilsMessengerEXT
-DestroyDebugUtilsMessengerEXT: ProcDestroyDebugUtilsMessengerEXT
-SubmitDebugUtilsMessageEXT: ProcSubmitDebugUtilsMessageEXT
-GetPhysicalDeviceMultisamplePropertiesEXT: ProcGetPhysicalDeviceMultisamplePropertiesEXT
-GetPhysicalDeviceCalibrateableTimeDomainsEXT: ProcGetPhysicalDeviceCalibrateableTimeDomainsEXT
+GetPhysicalDeviceSurfaceFormatsKHR: ProcGetPhysicalDeviceSurfaceFormatsKHR
+GetPhysicalDeviceSurfacePresentModes2EXT: ProcGetPhysicalDeviceSurfacePresentModes2EXT
+GetPhysicalDeviceSurfacePresentModesKHR: ProcGetPhysicalDeviceSurfacePresentModesKHR
+GetPhysicalDeviceSurfaceSupportKHR: ProcGetPhysicalDeviceSurfaceSupportKHR
GetPhysicalDeviceToolPropertiesEXT: ProcGetPhysicalDeviceToolPropertiesEXT
-GetPhysicalDeviceCooperativeMatrixPropertiesNV: ProcGetPhysicalDeviceCooperativeMatrixPropertiesNV
-GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV: ProcGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV
-CreateHeadlessSurfaceEXT: ProcCreateHeadlessSurfaceEXT
-AcquireDrmDisplayEXT: ProcAcquireDrmDisplayEXT
-GetDrmDisplayEXT: ProcGetDrmDisplayEXT
-AcquireWinrtDisplayNV: ProcAcquireWinrtDisplayNV
-GetWinrtDisplayNV: ProcGetWinrtDisplayNV
-CreateWin32SurfaceKHR: ProcCreateWin32SurfaceKHR
GetPhysicalDeviceWin32PresentationSupportKHR: ProcGetPhysicalDeviceWin32PresentationSupportKHR
-GetPhysicalDeviceSurfacePresentModes2EXT: ProcGetPhysicalDeviceSurfacePresentModes2EXT
-CreateMetalSurfaceEXT: ProcCreateMetalSurfaceEXT
-CreateMacOSSurfaceMVK: ProcCreateMacOSSurfaceMVK
-CreateIOSSurfaceMVK: ProcCreateIOSSurfaceMVK
+GetWinrtDisplayNV: ProcGetWinrtDisplayNV
+ReleaseDisplayEXT: ProcReleaseDisplayEXT
+SubmitDebugUtilsMessageEXT: ProcSubmitDebugUtilsMessageEXT
// Device Procedures
-GetDeviceProcAddr: ProcGetDeviceProcAddr
-DestroyDevice: ProcDestroyDevice
-GetDeviceQueue: ProcGetDeviceQueue
-QueueSubmit: ProcQueueSubmit
-QueueWaitIdle: ProcQueueWaitIdle
-DeviceWaitIdle: ProcDeviceWaitIdle
+AcquireFullScreenExclusiveModeEXT: ProcAcquireFullScreenExclusiveModeEXT
+AcquireNextImage2KHR: ProcAcquireNextImage2KHR
+AcquireNextImageKHR: ProcAcquireNextImageKHR
+AcquirePerformanceConfigurationINTEL: ProcAcquirePerformanceConfigurationINTEL
+AcquireProfilingLockKHR: ProcAcquireProfilingLockKHR
+AllocateCommandBuffers: ProcAllocateCommandBuffers
+AllocateDescriptorSets: ProcAllocateDescriptorSets
AllocateMemory: ProcAllocateMemory
-FreeMemory: ProcFreeMemory
-MapMemory: ProcMapMemory
-UnmapMemory: ProcUnmapMemory
-FlushMappedMemoryRanges: ProcFlushMappedMemoryRanges
-InvalidateMappedMemoryRanges: ProcInvalidateMappedMemoryRanges
-GetDeviceMemoryCommitment: ProcGetDeviceMemoryCommitment
+BeginCommandBuffer: ProcBeginCommandBuffer
+BindAccelerationStructureMemoryNV: ProcBindAccelerationStructureMemoryNV
BindBufferMemory: ProcBindBufferMemory
+BindBufferMemory2: ProcBindBufferMemory2
+BindBufferMemory2KHR: ProcBindBufferMemory2KHR
BindImageMemory: ProcBindImageMemory
-GetBufferMemoryRequirements: ProcGetBufferMemoryRequirements
-GetImageMemoryRequirements: ProcGetImageMemoryRequirements
-GetImageSparseMemoryRequirements: ProcGetImageSparseMemoryRequirements
-QueueBindSparse: ProcQueueBindSparse
-CreateFence: ProcCreateFence
-DestroyFence: ProcDestroyFence
-ResetFences: ProcResetFences
-GetFenceStatus: ProcGetFenceStatus
-WaitForFences: ProcWaitForFences
-CreateSemaphore: ProcCreateSemaphore
-DestroySemaphore: ProcDestroySemaphore
-CreateEvent: ProcCreateEvent
-DestroyEvent: ProcDestroyEvent
-GetEventStatus: ProcGetEventStatus
-SetEvent: ProcSetEvent
-ResetEvent: ProcResetEvent
-CreateQueryPool: ProcCreateQueryPool
-DestroyQueryPool: ProcDestroyQueryPool
-GetQueryPoolResults: ProcGetQueryPoolResults
-CreateBuffer: ProcCreateBuffer
-DestroyBuffer: ProcDestroyBuffer
-CreateBufferView: ProcCreateBufferView
-DestroyBufferView: ProcDestroyBufferView
-CreateImage: ProcCreateImage
-DestroyImage: ProcDestroyImage
-GetImageSubresourceLayout: ProcGetImageSubresourceLayout
-CreateImageView: ProcCreateImageView
-DestroyImageView: ProcDestroyImageView
-CreateShaderModule: ProcCreateShaderModule
-DestroyShaderModule: ProcDestroyShaderModule
-CreatePipelineCache: ProcCreatePipelineCache
-DestroyPipelineCache: ProcDestroyPipelineCache
-GetPipelineCacheData: ProcGetPipelineCacheData
-MergePipelineCaches: ProcMergePipelineCaches
-CreateGraphicsPipelines: ProcCreateGraphicsPipelines
-CreateComputePipelines: ProcCreateComputePipelines
-DestroyPipeline: ProcDestroyPipeline
-CreatePipelineLayout: ProcCreatePipelineLayout
-DestroyPipelineLayout: ProcDestroyPipelineLayout
-CreateSampler: ProcCreateSampler
-DestroySampler: ProcDestroySampler
-CreateDescriptorSetLayout: ProcCreateDescriptorSetLayout
-DestroyDescriptorSetLayout: ProcDestroyDescriptorSetLayout
-CreateDescriptorPool: ProcCreateDescriptorPool
-DestroyDescriptorPool: ProcDestroyDescriptorPool
-ResetDescriptorPool: ProcResetDescriptorPool
-AllocateDescriptorSets: ProcAllocateDescriptorSets
-FreeDescriptorSets: ProcFreeDescriptorSets
-UpdateDescriptorSets: ProcUpdateDescriptorSets
-CreateFramebuffer: ProcCreateFramebuffer
-DestroyFramebuffer: ProcDestroyFramebuffer
-CreateRenderPass: ProcCreateRenderPass
-DestroyRenderPass: ProcDestroyRenderPass
-GetRenderAreaGranularity: ProcGetRenderAreaGranularity
-CreateCommandPool: ProcCreateCommandPool
-DestroyCommandPool: ProcDestroyCommandPool
-ResetCommandPool: ProcResetCommandPool
-AllocateCommandBuffers: ProcAllocateCommandBuffers
-FreeCommandBuffers: ProcFreeCommandBuffers
-BeginCommandBuffer: ProcBeginCommandBuffer
-EndCommandBuffer: ProcEndCommandBuffer
-ResetCommandBuffer: ProcResetCommandBuffer
-CmdBindPipeline: ProcCmdBindPipeline
-CmdSetViewport: ProcCmdSetViewport
-CmdSetScissor: ProcCmdSetScissor
-CmdSetLineWidth: ProcCmdSetLineWidth
-CmdSetDepthBias: ProcCmdSetDepthBias
-CmdSetBlendConstants: ProcCmdSetBlendConstants
-CmdSetDepthBounds: ProcCmdSetDepthBounds
-CmdSetStencilCompareMask: ProcCmdSetStencilCompareMask
-CmdSetStencilWriteMask: ProcCmdSetStencilWriteMask
-CmdSetStencilReference: ProcCmdSetStencilReference
+BindImageMemory2: ProcBindImageMemory2
+BindImageMemory2KHR: ProcBindImageMemory2KHR
+BuildAccelerationStructuresKHR: ProcBuildAccelerationStructuresKHR
+CmdBeginConditionalRenderingEXT: ProcCmdBeginConditionalRenderingEXT
+CmdBeginDebugUtilsLabelEXT: ProcCmdBeginDebugUtilsLabelEXT
+CmdBeginQuery: ProcCmdBeginQuery
+CmdBeginQueryIndexedEXT: ProcCmdBeginQueryIndexedEXT
+CmdBeginRenderPass: ProcCmdBeginRenderPass
+CmdBeginRenderPass2: ProcCmdBeginRenderPass2
+CmdBeginRenderPass2KHR: ProcCmdBeginRenderPass2KHR
+CmdBeginTransformFeedbackEXT: ProcCmdBeginTransformFeedbackEXT
CmdBindDescriptorSets: ProcCmdBindDescriptorSets
CmdBindIndexBuffer: ProcCmdBindIndexBuffer
+CmdBindInvocationMaskHUAWEI: ProcCmdBindInvocationMaskHUAWEI
+CmdBindPipeline: ProcCmdBindPipeline
+CmdBindPipelineShaderGroupNV: ProcCmdBindPipelineShaderGroupNV
+CmdBindShadingRateImageNV: ProcCmdBindShadingRateImageNV
+CmdBindTransformFeedbackBuffersEXT: ProcCmdBindTransformFeedbackBuffersEXT
CmdBindVertexBuffers: ProcCmdBindVertexBuffers
-CmdDraw: ProcCmdDraw
-CmdDrawIndexed: ProcCmdDrawIndexed
-CmdDrawIndirect: ProcCmdDrawIndirect
-CmdDrawIndexedIndirect: ProcCmdDrawIndexedIndirect
-CmdDispatch: ProcCmdDispatch
-CmdDispatchIndirect: ProcCmdDispatchIndirect
-CmdCopyBuffer: ProcCmdCopyBuffer
-CmdCopyImage: ProcCmdCopyImage
+CmdBindVertexBuffers2EXT: ProcCmdBindVertexBuffers2EXT
CmdBlitImage: ProcCmdBlitImage
-CmdCopyBufferToImage: ProcCmdCopyBufferToImage
-CmdCopyImageToBuffer: ProcCmdCopyImageToBuffer
-CmdUpdateBuffer: ProcCmdUpdateBuffer
-CmdFillBuffer: ProcCmdFillBuffer
+CmdBlitImage2KHR: ProcCmdBlitImage2KHR
+CmdBuildAccelerationStructureNV: ProcCmdBuildAccelerationStructureNV
+CmdBuildAccelerationStructuresIndirectKHR: ProcCmdBuildAccelerationStructuresIndirectKHR
+CmdBuildAccelerationStructuresKHR: ProcCmdBuildAccelerationStructuresKHR
+CmdClearAttachments: ProcCmdClearAttachments
CmdClearColorImage: ProcCmdClearColorImage
CmdClearDepthStencilImage: ProcCmdClearDepthStencilImage
-CmdClearAttachments: ProcCmdClearAttachments
-CmdResolveImage: ProcCmdResolveImage
-CmdSetEvent: ProcCmdSetEvent
-CmdResetEvent: ProcCmdResetEvent
-CmdWaitEvents: ProcCmdWaitEvents
-CmdPipelineBarrier: ProcCmdPipelineBarrier
-CmdBeginQuery: ProcCmdBeginQuery
-CmdEndQuery: ProcCmdEndQuery
-CmdResetQueryPool: ProcCmdResetQueryPool
-CmdWriteTimestamp: ProcCmdWriteTimestamp
-CmdCopyQueryPoolResults: ProcCmdCopyQueryPoolResults
-CmdPushConstants: ProcCmdPushConstants
-CmdBeginRenderPass: ProcCmdBeginRenderPass
-CmdNextSubpass: ProcCmdNextSubpass
-CmdEndRenderPass: ProcCmdEndRenderPass
-CmdExecuteCommands: ProcCmdExecuteCommands
-BindBufferMemory2: ProcBindBufferMemory2
-BindImageMemory2: ProcBindImageMemory2
-GetDeviceGroupPeerMemoryFeatures: ProcGetDeviceGroupPeerMemoryFeatures
-CmdSetDeviceMask: ProcCmdSetDeviceMask
-CmdDispatchBase: ProcCmdDispatchBase
-GetImageMemoryRequirements2: ProcGetImageMemoryRequirements2
-GetBufferMemoryRequirements2: ProcGetBufferMemoryRequirements2
-GetImageSparseMemoryRequirements2: ProcGetImageSparseMemoryRequirements2
-TrimCommandPool: ProcTrimCommandPool
-GetDeviceQueue2: ProcGetDeviceQueue2
-CreateSamplerYcbcrConversion: ProcCreateSamplerYcbcrConversion
-DestroySamplerYcbcrConversion: ProcDestroySamplerYcbcrConversion
-CreateDescriptorUpdateTemplate: ProcCreateDescriptorUpdateTemplate
-DestroyDescriptorUpdateTemplate: ProcDestroyDescriptorUpdateTemplate
-UpdateDescriptorSetWithTemplate: ProcUpdateDescriptorSetWithTemplate
-GetDescriptorSetLayoutSupport: ProcGetDescriptorSetLayoutSupport
-CmdDrawIndirectCount: ProcCmdDrawIndirectCount
-CmdDrawIndexedIndirectCount: ProcCmdDrawIndexedIndirectCount
-CreateRenderPass2: ProcCreateRenderPass2
-CmdBeginRenderPass2: ProcCmdBeginRenderPass2
-CmdNextSubpass2: ProcCmdNextSubpass2
-CmdEndRenderPass2: ProcCmdEndRenderPass2
-ResetQueryPool: ProcResetQueryPool
-GetSemaphoreCounterValue: ProcGetSemaphoreCounterValue
-WaitSemaphores: ProcWaitSemaphores
-SignalSemaphore: ProcSignalSemaphore
-GetBufferDeviceAddress: ProcGetBufferDeviceAddress
-GetBufferOpaqueCaptureAddress: ProcGetBufferOpaqueCaptureAddress
-GetDeviceMemoryOpaqueCaptureAddress: ProcGetDeviceMemoryOpaqueCaptureAddress
-CreateSwapchainKHR: ProcCreateSwapchainKHR
-DestroySwapchainKHR: ProcDestroySwapchainKHR
-GetSwapchainImagesKHR: ProcGetSwapchainImagesKHR
-AcquireNextImageKHR: ProcAcquireNextImageKHR
-QueuePresentKHR: ProcQueuePresentKHR
-GetDeviceGroupPresentCapabilitiesKHR: ProcGetDeviceGroupPresentCapabilitiesKHR
-GetDeviceGroupSurfacePresentModesKHR: ProcGetDeviceGroupSurfacePresentModesKHR
-AcquireNextImage2KHR: ProcAcquireNextImage2KHR
-CreateSharedSwapchainsKHR: ProcCreateSharedSwapchainsKHR
-GetDeviceGroupPeerMemoryFeaturesKHR: ProcGetDeviceGroupPeerMemoryFeaturesKHR
-CmdSetDeviceMaskKHR: ProcCmdSetDeviceMaskKHR
-CmdDispatchBaseKHR: ProcCmdDispatchBaseKHR
-TrimCommandPoolKHR: ProcTrimCommandPoolKHR
-GetMemoryFdKHR: ProcGetMemoryFdKHR
-GetMemoryFdPropertiesKHR: ProcGetMemoryFdPropertiesKHR
-ImportSemaphoreFdKHR: ProcImportSemaphoreFdKHR
-GetSemaphoreFdKHR: ProcGetSemaphoreFdKHR
-CmdPushDescriptorSetKHR: ProcCmdPushDescriptorSetKHR
-CmdPushDescriptorSetWithTemplateKHR: ProcCmdPushDescriptorSetWithTemplateKHR
-CreateDescriptorUpdateTemplateKHR: ProcCreateDescriptorUpdateTemplateKHR
-DestroyDescriptorUpdateTemplateKHR: ProcDestroyDescriptorUpdateTemplateKHR
-UpdateDescriptorSetWithTemplateKHR: ProcUpdateDescriptorSetWithTemplateKHR
-CreateRenderPass2KHR: ProcCreateRenderPass2KHR
-CmdBeginRenderPass2KHR: ProcCmdBeginRenderPass2KHR
-CmdNextSubpass2KHR: ProcCmdNextSubpass2KHR
-CmdEndRenderPass2KHR: ProcCmdEndRenderPass2KHR
-GetSwapchainStatusKHR: ProcGetSwapchainStatusKHR
-ImportFenceFdKHR: ProcImportFenceFdKHR
-GetFenceFdKHR: ProcGetFenceFdKHR
-AcquireProfilingLockKHR: ProcAcquireProfilingLockKHR
-ReleaseProfilingLockKHR: ProcReleaseProfilingLockKHR
-GetImageMemoryRequirements2KHR: ProcGetImageMemoryRequirements2KHR
-GetBufferMemoryRequirements2KHR: ProcGetBufferMemoryRequirements2KHR
-GetImageSparseMemoryRequirements2KHR: ProcGetImageSparseMemoryRequirements2KHR
-CreateSamplerYcbcrConversionKHR: ProcCreateSamplerYcbcrConversionKHR
-DestroySamplerYcbcrConversionKHR: ProcDestroySamplerYcbcrConversionKHR
-BindBufferMemory2KHR: ProcBindBufferMemory2KHR
-BindImageMemory2KHR: ProcBindImageMemory2KHR
-GetDescriptorSetLayoutSupportKHR: ProcGetDescriptorSetLayoutSupportKHR
-CmdDrawIndirectCountKHR: ProcCmdDrawIndirectCountKHR
-CmdDrawIndexedIndirectCountKHR: ProcCmdDrawIndexedIndirectCountKHR
-GetSemaphoreCounterValueKHR: ProcGetSemaphoreCounterValueKHR
-WaitSemaphoresKHR: ProcWaitSemaphoresKHR
-SignalSemaphoreKHR: ProcSignalSemaphoreKHR
-CmdSetFragmentShadingRateKHR: ProcCmdSetFragmentShadingRateKHR
-WaitForPresentKHR: ProcWaitForPresentKHR
-GetBufferDeviceAddressKHR: ProcGetBufferDeviceAddressKHR
-GetBufferOpaqueCaptureAddressKHR: ProcGetBufferOpaqueCaptureAddressKHR
-GetDeviceMemoryOpaqueCaptureAddressKHR: ProcGetDeviceMemoryOpaqueCaptureAddressKHR
-CreateDeferredOperationKHR: ProcCreateDeferredOperationKHR
-DestroyDeferredOperationKHR: ProcDestroyDeferredOperationKHR
-GetDeferredOperationMaxConcurrencyKHR: ProcGetDeferredOperationMaxConcurrencyKHR
-GetDeferredOperationResultKHR: ProcGetDeferredOperationResultKHR
-DeferredOperationJoinKHR: ProcDeferredOperationJoinKHR
-GetPipelineExecutablePropertiesKHR: ProcGetPipelineExecutablePropertiesKHR
-GetPipelineExecutableStatisticsKHR: ProcGetPipelineExecutableStatisticsKHR
-GetPipelineExecutableInternalRepresentationsKHR: ProcGetPipelineExecutableInternalRepresentationsKHR
-CmdSetEvent2KHR: ProcCmdSetEvent2KHR
-CmdResetEvent2KHR: ProcCmdResetEvent2KHR
-CmdWaitEvents2KHR: ProcCmdWaitEvents2KHR
-CmdPipelineBarrier2KHR: ProcCmdPipelineBarrier2KHR
-CmdWriteTimestamp2KHR: ProcCmdWriteTimestamp2KHR
-QueueSubmit2KHR: ProcQueueSubmit2KHR
-CmdWriteBufferMarker2AMD: ProcCmdWriteBufferMarker2AMD
-GetQueueCheckpointData2NV: ProcGetQueueCheckpointData2NV
+CmdCopyAccelerationStructureKHR: ProcCmdCopyAccelerationStructureKHR
+CmdCopyAccelerationStructureNV: ProcCmdCopyAccelerationStructureNV
+CmdCopyAccelerationStructureToMemoryKHR: ProcCmdCopyAccelerationStructureToMemoryKHR
+CmdCopyBuffer: ProcCmdCopyBuffer
CmdCopyBuffer2KHR: ProcCmdCopyBuffer2KHR
-CmdCopyImage2KHR: ProcCmdCopyImage2KHR
+CmdCopyBufferToImage: ProcCmdCopyBufferToImage
CmdCopyBufferToImage2KHR: ProcCmdCopyBufferToImage2KHR
+CmdCopyImage: ProcCmdCopyImage
+CmdCopyImage2KHR: ProcCmdCopyImage2KHR
+CmdCopyImageToBuffer: ProcCmdCopyImageToBuffer
CmdCopyImageToBuffer2KHR: ProcCmdCopyImageToBuffer2KHR
-CmdBlitImage2KHR: ProcCmdBlitImage2KHR
-CmdResolveImage2KHR: ProcCmdResolveImage2KHR
-DebugMarkerSetObjectTagEXT: ProcDebugMarkerSetObjectTagEXT
-DebugMarkerSetObjectNameEXT: ProcDebugMarkerSetObjectNameEXT
+CmdCopyMemoryToAccelerationStructureKHR: ProcCmdCopyMemoryToAccelerationStructureKHR
+CmdCopyQueryPoolResults: ProcCmdCopyQueryPoolResults
+CmdCuLaunchKernelNVX: ProcCmdCuLaunchKernelNVX
CmdDebugMarkerBeginEXT: ProcCmdDebugMarkerBeginEXT
CmdDebugMarkerEndEXT: ProcCmdDebugMarkerEndEXT
CmdDebugMarkerInsertEXT: ProcCmdDebugMarkerInsertEXT
-CmdBindTransformFeedbackBuffersEXT: ProcCmdBindTransformFeedbackBuffersEXT
-CmdBeginTransformFeedbackEXT: ProcCmdBeginTransformFeedbackEXT
-CmdEndTransformFeedbackEXT: ProcCmdEndTransformFeedbackEXT
-CmdBeginQueryIndexedEXT: ProcCmdBeginQueryIndexedEXT
-CmdEndQueryIndexedEXT: ProcCmdEndQueryIndexedEXT
+CmdDispatch: ProcCmdDispatch
+CmdDispatchBase: ProcCmdDispatchBase
+CmdDispatchBaseKHR: ProcCmdDispatchBaseKHR
+CmdDispatchIndirect: ProcCmdDispatchIndirect
+CmdDraw: ProcCmdDraw
+CmdDrawIndexed: ProcCmdDrawIndexed
+CmdDrawIndexedIndirect: ProcCmdDrawIndexedIndirect
+CmdDrawIndexedIndirectCount: ProcCmdDrawIndexedIndirectCount
+CmdDrawIndexedIndirectCountAMD: ProcCmdDrawIndexedIndirectCountAMD
+CmdDrawIndexedIndirectCountKHR: ProcCmdDrawIndexedIndirectCountKHR
+CmdDrawIndirect: ProcCmdDrawIndirect
CmdDrawIndirectByteCountEXT: ProcCmdDrawIndirectByteCountEXT
-CreateCuModuleNVX: ProcCreateCuModuleNVX
-CreateCuFunctionNVX: ProcCreateCuFunctionNVX
-DestroyCuModuleNVX: ProcDestroyCuModuleNVX
-DestroyCuFunctionNVX: ProcDestroyCuFunctionNVX
-CmdCuLaunchKernelNVX: ProcCmdCuLaunchKernelNVX
-GetImageViewHandleNVX: ProcGetImageViewHandleNVX
-GetImageViewAddressNVX: ProcGetImageViewAddressNVX
+CmdDrawIndirectCount: ProcCmdDrawIndirectCount
CmdDrawIndirectCountAMD: ProcCmdDrawIndirectCountAMD
-CmdDrawIndexedIndirectCountAMD: ProcCmdDrawIndexedIndirectCountAMD
-GetShaderInfoAMD: ProcGetShaderInfoAMD
-CmdBeginConditionalRenderingEXT: ProcCmdBeginConditionalRenderingEXT
+CmdDrawIndirectCountKHR: ProcCmdDrawIndirectCountKHR
+CmdDrawMeshTasksIndirectCountNV: ProcCmdDrawMeshTasksIndirectCountNV
+CmdDrawMeshTasksIndirectNV: ProcCmdDrawMeshTasksIndirectNV
+CmdDrawMeshTasksNV: ProcCmdDrawMeshTasksNV
+CmdDrawMultiEXT: ProcCmdDrawMultiEXT
+CmdDrawMultiIndexedEXT: ProcCmdDrawMultiIndexedEXT
CmdEndConditionalRenderingEXT: ProcCmdEndConditionalRenderingEXT
-CmdSetViewportWScalingNV: ProcCmdSetViewportWScalingNV
-DisplayPowerControlEXT: ProcDisplayPowerControlEXT
-RegisterDeviceEventEXT: ProcRegisterDeviceEventEXT
-RegisterDisplayEventEXT: ProcRegisterDisplayEventEXT
-GetSwapchainCounterEXT: ProcGetSwapchainCounterEXT
-GetRefreshCycleDurationGOOGLE: ProcGetRefreshCycleDurationGOOGLE
-GetPastPresentationTimingGOOGLE: ProcGetPastPresentationTimingGOOGLE
-CmdSetDiscardRectangleEXT: ProcCmdSetDiscardRectangleEXT
-SetHdrMetadataEXT: ProcSetHdrMetadataEXT
-SetDebugUtilsObjectNameEXT: ProcSetDebugUtilsObjectNameEXT
-SetDebugUtilsObjectTagEXT: ProcSetDebugUtilsObjectTagEXT
-QueueBeginDebugUtilsLabelEXT: ProcQueueBeginDebugUtilsLabelEXT
-QueueEndDebugUtilsLabelEXT: ProcQueueEndDebugUtilsLabelEXT
-QueueInsertDebugUtilsLabelEXT: ProcQueueInsertDebugUtilsLabelEXT
-CmdBeginDebugUtilsLabelEXT: ProcCmdBeginDebugUtilsLabelEXT
CmdEndDebugUtilsLabelEXT: ProcCmdEndDebugUtilsLabelEXT
+CmdEndQuery: ProcCmdEndQuery
+CmdEndQueryIndexedEXT: ProcCmdEndQueryIndexedEXT
+CmdEndRenderPass: ProcCmdEndRenderPass
+CmdEndRenderPass2: ProcCmdEndRenderPass2
+CmdEndRenderPass2KHR: ProcCmdEndRenderPass2KHR
+CmdEndTransformFeedbackEXT: ProcCmdEndTransformFeedbackEXT
+CmdExecuteCommands: ProcCmdExecuteCommands
+CmdExecuteGeneratedCommandsNV: ProcCmdExecuteGeneratedCommandsNV
+CmdFillBuffer: ProcCmdFillBuffer
CmdInsertDebugUtilsLabelEXT: ProcCmdInsertDebugUtilsLabelEXT
-CmdSetSampleLocationsEXT: ProcCmdSetSampleLocationsEXT
-GetImageDrmFormatModifierPropertiesEXT: ProcGetImageDrmFormatModifierPropertiesEXT
-CreateValidationCacheEXT: ProcCreateValidationCacheEXT
-DestroyValidationCacheEXT: ProcDestroyValidationCacheEXT
-MergeValidationCachesEXT: ProcMergeValidationCachesEXT
-GetValidationCacheDataEXT: ProcGetValidationCacheDataEXT
-CmdBindShadingRateImageNV: ProcCmdBindShadingRateImageNV
-CmdSetViewportShadingRatePaletteNV: ProcCmdSetViewportShadingRatePaletteNV
+CmdNextSubpass: ProcCmdNextSubpass
+CmdNextSubpass2: ProcCmdNextSubpass2
+CmdNextSubpass2KHR: ProcCmdNextSubpass2KHR
+CmdPipelineBarrier: ProcCmdPipelineBarrier
+CmdPipelineBarrier2KHR: ProcCmdPipelineBarrier2KHR
+CmdPreprocessGeneratedCommandsNV: ProcCmdPreprocessGeneratedCommandsNV
+CmdPushConstants: ProcCmdPushConstants
+CmdPushDescriptorSetKHR: ProcCmdPushDescriptorSetKHR
+CmdPushDescriptorSetWithTemplateKHR: ProcCmdPushDescriptorSetWithTemplateKHR
+CmdResetEvent: ProcCmdResetEvent
+CmdResetEvent2KHR: ProcCmdResetEvent2KHR
+CmdResetQueryPool: ProcCmdResetQueryPool
+CmdResolveImage: ProcCmdResolveImage
+CmdResolveImage2KHR: ProcCmdResolveImage2KHR
+CmdSetBlendConstants: ProcCmdSetBlendConstants
+CmdSetCheckpointNV: ProcCmdSetCheckpointNV
CmdSetCoarseSampleOrderNV: ProcCmdSetCoarseSampleOrderNV
-CreateAccelerationStructureNV: ProcCreateAccelerationStructureNV
-DestroyAccelerationStructureNV: ProcDestroyAccelerationStructureNV
-GetAccelerationStructureMemoryRequirementsNV: ProcGetAccelerationStructureMemoryRequirementsNV
-BindAccelerationStructureMemoryNV: ProcBindAccelerationStructureMemoryNV
-CmdBuildAccelerationStructureNV: ProcCmdBuildAccelerationStructureNV
-CmdCopyAccelerationStructureNV: ProcCmdCopyAccelerationStructureNV
-CmdTraceRaysNV: ProcCmdTraceRaysNV
-CreateRayTracingPipelinesNV: ProcCreateRayTracingPipelinesNV
-GetRayTracingShaderGroupHandlesKHR: ProcGetRayTracingShaderGroupHandlesKHR
-GetRayTracingShaderGroupHandlesNV: ProcGetRayTracingShaderGroupHandlesNV
-GetAccelerationStructureHandleNV: ProcGetAccelerationStructureHandleNV
-CmdWriteAccelerationStructuresPropertiesNV: ProcCmdWriteAccelerationStructuresPropertiesNV
-CompileDeferredNV: ProcCompileDeferredNV
-GetMemoryHostPointerPropertiesEXT: ProcGetMemoryHostPointerPropertiesEXT
-CmdWriteBufferMarkerAMD: ProcCmdWriteBufferMarkerAMD
-GetCalibratedTimestampsEXT: ProcGetCalibratedTimestampsEXT
-CmdDrawMeshTasksNV: ProcCmdDrawMeshTasksNV
-CmdDrawMeshTasksIndirectNV: ProcCmdDrawMeshTasksIndirectNV
-CmdDrawMeshTasksIndirectCountNV: ProcCmdDrawMeshTasksIndirectCountNV
+CmdSetCullModeEXT: ProcCmdSetCullModeEXT
+CmdSetDepthBias: ProcCmdSetDepthBias
+CmdSetDepthBiasEnableEXT: ProcCmdSetDepthBiasEnableEXT
+CmdSetDepthBounds: ProcCmdSetDepthBounds
+CmdSetDepthBoundsTestEnableEXT: ProcCmdSetDepthBoundsTestEnableEXT
+CmdSetDepthCompareOpEXT: ProcCmdSetDepthCompareOpEXT
+CmdSetDepthTestEnableEXT: ProcCmdSetDepthTestEnableEXT
+CmdSetDepthWriteEnableEXT: ProcCmdSetDepthWriteEnableEXT
+CmdSetDeviceMask: ProcCmdSetDeviceMask
+CmdSetDeviceMaskKHR: ProcCmdSetDeviceMaskKHR
+CmdSetDiscardRectangleEXT: ProcCmdSetDiscardRectangleEXT
+CmdSetEvent: ProcCmdSetEvent
+CmdSetEvent2KHR: ProcCmdSetEvent2KHR
CmdSetExclusiveScissorNV: ProcCmdSetExclusiveScissorNV
-CmdSetCheckpointNV: ProcCmdSetCheckpointNV
-GetQueueCheckpointDataNV: ProcGetQueueCheckpointDataNV
-InitializePerformanceApiINTEL: ProcInitializePerformanceApiINTEL
-UninitializePerformanceApiINTEL: ProcUninitializePerformanceApiINTEL
+CmdSetFragmentShadingRateEnumNV: ProcCmdSetFragmentShadingRateEnumNV
+CmdSetFragmentShadingRateKHR: ProcCmdSetFragmentShadingRateKHR
+CmdSetFrontFaceEXT: ProcCmdSetFrontFaceEXT
+CmdSetLineStippleEXT: ProcCmdSetLineStippleEXT
+CmdSetLineWidth: ProcCmdSetLineWidth
+CmdSetLogicOpEXT: ProcCmdSetLogicOpEXT
+CmdSetPatchControlPointsEXT: ProcCmdSetPatchControlPointsEXT
CmdSetPerformanceMarkerINTEL: ProcCmdSetPerformanceMarkerINTEL
-CmdSetPerformanceStreamMarkerINTEL: ProcCmdSetPerformanceStreamMarkerINTEL
CmdSetPerformanceOverrideINTEL: ProcCmdSetPerformanceOverrideINTEL
-AcquirePerformanceConfigurationINTEL: ProcAcquirePerformanceConfigurationINTEL
-ReleasePerformanceConfigurationINTEL: ProcReleasePerformanceConfigurationINTEL
-QueueSetPerformanceConfigurationINTEL: ProcQueueSetPerformanceConfigurationINTEL
-GetPerformanceParameterINTEL: ProcGetPerformanceParameterINTEL
-SetLocalDimmingAMD: ProcSetLocalDimmingAMD
-GetBufferDeviceAddressEXT: ProcGetBufferDeviceAddressEXT
-CmdSetLineStippleEXT: ProcCmdSetLineStippleEXT
-ResetQueryPoolEXT: ProcResetQueryPoolEXT
-CmdSetCullModeEXT: ProcCmdSetCullModeEXT
-CmdSetFrontFaceEXT: ProcCmdSetFrontFaceEXT
+CmdSetPerformanceStreamMarkerINTEL: ProcCmdSetPerformanceStreamMarkerINTEL
+CmdSetPrimitiveRestartEnableEXT: ProcCmdSetPrimitiveRestartEnableEXT
CmdSetPrimitiveTopologyEXT: ProcCmdSetPrimitiveTopologyEXT
-CmdSetViewportWithCountEXT: ProcCmdSetViewportWithCountEXT
+CmdSetRasterizerDiscardEnableEXT: ProcCmdSetRasterizerDiscardEnableEXT
+CmdSetRayTracingPipelineStackSizeKHR: ProcCmdSetRayTracingPipelineStackSizeKHR
+CmdSetSampleLocationsEXT: ProcCmdSetSampleLocationsEXT
+CmdSetScissor: ProcCmdSetScissor
CmdSetScissorWithCountEXT: ProcCmdSetScissorWithCountEXT
-CmdBindVertexBuffers2EXT: ProcCmdBindVertexBuffers2EXT
-CmdSetDepthTestEnableEXT: ProcCmdSetDepthTestEnableEXT
-CmdSetDepthWriteEnableEXT: ProcCmdSetDepthWriteEnableEXT
-CmdSetDepthCompareOpEXT: ProcCmdSetDepthCompareOpEXT
-CmdSetDepthBoundsTestEnableEXT: ProcCmdSetDepthBoundsTestEnableEXT
-CmdSetStencilTestEnableEXT: ProcCmdSetStencilTestEnableEXT
+CmdSetStencilCompareMask: ProcCmdSetStencilCompareMask
CmdSetStencilOpEXT: ProcCmdSetStencilOpEXT
-GetGeneratedCommandsMemoryRequirementsNV: ProcGetGeneratedCommandsMemoryRequirementsNV
-CmdPreprocessGeneratedCommandsNV: ProcCmdPreprocessGeneratedCommandsNV
-CmdExecuteGeneratedCommandsNV: ProcCmdExecuteGeneratedCommandsNV
-CmdBindPipelineShaderGroupNV: ProcCmdBindPipelineShaderGroupNV
-CreateIndirectCommandsLayoutNV: ProcCreateIndirectCommandsLayoutNV
-DestroyIndirectCommandsLayoutNV: ProcDestroyIndirectCommandsLayoutNV
-CreatePrivateDataSlotEXT: ProcCreatePrivateDataSlotEXT
-DestroyPrivateDataSlotEXT: ProcDestroyPrivateDataSlotEXT
-SetPrivateDataEXT: ProcSetPrivateDataEXT
-GetPrivateDataEXT: ProcGetPrivateDataEXT
-CmdSetFragmentShadingRateEnumNV: ProcCmdSetFragmentShadingRateEnumNV
+CmdSetStencilReference: ProcCmdSetStencilReference
+CmdSetStencilTestEnableEXT: ProcCmdSetStencilTestEnableEXT
+CmdSetStencilWriteMask: ProcCmdSetStencilWriteMask
CmdSetVertexInputEXT: ProcCmdSetVertexInputEXT
-GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI: ProcGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI
+CmdSetViewport: ProcCmdSetViewport
+CmdSetViewportShadingRatePaletteNV: ProcCmdSetViewportShadingRatePaletteNV
+CmdSetViewportWScalingNV: ProcCmdSetViewportWScalingNV
+CmdSetViewportWithCountEXT: ProcCmdSetViewportWithCountEXT
CmdSubpassShadingHUAWEI: ProcCmdSubpassShadingHUAWEI
-CmdBindInvocationMaskHUAWEI: ProcCmdBindInvocationMaskHUAWEI
-GetMemoryRemoteAddressNV: ProcGetMemoryRemoteAddressNV
-CmdSetPatchControlPointsEXT: ProcCmdSetPatchControlPointsEXT
-CmdSetRasterizerDiscardEnableEXT: ProcCmdSetRasterizerDiscardEnableEXT
-CmdSetDepthBiasEnableEXT: ProcCmdSetDepthBiasEnableEXT
-CmdSetLogicOpEXT: ProcCmdSetLogicOpEXT
-CmdSetPrimitiveRestartEnableEXT: ProcCmdSetPrimitiveRestartEnableEXT
-CmdDrawMultiEXT: ProcCmdDrawMultiEXT
-CmdDrawMultiIndexedEXT: ProcCmdDrawMultiIndexedEXT
-SetDeviceMemoryPriorityEXT: ProcSetDeviceMemoryPriorityEXT
-CreateAccelerationStructureKHR: ProcCreateAccelerationStructureKHR
-DestroyAccelerationStructureKHR: ProcDestroyAccelerationStructureKHR
-CmdBuildAccelerationStructuresKHR: ProcCmdBuildAccelerationStructuresKHR
-CmdBuildAccelerationStructuresIndirectKHR: ProcCmdBuildAccelerationStructuresIndirectKHR
-BuildAccelerationStructuresKHR: ProcBuildAccelerationStructuresKHR
+CmdTraceRaysIndirectKHR: ProcCmdTraceRaysIndirectKHR
+CmdTraceRaysKHR: ProcCmdTraceRaysKHR
+CmdTraceRaysNV: ProcCmdTraceRaysNV
+CmdUpdateBuffer: ProcCmdUpdateBuffer
+CmdWaitEvents: ProcCmdWaitEvents
+CmdWaitEvents2KHR: ProcCmdWaitEvents2KHR
+CmdWriteAccelerationStructuresPropertiesKHR: ProcCmdWriteAccelerationStructuresPropertiesKHR
+CmdWriteAccelerationStructuresPropertiesNV: ProcCmdWriteAccelerationStructuresPropertiesNV
+CmdWriteBufferMarker2AMD: ProcCmdWriteBufferMarker2AMD
+CmdWriteBufferMarkerAMD: ProcCmdWriteBufferMarkerAMD
+CmdWriteTimestamp: ProcCmdWriteTimestamp
+CmdWriteTimestamp2KHR: ProcCmdWriteTimestamp2KHR
+CompileDeferredNV: ProcCompileDeferredNV
CopyAccelerationStructureKHR: ProcCopyAccelerationStructureKHR
CopyAccelerationStructureToMemoryKHR: ProcCopyAccelerationStructureToMemoryKHR
CopyMemoryToAccelerationStructureKHR: ProcCopyMemoryToAccelerationStructureKHR
-WriteAccelerationStructuresPropertiesKHR: ProcWriteAccelerationStructuresPropertiesKHR
-CmdCopyAccelerationStructureKHR: ProcCmdCopyAccelerationStructureKHR
-CmdCopyAccelerationStructureToMemoryKHR: ProcCmdCopyAccelerationStructureToMemoryKHR
-CmdCopyMemoryToAccelerationStructureKHR: ProcCmdCopyMemoryToAccelerationStructureKHR
+CreateAccelerationStructureKHR: ProcCreateAccelerationStructureKHR
+CreateAccelerationStructureNV: ProcCreateAccelerationStructureNV
+CreateBuffer: ProcCreateBuffer
+CreateBufferView: ProcCreateBufferView
+CreateCommandPool: ProcCreateCommandPool
+CreateComputePipelines: ProcCreateComputePipelines
+CreateCuFunctionNVX: ProcCreateCuFunctionNVX
+CreateCuModuleNVX: ProcCreateCuModuleNVX
+CreateDeferredOperationKHR: ProcCreateDeferredOperationKHR
+CreateDescriptorPool: ProcCreateDescriptorPool
+CreateDescriptorSetLayout: ProcCreateDescriptorSetLayout
+CreateDescriptorUpdateTemplate: ProcCreateDescriptorUpdateTemplate
+CreateDescriptorUpdateTemplateKHR: ProcCreateDescriptorUpdateTemplateKHR
+CreateEvent: ProcCreateEvent
+CreateFence: ProcCreateFence
+CreateFramebuffer: ProcCreateFramebuffer
+CreateGraphicsPipelines: ProcCreateGraphicsPipelines
+CreateImage: ProcCreateImage
+CreateImageView: ProcCreateImageView
+CreateIndirectCommandsLayoutNV: ProcCreateIndirectCommandsLayoutNV
+CreatePipelineCache: ProcCreatePipelineCache
+CreatePipelineLayout: ProcCreatePipelineLayout
+CreatePrivateDataSlotEXT: ProcCreatePrivateDataSlotEXT
+CreateQueryPool: ProcCreateQueryPool
+CreateRayTracingPipelinesKHR: ProcCreateRayTracingPipelinesKHR
+CreateRayTracingPipelinesNV: ProcCreateRayTracingPipelinesNV
+CreateRenderPass: ProcCreateRenderPass
+CreateRenderPass2: ProcCreateRenderPass2
+CreateRenderPass2KHR: ProcCreateRenderPass2KHR
+CreateSampler: ProcCreateSampler
+CreateSamplerYcbcrConversion: ProcCreateSamplerYcbcrConversion
+CreateSamplerYcbcrConversionKHR: ProcCreateSamplerYcbcrConversionKHR
+CreateSemaphore: ProcCreateSemaphore
+CreateShaderModule: ProcCreateShaderModule
+CreateSharedSwapchainsKHR: ProcCreateSharedSwapchainsKHR
+CreateSwapchainKHR: ProcCreateSwapchainKHR
+CreateValidationCacheEXT: ProcCreateValidationCacheEXT
+DebugMarkerSetObjectNameEXT: ProcDebugMarkerSetObjectNameEXT
+DebugMarkerSetObjectTagEXT: ProcDebugMarkerSetObjectTagEXT
+DeferredOperationJoinKHR: ProcDeferredOperationJoinKHR
+DestroyAccelerationStructureKHR: ProcDestroyAccelerationStructureKHR
+DestroyAccelerationStructureNV: ProcDestroyAccelerationStructureNV
+DestroyBuffer: ProcDestroyBuffer
+DestroyBufferView: ProcDestroyBufferView
+DestroyCommandPool: ProcDestroyCommandPool
+DestroyCuFunctionNVX: ProcDestroyCuFunctionNVX
+DestroyCuModuleNVX: ProcDestroyCuModuleNVX
+DestroyDeferredOperationKHR: ProcDestroyDeferredOperationKHR
+DestroyDescriptorPool: ProcDestroyDescriptorPool
+DestroyDescriptorSetLayout: ProcDestroyDescriptorSetLayout
+DestroyDescriptorUpdateTemplate: ProcDestroyDescriptorUpdateTemplate
+DestroyDescriptorUpdateTemplateKHR: ProcDestroyDescriptorUpdateTemplateKHR
+DestroyDevice: ProcDestroyDevice
+DestroyEvent: ProcDestroyEvent
+DestroyFence: ProcDestroyFence
+DestroyFramebuffer: ProcDestroyFramebuffer
+DestroyImage: ProcDestroyImage
+DestroyImageView: ProcDestroyImageView
+DestroyIndirectCommandsLayoutNV: ProcDestroyIndirectCommandsLayoutNV
+DestroyPipeline: ProcDestroyPipeline
+DestroyPipelineCache: ProcDestroyPipelineCache
+DestroyPipelineLayout: ProcDestroyPipelineLayout
+DestroyPrivateDataSlotEXT: ProcDestroyPrivateDataSlotEXT
+DestroyQueryPool: ProcDestroyQueryPool
+DestroyRenderPass: ProcDestroyRenderPass
+DestroySampler: ProcDestroySampler
+DestroySamplerYcbcrConversion: ProcDestroySamplerYcbcrConversion
+DestroySamplerYcbcrConversionKHR: ProcDestroySamplerYcbcrConversionKHR
+DestroySemaphore: ProcDestroySemaphore
+DestroyShaderModule: ProcDestroyShaderModule
+DestroySwapchainKHR: ProcDestroySwapchainKHR
+DestroyValidationCacheEXT: ProcDestroyValidationCacheEXT
+DeviceWaitIdle: ProcDeviceWaitIdle
+DisplayPowerControlEXT: ProcDisplayPowerControlEXT
+EndCommandBuffer: ProcEndCommandBuffer
+FlushMappedMemoryRanges: ProcFlushMappedMemoryRanges
+FreeCommandBuffers: ProcFreeCommandBuffers
+FreeDescriptorSets: ProcFreeDescriptorSets
+FreeMemory: ProcFreeMemory
+GetAccelerationStructureBuildSizesKHR: ProcGetAccelerationStructureBuildSizesKHR
GetAccelerationStructureDeviceAddressKHR: ProcGetAccelerationStructureDeviceAddressKHR
-CmdWriteAccelerationStructuresPropertiesKHR: ProcCmdWriteAccelerationStructuresPropertiesKHR
+GetAccelerationStructureHandleNV: ProcGetAccelerationStructureHandleNV
+GetAccelerationStructureMemoryRequirementsNV: ProcGetAccelerationStructureMemoryRequirementsNV
+GetBufferDeviceAddress: ProcGetBufferDeviceAddress
+GetBufferDeviceAddressEXT: ProcGetBufferDeviceAddressEXT
+GetBufferDeviceAddressKHR: ProcGetBufferDeviceAddressKHR
+GetBufferMemoryRequirements: ProcGetBufferMemoryRequirements
+GetBufferMemoryRequirements2: ProcGetBufferMemoryRequirements2
+GetBufferMemoryRequirements2KHR: ProcGetBufferMemoryRequirements2KHR
+GetBufferOpaqueCaptureAddress: ProcGetBufferOpaqueCaptureAddress
+GetBufferOpaqueCaptureAddressKHR: ProcGetBufferOpaqueCaptureAddressKHR
+GetCalibratedTimestampsEXT: ProcGetCalibratedTimestampsEXT
+GetDeferredOperationMaxConcurrencyKHR: ProcGetDeferredOperationMaxConcurrencyKHR
+GetDeferredOperationResultKHR: ProcGetDeferredOperationResultKHR
+GetDescriptorSetLayoutSupport: ProcGetDescriptorSetLayoutSupport
+GetDescriptorSetLayoutSupportKHR: ProcGetDescriptorSetLayoutSupportKHR
GetDeviceAccelerationStructureCompatibilityKHR: ProcGetDeviceAccelerationStructureCompatibilityKHR
-GetAccelerationStructureBuildSizesKHR: ProcGetAccelerationStructureBuildSizesKHR
-CmdTraceRaysKHR: ProcCmdTraceRaysKHR
-CreateRayTracingPipelinesKHR: ProcCreateRayTracingPipelinesKHR
-GetRayTracingCaptureReplayShaderGroupHandlesKHR: ProcGetRayTracingCaptureReplayShaderGroupHandlesKHR
-CmdTraceRaysIndirectKHR: ProcCmdTraceRaysIndirectKHR
-GetRayTracingShaderGroupStackSizeKHR: ProcGetRayTracingShaderGroupStackSizeKHR
-CmdSetRayTracingPipelineStackSizeKHR: ProcCmdSetRayTracingPipelineStackSizeKHR
+GetDeviceGroupPeerMemoryFeatures: ProcGetDeviceGroupPeerMemoryFeatures
+GetDeviceGroupPeerMemoryFeaturesKHR: ProcGetDeviceGroupPeerMemoryFeaturesKHR
+GetDeviceGroupPresentCapabilitiesKHR: ProcGetDeviceGroupPresentCapabilitiesKHR
+GetDeviceGroupSurfacePresentModes2EXT: ProcGetDeviceGroupSurfacePresentModes2EXT
+GetDeviceGroupSurfacePresentModesKHR: ProcGetDeviceGroupSurfacePresentModesKHR
+GetDeviceMemoryCommitment: ProcGetDeviceMemoryCommitment
+GetDeviceMemoryOpaqueCaptureAddress: ProcGetDeviceMemoryOpaqueCaptureAddress
+GetDeviceMemoryOpaqueCaptureAddressKHR: ProcGetDeviceMemoryOpaqueCaptureAddressKHR
+GetDeviceProcAddr: ProcGetDeviceProcAddr
+GetDeviceQueue: ProcGetDeviceQueue
+GetDeviceQueue2: ProcGetDeviceQueue2
+GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI: ProcGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI
+GetEventStatus: ProcGetEventStatus
+GetFenceFdKHR: ProcGetFenceFdKHR
+GetFenceStatus: ProcGetFenceStatus
+GetFenceWin32HandleKHR: ProcGetFenceWin32HandleKHR
+GetGeneratedCommandsMemoryRequirementsNV: ProcGetGeneratedCommandsMemoryRequirementsNV
+GetImageDrmFormatModifierPropertiesEXT: ProcGetImageDrmFormatModifierPropertiesEXT
+GetImageMemoryRequirements: ProcGetImageMemoryRequirements
+GetImageMemoryRequirements2: ProcGetImageMemoryRequirements2
+GetImageMemoryRequirements2KHR: ProcGetImageMemoryRequirements2KHR
+GetImageSparseMemoryRequirements: ProcGetImageSparseMemoryRequirements
+GetImageSparseMemoryRequirements2: ProcGetImageSparseMemoryRequirements2
+GetImageSparseMemoryRequirements2KHR: ProcGetImageSparseMemoryRequirements2KHR
+GetImageSubresourceLayout: ProcGetImageSubresourceLayout
+GetImageViewAddressNVX: ProcGetImageViewAddressNVX
+GetImageViewHandleNVX: ProcGetImageViewHandleNVX
+GetMemoryFdKHR: ProcGetMemoryFdKHR
+GetMemoryFdPropertiesKHR: ProcGetMemoryFdPropertiesKHR
+GetMemoryHostPointerPropertiesEXT: ProcGetMemoryHostPointerPropertiesEXT
+GetMemoryRemoteAddressNV: ProcGetMemoryRemoteAddressNV
GetMemoryWin32HandleKHR: ProcGetMemoryWin32HandleKHR
+GetMemoryWin32HandleNV: ProcGetMemoryWin32HandleNV
GetMemoryWin32HandlePropertiesKHR: ProcGetMemoryWin32HandlePropertiesKHR
-ImportSemaphoreWin32HandleKHR: ProcImportSemaphoreWin32HandleKHR
+GetPastPresentationTimingGOOGLE: ProcGetPastPresentationTimingGOOGLE
+GetPerformanceParameterINTEL: ProcGetPerformanceParameterINTEL
+GetPipelineCacheData: ProcGetPipelineCacheData
+GetPipelineExecutableInternalRepresentationsKHR: ProcGetPipelineExecutableInternalRepresentationsKHR
+GetPipelineExecutablePropertiesKHR: ProcGetPipelineExecutablePropertiesKHR
+GetPipelineExecutableStatisticsKHR: ProcGetPipelineExecutableStatisticsKHR
+GetPrivateDataEXT: ProcGetPrivateDataEXT
+GetQueryPoolResults: ProcGetQueryPoolResults
+GetQueueCheckpointData2NV: ProcGetQueueCheckpointData2NV
+GetQueueCheckpointDataNV: ProcGetQueueCheckpointDataNV
+GetRayTracingCaptureReplayShaderGroupHandlesKHR: ProcGetRayTracingCaptureReplayShaderGroupHandlesKHR
+GetRayTracingShaderGroupHandlesKHR: ProcGetRayTracingShaderGroupHandlesKHR
+GetRayTracingShaderGroupHandlesNV: ProcGetRayTracingShaderGroupHandlesNV
+GetRayTracingShaderGroupStackSizeKHR: ProcGetRayTracingShaderGroupStackSizeKHR
+GetRefreshCycleDurationGOOGLE: ProcGetRefreshCycleDurationGOOGLE
+GetRenderAreaGranularity: ProcGetRenderAreaGranularity
+GetSemaphoreCounterValue: ProcGetSemaphoreCounterValue
+GetSemaphoreCounterValueKHR: ProcGetSemaphoreCounterValueKHR
+GetSemaphoreFdKHR: ProcGetSemaphoreFdKHR
GetSemaphoreWin32HandleKHR: ProcGetSemaphoreWin32HandleKHR
+GetShaderInfoAMD: ProcGetShaderInfoAMD
+GetSwapchainCounterEXT: ProcGetSwapchainCounterEXT
+GetSwapchainImagesKHR: ProcGetSwapchainImagesKHR
+GetSwapchainStatusKHR: ProcGetSwapchainStatusKHR
+GetValidationCacheDataEXT: ProcGetValidationCacheDataEXT
+ImportFenceFdKHR: ProcImportFenceFdKHR
ImportFenceWin32HandleKHR: ProcImportFenceWin32HandleKHR
-GetFenceWin32HandleKHR: ProcGetFenceWin32HandleKHR
-GetMemoryWin32HandleNV: ProcGetMemoryWin32HandleNV
-AcquireFullScreenExclusiveModeEXT: ProcAcquireFullScreenExclusiveModeEXT
+ImportSemaphoreFdKHR: ProcImportSemaphoreFdKHR
+ImportSemaphoreWin32HandleKHR: ProcImportSemaphoreWin32HandleKHR
+InitializePerformanceApiINTEL: ProcInitializePerformanceApiINTEL
+InvalidateMappedMemoryRanges: ProcInvalidateMappedMemoryRanges
+MapMemory: ProcMapMemory
+MergePipelineCaches: ProcMergePipelineCaches
+MergeValidationCachesEXT: ProcMergeValidationCachesEXT
+QueueBeginDebugUtilsLabelEXT: ProcQueueBeginDebugUtilsLabelEXT
+QueueBindSparse: ProcQueueBindSparse
+QueueEndDebugUtilsLabelEXT: ProcQueueEndDebugUtilsLabelEXT
+QueueInsertDebugUtilsLabelEXT: ProcQueueInsertDebugUtilsLabelEXT
+QueuePresentKHR: ProcQueuePresentKHR
+QueueSetPerformanceConfigurationINTEL: ProcQueueSetPerformanceConfigurationINTEL
+QueueSubmit: ProcQueueSubmit
+QueueSubmit2KHR: ProcQueueSubmit2KHR
+QueueWaitIdle: ProcQueueWaitIdle
+RegisterDeviceEventEXT: ProcRegisterDeviceEventEXT
+RegisterDisplayEventEXT: ProcRegisterDisplayEventEXT
ReleaseFullScreenExclusiveModeEXT: ProcReleaseFullScreenExclusiveModeEXT
-GetDeviceGroupSurfacePresentModes2EXT: ProcGetDeviceGroupSurfacePresentModes2EXT
+ReleasePerformanceConfigurationINTEL: ProcReleasePerformanceConfigurationINTEL
+ReleaseProfilingLockKHR: ProcReleaseProfilingLockKHR
+ResetCommandBuffer: ProcResetCommandBuffer
+ResetCommandPool: ProcResetCommandPool
+ResetDescriptorPool: ProcResetDescriptorPool
+ResetEvent: ProcResetEvent
+ResetFences: ProcResetFences
+ResetQueryPool: ProcResetQueryPool
+ResetQueryPoolEXT: ProcResetQueryPoolEXT
+SetDebugUtilsObjectNameEXT: ProcSetDebugUtilsObjectNameEXT
+SetDebugUtilsObjectTagEXT: ProcSetDebugUtilsObjectTagEXT
+SetDeviceMemoryPriorityEXT: ProcSetDeviceMemoryPriorityEXT
+SetEvent: ProcSetEvent
+SetHdrMetadataEXT: ProcSetHdrMetadataEXT
+SetLocalDimmingAMD: ProcSetLocalDimmingAMD
+SetPrivateDataEXT: ProcSetPrivateDataEXT
+SignalSemaphore: ProcSignalSemaphore
+SignalSemaphoreKHR: ProcSignalSemaphoreKHR
+TrimCommandPool: ProcTrimCommandPool
+TrimCommandPoolKHR: ProcTrimCommandPoolKHR
+UninitializePerformanceApiINTEL: ProcUninitializePerformanceApiINTEL
+UnmapMemory: ProcUnmapMemory
+UpdateDescriptorSetWithTemplate: ProcUpdateDescriptorSetWithTemplate
+UpdateDescriptorSetWithTemplateKHR: ProcUpdateDescriptorSetWithTemplateKHR
+UpdateDescriptorSets: ProcUpdateDescriptorSets
+WaitForFences: ProcWaitForFences
+WaitForPresentKHR: ProcWaitForPresentKHR
+WaitSemaphores: ProcWaitSemaphores
+WaitSemaphoresKHR: ProcWaitSemaphoresKHR
+WriteAccelerationStructuresPropertiesKHR: ProcWriteAccelerationStructuresPropertiesKHR
-// Loader Procedures
-CreateInstance: ProcCreateInstance
-EnumerateInstanceExtensionProperties: ProcEnumerateInstanceExtensionProperties
-EnumerateInstanceLayerProperties: ProcEnumerateInstanceLayerProperties
-EnumerateInstanceVersion: ProcEnumerateInstanceVersion
-DebugUtilsMessengerCallbackEXT: ProcDebugUtilsMessengerCallbackEXT
-DeviceMemoryReportCallbackEXT: ProcDeviceMemoryReportCallbackEXT
+load_proc_addresses_custom :: proc(set_proc_address: SetProcAddressType) {
+ // Loader Procedures
+ set_proc_address(&CreateInstance, "vkCreateInstance")
+ set_proc_address(&DebugUtilsMessengerCallbackEXT, "vkDebugUtilsMessengerCallbackEXT")
+ set_proc_address(&DeviceMemoryReportCallbackEXT, "vkDeviceMemoryReportCallbackEXT")
+ set_proc_address(&EnumerateInstanceExtensionProperties, "vkEnumerateInstanceExtensionProperties")
+ set_proc_address(&EnumerateInstanceLayerProperties, "vkEnumerateInstanceLayerProperties")
+ set_proc_address(&EnumerateInstanceVersion, "vkEnumerateInstanceVersion")
-load_proc_addresses :: proc(set_proc_address: SetProcAddressType) {
// Instance Procedures
- set_proc_address(&DestroyInstance, "vkDestroyInstance")
- set_proc_address(&EnumeratePhysicalDevices, "vkEnumeratePhysicalDevices")
- set_proc_address(&GetPhysicalDeviceFeatures, "vkGetPhysicalDeviceFeatures")
- set_proc_address(&GetPhysicalDeviceFormatProperties, "vkGetPhysicalDeviceFormatProperties")
- set_proc_address(&GetPhysicalDeviceImageFormatProperties, "vkGetPhysicalDeviceImageFormatProperties")
- set_proc_address(&GetPhysicalDeviceProperties, "vkGetPhysicalDeviceProperties")
- set_proc_address(&GetPhysicalDeviceQueueFamilyProperties, "vkGetPhysicalDeviceQueueFamilyProperties")
- set_proc_address(&GetPhysicalDeviceMemoryProperties, "vkGetPhysicalDeviceMemoryProperties")
- set_proc_address(&GetInstanceProcAddr, "vkGetInstanceProcAddr")
+ set_proc_address(&AcquireDrmDisplayEXT, "vkAcquireDrmDisplayEXT")
+ set_proc_address(&AcquireWinrtDisplayNV, "vkAcquireWinrtDisplayNV")
+ set_proc_address(&CreateDebugReportCallbackEXT, "vkCreateDebugReportCallbackEXT")
+ set_proc_address(&CreateDebugUtilsMessengerEXT, "vkCreateDebugUtilsMessengerEXT")
set_proc_address(&CreateDevice, "vkCreateDevice")
+ set_proc_address(&CreateDisplayModeKHR, "vkCreateDisplayModeKHR")
+ set_proc_address(&CreateDisplayPlaneSurfaceKHR, "vkCreateDisplayPlaneSurfaceKHR")
+ set_proc_address(&CreateHeadlessSurfaceEXT, "vkCreateHeadlessSurfaceEXT")
+ set_proc_address(&CreateIOSSurfaceMVK, "vkCreateIOSSurfaceMVK")
+ set_proc_address(&CreateMacOSSurfaceMVK, "vkCreateMacOSSurfaceMVK")
+ set_proc_address(&CreateMetalSurfaceEXT, "vkCreateMetalSurfaceEXT")
+ set_proc_address(&CreateWin32SurfaceKHR, "vkCreateWin32SurfaceKHR")
+ set_proc_address(&DebugReportMessageEXT, "vkDebugReportMessageEXT")
+ set_proc_address(&DestroyDebugReportCallbackEXT, "vkDestroyDebugReportCallbackEXT")
+ set_proc_address(&DestroyDebugUtilsMessengerEXT, "vkDestroyDebugUtilsMessengerEXT")
+ set_proc_address(&DestroyInstance, "vkDestroyInstance")
+ set_proc_address(&DestroySurfaceKHR, "vkDestroySurfaceKHR")
set_proc_address(&EnumerateDeviceExtensionProperties, "vkEnumerateDeviceExtensionProperties")
set_proc_address(&EnumerateDeviceLayerProperties, "vkEnumerateDeviceLayerProperties")
- set_proc_address(&GetPhysicalDeviceSparseImageFormatProperties, "vkGetPhysicalDeviceSparseImageFormatProperties")
set_proc_address(&EnumeratePhysicalDeviceGroups, "vkEnumeratePhysicalDeviceGroups")
- set_proc_address(&GetPhysicalDeviceFeatures2, "vkGetPhysicalDeviceFeatures2")
- set_proc_address(&GetPhysicalDeviceProperties2, "vkGetPhysicalDeviceProperties2")
- set_proc_address(&GetPhysicalDeviceFormatProperties2, "vkGetPhysicalDeviceFormatProperties2")
- set_proc_address(&GetPhysicalDeviceImageFormatProperties2, "vkGetPhysicalDeviceImageFormatProperties2")
- set_proc_address(&GetPhysicalDeviceQueueFamilyProperties2, "vkGetPhysicalDeviceQueueFamilyProperties2")
- set_proc_address(&GetPhysicalDeviceMemoryProperties2, "vkGetPhysicalDeviceMemoryProperties2")
- set_proc_address(&GetPhysicalDeviceSparseImageFormatProperties2, "vkGetPhysicalDeviceSparseImageFormatProperties2")
+ set_proc_address(&EnumeratePhysicalDeviceGroupsKHR, "vkEnumeratePhysicalDeviceGroupsKHR")
+ set_proc_address(&EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR")
+ set_proc_address(&EnumeratePhysicalDevices, "vkEnumeratePhysicalDevices")
+ set_proc_address(&GetDisplayModeProperties2KHR, "vkGetDisplayModeProperties2KHR")
+ set_proc_address(&GetDisplayModePropertiesKHR, "vkGetDisplayModePropertiesKHR")
+ set_proc_address(&GetDisplayPlaneCapabilities2KHR, "vkGetDisplayPlaneCapabilities2KHR")
+ set_proc_address(&GetDisplayPlaneCapabilitiesKHR, "vkGetDisplayPlaneCapabilitiesKHR")
+ set_proc_address(&GetDisplayPlaneSupportedDisplaysKHR, "vkGetDisplayPlaneSupportedDisplaysKHR")
+ set_proc_address(&GetDrmDisplayEXT, "vkGetDrmDisplayEXT")
+ set_proc_address(&GetInstanceProcAddr, "vkGetInstanceProcAddr")
+ set_proc_address(&GetPhysicalDeviceCalibrateableTimeDomainsEXT, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT")
+ set_proc_address(&GetPhysicalDeviceCooperativeMatrixPropertiesNV, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV")
+ set_proc_address(&GetPhysicalDeviceDisplayPlaneProperties2KHR, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR")
+ set_proc_address(&GetPhysicalDeviceDisplayPlanePropertiesKHR, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR")
+ set_proc_address(&GetPhysicalDeviceDisplayProperties2KHR, "vkGetPhysicalDeviceDisplayProperties2KHR")
+ set_proc_address(&GetPhysicalDeviceDisplayPropertiesKHR, "vkGetPhysicalDeviceDisplayPropertiesKHR")
set_proc_address(&GetPhysicalDeviceExternalBufferProperties, "vkGetPhysicalDeviceExternalBufferProperties")
+ set_proc_address(&GetPhysicalDeviceExternalBufferPropertiesKHR, "vkGetPhysicalDeviceExternalBufferPropertiesKHR")
set_proc_address(&GetPhysicalDeviceExternalFenceProperties, "vkGetPhysicalDeviceExternalFenceProperties")
+ set_proc_address(&GetPhysicalDeviceExternalFencePropertiesKHR, "vkGetPhysicalDeviceExternalFencePropertiesKHR")
+ set_proc_address(&GetPhysicalDeviceExternalImageFormatPropertiesNV, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV")
set_proc_address(&GetPhysicalDeviceExternalSemaphoreProperties, "vkGetPhysicalDeviceExternalSemaphoreProperties")
- set_proc_address(&DestroySurfaceKHR, "vkDestroySurfaceKHR")
- set_proc_address(&GetPhysicalDeviceSurfaceSupportKHR, "vkGetPhysicalDeviceSurfaceSupportKHR")
- set_proc_address(&GetPhysicalDeviceSurfaceCapabilitiesKHR, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR")
- set_proc_address(&GetPhysicalDeviceSurfaceFormatsKHR, "vkGetPhysicalDeviceSurfaceFormatsKHR")
- set_proc_address(&GetPhysicalDeviceSurfacePresentModesKHR, "vkGetPhysicalDeviceSurfacePresentModesKHR")
- set_proc_address(&GetPhysicalDevicePresentRectanglesKHR, "vkGetPhysicalDevicePresentRectanglesKHR")
- set_proc_address(&GetPhysicalDeviceDisplayPropertiesKHR, "vkGetPhysicalDeviceDisplayPropertiesKHR")
- set_proc_address(&GetPhysicalDeviceDisplayPlanePropertiesKHR, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR")
- set_proc_address(&GetDisplayPlaneSupportedDisplaysKHR, "vkGetDisplayPlaneSupportedDisplaysKHR")
- set_proc_address(&GetDisplayModePropertiesKHR, "vkGetDisplayModePropertiesKHR")
- set_proc_address(&CreateDisplayModeKHR, "vkCreateDisplayModeKHR")
- set_proc_address(&GetDisplayPlaneCapabilitiesKHR, "vkGetDisplayPlaneCapabilitiesKHR")
- set_proc_address(&CreateDisplayPlaneSurfaceKHR, "vkCreateDisplayPlaneSurfaceKHR")
+ set_proc_address(&GetPhysicalDeviceExternalSemaphorePropertiesKHR, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR")
+ set_proc_address(&GetPhysicalDeviceFeatures, "vkGetPhysicalDeviceFeatures")
+ set_proc_address(&GetPhysicalDeviceFeatures2, "vkGetPhysicalDeviceFeatures2")
set_proc_address(&GetPhysicalDeviceFeatures2KHR, "vkGetPhysicalDeviceFeatures2KHR")
- set_proc_address(&GetPhysicalDeviceProperties2KHR, "vkGetPhysicalDeviceProperties2KHR")
+ set_proc_address(&GetPhysicalDeviceFormatProperties, "vkGetPhysicalDeviceFormatProperties")
+ set_proc_address(&GetPhysicalDeviceFormatProperties2, "vkGetPhysicalDeviceFormatProperties2")
set_proc_address(&GetPhysicalDeviceFormatProperties2KHR, "vkGetPhysicalDeviceFormatProperties2KHR")
+ set_proc_address(&GetPhysicalDeviceFragmentShadingRatesKHR, "vkGetPhysicalDeviceFragmentShadingRatesKHR")
+ set_proc_address(&GetPhysicalDeviceImageFormatProperties, "vkGetPhysicalDeviceImageFormatProperties")
+ set_proc_address(&GetPhysicalDeviceImageFormatProperties2, "vkGetPhysicalDeviceImageFormatProperties2")
set_proc_address(&GetPhysicalDeviceImageFormatProperties2KHR, "vkGetPhysicalDeviceImageFormatProperties2KHR")
- set_proc_address(&GetPhysicalDeviceQueueFamilyProperties2KHR, "vkGetPhysicalDeviceQueueFamilyProperties2KHR")
+ set_proc_address(&GetPhysicalDeviceMemoryProperties, "vkGetPhysicalDeviceMemoryProperties")
+ set_proc_address(&GetPhysicalDeviceMemoryProperties2, "vkGetPhysicalDeviceMemoryProperties2")
set_proc_address(&GetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2KHR")
- set_proc_address(&GetPhysicalDeviceSparseImageFormatProperties2KHR, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR")
- set_proc_address(&EnumeratePhysicalDeviceGroupsKHR, "vkEnumeratePhysicalDeviceGroupsKHR")
- set_proc_address(&GetPhysicalDeviceExternalBufferPropertiesKHR, "vkGetPhysicalDeviceExternalBufferPropertiesKHR")
- set_proc_address(&GetPhysicalDeviceExternalSemaphorePropertiesKHR, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR")
- set_proc_address(&GetPhysicalDeviceExternalFencePropertiesKHR, "vkGetPhysicalDeviceExternalFencePropertiesKHR")
- set_proc_address(&EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR")
+ set_proc_address(&GetPhysicalDeviceMultisamplePropertiesEXT, "vkGetPhysicalDeviceMultisamplePropertiesEXT")
+ set_proc_address(&GetPhysicalDevicePresentRectanglesKHR, "vkGetPhysicalDevicePresentRectanglesKHR")
+ set_proc_address(&GetPhysicalDeviceProperties, "vkGetPhysicalDeviceProperties")
+ set_proc_address(&GetPhysicalDeviceProperties2, "vkGetPhysicalDeviceProperties2")
+ set_proc_address(&GetPhysicalDeviceProperties2KHR, "vkGetPhysicalDeviceProperties2KHR")
set_proc_address(&GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR")
+ set_proc_address(&GetPhysicalDeviceQueueFamilyProperties, "vkGetPhysicalDeviceQueueFamilyProperties")
+ set_proc_address(&GetPhysicalDeviceQueueFamilyProperties2, "vkGetPhysicalDeviceQueueFamilyProperties2")
+ set_proc_address(&GetPhysicalDeviceQueueFamilyProperties2KHR, "vkGetPhysicalDeviceQueueFamilyProperties2KHR")
+ set_proc_address(&GetPhysicalDeviceSparseImageFormatProperties, "vkGetPhysicalDeviceSparseImageFormatProperties")
+ set_proc_address(&GetPhysicalDeviceSparseImageFormatProperties2, "vkGetPhysicalDeviceSparseImageFormatProperties2")
+ set_proc_address(&GetPhysicalDeviceSparseImageFormatProperties2KHR, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR")
+ set_proc_address(&GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV")
+ set_proc_address(&GetPhysicalDeviceSurfaceCapabilities2EXT, "vkGetPhysicalDeviceSurfaceCapabilities2EXT")
set_proc_address(&GetPhysicalDeviceSurfaceCapabilities2KHR, "vkGetPhysicalDeviceSurfaceCapabilities2KHR")
+ set_proc_address(&GetPhysicalDeviceSurfaceCapabilitiesKHR, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR")
set_proc_address(&GetPhysicalDeviceSurfaceFormats2KHR, "vkGetPhysicalDeviceSurfaceFormats2KHR")
- set_proc_address(&GetPhysicalDeviceDisplayProperties2KHR, "vkGetPhysicalDeviceDisplayProperties2KHR")
- set_proc_address(&GetPhysicalDeviceDisplayPlaneProperties2KHR, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR")
- set_proc_address(&GetDisplayModeProperties2KHR, "vkGetDisplayModeProperties2KHR")
- set_proc_address(&GetDisplayPlaneCapabilities2KHR, "vkGetDisplayPlaneCapabilities2KHR")
- set_proc_address(&GetPhysicalDeviceFragmentShadingRatesKHR, "vkGetPhysicalDeviceFragmentShadingRatesKHR")
- set_proc_address(&CreateDebugReportCallbackEXT, "vkCreateDebugReportCallbackEXT")
- set_proc_address(&DestroyDebugReportCallbackEXT, "vkDestroyDebugReportCallbackEXT")
- set_proc_address(&DebugReportMessageEXT, "vkDebugReportMessageEXT")
- set_proc_address(&GetPhysicalDeviceExternalImageFormatPropertiesNV, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV")
- set_proc_address(&ReleaseDisplayEXT, "vkReleaseDisplayEXT")
- set_proc_address(&GetPhysicalDeviceSurfaceCapabilities2EXT, "vkGetPhysicalDeviceSurfaceCapabilities2EXT")
- set_proc_address(&CreateDebugUtilsMessengerEXT, "vkCreateDebugUtilsMessengerEXT")
- set_proc_address(&DestroyDebugUtilsMessengerEXT, "vkDestroyDebugUtilsMessengerEXT")
- set_proc_address(&SubmitDebugUtilsMessageEXT, "vkSubmitDebugUtilsMessageEXT")
- set_proc_address(&GetPhysicalDeviceMultisamplePropertiesEXT, "vkGetPhysicalDeviceMultisamplePropertiesEXT")
- set_proc_address(&GetPhysicalDeviceCalibrateableTimeDomainsEXT, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT")
+ set_proc_address(&GetPhysicalDeviceSurfaceFormatsKHR, "vkGetPhysicalDeviceSurfaceFormatsKHR")
+ set_proc_address(&GetPhysicalDeviceSurfacePresentModes2EXT, "vkGetPhysicalDeviceSurfacePresentModes2EXT")
+ set_proc_address(&GetPhysicalDeviceSurfacePresentModesKHR, "vkGetPhysicalDeviceSurfacePresentModesKHR")
+ set_proc_address(&GetPhysicalDeviceSurfaceSupportKHR, "vkGetPhysicalDeviceSurfaceSupportKHR")
set_proc_address(&GetPhysicalDeviceToolPropertiesEXT, "vkGetPhysicalDeviceToolPropertiesEXT")
- set_proc_address(&GetPhysicalDeviceCooperativeMatrixPropertiesNV, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV")
- set_proc_address(&GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV")
- set_proc_address(&CreateHeadlessSurfaceEXT, "vkCreateHeadlessSurfaceEXT")
- set_proc_address(&AcquireDrmDisplayEXT, "vkAcquireDrmDisplayEXT")
- set_proc_address(&GetDrmDisplayEXT, "vkGetDrmDisplayEXT")
- set_proc_address(&AcquireWinrtDisplayNV, "vkAcquireWinrtDisplayNV")
- set_proc_address(&GetWinrtDisplayNV, "vkGetWinrtDisplayNV")
- set_proc_address(&CreateWin32SurfaceKHR, "vkCreateWin32SurfaceKHR")
set_proc_address(&GetPhysicalDeviceWin32PresentationSupportKHR, "vkGetPhysicalDeviceWin32PresentationSupportKHR")
- set_proc_address(&GetPhysicalDeviceSurfacePresentModes2EXT, "vkGetPhysicalDeviceSurfacePresentModes2EXT")
- set_proc_address(&CreateMetalSurfaceEXT, "vkCreateMetalSurfaceEXT")
- set_proc_address(&CreateMacOSSurfaceMVK, "vkCreateMacOSSurfaceMVK")
- set_proc_address(&CreateIOSSurfaceMVK, "vkCreateIOSSurfaceMVK")
+ set_proc_address(&GetWinrtDisplayNV, "vkGetWinrtDisplayNV")
+ set_proc_address(&ReleaseDisplayEXT, "vkReleaseDisplayEXT")
+ set_proc_address(&SubmitDebugUtilsMessageEXT, "vkSubmitDebugUtilsMessageEXT")
// Device Procedures
- set_proc_address(&GetDeviceProcAddr, "vkGetDeviceProcAddr")
- set_proc_address(&DestroyDevice, "vkDestroyDevice")
- set_proc_address(&GetDeviceQueue, "vkGetDeviceQueue")
- set_proc_address(&QueueSubmit, "vkQueueSubmit")
- set_proc_address(&QueueWaitIdle, "vkQueueWaitIdle")
- set_proc_address(&DeviceWaitIdle, "vkDeviceWaitIdle")
+ set_proc_address(&AcquireFullScreenExclusiveModeEXT, "vkAcquireFullScreenExclusiveModeEXT")
+ set_proc_address(&AcquireNextImage2KHR, "vkAcquireNextImage2KHR")
+ set_proc_address(&AcquireNextImageKHR, "vkAcquireNextImageKHR")
+ set_proc_address(&AcquirePerformanceConfigurationINTEL, "vkAcquirePerformanceConfigurationINTEL")
+ set_proc_address(&AcquireProfilingLockKHR, "vkAcquireProfilingLockKHR")
+ set_proc_address(&AllocateCommandBuffers, "vkAllocateCommandBuffers")
+ set_proc_address(&AllocateDescriptorSets, "vkAllocateDescriptorSets")
set_proc_address(&AllocateMemory, "vkAllocateMemory")
- set_proc_address(&FreeMemory, "vkFreeMemory")
- set_proc_address(&MapMemory, "vkMapMemory")
- set_proc_address(&UnmapMemory, "vkUnmapMemory")
- set_proc_address(&FlushMappedMemoryRanges, "vkFlushMappedMemoryRanges")
- set_proc_address(&InvalidateMappedMemoryRanges, "vkInvalidateMappedMemoryRanges")
- set_proc_address(&GetDeviceMemoryCommitment, "vkGetDeviceMemoryCommitment")
+ set_proc_address(&BeginCommandBuffer, "vkBeginCommandBuffer")
+ set_proc_address(&BindAccelerationStructureMemoryNV, "vkBindAccelerationStructureMemoryNV")
set_proc_address(&BindBufferMemory, "vkBindBufferMemory")
+ set_proc_address(&BindBufferMemory2, "vkBindBufferMemory2")
+ set_proc_address(&BindBufferMemory2KHR, "vkBindBufferMemory2KHR")
set_proc_address(&BindImageMemory, "vkBindImageMemory")
- set_proc_address(&GetBufferMemoryRequirements, "vkGetBufferMemoryRequirements")
- set_proc_address(&GetImageMemoryRequirements, "vkGetImageMemoryRequirements")
- set_proc_address(&GetImageSparseMemoryRequirements, "vkGetImageSparseMemoryRequirements")
- set_proc_address(&QueueBindSparse, "vkQueueBindSparse")
- set_proc_address(&CreateFence, "vkCreateFence")
- set_proc_address(&DestroyFence, "vkDestroyFence")
- set_proc_address(&ResetFences, "vkResetFences")
- set_proc_address(&GetFenceStatus, "vkGetFenceStatus")
- set_proc_address(&WaitForFences, "vkWaitForFences")
- set_proc_address(&CreateSemaphore, "vkCreateSemaphore")
- set_proc_address(&DestroySemaphore, "vkDestroySemaphore")
- set_proc_address(&CreateEvent, "vkCreateEvent")
- set_proc_address(&DestroyEvent, "vkDestroyEvent")
- set_proc_address(&GetEventStatus, "vkGetEventStatus")
- set_proc_address(&SetEvent, "vkSetEvent")
- set_proc_address(&ResetEvent, "vkResetEvent")
- set_proc_address(&CreateQueryPool, "vkCreateQueryPool")
- set_proc_address(&DestroyQueryPool, "vkDestroyQueryPool")
- set_proc_address(&GetQueryPoolResults, "vkGetQueryPoolResults")
- set_proc_address(&CreateBuffer, "vkCreateBuffer")
- set_proc_address(&DestroyBuffer, "vkDestroyBuffer")
- set_proc_address(&CreateBufferView, "vkCreateBufferView")
- set_proc_address(&DestroyBufferView, "vkDestroyBufferView")
- set_proc_address(&CreateImage, "vkCreateImage")
- set_proc_address(&DestroyImage, "vkDestroyImage")
- set_proc_address(&GetImageSubresourceLayout, "vkGetImageSubresourceLayout")
- set_proc_address(&CreateImageView, "vkCreateImageView")
- set_proc_address(&DestroyImageView, "vkDestroyImageView")
- set_proc_address(&CreateShaderModule, "vkCreateShaderModule")
- set_proc_address(&DestroyShaderModule, "vkDestroyShaderModule")
- set_proc_address(&CreatePipelineCache, "vkCreatePipelineCache")
- set_proc_address(&DestroyPipelineCache, "vkDestroyPipelineCache")
- set_proc_address(&GetPipelineCacheData, "vkGetPipelineCacheData")
- set_proc_address(&MergePipelineCaches, "vkMergePipelineCaches")
- set_proc_address(&CreateGraphicsPipelines, "vkCreateGraphicsPipelines")
- set_proc_address(&CreateComputePipelines, "vkCreateComputePipelines")
- set_proc_address(&DestroyPipeline, "vkDestroyPipeline")
- set_proc_address(&CreatePipelineLayout, "vkCreatePipelineLayout")
- set_proc_address(&DestroyPipelineLayout, "vkDestroyPipelineLayout")
- set_proc_address(&CreateSampler, "vkCreateSampler")
- set_proc_address(&DestroySampler, "vkDestroySampler")
- set_proc_address(&CreateDescriptorSetLayout, "vkCreateDescriptorSetLayout")
- set_proc_address(&DestroyDescriptorSetLayout, "vkDestroyDescriptorSetLayout")
- set_proc_address(&CreateDescriptorPool, "vkCreateDescriptorPool")
- set_proc_address(&DestroyDescriptorPool, "vkDestroyDescriptorPool")
- set_proc_address(&ResetDescriptorPool, "vkResetDescriptorPool")
- set_proc_address(&AllocateDescriptorSets, "vkAllocateDescriptorSets")
- set_proc_address(&FreeDescriptorSets, "vkFreeDescriptorSets")
- set_proc_address(&UpdateDescriptorSets, "vkUpdateDescriptorSets")
- set_proc_address(&CreateFramebuffer, "vkCreateFramebuffer")
- set_proc_address(&DestroyFramebuffer, "vkDestroyFramebuffer")
- set_proc_address(&CreateRenderPass, "vkCreateRenderPass")
- set_proc_address(&DestroyRenderPass, "vkDestroyRenderPass")
- set_proc_address(&GetRenderAreaGranularity, "vkGetRenderAreaGranularity")
- set_proc_address(&CreateCommandPool, "vkCreateCommandPool")
- set_proc_address(&DestroyCommandPool, "vkDestroyCommandPool")
- set_proc_address(&ResetCommandPool, "vkResetCommandPool")
- set_proc_address(&AllocateCommandBuffers, "vkAllocateCommandBuffers")
- set_proc_address(&FreeCommandBuffers, "vkFreeCommandBuffers")
- set_proc_address(&BeginCommandBuffer, "vkBeginCommandBuffer")
- set_proc_address(&EndCommandBuffer, "vkEndCommandBuffer")
- set_proc_address(&ResetCommandBuffer, "vkResetCommandBuffer")
- set_proc_address(&CmdBindPipeline, "vkCmdBindPipeline")
- set_proc_address(&CmdSetViewport, "vkCmdSetViewport")
- set_proc_address(&CmdSetScissor, "vkCmdSetScissor")
- set_proc_address(&CmdSetLineWidth, "vkCmdSetLineWidth")
- set_proc_address(&CmdSetDepthBias, "vkCmdSetDepthBias")
- set_proc_address(&CmdSetBlendConstants, "vkCmdSetBlendConstants")
- set_proc_address(&CmdSetDepthBounds, "vkCmdSetDepthBounds")
- set_proc_address(&CmdSetStencilCompareMask, "vkCmdSetStencilCompareMask")
- set_proc_address(&CmdSetStencilWriteMask, "vkCmdSetStencilWriteMask")
- set_proc_address(&CmdSetStencilReference, "vkCmdSetStencilReference")
+ set_proc_address(&BindImageMemory2, "vkBindImageMemory2")
+ set_proc_address(&BindImageMemory2KHR, "vkBindImageMemory2KHR")
+ set_proc_address(&BuildAccelerationStructuresKHR, "vkBuildAccelerationStructuresKHR")
+ set_proc_address(&CmdBeginConditionalRenderingEXT, "vkCmdBeginConditionalRenderingEXT")
+ set_proc_address(&CmdBeginDebugUtilsLabelEXT, "vkCmdBeginDebugUtilsLabelEXT")
+ set_proc_address(&CmdBeginQuery, "vkCmdBeginQuery")
+ set_proc_address(&CmdBeginQueryIndexedEXT, "vkCmdBeginQueryIndexedEXT")
+ set_proc_address(&CmdBeginRenderPass, "vkCmdBeginRenderPass")
+ set_proc_address(&CmdBeginRenderPass2, "vkCmdBeginRenderPass2")
+ set_proc_address(&CmdBeginRenderPass2KHR, "vkCmdBeginRenderPass2KHR")
+ set_proc_address(&CmdBeginTransformFeedbackEXT, "vkCmdBeginTransformFeedbackEXT")
set_proc_address(&CmdBindDescriptorSets, "vkCmdBindDescriptorSets")
set_proc_address(&CmdBindIndexBuffer, "vkCmdBindIndexBuffer")
+ set_proc_address(&CmdBindInvocationMaskHUAWEI, "vkCmdBindInvocationMaskHUAWEI")
+ set_proc_address(&CmdBindPipeline, "vkCmdBindPipeline")
+ set_proc_address(&CmdBindPipelineShaderGroupNV, "vkCmdBindPipelineShaderGroupNV")
+ set_proc_address(&CmdBindShadingRateImageNV, "vkCmdBindShadingRateImageNV")
+ set_proc_address(&CmdBindTransformFeedbackBuffersEXT, "vkCmdBindTransformFeedbackBuffersEXT")
set_proc_address(&CmdBindVertexBuffers, "vkCmdBindVertexBuffers")
- set_proc_address(&CmdDraw, "vkCmdDraw")
- set_proc_address(&CmdDrawIndexed, "vkCmdDrawIndexed")
- set_proc_address(&CmdDrawIndirect, "vkCmdDrawIndirect")
- set_proc_address(&CmdDrawIndexedIndirect, "vkCmdDrawIndexedIndirect")
- set_proc_address(&CmdDispatch, "vkCmdDispatch")
- set_proc_address(&CmdDispatchIndirect, "vkCmdDispatchIndirect")
- set_proc_address(&CmdCopyBuffer, "vkCmdCopyBuffer")
- set_proc_address(&CmdCopyImage, "vkCmdCopyImage")
+ set_proc_address(&CmdBindVertexBuffers2EXT, "vkCmdBindVertexBuffers2EXT")
set_proc_address(&CmdBlitImage, "vkCmdBlitImage")
- set_proc_address(&CmdCopyBufferToImage, "vkCmdCopyBufferToImage")
- set_proc_address(&CmdCopyImageToBuffer, "vkCmdCopyImageToBuffer")
- set_proc_address(&CmdUpdateBuffer, "vkCmdUpdateBuffer")
- set_proc_address(&CmdFillBuffer, "vkCmdFillBuffer")
+ set_proc_address(&CmdBlitImage2KHR, "vkCmdBlitImage2KHR")
+ set_proc_address(&CmdBuildAccelerationStructureNV, "vkCmdBuildAccelerationStructureNV")
+ set_proc_address(&CmdBuildAccelerationStructuresIndirectKHR, "vkCmdBuildAccelerationStructuresIndirectKHR")
+ set_proc_address(&CmdBuildAccelerationStructuresKHR, "vkCmdBuildAccelerationStructuresKHR")
+ set_proc_address(&CmdClearAttachments, "vkCmdClearAttachments")
set_proc_address(&CmdClearColorImage, "vkCmdClearColorImage")
set_proc_address(&CmdClearDepthStencilImage, "vkCmdClearDepthStencilImage")
- set_proc_address(&CmdClearAttachments, "vkCmdClearAttachments")
- set_proc_address(&CmdResolveImage, "vkCmdResolveImage")
- set_proc_address(&CmdSetEvent, "vkCmdSetEvent")
- set_proc_address(&CmdResetEvent, "vkCmdResetEvent")
- set_proc_address(&CmdWaitEvents, "vkCmdWaitEvents")
- set_proc_address(&CmdPipelineBarrier, "vkCmdPipelineBarrier")
- set_proc_address(&CmdBeginQuery, "vkCmdBeginQuery")
- set_proc_address(&CmdEndQuery, "vkCmdEndQuery")
- set_proc_address(&CmdResetQueryPool, "vkCmdResetQueryPool")
- set_proc_address(&CmdWriteTimestamp, "vkCmdWriteTimestamp")
- set_proc_address(&CmdCopyQueryPoolResults, "vkCmdCopyQueryPoolResults")
- set_proc_address(&CmdPushConstants, "vkCmdPushConstants")
- set_proc_address(&CmdBeginRenderPass, "vkCmdBeginRenderPass")
- set_proc_address(&CmdNextSubpass, "vkCmdNextSubpass")
- set_proc_address(&CmdEndRenderPass, "vkCmdEndRenderPass")
- set_proc_address(&CmdExecuteCommands, "vkCmdExecuteCommands")
- set_proc_address(&BindBufferMemory2, "vkBindBufferMemory2")
- set_proc_address(&BindImageMemory2, "vkBindImageMemory2")
- set_proc_address(&GetDeviceGroupPeerMemoryFeatures, "vkGetDeviceGroupPeerMemoryFeatures")
- set_proc_address(&CmdSetDeviceMask, "vkCmdSetDeviceMask")
- set_proc_address(&CmdDispatchBase, "vkCmdDispatchBase")
- set_proc_address(&GetImageMemoryRequirements2, "vkGetImageMemoryRequirements2")
- set_proc_address(&GetBufferMemoryRequirements2, "vkGetBufferMemoryRequirements2")
- set_proc_address(&GetImageSparseMemoryRequirements2, "vkGetImageSparseMemoryRequirements2")
- set_proc_address(&TrimCommandPool, "vkTrimCommandPool")
- set_proc_address(&GetDeviceQueue2, "vkGetDeviceQueue2")
- set_proc_address(&CreateSamplerYcbcrConversion, "vkCreateSamplerYcbcrConversion")
- set_proc_address(&DestroySamplerYcbcrConversion, "vkDestroySamplerYcbcrConversion")
- set_proc_address(&CreateDescriptorUpdateTemplate, "vkCreateDescriptorUpdateTemplate")
- set_proc_address(&DestroyDescriptorUpdateTemplate, "vkDestroyDescriptorUpdateTemplate")
- set_proc_address(&UpdateDescriptorSetWithTemplate, "vkUpdateDescriptorSetWithTemplate")
- set_proc_address(&GetDescriptorSetLayoutSupport, "vkGetDescriptorSetLayoutSupport")
- set_proc_address(&CmdDrawIndirectCount, "vkCmdDrawIndirectCount")
- set_proc_address(&CmdDrawIndexedIndirectCount, "vkCmdDrawIndexedIndirectCount")
- set_proc_address(&CreateRenderPass2, "vkCreateRenderPass2")
- set_proc_address(&CmdBeginRenderPass2, "vkCmdBeginRenderPass2")
- set_proc_address(&CmdNextSubpass2, "vkCmdNextSubpass2")
- set_proc_address(&CmdEndRenderPass2, "vkCmdEndRenderPass2")
- set_proc_address(&ResetQueryPool, "vkResetQueryPool")
- set_proc_address(&GetSemaphoreCounterValue, "vkGetSemaphoreCounterValue")
- set_proc_address(&WaitSemaphores, "vkWaitSemaphores")
- set_proc_address(&SignalSemaphore, "vkSignalSemaphore")
- set_proc_address(&GetBufferDeviceAddress, "vkGetBufferDeviceAddress")
- set_proc_address(&GetBufferOpaqueCaptureAddress, "vkGetBufferOpaqueCaptureAddress")
- set_proc_address(&GetDeviceMemoryOpaqueCaptureAddress, "vkGetDeviceMemoryOpaqueCaptureAddress")
- set_proc_address(&CreateSwapchainKHR, "vkCreateSwapchainKHR")
- set_proc_address(&DestroySwapchainKHR, "vkDestroySwapchainKHR")
- set_proc_address(&GetSwapchainImagesKHR, "vkGetSwapchainImagesKHR")
- set_proc_address(&AcquireNextImageKHR, "vkAcquireNextImageKHR")
- set_proc_address(&QueuePresentKHR, "vkQueuePresentKHR")
- set_proc_address(&GetDeviceGroupPresentCapabilitiesKHR, "vkGetDeviceGroupPresentCapabilitiesKHR")
- set_proc_address(&GetDeviceGroupSurfacePresentModesKHR, "vkGetDeviceGroupSurfacePresentModesKHR")
- set_proc_address(&AcquireNextImage2KHR, "vkAcquireNextImage2KHR")
- set_proc_address(&CreateSharedSwapchainsKHR, "vkCreateSharedSwapchainsKHR")
- set_proc_address(&GetDeviceGroupPeerMemoryFeaturesKHR, "vkGetDeviceGroupPeerMemoryFeaturesKHR")
- set_proc_address(&CmdSetDeviceMaskKHR, "vkCmdSetDeviceMaskKHR")
- set_proc_address(&CmdDispatchBaseKHR, "vkCmdDispatchBaseKHR")
- set_proc_address(&TrimCommandPoolKHR, "vkTrimCommandPoolKHR")
- set_proc_address(&GetMemoryFdKHR, "vkGetMemoryFdKHR")
- set_proc_address(&GetMemoryFdPropertiesKHR, "vkGetMemoryFdPropertiesKHR")
- set_proc_address(&ImportSemaphoreFdKHR, "vkImportSemaphoreFdKHR")
- set_proc_address(&GetSemaphoreFdKHR, "vkGetSemaphoreFdKHR")
- set_proc_address(&CmdPushDescriptorSetKHR, "vkCmdPushDescriptorSetKHR")
- set_proc_address(&CmdPushDescriptorSetWithTemplateKHR, "vkCmdPushDescriptorSetWithTemplateKHR")
- set_proc_address(&CreateDescriptorUpdateTemplateKHR, "vkCreateDescriptorUpdateTemplateKHR")
- set_proc_address(&DestroyDescriptorUpdateTemplateKHR, "vkDestroyDescriptorUpdateTemplateKHR")
- set_proc_address(&UpdateDescriptorSetWithTemplateKHR, "vkUpdateDescriptorSetWithTemplateKHR")
- set_proc_address(&CreateRenderPass2KHR, "vkCreateRenderPass2KHR")
- set_proc_address(&CmdBeginRenderPass2KHR, "vkCmdBeginRenderPass2KHR")
- set_proc_address(&CmdNextSubpass2KHR, "vkCmdNextSubpass2KHR")
- set_proc_address(&CmdEndRenderPass2KHR, "vkCmdEndRenderPass2KHR")
- set_proc_address(&GetSwapchainStatusKHR, "vkGetSwapchainStatusKHR")
- set_proc_address(&ImportFenceFdKHR, "vkImportFenceFdKHR")
- set_proc_address(&GetFenceFdKHR, "vkGetFenceFdKHR")
- set_proc_address(&AcquireProfilingLockKHR, "vkAcquireProfilingLockKHR")
- set_proc_address(&ReleaseProfilingLockKHR, "vkReleaseProfilingLockKHR")
- set_proc_address(&GetImageMemoryRequirements2KHR, "vkGetImageMemoryRequirements2KHR")
- set_proc_address(&GetBufferMemoryRequirements2KHR, "vkGetBufferMemoryRequirements2KHR")
- set_proc_address(&GetImageSparseMemoryRequirements2KHR, "vkGetImageSparseMemoryRequirements2KHR")
- set_proc_address(&CreateSamplerYcbcrConversionKHR, "vkCreateSamplerYcbcrConversionKHR")
- set_proc_address(&DestroySamplerYcbcrConversionKHR, "vkDestroySamplerYcbcrConversionKHR")
- set_proc_address(&BindBufferMemory2KHR, "vkBindBufferMemory2KHR")
- set_proc_address(&BindImageMemory2KHR, "vkBindImageMemory2KHR")
- set_proc_address(&GetDescriptorSetLayoutSupportKHR, "vkGetDescriptorSetLayoutSupportKHR")
- set_proc_address(&CmdDrawIndirectCountKHR, "vkCmdDrawIndirectCountKHR")
- set_proc_address(&CmdDrawIndexedIndirectCountKHR, "vkCmdDrawIndexedIndirectCountKHR")
- set_proc_address(&GetSemaphoreCounterValueKHR, "vkGetSemaphoreCounterValueKHR")
- set_proc_address(&WaitSemaphoresKHR, "vkWaitSemaphoresKHR")
- set_proc_address(&SignalSemaphoreKHR, "vkSignalSemaphoreKHR")
- set_proc_address(&CmdSetFragmentShadingRateKHR, "vkCmdSetFragmentShadingRateKHR")
- set_proc_address(&WaitForPresentKHR, "vkWaitForPresentKHR")
- set_proc_address(&GetBufferDeviceAddressKHR, "vkGetBufferDeviceAddressKHR")
- set_proc_address(&GetBufferOpaqueCaptureAddressKHR, "vkGetBufferOpaqueCaptureAddressKHR")
- set_proc_address(&GetDeviceMemoryOpaqueCaptureAddressKHR, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
- set_proc_address(&CreateDeferredOperationKHR, "vkCreateDeferredOperationKHR")
- set_proc_address(&DestroyDeferredOperationKHR, "vkDestroyDeferredOperationKHR")
- set_proc_address(&GetDeferredOperationMaxConcurrencyKHR, "vkGetDeferredOperationMaxConcurrencyKHR")
- set_proc_address(&GetDeferredOperationResultKHR, "vkGetDeferredOperationResultKHR")
- set_proc_address(&DeferredOperationJoinKHR, "vkDeferredOperationJoinKHR")
- set_proc_address(&GetPipelineExecutablePropertiesKHR, "vkGetPipelineExecutablePropertiesKHR")
- set_proc_address(&GetPipelineExecutableStatisticsKHR, "vkGetPipelineExecutableStatisticsKHR")
- set_proc_address(&GetPipelineExecutableInternalRepresentationsKHR, "vkGetPipelineExecutableInternalRepresentationsKHR")
- set_proc_address(&CmdSetEvent2KHR, "vkCmdSetEvent2KHR")
- set_proc_address(&CmdResetEvent2KHR, "vkCmdResetEvent2KHR")
- set_proc_address(&CmdWaitEvents2KHR, "vkCmdWaitEvents2KHR")
- set_proc_address(&CmdPipelineBarrier2KHR, "vkCmdPipelineBarrier2KHR")
- set_proc_address(&CmdWriteTimestamp2KHR, "vkCmdWriteTimestamp2KHR")
- set_proc_address(&QueueSubmit2KHR, "vkQueueSubmit2KHR")
- set_proc_address(&CmdWriteBufferMarker2AMD, "vkCmdWriteBufferMarker2AMD")
- set_proc_address(&GetQueueCheckpointData2NV, "vkGetQueueCheckpointData2NV")
+ set_proc_address(&CmdCopyAccelerationStructureKHR, "vkCmdCopyAccelerationStructureKHR")
+ set_proc_address(&CmdCopyAccelerationStructureNV, "vkCmdCopyAccelerationStructureNV")
+ set_proc_address(&CmdCopyAccelerationStructureToMemoryKHR, "vkCmdCopyAccelerationStructureToMemoryKHR")
+ set_proc_address(&CmdCopyBuffer, "vkCmdCopyBuffer")
set_proc_address(&CmdCopyBuffer2KHR, "vkCmdCopyBuffer2KHR")
- set_proc_address(&CmdCopyImage2KHR, "vkCmdCopyImage2KHR")
+ set_proc_address(&CmdCopyBufferToImage, "vkCmdCopyBufferToImage")
set_proc_address(&CmdCopyBufferToImage2KHR, "vkCmdCopyBufferToImage2KHR")
+ set_proc_address(&CmdCopyImage, "vkCmdCopyImage")
+ set_proc_address(&CmdCopyImage2KHR, "vkCmdCopyImage2KHR")
+ set_proc_address(&CmdCopyImageToBuffer, "vkCmdCopyImageToBuffer")
set_proc_address(&CmdCopyImageToBuffer2KHR, "vkCmdCopyImageToBuffer2KHR")
- set_proc_address(&CmdBlitImage2KHR, "vkCmdBlitImage2KHR")
- set_proc_address(&CmdResolveImage2KHR, "vkCmdResolveImage2KHR")
- set_proc_address(&DebugMarkerSetObjectTagEXT, "vkDebugMarkerSetObjectTagEXT")
- set_proc_address(&DebugMarkerSetObjectNameEXT, "vkDebugMarkerSetObjectNameEXT")
+ set_proc_address(&CmdCopyMemoryToAccelerationStructureKHR, "vkCmdCopyMemoryToAccelerationStructureKHR")
+ set_proc_address(&CmdCopyQueryPoolResults, "vkCmdCopyQueryPoolResults")
+ set_proc_address(&CmdCuLaunchKernelNVX, "vkCmdCuLaunchKernelNVX")
set_proc_address(&CmdDebugMarkerBeginEXT, "vkCmdDebugMarkerBeginEXT")
set_proc_address(&CmdDebugMarkerEndEXT, "vkCmdDebugMarkerEndEXT")
set_proc_address(&CmdDebugMarkerInsertEXT, "vkCmdDebugMarkerInsertEXT")
- set_proc_address(&CmdBindTransformFeedbackBuffersEXT, "vkCmdBindTransformFeedbackBuffersEXT")
- set_proc_address(&CmdBeginTransformFeedbackEXT, "vkCmdBeginTransformFeedbackEXT")
- set_proc_address(&CmdEndTransformFeedbackEXT, "vkCmdEndTransformFeedbackEXT")
- set_proc_address(&CmdBeginQueryIndexedEXT, "vkCmdBeginQueryIndexedEXT")
- set_proc_address(&CmdEndQueryIndexedEXT, "vkCmdEndQueryIndexedEXT")
+ set_proc_address(&CmdDispatch, "vkCmdDispatch")
+ set_proc_address(&CmdDispatchBase, "vkCmdDispatchBase")
+ set_proc_address(&CmdDispatchBaseKHR, "vkCmdDispatchBaseKHR")
+ set_proc_address(&CmdDispatchIndirect, "vkCmdDispatchIndirect")
+ set_proc_address(&CmdDraw, "vkCmdDraw")
+ set_proc_address(&CmdDrawIndexed, "vkCmdDrawIndexed")
+ set_proc_address(&CmdDrawIndexedIndirect, "vkCmdDrawIndexedIndirect")
+ set_proc_address(&CmdDrawIndexedIndirectCount, "vkCmdDrawIndexedIndirectCount")
+ set_proc_address(&CmdDrawIndexedIndirectCountAMD, "vkCmdDrawIndexedIndirectCountAMD")
+ set_proc_address(&CmdDrawIndexedIndirectCountKHR, "vkCmdDrawIndexedIndirectCountKHR")
+ set_proc_address(&CmdDrawIndirect, "vkCmdDrawIndirect")
set_proc_address(&CmdDrawIndirectByteCountEXT, "vkCmdDrawIndirectByteCountEXT")
- set_proc_address(&CreateCuModuleNVX, "vkCreateCuModuleNVX")
- set_proc_address(&CreateCuFunctionNVX, "vkCreateCuFunctionNVX")
- set_proc_address(&DestroyCuModuleNVX, "vkDestroyCuModuleNVX")
- set_proc_address(&DestroyCuFunctionNVX, "vkDestroyCuFunctionNVX")
- set_proc_address(&CmdCuLaunchKernelNVX, "vkCmdCuLaunchKernelNVX")
- set_proc_address(&GetImageViewHandleNVX, "vkGetImageViewHandleNVX")
- set_proc_address(&GetImageViewAddressNVX, "vkGetImageViewAddressNVX")
+ set_proc_address(&CmdDrawIndirectCount, "vkCmdDrawIndirectCount")
set_proc_address(&CmdDrawIndirectCountAMD, "vkCmdDrawIndirectCountAMD")
- set_proc_address(&CmdDrawIndexedIndirectCountAMD, "vkCmdDrawIndexedIndirectCountAMD")
- set_proc_address(&GetShaderInfoAMD, "vkGetShaderInfoAMD")
- set_proc_address(&CmdBeginConditionalRenderingEXT, "vkCmdBeginConditionalRenderingEXT")
+ set_proc_address(&CmdDrawIndirectCountKHR, "vkCmdDrawIndirectCountKHR")
+ set_proc_address(&CmdDrawMeshTasksIndirectCountNV, "vkCmdDrawMeshTasksIndirectCountNV")
+ set_proc_address(&CmdDrawMeshTasksIndirectNV, "vkCmdDrawMeshTasksIndirectNV")
+ set_proc_address(&CmdDrawMeshTasksNV, "vkCmdDrawMeshTasksNV")
+ set_proc_address(&CmdDrawMultiEXT, "vkCmdDrawMultiEXT")
+ set_proc_address(&CmdDrawMultiIndexedEXT, "vkCmdDrawMultiIndexedEXT")
set_proc_address(&CmdEndConditionalRenderingEXT, "vkCmdEndConditionalRenderingEXT")
- set_proc_address(&CmdSetViewportWScalingNV, "vkCmdSetViewportWScalingNV")
- set_proc_address(&DisplayPowerControlEXT, "vkDisplayPowerControlEXT")
- set_proc_address(&RegisterDeviceEventEXT, "vkRegisterDeviceEventEXT")
- set_proc_address(&RegisterDisplayEventEXT, "vkRegisterDisplayEventEXT")
- set_proc_address(&GetSwapchainCounterEXT, "vkGetSwapchainCounterEXT")
- set_proc_address(&GetRefreshCycleDurationGOOGLE, "vkGetRefreshCycleDurationGOOGLE")
- set_proc_address(&GetPastPresentationTimingGOOGLE, "vkGetPastPresentationTimingGOOGLE")
- set_proc_address(&CmdSetDiscardRectangleEXT, "vkCmdSetDiscardRectangleEXT")
- set_proc_address(&SetHdrMetadataEXT, "vkSetHdrMetadataEXT")
- set_proc_address(&SetDebugUtilsObjectNameEXT, "vkSetDebugUtilsObjectNameEXT")
- set_proc_address(&SetDebugUtilsObjectTagEXT, "vkSetDebugUtilsObjectTagEXT")
- set_proc_address(&QueueBeginDebugUtilsLabelEXT, "vkQueueBeginDebugUtilsLabelEXT")
- set_proc_address(&QueueEndDebugUtilsLabelEXT, "vkQueueEndDebugUtilsLabelEXT")
- set_proc_address(&QueueInsertDebugUtilsLabelEXT, "vkQueueInsertDebugUtilsLabelEXT")
- set_proc_address(&CmdBeginDebugUtilsLabelEXT, "vkCmdBeginDebugUtilsLabelEXT")
set_proc_address(&CmdEndDebugUtilsLabelEXT, "vkCmdEndDebugUtilsLabelEXT")
+ set_proc_address(&CmdEndQuery, "vkCmdEndQuery")
+ set_proc_address(&CmdEndQueryIndexedEXT, "vkCmdEndQueryIndexedEXT")
+ set_proc_address(&CmdEndRenderPass, "vkCmdEndRenderPass")
+ set_proc_address(&CmdEndRenderPass2, "vkCmdEndRenderPass2")
+ set_proc_address(&CmdEndRenderPass2KHR, "vkCmdEndRenderPass2KHR")
+ set_proc_address(&CmdEndTransformFeedbackEXT, "vkCmdEndTransformFeedbackEXT")
+ set_proc_address(&CmdExecuteCommands, "vkCmdExecuteCommands")
+ set_proc_address(&CmdExecuteGeneratedCommandsNV, "vkCmdExecuteGeneratedCommandsNV")
+ set_proc_address(&CmdFillBuffer, "vkCmdFillBuffer")
set_proc_address(&CmdInsertDebugUtilsLabelEXT, "vkCmdInsertDebugUtilsLabelEXT")
- set_proc_address(&CmdSetSampleLocationsEXT, "vkCmdSetSampleLocationsEXT")
- set_proc_address(&GetImageDrmFormatModifierPropertiesEXT, "vkGetImageDrmFormatModifierPropertiesEXT")
- set_proc_address(&CreateValidationCacheEXT, "vkCreateValidationCacheEXT")
- set_proc_address(&DestroyValidationCacheEXT, "vkDestroyValidationCacheEXT")
- set_proc_address(&MergeValidationCachesEXT, "vkMergeValidationCachesEXT")
- set_proc_address(&GetValidationCacheDataEXT, "vkGetValidationCacheDataEXT")
- set_proc_address(&CmdBindShadingRateImageNV, "vkCmdBindShadingRateImageNV")
- set_proc_address(&CmdSetViewportShadingRatePaletteNV, "vkCmdSetViewportShadingRatePaletteNV")
+ set_proc_address(&CmdNextSubpass, "vkCmdNextSubpass")
+ set_proc_address(&CmdNextSubpass2, "vkCmdNextSubpass2")
+ set_proc_address(&CmdNextSubpass2KHR, "vkCmdNextSubpass2KHR")
+ set_proc_address(&CmdPipelineBarrier, "vkCmdPipelineBarrier")
+ set_proc_address(&CmdPipelineBarrier2KHR, "vkCmdPipelineBarrier2KHR")
+ set_proc_address(&CmdPreprocessGeneratedCommandsNV, "vkCmdPreprocessGeneratedCommandsNV")
+ set_proc_address(&CmdPushConstants, "vkCmdPushConstants")
+ set_proc_address(&CmdPushDescriptorSetKHR, "vkCmdPushDescriptorSetKHR")
+ set_proc_address(&CmdPushDescriptorSetWithTemplateKHR, "vkCmdPushDescriptorSetWithTemplateKHR")
+ set_proc_address(&CmdResetEvent, "vkCmdResetEvent")
+ set_proc_address(&CmdResetEvent2KHR, "vkCmdResetEvent2KHR")
+ set_proc_address(&CmdResetQueryPool, "vkCmdResetQueryPool")
+ set_proc_address(&CmdResolveImage, "vkCmdResolveImage")
+ set_proc_address(&CmdResolveImage2KHR, "vkCmdResolveImage2KHR")
+ set_proc_address(&CmdSetBlendConstants, "vkCmdSetBlendConstants")
+ set_proc_address(&CmdSetCheckpointNV, "vkCmdSetCheckpointNV")
set_proc_address(&CmdSetCoarseSampleOrderNV, "vkCmdSetCoarseSampleOrderNV")
- set_proc_address(&CreateAccelerationStructureNV, "vkCreateAccelerationStructureNV")
- set_proc_address(&DestroyAccelerationStructureNV, "vkDestroyAccelerationStructureNV")
- set_proc_address(&GetAccelerationStructureMemoryRequirementsNV, "vkGetAccelerationStructureMemoryRequirementsNV")
- set_proc_address(&BindAccelerationStructureMemoryNV, "vkBindAccelerationStructureMemoryNV")
- set_proc_address(&CmdBuildAccelerationStructureNV, "vkCmdBuildAccelerationStructureNV")
- set_proc_address(&CmdCopyAccelerationStructureNV, "vkCmdCopyAccelerationStructureNV")
- set_proc_address(&CmdTraceRaysNV, "vkCmdTraceRaysNV")
- set_proc_address(&CreateRayTracingPipelinesNV, "vkCreateRayTracingPipelinesNV")
- set_proc_address(&GetRayTracingShaderGroupHandlesKHR, "vkGetRayTracingShaderGroupHandlesKHR")
- set_proc_address(&GetRayTracingShaderGroupHandlesNV, "vkGetRayTracingShaderGroupHandlesNV")
- set_proc_address(&GetAccelerationStructureHandleNV, "vkGetAccelerationStructureHandleNV")
- set_proc_address(&CmdWriteAccelerationStructuresPropertiesNV, "vkCmdWriteAccelerationStructuresPropertiesNV")
- set_proc_address(&CompileDeferredNV, "vkCompileDeferredNV")
- set_proc_address(&GetMemoryHostPointerPropertiesEXT, "vkGetMemoryHostPointerPropertiesEXT")
- set_proc_address(&CmdWriteBufferMarkerAMD, "vkCmdWriteBufferMarkerAMD")
- set_proc_address(&GetCalibratedTimestampsEXT, "vkGetCalibratedTimestampsEXT")
- set_proc_address(&CmdDrawMeshTasksNV, "vkCmdDrawMeshTasksNV")
- set_proc_address(&CmdDrawMeshTasksIndirectNV, "vkCmdDrawMeshTasksIndirectNV")
- set_proc_address(&CmdDrawMeshTasksIndirectCountNV, "vkCmdDrawMeshTasksIndirectCountNV")
+ set_proc_address(&CmdSetCullModeEXT, "vkCmdSetCullModeEXT")
+ set_proc_address(&CmdSetDepthBias, "vkCmdSetDepthBias")
+ set_proc_address(&CmdSetDepthBiasEnableEXT, "vkCmdSetDepthBiasEnableEXT")
+ set_proc_address(&CmdSetDepthBounds, "vkCmdSetDepthBounds")
+ set_proc_address(&CmdSetDepthBoundsTestEnableEXT, "vkCmdSetDepthBoundsTestEnableEXT")
+ set_proc_address(&CmdSetDepthCompareOpEXT, "vkCmdSetDepthCompareOpEXT")
+ set_proc_address(&CmdSetDepthTestEnableEXT, "vkCmdSetDepthTestEnableEXT")
+ set_proc_address(&CmdSetDepthWriteEnableEXT, "vkCmdSetDepthWriteEnableEXT")
+ set_proc_address(&CmdSetDeviceMask, "vkCmdSetDeviceMask")
+ set_proc_address(&CmdSetDeviceMaskKHR, "vkCmdSetDeviceMaskKHR")
+ set_proc_address(&CmdSetDiscardRectangleEXT, "vkCmdSetDiscardRectangleEXT")
+ set_proc_address(&CmdSetEvent, "vkCmdSetEvent")
+ set_proc_address(&CmdSetEvent2KHR, "vkCmdSetEvent2KHR")
set_proc_address(&CmdSetExclusiveScissorNV, "vkCmdSetExclusiveScissorNV")
- set_proc_address(&CmdSetCheckpointNV, "vkCmdSetCheckpointNV")
- set_proc_address(&GetQueueCheckpointDataNV, "vkGetQueueCheckpointDataNV")
- set_proc_address(&InitializePerformanceApiINTEL, "vkInitializePerformanceApiINTEL")
- set_proc_address(&UninitializePerformanceApiINTEL, "vkUninitializePerformanceApiINTEL")
+ set_proc_address(&CmdSetFragmentShadingRateEnumNV, "vkCmdSetFragmentShadingRateEnumNV")
+ set_proc_address(&CmdSetFragmentShadingRateKHR, "vkCmdSetFragmentShadingRateKHR")
+ set_proc_address(&CmdSetFrontFaceEXT, "vkCmdSetFrontFaceEXT")
+ set_proc_address(&CmdSetLineStippleEXT, "vkCmdSetLineStippleEXT")
+ set_proc_address(&CmdSetLineWidth, "vkCmdSetLineWidth")
+ set_proc_address(&CmdSetLogicOpEXT, "vkCmdSetLogicOpEXT")
+ set_proc_address(&CmdSetPatchControlPointsEXT, "vkCmdSetPatchControlPointsEXT")
set_proc_address(&CmdSetPerformanceMarkerINTEL, "vkCmdSetPerformanceMarkerINTEL")
- set_proc_address(&CmdSetPerformanceStreamMarkerINTEL, "vkCmdSetPerformanceStreamMarkerINTEL")
set_proc_address(&CmdSetPerformanceOverrideINTEL, "vkCmdSetPerformanceOverrideINTEL")
- set_proc_address(&AcquirePerformanceConfigurationINTEL, "vkAcquirePerformanceConfigurationINTEL")
- set_proc_address(&ReleasePerformanceConfigurationINTEL, "vkReleasePerformanceConfigurationINTEL")
- set_proc_address(&QueueSetPerformanceConfigurationINTEL, "vkQueueSetPerformanceConfigurationINTEL")
- set_proc_address(&GetPerformanceParameterINTEL, "vkGetPerformanceParameterINTEL")
- set_proc_address(&SetLocalDimmingAMD, "vkSetLocalDimmingAMD")
- set_proc_address(&GetBufferDeviceAddressEXT, "vkGetBufferDeviceAddressEXT")
- set_proc_address(&CmdSetLineStippleEXT, "vkCmdSetLineStippleEXT")
- set_proc_address(&ResetQueryPoolEXT, "vkResetQueryPoolEXT")
- set_proc_address(&CmdSetCullModeEXT, "vkCmdSetCullModeEXT")
- set_proc_address(&CmdSetFrontFaceEXT, "vkCmdSetFrontFaceEXT")
+ set_proc_address(&CmdSetPerformanceStreamMarkerINTEL, "vkCmdSetPerformanceStreamMarkerINTEL")
+ set_proc_address(&CmdSetPrimitiveRestartEnableEXT, "vkCmdSetPrimitiveRestartEnableEXT")
set_proc_address(&CmdSetPrimitiveTopologyEXT, "vkCmdSetPrimitiveTopologyEXT")
- set_proc_address(&CmdSetViewportWithCountEXT, "vkCmdSetViewportWithCountEXT")
+ set_proc_address(&CmdSetRasterizerDiscardEnableEXT, "vkCmdSetRasterizerDiscardEnableEXT")
+ set_proc_address(&CmdSetRayTracingPipelineStackSizeKHR, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ set_proc_address(&CmdSetSampleLocationsEXT, "vkCmdSetSampleLocationsEXT")
+ set_proc_address(&CmdSetScissor, "vkCmdSetScissor")
set_proc_address(&CmdSetScissorWithCountEXT, "vkCmdSetScissorWithCountEXT")
- set_proc_address(&CmdBindVertexBuffers2EXT, "vkCmdBindVertexBuffers2EXT")
- set_proc_address(&CmdSetDepthTestEnableEXT, "vkCmdSetDepthTestEnableEXT")
- set_proc_address(&CmdSetDepthWriteEnableEXT, "vkCmdSetDepthWriteEnableEXT")
- set_proc_address(&CmdSetDepthCompareOpEXT, "vkCmdSetDepthCompareOpEXT")
- set_proc_address(&CmdSetDepthBoundsTestEnableEXT, "vkCmdSetDepthBoundsTestEnableEXT")
- set_proc_address(&CmdSetStencilTestEnableEXT, "vkCmdSetStencilTestEnableEXT")
+ set_proc_address(&CmdSetStencilCompareMask, "vkCmdSetStencilCompareMask")
set_proc_address(&CmdSetStencilOpEXT, "vkCmdSetStencilOpEXT")
- set_proc_address(&GetGeneratedCommandsMemoryRequirementsNV, "vkGetGeneratedCommandsMemoryRequirementsNV")
- set_proc_address(&CmdPreprocessGeneratedCommandsNV, "vkCmdPreprocessGeneratedCommandsNV")
- set_proc_address(&CmdExecuteGeneratedCommandsNV, "vkCmdExecuteGeneratedCommandsNV")
- set_proc_address(&CmdBindPipelineShaderGroupNV, "vkCmdBindPipelineShaderGroupNV")
- set_proc_address(&CreateIndirectCommandsLayoutNV, "vkCreateIndirectCommandsLayoutNV")
- set_proc_address(&DestroyIndirectCommandsLayoutNV, "vkDestroyIndirectCommandsLayoutNV")
- set_proc_address(&CreatePrivateDataSlotEXT, "vkCreatePrivateDataSlotEXT")
- set_proc_address(&DestroyPrivateDataSlotEXT, "vkDestroyPrivateDataSlotEXT")
- set_proc_address(&SetPrivateDataEXT, "vkSetPrivateDataEXT")
- set_proc_address(&GetPrivateDataEXT, "vkGetPrivateDataEXT")
- set_proc_address(&CmdSetFragmentShadingRateEnumNV, "vkCmdSetFragmentShadingRateEnumNV")
+ set_proc_address(&CmdSetStencilReference, "vkCmdSetStencilReference")
+ set_proc_address(&CmdSetStencilTestEnableEXT, "vkCmdSetStencilTestEnableEXT")
+ set_proc_address(&CmdSetStencilWriteMask, "vkCmdSetStencilWriteMask")
set_proc_address(&CmdSetVertexInputEXT, "vkCmdSetVertexInputEXT")
- set_proc_address(&GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
+ set_proc_address(&CmdSetViewport, "vkCmdSetViewport")
+ set_proc_address(&CmdSetViewportShadingRatePaletteNV, "vkCmdSetViewportShadingRatePaletteNV")
+ set_proc_address(&CmdSetViewportWScalingNV, "vkCmdSetViewportWScalingNV")
+ set_proc_address(&CmdSetViewportWithCountEXT, "vkCmdSetViewportWithCountEXT")
set_proc_address(&CmdSubpassShadingHUAWEI, "vkCmdSubpassShadingHUAWEI")
- set_proc_address(&CmdBindInvocationMaskHUAWEI, "vkCmdBindInvocationMaskHUAWEI")
- set_proc_address(&GetMemoryRemoteAddressNV, "vkGetMemoryRemoteAddressNV")
- set_proc_address(&CmdSetPatchControlPointsEXT, "vkCmdSetPatchControlPointsEXT")
- set_proc_address(&CmdSetRasterizerDiscardEnableEXT, "vkCmdSetRasterizerDiscardEnableEXT")
- set_proc_address(&CmdSetDepthBiasEnableEXT, "vkCmdSetDepthBiasEnableEXT")
- set_proc_address(&CmdSetLogicOpEXT, "vkCmdSetLogicOpEXT")
- set_proc_address(&CmdSetPrimitiveRestartEnableEXT, "vkCmdSetPrimitiveRestartEnableEXT")
- set_proc_address(&CmdDrawMultiEXT, "vkCmdDrawMultiEXT")
- set_proc_address(&CmdDrawMultiIndexedEXT, "vkCmdDrawMultiIndexedEXT")
- set_proc_address(&SetDeviceMemoryPriorityEXT, "vkSetDeviceMemoryPriorityEXT")
- set_proc_address(&CreateAccelerationStructureKHR, "vkCreateAccelerationStructureKHR")
- set_proc_address(&DestroyAccelerationStructureKHR, "vkDestroyAccelerationStructureKHR")
- set_proc_address(&CmdBuildAccelerationStructuresKHR, "vkCmdBuildAccelerationStructuresKHR")
- set_proc_address(&CmdBuildAccelerationStructuresIndirectKHR, "vkCmdBuildAccelerationStructuresIndirectKHR")
- set_proc_address(&BuildAccelerationStructuresKHR, "vkBuildAccelerationStructuresKHR")
+ set_proc_address(&CmdTraceRaysIndirectKHR, "vkCmdTraceRaysIndirectKHR")
+ set_proc_address(&CmdTraceRaysKHR, "vkCmdTraceRaysKHR")
+ set_proc_address(&CmdTraceRaysNV, "vkCmdTraceRaysNV")
+ set_proc_address(&CmdUpdateBuffer, "vkCmdUpdateBuffer")
+ set_proc_address(&CmdWaitEvents, "vkCmdWaitEvents")
+ set_proc_address(&CmdWaitEvents2KHR, "vkCmdWaitEvents2KHR")
+ set_proc_address(&CmdWriteAccelerationStructuresPropertiesKHR, "vkCmdWriteAccelerationStructuresPropertiesKHR")
+ set_proc_address(&CmdWriteAccelerationStructuresPropertiesNV, "vkCmdWriteAccelerationStructuresPropertiesNV")
+ set_proc_address(&CmdWriteBufferMarker2AMD, "vkCmdWriteBufferMarker2AMD")
+ set_proc_address(&CmdWriteBufferMarkerAMD, "vkCmdWriteBufferMarkerAMD")
+ set_proc_address(&CmdWriteTimestamp, "vkCmdWriteTimestamp")
+ set_proc_address(&CmdWriteTimestamp2KHR, "vkCmdWriteTimestamp2KHR")
+ set_proc_address(&CompileDeferredNV, "vkCompileDeferredNV")
set_proc_address(&CopyAccelerationStructureKHR, "vkCopyAccelerationStructureKHR")
set_proc_address(&CopyAccelerationStructureToMemoryKHR, "vkCopyAccelerationStructureToMemoryKHR")
set_proc_address(&CopyMemoryToAccelerationStructureKHR, "vkCopyMemoryToAccelerationStructureKHR")
- set_proc_address(&WriteAccelerationStructuresPropertiesKHR, "vkWriteAccelerationStructuresPropertiesKHR")
- set_proc_address(&CmdCopyAccelerationStructureKHR, "vkCmdCopyAccelerationStructureKHR")
- set_proc_address(&CmdCopyAccelerationStructureToMemoryKHR, "vkCmdCopyAccelerationStructureToMemoryKHR")
- set_proc_address(&CmdCopyMemoryToAccelerationStructureKHR, "vkCmdCopyMemoryToAccelerationStructureKHR")
+ set_proc_address(&CreateAccelerationStructureKHR, "vkCreateAccelerationStructureKHR")
+ set_proc_address(&CreateAccelerationStructureNV, "vkCreateAccelerationStructureNV")
+ set_proc_address(&CreateBuffer, "vkCreateBuffer")
+ set_proc_address(&CreateBufferView, "vkCreateBufferView")
+ set_proc_address(&CreateCommandPool, "vkCreateCommandPool")
+ set_proc_address(&CreateComputePipelines, "vkCreateComputePipelines")
+ set_proc_address(&CreateCuFunctionNVX, "vkCreateCuFunctionNVX")
+ set_proc_address(&CreateCuModuleNVX, "vkCreateCuModuleNVX")
+ set_proc_address(&CreateDeferredOperationKHR, "vkCreateDeferredOperationKHR")
+ set_proc_address(&CreateDescriptorPool, "vkCreateDescriptorPool")
+ set_proc_address(&CreateDescriptorSetLayout, "vkCreateDescriptorSetLayout")
+ set_proc_address(&CreateDescriptorUpdateTemplate, "vkCreateDescriptorUpdateTemplate")
+ set_proc_address(&CreateDescriptorUpdateTemplateKHR, "vkCreateDescriptorUpdateTemplateKHR")
+ set_proc_address(&CreateEvent, "vkCreateEvent")
+ set_proc_address(&CreateFence, "vkCreateFence")
+ set_proc_address(&CreateFramebuffer, "vkCreateFramebuffer")
+ set_proc_address(&CreateGraphicsPipelines, "vkCreateGraphicsPipelines")
+ set_proc_address(&CreateImage, "vkCreateImage")
+ set_proc_address(&CreateImageView, "vkCreateImageView")
+ set_proc_address(&CreateIndirectCommandsLayoutNV, "vkCreateIndirectCommandsLayoutNV")
+ set_proc_address(&CreatePipelineCache, "vkCreatePipelineCache")
+ set_proc_address(&CreatePipelineLayout, "vkCreatePipelineLayout")
+ set_proc_address(&CreatePrivateDataSlotEXT, "vkCreatePrivateDataSlotEXT")
+ set_proc_address(&CreateQueryPool, "vkCreateQueryPool")
+ set_proc_address(&CreateRayTracingPipelinesKHR, "vkCreateRayTracingPipelinesKHR")
+ set_proc_address(&CreateRayTracingPipelinesNV, "vkCreateRayTracingPipelinesNV")
+ set_proc_address(&CreateRenderPass, "vkCreateRenderPass")
+ set_proc_address(&CreateRenderPass2, "vkCreateRenderPass2")
+ set_proc_address(&CreateRenderPass2KHR, "vkCreateRenderPass2KHR")
+ set_proc_address(&CreateSampler, "vkCreateSampler")
+ set_proc_address(&CreateSamplerYcbcrConversion, "vkCreateSamplerYcbcrConversion")
+ set_proc_address(&CreateSamplerYcbcrConversionKHR, "vkCreateSamplerYcbcrConversionKHR")
+ set_proc_address(&CreateSemaphore, "vkCreateSemaphore")
+ set_proc_address(&CreateShaderModule, "vkCreateShaderModule")
+ set_proc_address(&CreateSharedSwapchainsKHR, "vkCreateSharedSwapchainsKHR")
+ set_proc_address(&CreateSwapchainKHR, "vkCreateSwapchainKHR")
+ set_proc_address(&CreateValidationCacheEXT, "vkCreateValidationCacheEXT")
+ set_proc_address(&DebugMarkerSetObjectNameEXT, "vkDebugMarkerSetObjectNameEXT")
+ set_proc_address(&DebugMarkerSetObjectTagEXT, "vkDebugMarkerSetObjectTagEXT")
+ set_proc_address(&DeferredOperationJoinKHR, "vkDeferredOperationJoinKHR")
+ set_proc_address(&DestroyAccelerationStructureKHR, "vkDestroyAccelerationStructureKHR")
+ set_proc_address(&DestroyAccelerationStructureNV, "vkDestroyAccelerationStructureNV")
+ set_proc_address(&DestroyBuffer, "vkDestroyBuffer")
+ set_proc_address(&DestroyBufferView, "vkDestroyBufferView")
+ set_proc_address(&DestroyCommandPool, "vkDestroyCommandPool")
+ set_proc_address(&DestroyCuFunctionNVX, "vkDestroyCuFunctionNVX")
+ set_proc_address(&DestroyCuModuleNVX, "vkDestroyCuModuleNVX")
+ set_proc_address(&DestroyDeferredOperationKHR, "vkDestroyDeferredOperationKHR")
+ set_proc_address(&DestroyDescriptorPool, "vkDestroyDescriptorPool")
+ set_proc_address(&DestroyDescriptorSetLayout, "vkDestroyDescriptorSetLayout")
+ set_proc_address(&DestroyDescriptorUpdateTemplate, "vkDestroyDescriptorUpdateTemplate")
+ set_proc_address(&DestroyDescriptorUpdateTemplateKHR, "vkDestroyDescriptorUpdateTemplateKHR")
+ set_proc_address(&DestroyDevice, "vkDestroyDevice")
+ set_proc_address(&DestroyEvent, "vkDestroyEvent")
+ set_proc_address(&DestroyFence, "vkDestroyFence")
+ set_proc_address(&DestroyFramebuffer, "vkDestroyFramebuffer")
+ set_proc_address(&DestroyImage, "vkDestroyImage")
+ set_proc_address(&DestroyImageView, "vkDestroyImageView")
+ set_proc_address(&DestroyIndirectCommandsLayoutNV, "vkDestroyIndirectCommandsLayoutNV")
+ set_proc_address(&DestroyPipeline, "vkDestroyPipeline")
+ set_proc_address(&DestroyPipelineCache, "vkDestroyPipelineCache")
+ set_proc_address(&DestroyPipelineLayout, "vkDestroyPipelineLayout")
+ set_proc_address(&DestroyPrivateDataSlotEXT, "vkDestroyPrivateDataSlotEXT")
+ set_proc_address(&DestroyQueryPool, "vkDestroyQueryPool")
+ set_proc_address(&DestroyRenderPass, "vkDestroyRenderPass")
+ set_proc_address(&DestroySampler, "vkDestroySampler")
+ set_proc_address(&DestroySamplerYcbcrConversion, "vkDestroySamplerYcbcrConversion")
+ set_proc_address(&DestroySamplerYcbcrConversionKHR, "vkDestroySamplerYcbcrConversionKHR")
+ set_proc_address(&DestroySemaphore, "vkDestroySemaphore")
+ set_proc_address(&DestroyShaderModule, "vkDestroyShaderModule")
+ set_proc_address(&DestroySwapchainKHR, "vkDestroySwapchainKHR")
+ set_proc_address(&DestroyValidationCacheEXT, "vkDestroyValidationCacheEXT")
+ set_proc_address(&DeviceWaitIdle, "vkDeviceWaitIdle")
+ set_proc_address(&DisplayPowerControlEXT, "vkDisplayPowerControlEXT")
+ set_proc_address(&EndCommandBuffer, "vkEndCommandBuffer")
+ set_proc_address(&FlushMappedMemoryRanges, "vkFlushMappedMemoryRanges")
+ set_proc_address(&FreeCommandBuffers, "vkFreeCommandBuffers")
+ set_proc_address(&FreeDescriptorSets, "vkFreeDescriptorSets")
+ set_proc_address(&FreeMemory, "vkFreeMemory")
+ set_proc_address(&GetAccelerationStructureBuildSizesKHR, "vkGetAccelerationStructureBuildSizesKHR")
set_proc_address(&GetAccelerationStructureDeviceAddressKHR, "vkGetAccelerationStructureDeviceAddressKHR")
- set_proc_address(&CmdWriteAccelerationStructuresPropertiesKHR, "vkCmdWriteAccelerationStructuresPropertiesKHR")
+ set_proc_address(&GetAccelerationStructureHandleNV, "vkGetAccelerationStructureHandleNV")
+ set_proc_address(&GetAccelerationStructureMemoryRequirementsNV, "vkGetAccelerationStructureMemoryRequirementsNV")
+ set_proc_address(&GetBufferDeviceAddress, "vkGetBufferDeviceAddress")
+ set_proc_address(&GetBufferDeviceAddressEXT, "vkGetBufferDeviceAddressEXT")
+ set_proc_address(&GetBufferDeviceAddressKHR, "vkGetBufferDeviceAddressKHR")
+ set_proc_address(&GetBufferMemoryRequirements, "vkGetBufferMemoryRequirements")
+ set_proc_address(&GetBufferMemoryRequirements2, "vkGetBufferMemoryRequirements2")
+ set_proc_address(&GetBufferMemoryRequirements2KHR, "vkGetBufferMemoryRequirements2KHR")
+ set_proc_address(&GetBufferOpaqueCaptureAddress, "vkGetBufferOpaqueCaptureAddress")
+ set_proc_address(&GetBufferOpaqueCaptureAddressKHR, "vkGetBufferOpaqueCaptureAddressKHR")
+ set_proc_address(&GetCalibratedTimestampsEXT, "vkGetCalibratedTimestampsEXT")
+ set_proc_address(&GetDeferredOperationMaxConcurrencyKHR, "vkGetDeferredOperationMaxConcurrencyKHR")
+ set_proc_address(&GetDeferredOperationResultKHR, "vkGetDeferredOperationResultKHR")
+ set_proc_address(&GetDescriptorSetLayoutSupport, "vkGetDescriptorSetLayoutSupport")
+ set_proc_address(&GetDescriptorSetLayoutSupportKHR, "vkGetDescriptorSetLayoutSupportKHR")
set_proc_address(&GetDeviceAccelerationStructureCompatibilityKHR, "vkGetDeviceAccelerationStructureCompatibilityKHR")
- set_proc_address(&GetAccelerationStructureBuildSizesKHR, "vkGetAccelerationStructureBuildSizesKHR")
- set_proc_address(&CmdTraceRaysKHR, "vkCmdTraceRaysKHR")
- set_proc_address(&CreateRayTracingPipelinesKHR, "vkCreateRayTracingPipelinesKHR")
- set_proc_address(&GetRayTracingCaptureReplayShaderGroupHandlesKHR, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR")
- set_proc_address(&CmdTraceRaysIndirectKHR, "vkCmdTraceRaysIndirectKHR")
- set_proc_address(&GetRayTracingShaderGroupStackSizeKHR, "vkGetRayTracingShaderGroupStackSizeKHR")
- set_proc_address(&CmdSetRayTracingPipelineStackSizeKHR, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ set_proc_address(&GetDeviceGroupPeerMemoryFeatures, "vkGetDeviceGroupPeerMemoryFeatures")
+ set_proc_address(&GetDeviceGroupPeerMemoryFeaturesKHR, "vkGetDeviceGroupPeerMemoryFeaturesKHR")
+ set_proc_address(&GetDeviceGroupPresentCapabilitiesKHR, "vkGetDeviceGroupPresentCapabilitiesKHR")
+ set_proc_address(&GetDeviceGroupSurfacePresentModes2EXT, "vkGetDeviceGroupSurfacePresentModes2EXT")
+ set_proc_address(&GetDeviceGroupSurfacePresentModesKHR, "vkGetDeviceGroupSurfacePresentModesKHR")
+ set_proc_address(&GetDeviceMemoryCommitment, "vkGetDeviceMemoryCommitment")
+ set_proc_address(&GetDeviceMemoryOpaqueCaptureAddress, "vkGetDeviceMemoryOpaqueCaptureAddress")
+ set_proc_address(&GetDeviceMemoryOpaqueCaptureAddressKHR, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
+ set_proc_address(&GetDeviceProcAddr, "vkGetDeviceProcAddr")
+ set_proc_address(&GetDeviceQueue, "vkGetDeviceQueue")
+ set_proc_address(&GetDeviceQueue2, "vkGetDeviceQueue2")
+ set_proc_address(&GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
+ set_proc_address(&GetEventStatus, "vkGetEventStatus")
+ set_proc_address(&GetFenceFdKHR, "vkGetFenceFdKHR")
+ set_proc_address(&GetFenceStatus, "vkGetFenceStatus")
+ set_proc_address(&GetFenceWin32HandleKHR, "vkGetFenceWin32HandleKHR")
+ set_proc_address(&GetGeneratedCommandsMemoryRequirementsNV, "vkGetGeneratedCommandsMemoryRequirementsNV")
+ set_proc_address(&GetImageDrmFormatModifierPropertiesEXT, "vkGetImageDrmFormatModifierPropertiesEXT")
+ set_proc_address(&GetImageMemoryRequirements, "vkGetImageMemoryRequirements")
+ set_proc_address(&GetImageMemoryRequirements2, "vkGetImageMemoryRequirements2")
+ set_proc_address(&GetImageMemoryRequirements2KHR, "vkGetImageMemoryRequirements2KHR")
+ set_proc_address(&GetImageSparseMemoryRequirements, "vkGetImageSparseMemoryRequirements")
+ set_proc_address(&GetImageSparseMemoryRequirements2, "vkGetImageSparseMemoryRequirements2")
+ set_proc_address(&GetImageSparseMemoryRequirements2KHR, "vkGetImageSparseMemoryRequirements2KHR")
+ set_proc_address(&GetImageSubresourceLayout, "vkGetImageSubresourceLayout")
+ set_proc_address(&GetImageViewAddressNVX, "vkGetImageViewAddressNVX")
+ set_proc_address(&GetImageViewHandleNVX, "vkGetImageViewHandleNVX")
+ set_proc_address(&GetMemoryFdKHR, "vkGetMemoryFdKHR")
+ set_proc_address(&GetMemoryFdPropertiesKHR, "vkGetMemoryFdPropertiesKHR")
+ set_proc_address(&GetMemoryHostPointerPropertiesEXT, "vkGetMemoryHostPointerPropertiesEXT")
+ set_proc_address(&GetMemoryRemoteAddressNV, "vkGetMemoryRemoteAddressNV")
set_proc_address(&GetMemoryWin32HandleKHR, "vkGetMemoryWin32HandleKHR")
+ set_proc_address(&GetMemoryWin32HandleNV, "vkGetMemoryWin32HandleNV")
set_proc_address(&GetMemoryWin32HandlePropertiesKHR, "vkGetMemoryWin32HandlePropertiesKHR")
- set_proc_address(&ImportSemaphoreWin32HandleKHR, "vkImportSemaphoreWin32HandleKHR")
+ set_proc_address(&GetPastPresentationTimingGOOGLE, "vkGetPastPresentationTimingGOOGLE")
+ set_proc_address(&GetPerformanceParameterINTEL, "vkGetPerformanceParameterINTEL")
+ set_proc_address(&GetPipelineCacheData, "vkGetPipelineCacheData")
+ set_proc_address(&GetPipelineExecutableInternalRepresentationsKHR, "vkGetPipelineExecutableInternalRepresentationsKHR")
+ set_proc_address(&GetPipelineExecutablePropertiesKHR, "vkGetPipelineExecutablePropertiesKHR")
+ set_proc_address(&GetPipelineExecutableStatisticsKHR, "vkGetPipelineExecutableStatisticsKHR")
+ set_proc_address(&GetPrivateDataEXT, "vkGetPrivateDataEXT")
+ set_proc_address(&GetQueryPoolResults, "vkGetQueryPoolResults")
+ set_proc_address(&GetQueueCheckpointData2NV, "vkGetQueueCheckpointData2NV")
+ set_proc_address(&GetQueueCheckpointDataNV, "vkGetQueueCheckpointDataNV")
+ set_proc_address(&GetRayTracingCaptureReplayShaderGroupHandlesKHR, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR")
+ set_proc_address(&GetRayTracingShaderGroupHandlesKHR, "vkGetRayTracingShaderGroupHandlesKHR")
+ set_proc_address(&GetRayTracingShaderGroupHandlesNV, "vkGetRayTracingShaderGroupHandlesNV")
+ set_proc_address(&GetRayTracingShaderGroupStackSizeKHR, "vkGetRayTracingShaderGroupStackSizeKHR")
+ set_proc_address(&GetRefreshCycleDurationGOOGLE, "vkGetRefreshCycleDurationGOOGLE")
+ set_proc_address(&GetRenderAreaGranularity, "vkGetRenderAreaGranularity")
+ set_proc_address(&GetSemaphoreCounterValue, "vkGetSemaphoreCounterValue")
+ set_proc_address(&GetSemaphoreCounterValueKHR, "vkGetSemaphoreCounterValueKHR")
+ set_proc_address(&GetSemaphoreFdKHR, "vkGetSemaphoreFdKHR")
set_proc_address(&GetSemaphoreWin32HandleKHR, "vkGetSemaphoreWin32HandleKHR")
+ set_proc_address(&GetShaderInfoAMD, "vkGetShaderInfoAMD")
+ set_proc_address(&GetSwapchainCounterEXT, "vkGetSwapchainCounterEXT")
+ set_proc_address(&GetSwapchainImagesKHR, "vkGetSwapchainImagesKHR")
+ set_proc_address(&GetSwapchainStatusKHR, "vkGetSwapchainStatusKHR")
+ set_proc_address(&GetValidationCacheDataEXT, "vkGetValidationCacheDataEXT")
+ set_proc_address(&ImportFenceFdKHR, "vkImportFenceFdKHR")
set_proc_address(&ImportFenceWin32HandleKHR, "vkImportFenceWin32HandleKHR")
- set_proc_address(&GetFenceWin32HandleKHR, "vkGetFenceWin32HandleKHR")
- set_proc_address(&GetMemoryWin32HandleNV, "vkGetMemoryWin32HandleNV")
- set_proc_address(&AcquireFullScreenExclusiveModeEXT, "vkAcquireFullScreenExclusiveModeEXT")
+ set_proc_address(&ImportSemaphoreFdKHR, "vkImportSemaphoreFdKHR")
+ set_proc_address(&ImportSemaphoreWin32HandleKHR, "vkImportSemaphoreWin32HandleKHR")
+ set_proc_address(&InitializePerformanceApiINTEL, "vkInitializePerformanceApiINTEL")
+ set_proc_address(&InvalidateMappedMemoryRanges, "vkInvalidateMappedMemoryRanges")
+ set_proc_address(&MapMemory, "vkMapMemory")
+ set_proc_address(&MergePipelineCaches, "vkMergePipelineCaches")
+ set_proc_address(&MergeValidationCachesEXT, "vkMergeValidationCachesEXT")
+ set_proc_address(&QueueBeginDebugUtilsLabelEXT, "vkQueueBeginDebugUtilsLabelEXT")
+ set_proc_address(&QueueBindSparse, "vkQueueBindSparse")
+ set_proc_address(&QueueEndDebugUtilsLabelEXT, "vkQueueEndDebugUtilsLabelEXT")
+ set_proc_address(&QueueInsertDebugUtilsLabelEXT, "vkQueueInsertDebugUtilsLabelEXT")
+ set_proc_address(&QueuePresentKHR, "vkQueuePresentKHR")
+ set_proc_address(&QueueSetPerformanceConfigurationINTEL, "vkQueueSetPerformanceConfigurationINTEL")
+ set_proc_address(&QueueSubmit, "vkQueueSubmit")
+ set_proc_address(&QueueSubmit2KHR, "vkQueueSubmit2KHR")
+ set_proc_address(&QueueWaitIdle, "vkQueueWaitIdle")
+ set_proc_address(&RegisterDeviceEventEXT, "vkRegisterDeviceEventEXT")
+ set_proc_address(&RegisterDisplayEventEXT, "vkRegisterDisplayEventEXT")
set_proc_address(&ReleaseFullScreenExclusiveModeEXT, "vkReleaseFullScreenExclusiveModeEXT")
- set_proc_address(&GetDeviceGroupSurfacePresentModes2EXT, "vkGetDeviceGroupSurfacePresentModes2EXT")
+ set_proc_address(&ReleasePerformanceConfigurationINTEL, "vkReleasePerformanceConfigurationINTEL")
+ set_proc_address(&ReleaseProfilingLockKHR, "vkReleaseProfilingLockKHR")
+ set_proc_address(&ResetCommandBuffer, "vkResetCommandBuffer")
+ set_proc_address(&ResetCommandPool, "vkResetCommandPool")
+ set_proc_address(&ResetDescriptorPool, "vkResetDescriptorPool")
+ set_proc_address(&ResetEvent, "vkResetEvent")
+ set_proc_address(&ResetFences, "vkResetFences")
+ set_proc_address(&ResetQueryPool, "vkResetQueryPool")
+ set_proc_address(&ResetQueryPoolEXT, "vkResetQueryPoolEXT")
+ set_proc_address(&SetDebugUtilsObjectNameEXT, "vkSetDebugUtilsObjectNameEXT")
+ set_proc_address(&SetDebugUtilsObjectTagEXT, "vkSetDebugUtilsObjectTagEXT")
+ set_proc_address(&SetDeviceMemoryPriorityEXT, "vkSetDeviceMemoryPriorityEXT")
+ set_proc_address(&SetEvent, "vkSetEvent")
+ set_proc_address(&SetHdrMetadataEXT, "vkSetHdrMetadataEXT")
+ set_proc_address(&SetLocalDimmingAMD, "vkSetLocalDimmingAMD")
+ set_proc_address(&SetPrivateDataEXT, "vkSetPrivateDataEXT")
+ set_proc_address(&SignalSemaphore, "vkSignalSemaphore")
+ set_proc_address(&SignalSemaphoreKHR, "vkSignalSemaphoreKHR")
+ set_proc_address(&TrimCommandPool, "vkTrimCommandPool")
+ set_proc_address(&TrimCommandPoolKHR, "vkTrimCommandPoolKHR")
+ set_proc_address(&UninitializePerformanceApiINTEL, "vkUninitializePerformanceApiINTEL")
+ set_proc_address(&UnmapMemory, "vkUnmapMemory")
+ set_proc_address(&UpdateDescriptorSetWithTemplate, "vkUpdateDescriptorSetWithTemplate")
+ set_proc_address(&UpdateDescriptorSetWithTemplateKHR, "vkUpdateDescriptorSetWithTemplateKHR")
+ set_proc_address(&UpdateDescriptorSets, "vkUpdateDescriptorSets")
+ set_proc_address(&WaitForFences, "vkWaitForFences")
+ set_proc_address(&WaitForPresentKHR, "vkWaitForPresentKHR")
+ set_proc_address(&WaitSemaphores, "vkWaitSemaphores")
+ set_proc_address(&WaitSemaphoresKHR, "vkWaitSemaphoresKHR")
+ set_proc_address(&WriteAccelerationStructuresPropertiesKHR, "vkWriteAccelerationStructuresPropertiesKHR")
- // Loader Procedures
- set_proc_address(&CreateInstance, "vkCreateInstance")
- set_proc_address(&EnumerateInstanceExtensionProperties, "vkEnumerateInstanceExtensionProperties")
- set_proc_address(&EnumerateInstanceLayerProperties, "vkEnumerateInstanceLayerProperties")
- set_proc_address(&EnumerateInstanceVersion, "vkEnumerateInstanceVersion")
- set_proc_address(&DebugUtilsMessengerCallbackEXT, "vkDebugUtilsMessengerCallbackEXT")
- set_proc_address(&DeviceMemoryReportCallbackEXT, "vkDeviceMemoryReportCallbackEXT")
+}
+
+// Device Procedure VTable
+Device_VTable :: struct {
+ AcquireFullScreenExclusiveModeEXT: ProcAcquireFullScreenExclusiveModeEXT,
+ AcquireNextImage2KHR: ProcAcquireNextImage2KHR,
+ AcquireNextImageKHR: ProcAcquireNextImageKHR,
+ AcquirePerformanceConfigurationINTEL: ProcAcquirePerformanceConfigurationINTEL,
+ AcquireProfilingLockKHR: ProcAcquireProfilingLockKHR,
+ AllocateCommandBuffers: ProcAllocateCommandBuffers,
+ AllocateDescriptorSets: ProcAllocateDescriptorSets,
+ AllocateMemory: ProcAllocateMemory,
+ BeginCommandBuffer: ProcBeginCommandBuffer,
+ BindAccelerationStructureMemoryNV: ProcBindAccelerationStructureMemoryNV,
+ BindBufferMemory: ProcBindBufferMemory,
+ BindBufferMemory2: ProcBindBufferMemory2,
+ BindBufferMemory2KHR: ProcBindBufferMemory2KHR,
+ BindImageMemory: ProcBindImageMemory,
+ BindImageMemory2: ProcBindImageMemory2,
+ BindImageMemory2KHR: ProcBindImageMemory2KHR,
+ BuildAccelerationStructuresKHR: ProcBuildAccelerationStructuresKHR,
+ CmdBeginConditionalRenderingEXT: ProcCmdBeginConditionalRenderingEXT,
+ CmdBeginDebugUtilsLabelEXT: ProcCmdBeginDebugUtilsLabelEXT,
+ CmdBeginQuery: ProcCmdBeginQuery,
+ CmdBeginQueryIndexedEXT: ProcCmdBeginQueryIndexedEXT,
+ CmdBeginRenderPass: ProcCmdBeginRenderPass,
+ CmdBeginRenderPass2: ProcCmdBeginRenderPass2,
+ CmdBeginRenderPass2KHR: ProcCmdBeginRenderPass2KHR,
+ CmdBeginTransformFeedbackEXT: ProcCmdBeginTransformFeedbackEXT,
+ CmdBindDescriptorSets: ProcCmdBindDescriptorSets,
+ CmdBindIndexBuffer: ProcCmdBindIndexBuffer,
+ CmdBindInvocationMaskHUAWEI: ProcCmdBindInvocationMaskHUAWEI,
+ CmdBindPipeline: ProcCmdBindPipeline,
+ CmdBindPipelineShaderGroupNV: ProcCmdBindPipelineShaderGroupNV,
+ CmdBindShadingRateImageNV: ProcCmdBindShadingRateImageNV,
+ CmdBindTransformFeedbackBuffersEXT: ProcCmdBindTransformFeedbackBuffersEXT,
+ CmdBindVertexBuffers: ProcCmdBindVertexBuffers,
+ CmdBindVertexBuffers2EXT: ProcCmdBindVertexBuffers2EXT,
+ CmdBlitImage: ProcCmdBlitImage,
+ CmdBlitImage2KHR: ProcCmdBlitImage2KHR,
+ CmdBuildAccelerationStructureNV: ProcCmdBuildAccelerationStructureNV,
+ CmdBuildAccelerationStructuresIndirectKHR: ProcCmdBuildAccelerationStructuresIndirectKHR,
+ CmdBuildAccelerationStructuresKHR: ProcCmdBuildAccelerationStructuresKHR,
+ CmdClearAttachments: ProcCmdClearAttachments,
+ CmdClearColorImage: ProcCmdClearColorImage,
+ CmdClearDepthStencilImage: ProcCmdClearDepthStencilImage,
+ CmdCopyAccelerationStructureKHR: ProcCmdCopyAccelerationStructureKHR,
+ CmdCopyAccelerationStructureNV: ProcCmdCopyAccelerationStructureNV,
+ CmdCopyAccelerationStructureToMemoryKHR: ProcCmdCopyAccelerationStructureToMemoryKHR,
+ CmdCopyBuffer: ProcCmdCopyBuffer,
+ CmdCopyBuffer2KHR: ProcCmdCopyBuffer2KHR,
+ CmdCopyBufferToImage: ProcCmdCopyBufferToImage,
+ CmdCopyBufferToImage2KHR: ProcCmdCopyBufferToImage2KHR,
+ CmdCopyImage: ProcCmdCopyImage,
+ CmdCopyImage2KHR: ProcCmdCopyImage2KHR,
+ CmdCopyImageToBuffer: ProcCmdCopyImageToBuffer,
+ CmdCopyImageToBuffer2KHR: ProcCmdCopyImageToBuffer2KHR,
+ CmdCopyMemoryToAccelerationStructureKHR: ProcCmdCopyMemoryToAccelerationStructureKHR,
+ CmdCopyQueryPoolResults: ProcCmdCopyQueryPoolResults,
+ CmdCuLaunchKernelNVX: ProcCmdCuLaunchKernelNVX,
+ CmdDebugMarkerBeginEXT: ProcCmdDebugMarkerBeginEXT,
+ CmdDebugMarkerEndEXT: ProcCmdDebugMarkerEndEXT,
+ CmdDebugMarkerInsertEXT: ProcCmdDebugMarkerInsertEXT,
+ CmdDispatch: ProcCmdDispatch,
+ CmdDispatchBase: ProcCmdDispatchBase,
+ CmdDispatchBaseKHR: ProcCmdDispatchBaseKHR,
+ CmdDispatchIndirect: ProcCmdDispatchIndirect,
+ CmdDraw: ProcCmdDraw,
+ CmdDrawIndexed: ProcCmdDrawIndexed,
+ CmdDrawIndexedIndirect: ProcCmdDrawIndexedIndirect,
+ CmdDrawIndexedIndirectCount: ProcCmdDrawIndexedIndirectCount,
+ CmdDrawIndexedIndirectCountAMD: ProcCmdDrawIndexedIndirectCountAMD,
+ CmdDrawIndexedIndirectCountKHR: ProcCmdDrawIndexedIndirectCountKHR,
+ CmdDrawIndirect: ProcCmdDrawIndirect,
+ CmdDrawIndirectByteCountEXT: ProcCmdDrawIndirectByteCountEXT,
+ CmdDrawIndirectCount: ProcCmdDrawIndirectCount,
+ CmdDrawIndirectCountAMD: ProcCmdDrawIndirectCountAMD,
+ CmdDrawIndirectCountKHR: ProcCmdDrawIndirectCountKHR,
+ CmdDrawMeshTasksIndirectCountNV: ProcCmdDrawMeshTasksIndirectCountNV,
+ CmdDrawMeshTasksIndirectNV: ProcCmdDrawMeshTasksIndirectNV,
+ CmdDrawMeshTasksNV: ProcCmdDrawMeshTasksNV,
+ CmdDrawMultiEXT: ProcCmdDrawMultiEXT,
+ CmdDrawMultiIndexedEXT: ProcCmdDrawMultiIndexedEXT,
+ CmdEndConditionalRenderingEXT: ProcCmdEndConditionalRenderingEXT,
+ CmdEndDebugUtilsLabelEXT: ProcCmdEndDebugUtilsLabelEXT,
+ CmdEndQuery: ProcCmdEndQuery,
+ CmdEndQueryIndexedEXT: ProcCmdEndQueryIndexedEXT,
+ CmdEndRenderPass: ProcCmdEndRenderPass,
+ CmdEndRenderPass2: ProcCmdEndRenderPass2,
+ CmdEndRenderPass2KHR: ProcCmdEndRenderPass2KHR,
+ CmdEndTransformFeedbackEXT: ProcCmdEndTransformFeedbackEXT,
+ CmdExecuteCommands: ProcCmdExecuteCommands,
+ CmdExecuteGeneratedCommandsNV: ProcCmdExecuteGeneratedCommandsNV,
+ CmdFillBuffer: ProcCmdFillBuffer,
+ CmdInsertDebugUtilsLabelEXT: ProcCmdInsertDebugUtilsLabelEXT,
+ CmdNextSubpass: ProcCmdNextSubpass,
+ CmdNextSubpass2: ProcCmdNextSubpass2,
+ CmdNextSubpass2KHR: ProcCmdNextSubpass2KHR,
+ CmdPipelineBarrier: ProcCmdPipelineBarrier,
+ CmdPipelineBarrier2KHR: ProcCmdPipelineBarrier2KHR,
+ CmdPreprocessGeneratedCommandsNV: ProcCmdPreprocessGeneratedCommandsNV,
+ CmdPushConstants: ProcCmdPushConstants,
+ CmdPushDescriptorSetKHR: ProcCmdPushDescriptorSetKHR,
+ CmdPushDescriptorSetWithTemplateKHR: ProcCmdPushDescriptorSetWithTemplateKHR,
+ CmdResetEvent: ProcCmdResetEvent,
+ CmdResetEvent2KHR: ProcCmdResetEvent2KHR,
+ CmdResetQueryPool: ProcCmdResetQueryPool,
+ CmdResolveImage: ProcCmdResolveImage,
+ CmdResolveImage2KHR: ProcCmdResolveImage2KHR,
+ CmdSetBlendConstants: ProcCmdSetBlendConstants,
+ CmdSetCheckpointNV: ProcCmdSetCheckpointNV,
+ CmdSetCoarseSampleOrderNV: ProcCmdSetCoarseSampleOrderNV,
+ CmdSetCullModeEXT: ProcCmdSetCullModeEXT,
+ CmdSetDepthBias: ProcCmdSetDepthBias,
+ CmdSetDepthBiasEnableEXT: ProcCmdSetDepthBiasEnableEXT,
+ CmdSetDepthBounds: ProcCmdSetDepthBounds,
+ CmdSetDepthBoundsTestEnableEXT: ProcCmdSetDepthBoundsTestEnableEXT,
+ CmdSetDepthCompareOpEXT: ProcCmdSetDepthCompareOpEXT,
+ CmdSetDepthTestEnableEXT: ProcCmdSetDepthTestEnableEXT,
+ CmdSetDepthWriteEnableEXT: ProcCmdSetDepthWriteEnableEXT,
+ CmdSetDeviceMask: ProcCmdSetDeviceMask,
+ CmdSetDeviceMaskKHR: ProcCmdSetDeviceMaskKHR,
+ CmdSetDiscardRectangleEXT: ProcCmdSetDiscardRectangleEXT,
+ CmdSetEvent: ProcCmdSetEvent,
+ CmdSetEvent2KHR: ProcCmdSetEvent2KHR,
+ CmdSetExclusiveScissorNV: ProcCmdSetExclusiveScissorNV,
+ CmdSetFragmentShadingRateEnumNV: ProcCmdSetFragmentShadingRateEnumNV,
+ CmdSetFragmentShadingRateKHR: ProcCmdSetFragmentShadingRateKHR,
+ CmdSetFrontFaceEXT: ProcCmdSetFrontFaceEXT,
+ CmdSetLineStippleEXT: ProcCmdSetLineStippleEXT,
+ CmdSetLineWidth: ProcCmdSetLineWidth,
+ CmdSetLogicOpEXT: ProcCmdSetLogicOpEXT,
+ CmdSetPatchControlPointsEXT: ProcCmdSetPatchControlPointsEXT,
+ CmdSetPerformanceMarkerINTEL: ProcCmdSetPerformanceMarkerINTEL,
+ CmdSetPerformanceOverrideINTEL: ProcCmdSetPerformanceOverrideINTEL,
+ CmdSetPerformanceStreamMarkerINTEL: ProcCmdSetPerformanceStreamMarkerINTEL,
+ CmdSetPrimitiveRestartEnableEXT: ProcCmdSetPrimitiveRestartEnableEXT,
+ CmdSetPrimitiveTopologyEXT: ProcCmdSetPrimitiveTopologyEXT,
+ CmdSetRasterizerDiscardEnableEXT: ProcCmdSetRasterizerDiscardEnableEXT,
+ CmdSetRayTracingPipelineStackSizeKHR: ProcCmdSetRayTracingPipelineStackSizeKHR,
+ CmdSetSampleLocationsEXT: ProcCmdSetSampleLocationsEXT,
+ CmdSetScissor: ProcCmdSetScissor,
+ CmdSetScissorWithCountEXT: ProcCmdSetScissorWithCountEXT,
+ CmdSetStencilCompareMask: ProcCmdSetStencilCompareMask,
+ CmdSetStencilOpEXT: ProcCmdSetStencilOpEXT,
+ CmdSetStencilReference: ProcCmdSetStencilReference,
+ CmdSetStencilTestEnableEXT: ProcCmdSetStencilTestEnableEXT,
+ CmdSetStencilWriteMask: ProcCmdSetStencilWriteMask,
+ CmdSetVertexInputEXT: ProcCmdSetVertexInputEXT,
+ CmdSetViewport: ProcCmdSetViewport,
+ CmdSetViewportShadingRatePaletteNV: ProcCmdSetViewportShadingRatePaletteNV,
+ CmdSetViewportWScalingNV: ProcCmdSetViewportWScalingNV,
+ CmdSetViewportWithCountEXT: ProcCmdSetViewportWithCountEXT,
+ CmdSubpassShadingHUAWEI: ProcCmdSubpassShadingHUAWEI,
+ CmdTraceRaysIndirectKHR: ProcCmdTraceRaysIndirectKHR,
+ CmdTraceRaysKHR: ProcCmdTraceRaysKHR,
+ CmdTraceRaysNV: ProcCmdTraceRaysNV,
+ CmdUpdateBuffer: ProcCmdUpdateBuffer,
+ CmdWaitEvents: ProcCmdWaitEvents,
+ CmdWaitEvents2KHR: ProcCmdWaitEvents2KHR,
+ CmdWriteAccelerationStructuresPropertiesKHR: ProcCmdWriteAccelerationStructuresPropertiesKHR,
+ CmdWriteAccelerationStructuresPropertiesNV: ProcCmdWriteAccelerationStructuresPropertiesNV,
+ CmdWriteBufferMarker2AMD: ProcCmdWriteBufferMarker2AMD,
+ CmdWriteBufferMarkerAMD: ProcCmdWriteBufferMarkerAMD,
+ CmdWriteTimestamp: ProcCmdWriteTimestamp,
+ CmdWriteTimestamp2KHR: ProcCmdWriteTimestamp2KHR,
+ CompileDeferredNV: ProcCompileDeferredNV,
+ CopyAccelerationStructureKHR: ProcCopyAccelerationStructureKHR,
+ CopyAccelerationStructureToMemoryKHR: ProcCopyAccelerationStructureToMemoryKHR,
+ CopyMemoryToAccelerationStructureKHR: ProcCopyMemoryToAccelerationStructureKHR,
+ CreateAccelerationStructureKHR: ProcCreateAccelerationStructureKHR,
+ CreateAccelerationStructureNV: ProcCreateAccelerationStructureNV,
+ CreateBuffer: ProcCreateBuffer,
+ CreateBufferView: ProcCreateBufferView,
+ CreateCommandPool: ProcCreateCommandPool,
+ CreateComputePipelines: ProcCreateComputePipelines,
+ CreateCuFunctionNVX: ProcCreateCuFunctionNVX,
+ CreateCuModuleNVX: ProcCreateCuModuleNVX,
+ CreateDeferredOperationKHR: ProcCreateDeferredOperationKHR,
+ CreateDescriptorPool: ProcCreateDescriptorPool,
+ CreateDescriptorSetLayout: ProcCreateDescriptorSetLayout,
+ CreateDescriptorUpdateTemplate: ProcCreateDescriptorUpdateTemplate,
+ CreateDescriptorUpdateTemplateKHR: ProcCreateDescriptorUpdateTemplateKHR,
+ CreateEvent: ProcCreateEvent,
+ CreateFence: ProcCreateFence,
+ CreateFramebuffer: ProcCreateFramebuffer,
+ CreateGraphicsPipelines: ProcCreateGraphicsPipelines,
+ CreateImage: ProcCreateImage,
+ CreateImageView: ProcCreateImageView,
+ CreateIndirectCommandsLayoutNV: ProcCreateIndirectCommandsLayoutNV,
+ CreatePipelineCache: ProcCreatePipelineCache,
+ CreatePipelineLayout: ProcCreatePipelineLayout,
+ CreatePrivateDataSlotEXT: ProcCreatePrivateDataSlotEXT,
+ CreateQueryPool: ProcCreateQueryPool,
+ CreateRayTracingPipelinesKHR: ProcCreateRayTracingPipelinesKHR,
+ CreateRayTracingPipelinesNV: ProcCreateRayTracingPipelinesNV,
+ CreateRenderPass: ProcCreateRenderPass,
+ CreateRenderPass2: ProcCreateRenderPass2,
+ CreateRenderPass2KHR: ProcCreateRenderPass2KHR,
+ CreateSampler: ProcCreateSampler,
+ CreateSamplerYcbcrConversion: ProcCreateSamplerYcbcrConversion,
+ CreateSamplerYcbcrConversionKHR: ProcCreateSamplerYcbcrConversionKHR,
+ CreateSemaphore: ProcCreateSemaphore,
+ CreateShaderModule: ProcCreateShaderModule,
+ CreateSharedSwapchainsKHR: ProcCreateSharedSwapchainsKHR,
+ CreateSwapchainKHR: ProcCreateSwapchainKHR,
+ CreateValidationCacheEXT: ProcCreateValidationCacheEXT,
+ DebugMarkerSetObjectNameEXT: ProcDebugMarkerSetObjectNameEXT,
+ DebugMarkerSetObjectTagEXT: ProcDebugMarkerSetObjectTagEXT,
+ DeferredOperationJoinKHR: ProcDeferredOperationJoinKHR,
+ DestroyAccelerationStructureKHR: ProcDestroyAccelerationStructureKHR,
+ DestroyAccelerationStructureNV: ProcDestroyAccelerationStructureNV,
+ DestroyBuffer: ProcDestroyBuffer,
+ DestroyBufferView: ProcDestroyBufferView,
+ DestroyCommandPool: ProcDestroyCommandPool,
+ DestroyCuFunctionNVX: ProcDestroyCuFunctionNVX,
+ DestroyCuModuleNVX: ProcDestroyCuModuleNVX,
+ DestroyDeferredOperationKHR: ProcDestroyDeferredOperationKHR,
+ DestroyDescriptorPool: ProcDestroyDescriptorPool,
+ DestroyDescriptorSetLayout: ProcDestroyDescriptorSetLayout,
+ DestroyDescriptorUpdateTemplate: ProcDestroyDescriptorUpdateTemplate,
+ DestroyDescriptorUpdateTemplateKHR: ProcDestroyDescriptorUpdateTemplateKHR,
+ DestroyDevice: ProcDestroyDevice,
+ DestroyEvent: ProcDestroyEvent,
+ DestroyFence: ProcDestroyFence,
+ DestroyFramebuffer: ProcDestroyFramebuffer,
+ DestroyImage: ProcDestroyImage,
+ DestroyImageView: ProcDestroyImageView,
+ DestroyIndirectCommandsLayoutNV: ProcDestroyIndirectCommandsLayoutNV,
+ DestroyPipeline: ProcDestroyPipeline,
+ DestroyPipelineCache: ProcDestroyPipelineCache,
+ DestroyPipelineLayout: ProcDestroyPipelineLayout,
+ DestroyPrivateDataSlotEXT: ProcDestroyPrivateDataSlotEXT,
+ DestroyQueryPool: ProcDestroyQueryPool,
+ DestroyRenderPass: ProcDestroyRenderPass,
+ DestroySampler: ProcDestroySampler,
+ DestroySamplerYcbcrConversion: ProcDestroySamplerYcbcrConversion,
+ DestroySamplerYcbcrConversionKHR: ProcDestroySamplerYcbcrConversionKHR,
+ DestroySemaphore: ProcDestroySemaphore,
+ DestroyShaderModule: ProcDestroyShaderModule,
+ DestroySwapchainKHR: ProcDestroySwapchainKHR,
+ DestroyValidationCacheEXT: ProcDestroyValidationCacheEXT,
+ DeviceWaitIdle: ProcDeviceWaitIdle,
+ DisplayPowerControlEXT: ProcDisplayPowerControlEXT,
+ EndCommandBuffer: ProcEndCommandBuffer,
+ FlushMappedMemoryRanges: ProcFlushMappedMemoryRanges,
+ FreeCommandBuffers: ProcFreeCommandBuffers,
+ FreeDescriptorSets: ProcFreeDescriptorSets,
+ FreeMemory: ProcFreeMemory,
+ GetAccelerationStructureBuildSizesKHR: ProcGetAccelerationStructureBuildSizesKHR,
+ GetAccelerationStructureDeviceAddressKHR: ProcGetAccelerationStructureDeviceAddressKHR,
+ GetAccelerationStructureHandleNV: ProcGetAccelerationStructureHandleNV,
+ GetAccelerationStructureMemoryRequirementsNV: ProcGetAccelerationStructureMemoryRequirementsNV,
+ GetBufferDeviceAddress: ProcGetBufferDeviceAddress,
+ GetBufferDeviceAddressEXT: ProcGetBufferDeviceAddressEXT,
+ GetBufferDeviceAddressKHR: ProcGetBufferDeviceAddressKHR,
+ GetBufferMemoryRequirements: ProcGetBufferMemoryRequirements,
+ GetBufferMemoryRequirements2: ProcGetBufferMemoryRequirements2,
+ GetBufferMemoryRequirements2KHR: ProcGetBufferMemoryRequirements2KHR,
+ GetBufferOpaqueCaptureAddress: ProcGetBufferOpaqueCaptureAddress,
+ GetBufferOpaqueCaptureAddressKHR: ProcGetBufferOpaqueCaptureAddressKHR,
+ GetCalibratedTimestampsEXT: ProcGetCalibratedTimestampsEXT,
+ GetDeferredOperationMaxConcurrencyKHR: ProcGetDeferredOperationMaxConcurrencyKHR,
+ GetDeferredOperationResultKHR: ProcGetDeferredOperationResultKHR,
+ GetDescriptorSetLayoutSupport: ProcGetDescriptorSetLayoutSupport,
+ GetDescriptorSetLayoutSupportKHR: ProcGetDescriptorSetLayoutSupportKHR,
+ GetDeviceAccelerationStructureCompatibilityKHR: ProcGetDeviceAccelerationStructureCompatibilityKHR,
+ GetDeviceGroupPeerMemoryFeatures: ProcGetDeviceGroupPeerMemoryFeatures,
+ GetDeviceGroupPeerMemoryFeaturesKHR: ProcGetDeviceGroupPeerMemoryFeaturesKHR,
+ GetDeviceGroupPresentCapabilitiesKHR: ProcGetDeviceGroupPresentCapabilitiesKHR,
+ GetDeviceGroupSurfacePresentModes2EXT: ProcGetDeviceGroupSurfacePresentModes2EXT,
+ GetDeviceGroupSurfacePresentModesKHR: ProcGetDeviceGroupSurfacePresentModesKHR,
+ GetDeviceMemoryCommitment: ProcGetDeviceMemoryCommitment,
+ GetDeviceMemoryOpaqueCaptureAddress: ProcGetDeviceMemoryOpaqueCaptureAddress,
+ GetDeviceMemoryOpaqueCaptureAddressKHR: ProcGetDeviceMemoryOpaqueCaptureAddressKHR,
+ GetDeviceProcAddr: ProcGetDeviceProcAddr,
+ GetDeviceQueue: ProcGetDeviceQueue,
+ GetDeviceQueue2: ProcGetDeviceQueue2,
+ GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI: ProcGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI,
+ GetEventStatus: ProcGetEventStatus,
+ GetFenceFdKHR: ProcGetFenceFdKHR,
+ GetFenceStatus: ProcGetFenceStatus,
+ GetFenceWin32HandleKHR: ProcGetFenceWin32HandleKHR,
+ GetGeneratedCommandsMemoryRequirementsNV: ProcGetGeneratedCommandsMemoryRequirementsNV,
+ GetImageDrmFormatModifierPropertiesEXT: ProcGetImageDrmFormatModifierPropertiesEXT,
+ GetImageMemoryRequirements: ProcGetImageMemoryRequirements,
+ GetImageMemoryRequirements2: ProcGetImageMemoryRequirements2,
+ GetImageMemoryRequirements2KHR: ProcGetImageMemoryRequirements2KHR,
+ GetImageSparseMemoryRequirements: ProcGetImageSparseMemoryRequirements,
+ GetImageSparseMemoryRequirements2: ProcGetImageSparseMemoryRequirements2,
+ GetImageSparseMemoryRequirements2KHR: ProcGetImageSparseMemoryRequirements2KHR,
+ GetImageSubresourceLayout: ProcGetImageSubresourceLayout,
+ GetImageViewAddressNVX: ProcGetImageViewAddressNVX,
+ GetImageViewHandleNVX: ProcGetImageViewHandleNVX,
+ GetMemoryFdKHR: ProcGetMemoryFdKHR,
+ GetMemoryFdPropertiesKHR: ProcGetMemoryFdPropertiesKHR,
+ GetMemoryHostPointerPropertiesEXT: ProcGetMemoryHostPointerPropertiesEXT,
+ GetMemoryRemoteAddressNV: ProcGetMemoryRemoteAddressNV,
+ GetMemoryWin32HandleKHR: ProcGetMemoryWin32HandleKHR,
+ GetMemoryWin32HandleNV: ProcGetMemoryWin32HandleNV,
+ GetMemoryWin32HandlePropertiesKHR: ProcGetMemoryWin32HandlePropertiesKHR,
+ GetPastPresentationTimingGOOGLE: ProcGetPastPresentationTimingGOOGLE,
+ GetPerformanceParameterINTEL: ProcGetPerformanceParameterINTEL,
+ GetPipelineCacheData: ProcGetPipelineCacheData,
+ GetPipelineExecutableInternalRepresentationsKHR: ProcGetPipelineExecutableInternalRepresentationsKHR,
+ GetPipelineExecutablePropertiesKHR: ProcGetPipelineExecutablePropertiesKHR,
+ GetPipelineExecutableStatisticsKHR: ProcGetPipelineExecutableStatisticsKHR,
+ GetPrivateDataEXT: ProcGetPrivateDataEXT,
+ GetQueryPoolResults: ProcGetQueryPoolResults,
+ GetQueueCheckpointData2NV: ProcGetQueueCheckpointData2NV,
+ GetQueueCheckpointDataNV: ProcGetQueueCheckpointDataNV,
+ GetRayTracingCaptureReplayShaderGroupHandlesKHR: ProcGetRayTracingCaptureReplayShaderGroupHandlesKHR,
+ GetRayTracingShaderGroupHandlesKHR: ProcGetRayTracingShaderGroupHandlesKHR,
+ GetRayTracingShaderGroupHandlesNV: ProcGetRayTracingShaderGroupHandlesNV,
+ GetRayTracingShaderGroupStackSizeKHR: ProcGetRayTracingShaderGroupStackSizeKHR,
+ GetRefreshCycleDurationGOOGLE: ProcGetRefreshCycleDurationGOOGLE,
+ GetRenderAreaGranularity: ProcGetRenderAreaGranularity,
+ GetSemaphoreCounterValue: ProcGetSemaphoreCounterValue,
+ GetSemaphoreCounterValueKHR: ProcGetSemaphoreCounterValueKHR,
+ GetSemaphoreFdKHR: ProcGetSemaphoreFdKHR,
+ GetSemaphoreWin32HandleKHR: ProcGetSemaphoreWin32HandleKHR,
+ GetShaderInfoAMD: ProcGetShaderInfoAMD,
+ GetSwapchainCounterEXT: ProcGetSwapchainCounterEXT,
+ GetSwapchainImagesKHR: ProcGetSwapchainImagesKHR,
+ GetSwapchainStatusKHR: ProcGetSwapchainStatusKHR,
+ GetValidationCacheDataEXT: ProcGetValidationCacheDataEXT,
+ ImportFenceFdKHR: ProcImportFenceFdKHR,
+ ImportFenceWin32HandleKHR: ProcImportFenceWin32HandleKHR,
+ ImportSemaphoreFdKHR: ProcImportSemaphoreFdKHR,
+ ImportSemaphoreWin32HandleKHR: ProcImportSemaphoreWin32HandleKHR,
+ InitializePerformanceApiINTEL: ProcInitializePerformanceApiINTEL,
+ InvalidateMappedMemoryRanges: ProcInvalidateMappedMemoryRanges,
+ MapMemory: ProcMapMemory,
+ MergePipelineCaches: ProcMergePipelineCaches,
+ MergeValidationCachesEXT: ProcMergeValidationCachesEXT,
+ QueueBeginDebugUtilsLabelEXT: ProcQueueBeginDebugUtilsLabelEXT,
+ QueueBindSparse: ProcQueueBindSparse,
+ QueueEndDebugUtilsLabelEXT: ProcQueueEndDebugUtilsLabelEXT,
+ QueueInsertDebugUtilsLabelEXT: ProcQueueInsertDebugUtilsLabelEXT,
+ QueuePresentKHR: ProcQueuePresentKHR,
+ QueueSetPerformanceConfigurationINTEL: ProcQueueSetPerformanceConfigurationINTEL,
+ QueueSubmit: ProcQueueSubmit,
+ QueueSubmit2KHR: ProcQueueSubmit2KHR,
+ QueueWaitIdle: ProcQueueWaitIdle,
+ RegisterDeviceEventEXT: ProcRegisterDeviceEventEXT,
+ RegisterDisplayEventEXT: ProcRegisterDisplayEventEXT,
+ ReleaseFullScreenExclusiveModeEXT: ProcReleaseFullScreenExclusiveModeEXT,
+ ReleasePerformanceConfigurationINTEL: ProcReleasePerformanceConfigurationINTEL,
+ ReleaseProfilingLockKHR: ProcReleaseProfilingLockKHR,
+ ResetCommandBuffer: ProcResetCommandBuffer,
+ ResetCommandPool: ProcResetCommandPool,
+ ResetDescriptorPool: ProcResetDescriptorPool,
+ ResetEvent: ProcResetEvent,
+ ResetFences: ProcResetFences,
+ ResetQueryPool: ProcResetQueryPool,
+ ResetQueryPoolEXT: ProcResetQueryPoolEXT,
+ SetDebugUtilsObjectNameEXT: ProcSetDebugUtilsObjectNameEXT,
+ SetDebugUtilsObjectTagEXT: ProcSetDebugUtilsObjectTagEXT,
+ SetDeviceMemoryPriorityEXT: ProcSetDeviceMemoryPriorityEXT,
+ SetEvent: ProcSetEvent,
+ SetHdrMetadataEXT: ProcSetHdrMetadataEXT,
+ SetLocalDimmingAMD: ProcSetLocalDimmingAMD,
+ SetPrivateDataEXT: ProcSetPrivateDataEXT,
+ SignalSemaphore: ProcSignalSemaphore,
+ SignalSemaphoreKHR: ProcSignalSemaphoreKHR,
+ TrimCommandPool: ProcTrimCommandPool,
+ TrimCommandPoolKHR: ProcTrimCommandPoolKHR,
+ UninitializePerformanceApiINTEL: ProcUninitializePerformanceApiINTEL,
+ UnmapMemory: ProcUnmapMemory,
+ UpdateDescriptorSetWithTemplate: ProcUpdateDescriptorSetWithTemplate,
+ UpdateDescriptorSetWithTemplateKHR: ProcUpdateDescriptorSetWithTemplateKHR,
+ UpdateDescriptorSets: ProcUpdateDescriptorSets,
+ WaitForFences: ProcWaitForFences,
+ WaitForPresentKHR: ProcWaitForPresentKHR,
+ WaitSemaphores: ProcWaitSemaphores,
+ WaitSemaphoresKHR: ProcWaitSemaphoresKHR,
+ WriteAccelerationStructuresPropertiesKHR: ProcWriteAccelerationStructuresPropertiesKHR,
+}
+load_proc_addresses_device_vtable :: proc(device: Device, vtable: ^Device_VTable) {
+ vtable.AcquireFullScreenExclusiveModeEXT = auto_cast GetDeviceProcAddr(device, "vkAcquireFullScreenExclusiveModeEXT")
+ vtable.AcquireNextImage2KHR = auto_cast GetDeviceProcAddr(device, "vkAcquireNextImage2KHR")
+ vtable.AcquireNextImageKHR = auto_cast GetDeviceProcAddr(device, "vkAcquireNextImageKHR")
+ vtable.AcquirePerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkAcquirePerformanceConfigurationINTEL")
+ vtable.AcquireProfilingLockKHR = auto_cast GetDeviceProcAddr(device, "vkAcquireProfilingLockKHR")
+ vtable.AllocateCommandBuffers = auto_cast GetDeviceProcAddr(device, "vkAllocateCommandBuffers")
+ vtable.AllocateDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkAllocateDescriptorSets")
+ vtable.AllocateMemory = auto_cast GetDeviceProcAddr(device, "vkAllocateMemory")
+ vtable.BeginCommandBuffer = auto_cast GetDeviceProcAddr(device, "vkBeginCommandBuffer")
+ vtable.BindAccelerationStructureMemoryNV = auto_cast GetDeviceProcAddr(device, "vkBindAccelerationStructureMemoryNV")
+ vtable.BindBufferMemory = auto_cast GetDeviceProcAddr(device, "vkBindBufferMemory")
+ vtable.BindBufferMemory2 = auto_cast GetDeviceProcAddr(device, "vkBindBufferMemory2")
+ vtable.BindBufferMemory2KHR = auto_cast GetDeviceProcAddr(device, "vkBindBufferMemory2KHR")
+ vtable.BindImageMemory = auto_cast GetDeviceProcAddr(device, "vkBindImageMemory")
+ vtable.BindImageMemory2 = auto_cast GetDeviceProcAddr(device, "vkBindImageMemory2")
+ vtable.BindImageMemory2KHR = auto_cast GetDeviceProcAddr(device, "vkBindImageMemory2KHR")
+ vtable.BuildAccelerationStructuresKHR = auto_cast GetDeviceProcAddr(device, "vkBuildAccelerationStructuresKHR")
+ vtable.CmdBeginConditionalRenderingEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginConditionalRenderingEXT")
+ vtable.CmdBeginDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginDebugUtilsLabelEXT")
+ vtable.CmdBeginQuery = auto_cast GetDeviceProcAddr(device, "vkCmdBeginQuery")
+ vtable.CmdBeginQueryIndexedEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginQueryIndexedEXT")
+ vtable.CmdBeginRenderPass = auto_cast GetDeviceProcAddr(device, "vkCmdBeginRenderPass")
+ vtable.CmdBeginRenderPass2 = auto_cast GetDeviceProcAddr(device, "vkCmdBeginRenderPass2")
+ vtable.CmdBeginRenderPass2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdBeginRenderPass2KHR")
+ vtable.CmdBeginTransformFeedbackEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginTransformFeedbackEXT")
+ vtable.CmdBindDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorSets")
+ vtable.CmdBindIndexBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdBindIndexBuffer")
+ vtable.CmdBindInvocationMaskHUAWEI = auto_cast GetDeviceProcAddr(device, "vkCmdBindInvocationMaskHUAWEI")
+ vtable.CmdBindPipeline = auto_cast GetDeviceProcAddr(device, "vkCmdBindPipeline")
+ vtable.CmdBindPipelineShaderGroupNV = auto_cast GetDeviceProcAddr(device, "vkCmdBindPipelineShaderGroupNV")
+ vtable.CmdBindShadingRateImageNV = auto_cast GetDeviceProcAddr(device, "vkCmdBindShadingRateImageNV")
+ vtable.CmdBindTransformFeedbackBuffersEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindTransformFeedbackBuffersEXT")
+ vtable.CmdBindVertexBuffers = auto_cast GetDeviceProcAddr(device, "vkCmdBindVertexBuffers")
+ vtable.CmdBindVertexBuffers2EXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindVertexBuffers2EXT")
+ vtable.CmdBlitImage = auto_cast GetDeviceProcAddr(device, "vkCmdBlitImage")
+ vtable.CmdBlitImage2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdBlitImage2KHR")
+ vtable.CmdBuildAccelerationStructureNV = auto_cast GetDeviceProcAddr(device, "vkCmdBuildAccelerationStructureNV")
+ vtable.CmdBuildAccelerationStructuresIndirectKHR = auto_cast GetDeviceProcAddr(device, "vkCmdBuildAccelerationStructuresIndirectKHR")
+ vtable.CmdBuildAccelerationStructuresKHR = auto_cast GetDeviceProcAddr(device, "vkCmdBuildAccelerationStructuresKHR")
+ vtable.CmdClearAttachments = auto_cast GetDeviceProcAddr(device, "vkCmdClearAttachments")
+ vtable.CmdClearColorImage = auto_cast GetDeviceProcAddr(device, "vkCmdClearColorImage")
+ vtable.CmdClearDepthStencilImage = auto_cast GetDeviceProcAddr(device, "vkCmdClearDepthStencilImage")
+ vtable.CmdCopyAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyAccelerationStructureKHR")
+ vtable.CmdCopyAccelerationStructureNV = auto_cast GetDeviceProcAddr(device, "vkCmdCopyAccelerationStructureNV")
+ vtable.CmdCopyAccelerationStructureToMemoryKHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyAccelerationStructureToMemoryKHR")
+ vtable.CmdCopyBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdCopyBuffer")
+ vtable.CmdCopyBuffer2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyBuffer2KHR")
+ vtable.CmdCopyBufferToImage = auto_cast GetDeviceProcAddr(device, "vkCmdCopyBufferToImage")
+ vtable.CmdCopyBufferToImage2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyBufferToImage2KHR")
+ vtable.CmdCopyImage = auto_cast GetDeviceProcAddr(device, "vkCmdCopyImage")
+ vtable.CmdCopyImage2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyImage2KHR")
+ vtable.CmdCopyImageToBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdCopyImageToBuffer")
+ vtable.CmdCopyImageToBuffer2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyImageToBuffer2KHR")
+ vtable.CmdCopyMemoryToAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyMemoryToAccelerationStructureKHR")
+ vtable.CmdCopyQueryPoolResults = auto_cast GetDeviceProcAddr(device, "vkCmdCopyQueryPoolResults")
+ vtable.CmdCuLaunchKernelNVX = auto_cast GetDeviceProcAddr(device, "vkCmdCuLaunchKernelNVX")
+ vtable.CmdDebugMarkerBeginEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerBeginEXT")
+ vtable.CmdDebugMarkerEndEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerEndEXT")
+ vtable.CmdDebugMarkerInsertEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerInsertEXT")
+ vtable.CmdDispatch = auto_cast GetDeviceProcAddr(device, "vkCmdDispatch")
+ vtable.CmdDispatchBase = auto_cast GetDeviceProcAddr(device, "vkCmdDispatchBase")
+ vtable.CmdDispatchBaseKHR = auto_cast GetDeviceProcAddr(device, "vkCmdDispatchBaseKHR")
+ vtable.CmdDispatchIndirect = auto_cast GetDeviceProcAddr(device, "vkCmdDispatchIndirect")
+ vtable.CmdDraw = auto_cast GetDeviceProcAddr(device, "vkCmdDraw")
+ vtable.CmdDrawIndexed = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexed")
+ vtable.CmdDrawIndexedIndirect = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexedIndirect")
+ vtable.CmdDrawIndexedIndirectCount = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexedIndirectCount")
+ vtable.CmdDrawIndexedIndirectCountAMD = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexedIndirectCountAMD")
+ vtable.CmdDrawIndexedIndirectCountKHR = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexedIndirectCountKHR")
+ vtable.CmdDrawIndirect = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirect")
+ vtable.CmdDrawIndirectByteCountEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirectByteCountEXT")
+ vtable.CmdDrawIndirectCount = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirectCount")
+ vtable.CmdDrawIndirectCountAMD = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirectCountAMD")
+ vtable.CmdDrawIndirectCountKHR = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirectCountKHR")
+ vtable.CmdDrawMeshTasksIndirectCountNV = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMeshTasksIndirectCountNV")
+ vtable.CmdDrawMeshTasksIndirectNV = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMeshTasksIndirectNV")
+ vtable.CmdDrawMeshTasksNV = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMeshTasksNV")
+ vtable.CmdDrawMultiEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMultiEXT")
+ vtable.CmdDrawMultiIndexedEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMultiIndexedEXT")
+ vtable.CmdEndConditionalRenderingEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndConditionalRenderingEXT")
+ vtable.CmdEndDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndDebugUtilsLabelEXT")
+ vtable.CmdEndQuery = auto_cast GetDeviceProcAddr(device, "vkCmdEndQuery")
+ vtable.CmdEndQueryIndexedEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndQueryIndexedEXT")
+ vtable.CmdEndRenderPass = auto_cast GetDeviceProcAddr(device, "vkCmdEndRenderPass")
+ vtable.CmdEndRenderPass2 = auto_cast GetDeviceProcAddr(device, "vkCmdEndRenderPass2")
+ vtable.CmdEndRenderPass2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdEndRenderPass2KHR")
+ vtable.CmdEndTransformFeedbackEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndTransformFeedbackEXT")
+ vtable.CmdExecuteCommands = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteCommands")
+ vtable.CmdExecuteGeneratedCommandsNV = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteGeneratedCommandsNV")
+ vtable.CmdFillBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdFillBuffer")
+ vtable.CmdInsertDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdInsertDebugUtilsLabelEXT")
+ vtable.CmdNextSubpass = auto_cast GetDeviceProcAddr(device, "vkCmdNextSubpass")
+ vtable.CmdNextSubpass2 = auto_cast GetDeviceProcAddr(device, "vkCmdNextSubpass2")
+ vtable.CmdNextSubpass2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdNextSubpass2KHR")
+ vtable.CmdPipelineBarrier = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier")
+ vtable.CmdPipelineBarrier2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier2KHR")
+ vtable.CmdPreprocessGeneratedCommandsNV = auto_cast GetDeviceProcAddr(device, "vkCmdPreprocessGeneratedCommandsNV")
+ vtable.CmdPushConstants = auto_cast GetDeviceProcAddr(device, "vkCmdPushConstants")
+ vtable.CmdPushDescriptorSetKHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetKHR")
+ vtable.CmdPushDescriptorSetWithTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetWithTemplateKHR")
+ vtable.CmdResetEvent = auto_cast GetDeviceProcAddr(device, "vkCmdResetEvent")
+ vtable.CmdResetEvent2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdResetEvent2KHR")
+ vtable.CmdResetQueryPool = auto_cast GetDeviceProcAddr(device, "vkCmdResetQueryPool")
+ vtable.CmdResolveImage = auto_cast GetDeviceProcAddr(device, "vkCmdResolveImage")
+ vtable.CmdResolveImage2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdResolveImage2KHR")
+ vtable.CmdSetBlendConstants = auto_cast GetDeviceProcAddr(device, "vkCmdSetBlendConstants")
+ vtable.CmdSetCheckpointNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetCheckpointNV")
+ vtable.CmdSetCoarseSampleOrderNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetCoarseSampleOrderNV")
+ vtable.CmdSetCullModeEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetCullModeEXT")
+ vtable.CmdSetDepthBias = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBias")
+ vtable.CmdSetDepthBiasEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBiasEnableEXT")
+ vtable.CmdSetDepthBounds = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBounds")
+ vtable.CmdSetDepthBoundsTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBoundsTestEnableEXT")
+ vtable.CmdSetDepthCompareOpEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthCompareOpEXT")
+ vtable.CmdSetDepthTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthTestEnableEXT")
+ vtable.CmdSetDepthWriteEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthWriteEnableEXT")
+ vtable.CmdSetDeviceMask = auto_cast GetDeviceProcAddr(device, "vkCmdSetDeviceMask")
+ vtable.CmdSetDeviceMaskKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetDeviceMaskKHR")
+ vtable.CmdSetDiscardRectangleEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDiscardRectangleEXT")
+ vtable.CmdSetEvent = auto_cast GetDeviceProcAddr(device, "vkCmdSetEvent")
+ vtable.CmdSetEvent2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetEvent2KHR")
+ vtable.CmdSetExclusiveScissorNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetExclusiveScissorNV")
+ vtable.CmdSetFragmentShadingRateEnumNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetFragmentShadingRateEnumNV")
+ vtable.CmdSetFragmentShadingRateKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetFragmentShadingRateKHR")
+ vtable.CmdSetFrontFaceEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetFrontFaceEXT")
+ vtable.CmdSetLineStippleEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineStippleEXT")
+ vtable.CmdSetLineWidth = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineWidth")
+ vtable.CmdSetLogicOpEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLogicOpEXT")
+ vtable.CmdSetPatchControlPointsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetPatchControlPointsEXT")
+ vtable.CmdSetPerformanceMarkerINTEL = auto_cast GetDeviceProcAddr(device, "vkCmdSetPerformanceMarkerINTEL")
+ vtable.CmdSetPerformanceOverrideINTEL = auto_cast GetDeviceProcAddr(device, "vkCmdSetPerformanceOverrideINTEL")
+ vtable.CmdSetPerformanceStreamMarkerINTEL = auto_cast GetDeviceProcAddr(device, "vkCmdSetPerformanceStreamMarkerINTEL")
+ vtable.CmdSetPrimitiveRestartEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetPrimitiveRestartEnableEXT")
+ vtable.CmdSetPrimitiveTopologyEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetPrimitiveTopologyEXT")
+ vtable.CmdSetRasterizerDiscardEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetRasterizerDiscardEnableEXT")
+ vtable.CmdSetRayTracingPipelineStackSizeKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ vtable.CmdSetSampleLocationsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetSampleLocationsEXT")
+ vtable.CmdSetScissor = auto_cast GetDeviceProcAddr(device, "vkCmdSetScissor")
+ vtable.CmdSetScissorWithCountEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetScissorWithCountEXT")
+ vtable.CmdSetStencilCompareMask = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilCompareMask")
+ vtable.CmdSetStencilOpEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilOpEXT")
+ vtable.CmdSetStencilReference = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilReference")
+ vtable.CmdSetStencilTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilTestEnableEXT")
+ vtable.CmdSetStencilWriteMask = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilWriteMask")
+ vtable.CmdSetVertexInputEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetVertexInputEXT")
+ vtable.CmdSetViewport = auto_cast GetDeviceProcAddr(device, "vkCmdSetViewport")
+ vtable.CmdSetViewportShadingRatePaletteNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetViewportShadingRatePaletteNV")
+ vtable.CmdSetViewportWScalingNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetViewportWScalingNV")
+ vtable.CmdSetViewportWithCountEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetViewportWithCountEXT")
+ vtable.CmdSubpassShadingHUAWEI = auto_cast GetDeviceProcAddr(device, "vkCmdSubpassShadingHUAWEI")
+ vtable.CmdTraceRaysIndirectKHR = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysIndirectKHR")
+ vtable.CmdTraceRaysKHR = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysKHR")
+ vtable.CmdTraceRaysNV = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysNV")
+ vtable.CmdUpdateBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdUpdateBuffer")
+ vtable.CmdWaitEvents = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents")
+ vtable.CmdWaitEvents2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents2KHR")
+ vtable.CmdWriteAccelerationStructuresPropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkCmdWriteAccelerationStructuresPropertiesKHR")
+ vtable.CmdWriteAccelerationStructuresPropertiesNV = auto_cast GetDeviceProcAddr(device, "vkCmdWriteAccelerationStructuresPropertiesNV")
+ vtable.CmdWriteBufferMarker2AMD = auto_cast GetDeviceProcAddr(device, "vkCmdWriteBufferMarker2AMD")
+ vtable.CmdWriteBufferMarkerAMD = auto_cast GetDeviceProcAddr(device, "vkCmdWriteBufferMarkerAMD")
+ vtable.CmdWriteTimestamp = auto_cast GetDeviceProcAddr(device, "vkCmdWriteTimestamp")
+ vtable.CmdWriteTimestamp2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdWriteTimestamp2KHR")
+ vtable.CompileDeferredNV = auto_cast GetDeviceProcAddr(device, "vkCompileDeferredNV")
+ vtable.CopyAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCopyAccelerationStructureKHR")
+ vtable.CopyAccelerationStructureToMemoryKHR = auto_cast GetDeviceProcAddr(device, "vkCopyAccelerationStructureToMemoryKHR")
+ vtable.CopyMemoryToAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCopyMemoryToAccelerationStructureKHR")
+ vtable.CreateAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCreateAccelerationStructureKHR")
+ vtable.CreateAccelerationStructureNV = auto_cast GetDeviceProcAddr(device, "vkCreateAccelerationStructureNV")
+ vtable.CreateBuffer = auto_cast GetDeviceProcAddr(device, "vkCreateBuffer")
+ vtable.CreateBufferView = auto_cast GetDeviceProcAddr(device, "vkCreateBufferView")
+ vtable.CreateCommandPool = auto_cast GetDeviceProcAddr(device, "vkCreateCommandPool")
+ vtable.CreateComputePipelines = auto_cast GetDeviceProcAddr(device, "vkCreateComputePipelines")
+ vtable.CreateCuFunctionNVX = auto_cast GetDeviceProcAddr(device, "vkCreateCuFunctionNVX")
+ vtable.CreateCuModuleNVX = auto_cast GetDeviceProcAddr(device, "vkCreateCuModuleNVX")
+ vtable.CreateDeferredOperationKHR = auto_cast GetDeviceProcAddr(device, "vkCreateDeferredOperationKHR")
+ vtable.CreateDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorPool")
+ vtable.CreateDescriptorSetLayout = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorSetLayout")
+ vtable.CreateDescriptorUpdateTemplate = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorUpdateTemplate")
+ vtable.CreateDescriptorUpdateTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorUpdateTemplateKHR")
+ vtable.CreateEvent = auto_cast GetDeviceProcAddr(device, "vkCreateEvent")
+ vtable.CreateFence = auto_cast GetDeviceProcAddr(device, "vkCreateFence")
+ vtable.CreateFramebuffer = auto_cast GetDeviceProcAddr(device, "vkCreateFramebuffer")
+ vtable.CreateGraphicsPipelines = auto_cast GetDeviceProcAddr(device, "vkCreateGraphicsPipelines")
+ vtable.CreateImage = auto_cast GetDeviceProcAddr(device, "vkCreateImage")
+ vtable.CreateImageView = auto_cast GetDeviceProcAddr(device, "vkCreateImageView")
+ vtable.CreateIndirectCommandsLayoutNV = auto_cast GetDeviceProcAddr(device, "vkCreateIndirectCommandsLayoutNV")
+ vtable.CreatePipelineCache = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineCache")
+ vtable.CreatePipelineLayout = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineLayout")
+ vtable.CreatePrivateDataSlotEXT = auto_cast GetDeviceProcAddr(device, "vkCreatePrivateDataSlotEXT")
+ vtable.CreateQueryPool = auto_cast GetDeviceProcAddr(device, "vkCreateQueryPool")
+ vtable.CreateRayTracingPipelinesKHR = auto_cast GetDeviceProcAddr(device, "vkCreateRayTracingPipelinesKHR")
+ vtable.CreateRayTracingPipelinesNV = auto_cast GetDeviceProcAddr(device, "vkCreateRayTracingPipelinesNV")
+ vtable.CreateRenderPass = auto_cast GetDeviceProcAddr(device, "vkCreateRenderPass")
+ vtable.CreateRenderPass2 = auto_cast GetDeviceProcAddr(device, "vkCreateRenderPass2")
+ vtable.CreateRenderPass2KHR = auto_cast GetDeviceProcAddr(device, "vkCreateRenderPass2KHR")
+ vtable.CreateSampler = auto_cast GetDeviceProcAddr(device, "vkCreateSampler")
+ vtable.CreateSamplerYcbcrConversion = auto_cast GetDeviceProcAddr(device, "vkCreateSamplerYcbcrConversion")
+ vtable.CreateSamplerYcbcrConversionKHR = auto_cast GetDeviceProcAddr(device, "vkCreateSamplerYcbcrConversionKHR")
+ vtable.CreateSemaphore = auto_cast GetDeviceProcAddr(device, "vkCreateSemaphore")
+ vtable.CreateShaderModule = auto_cast GetDeviceProcAddr(device, "vkCreateShaderModule")
+ vtable.CreateSharedSwapchainsKHR = auto_cast GetDeviceProcAddr(device, "vkCreateSharedSwapchainsKHR")
+ vtable.CreateSwapchainKHR = auto_cast GetDeviceProcAddr(device, "vkCreateSwapchainKHR")
+ vtable.CreateValidationCacheEXT = auto_cast GetDeviceProcAddr(device, "vkCreateValidationCacheEXT")
+ vtable.DebugMarkerSetObjectNameEXT = auto_cast GetDeviceProcAddr(device, "vkDebugMarkerSetObjectNameEXT")
+ vtable.DebugMarkerSetObjectTagEXT = auto_cast GetDeviceProcAddr(device, "vkDebugMarkerSetObjectTagEXT")
+ vtable.DeferredOperationJoinKHR = auto_cast GetDeviceProcAddr(device, "vkDeferredOperationJoinKHR")
+ vtable.DestroyAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyAccelerationStructureKHR")
+ vtable.DestroyAccelerationStructureNV = auto_cast GetDeviceProcAddr(device, "vkDestroyAccelerationStructureNV")
+ vtable.DestroyBuffer = auto_cast GetDeviceProcAddr(device, "vkDestroyBuffer")
+ vtable.DestroyBufferView = auto_cast GetDeviceProcAddr(device, "vkDestroyBufferView")
+ vtable.DestroyCommandPool = auto_cast GetDeviceProcAddr(device, "vkDestroyCommandPool")
+ vtable.DestroyCuFunctionNVX = auto_cast GetDeviceProcAddr(device, "vkDestroyCuFunctionNVX")
+ vtable.DestroyCuModuleNVX = auto_cast GetDeviceProcAddr(device, "vkDestroyCuModuleNVX")
+ vtable.DestroyDeferredOperationKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyDeferredOperationKHR")
+ vtable.DestroyDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorPool")
+ vtable.DestroyDescriptorSetLayout = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorSetLayout")
+ vtable.DestroyDescriptorUpdateTemplate = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorUpdateTemplate")
+ vtable.DestroyDescriptorUpdateTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorUpdateTemplateKHR")
+ vtable.DestroyDevice = auto_cast GetDeviceProcAddr(device, "vkDestroyDevice")
+ vtable.DestroyEvent = auto_cast GetDeviceProcAddr(device, "vkDestroyEvent")
+ vtable.DestroyFence = auto_cast GetDeviceProcAddr(device, "vkDestroyFence")
+ vtable.DestroyFramebuffer = auto_cast GetDeviceProcAddr(device, "vkDestroyFramebuffer")
+ vtable.DestroyImage = auto_cast GetDeviceProcAddr(device, "vkDestroyImage")
+ vtable.DestroyImageView = auto_cast GetDeviceProcAddr(device, "vkDestroyImageView")
+ vtable.DestroyIndirectCommandsLayoutNV = auto_cast GetDeviceProcAddr(device, "vkDestroyIndirectCommandsLayoutNV")
+ vtable.DestroyPipeline = auto_cast GetDeviceProcAddr(device, "vkDestroyPipeline")
+ vtable.DestroyPipelineCache = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineCache")
+ vtable.DestroyPipelineLayout = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineLayout")
+ vtable.DestroyPrivateDataSlotEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyPrivateDataSlotEXT")
+ vtable.DestroyQueryPool = auto_cast GetDeviceProcAddr(device, "vkDestroyQueryPool")
+ vtable.DestroyRenderPass = auto_cast GetDeviceProcAddr(device, "vkDestroyRenderPass")
+ vtable.DestroySampler = auto_cast GetDeviceProcAddr(device, "vkDestroySampler")
+ vtable.DestroySamplerYcbcrConversion = auto_cast GetDeviceProcAddr(device, "vkDestroySamplerYcbcrConversion")
+ vtable.DestroySamplerYcbcrConversionKHR = auto_cast GetDeviceProcAddr(device, "vkDestroySamplerYcbcrConversionKHR")
+ vtable.DestroySemaphore = auto_cast GetDeviceProcAddr(device, "vkDestroySemaphore")
+ vtable.DestroyShaderModule = auto_cast GetDeviceProcAddr(device, "vkDestroyShaderModule")
+ vtable.DestroySwapchainKHR = auto_cast GetDeviceProcAddr(device, "vkDestroySwapchainKHR")
+ vtable.DestroyValidationCacheEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyValidationCacheEXT")
+ vtable.DeviceWaitIdle = auto_cast GetDeviceProcAddr(device, "vkDeviceWaitIdle")
+ vtable.DisplayPowerControlEXT = auto_cast GetDeviceProcAddr(device, "vkDisplayPowerControlEXT")
+ vtable.EndCommandBuffer = auto_cast GetDeviceProcAddr(device, "vkEndCommandBuffer")
+ vtable.FlushMappedMemoryRanges = auto_cast GetDeviceProcAddr(device, "vkFlushMappedMemoryRanges")
+ vtable.FreeCommandBuffers = auto_cast GetDeviceProcAddr(device, "vkFreeCommandBuffers")
+ vtable.FreeDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkFreeDescriptorSets")
+ vtable.FreeMemory = auto_cast GetDeviceProcAddr(device, "vkFreeMemory")
+ vtable.GetAccelerationStructureBuildSizesKHR = auto_cast GetDeviceProcAddr(device, "vkGetAccelerationStructureBuildSizesKHR")
+ vtable.GetAccelerationStructureDeviceAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetAccelerationStructureDeviceAddressKHR")
+ vtable.GetAccelerationStructureHandleNV = auto_cast GetDeviceProcAddr(device, "vkGetAccelerationStructureHandleNV")
+ vtable.GetAccelerationStructureMemoryRequirementsNV = auto_cast GetDeviceProcAddr(device, "vkGetAccelerationStructureMemoryRequirementsNV")
+ vtable.GetBufferDeviceAddress = auto_cast GetDeviceProcAddr(device, "vkGetBufferDeviceAddress")
+ vtable.GetBufferDeviceAddressEXT = auto_cast GetDeviceProcAddr(device, "vkGetBufferDeviceAddressEXT")
+ vtable.GetBufferDeviceAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetBufferDeviceAddressKHR")
+ vtable.GetBufferMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetBufferMemoryRequirements")
+ vtable.GetBufferMemoryRequirements2 = auto_cast GetDeviceProcAddr(device, "vkGetBufferMemoryRequirements2")
+ vtable.GetBufferMemoryRequirements2KHR = auto_cast GetDeviceProcAddr(device, "vkGetBufferMemoryRequirements2KHR")
+ vtable.GetBufferOpaqueCaptureAddress = auto_cast GetDeviceProcAddr(device, "vkGetBufferOpaqueCaptureAddress")
+ vtable.GetBufferOpaqueCaptureAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetBufferOpaqueCaptureAddressKHR")
+ vtable.GetCalibratedTimestampsEXT = auto_cast GetDeviceProcAddr(device, "vkGetCalibratedTimestampsEXT")
+ vtable.GetDeferredOperationMaxConcurrencyKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeferredOperationMaxConcurrencyKHR")
+ vtable.GetDeferredOperationResultKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeferredOperationResultKHR")
+ vtable.GetDescriptorSetLayoutSupport = auto_cast GetDeviceProcAddr(device, "vkGetDescriptorSetLayoutSupport")
+ vtable.GetDescriptorSetLayoutSupportKHR = auto_cast GetDeviceProcAddr(device, "vkGetDescriptorSetLayoutSupportKHR")
+ vtable.GetDeviceAccelerationStructureCompatibilityKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceAccelerationStructureCompatibilityKHR")
+ vtable.GetDeviceGroupPeerMemoryFeatures = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupPeerMemoryFeatures")
+ vtable.GetDeviceGroupPeerMemoryFeaturesKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupPeerMemoryFeaturesKHR")
+ vtable.GetDeviceGroupPresentCapabilitiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupPresentCapabilitiesKHR")
+ vtable.GetDeviceGroupSurfacePresentModes2EXT = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupSurfacePresentModes2EXT")
+ vtable.GetDeviceGroupSurfacePresentModesKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupSurfacePresentModesKHR")
+ vtable.GetDeviceMemoryCommitment = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryCommitment")
+ vtable.GetDeviceMemoryOpaqueCaptureAddress = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryOpaqueCaptureAddress")
+ vtable.GetDeviceMemoryOpaqueCaptureAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
+ vtable.GetDeviceProcAddr = auto_cast GetDeviceProcAddr(device, "vkGetDeviceProcAddr")
+ vtable.GetDeviceQueue = auto_cast GetDeviceProcAddr(device, "vkGetDeviceQueue")
+ vtable.GetDeviceQueue2 = auto_cast GetDeviceProcAddr(device, "vkGetDeviceQueue2")
+ vtable.GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = auto_cast GetDeviceProcAddr(device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
+ 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.GetGeneratedCommandsMemoryRequirementsNV = auto_cast GetDeviceProcAddr(device, "vkGetGeneratedCommandsMemoryRequirementsNV")
+ vtable.GetImageDrmFormatModifierPropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetImageDrmFormatModifierPropertiesEXT")
+ vtable.GetImageMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetImageMemoryRequirements")
+ vtable.GetImageMemoryRequirements2 = auto_cast GetDeviceProcAddr(device, "vkGetImageMemoryRequirements2")
+ vtable.GetImageMemoryRequirements2KHR = auto_cast GetDeviceProcAddr(device, "vkGetImageMemoryRequirements2KHR")
+ vtable.GetImageSparseMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements")
+ vtable.GetImageSparseMemoryRequirements2 = auto_cast GetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements2")
+ vtable.GetImageSparseMemoryRequirements2KHR = auto_cast GetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements2KHR")
+ vtable.GetImageSubresourceLayout = auto_cast GetDeviceProcAddr(device, "vkGetImageSubresourceLayout")
+ vtable.GetImageViewAddressNVX = auto_cast GetDeviceProcAddr(device, "vkGetImageViewAddressNVX")
+ vtable.GetImageViewHandleNVX = auto_cast GetDeviceProcAddr(device, "vkGetImageViewHandleNVX")
+ vtable.GetMemoryFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryFdKHR")
+ vtable.GetMemoryFdPropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryFdPropertiesKHR")
+ vtable.GetMemoryHostPointerPropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetMemoryHostPointerPropertiesEXT")
+ vtable.GetMemoryRemoteAddressNV = auto_cast GetDeviceProcAddr(device, "vkGetMemoryRemoteAddressNV")
+ vtable.GetMemoryWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryWin32HandleKHR")
+ vtable.GetMemoryWin32HandleNV = auto_cast GetDeviceProcAddr(device, "vkGetMemoryWin32HandleNV")
+ vtable.GetMemoryWin32HandlePropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryWin32HandlePropertiesKHR")
+ vtable.GetPastPresentationTimingGOOGLE = auto_cast GetDeviceProcAddr(device, "vkGetPastPresentationTimingGOOGLE")
+ vtable.GetPerformanceParameterINTEL = auto_cast GetDeviceProcAddr(device, "vkGetPerformanceParameterINTEL")
+ 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.GetPrivateDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetPrivateDataEXT")
+ vtable.GetQueryPoolResults = auto_cast GetDeviceProcAddr(device, "vkGetQueryPoolResults")
+ vtable.GetQueueCheckpointData2NV = auto_cast GetDeviceProcAddr(device, "vkGetQueueCheckpointData2NV")
+ vtable.GetQueueCheckpointDataNV = auto_cast GetDeviceProcAddr(device, "vkGetQueueCheckpointDataNV")
+ vtable.GetRayTracingCaptureReplayShaderGroupHandlesKHR = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR")
+ vtable.GetRayTracingShaderGroupHandlesKHR = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingShaderGroupHandlesKHR")
+ vtable.GetRayTracingShaderGroupHandlesNV = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingShaderGroupHandlesNV")
+ vtable.GetRayTracingShaderGroupStackSizeKHR = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingShaderGroupStackSizeKHR")
+ vtable.GetRefreshCycleDurationGOOGLE = auto_cast GetDeviceProcAddr(device, "vkGetRefreshCycleDurationGOOGLE")
+ vtable.GetRenderAreaGranularity = auto_cast GetDeviceProcAddr(device, "vkGetRenderAreaGranularity")
+ vtable.GetSemaphoreCounterValue = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreCounterValue")
+ vtable.GetSemaphoreCounterValueKHR = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreCounterValueKHR")
+ vtable.GetSemaphoreFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreFdKHR")
+ vtable.GetSemaphoreWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreWin32HandleKHR")
+ vtable.GetShaderInfoAMD = auto_cast GetDeviceProcAddr(device, "vkGetShaderInfoAMD")
+ vtable.GetSwapchainCounterEXT = auto_cast GetDeviceProcAddr(device, "vkGetSwapchainCounterEXT")
+ vtable.GetSwapchainImagesKHR = auto_cast GetDeviceProcAddr(device, "vkGetSwapchainImagesKHR")
+ vtable.GetSwapchainStatusKHR = auto_cast GetDeviceProcAddr(device, "vkGetSwapchainStatusKHR")
+ vtable.GetValidationCacheDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetValidationCacheDataEXT")
+ vtable.ImportFenceFdKHR = auto_cast GetDeviceProcAddr(device, "vkImportFenceFdKHR")
+ vtable.ImportFenceWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkImportFenceWin32HandleKHR")
+ vtable.ImportSemaphoreFdKHR = auto_cast GetDeviceProcAddr(device, "vkImportSemaphoreFdKHR")
+ vtable.ImportSemaphoreWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkImportSemaphoreWin32HandleKHR")
+ vtable.InitializePerformanceApiINTEL = auto_cast GetDeviceProcAddr(device, "vkInitializePerformanceApiINTEL")
+ vtable.InvalidateMappedMemoryRanges = auto_cast GetDeviceProcAddr(device, "vkInvalidateMappedMemoryRanges")
+ vtable.MapMemory = auto_cast GetDeviceProcAddr(device, "vkMapMemory")
+ vtable.MergePipelineCaches = auto_cast GetDeviceProcAddr(device, "vkMergePipelineCaches")
+ vtable.MergeValidationCachesEXT = auto_cast GetDeviceProcAddr(device, "vkMergeValidationCachesEXT")
+ vtable.QueueBeginDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueBeginDebugUtilsLabelEXT")
+ vtable.QueueBindSparse = auto_cast GetDeviceProcAddr(device, "vkQueueBindSparse")
+ vtable.QueueEndDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueEndDebugUtilsLabelEXT")
+ vtable.QueueInsertDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueInsertDebugUtilsLabelEXT")
+ vtable.QueuePresentKHR = auto_cast GetDeviceProcAddr(device, "vkQueuePresentKHR")
+ vtable.QueueSetPerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkQueueSetPerformanceConfigurationINTEL")
+ vtable.QueueSubmit = auto_cast GetDeviceProcAddr(device, "vkQueueSubmit")
+ vtable.QueueSubmit2KHR = auto_cast GetDeviceProcAddr(device, "vkQueueSubmit2KHR")
+ vtable.QueueWaitIdle = auto_cast GetDeviceProcAddr(device, "vkQueueWaitIdle")
+ vtable.RegisterDeviceEventEXT = auto_cast GetDeviceProcAddr(device, "vkRegisterDeviceEventEXT")
+ vtable.RegisterDisplayEventEXT = auto_cast GetDeviceProcAddr(device, "vkRegisterDisplayEventEXT")
+ vtable.ReleaseFullScreenExclusiveModeEXT = auto_cast GetDeviceProcAddr(device, "vkReleaseFullScreenExclusiveModeEXT")
+ vtable.ReleasePerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkReleasePerformanceConfigurationINTEL")
+ vtable.ReleaseProfilingLockKHR = auto_cast GetDeviceProcAddr(device, "vkReleaseProfilingLockKHR")
+ vtable.ResetCommandBuffer = auto_cast GetDeviceProcAddr(device, "vkResetCommandBuffer")
+ vtable.ResetCommandPool = auto_cast GetDeviceProcAddr(device, "vkResetCommandPool")
+ vtable.ResetDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkResetDescriptorPool")
+ vtable.ResetEvent = auto_cast GetDeviceProcAddr(device, "vkResetEvent")
+ vtable.ResetFences = auto_cast GetDeviceProcAddr(device, "vkResetFences")
+ vtable.ResetQueryPool = auto_cast GetDeviceProcAddr(device, "vkResetQueryPool")
+ vtable.ResetQueryPoolEXT = auto_cast GetDeviceProcAddr(device, "vkResetQueryPoolEXT")
+ vtable.SetDebugUtilsObjectNameEXT = auto_cast GetDeviceProcAddr(device, "vkSetDebugUtilsObjectNameEXT")
+ vtable.SetDebugUtilsObjectTagEXT = auto_cast GetDeviceProcAddr(device, "vkSetDebugUtilsObjectTagEXT")
+ vtable.SetDeviceMemoryPriorityEXT = auto_cast GetDeviceProcAddr(device, "vkSetDeviceMemoryPriorityEXT")
+ vtable.SetEvent = auto_cast GetDeviceProcAddr(device, "vkSetEvent")
+ vtable.SetHdrMetadataEXT = auto_cast GetDeviceProcAddr(device, "vkSetHdrMetadataEXT")
+ vtable.SetLocalDimmingAMD = auto_cast GetDeviceProcAddr(device, "vkSetLocalDimmingAMD")
+ vtable.SetPrivateDataEXT = auto_cast GetDeviceProcAddr(device, "vkSetPrivateDataEXT")
+ vtable.SignalSemaphore = auto_cast GetDeviceProcAddr(device, "vkSignalSemaphore")
+ vtable.SignalSemaphoreKHR = auto_cast GetDeviceProcAddr(device, "vkSignalSemaphoreKHR")
+ vtable.TrimCommandPool = auto_cast GetDeviceProcAddr(device, "vkTrimCommandPool")
+ vtable.TrimCommandPoolKHR = auto_cast GetDeviceProcAddr(device, "vkTrimCommandPoolKHR")
+ vtable.UninitializePerformanceApiINTEL = auto_cast GetDeviceProcAddr(device, "vkUninitializePerformanceApiINTEL")
+ vtable.UnmapMemory = auto_cast GetDeviceProcAddr(device, "vkUnmapMemory")
+ vtable.UpdateDescriptorSetWithTemplate = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplate")
+ vtable.UpdateDescriptorSetWithTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplateKHR")
+ vtable.UpdateDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSets")
+ vtable.WaitForFences = auto_cast GetDeviceProcAddr(device, "vkWaitForFences")
+ vtable.WaitForPresentKHR = auto_cast GetDeviceProcAddr(device, "vkWaitForPresentKHR")
+ vtable.WaitSemaphores = auto_cast GetDeviceProcAddr(device, "vkWaitSemaphores")
+ vtable.WaitSemaphoresKHR = auto_cast GetDeviceProcAddr(device, "vkWaitSemaphoresKHR")
+ vtable.WriteAccelerationStructuresPropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkWriteAccelerationStructuresPropertiesKHR")
}
+load_proc_addresses_device :: proc(device: Device) {
+ AcquireFullScreenExclusiveModeEXT = auto_cast GetDeviceProcAddr(device, "vkAcquireFullScreenExclusiveModeEXT")
+ AcquireNextImage2KHR = auto_cast GetDeviceProcAddr(device, "vkAcquireNextImage2KHR")
+ AcquireNextImageKHR = auto_cast GetDeviceProcAddr(device, "vkAcquireNextImageKHR")
+ AcquirePerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkAcquirePerformanceConfigurationINTEL")
+ AcquireProfilingLockKHR = auto_cast GetDeviceProcAddr(device, "vkAcquireProfilingLockKHR")
+ AllocateCommandBuffers = auto_cast GetDeviceProcAddr(device, "vkAllocateCommandBuffers")
+ AllocateDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkAllocateDescriptorSets")
+ AllocateMemory = auto_cast GetDeviceProcAddr(device, "vkAllocateMemory")
+ BeginCommandBuffer = auto_cast GetDeviceProcAddr(device, "vkBeginCommandBuffer")
+ BindAccelerationStructureMemoryNV = auto_cast GetDeviceProcAddr(device, "vkBindAccelerationStructureMemoryNV")
+ BindBufferMemory = auto_cast GetDeviceProcAddr(device, "vkBindBufferMemory")
+ BindBufferMemory2 = auto_cast GetDeviceProcAddr(device, "vkBindBufferMemory2")
+ BindBufferMemory2KHR = auto_cast GetDeviceProcAddr(device, "vkBindBufferMemory2KHR")
+ BindImageMemory = auto_cast GetDeviceProcAddr(device, "vkBindImageMemory")
+ BindImageMemory2 = auto_cast GetDeviceProcAddr(device, "vkBindImageMemory2")
+ BindImageMemory2KHR = auto_cast GetDeviceProcAddr(device, "vkBindImageMemory2KHR")
+ BuildAccelerationStructuresKHR = auto_cast GetDeviceProcAddr(device, "vkBuildAccelerationStructuresKHR")
+ CmdBeginConditionalRenderingEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginConditionalRenderingEXT")
+ CmdBeginDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginDebugUtilsLabelEXT")
+ CmdBeginQuery = auto_cast GetDeviceProcAddr(device, "vkCmdBeginQuery")
+ CmdBeginQueryIndexedEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginQueryIndexedEXT")
+ CmdBeginRenderPass = auto_cast GetDeviceProcAddr(device, "vkCmdBeginRenderPass")
+ CmdBeginRenderPass2 = auto_cast GetDeviceProcAddr(device, "vkCmdBeginRenderPass2")
+ CmdBeginRenderPass2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdBeginRenderPass2KHR")
+ CmdBeginTransformFeedbackEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBeginTransformFeedbackEXT")
+ CmdBindDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkCmdBindDescriptorSets")
+ CmdBindIndexBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdBindIndexBuffer")
+ CmdBindInvocationMaskHUAWEI = auto_cast GetDeviceProcAddr(device, "vkCmdBindInvocationMaskHUAWEI")
+ CmdBindPipeline = auto_cast GetDeviceProcAddr(device, "vkCmdBindPipeline")
+ CmdBindPipelineShaderGroupNV = auto_cast GetDeviceProcAddr(device, "vkCmdBindPipelineShaderGroupNV")
+ CmdBindShadingRateImageNV = auto_cast GetDeviceProcAddr(device, "vkCmdBindShadingRateImageNV")
+ CmdBindTransformFeedbackBuffersEXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindTransformFeedbackBuffersEXT")
+ CmdBindVertexBuffers = auto_cast GetDeviceProcAddr(device, "vkCmdBindVertexBuffers")
+ CmdBindVertexBuffers2EXT = auto_cast GetDeviceProcAddr(device, "vkCmdBindVertexBuffers2EXT")
+ CmdBlitImage = auto_cast GetDeviceProcAddr(device, "vkCmdBlitImage")
+ CmdBlitImage2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdBlitImage2KHR")
+ CmdBuildAccelerationStructureNV = auto_cast GetDeviceProcAddr(device, "vkCmdBuildAccelerationStructureNV")
+ CmdBuildAccelerationStructuresIndirectKHR = auto_cast GetDeviceProcAddr(device, "vkCmdBuildAccelerationStructuresIndirectKHR")
+ CmdBuildAccelerationStructuresKHR = auto_cast GetDeviceProcAddr(device, "vkCmdBuildAccelerationStructuresKHR")
+ CmdClearAttachments = auto_cast GetDeviceProcAddr(device, "vkCmdClearAttachments")
+ CmdClearColorImage = auto_cast GetDeviceProcAddr(device, "vkCmdClearColorImage")
+ CmdClearDepthStencilImage = auto_cast GetDeviceProcAddr(device, "vkCmdClearDepthStencilImage")
+ CmdCopyAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyAccelerationStructureKHR")
+ CmdCopyAccelerationStructureNV = auto_cast GetDeviceProcAddr(device, "vkCmdCopyAccelerationStructureNV")
+ CmdCopyAccelerationStructureToMemoryKHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyAccelerationStructureToMemoryKHR")
+ CmdCopyBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdCopyBuffer")
+ CmdCopyBuffer2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyBuffer2KHR")
+ CmdCopyBufferToImage = auto_cast GetDeviceProcAddr(device, "vkCmdCopyBufferToImage")
+ CmdCopyBufferToImage2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyBufferToImage2KHR")
+ CmdCopyImage = auto_cast GetDeviceProcAddr(device, "vkCmdCopyImage")
+ CmdCopyImage2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyImage2KHR")
+ CmdCopyImageToBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdCopyImageToBuffer")
+ CmdCopyImageToBuffer2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyImageToBuffer2KHR")
+ CmdCopyMemoryToAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCmdCopyMemoryToAccelerationStructureKHR")
+ CmdCopyQueryPoolResults = auto_cast GetDeviceProcAddr(device, "vkCmdCopyQueryPoolResults")
+ CmdCuLaunchKernelNVX = auto_cast GetDeviceProcAddr(device, "vkCmdCuLaunchKernelNVX")
+ CmdDebugMarkerBeginEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerBeginEXT")
+ CmdDebugMarkerEndEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerEndEXT")
+ CmdDebugMarkerInsertEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDebugMarkerInsertEXT")
+ CmdDispatch = auto_cast GetDeviceProcAddr(device, "vkCmdDispatch")
+ CmdDispatchBase = auto_cast GetDeviceProcAddr(device, "vkCmdDispatchBase")
+ CmdDispatchBaseKHR = auto_cast GetDeviceProcAddr(device, "vkCmdDispatchBaseKHR")
+ CmdDispatchIndirect = auto_cast GetDeviceProcAddr(device, "vkCmdDispatchIndirect")
+ CmdDraw = auto_cast GetDeviceProcAddr(device, "vkCmdDraw")
+ CmdDrawIndexed = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexed")
+ CmdDrawIndexedIndirect = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexedIndirect")
+ CmdDrawIndexedIndirectCount = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexedIndirectCount")
+ CmdDrawIndexedIndirectCountAMD = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexedIndirectCountAMD")
+ CmdDrawIndexedIndirectCountKHR = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndexedIndirectCountKHR")
+ CmdDrawIndirect = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirect")
+ CmdDrawIndirectByteCountEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirectByteCountEXT")
+ CmdDrawIndirectCount = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirectCount")
+ CmdDrawIndirectCountAMD = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirectCountAMD")
+ CmdDrawIndirectCountKHR = auto_cast GetDeviceProcAddr(device, "vkCmdDrawIndirectCountKHR")
+ CmdDrawMeshTasksIndirectCountNV = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMeshTasksIndirectCountNV")
+ CmdDrawMeshTasksIndirectNV = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMeshTasksIndirectNV")
+ CmdDrawMeshTasksNV = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMeshTasksNV")
+ CmdDrawMultiEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMultiEXT")
+ CmdDrawMultiIndexedEXT = auto_cast GetDeviceProcAddr(device, "vkCmdDrawMultiIndexedEXT")
+ CmdEndConditionalRenderingEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndConditionalRenderingEXT")
+ CmdEndDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndDebugUtilsLabelEXT")
+ CmdEndQuery = auto_cast GetDeviceProcAddr(device, "vkCmdEndQuery")
+ CmdEndQueryIndexedEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndQueryIndexedEXT")
+ CmdEndRenderPass = auto_cast GetDeviceProcAddr(device, "vkCmdEndRenderPass")
+ CmdEndRenderPass2 = auto_cast GetDeviceProcAddr(device, "vkCmdEndRenderPass2")
+ CmdEndRenderPass2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdEndRenderPass2KHR")
+ CmdEndTransformFeedbackEXT = auto_cast GetDeviceProcAddr(device, "vkCmdEndTransformFeedbackEXT")
+ CmdExecuteCommands = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteCommands")
+ CmdExecuteGeneratedCommandsNV = auto_cast GetDeviceProcAddr(device, "vkCmdExecuteGeneratedCommandsNV")
+ CmdFillBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdFillBuffer")
+ CmdInsertDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkCmdInsertDebugUtilsLabelEXT")
+ CmdNextSubpass = auto_cast GetDeviceProcAddr(device, "vkCmdNextSubpass")
+ CmdNextSubpass2 = auto_cast GetDeviceProcAddr(device, "vkCmdNextSubpass2")
+ CmdNextSubpass2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdNextSubpass2KHR")
+ CmdPipelineBarrier = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier")
+ CmdPipelineBarrier2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdPipelineBarrier2KHR")
+ CmdPreprocessGeneratedCommandsNV = auto_cast GetDeviceProcAddr(device, "vkCmdPreprocessGeneratedCommandsNV")
+ CmdPushConstants = auto_cast GetDeviceProcAddr(device, "vkCmdPushConstants")
+ CmdPushDescriptorSetKHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetKHR")
+ CmdPushDescriptorSetWithTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkCmdPushDescriptorSetWithTemplateKHR")
+ CmdResetEvent = auto_cast GetDeviceProcAddr(device, "vkCmdResetEvent")
+ CmdResetEvent2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdResetEvent2KHR")
+ CmdResetQueryPool = auto_cast GetDeviceProcAddr(device, "vkCmdResetQueryPool")
+ CmdResolveImage = auto_cast GetDeviceProcAddr(device, "vkCmdResolveImage")
+ CmdResolveImage2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdResolveImage2KHR")
+ CmdSetBlendConstants = auto_cast GetDeviceProcAddr(device, "vkCmdSetBlendConstants")
+ CmdSetCheckpointNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetCheckpointNV")
+ CmdSetCoarseSampleOrderNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetCoarseSampleOrderNV")
+ CmdSetCullModeEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetCullModeEXT")
+ CmdSetDepthBias = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBias")
+ CmdSetDepthBiasEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBiasEnableEXT")
+ CmdSetDepthBounds = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBounds")
+ CmdSetDepthBoundsTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthBoundsTestEnableEXT")
+ CmdSetDepthCompareOpEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthCompareOpEXT")
+ CmdSetDepthTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthTestEnableEXT")
+ CmdSetDepthWriteEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDepthWriteEnableEXT")
+ CmdSetDeviceMask = auto_cast GetDeviceProcAddr(device, "vkCmdSetDeviceMask")
+ CmdSetDeviceMaskKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetDeviceMaskKHR")
+ CmdSetDiscardRectangleEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetDiscardRectangleEXT")
+ CmdSetEvent = auto_cast GetDeviceProcAddr(device, "vkCmdSetEvent")
+ CmdSetEvent2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetEvent2KHR")
+ CmdSetExclusiveScissorNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetExclusiveScissorNV")
+ CmdSetFragmentShadingRateEnumNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetFragmentShadingRateEnumNV")
+ CmdSetFragmentShadingRateKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetFragmentShadingRateKHR")
+ CmdSetFrontFaceEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetFrontFaceEXT")
+ CmdSetLineStippleEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineStippleEXT")
+ CmdSetLineWidth = auto_cast GetDeviceProcAddr(device, "vkCmdSetLineWidth")
+ CmdSetLogicOpEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetLogicOpEXT")
+ CmdSetPatchControlPointsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetPatchControlPointsEXT")
+ CmdSetPerformanceMarkerINTEL = auto_cast GetDeviceProcAddr(device, "vkCmdSetPerformanceMarkerINTEL")
+ CmdSetPerformanceOverrideINTEL = auto_cast GetDeviceProcAddr(device, "vkCmdSetPerformanceOverrideINTEL")
+ CmdSetPerformanceStreamMarkerINTEL = auto_cast GetDeviceProcAddr(device, "vkCmdSetPerformanceStreamMarkerINTEL")
+ CmdSetPrimitiveRestartEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetPrimitiveRestartEnableEXT")
+ CmdSetPrimitiveTopologyEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetPrimitiveTopologyEXT")
+ CmdSetRasterizerDiscardEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetRasterizerDiscardEnableEXT")
+ CmdSetRayTracingPipelineStackSizeKHR = auto_cast GetDeviceProcAddr(device, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ CmdSetSampleLocationsEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetSampleLocationsEXT")
+ CmdSetScissor = auto_cast GetDeviceProcAddr(device, "vkCmdSetScissor")
+ CmdSetScissorWithCountEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetScissorWithCountEXT")
+ CmdSetStencilCompareMask = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilCompareMask")
+ CmdSetStencilOpEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilOpEXT")
+ CmdSetStencilReference = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilReference")
+ CmdSetStencilTestEnableEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilTestEnableEXT")
+ CmdSetStencilWriteMask = auto_cast GetDeviceProcAddr(device, "vkCmdSetStencilWriteMask")
+ CmdSetVertexInputEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetVertexInputEXT")
+ CmdSetViewport = auto_cast GetDeviceProcAddr(device, "vkCmdSetViewport")
+ CmdSetViewportShadingRatePaletteNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetViewportShadingRatePaletteNV")
+ CmdSetViewportWScalingNV = auto_cast GetDeviceProcAddr(device, "vkCmdSetViewportWScalingNV")
+ CmdSetViewportWithCountEXT = auto_cast GetDeviceProcAddr(device, "vkCmdSetViewportWithCountEXT")
+ CmdSubpassShadingHUAWEI = auto_cast GetDeviceProcAddr(device, "vkCmdSubpassShadingHUAWEI")
+ CmdTraceRaysIndirectKHR = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysIndirectKHR")
+ CmdTraceRaysKHR = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysKHR")
+ CmdTraceRaysNV = auto_cast GetDeviceProcAddr(device, "vkCmdTraceRaysNV")
+ CmdUpdateBuffer = auto_cast GetDeviceProcAddr(device, "vkCmdUpdateBuffer")
+ CmdWaitEvents = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents")
+ CmdWaitEvents2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdWaitEvents2KHR")
+ CmdWriteAccelerationStructuresPropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkCmdWriteAccelerationStructuresPropertiesKHR")
+ CmdWriteAccelerationStructuresPropertiesNV = auto_cast GetDeviceProcAddr(device, "vkCmdWriteAccelerationStructuresPropertiesNV")
+ CmdWriteBufferMarker2AMD = auto_cast GetDeviceProcAddr(device, "vkCmdWriteBufferMarker2AMD")
+ CmdWriteBufferMarkerAMD = auto_cast GetDeviceProcAddr(device, "vkCmdWriteBufferMarkerAMD")
+ CmdWriteTimestamp = auto_cast GetDeviceProcAddr(device, "vkCmdWriteTimestamp")
+ CmdWriteTimestamp2KHR = auto_cast GetDeviceProcAddr(device, "vkCmdWriteTimestamp2KHR")
+ CompileDeferredNV = auto_cast GetDeviceProcAddr(device, "vkCompileDeferredNV")
+ CopyAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCopyAccelerationStructureKHR")
+ CopyAccelerationStructureToMemoryKHR = auto_cast GetDeviceProcAddr(device, "vkCopyAccelerationStructureToMemoryKHR")
+ CopyMemoryToAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCopyMemoryToAccelerationStructureKHR")
+ CreateAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkCreateAccelerationStructureKHR")
+ CreateAccelerationStructureNV = auto_cast GetDeviceProcAddr(device, "vkCreateAccelerationStructureNV")
+ CreateBuffer = auto_cast GetDeviceProcAddr(device, "vkCreateBuffer")
+ CreateBufferView = auto_cast GetDeviceProcAddr(device, "vkCreateBufferView")
+ CreateCommandPool = auto_cast GetDeviceProcAddr(device, "vkCreateCommandPool")
+ CreateComputePipelines = auto_cast GetDeviceProcAddr(device, "vkCreateComputePipelines")
+ CreateCuFunctionNVX = auto_cast GetDeviceProcAddr(device, "vkCreateCuFunctionNVX")
+ CreateCuModuleNVX = auto_cast GetDeviceProcAddr(device, "vkCreateCuModuleNVX")
+ CreateDeferredOperationKHR = auto_cast GetDeviceProcAddr(device, "vkCreateDeferredOperationKHR")
+ CreateDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorPool")
+ CreateDescriptorSetLayout = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorSetLayout")
+ CreateDescriptorUpdateTemplate = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorUpdateTemplate")
+ CreateDescriptorUpdateTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkCreateDescriptorUpdateTemplateKHR")
+ CreateEvent = auto_cast GetDeviceProcAddr(device, "vkCreateEvent")
+ CreateFence = auto_cast GetDeviceProcAddr(device, "vkCreateFence")
+ CreateFramebuffer = auto_cast GetDeviceProcAddr(device, "vkCreateFramebuffer")
+ CreateGraphicsPipelines = auto_cast GetDeviceProcAddr(device, "vkCreateGraphicsPipelines")
+ CreateImage = auto_cast GetDeviceProcAddr(device, "vkCreateImage")
+ CreateImageView = auto_cast GetDeviceProcAddr(device, "vkCreateImageView")
+ CreateIndirectCommandsLayoutNV = auto_cast GetDeviceProcAddr(device, "vkCreateIndirectCommandsLayoutNV")
+ CreatePipelineCache = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineCache")
+ CreatePipelineLayout = auto_cast GetDeviceProcAddr(device, "vkCreatePipelineLayout")
+ CreatePrivateDataSlotEXT = auto_cast GetDeviceProcAddr(device, "vkCreatePrivateDataSlotEXT")
+ CreateQueryPool = auto_cast GetDeviceProcAddr(device, "vkCreateQueryPool")
+ CreateRayTracingPipelinesKHR = auto_cast GetDeviceProcAddr(device, "vkCreateRayTracingPipelinesKHR")
+ CreateRayTracingPipelinesNV = auto_cast GetDeviceProcAddr(device, "vkCreateRayTracingPipelinesNV")
+ CreateRenderPass = auto_cast GetDeviceProcAddr(device, "vkCreateRenderPass")
+ CreateRenderPass2 = auto_cast GetDeviceProcAddr(device, "vkCreateRenderPass2")
+ CreateRenderPass2KHR = auto_cast GetDeviceProcAddr(device, "vkCreateRenderPass2KHR")
+ CreateSampler = auto_cast GetDeviceProcAddr(device, "vkCreateSampler")
+ CreateSamplerYcbcrConversion = auto_cast GetDeviceProcAddr(device, "vkCreateSamplerYcbcrConversion")
+ CreateSamplerYcbcrConversionKHR = auto_cast GetDeviceProcAddr(device, "vkCreateSamplerYcbcrConversionKHR")
+ CreateSemaphore = auto_cast GetDeviceProcAddr(device, "vkCreateSemaphore")
+ CreateShaderModule = auto_cast GetDeviceProcAddr(device, "vkCreateShaderModule")
+ CreateSharedSwapchainsKHR = auto_cast GetDeviceProcAddr(device, "vkCreateSharedSwapchainsKHR")
+ CreateSwapchainKHR = auto_cast GetDeviceProcAddr(device, "vkCreateSwapchainKHR")
+ CreateValidationCacheEXT = auto_cast GetDeviceProcAddr(device, "vkCreateValidationCacheEXT")
+ DebugMarkerSetObjectNameEXT = auto_cast GetDeviceProcAddr(device, "vkDebugMarkerSetObjectNameEXT")
+ DebugMarkerSetObjectTagEXT = auto_cast GetDeviceProcAddr(device, "vkDebugMarkerSetObjectTagEXT")
+ DeferredOperationJoinKHR = auto_cast GetDeviceProcAddr(device, "vkDeferredOperationJoinKHR")
+ DestroyAccelerationStructureKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyAccelerationStructureKHR")
+ DestroyAccelerationStructureNV = auto_cast GetDeviceProcAddr(device, "vkDestroyAccelerationStructureNV")
+ DestroyBuffer = auto_cast GetDeviceProcAddr(device, "vkDestroyBuffer")
+ DestroyBufferView = auto_cast GetDeviceProcAddr(device, "vkDestroyBufferView")
+ DestroyCommandPool = auto_cast GetDeviceProcAddr(device, "vkDestroyCommandPool")
+ DestroyCuFunctionNVX = auto_cast GetDeviceProcAddr(device, "vkDestroyCuFunctionNVX")
+ DestroyCuModuleNVX = auto_cast GetDeviceProcAddr(device, "vkDestroyCuModuleNVX")
+ DestroyDeferredOperationKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyDeferredOperationKHR")
+ DestroyDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorPool")
+ DestroyDescriptorSetLayout = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorSetLayout")
+ DestroyDescriptorUpdateTemplate = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorUpdateTemplate")
+ DestroyDescriptorUpdateTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkDestroyDescriptorUpdateTemplateKHR")
+ DestroyDevice = auto_cast GetDeviceProcAddr(device, "vkDestroyDevice")
+ DestroyEvent = auto_cast GetDeviceProcAddr(device, "vkDestroyEvent")
+ DestroyFence = auto_cast GetDeviceProcAddr(device, "vkDestroyFence")
+ DestroyFramebuffer = auto_cast GetDeviceProcAddr(device, "vkDestroyFramebuffer")
+ DestroyImage = auto_cast GetDeviceProcAddr(device, "vkDestroyImage")
+ DestroyImageView = auto_cast GetDeviceProcAddr(device, "vkDestroyImageView")
+ DestroyIndirectCommandsLayoutNV = auto_cast GetDeviceProcAddr(device, "vkDestroyIndirectCommandsLayoutNV")
+ DestroyPipeline = auto_cast GetDeviceProcAddr(device, "vkDestroyPipeline")
+ DestroyPipelineCache = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineCache")
+ DestroyPipelineLayout = auto_cast GetDeviceProcAddr(device, "vkDestroyPipelineLayout")
+ DestroyPrivateDataSlotEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyPrivateDataSlotEXT")
+ DestroyQueryPool = auto_cast GetDeviceProcAddr(device, "vkDestroyQueryPool")
+ DestroyRenderPass = auto_cast GetDeviceProcAddr(device, "vkDestroyRenderPass")
+ DestroySampler = auto_cast GetDeviceProcAddr(device, "vkDestroySampler")
+ DestroySamplerYcbcrConversion = auto_cast GetDeviceProcAddr(device, "vkDestroySamplerYcbcrConversion")
+ DestroySamplerYcbcrConversionKHR = auto_cast GetDeviceProcAddr(device, "vkDestroySamplerYcbcrConversionKHR")
+ DestroySemaphore = auto_cast GetDeviceProcAddr(device, "vkDestroySemaphore")
+ DestroyShaderModule = auto_cast GetDeviceProcAddr(device, "vkDestroyShaderModule")
+ DestroySwapchainKHR = auto_cast GetDeviceProcAddr(device, "vkDestroySwapchainKHR")
+ DestroyValidationCacheEXT = auto_cast GetDeviceProcAddr(device, "vkDestroyValidationCacheEXT")
+ DeviceWaitIdle = auto_cast GetDeviceProcAddr(device, "vkDeviceWaitIdle")
+ DisplayPowerControlEXT = auto_cast GetDeviceProcAddr(device, "vkDisplayPowerControlEXT")
+ EndCommandBuffer = auto_cast GetDeviceProcAddr(device, "vkEndCommandBuffer")
+ FlushMappedMemoryRanges = auto_cast GetDeviceProcAddr(device, "vkFlushMappedMemoryRanges")
+ FreeCommandBuffers = auto_cast GetDeviceProcAddr(device, "vkFreeCommandBuffers")
+ FreeDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkFreeDescriptorSets")
+ FreeMemory = auto_cast GetDeviceProcAddr(device, "vkFreeMemory")
+ GetAccelerationStructureBuildSizesKHR = auto_cast GetDeviceProcAddr(device, "vkGetAccelerationStructureBuildSizesKHR")
+ GetAccelerationStructureDeviceAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetAccelerationStructureDeviceAddressKHR")
+ GetAccelerationStructureHandleNV = auto_cast GetDeviceProcAddr(device, "vkGetAccelerationStructureHandleNV")
+ GetAccelerationStructureMemoryRequirementsNV = auto_cast GetDeviceProcAddr(device, "vkGetAccelerationStructureMemoryRequirementsNV")
+ GetBufferDeviceAddress = auto_cast GetDeviceProcAddr(device, "vkGetBufferDeviceAddress")
+ GetBufferDeviceAddressEXT = auto_cast GetDeviceProcAddr(device, "vkGetBufferDeviceAddressEXT")
+ GetBufferDeviceAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetBufferDeviceAddressKHR")
+ GetBufferMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetBufferMemoryRequirements")
+ GetBufferMemoryRequirements2 = auto_cast GetDeviceProcAddr(device, "vkGetBufferMemoryRequirements2")
+ GetBufferMemoryRequirements2KHR = auto_cast GetDeviceProcAddr(device, "vkGetBufferMemoryRequirements2KHR")
+ GetBufferOpaqueCaptureAddress = auto_cast GetDeviceProcAddr(device, "vkGetBufferOpaqueCaptureAddress")
+ GetBufferOpaqueCaptureAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetBufferOpaqueCaptureAddressKHR")
+ GetCalibratedTimestampsEXT = auto_cast GetDeviceProcAddr(device, "vkGetCalibratedTimestampsEXT")
+ GetDeferredOperationMaxConcurrencyKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeferredOperationMaxConcurrencyKHR")
+ GetDeferredOperationResultKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeferredOperationResultKHR")
+ GetDescriptorSetLayoutSupport = auto_cast GetDeviceProcAddr(device, "vkGetDescriptorSetLayoutSupport")
+ GetDescriptorSetLayoutSupportKHR = auto_cast GetDeviceProcAddr(device, "vkGetDescriptorSetLayoutSupportKHR")
+ GetDeviceAccelerationStructureCompatibilityKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceAccelerationStructureCompatibilityKHR")
+ GetDeviceGroupPeerMemoryFeatures = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupPeerMemoryFeatures")
+ GetDeviceGroupPeerMemoryFeaturesKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupPeerMemoryFeaturesKHR")
+ GetDeviceGroupPresentCapabilitiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupPresentCapabilitiesKHR")
+ GetDeviceGroupSurfacePresentModes2EXT = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupSurfacePresentModes2EXT")
+ GetDeviceGroupSurfacePresentModesKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceGroupSurfacePresentModesKHR")
+ GetDeviceMemoryCommitment = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryCommitment")
+ GetDeviceMemoryOpaqueCaptureAddress = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryOpaqueCaptureAddress")
+ GetDeviceMemoryOpaqueCaptureAddressKHR = auto_cast GetDeviceProcAddr(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
+ GetDeviceProcAddr = auto_cast GetDeviceProcAddr(device, "vkGetDeviceProcAddr")
+ GetDeviceQueue = auto_cast GetDeviceProcAddr(device, "vkGetDeviceQueue")
+ GetDeviceQueue2 = auto_cast GetDeviceProcAddr(device, "vkGetDeviceQueue2")
+ GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = auto_cast GetDeviceProcAddr(device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
+ GetEventStatus = auto_cast GetDeviceProcAddr(device, "vkGetEventStatus")
+ GetFenceFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetFenceFdKHR")
+ GetFenceStatus = auto_cast GetDeviceProcAddr(device, "vkGetFenceStatus")
+ GetFenceWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkGetFenceWin32HandleKHR")
+ GetGeneratedCommandsMemoryRequirementsNV = auto_cast GetDeviceProcAddr(device, "vkGetGeneratedCommandsMemoryRequirementsNV")
+ GetImageDrmFormatModifierPropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetImageDrmFormatModifierPropertiesEXT")
+ GetImageMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetImageMemoryRequirements")
+ GetImageMemoryRequirements2 = auto_cast GetDeviceProcAddr(device, "vkGetImageMemoryRequirements2")
+ GetImageMemoryRequirements2KHR = auto_cast GetDeviceProcAddr(device, "vkGetImageMemoryRequirements2KHR")
+ GetImageSparseMemoryRequirements = auto_cast GetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements")
+ GetImageSparseMemoryRequirements2 = auto_cast GetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements2")
+ GetImageSparseMemoryRequirements2KHR = auto_cast GetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements2KHR")
+ GetImageSubresourceLayout = auto_cast GetDeviceProcAddr(device, "vkGetImageSubresourceLayout")
+ GetImageViewAddressNVX = auto_cast GetDeviceProcAddr(device, "vkGetImageViewAddressNVX")
+ GetImageViewHandleNVX = auto_cast GetDeviceProcAddr(device, "vkGetImageViewHandleNVX")
+ GetMemoryFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryFdKHR")
+ GetMemoryFdPropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryFdPropertiesKHR")
+ GetMemoryHostPointerPropertiesEXT = auto_cast GetDeviceProcAddr(device, "vkGetMemoryHostPointerPropertiesEXT")
+ GetMemoryRemoteAddressNV = auto_cast GetDeviceProcAddr(device, "vkGetMemoryRemoteAddressNV")
+ GetMemoryWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryWin32HandleKHR")
+ GetMemoryWin32HandleNV = auto_cast GetDeviceProcAddr(device, "vkGetMemoryWin32HandleNV")
+ GetMemoryWin32HandlePropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetMemoryWin32HandlePropertiesKHR")
+ GetPastPresentationTimingGOOGLE = auto_cast GetDeviceProcAddr(device, "vkGetPastPresentationTimingGOOGLE")
+ GetPerformanceParameterINTEL = auto_cast GetDeviceProcAddr(device, "vkGetPerformanceParameterINTEL")
+ GetPipelineCacheData = auto_cast GetDeviceProcAddr(device, "vkGetPipelineCacheData")
+ GetPipelineExecutableInternalRepresentationsKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutableInternalRepresentationsKHR")
+ GetPipelineExecutablePropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutablePropertiesKHR")
+ GetPipelineExecutableStatisticsKHR = auto_cast GetDeviceProcAddr(device, "vkGetPipelineExecutableStatisticsKHR")
+ GetPrivateDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetPrivateDataEXT")
+ GetQueryPoolResults = auto_cast GetDeviceProcAddr(device, "vkGetQueryPoolResults")
+ GetQueueCheckpointData2NV = auto_cast GetDeviceProcAddr(device, "vkGetQueueCheckpointData2NV")
+ GetQueueCheckpointDataNV = auto_cast GetDeviceProcAddr(device, "vkGetQueueCheckpointDataNV")
+ GetRayTracingCaptureReplayShaderGroupHandlesKHR = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR")
+ GetRayTracingShaderGroupHandlesKHR = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingShaderGroupHandlesKHR")
+ GetRayTracingShaderGroupHandlesNV = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingShaderGroupHandlesNV")
+ GetRayTracingShaderGroupStackSizeKHR = auto_cast GetDeviceProcAddr(device, "vkGetRayTracingShaderGroupStackSizeKHR")
+ GetRefreshCycleDurationGOOGLE = auto_cast GetDeviceProcAddr(device, "vkGetRefreshCycleDurationGOOGLE")
+ GetRenderAreaGranularity = auto_cast GetDeviceProcAddr(device, "vkGetRenderAreaGranularity")
+ GetSemaphoreCounterValue = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreCounterValue")
+ GetSemaphoreCounterValueKHR = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreCounterValueKHR")
+ GetSemaphoreFdKHR = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreFdKHR")
+ GetSemaphoreWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkGetSemaphoreWin32HandleKHR")
+ GetShaderInfoAMD = auto_cast GetDeviceProcAddr(device, "vkGetShaderInfoAMD")
+ GetSwapchainCounterEXT = auto_cast GetDeviceProcAddr(device, "vkGetSwapchainCounterEXT")
+ GetSwapchainImagesKHR = auto_cast GetDeviceProcAddr(device, "vkGetSwapchainImagesKHR")
+ GetSwapchainStatusKHR = auto_cast GetDeviceProcAddr(device, "vkGetSwapchainStatusKHR")
+ GetValidationCacheDataEXT = auto_cast GetDeviceProcAddr(device, "vkGetValidationCacheDataEXT")
+ ImportFenceFdKHR = auto_cast GetDeviceProcAddr(device, "vkImportFenceFdKHR")
+ ImportFenceWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkImportFenceWin32HandleKHR")
+ ImportSemaphoreFdKHR = auto_cast GetDeviceProcAddr(device, "vkImportSemaphoreFdKHR")
+ ImportSemaphoreWin32HandleKHR = auto_cast GetDeviceProcAddr(device, "vkImportSemaphoreWin32HandleKHR")
+ InitializePerformanceApiINTEL = auto_cast GetDeviceProcAddr(device, "vkInitializePerformanceApiINTEL")
+ InvalidateMappedMemoryRanges = auto_cast GetDeviceProcAddr(device, "vkInvalidateMappedMemoryRanges")
+ MapMemory = auto_cast GetDeviceProcAddr(device, "vkMapMemory")
+ MergePipelineCaches = auto_cast GetDeviceProcAddr(device, "vkMergePipelineCaches")
+ MergeValidationCachesEXT = auto_cast GetDeviceProcAddr(device, "vkMergeValidationCachesEXT")
+ QueueBeginDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueBeginDebugUtilsLabelEXT")
+ QueueBindSparse = auto_cast GetDeviceProcAddr(device, "vkQueueBindSparse")
+ QueueEndDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueEndDebugUtilsLabelEXT")
+ QueueInsertDebugUtilsLabelEXT = auto_cast GetDeviceProcAddr(device, "vkQueueInsertDebugUtilsLabelEXT")
+ QueuePresentKHR = auto_cast GetDeviceProcAddr(device, "vkQueuePresentKHR")
+ QueueSetPerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkQueueSetPerformanceConfigurationINTEL")
+ QueueSubmit = auto_cast GetDeviceProcAddr(device, "vkQueueSubmit")
+ QueueSubmit2KHR = auto_cast GetDeviceProcAddr(device, "vkQueueSubmit2KHR")
+ QueueWaitIdle = auto_cast GetDeviceProcAddr(device, "vkQueueWaitIdle")
+ RegisterDeviceEventEXT = auto_cast GetDeviceProcAddr(device, "vkRegisterDeviceEventEXT")
+ RegisterDisplayEventEXT = auto_cast GetDeviceProcAddr(device, "vkRegisterDisplayEventEXT")
+ ReleaseFullScreenExclusiveModeEXT = auto_cast GetDeviceProcAddr(device, "vkReleaseFullScreenExclusiveModeEXT")
+ ReleasePerformanceConfigurationINTEL = auto_cast GetDeviceProcAddr(device, "vkReleasePerformanceConfigurationINTEL")
+ ReleaseProfilingLockKHR = auto_cast GetDeviceProcAddr(device, "vkReleaseProfilingLockKHR")
+ ResetCommandBuffer = auto_cast GetDeviceProcAddr(device, "vkResetCommandBuffer")
+ ResetCommandPool = auto_cast GetDeviceProcAddr(device, "vkResetCommandPool")
+ ResetDescriptorPool = auto_cast GetDeviceProcAddr(device, "vkResetDescriptorPool")
+ ResetEvent = auto_cast GetDeviceProcAddr(device, "vkResetEvent")
+ ResetFences = auto_cast GetDeviceProcAddr(device, "vkResetFences")
+ ResetQueryPool = auto_cast GetDeviceProcAddr(device, "vkResetQueryPool")
+ ResetQueryPoolEXT = auto_cast GetDeviceProcAddr(device, "vkResetQueryPoolEXT")
+ SetDebugUtilsObjectNameEXT = auto_cast GetDeviceProcAddr(device, "vkSetDebugUtilsObjectNameEXT")
+ SetDebugUtilsObjectTagEXT = auto_cast GetDeviceProcAddr(device, "vkSetDebugUtilsObjectTagEXT")
+ SetDeviceMemoryPriorityEXT = auto_cast GetDeviceProcAddr(device, "vkSetDeviceMemoryPriorityEXT")
+ SetEvent = auto_cast GetDeviceProcAddr(device, "vkSetEvent")
+ SetHdrMetadataEXT = auto_cast GetDeviceProcAddr(device, "vkSetHdrMetadataEXT")
+ SetLocalDimmingAMD = auto_cast GetDeviceProcAddr(device, "vkSetLocalDimmingAMD")
+ SetPrivateDataEXT = auto_cast GetDeviceProcAddr(device, "vkSetPrivateDataEXT")
+ SignalSemaphore = auto_cast GetDeviceProcAddr(device, "vkSignalSemaphore")
+ SignalSemaphoreKHR = auto_cast GetDeviceProcAddr(device, "vkSignalSemaphoreKHR")
+ TrimCommandPool = auto_cast GetDeviceProcAddr(device, "vkTrimCommandPool")
+ TrimCommandPoolKHR = auto_cast GetDeviceProcAddr(device, "vkTrimCommandPoolKHR")
+ UninitializePerformanceApiINTEL = auto_cast GetDeviceProcAddr(device, "vkUninitializePerformanceApiINTEL")
+ UnmapMemory = auto_cast GetDeviceProcAddr(device, "vkUnmapMemory")
+ UpdateDescriptorSetWithTemplate = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplate")
+ UpdateDescriptorSetWithTemplateKHR = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplateKHR")
+ UpdateDescriptorSets = auto_cast GetDeviceProcAddr(device, "vkUpdateDescriptorSets")
+ WaitForFences = auto_cast GetDeviceProcAddr(device, "vkWaitForFences")
+ WaitForPresentKHR = auto_cast GetDeviceProcAddr(device, "vkWaitForPresentKHR")
+ WaitSemaphores = auto_cast GetDeviceProcAddr(device, "vkWaitSemaphores")
+ WaitSemaphoresKHR = auto_cast GetDeviceProcAddr(device, "vkWaitSemaphoresKHR")
+ WriteAccelerationStructuresPropertiesKHR = auto_cast GetDeviceProcAddr(device, "vkWriteAccelerationStructuresPropertiesKHR")
+}
+
+load_proc_addresses_instance :: proc(instance: Instance) {
+ AcquireDrmDisplayEXT = auto_cast GetInstanceProcAddr(instance, "vkAcquireDrmDisplayEXT")
+ AcquireWinrtDisplayNV = auto_cast GetInstanceProcAddr(instance, "vkAcquireWinrtDisplayNV")
+ CreateDebugReportCallbackEXT = auto_cast GetInstanceProcAddr(instance, "vkCreateDebugReportCallbackEXT")
+ CreateDebugUtilsMessengerEXT = auto_cast GetInstanceProcAddr(instance, "vkCreateDebugUtilsMessengerEXT")
+ CreateDevice = auto_cast GetInstanceProcAddr(instance, "vkCreateDevice")
+ CreateDisplayModeKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateDisplayModeKHR")
+ CreateDisplayPlaneSurfaceKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateDisplayPlaneSurfaceKHR")
+ CreateHeadlessSurfaceEXT = auto_cast GetInstanceProcAddr(instance, "vkCreateHeadlessSurfaceEXT")
+ CreateIOSSurfaceMVK = auto_cast GetInstanceProcAddr(instance, "vkCreateIOSSurfaceMVK")
+ CreateMacOSSurfaceMVK = auto_cast GetInstanceProcAddr(instance, "vkCreateMacOSSurfaceMVK")
+ CreateMetalSurfaceEXT = auto_cast GetInstanceProcAddr(instance, "vkCreateMetalSurfaceEXT")
+ CreateWin32SurfaceKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateWin32SurfaceKHR")
+ DebugReportMessageEXT = auto_cast GetInstanceProcAddr(instance, "vkDebugReportMessageEXT")
+ DestroyDebugReportCallbackEXT = auto_cast GetInstanceProcAddr(instance, "vkDestroyDebugReportCallbackEXT")
+ DestroyDebugUtilsMessengerEXT = auto_cast GetInstanceProcAddr(instance, "vkDestroyDebugUtilsMessengerEXT")
+ DestroyInstance = auto_cast GetInstanceProcAddr(instance, "vkDestroyInstance")
+ DestroySurfaceKHR = auto_cast GetInstanceProcAddr(instance, "vkDestroySurfaceKHR")
+ EnumerateDeviceExtensionProperties = auto_cast GetInstanceProcAddr(instance, "vkEnumerateDeviceExtensionProperties")
+ EnumerateDeviceLayerProperties = auto_cast GetInstanceProcAddr(instance, "vkEnumerateDeviceLayerProperties")
+ EnumeratePhysicalDeviceGroups = auto_cast GetInstanceProcAddr(instance, "vkEnumeratePhysicalDeviceGroups")
+ EnumeratePhysicalDeviceGroupsKHR = auto_cast GetInstanceProcAddr(instance, "vkEnumeratePhysicalDeviceGroupsKHR")
+ EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = auto_cast GetInstanceProcAddr(instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR")
+ EnumeratePhysicalDevices = auto_cast GetInstanceProcAddr(instance, "vkEnumeratePhysicalDevices")
+ GetDisplayModeProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetDisplayModeProperties2KHR")
+ GetDisplayModePropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDisplayModePropertiesKHR")
+ GetDisplayPlaneCapabilities2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilities2KHR")
+ GetDisplayPlaneCapabilitiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR")
+ GetDisplayPlaneSupportedDisplaysKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDisplayPlaneSupportedDisplaysKHR")
+ GetDrmDisplayEXT = auto_cast GetInstanceProcAddr(instance, "vkGetDrmDisplayEXT")
+ GetInstanceProcAddr = auto_cast GetInstanceProcAddr(instance, "vkGetInstanceProcAddr")
+ GetPhysicalDeviceCalibrateableTimeDomainsEXT = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT")
+ GetPhysicalDeviceCooperativeMatrixPropertiesNV = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV")
+ GetPhysicalDeviceDisplayPlaneProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR")
+ GetPhysicalDeviceDisplayPlanePropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR")
+ GetPhysicalDeviceDisplayProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayProperties2KHR")
+ GetPhysicalDeviceDisplayPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR")
+ GetPhysicalDeviceExternalBufferProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferProperties")
+ GetPhysicalDeviceExternalBufferPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR")
+ GetPhysicalDeviceExternalFenceProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFenceProperties")
+ GetPhysicalDeviceExternalFencePropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR")
+ GetPhysicalDeviceExternalImageFormatPropertiesNV = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV")
+ GetPhysicalDeviceExternalSemaphoreProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties")
+ GetPhysicalDeviceExternalSemaphorePropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR")
+ GetPhysicalDeviceFeatures = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures")
+ GetPhysicalDeviceFeatures2 = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2")
+ GetPhysicalDeviceFeatures2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2KHR")
+ GetPhysicalDeviceFormatProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties")
+ GetPhysicalDeviceFormatProperties2 = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2")
+ GetPhysicalDeviceFormatProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2KHR")
+ GetPhysicalDeviceFragmentShadingRatesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR")
+ GetPhysicalDeviceImageFormatProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties")
+ GetPhysicalDeviceImageFormatProperties2 = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2")
+ GetPhysicalDeviceImageFormatProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR")
+ GetPhysicalDeviceMemoryProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties")
+ GetPhysicalDeviceMemoryProperties2 = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2")
+ GetPhysicalDeviceMemoryProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2KHR")
+ GetPhysicalDeviceMultisamplePropertiesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT")
+ GetPhysicalDevicePresentRectanglesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDevicePresentRectanglesKHR")
+ GetPhysicalDeviceProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties")
+ GetPhysicalDeviceProperties2 = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2")
+ GetPhysicalDeviceProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR")
+ GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR")
+ GetPhysicalDeviceQueueFamilyProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties")
+ GetPhysicalDeviceQueueFamilyProperties2 = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2")
+ GetPhysicalDeviceQueueFamilyProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR")
+ GetPhysicalDeviceSparseImageFormatProperties = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties")
+ GetPhysicalDeviceSparseImageFormatProperties2 = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2")
+ GetPhysicalDeviceSparseImageFormatProperties2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR")
+ GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV")
+ GetPhysicalDeviceSurfaceCapabilities2EXT = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT")
+ GetPhysicalDeviceSurfaceCapabilities2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR")
+ GetPhysicalDeviceSurfaceCapabilitiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR")
+ GetPhysicalDeviceSurfaceFormats2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR")
+ GetPhysicalDeviceSurfaceFormatsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR")
+ GetPhysicalDeviceSurfacePresentModes2EXT = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT")
+ GetPhysicalDeviceSurfacePresentModesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR")
+ GetPhysicalDeviceSurfaceSupportKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceSupportKHR")
+ GetPhysicalDeviceToolPropertiesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceToolPropertiesEXT")
+ GetPhysicalDeviceWin32PresentationSupportKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR")
+ GetWinrtDisplayNV = auto_cast GetInstanceProcAddr(instance, "vkGetWinrtDisplayNV")
+ ReleaseDisplayEXT = auto_cast GetInstanceProcAddr(instance, "vkReleaseDisplayEXT")
+ SubmitDebugUtilsMessageEXT = auto_cast GetInstanceProcAddr(instance, "vkSubmitDebugUtilsMessageEXT")
+
+ // Device Procedures (may call into dispatch)
+ AcquireFullScreenExclusiveModeEXT = auto_cast GetInstanceProcAddr(instance, "vkAcquireFullScreenExclusiveModeEXT")
+ AcquireNextImage2KHR = auto_cast GetInstanceProcAddr(instance, "vkAcquireNextImage2KHR")
+ AcquireNextImageKHR = auto_cast GetInstanceProcAddr(instance, "vkAcquireNextImageKHR")
+ AcquirePerformanceConfigurationINTEL = auto_cast GetInstanceProcAddr(instance, "vkAcquirePerformanceConfigurationINTEL")
+ AcquireProfilingLockKHR = auto_cast GetInstanceProcAddr(instance, "vkAcquireProfilingLockKHR")
+ AllocateCommandBuffers = auto_cast GetInstanceProcAddr(instance, "vkAllocateCommandBuffers")
+ AllocateDescriptorSets = auto_cast GetInstanceProcAddr(instance, "vkAllocateDescriptorSets")
+ AllocateMemory = auto_cast GetInstanceProcAddr(instance, "vkAllocateMemory")
+ BeginCommandBuffer = auto_cast GetInstanceProcAddr(instance, "vkBeginCommandBuffer")
+ BindAccelerationStructureMemoryNV = auto_cast GetInstanceProcAddr(instance, "vkBindAccelerationStructureMemoryNV")
+ BindBufferMemory = auto_cast GetInstanceProcAddr(instance, "vkBindBufferMemory")
+ BindBufferMemory2 = auto_cast GetInstanceProcAddr(instance, "vkBindBufferMemory2")
+ BindBufferMemory2KHR = auto_cast GetInstanceProcAddr(instance, "vkBindBufferMemory2KHR")
+ BindImageMemory = auto_cast GetInstanceProcAddr(instance, "vkBindImageMemory")
+ BindImageMemory2 = auto_cast GetInstanceProcAddr(instance, "vkBindImageMemory2")
+ BindImageMemory2KHR = auto_cast GetInstanceProcAddr(instance, "vkBindImageMemory2KHR")
+ BuildAccelerationStructuresKHR = auto_cast GetInstanceProcAddr(instance, "vkBuildAccelerationStructuresKHR")
+ CmdBeginConditionalRenderingEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginConditionalRenderingEXT")
+ CmdBeginDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginDebugUtilsLabelEXT")
+ CmdBeginQuery = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginQuery")
+ CmdBeginQueryIndexedEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginQueryIndexedEXT")
+ CmdBeginRenderPass = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginRenderPass")
+ CmdBeginRenderPass2 = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginRenderPass2")
+ CmdBeginRenderPass2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginRenderPass2KHR")
+ CmdBeginTransformFeedbackEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBeginTransformFeedbackEXT")
+ CmdBindDescriptorSets = auto_cast GetInstanceProcAddr(instance, "vkCmdBindDescriptorSets")
+ CmdBindIndexBuffer = auto_cast GetInstanceProcAddr(instance, "vkCmdBindIndexBuffer")
+ CmdBindInvocationMaskHUAWEI = auto_cast GetInstanceProcAddr(instance, "vkCmdBindInvocationMaskHUAWEI")
+ CmdBindPipeline = auto_cast GetInstanceProcAddr(instance, "vkCmdBindPipeline")
+ CmdBindPipelineShaderGroupNV = auto_cast GetInstanceProcAddr(instance, "vkCmdBindPipelineShaderGroupNV")
+ CmdBindShadingRateImageNV = auto_cast GetInstanceProcAddr(instance, "vkCmdBindShadingRateImageNV")
+ CmdBindTransformFeedbackBuffersEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBindTransformFeedbackBuffersEXT")
+ CmdBindVertexBuffers = auto_cast GetInstanceProcAddr(instance, "vkCmdBindVertexBuffers")
+ CmdBindVertexBuffers2EXT = auto_cast GetInstanceProcAddr(instance, "vkCmdBindVertexBuffers2EXT")
+ CmdBlitImage = auto_cast GetInstanceProcAddr(instance, "vkCmdBlitImage")
+ CmdBlitImage2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdBlitImage2KHR")
+ CmdBuildAccelerationStructureNV = auto_cast GetInstanceProcAddr(instance, "vkCmdBuildAccelerationStructureNV")
+ CmdBuildAccelerationStructuresIndirectKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdBuildAccelerationStructuresIndirectKHR")
+ CmdBuildAccelerationStructuresKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdBuildAccelerationStructuresKHR")
+ CmdClearAttachments = auto_cast GetInstanceProcAddr(instance, "vkCmdClearAttachments")
+ CmdClearColorImage = auto_cast GetInstanceProcAddr(instance, "vkCmdClearColorImage")
+ CmdClearDepthStencilImage = auto_cast GetInstanceProcAddr(instance, "vkCmdClearDepthStencilImage")
+ CmdCopyAccelerationStructureKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyAccelerationStructureKHR")
+ CmdCopyAccelerationStructureNV = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyAccelerationStructureNV")
+ CmdCopyAccelerationStructureToMemoryKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyAccelerationStructureToMemoryKHR")
+ CmdCopyBuffer = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyBuffer")
+ CmdCopyBuffer2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyBuffer2KHR")
+ CmdCopyBufferToImage = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyBufferToImage")
+ CmdCopyBufferToImage2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyBufferToImage2KHR")
+ CmdCopyImage = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyImage")
+ CmdCopyImage2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyImage2KHR")
+ CmdCopyImageToBuffer = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyImageToBuffer")
+ CmdCopyImageToBuffer2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyImageToBuffer2KHR")
+ CmdCopyMemoryToAccelerationStructureKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyMemoryToAccelerationStructureKHR")
+ CmdCopyQueryPoolResults = auto_cast GetInstanceProcAddr(instance, "vkCmdCopyQueryPoolResults")
+ CmdCuLaunchKernelNVX = auto_cast GetInstanceProcAddr(instance, "vkCmdCuLaunchKernelNVX")
+ CmdDebugMarkerBeginEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDebugMarkerBeginEXT")
+ CmdDebugMarkerEndEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDebugMarkerEndEXT")
+ CmdDebugMarkerInsertEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDebugMarkerInsertEXT")
+ CmdDispatch = auto_cast GetInstanceProcAddr(instance, "vkCmdDispatch")
+ CmdDispatchBase = auto_cast GetInstanceProcAddr(instance, "vkCmdDispatchBase")
+ CmdDispatchBaseKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdDispatchBaseKHR")
+ CmdDispatchIndirect = auto_cast GetInstanceProcAddr(instance, "vkCmdDispatchIndirect")
+ CmdDraw = auto_cast GetInstanceProcAddr(instance, "vkCmdDraw")
+ CmdDrawIndexed = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndexed")
+ CmdDrawIndexedIndirect = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndexedIndirect")
+ CmdDrawIndexedIndirectCount = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndexedIndirectCount")
+ CmdDrawIndexedIndirectCountAMD = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndexedIndirectCountAMD")
+ CmdDrawIndexedIndirectCountKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndexedIndirectCountKHR")
+ CmdDrawIndirect = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndirect")
+ CmdDrawIndirectByteCountEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndirectByteCountEXT")
+ CmdDrawIndirectCount = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndirectCount")
+ CmdDrawIndirectCountAMD = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndirectCountAMD")
+ CmdDrawIndirectCountKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawIndirectCountKHR")
+ CmdDrawMeshTasksIndirectCountNV = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawMeshTasksIndirectCountNV")
+ CmdDrawMeshTasksIndirectNV = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawMeshTasksIndirectNV")
+ CmdDrawMeshTasksNV = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawMeshTasksNV")
+ CmdDrawMultiEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawMultiEXT")
+ CmdDrawMultiIndexedEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdDrawMultiIndexedEXT")
+ CmdEndConditionalRenderingEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdEndConditionalRenderingEXT")
+ CmdEndDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdEndDebugUtilsLabelEXT")
+ CmdEndQuery = auto_cast GetInstanceProcAddr(instance, "vkCmdEndQuery")
+ CmdEndQueryIndexedEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdEndQueryIndexedEXT")
+ CmdEndRenderPass = auto_cast GetInstanceProcAddr(instance, "vkCmdEndRenderPass")
+ CmdEndRenderPass2 = auto_cast GetInstanceProcAddr(instance, "vkCmdEndRenderPass2")
+ CmdEndRenderPass2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdEndRenderPass2KHR")
+ CmdEndTransformFeedbackEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdEndTransformFeedbackEXT")
+ CmdExecuteCommands = auto_cast GetInstanceProcAddr(instance, "vkCmdExecuteCommands")
+ CmdExecuteGeneratedCommandsNV = auto_cast GetInstanceProcAddr(instance, "vkCmdExecuteGeneratedCommandsNV")
+ CmdFillBuffer = auto_cast GetInstanceProcAddr(instance, "vkCmdFillBuffer")
+ CmdInsertDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdInsertDebugUtilsLabelEXT")
+ CmdNextSubpass = auto_cast GetInstanceProcAddr(instance, "vkCmdNextSubpass")
+ CmdNextSubpass2 = auto_cast GetInstanceProcAddr(instance, "vkCmdNextSubpass2")
+ CmdNextSubpass2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdNextSubpass2KHR")
+ CmdPipelineBarrier = auto_cast GetInstanceProcAddr(instance, "vkCmdPipelineBarrier")
+ CmdPipelineBarrier2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPipelineBarrier2KHR")
+ CmdPreprocessGeneratedCommandsNV = auto_cast GetInstanceProcAddr(instance, "vkCmdPreprocessGeneratedCommandsNV")
+ CmdPushConstants = auto_cast GetInstanceProcAddr(instance, "vkCmdPushConstants")
+ CmdPushDescriptorSetKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPushDescriptorSetKHR")
+ CmdPushDescriptorSetWithTemplateKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdPushDescriptorSetWithTemplateKHR")
+ CmdResetEvent = auto_cast GetInstanceProcAddr(instance, "vkCmdResetEvent")
+ CmdResetEvent2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdResetEvent2KHR")
+ CmdResetQueryPool = auto_cast GetInstanceProcAddr(instance, "vkCmdResetQueryPool")
+ CmdResolveImage = auto_cast GetInstanceProcAddr(instance, "vkCmdResolveImage")
+ CmdResolveImage2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdResolveImage2KHR")
+ CmdSetBlendConstants = auto_cast GetInstanceProcAddr(instance, "vkCmdSetBlendConstants")
+ CmdSetCheckpointNV = auto_cast GetInstanceProcAddr(instance, "vkCmdSetCheckpointNV")
+ CmdSetCoarseSampleOrderNV = auto_cast GetInstanceProcAddr(instance, "vkCmdSetCoarseSampleOrderNV")
+ CmdSetCullModeEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetCullModeEXT")
+ CmdSetDepthBias = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBias")
+ CmdSetDepthBiasEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBiasEnableEXT")
+ CmdSetDepthBounds = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBounds")
+ CmdSetDepthBoundsTestEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthBoundsTestEnableEXT")
+ CmdSetDepthCompareOpEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthCompareOpEXT")
+ CmdSetDepthTestEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthTestEnableEXT")
+ CmdSetDepthWriteEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDepthWriteEnableEXT")
+ CmdSetDeviceMask = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDeviceMask")
+ CmdSetDeviceMaskKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDeviceMaskKHR")
+ CmdSetDiscardRectangleEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetDiscardRectangleEXT")
+ CmdSetEvent = auto_cast GetInstanceProcAddr(instance, "vkCmdSetEvent")
+ CmdSetEvent2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetEvent2KHR")
+ CmdSetExclusiveScissorNV = auto_cast GetInstanceProcAddr(instance, "vkCmdSetExclusiveScissorNV")
+ CmdSetFragmentShadingRateEnumNV = auto_cast GetInstanceProcAddr(instance, "vkCmdSetFragmentShadingRateEnumNV")
+ CmdSetFragmentShadingRateKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetFragmentShadingRateKHR")
+ CmdSetFrontFaceEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetFrontFaceEXT")
+ CmdSetLineStippleEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLineStippleEXT")
+ CmdSetLineWidth = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLineWidth")
+ CmdSetLogicOpEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetLogicOpEXT")
+ CmdSetPatchControlPointsEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetPatchControlPointsEXT")
+ CmdSetPerformanceMarkerINTEL = auto_cast GetInstanceProcAddr(instance, "vkCmdSetPerformanceMarkerINTEL")
+ CmdSetPerformanceOverrideINTEL = auto_cast GetInstanceProcAddr(instance, "vkCmdSetPerformanceOverrideINTEL")
+ CmdSetPerformanceStreamMarkerINTEL = auto_cast GetInstanceProcAddr(instance, "vkCmdSetPerformanceStreamMarkerINTEL")
+ CmdSetPrimitiveRestartEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetPrimitiveRestartEnableEXT")
+ CmdSetPrimitiveTopologyEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetPrimitiveTopologyEXT")
+ CmdSetRasterizerDiscardEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetRasterizerDiscardEnableEXT")
+ CmdSetRayTracingPipelineStackSizeKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdSetRayTracingPipelineStackSizeKHR")
+ CmdSetSampleLocationsEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetSampleLocationsEXT")
+ CmdSetScissor = auto_cast GetInstanceProcAddr(instance, "vkCmdSetScissor")
+ CmdSetScissorWithCountEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetScissorWithCountEXT")
+ CmdSetStencilCompareMask = auto_cast GetInstanceProcAddr(instance, "vkCmdSetStencilCompareMask")
+ CmdSetStencilOpEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetStencilOpEXT")
+ CmdSetStencilReference = auto_cast GetInstanceProcAddr(instance, "vkCmdSetStencilReference")
+ CmdSetStencilTestEnableEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetStencilTestEnableEXT")
+ CmdSetStencilWriteMask = auto_cast GetInstanceProcAddr(instance, "vkCmdSetStencilWriteMask")
+ CmdSetVertexInputEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetVertexInputEXT")
+ CmdSetViewport = auto_cast GetInstanceProcAddr(instance, "vkCmdSetViewport")
+ CmdSetViewportShadingRatePaletteNV = auto_cast GetInstanceProcAddr(instance, "vkCmdSetViewportShadingRatePaletteNV")
+ CmdSetViewportWScalingNV = auto_cast GetInstanceProcAddr(instance, "vkCmdSetViewportWScalingNV")
+ CmdSetViewportWithCountEXT = auto_cast GetInstanceProcAddr(instance, "vkCmdSetViewportWithCountEXT")
+ CmdSubpassShadingHUAWEI = auto_cast GetInstanceProcAddr(instance, "vkCmdSubpassShadingHUAWEI")
+ CmdTraceRaysIndirectKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdTraceRaysIndirectKHR")
+ CmdTraceRaysKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdTraceRaysKHR")
+ CmdTraceRaysNV = auto_cast GetInstanceProcAddr(instance, "vkCmdTraceRaysNV")
+ CmdUpdateBuffer = auto_cast GetInstanceProcAddr(instance, "vkCmdUpdateBuffer")
+ CmdWaitEvents = auto_cast GetInstanceProcAddr(instance, "vkCmdWaitEvents")
+ CmdWaitEvents2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdWaitEvents2KHR")
+ CmdWriteAccelerationStructuresPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkCmdWriteAccelerationStructuresPropertiesKHR")
+ CmdWriteAccelerationStructuresPropertiesNV = auto_cast GetInstanceProcAddr(instance, "vkCmdWriteAccelerationStructuresPropertiesNV")
+ CmdWriteBufferMarker2AMD = auto_cast GetInstanceProcAddr(instance, "vkCmdWriteBufferMarker2AMD")
+ CmdWriteBufferMarkerAMD = auto_cast GetInstanceProcAddr(instance, "vkCmdWriteBufferMarkerAMD")
+ CmdWriteTimestamp = auto_cast GetInstanceProcAddr(instance, "vkCmdWriteTimestamp")
+ CmdWriteTimestamp2KHR = auto_cast GetInstanceProcAddr(instance, "vkCmdWriteTimestamp2KHR")
+ CompileDeferredNV = auto_cast GetInstanceProcAddr(instance, "vkCompileDeferredNV")
+ CopyAccelerationStructureKHR = auto_cast GetInstanceProcAddr(instance, "vkCopyAccelerationStructureKHR")
+ CopyAccelerationStructureToMemoryKHR = auto_cast GetInstanceProcAddr(instance, "vkCopyAccelerationStructureToMemoryKHR")
+ CopyMemoryToAccelerationStructureKHR = auto_cast GetInstanceProcAddr(instance, "vkCopyMemoryToAccelerationStructureKHR")
+ CreateAccelerationStructureKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateAccelerationStructureKHR")
+ CreateAccelerationStructureNV = auto_cast GetInstanceProcAddr(instance, "vkCreateAccelerationStructureNV")
+ CreateBuffer = auto_cast GetInstanceProcAddr(instance, "vkCreateBuffer")
+ CreateBufferView = auto_cast GetInstanceProcAddr(instance, "vkCreateBufferView")
+ CreateCommandPool = auto_cast GetInstanceProcAddr(instance, "vkCreateCommandPool")
+ CreateComputePipelines = auto_cast GetInstanceProcAddr(instance, "vkCreateComputePipelines")
+ CreateCuFunctionNVX = auto_cast GetInstanceProcAddr(instance, "vkCreateCuFunctionNVX")
+ CreateCuModuleNVX = auto_cast GetInstanceProcAddr(instance, "vkCreateCuModuleNVX")
+ CreateDeferredOperationKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateDeferredOperationKHR")
+ CreateDescriptorPool = auto_cast GetInstanceProcAddr(instance, "vkCreateDescriptorPool")
+ CreateDescriptorSetLayout = auto_cast GetInstanceProcAddr(instance, "vkCreateDescriptorSetLayout")
+ CreateDescriptorUpdateTemplate = auto_cast GetInstanceProcAddr(instance, "vkCreateDescriptorUpdateTemplate")
+ CreateDescriptorUpdateTemplateKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateDescriptorUpdateTemplateKHR")
+ CreateEvent = auto_cast GetInstanceProcAddr(instance, "vkCreateEvent")
+ CreateFence = auto_cast GetInstanceProcAddr(instance, "vkCreateFence")
+ CreateFramebuffer = auto_cast GetInstanceProcAddr(instance, "vkCreateFramebuffer")
+ CreateGraphicsPipelines = auto_cast GetInstanceProcAddr(instance, "vkCreateGraphicsPipelines")
+ CreateImage = auto_cast GetInstanceProcAddr(instance, "vkCreateImage")
+ CreateImageView = auto_cast GetInstanceProcAddr(instance, "vkCreateImageView")
+ CreateIndirectCommandsLayoutNV = auto_cast GetInstanceProcAddr(instance, "vkCreateIndirectCommandsLayoutNV")
+ CreatePipelineCache = auto_cast GetInstanceProcAddr(instance, "vkCreatePipelineCache")
+ CreatePipelineLayout = auto_cast GetInstanceProcAddr(instance, "vkCreatePipelineLayout")
+ CreatePrivateDataSlotEXT = auto_cast GetInstanceProcAddr(instance, "vkCreatePrivateDataSlotEXT")
+ CreateQueryPool = auto_cast GetInstanceProcAddr(instance, "vkCreateQueryPool")
+ CreateRayTracingPipelinesKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateRayTracingPipelinesKHR")
+ CreateRayTracingPipelinesNV = auto_cast GetInstanceProcAddr(instance, "vkCreateRayTracingPipelinesNV")
+ CreateRenderPass = auto_cast GetInstanceProcAddr(instance, "vkCreateRenderPass")
+ CreateRenderPass2 = auto_cast GetInstanceProcAddr(instance, "vkCreateRenderPass2")
+ CreateRenderPass2KHR = auto_cast GetInstanceProcAddr(instance, "vkCreateRenderPass2KHR")
+ CreateSampler = auto_cast GetInstanceProcAddr(instance, "vkCreateSampler")
+ CreateSamplerYcbcrConversion = auto_cast GetInstanceProcAddr(instance, "vkCreateSamplerYcbcrConversion")
+ CreateSamplerYcbcrConversionKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateSamplerYcbcrConversionKHR")
+ CreateSemaphore = auto_cast GetInstanceProcAddr(instance, "vkCreateSemaphore")
+ CreateShaderModule = auto_cast GetInstanceProcAddr(instance, "vkCreateShaderModule")
+ CreateSharedSwapchainsKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateSharedSwapchainsKHR")
+ CreateSwapchainKHR = auto_cast GetInstanceProcAddr(instance, "vkCreateSwapchainKHR")
+ CreateValidationCacheEXT = auto_cast GetInstanceProcAddr(instance, "vkCreateValidationCacheEXT")
+ DebugMarkerSetObjectNameEXT = auto_cast GetInstanceProcAddr(instance, "vkDebugMarkerSetObjectNameEXT")
+ DebugMarkerSetObjectTagEXT = auto_cast GetInstanceProcAddr(instance, "vkDebugMarkerSetObjectTagEXT")
+ DeferredOperationJoinKHR = auto_cast GetInstanceProcAddr(instance, "vkDeferredOperationJoinKHR")
+ DestroyAccelerationStructureKHR = auto_cast GetInstanceProcAddr(instance, "vkDestroyAccelerationStructureKHR")
+ DestroyAccelerationStructureNV = auto_cast GetInstanceProcAddr(instance, "vkDestroyAccelerationStructureNV")
+ DestroyBuffer = auto_cast GetInstanceProcAddr(instance, "vkDestroyBuffer")
+ DestroyBufferView = auto_cast GetInstanceProcAddr(instance, "vkDestroyBufferView")
+ DestroyCommandPool = auto_cast GetInstanceProcAddr(instance, "vkDestroyCommandPool")
+ DestroyCuFunctionNVX = auto_cast GetInstanceProcAddr(instance, "vkDestroyCuFunctionNVX")
+ DestroyCuModuleNVX = auto_cast GetInstanceProcAddr(instance, "vkDestroyCuModuleNVX")
+ DestroyDeferredOperationKHR = auto_cast GetInstanceProcAddr(instance, "vkDestroyDeferredOperationKHR")
+ DestroyDescriptorPool = auto_cast GetInstanceProcAddr(instance, "vkDestroyDescriptorPool")
+ DestroyDescriptorSetLayout = auto_cast GetInstanceProcAddr(instance, "vkDestroyDescriptorSetLayout")
+ DestroyDescriptorUpdateTemplate = auto_cast GetInstanceProcAddr(instance, "vkDestroyDescriptorUpdateTemplate")
+ DestroyDescriptorUpdateTemplateKHR = auto_cast GetInstanceProcAddr(instance, "vkDestroyDescriptorUpdateTemplateKHR")
+ DestroyDevice = auto_cast GetInstanceProcAddr(instance, "vkDestroyDevice")
+ DestroyEvent = auto_cast GetInstanceProcAddr(instance, "vkDestroyEvent")
+ DestroyFence = auto_cast GetInstanceProcAddr(instance, "vkDestroyFence")
+ DestroyFramebuffer = auto_cast GetInstanceProcAddr(instance, "vkDestroyFramebuffer")
+ DestroyImage = auto_cast GetInstanceProcAddr(instance, "vkDestroyImage")
+ DestroyImageView = auto_cast GetInstanceProcAddr(instance, "vkDestroyImageView")
+ DestroyIndirectCommandsLayoutNV = auto_cast GetInstanceProcAddr(instance, "vkDestroyIndirectCommandsLayoutNV")
+ DestroyPipeline = auto_cast GetInstanceProcAddr(instance, "vkDestroyPipeline")
+ DestroyPipelineCache = auto_cast GetInstanceProcAddr(instance, "vkDestroyPipelineCache")
+ DestroyPipelineLayout = auto_cast GetInstanceProcAddr(instance, "vkDestroyPipelineLayout")
+ DestroyPrivateDataSlotEXT = auto_cast GetInstanceProcAddr(instance, "vkDestroyPrivateDataSlotEXT")
+ DestroyQueryPool = auto_cast GetInstanceProcAddr(instance, "vkDestroyQueryPool")
+ DestroyRenderPass = auto_cast GetInstanceProcAddr(instance, "vkDestroyRenderPass")
+ DestroySampler = auto_cast GetInstanceProcAddr(instance, "vkDestroySampler")
+ DestroySamplerYcbcrConversion = auto_cast GetInstanceProcAddr(instance, "vkDestroySamplerYcbcrConversion")
+ DestroySamplerYcbcrConversionKHR = auto_cast GetInstanceProcAddr(instance, "vkDestroySamplerYcbcrConversionKHR")
+ DestroySemaphore = auto_cast GetInstanceProcAddr(instance, "vkDestroySemaphore")
+ DestroyShaderModule = auto_cast GetInstanceProcAddr(instance, "vkDestroyShaderModule")
+ DestroySwapchainKHR = auto_cast GetInstanceProcAddr(instance, "vkDestroySwapchainKHR")
+ DestroyValidationCacheEXT = auto_cast GetInstanceProcAddr(instance, "vkDestroyValidationCacheEXT")
+ DeviceWaitIdle = auto_cast GetInstanceProcAddr(instance, "vkDeviceWaitIdle")
+ DisplayPowerControlEXT = auto_cast GetInstanceProcAddr(instance, "vkDisplayPowerControlEXT")
+ EndCommandBuffer = auto_cast GetInstanceProcAddr(instance, "vkEndCommandBuffer")
+ FlushMappedMemoryRanges = auto_cast GetInstanceProcAddr(instance, "vkFlushMappedMemoryRanges")
+ FreeCommandBuffers = auto_cast GetInstanceProcAddr(instance, "vkFreeCommandBuffers")
+ FreeDescriptorSets = auto_cast GetInstanceProcAddr(instance, "vkFreeDescriptorSets")
+ FreeMemory = auto_cast GetInstanceProcAddr(instance, "vkFreeMemory")
+ GetAccelerationStructureBuildSizesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetAccelerationStructureBuildSizesKHR")
+ GetAccelerationStructureDeviceAddressKHR = auto_cast GetInstanceProcAddr(instance, "vkGetAccelerationStructureDeviceAddressKHR")
+ GetAccelerationStructureHandleNV = auto_cast GetInstanceProcAddr(instance, "vkGetAccelerationStructureHandleNV")
+ GetAccelerationStructureMemoryRequirementsNV = auto_cast GetInstanceProcAddr(instance, "vkGetAccelerationStructureMemoryRequirementsNV")
+ GetBufferDeviceAddress = auto_cast GetInstanceProcAddr(instance, "vkGetBufferDeviceAddress")
+ GetBufferDeviceAddressEXT = auto_cast GetInstanceProcAddr(instance, "vkGetBufferDeviceAddressEXT")
+ GetBufferDeviceAddressKHR = auto_cast GetInstanceProcAddr(instance, "vkGetBufferDeviceAddressKHR")
+ GetBufferMemoryRequirements = auto_cast GetInstanceProcAddr(instance, "vkGetBufferMemoryRequirements")
+ GetBufferMemoryRequirements2 = auto_cast GetInstanceProcAddr(instance, "vkGetBufferMemoryRequirements2")
+ GetBufferMemoryRequirements2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetBufferMemoryRequirements2KHR")
+ GetBufferOpaqueCaptureAddress = auto_cast GetInstanceProcAddr(instance, "vkGetBufferOpaqueCaptureAddress")
+ GetBufferOpaqueCaptureAddressKHR = auto_cast GetInstanceProcAddr(instance, "vkGetBufferOpaqueCaptureAddressKHR")
+ GetCalibratedTimestampsEXT = auto_cast GetInstanceProcAddr(instance, "vkGetCalibratedTimestampsEXT")
+ GetDeferredOperationMaxConcurrencyKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeferredOperationMaxConcurrencyKHR")
+ GetDeferredOperationResultKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeferredOperationResultKHR")
+ GetDescriptorSetLayoutSupport = auto_cast GetInstanceProcAddr(instance, "vkGetDescriptorSetLayoutSupport")
+ GetDescriptorSetLayoutSupportKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDescriptorSetLayoutSupportKHR")
+ GetDeviceAccelerationStructureCompatibilityKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceAccelerationStructureCompatibilityKHR")
+ GetDeviceGroupPeerMemoryFeatures = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceGroupPeerMemoryFeatures")
+ GetDeviceGroupPeerMemoryFeaturesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceGroupPeerMemoryFeaturesKHR")
+ GetDeviceGroupPresentCapabilitiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceGroupPresentCapabilitiesKHR")
+ GetDeviceGroupSurfacePresentModes2EXT = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceGroupSurfacePresentModes2EXT")
+ GetDeviceGroupSurfacePresentModesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceGroupSurfacePresentModesKHR")
+ GetDeviceMemoryCommitment = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceMemoryCommitment")
+ GetDeviceMemoryOpaqueCaptureAddress = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceMemoryOpaqueCaptureAddress")
+ GetDeviceMemoryOpaqueCaptureAddressKHR = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceMemoryOpaqueCaptureAddressKHR")
+ GetDeviceProcAddr = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceProcAddr")
+ GetDeviceQueue = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceQueue")
+ GetDeviceQueue2 = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceQueue2")
+ GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = auto_cast GetInstanceProcAddr(instance, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI")
+ GetEventStatus = auto_cast GetInstanceProcAddr(instance, "vkGetEventStatus")
+ GetFenceFdKHR = auto_cast GetInstanceProcAddr(instance, "vkGetFenceFdKHR")
+ GetFenceStatus = auto_cast GetInstanceProcAddr(instance, "vkGetFenceStatus")
+ GetFenceWin32HandleKHR = auto_cast GetInstanceProcAddr(instance, "vkGetFenceWin32HandleKHR")
+ GetGeneratedCommandsMemoryRequirementsNV = auto_cast GetInstanceProcAddr(instance, "vkGetGeneratedCommandsMemoryRequirementsNV")
+ GetImageDrmFormatModifierPropertiesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetImageDrmFormatModifierPropertiesEXT")
+ GetImageMemoryRequirements = auto_cast GetInstanceProcAddr(instance, "vkGetImageMemoryRequirements")
+ GetImageMemoryRequirements2 = auto_cast GetInstanceProcAddr(instance, "vkGetImageMemoryRequirements2")
+ GetImageMemoryRequirements2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetImageMemoryRequirements2KHR")
+ GetImageSparseMemoryRequirements = auto_cast GetInstanceProcAddr(instance, "vkGetImageSparseMemoryRequirements")
+ GetImageSparseMemoryRequirements2 = auto_cast GetInstanceProcAddr(instance, "vkGetImageSparseMemoryRequirements2")
+ GetImageSparseMemoryRequirements2KHR = auto_cast GetInstanceProcAddr(instance, "vkGetImageSparseMemoryRequirements2KHR")
+ GetImageSubresourceLayout = auto_cast GetInstanceProcAddr(instance, "vkGetImageSubresourceLayout")
+ GetImageViewAddressNVX = auto_cast GetInstanceProcAddr(instance, "vkGetImageViewAddressNVX")
+ GetImageViewHandleNVX = auto_cast GetInstanceProcAddr(instance, "vkGetImageViewHandleNVX")
+ GetMemoryFdKHR = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryFdKHR")
+ GetMemoryFdPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryFdPropertiesKHR")
+ GetMemoryHostPointerPropertiesEXT = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryHostPointerPropertiesEXT")
+ GetMemoryRemoteAddressNV = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryRemoteAddressNV")
+ GetMemoryWin32HandleKHR = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryWin32HandleKHR")
+ GetMemoryWin32HandleNV = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryWin32HandleNV")
+ GetMemoryWin32HandlePropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetMemoryWin32HandlePropertiesKHR")
+ GetPastPresentationTimingGOOGLE = auto_cast GetInstanceProcAddr(instance, "vkGetPastPresentationTimingGOOGLE")
+ GetPerformanceParameterINTEL = auto_cast GetInstanceProcAddr(instance, "vkGetPerformanceParameterINTEL")
+ GetPipelineCacheData = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineCacheData")
+ GetPipelineExecutableInternalRepresentationsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineExecutableInternalRepresentationsKHR")
+ GetPipelineExecutablePropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineExecutablePropertiesKHR")
+ GetPipelineExecutableStatisticsKHR = auto_cast GetInstanceProcAddr(instance, "vkGetPipelineExecutableStatisticsKHR")
+ GetPrivateDataEXT = auto_cast GetInstanceProcAddr(instance, "vkGetPrivateDataEXT")
+ GetQueryPoolResults = auto_cast GetInstanceProcAddr(instance, "vkGetQueryPoolResults")
+ GetQueueCheckpointData2NV = auto_cast GetInstanceProcAddr(instance, "vkGetQueueCheckpointData2NV")
+ GetQueueCheckpointDataNV = auto_cast GetInstanceProcAddr(instance, "vkGetQueueCheckpointDataNV")
+ GetRayTracingCaptureReplayShaderGroupHandlesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR")
+ GetRayTracingShaderGroupHandlesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetRayTracingShaderGroupHandlesKHR")
+ GetRayTracingShaderGroupHandlesNV = auto_cast GetInstanceProcAddr(instance, "vkGetRayTracingShaderGroupHandlesNV")
+ GetRayTracingShaderGroupStackSizeKHR = auto_cast GetInstanceProcAddr(instance, "vkGetRayTracingShaderGroupStackSizeKHR")
+ GetRefreshCycleDurationGOOGLE = auto_cast GetInstanceProcAddr(instance, "vkGetRefreshCycleDurationGOOGLE")
+ GetRenderAreaGranularity = auto_cast GetInstanceProcAddr(instance, "vkGetRenderAreaGranularity")
+ GetSemaphoreCounterValue = auto_cast GetInstanceProcAddr(instance, "vkGetSemaphoreCounterValue")
+ GetSemaphoreCounterValueKHR = auto_cast GetInstanceProcAddr(instance, "vkGetSemaphoreCounterValueKHR")
+ GetSemaphoreFdKHR = auto_cast GetInstanceProcAddr(instance, "vkGetSemaphoreFdKHR")
+ GetSemaphoreWin32HandleKHR = auto_cast GetInstanceProcAddr(instance, "vkGetSemaphoreWin32HandleKHR")
+ GetShaderInfoAMD = auto_cast GetInstanceProcAddr(instance, "vkGetShaderInfoAMD")
+ GetSwapchainCounterEXT = auto_cast GetInstanceProcAddr(instance, "vkGetSwapchainCounterEXT")
+ GetSwapchainImagesKHR = auto_cast GetInstanceProcAddr(instance, "vkGetSwapchainImagesKHR")
+ GetSwapchainStatusKHR = auto_cast GetInstanceProcAddr(instance, "vkGetSwapchainStatusKHR")
+ GetValidationCacheDataEXT = auto_cast GetInstanceProcAddr(instance, "vkGetValidationCacheDataEXT")
+ ImportFenceFdKHR = auto_cast GetInstanceProcAddr(instance, "vkImportFenceFdKHR")
+ ImportFenceWin32HandleKHR = auto_cast GetInstanceProcAddr(instance, "vkImportFenceWin32HandleKHR")
+ ImportSemaphoreFdKHR = auto_cast GetInstanceProcAddr(instance, "vkImportSemaphoreFdKHR")
+ ImportSemaphoreWin32HandleKHR = auto_cast GetInstanceProcAddr(instance, "vkImportSemaphoreWin32HandleKHR")
+ InitializePerformanceApiINTEL = auto_cast GetInstanceProcAddr(instance, "vkInitializePerformanceApiINTEL")
+ InvalidateMappedMemoryRanges = auto_cast GetInstanceProcAddr(instance, "vkInvalidateMappedMemoryRanges")
+ MapMemory = auto_cast GetInstanceProcAddr(instance, "vkMapMemory")
+ MergePipelineCaches = auto_cast GetInstanceProcAddr(instance, "vkMergePipelineCaches")
+ MergeValidationCachesEXT = auto_cast GetInstanceProcAddr(instance, "vkMergeValidationCachesEXT")
+ QueueBeginDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkQueueBeginDebugUtilsLabelEXT")
+ QueueBindSparse = auto_cast GetInstanceProcAddr(instance, "vkQueueBindSparse")
+ QueueEndDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkQueueEndDebugUtilsLabelEXT")
+ QueueInsertDebugUtilsLabelEXT = auto_cast GetInstanceProcAddr(instance, "vkQueueInsertDebugUtilsLabelEXT")
+ QueuePresentKHR = auto_cast GetInstanceProcAddr(instance, "vkQueuePresentKHR")
+ QueueSetPerformanceConfigurationINTEL = auto_cast GetInstanceProcAddr(instance, "vkQueueSetPerformanceConfigurationINTEL")
+ QueueSubmit = auto_cast GetInstanceProcAddr(instance, "vkQueueSubmit")
+ QueueSubmit2KHR = auto_cast GetInstanceProcAddr(instance, "vkQueueSubmit2KHR")
+ QueueWaitIdle = auto_cast GetInstanceProcAddr(instance, "vkQueueWaitIdle")
+ RegisterDeviceEventEXT = auto_cast GetInstanceProcAddr(instance, "vkRegisterDeviceEventEXT")
+ RegisterDisplayEventEXT = auto_cast GetInstanceProcAddr(instance, "vkRegisterDisplayEventEXT")
+ ReleaseFullScreenExclusiveModeEXT = auto_cast GetInstanceProcAddr(instance, "vkReleaseFullScreenExclusiveModeEXT")
+ ReleasePerformanceConfigurationINTEL = auto_cast GetInstanceProcAddr(instance, "vkReleasePerformanceConfigurationINTEL")
+ ReleaseProfilingLockKHR = auto_cast GetInstanceProcAddr(instance, "vkReleaseProfilingLockKHR")
+ ResetCommandBuffer = auto_cast GetInstanceProcAddr(instance, "vkResetCommandBuffer")
+ ResetCommandPool = auto_cast GetInstanceProcAddr(instance, "vkResetCommandPool")
+ ResetDescriptorPool = auto_cast GetInstanceProcAddr(instance, "vkResetDescriptorPool")
+ ResetEvent = auto_cast GetInstanceProcAddr(instance, "vkResetEvent")
+ ResetFences = auto_cast GetInstanceProcAddr(instance, "vkResetFences")
+ ResetQueryPool = auto_cast GetInstanceProcAddr(instance, "vkResetQueryPool")
+ ResetQueryPoolEXT = auto_cast GetInstanceProcAddr(instance, "vkResetQueryPoolEXT")
+ SetDebugUtilsObjectNameEXT = auto_cast GetInstanceProcAddr(instance, "vkSetDebugUtilsObjectNameEXT")
+ SetDebugUtilsObjectTagEXT = auto_cast GetInstanceProcAddr(instance, "vkSetDebugUtilsObjectTagEXT")
+ SetDeviceMemoryPriorityEXT = auto_cast GetInstanceProcAddr(instance, "vkSetDeviceMemoryPriorityEXT")
+ SetEvent = auto_cast GetInstanceProcAddr(instance, "vkSetEvent")
+ SetHdrMetadataEXT = auto_cast GetInstanceProcAddr(instance, "vkSetHdrMetadataEXT")
+ SetLocalDimmingAMD = auto_cast GetInstanceProcAddr(instance, "vkSetLocalDimmingAMD")
+ SetPrivateDataEXT = auto_cast GetInstanceProcAddr(instance, "vkSetPrivateDataEXT")
+ SignalSemaphore = auto_cast GetInstanceProcAddr(instance, "vkSignalSemaphore")
+ SignalSemaphoreKHR = auto_cast GetInstanceProcAddr(instance, "vkSignalSemaphoreKHR")
+ TrimCommandPool = auto_cast GetInstanceProcAddr(instance, "vkTrimCommandPool")
+ TrimCommandPoolKHR = auto_cast GetInstanceProcAddr(instance, "vkTrimCommandPoolKHR")
+ UninitializePerformanceApiINTEL = auto_cast GetInstanceProcAddr(instance, "vkUninitializePerformanceApiINTEL")
+ UnmapMemory = auto_cast GetInstanceProcAddr(instance, "vkUnmapMemory")
+ UpdateDescriptorSetWithTemplate = auto_cast GetInstanceProcAddr(instance, "vkUpdateDescriptorSetWithTemplate")
+ UpdateDescriptorSetWithTemplateKHR = auto_cast GetInstanceProcAddr(instance, "vkUpdateDescriptorSetWithTemplateKHR")
+ UpdateDescriptorSets = auto_cast GetInstanceProcAddr(instance, "vkUpdateDescriptorSets")
+ WaitForFences = auto_cast GetInstanceProcAddr(instance, "vkWaitForFences")
+ WaitForPresentKHR = auto_cast GetInstanceProcAddr(instance, "vkWaitForPresentKHR")
+ WaitSemaphores = auto_cast GetInstanceProcAddr(instance, "vkWaitSemaphores")
+ WaitSemaphoresKHR = auto_cast GetInstanceProcAddr(instance, "vkWaitSemaphoresKHR")
+ WriteAccelerationStructuresPropertiesKHR = auto_cast GetInstanceProcAddr(instance, "vkWriteAccelerationStructuresPropertiesKHR")
+}
+
+load_proc_addresses_global :: proc(vk_get_instance_proc_addr: rawptr) {
+ GetInstanceProcAddr = auto_cast vk_get_instance_proc_addr
+
+ CreateInstance = auto_cast GetInstanceProcAddr(nil, "vkCreateInstance")
+ DebugUtilsMessengerCallbackEXT = auto_cast GetInstanceProcAddr(nil, "vkDebugUtilsMessengerCallbackEXT")
+ DeviceMemoryReportCallbackEXT = auto_cast GetInstanceProcAddr(nil, "vkDeviceMemoryReportCallbackEXT")
+ EnumerateInstanceExtensionProperties = auto_cast GetInstanceProcAddr(nil, "vkEnumerateInstanceExtensionProperties")
+ EnumerateInstanceLayerProperties = auto_cast GetInstanceProcAddr(nil, "vkEnumerateInstanceLayerProperties")
+ EnumerateInstanceVersion = auto_cast GetInstanceProcAddr(nil, "vkEnumerateInstanceVersion")
+}
+
+load_proc_addresses :: proc{
+ load_proc_addresses_global,
+ load_proc_addresses_instance,
+ load_proc_addresses_device,
+ load_proc_addresses_device_vtable,
+ load_proc_addresses_custom,
+}