From 58e4a011c72d268ca35d46d2288d5858677e9cac Mon Sep 17 00:00:00 2001 From: Colin Davidson Date: Mon, 4 Dec 2023 00:08:13 -0800 Subject: [PATCH 01/57] add non-zeroing append and resize --- core/mem/alloc.odin | 2 + core/mem/allocators.odin | 32 ++++--- core/os/os.odin | 14 +-- core/runtime/core.odin | 1 + core/runtime/core_builtin.odin | 105 ++++++++++++++++++--- core/runtime/default_allocators_arena.odin | 2 +- core/runtime/default_allocators_nil.odin | 6 +- core/runtime/internal.odin | 27 +++++- 8 files changed, 147 insertions(+), 42 deletions(-) diff --git a/core/mem/alloc.odin b/core/mem/alloc.odin index 57e82a5f8..507b13d6f 100644 --- a/core/mem/alloc.odin +++ b/core/mem/alloc.odin @@ -11,6 +11,8 @@ Allocator_Mode :: enum byte { Free_All, Resize, Query_Features, + Alloc_Non_Zeroed, + Resize_Non_Zeroed, } */ diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin index 4f5dd8eef..362b897b4 100644 --- a/core/mem/allocators.odin +++ b/core/mem/allocators.odin @@ -85,7 +85,7 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, case .Free_All: arena.offset = 0 - case .Resize: + case .Resize, .Resize_Non_Zeroed: return default_resize_bytes_align(byte_slice(old_memory, old_size), size, alignment, arena_allocator(arena)) case .Query_Features: @@ -259,7 +259,7 @@ scratch_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, } clear(&s.leaked_allocations) - case .Resize: + case .Resize, .Resize_Non_Zeroed: begin := uintptr(raw_data(s.data)) end := begin + uintptr(len(s.data)) old_ptr := uintptr(old_memory) @@ -278,7 +278,7 @@ scratch_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, case .Query_Features: set := (^Allocator_Mode_Set)(old_memory) if set != nil { - set^ = {.Alloc, .Alloc_Non_Zeroed, .Free, .Free_All, .Resize, .Query_Features} + set^ = {.Alloc, .Alloc_Non_Zeroed, .Free, .Free_All, .Resize, .Resize_Non_Zeroed, .Query_Features} } return nil, nil @@ -406,9 +406,9 @@ stack_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, s.prev_offset = 0 s.curr_offset = 0 - case .Resize: + case .Resize, .Resize_Non_Zeroed: if old_memory == nil { - return raw_alloc(s, size, alignment, true) + return raw_alloc(s, size, alignment, mode == .Resize) } if size == 0 { return nil, nil @@ -434,7 +434,7 @@ stack_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, old_offset := int(curr_addr - uintptr(header.padding) - uintptr(raw_data(s.data))) if old_offset != header.prev_offset { - data, err := raw_alloc(s, size, alignment, true) + data, err := raw_alloc(s, size, alignment, mode == .Resize) if err == nil { runtime.copy(data, byte_slice(old_memory, old_size)) } @@ -455,7 +455,7 @@ stack_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, case .Query_Features: set := (^Allocator_Mode_Set)(old_memory) if set != nil { - set^ = {.Alloc, .Alloc_Non_Zeroed, .Free, .Free_All, .Resize, .Query_Features} + set^ = {.Alloc, .Alloc_Non_Zeroed, .Free, .Free_All, .Resize, .Resize_Non_Zeroed, .Query_Features} } return nil, nil case .Query_Info: @@ -565,9 +565,9 @@ small_stack_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, case .Free_All: s.offset = 0 - case .Resize: + case .Resize, .Resize_Non_Zeroed: if old_memory == nil { - return raw_alloc(s, size, align, true) + return raw_alloc(s, size, align, mode == .Resize) } if size == 0 { return nil, nil @@ -590,7 +590,7 @@ small_stack_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, return byte_slice(old_memory, size), nil } - data, err := raw_alloc(s, size, align, true) + data, err := raw_alloc(s, size, align, mode == .Resize) if err == nil { runtime.copy(data, byte_slice(old_memory, old_size)) } @@ -599,7 +599,7 @@ small_stack_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, case .Query_Features: set := (^Allocator_Mode_Set)(old_memory) if set != nil { - set^ = {.Alloc, .Alloc_Non_Zeroed, .Free, .Free_All, .Resize, .Query_Features} + set^ = {.Alloc, .Alloc_Non_Zeroed, .Free, .Free_All, .Resize, .Resize_Non_Zeroed, .Query_Features} } return nil, nil @@ -649,7 +649,7 @@ dynamic_pool_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode case .Free_All: dynamic_pool_free_all(pool) return nil, nil - case .Resize: + case .Resize, .Resize_Non_Zeroed: if old_size >= size { return byte_slice(old_memory, size), nil } @@ -662,7 +662,7 @@ dynamic_pool_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode case .Query_Features: set := (^Allocator_Mode_Set)(old_memory) if set != nil { - set^ = {.Alloc, .Alloc_Non_Zeroed, .Free_All, .Resize, .Query_Features, .Query_Info} + set^ = {.Alloc, .Alloc_Non_Zeroed, .Free_All, .Resize, .Resize_Non_Zeroed, .Query_Features, .Query_Info} } return nil, nil @@ -826,6 +826,10 @@ panic_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, if size > 0 { panic("mem: panic allocator, .Resize called", loc=loc) } + case .Resize_Non_Zeroed: + if size > 0 { + panic("mem: panic allocator, .Resize_Non_Zeroed called", loc=loc) + } case .Free: if old_memory != nil { panic("mem: panic allocator, .Free called", loc=loc) @@ -958,7 +962,7 @@ tracking_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, if data.clear_on_free_all { clear_map(&data.allocation_map) } - case .Resize: + case .Resize, .Resize_Non_Zeroed: if old_memory != result_ptr { delete_key(&data.allocation_map, old_memory) } diff --git a/core/os/os.odin b/core/os/os.odin index 15864e47e..3210a39d0 100644 --- a/core/os/os.odin +++ b/core/os/os.odin @@ -210,15 +210,15 @@ heap_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode, } } - aligned_resize :: proc(p: rawptr, old_size: int, new_size: int, new_alignment: int) -> (new_memory: []byte, err: mem.Allocator_Error) { + aligned_resize :: proc(p: rawptr, old_size: int, new_size: int, new_alignment: int, zero_memory := true) -> (new_memory: []byte, err: mem.Allocator_Error) { if p == nil { return nil, nil } - new_memory = aligned_alloc(new_size, new_alignment, p) or_return + new_memory = aligned_alloc(new_size, new_alignment, p, zero_memory) or_return // NOTE: heap_resize does not zero the new memory, so we do it - if new_size > old_size { + if zero_memory && new_size > old_size { new_region := mem.raw_data(new_memory[old_size:]) mem.zero(new_region, new_size - old_size) } @@ -235,16 +235,16 @@ heap_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode, case .Free_All: return nil, .Mode_Not_Implemented - case .Resize: + case .Resize, .Resize_Non_Zeroed: if old_memory == nil { - return aligned_alloc(size, alignment) + return aligned_alloc(size, alignment, nil, mode == .Resize) } - return aligned_resize(old_memory, old_size, size, alignment) + return aligned_resize(old_memory, old_size, size, alignment, mode == .Resize) case .Query_Features: set := (^mem.Allocator_Mode_Set)(old_memory) if set != nil { - set^ = {.Alloc, .Alloc_Non_Zeroed, .Free, .Resize, .Query_Features} + set^ = {.Alloc, .Alloc_Non_Zeroed, .Free, .Resize, .Resize_Non_Zeroed, .Query_Features} } return nil, nil diff --git a/core/runtime/core.odin b/core/runtime/core.odin index 2d176f909..0832ddd13 100644 --- a/core/runtime/core.odin +++ b/core/runtime/core.odin @@ -306,6 +306,7 @@ Allocator_Mode :: enum byte { Query_Features, Query_Info, Alloc_Non_Zeroed, + Resize_Non_Zeroed, } Allocator_Mode_Set :: distinct bit_set[Allocator_Mode] diff --git a/core/runtime/core_builtin.odin b/core/runtime/core_builtin.odin index 0348a93df..b597c2486 100644 --- a/core/runtime/core_builtin.odin +++ b/core/runtime/core_builtin.odin @@ -169,10 +169,16 @@ clear :: proc{clear_dynamic_array, clear_map} @builtin reserve :: proc{reserve_dynamic_array, reserve_map} +@builtin +non_zero_reserve :: proc{non_zero_reserve_dynamic_array} + // `resize` will try to resize memory of a passed dynamic array or map to the requested element count (setting the `len`, and possibly `cap`). @builtin resize :: proc{resize_dynamic_array} +@builtin +non_zero_resize :: proc{non_zero_resize_dynamic_array} + // Shrinks the capacity of a dynamic array or map down to the current length, or the given capacity. @builtin shrink :: proc{shrink_dynamic_array, shrink_map} @@ -404,10 +410,7 @@ delete_key :: proc(m: ^$T/map[$K]$V, key: K) -> (deleted_key: K, deleted_value: return } - - -@builtin -append_elem :: proc(array: ^$T/[dynamic]$E, arg: E, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { +_append_elem :: #force_inline proc(array: ^$T/[dynamic]$E, arg: E, should_zero: bool, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { if array == nil { return 0, nil } @@ -418,7 +421,13 @@ append_elem :: proc(array: ^$T/[dynamic]$E, arg: E, loc := #caller_location) -> } else { if cap(array) < len(array)+1 { cap := 2 * cap(array) + max(8, 1) - err = reserve(array, cap, loc) // do not 'or_return' here as it could be a partial success + + // do not 'or_return' here as it could be a partial success + if should_zero { + err = reserve(array, cap, loc) + } else { + err = non_zero_reserve(array, cap, loc) + } } if cap(array)-len(array) > 0 { a := (^Raw_Dynamic_Array)(array) @@ -435,7 +444,16 @@ append_elem :: proc(array: ^$T/[dynamic]$E, arg: E, loc := #caller_location) -> } @builtin -append_elems :: proc(array: ^$T/[dynamic]$E, args: ..E, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { +append_elem :: proc(array: ^$T/[dynamic]$E, arg: E, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { + return _append_elem(array, arg, true, loc=loc) +} + +@builtin +non_zero_append_elem :: proc(array: ^$T/[dynamic]$E, arg: E, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { + return _append_elem(array, arg, false, loc=loc) +} + +_append_elems :: #force_inline proc(array: ^$T/[dynamic]$E, should_zero: bool, loc := #caller_location, args: ..E) -> (n: int, err: Allocator_Error) #optional_allocator_error { if array == nil { return 0, nil } @@ -452,7 +470,13 @@ append_elems :: proc(array: ^$T/[dynamic]$E, args: ..E, loc := #caller_location) } else { if cap(array) < len(array)+arg_len { cap := 2 * cap(array) + max(8, arg_len) - err = reserve(array, cap, loc) // do not 'or_return' here as it could be a partial success + + // do not 'or_return' here as it could be a partial success + if should_zero { + err = reserve(array, cap, loc) + } else { + err = non_zero_reserve(array, cap, loc) + } } arg_len = min(cap(array)-len(array), arg_len) if arg_len > 0 { @@ -468,11 +492,33 @@ append_elems :: proc(array: ^$T/[dynamic]$E, args: ..E, loc := #caller_location) } } +@builtin +append_elems :: proc(array: ^$T/[dynamic]$E, args: ..E, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { + return _append_elems(array, true, loc, ..args) +} + +@builtin +non_zero_append_elems :: proc(array: ^$T/[dynamic]$E, args: ..E, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { + return _append_elems(array, false, loc, ..args) +} + // The append_string built-in procedure appends a string to the end of a [dynamic]u8 like type +_append_elem_string :: proc(array: ^$T/[dynamic]$E/u8, arg: $A/string, should_zero: bool, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { + args := transmute([]E)arg + if should_zero { + return append_elems(array, ..args, loc=loc) + } else { + return non_zero_append_elems(array, ..args, loc=loc) + } +} + @builtin append_elem_string :: proc(array: ^$T/[dynamic]$E/u8, arg: $A/string, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { - args := transmute([]E)arg - return append_elems(array, ..args, loc=loc) + return _append_elem_string(array, arg, true, loc) +} +@builtin +non_zero_append_elem_string :: proc(array: ^$T/[dynamic]$E/u8, arg: $A/string, loc := #caller_location) -> (n: int, err: Allocator_Error) #optional_allocator_error { + return _append_elem_string(array, arg, false, loc) } @@ -492,6 +538,7 @@ append_string :: proc(array: ^$T/[dynamic]$E/u8, args: ..string, loc := #caller_ // The append built-in procedure appends elements to the end of a dynamic array @builtin append :: proc{append_elem, append_elems, append_elem_string} +@builtin non_zero_append :: proc{non_zero_append_elem, non_zero_append_elems, non_zero_append_elem_string} @builtin @@ -633,8 +680,7 @@ clear_dynamic_array :: proc "contextless" (array: ^$T/[dynamic]$E) { // `reserve_dynamic_array` will try to reserve memory of a passed dynamic array or map to the requested element count (setting the `cap`). // // Note: Prefer the procedure group `reserve`. -@builtin -reserve_dynamic_array :: proc(array: ^$T/[dynamic]$E, capacity: int, loc := #caller_location) -> Allocator_Error { +_reserve_dynamic_array :: #force_inline proc(array: ^$T/[dynamic]$E, capacity: int, should_zero: bool, loc := #caller_location) -> Allocator_Error { if array == nil { return nil } @@ -653,7 +699,12 @@ reserve_dynamic_array :: proc(array: ^$T/[dynamic]$E, capacity: int, loc := #cal new_size := capacity * size_of(E) allocator := a.allocator - new_data := mem_resize(a.data, old_size, new_size, align_of(E), allocator, loc) or_return + new_data: []byte + if should_zero { + new_data = mem_resize(a.data, old_size, new_size, align_of(E), allocator, loc) or_return + } else { + new_data = non_zero_mem_resize(a.data, old_size, new_size, align_of(E), allocator, loc) or_return + } if new_data == nil && new_size > 0 { return .Out_Of_Memory } @@ -663,11 +714,20 @@ reserve_dynamic_array :: proc(array: ^$T/[dynamic]$E, capacity: int, loc := #cal return nil } +@builtin +reserve_dynamic_array :: proc(array: ^$T/[dynamic]$E, capacity: int, loc := #caller_location) -> Allocator_Error { + return _reserve_dynamic_array(array, capacity, true, loc) +} + +@builtin +non_zero_reserve_dynamic_array :: proc(array: ^$T/[dynamic]$E, capacity: int, loc := #caller_location) -> Allocator_Error { + return _reserve_dynamic_array(array, capacity, false, loc) +} + // `resize_dynamic_array` will try to resize memory of a passed dynamic array or map to the requested element count (setting the `len`, and possibly `cap`). // // Note: Prefer the procedure group `resize` -@builtin -resize_dynamic_array :: proc(array: ^$T/[dynamic]$E, length: int, loc := #caller_location) -> Allocator_Error { +_resize_dynamic_array :: #force_inline proc(array: ^$T/[dynamic]$E, length: int, should_zero: bool, loc := #caller_location) -> Allocator_Error { if array == nil { return nil } @@ -687,7 +747,12 @@ resize_dynamic_array :: proc(array: ^$T/[dynamic]$E, length: int, loc := #caller new_size := length * size_of(E) allocator := a.allocator - new_data := mem_resize(a.data, old_size, new_size, align_of(E), allocator, loc) or_return + new_data : []byte + if should_zero { + new_data = mem_resize(a.data, old_size, new_size, align_of(E), allocator, loc) or_return + } else { + new_data = non_zero_mem_resize(a.data, old_size, new_size, align_of(E), allocator, loc) or_return + } if new_data == nil && new_size > 0 { return .Out_Of_Memory } @@ -698,6 +763,16 @@ resize_dynamic_array :: proc(array: ^$T/[dynamic]$E, length: int, loc := #caller return nil } +@builtin +resize_dynamic_array :: proc(array: ^$T/[dynamic]$E, length: int, loc := #caller_location) -> Allocator_Error { + return _resize_dynamic_array(array, length, true, loc=loc) +} + +@builtin +non_zero_resize_dynamic_array :: proc(array: ^$T/[dynamic]$E, length: int, loc := #caller_location) -> Allocator_Error { + return _resize_dynamic_array(array, length, false, loc=loc) +} + /* Shrinks the capacity of a dynamic array down to the current length, or the given capacity. diff --git a/core/runtime/default_allocators_arena.odin b/core/runtime/default_allocators_arena.odin index 1c36c4f7c..3d62ba4eb 100644 --- a/core/runtime/default_allocators_arena.odin +++ b/core/runtime/default_allocators_arena.odin @@ -195,7 +195,7 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, err = .Mode_Not_Implemented case .Free_All: arena_free_all(arena, location) - case .Resize: + case .Resize, .Resize_Non_Zeroed: old_data := ([^]byte)(old_memory) switch { diff --git a/core/runtime/default_allocators_nil.odin b/core/runtime/default_allocators_nil.odin index eee6a7998..c882f5196 100644 --- a/core/runtime/default_allocators_nil.odin +++ b/core/runtime/default_allocators_nil.odin @@ -10,7 +10,7 @@ nil_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, return nil, .None case .Free_All: return nil, .Mode_Not_Implemented - case .Resize: + case .Resize, .Resize_Non_Zeroed: if size == 0 { return nil, .None } @@ -55,6 +55,10 @@ panic_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, if size > 0 { panic("panic allocator, .Resize called", loc=loc) } + case .Resize_Non_Zeroed: + if size > 0 { + panic("panic allocator, .Alloc_Non_Zeroed called", loc=loc) + } case .Free: if old_memory != nil { panic("panic allocator, .Free called", loc=loc) diff --git a/core/runtime/internal.odin b/core/runtime/internal.odin index d0e550743..7c91a5ce6 100644 --- a/core/runtime/internal.odin +++ b/core/runtime/internal.odin @@ -187,7 +187,7 @@ mem_free_all :: #force_inline proc(allocator := context.allocator, loc := #calle return } -mem_resize :: proc(ptr: rawptr, old_size, new_size: int, alignment: int = DEFAULT_ALIGNMENT, allocator := context.allocator, loc := #caller_location) -> (data: []byte, err: Allocator_Error) { +_mem_resize :: #force_inline proc(ptr: rawptr, old_size, new_size: int, alignment: int = DEFAULT_ALIGNMENT, allocator := context.allocator, should_zero: bool, loc := #caller_location) -> (data: []byte, err: Allocator_Error) { if allocator.procedure == nil { return nil, nil } @@ -198,15 +198,27 @@ mem_resize :: proc(ptr: rawptr, old_size, new_size: int, alignment: int = DEFAUL } return } else if ptr == nil { - return allocator.procedure(allocator.data, .Alloc, new_size, alignment, nil, 0, loc) + if should_zero { + return allocator.procedure(allocator.data, .Alloc, new_size, alignment, nil, 0, loc) + } else { + return allocator.procedure(allocator.data, .Alloc_Non_Zeroed, new_size, alignment, nil, 0, loc) + } } else if old_size == new_size && uintptr(ptr) % uintptr(alignment) == 0 { data = ([^]byte)(ptr)[:old_size] return } - data, err = allocator.procedure(allocator.data, .Resize, new_size, alignment, ptr, old_size, loc) + if should_zero { + data, err = allocator.procedure(allocator.data, .Resize, new_size, alignment, ptr, old_size, loc) + } else { + data, err = allocator.procedure(allocator.data, .Resize_Non_Zeroed, new_size, alignment, ptr, old_size, loc) + } if err == .Mode_Not_Implemented { - data, err = allocator.procedure(allocator.data, .Alloc, new_size, alignment, nil, 0, loc) + if should_zero { + data, err = allocator.procedure(allocator.data, .Alloc, new_size, alignment, nil, 0, loc) + } else { + data, err = allocator.procedure(allocator.data, .Alloc_Non_Zeroed, new_size, alignment, nil, 0, loc) + } if err != nil { return } @@ -216,6 +228,13 @@ mem_resize :: proc(ptr: rawptr, old_size, new_size: int, alignment: int = DEFAUL return } +mem_resize :: proc(ptr: rawptr, old_size, new_size: int, alignment: int = DEFAULT_ALIGNMENT, allocator := context.allocator, loc := #caller_location) -> (data: []byte, err: Allocator_Error) { + return _mem_resize(ptr, old_size, new_size, alignment, allocator, true, loc) +} +non_zero_mem_resize :: proc(ptr: rawptr, old_size, new_size: int, alignment: int = DEFAULT_ALIGNMENT, allocator := context.allocator, loc := #caller_location) -> (data: []byte, err: Allocator_Error) { + return _mem_resize(ptr, old_size, new_size, alignment, allocator, false, loc) +} + memory_equal :: proc "contextless" (x, y: rawptr, n: int) -> bool { switch { case n == 0: return true From bfbeb23f5479af375ceea6d97d2add64a6bc6519 Mon Sep 17 00:00:00 2001 From: Colin Davidson Date: Mon, 4 Dec 2023 03:09:13 -0800 Subject: [PATCH 02/57] add resize non zeroed in more places --- core/log/log_allocator.odin | 9 ++++++++- core/mem/virtual/arena.odin | 2 +- core/runtime/default_allocators_windows.odin | 4 ++-- vendor/commonmark/cmark.odin | 4 ++-- vendor/raylib/raylib.odin | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/core/log/log_allocator.odin b/core/log/log_allocator.odin index 934f0d643..846a84a62 100644 --- a/core/log/log_allocator.odin +++ b/core/log/log_allocator.odin @@ -80,6 +80,13 @@ log_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode, la.prefix, padding, old_memory, old_size, size, alignment, location = location, ) + case .Resize_Non_Zeroed: + logf( + la.level, + "%s%s>>> ALLOCATOR(mode=.Resize_Non_Zeroed, ptr=%p, old_size=%d, size=%d, alignment=%d)", + la.prefix, padding, old_memory, old_size, size, alignment, + location = location, + ) case .Query_Features: logf( la.level, @@ -111,4 +118,4 @@ log_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode, } } return data, err -} \ No newline at end of file +} diff --git a/core/mem/virtual/arena.odin b/core/mem/virtual/arena.odin index d15df46ad..f6fbe237f 100644 --- a/core/mem/virtual/arena.odin +++ b/core/mem/virtual/arena.odin @@ -288,7 +288,7 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode, err = .Mode_Not_Implemented case .Free_All: arena_free_all(arena, location) - case .Resize: + case .Resize, .Resize_Non_Zeroed: old_data := ([^]byte)(old_memory) switch { diff --git a/core/runtime/default_allocators_windows.odin b/core/runtime/default_allocators_windows.odin index a78a4d04e..1b0f78428 100644 --- a/core/runtime/default_allocators_windows.odin +++ b/core/runtime/default_allocators_windows.odin @@ -19,7 +19,7 @@ when ODIN_DEFAULT_TO_NIL_ALLOCATOR { case .Free_All: return nil, .Mode_Not_Implemented - case .Resize: + case .Resize, .Resize_Non_Zeroed: data, err = _windows_default_resize(old_memory, old_size, size, alignment) case .Query_Features: @@ -41,4 +41,4 @@ when ODIN_DEFAULT_TO_NIL_ALLOCATOR { data = nil, } } -} \ No newline at end of file +} diff --git a/vendor/commonmark/cmark.odin b/vendor/commonmark/cmark.odin index 80e33cec4..05f639371 100644 --- a/vendor/commonmark/cmark.odin +++ b/vendor/commonmark/cmark.odin @@ -507,7 +507,7 @@ cmark_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mod case .Free_All: return nil, .Mode_Not_Implemented - case .Resize: + case .Resize, .Resize_Non_Zeroed: new_ptr := cmark_alloc.realloc(old_memory, c.size_t(size)) res = transmute([]byte)runtime.Raw_Slice{new_ptr, size} if size > old_size { @@ -529,4 +529,4 @@ get_default_mem_allocator_as_odin :: proc() -> runtime.Allocator { procedure = cmark_allocator_proc, data = rawptr(get_default_mem_allocator()), } -} \ No newline at end of file +} diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin index 21d044145..63c663228 100644 --- a/vendor/raylib/raylib.odin +++ b/vendor/raylib/raylib.odin @@ -1683,7 +1683,7 @@ MemAllocatorProc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode, MemFree(old_memory) return nil, nil - case .Resize: + case .Resize, .Resize_Non_Zeroed: ptr := MemRealloc(old_memory, c.uint(size)) if ptr == nil { err = .Out_Of_Memory From 031b0cc53493249be6cb421c65d089e1ce0a06f2 Mon Sep 17 00:00:00 2001 From: Walther Chen Date: Tue, 5 Dec 2023 16:09:09 -0500 Subject: [PATCH 03/57] fix strings.last_index_any for single char --- core/strings/strings.odin | 3 ++- tests/core/strings/test_core_strings.odin | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/strings/strings.odin b/core/strings/strings.odin index 539829a1a..5cee25a66 100644 --- a/core/strings/strings.odin +++ b/core/strings/strings.odin @@ -1792,7 +1792,8 @@ last_index_any :: proc(s, chars: string) -> (res: int) { if r >= utf8.RUNE_SELF { r = utf8.RUNE_ERROR } - return index_rune(chars, r) + i := index_rune(chars, r) + return i if i < 0 else 0 } if len(s) > 8 { diff --git a/tests/core/strings/test_core_strings.odin b/tests/core/strings/test_core_strings.odin index fdaf3af28..3424675b3 100644 --- a/tests/core/strings/test_core_strings.odin +++ b/tests/core/strings/test_core_strings.odin @@ -67,6 +67,18 @@ test_index_any_larger_string_found :: proc(t: ^testing.T) { expect(t, index == 8, "index_any should be 8") } +@test +test_last_index_any_small_string_found :: proc(t: ^testing.T) { + index := strings.last_index_any(".", "/:.\"") + expect(t, index == 0, "last_index_any should be 0") +} + +@test +test_last_index_any_small_string_not_found :: proc(t: ^testing.T) { + index := strings.last_index_any(".", "/:\"") + expect(t, index == -1, "last_index_any should be -1") +} + Cut_Test :: struct { input: string, offset: int, From ecee0e2db2107db7e7ea3242a3431d00a9392887 Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Fri, 15 Dec 2023 17:06:55 +0900 Subject: [PATCH 04/57] repo: Add more test binaries to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1f55b7ab7..91d8328da 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,8 @@ tests/core/test_linalg_glsl_math tests/core/test_noise tests/core/test_varint tests/core/test_xml +tests/core/test_core_slice +tests/core/test_core_thread tests/vendor/vendor_botan # Visual Studio 2015 cache/options directory .vs/ From 9235e8245193fb891e46ee4a7daa3e101ff8032a Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Fri, 15 Dec 2023 16:55:53 +0900 Subject: [PATCH 05/57] core/simd/x86: Correct a target feature name --- core/simd/x86/pclmulqdq.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/simd/x86/pclmulqdq.odin b/core/simd/x86/pclmulqdq.odin index 692fb7ce1..31ba58fe6 100644 --- a/core/simd/x86/pclmulqdq.odin +++ b/core/simd/x86/pclmulqdq.odin @@ -1,7 +1,7 @@ //+build i386, amd64 package simd_x86 -@(require_results, enable_target_feature="pclmulqdq") +@(require_results, enable_target_feature="pclmul") _mm_clmulepi64_si128 :: #force_inline proc "c" (a, b: __m128i, $IMM8: u8) -> __m128i { return pclmulqdq(a, b, u8(IMM8)) } From cd65a15d81b32636c5097200446cc6d6afc7199b Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Fri, 15 Dec 2023 17:29:59 +0900 Subject: [PATCH 06/57] src: `enable_target_feature` should add features, not overwrite `llvm_features` being empty is the default state, and implies the presence of certain features. Previously if any target features were explicitly enabled by the `enable_target_feature` attribute, they were added comma separated to `llvm_features`. For example: `lzcnt,popcnt,...,sse4.2,sse` This was causing LLVM to try to target a CPU that *ONLY* has the explicitly enabled features. This now will prefix explicitly enabled features with a `+`, and preserve the existing `llvm_features` string by appending to it if it is set. --- src/build_settings.cpp | 4 +++- src/llvm_backend.cpp | 41 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 18ad8ac0d..9d909fcae 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -1493,7 +1493,7 @@ gb_internal void enable_target_feature(TokenPos pos, String const &target_featur } -gb_internal char const *target_features_set_to_cstring(gbAllocator allocator, bool with_quotes) { +gb_internal char const *target_features_set_to_cstring(gbAllocator allocator, bool with_quotes, bool with_plus) { isize len = 0; isize i = 0; for (String const &feature : build_context.target_features_set) { @@ -1502,6 +1502,7 @@ gb_internal char const *target_features_set_to_cstring(gbAllocator allocator, bo } len += feature.len; if (with_quotes) len += 2; + if (with_plus) len += 1; i += 1; } char *features = gb_alloc_array(allocator, char, len+1); @@ -1513,6 +1514,7 @@ gb_internal char const *target_features_set_to_cstring(gbAllocator allocator, bo } if (with_quotes) features[len++] = '"'; + if (with_plus) features[len++] = '+'; gb_memmove(features + len, feature.text, feature.len); len += feature.len; if (with_quotes) features[len++] = '"'; diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index ca71a0f45..b90fd8495 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -2531,7 +2531,46 @@ gb_internal bool lb_generate_code(lbGenerator *gen) { */ if (build_context.target_features_set.entries.count != 0) { - llvm_features = target_features_set_to_cstring(permanent_allocator(), false); + // Prefix all of the features with a `+`, because we are + // enabling additional features. + char const *additional_features = target_features_set_to_cstring(permanent_allocator(), false, true); + + String f_string = make_string_c(llvm_features); + String a_string = make_string_c(additional_features); + isize f_len = f_string.len; + + if (f_len == 0) { + // The common case is that llvm_features is empty, so + // the target_features_set additions can be used as is. + llvm_features = additional_features; + } else { + // The user probably specified `-microarch:native`, so + // llvm_features is populated by LLVM's idea of what + // the host CPU supports. + // + // As far as I can tell, (which is barely better than + // wild guessing), a bitset is formed by parsing the + // string left to right. + // + // So, llvm_features + ',' + additonal_features, will + // makes the target_features_set override llvm_features. + + char *tmp = gb_alloc_array(permanent_allocator(), char, f_len + 1 + a_string.len + 1); + isize len = 0; + + // tmp = f_string + gb_memmove(tmp, f_string.text, f_string.len); + len += f_string.len; + // tmp += ',' + tmp[len++] = ','; + // tmp += a_string + gb_memmove(tmp + len, a_string.text, a_string.len); + len += a_string.len; + // tmp += NUL + tmp[len++] = 0; + + llvm_features = tmp; + } } // GB_ASSERT_MSG(LLVMTargetHasAsmBackend(target)); From 8d7c37e38430fa5d8a40939dec5657e6837c69c6 Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Sat, 30 Dec 2023 04:49:28 +0900 Subject: [PATCH 07/57] core/simd/x86: Use the `none` calling convention for intrinsics The LLVM intrinsics that live under `llvm.x86` are not actual functions, so trying to invoke them as such using the platform's native C calling convention causes incorrect types to be emitted in the IR. Thanks to laytanl for assistance in testing. --- core/simd/x86/adx.odin | 2 +- core/simd/x86/fxsr.odin | 2 +- core/simd/x86/pclmulqdq.odin | 2 +- core/simd/x86/rdtsc.odin | 2 +- core/simd/x86/sha.odin | 2 +- core/simd/x86/sse.odin | 2 +- core/simd/x86/sse2.odin | 2 +- core/simd/x86/sse3.odin | 2 +- core/simd/x86/sse41.odin | 2 +- core/simd/x86/sse42.odin | 2 +- core/simd/x86/ssse3.odin | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/simd/x86/adx.odin b/core/simd/x86/adx.odin index d03cffcff..5750ae627 100644 --- a/core/simd/x86/adx.odin +++ b/core/simd/x86/adx.odin @@ -37,7 +37,7 @@ when ODIN_ARCH == .amd64 { } } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name="llvm.x86.addcarry.32") llvm_addcarry_u32 :: proc(a: u8, b: u32, c: u32) -> (u8, u32) --- diff --git a/core/simd/x86/fxsr.odin b/core/simd/x86/fxsr.odin index cd78de7d4..a9213fed2 100644 --- a/core/simd/x86/fxsr.odin +++ b/core/simd/x86/fxsr.odin @@ -21,7 +21,7 @@ when ODIN_ARCH == .amd64 { } } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name="llvm.x86.fxsave") fxsave :: proc(p: rawptr) --- diff --git a/core/simd/x86/pclmulqdq.odin b/core/simd/x86/pclmulqdq.odin index 31ba58fe6..e827bf6b9 100644 --- a/core/simd/x86/pclmulqdq.odin +++ b/core/simd/x86/pclmulqdq.odin @@ -6,7 +6,7 @@ _mm_clmulepi64_si128 :: #force_inline proc "c" (a, b: __m128i, $IMM8: u8) -> __m return pclmulqdq(a, b, u8(IMM8)) } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name="llvm.x86.pclmulqdq") pclmulqdq :: proc(a, round_key: __m128i, #const imm8: u8) -> __m128i --- diff --git a/core/simd/x86/rdtsc.odin b/core/simd/x86/rdtsc.odin index 54024c3f2..8a8b13c4b 100644 --- a/core/simd/x86/rdtsc.odin +++ b/core/simd/x86/rdtsc.odin @@ -11,7 +11,7 @@ __rdtscp :: #force_inline proc "c" (aux: ^u32) -> u64 { return rdtscp(aux) } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name="llvm.x86.rdtsc") rdtsc :: proc() -> u64 --- diff --git a/core/simd/x86/sha.odin b/core/simd/x86/sha.odin index f015f4b8a..bc58e8504 100644 --- a/core/simd/x86/sha.odin +++ b/core/simd/x86/sha.odin @@ -30,7 +30,7 @@ _mm_sha256rnds2_epu32 :: #force_inline proc "c" (a, b, k: __m128i) -> __m128i { return transmute(__m128i)sha256rnds2(transmute(i32x4)a, transmute(i32x4)b, transmute(i32x4)k) } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name="llvm.x86.sha1msg1") sha1msg1 :: proc(a, b: i32x4) -> i32x4 --- diff --git a/core/simd/x86/sse.odin b/core/simd/x86/sse.odin index 2b70e954f..903a43dfd 100644 --- a/core/simd/x86/sse.odin +++ b/core/simd/x86/sse.odin @@ -532,7 +532,7 @@ when ODIN_ARCH == .amd64 { } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name="llvm.x86.sse.add.ss") addss :: proc(a, b: __m128) -> __m128 --- diff --git a/core/simd/x86/sse2.odin b/core/simd/x86/sse2.odin index dd292712f..a597122f1 100644 --- a/core/simd/x86/sse2.odin +++ b/core/simd/x86/sse2.odin @@ -1040,7 +1040,7 @@ when ODIN_ARCH == .amd64 { } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name="llvm.x86.sse2.pause") pause :: proc() --- diff --git a/core/simd/x86/sse3.odin b/core/simd/x86/sse3.odin index 7a3073c18..cf5f3b2fa 100644 --- a/core/simd/x86/sse3.odin +++ b/core/simd/x86/sse3.odin @@ -49,7 +49,7 @@ _mm_moveldup_ps :: #force_inline proc "c" (a: __m128) -> __m128 { return simd.shuffle(a, a, 0, 0, 2, 2) } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name = "llvm.x86.sse3.addsub.ps") addsubps :: proc(a, b: __m128) -> __m128 --- diff --git a/core/simd/x86/sse41.odin b/core/simd/x86/sse41.odin index b35be33f2..8c306ba4c 100644 --- a/core/simd/x86/sse41.odin +++ b/core/simd/x86/sse41.odin @@ -291,7 +291,7 @@ when ODIN_ARCH == .amd64 { } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name = "llvm.x86.sse41.pblendvb") pblendvb :: proc(a, b: i8x16, mask: i8x16) -> i8x16 --- diff --git a/core/simd/x86/sse42.odin b/core/simd/x86/sse42.odin index 62b4f0478..621346342 100644 --- a/core/simd/x86/sse42.odin +++ b/core/simd/x86/sse42.odin @@ -104,7 +104,7 @@ when ODIN_ARCH == .amd64 { } } -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { // SSE 4.2 string and text comparison ops @(link_name="llvm.x86.sse42.pcmpestrm128") diff --git a/core/simd/x86/ssse3.odin b/core/simd/x86/ssse3.odin index f11ef6774..0264a1c93 100644 --- a/core/simd/x86/ssse3.odin +++ b/core/simd/x86/ssse3.odin @@ -105,7 +105,7 @@ _mm_sign_epi32 :: #force_inline proc "c" (a, b: __m128i) -> __m128i { -@(private, default_calling_convention="c") +@(private, default_calling_convention="none") foreign _ { @(link_name = "llvm.x86.ssse3.pabs.b.128") pabsb128 :: proc(a: i8x16) -> u8x16 --- From aff8f06e3cb1bdb9c3ffee98a68675c843df78fd Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 7 Jan 2024 19:56:00 +0000 Subject: [PATCH 08/57] Add frontend stuff instrumentation tooling //+no-instrumentation @(no_instrumentation) @(instrumentation_enter) @(instrumentation_exit) --- src/check_decl.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++ src/checker.cpp | 44 +++++++++++++++++++++++++++++++ src/checker.hpp | 35 ++++++++++++++++-------- src/entity.cpp | 1 + src/parser.cpp | 4 ++- src/parser.hpp | 2 ++ 6 files changed, 140 insertions(+), 12 deletions(-) diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 8a3f89877..c69d8185e 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -909,6 +909,72 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { e->Procedure.entry_point_only = ac.entry_point_only; e->Procedure.is_export = ac.is_export; + + bool no_instrumentation = false; + if (pl->body == nullptr) { + no_instrumentation = true; + if (ac.no_instrumentation != Instrumentation_Default) { + error(e->token, "@(no_instrumentation) is not allowed on foreign procedures"); + } + } else { + if (e->file) { + no_instrumentation = (e->file->flags & AstFile_NoInstrumentation) != 0; + } + + switch (ac.no_instrumentation) { + case Instrumentation_Enabled: no_instrumentation = false; break; + case Instrumentation_Default: break; + case Instrumentation_Disabled: no_instrumentation = true; break; + } + } + e->Procedure.no_instrumentation = no_instrumentation; + + auto const is_valid_instrumentation_call = [](Type *type) -> bool { + if (type == nullptr || type->kind != Type_Proc) { + return false; + } + if (type->Proc.calling_convention != ProcCC_CDecl) { + return false; + } + if (type->Proc.result_count != 0) { + return false; + } + if (type->Proc.param_count != 2) { + return false; + } + Type *p0 = type->Proc.params->Tuple.variables[0]->type; + Type *p1 = type->Proc.params->Tuple.variables[1]->type; + return is_type_rawptr(p0) && is_type_rawptr(p1); + }; + + if (ac.instrumentation_enter && ac.instrumentation_exit) { + error(e->token, "A procedure cannot be marked with both @(instrumentation_enter) and @(instrumentation_exit)"); + } else if (ac.instrumentation_enter) { + if (!is_valid_instrumentation_call(e->type)) { + gbString s = type_to_string(e->type); + error(e->token, "@(instrumentation_enter) procedures must have the type 'proc \"c\" (rawptr, rawptr)', got %s", s); + gb_string_free(s); + } + MUTEX_GUARD(&ctx->info->instrumentation_mutex); + if (ctx->info->instrumentation_enter_entity != nullptr) { + error(e->token, "@(instrumentation_enter) has already been set"); + } else { + ctx->info->instrumentation_enter_entity = e; + } + } else if (ac.instrumentation_exit) { + if (!is_valid_instrumentation_call(e->type)) { + gbString s = type_to_string(e->type); + error(e->token, "@(instrumentation_exit) procedures must have the type 'proc \"c\" (rawptr, rawptr)', got %s", s); + gb_string_free(s); + } + MUTEX_GUARD(&ctx->info->instrumentation_mutex); + if (ctx->info->instrumentation_exit_entity != nullptr) { + error(e->token, "@(instrumentation_exit) has already been set"); + } else { + ctx->info->instrumentation_exit_entity = e; + } + } + e->deprecated_message = ac.deprecated_message; e->warning_message = ac.warning_message; ac.link_name = handle_link_name(ctx, e->token, ac.link_name, ac.link_prefix); diff --git a/src/checker.cpp b/src/checker.cpp index d25acb15e..5e46e87fe 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -2581,6 +2581,9 @@ gb_internal void generate_minimum_dependency_set(Checker *c, Entity *start) { str_lit("multi_pointer_slice_expr_error"), ); + add_dependency_to_set(c, c->info.instrumentation_enter_entity); + add_dependency_to_set(c, c->info.instrumentation_exit_entity); + generate_minimum_dependency_set_internal(c, start); @@ -3414,8 +3417,38 @@ gb_internal DECL_ATTRIBUTE_PROC(proc_decl_attribute) { } return true; } else if (name == "entry_point_only") { + if (value != nullptr) { + error(value, "'%.*s' expects no parameter", LIT(name)); + } ac->entry_point_only = true; return true; + } else if (name == "no_instrumentation") { + ExactValue ev = check_decl_attribute_value(c, value); + if (ev.kind == ExactValue_Invalid) { + ac->no_instrumentation = Instrumentation_Disabled; + } else if (ev.kind == ExactValue_Bool) { + if (ev.value_bool) { + ac->no_instrumentation = Instrumentation_Disabled; + } else { + ac->no_instrumentation = Instrumentation_Enabled; + } + } else { + error(value, "Expected either a boolean or no parameter for '%.*s'", LIT(name)); + return false; + } + return true; + } else if (name == "instrumentation_enter") { + if (value != nullptr) { + error(value, "'%.*s' expects no parameter", LIT(name)); + } + ac->instrumentation_enter = true; + return true; + } else if (name == "instrumentation_exit") { + if (value != nullptr) { + error(value, "'%.*s' expects no parameter", LIT(name)); + } + ac->instrumentation_exit = true; + return true; } return false; } @@ -6216,6 +6249,17 @@ gb_internal void check_parsed_files(Checker *c) { GB_ASSERT(c->info.entity_queue.count.load(std::memory_order_relaxed) == 0); GB_ASSERT(c->info.definition_queue.count.load(std::memory_order_relaxed) == 0); + TIME_SECTION("check instrumentation calls"); + { + if ((c->info.instrumentation_enter_entity != nullptr) ^ + (c->info.instrumentation_exit_entity != nullptr)) { + Entity *e = c->info.instrumentation_enter_entity; + if (!e) e = c->info.instrumentation_exit_entity; + error(e->token, "Both @(instrumentation_enter) and @(instrumentation_exit) must be defined"); + } + } + + TIME_SECTION("add untyped expression values"); // Add untyped expression values for (UntypedExprInfo u = {}; mpsc_dequeue(&c->global_untyped_queue, &u); /**/) { diff --git a/src/checker.hpp b/src/checker.hpp index 7c399e50f..9da0f2950 100644 --- a/src/checker.hpp +++ b/src/checker.hpp @@ -103,6 +103,12 @@ struct DeferredProcedure { }; +enum InstrumentationFlag : i32 { + Instrumentation_Enabled = -1, + Instrumentation_Default = 0, + Instrumentation_Disabled = +1, +}; + struct AttributeContext { String link_name; String link_prefix; @@ -113,20 +119,23 @@ struct AttributeContext { String deprecated_message; String warning_message; DeferredProcedure deferred_procedure; - bool is_export : 1; - bool is_static : 1; - bool require_results : 1; - bool require_declaration : 1; - bool has_disabled_proc : 1; - bool disabled_proc : 1; - bool test : 1; - bool init : 1; - bool fini : 1; - bool set_cold : 1; - bool entry_point_only : 1; + bool is_export : 1; + bool is_static : 1; + bool require_results : 1; + bool require_declaration : 1; + bool has_disabled_proc : 1; + bool disabled_proc : 1; + bool test : 1; + bool init : 1; + bool fini : 1; + bool set_cold : 1; + bool entry_point_only : 1; + bool instrumentation_enter : 1; + bool instrumentation_exit : 1; u32 optimization_mode; // ProcedureOptimizationMode i64 foreign_import_priority_index; String extra_linker_flags; + InstrumentationFlag no_instrumentation; String objc_class; String objc_name; @@ -403,6 +412,10 @@ struct CheckerInfo { BlockingMutex all_procedures_mutex; Array all_procedures; + + BlockingMutex instrumentation_mutex; + Entity *instrumentation_enter_entity; + Entity *instrumentation_exit_entity; }; struct CheckerContext { diff --git a/src/entity.cpp b/src/entity.cpp index d0b3cf139..0539386d0 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -251,6 +251,7 @@ struct Entity { bool generated_from_polymorphic : 1; bool target_feature_disabled : 1; bool entry_point_only : 1; + bool no_instrumentation : 1; String target_feature; } Procedure; struct { diff --git a/src/parser.cpp b/src/parser.cpp index c0498b425..2671054df 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -5919,7 +5919,7 @@ gb_internal bool parse_file(Parser *p, AstFile *f) { f->vet_flags = parse_vet_tag(tok, lc); f->vet_flags_set = true; } else if (string_starts_with(lc, str_lit("+ignore"))) { - return false; + return false; } else if (string_starts_with(lc, str_lit("+private"))) { f->flags |= AstFile_IsPrivatePkg; String command = string_trim_starts_with(lc, str_lit("+private ")); @@ -5941,6 +5941,8 @@ gb_internal bool parse_file(Parser *p, AstFile *f) { } else { f->flags |= AstFile_IsLazy; } + } else if (lc == "+no-instrumentation") { + f->flags |= AstFile_NoInstrumentation; } else { warning(tok, "Ignoring unknown tag '%.*s'", LIT(lc)); } diff --git a/src/parser.hpp b/src/parser.hpp index bce818652..cc1836ef3 100644 --- a/src/parser.hpp +++ b/src/parser.hpp @@ -76,6 +76,8 @@ enum AstFileFlag : u32 { AstFile_IsTest = 1<<3, AstFile_IsLazy = 1<<4, + + AstFile_NoInstrumentation = 1<<5, }; enum AstDelayQueueKind { From f4782157d3b586a88983d3b770c2c0eeb17946d1 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 7 Jan 2024 21:34:44 +0000 Subject: [PATCH 09/57] Implement instrumentation pass --- core/runtime/core.odin | 1 + core/runtime/entry_unix.odin | 1 + core/runtime/entry_wasm.odin | 1 + core/runtime/entry_windows.odin | 1 + core/runtime/error_checks.odin | 24 +++++---- core/runtime/procs_windows_amd64.odin | 1 + core/runtime/procs_windows_i386.odin | 1 + src/check_decl.cpp | 26 ++++++--- src/entity.cpp | 2 +- src/llvm_backend.cpp | 2 - src/llvm_backend.hpp | 2 +- src/llvm_backend_general.cpp | 13 +++++ src/llvm_backend_opt.cpp | 77 +++++++++++++++++++++++++++ src/llvm_backend_proc.cpp | 12 +++++ 14 files changed, 143 insertions(+), 21 deletions(-) diff --git a/core/runtime/core.odin b/core/runtime/core.odin index 2d176f909..e12d9a43d 100644 --- a/core/runtime/core.odin +++ b/core/runtime/core.odin @@ -18,6 +18,7 @@ // This could change at a later date if the all these data structures are // implemented within the compiler rather than in this "preload" file // +//+no-instrumentation package runtime import "core:intrinsics" diff --git a/core/runtime/entry_unix.odin b/core/runtime/entry_unix.odin index 78e545c22..f494a509e 100644 --- a/core/runtime/entry_unix.odin +++ b/core/runtime/entry_unix.odin @@ -1,5 +1,6 @@ //+private //+build linux, darwin, freebsd, openbsd +//+no-instrumentation package runtime import "core:intrinsics" diff --git a/core/runtime/entry_wasm.odin b/core/runtime/entry_wasm.odin index 235d5611b..e7f3f156f 100644 --- a/core/runtime/entry_wasm.odin +++ b/core/runtime/entry_wasm.odin @@ -1,5 +1,6 @@ //+private //+build wasm32, wasm64p32 +//+no-instrumentation package runtime import "core:intrinsics" diff --git a/core/runtime/entry_windows.odin b/core/runtime/entry_windows.odin index a315c1209..277daecca 100644 --- a/core/runtime/entry_windows.odin +++ b/core/runtime/entry_windows.odin @@ -1,5 +1,6 @@ //+private //+build windows +//+no-instrumentation package runtime import "core:intrinsics" diff --git a/core/runtime/error_checks.odin b/core/runtime/error_checks.odin index 9d484979a..ea6333c29 100644 --- a/core/runtime/error_checks.odin +++ b/core/runtime/error_checks.odin @@ -1,5 +1,6 @@ package runtime +@(no_instrumentation) bounds_trap :: proc "contextless" () -> ! { when ODIN_OS == .Windows { windows_trap_array_bounds() @@ -8,6 +9,7 @@ bounds_trap :: proc "contextless" () -> ! { } } +@(no_instrumentation) type_assertion_trap :: proc "contextless" () -> ! { when ODIN_OS == .Windows { windows_trap_type_assertion() @@ -21,7 +23,7 @@ bounds_check_error :: proc "contextless" (file: string, line, column: i32, index if uint(index) < uint(count) { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (file: string, line, column: i32, index, count: int) -> ! { print_caller_location(Source_Code_Location{file, line, column, ""}) print_string(" Index ") @@ -34,6 +36,7 @@ bounds_check_error :: proc "contextless" (file: string, line, column: i32, index handle_error(file, line, column, index, count) } +@(no_instrumentation) slice_handle_error :: proc "contextless" (file: string, line, column: i32, lo, hi: int, len: int) -> ! { print_caller_location(Source_Code_Location{file, line, column, ""}) print_string(" Invalid slice indices ") @@ -46,6 +49,7 @@ slice_handle_error :: proc "contextless" (file: string, line, column: i32, lo, h bounds_trap() } +@(no_instrumentation) multi_pointer_slice_handle_error :: proc "contextless" (file: string, line, column: i32, lo, hi: int) -> ! { print_caller_location(Source_Code_Location{file, line, column, ""}) print_string(" Invalid slice indices ") @@ -82,7 +86,7 @@ dynamic_array_expr_error :: proc "contextless" (file: string, line, column: i32, if 0 <= low && low <= high && high <= max { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (file: string, line, column: i32, low, high, max: int) -> ! { print_caller_location(Source_Code_Location{file, line, column, ""}) print_string(" Invalid dynamic array indices ") @@ -103,7 +107,7 @@ matrix_bounds_check_error :: proc "contextless" (file: string, line, column: i32 uint(column_index) < uint(column_count) { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (file: string, line, column: i32, row_index, column_index, row_count, column_count: int) -> ! { print_caller_location(Source_Code_Location{file, line, column, ""}) print_string(" Matrix indices [") @@ -127,7 +131,7 @@ when ODIN_NO_RTTI { if ok { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (file: string, line, column: i32) -> ! { print_caller_location(Source_Code_Location{file, line, column, ""}) print_string(" Invalid type assertion\n") @@ -140,7 +144,7 @@ when ODIN_NO_RTTI { if ok { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (file: string, line, column: i32) -> ! { print_caller_location(Source_Code_Location{file, line, column, ""}) print_string(" Invalid type assertion\n") @@ -153,7 +157,7 @@ when ODIN_NO_RTTI { if ok { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (file: string, line, column: i32, from, to: typeid) -> ! { print_caller_location(Source_Code_Location{file, line, column, ""}) print_string(" Invalid type assertion from ") @@ -198,7 +202,7 @@ when ODIN_NO_RTTI { return id } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (file: string, line, column: i32, from, to: typeid, from_data: rawptr) -> ! { actual := variant_type(from, from_data) @@ -224,7 +228,7 @@ make_slice_error_loc :: #force_inline proc "contextless" (loc := #caller_locatio if 0 <= len { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (loc: Source_Code_Location, len: int) -> ! { print_caller_location(loc) print_string(" Invalid slice length for make: ") @@ -239,7 +243,7 @@ make_dynamic_array_error_loc :: #force_inline proc "contextless" (loc := #caller if 0 <= len && len <= cap { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (loc: Source_Code_Location, len, cap: int) -> ! { print_caller_location(loc) print_string(" Invalid dynamic array parameters for make: ") @@ -256,7 +260,7 @@ make_map_expr_error_loc :: #force_inline proc "contextless" (loc := #caller_loca if 0 <= cap { return } - @(cold) + @(cold, no_instrumentation) handle_error :: proc "contextless" (loc: Source_Code_Location, cap: int) -> ! { print_caller_location(loc) print_string(" Invalid map capacity for make: ") diff --git a/core/runtime/procs_windows_amd64.odin b/core/runtime/procs_windows_amd64.odin index e430357be..a30985d5c 100644 --- a/core/runtime/procs_windows_amd64.odin +++ b/core/runtime/procs_windows_amd64.odin @@ -1,4 +1,5 @@ //+private +//+no-instrumentation package runtime foreign import kernel32 "system:Kernel32.lib" diff --git a/core/runtime/procs_windows_i386.odin b/core/runtime/procs_windows_i386.odin index f810197f1..4f606da8f 100644 --- a/core/runtime/procs_windows_i386.odin +++ b/core/runtime/procs_windows_i386.odin @@ -1,4 +1,5 @@ //+private +//+no-instrumentation package runtime @require foreign import "system:int64.lib" diff --git a/src/check_decl.cpp b/src/check_decl.cpp index c69d8185e..a530945f9 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -910,24 +910,24 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { e->Procedure.entry_point_only = ac.entry_point_only; e->Procedure.is_export = ac.is_export; - bool no_instrumentation = false; + bool has_instrumentation = false; if (pl->body == nullptr) { - no_instrumentation = true; + has_instrumentation = false; if (ac.no_instrumentation != Instrumentation_Default) { error(e->token, "@(no_instrumentation) is not allowed on foreign procedures"); } } else { - if (e->file) { - no_instrumentation = (e->file->flags & AstFile_NoInstrumentation) != 0; + AstFile *file = e->token.pos.file_id ? global_files[e->token.pos.file_id] : nullptr; + if (file) { + has_instrumentation = (file->flags & AstFile_NoInstrumentation) == 0; } switch (ac.no_instrumentation) { - case Instrumentation_Enabled: no_instrumentation = false; break; + case Instrumentation_Enabled: has_instrumentation = true; break; case Instrumentation_Default: break; - case Instrumentation_Disabled: no_instrumentation = true; break; + case Instrumentation_Disabled: has_instrumentation = false; break; } } - e->Procedure.no_instrumentation = no_instrumentation; auto const is_valid_instrumentation_call = [](Type *type) -> bool { if (type == nullptr || type->kind != Type_Proc) { @@ -949,6 +949,9 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { if (ac.instrumentation_enter && ac.instrumentation_exit) { error(e->token, "A procedure cannot be marked with both @(instrumentation_enter) and @(instrumentation_exit)"); + + has_instrumentation = false; + e->flags |= EntityFlag_Require; } else if (ac.instrumentation_enter) { if (!is_valid_instrumentation_call(e->type)) { gbString s = type_to_string(e->type); @@ -961,6 +964,9 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { } else { ctx->info->instrumentation_enter_entity = e; } + + has_instrumentation = false; + e->flags |= EntityFlag_Require; } else if (ac.instrumentation_exit) { if (!is_valid_instrumentation_call(e->type)) { gbString s = type_to_string(e->type); @@ -973,8 +979,14 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { } else { ctx->info->instrumentation_exit_entity = e; } + + has_instrumentation = false; + e->flags |= EntityFlag_Require; } + e->Procedure.has_instrumentation = has_instrumentation; + + e->deprecated_message = ac.deprecated_message; e->warning_message = ac.warning_message; ac.link_name = handle_link_name(ctx, e->token, ac.link_name, ac.link_prefix); diff --git a/src/entity.cpp b/src/entity.cpp index 0539386d0..e6c46d37e 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -251,7 +251,7 @@ struct Entity { bool generated_from_polymorphic : 1; bool target_feature_disabled : 1; bool entry_point_only : 1; - bool no_instrumentation : 1; + bool has_instrumentation : 1; String target_feature; } Procedure; struct { diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index b90fd8495..0175d039e 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -1497,8 +1497,6 @@ gb_internal WORKER_TASK_PROC(lb_llvm_module_pass_worker_proc) { auto passes = array_make(heap_allocator(), 0, 64); defer (array_free(&passes)); - - LLVMPassBuilderOptionsRef pb_options = LLVMCreatePassBuilderOptions(); defer (LLVMDisposePassBuilderOptions(pb_options)); diff --git a/src/llvm_backend.hpp b/src/llvm_backend.hpp index 4e193bcea..b645d66d6 100644 --- a/src/llvm_backend.hpp +++ b/src/llvm_backend.hpp @@ -563,7 +563,7 @@ gb_internal LLVMTypeRef OdinLLVMGetVectorElementType(LLVMTypeRef type); gb_internal String lb_filepath_ll_for_module(lbModule *m); - +gb_internal LLVMTypeRef lb_type_internal_for_procedures_raw(lbModule *m, Type *type); gb_internal LLVMTypeRef llvm_array_type(LLVMTypeRef ElementType, uint64_t ElementCount) { #if LB_USE_NEW_PASS_SYSTEM diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp index 54327cc54..f0f5327c6 100644 --- a/src/llvm_backend_general.cpp +++ b/src/llvm_backend_general.cpp @@ -2348,6 +2348,15 @@ gb_internal LLVMAttributeRef lb_create_enum_attribute(LLVMContextRef ctx, char c return LLVMCreateEnumAttribute(ctx, kind, value); } +gb_internal LLVMAttributeRef lb_create_string_attribute(LLVMContextRef ctx, String const &key, String const &value) { + LLVMAttributeRef attr = LLVMCreateStringAttribute( + ctx, + cast(char const *)key.text, cast(unsigned)key.len, + cast(char const *)value.text, cast(unsigned)value.len); + return attr; +} + + gb_internal void lb_add_proc_attribute_at_index(lbProcedure *p, isize index, char const *name, u64 value) { LLVMAttributeRef attr = lb_create_enum_attribute(p->module->ctx, name, value); GB_ASSERT(attr != nullptr); @@ -2361,6 +2370,10 @@ gb_internal void lb_add_proc_attribute_at_index(lbProcedure *p, isize index, cha gb_internal void lb_add_attribute_to_proc(lbModule *m, LLVMValueRef proc_value, char const *name, u64 value=0) { LLVMAddAttributeAtIndex(proc_value, LLVMAttributeIndex_FunctionIndex, lb_create_enum_attribute(m->ctx, name, value)); } +gb_internal void lb_add_attribute_to_proc_with_string(lbModule *m, LLVMValueRef proc_value, String const &name, String const &value) { + LLVMAttributeRef attr = lb_create_string_attribute(m->ctx, name, value); + LLVMAddAttributeAtIndex(proc_value, LLVMAttributeIndex_FunctionIndex, attr); +} diff --git a/src/llvm_backend_opt.cpp b/src/llvm_backend_opt.cpp index 2e03b7974..d5487d259 100644 --- a/src/llvm_backend_opt.cpp +++ b/src/llvm_backend_opt.cpp @@ -380,6 +380,80 @@ gb_internal void lb_run_remove_dead_instruction_pass(lbProcedure *p) { } } +gb_internal LLVMValueRef lb_run_instrumentation_pass_insert_call(lbProcedure *p, Entity *entity, LLVMBuilderRef dummy_builder) { + lbModule *m = p->module; + + lbValue cc = lb_find_procedure_value_from_entity(m, entity); + + LLVMValueRef args[2] = {}; + args[0] = p->value; + + LLVMValueRef returnaddress_args[1] = {}; + + returnaddress_args[0] = LLVMConstInt(LLVMInt32TypeInContext(m->ctx), 0, false); + + char const *instrinsic_name = "llvm.returnaddress"; + unsigned id = LLVMLookupIntrinsicID(instrinsic_name, gb_strlen(instrinsic_name)); + GB_ASSERT_MSG(id != 0, "Unable to find %s", instrinsic_name); + LLVMValueRef ip = LLVMGetIntrinsicDeclaration(m->mod, id, nullptr, 0); + LLVMTypeRef call_type = LLVMIntrinsicGetType(m->ctx, id, nullptr, 0); + args[1] = LLVMBuildCall2(dummy_builder, call_type, ip, returnaddress_args, gb_count_of(returnaddress_args), ""); + + LLVMTypeRef fnp = lb_type_internal_for_procedures_raw(p->module, entity->type); + return LLVMBuildCall2(dummy_builder, fnp, cc.value, args, 2, ""); +} + + +gb_internal void lb_run_instrumentation_pass(lbProcedure *p) { + lbModule *m = p->module; + Entity *enter = m->info->instrumentation_enter_entity; + Entity *exit = m->info->instrumentation_exit_entity; + if (enter == nullptr || exit == nullptr) { + return; + } + if (!(p->entity && + p->entity->kind == Entity_Procedure && + p->entity->Procedure.has_instrumentation)) { + return; + } + +#define LLVM_V_NAME(x) x, cast(unsigned)(gb_count_of(x)-1) + + LLVMBuilderRef dummy_builder = LLVMCreateBuilderInContext(m->ctx); + defer (LLVMDisposeBuilder(dummy_builder)); + + LLVMBasicBlockRef entry_bb = p->entry_block->block; + LLVMPositionBuilder(dummy_builder, entry_bb, LLVMGetFirstInstruction(entry_bb)); + lb_run_instrumentation_pass_insert_call(p, enter, dummy_builder); + LLVMRemoveStringAttributeAtIndex(p->value, LLVMAttributeIndex_FunctionIndex, LLVM_V_NAME("instrument-function-entry")); + + unsigned bb_count = LLVMCountBasicBlocks(p->value); + LLVMBasicBlockRef *bbs = gb_alloc_array(temporary_allocator(), LLVMBasicBlockRef, bb_count); + LLVMGetBasicBlocks(p->value, bbs); + for (unsigned i = 0; i < bb_count; i++) { + LLVMBasicBlockRef bb = bbs[i]; + LLVMValueRef terminator = LLVMGetBasicBlockTerminator(bb); + if (terminator == nullptr || + !LLVMIsAReturnInst(terminator)) { + continue; + } + + // TODO(bill): getTerminatingMustTailCall() + // If T is preceded by a musttail call, that's the real terminator. + // if (CallInst *CI = BB.getTerminatingMustTailCall()) + // T = CI; + + + LLVMPositionBuilderBefore(dummy_builder, terminator); + lb_run_instrumentation_pass_insert_call(p, exit, dummy_builder); + } + + LLVMRemoveStringAttributeAtIndex(p->value, LLVMAttributeIndex_FunctionIndex, LLVM_V_NAME("instrument-function-exit")); + +#undef LLVM_V_NAME +} + + gb_internal void lb_run_function_pass_manager(LLVMPassManagerRef fpm, lbProcedure *p, lbFunctionPassManagerKind pass_manager_kind) { if (p == nullptr) { @@ -401,6 +475,7 @@ gb_internal void lb_run_function_pass_manager(LLVMPassManagerRef fpm, lbProcedur } break; } + lb_run_instrumentation_pass(p); LLVMRunFunctionPassManager(fpm, p->value); } @@ -552,3 +627,5 @@ gb_internal void lb_run_remove_unused_globals_pass(lbModule *m) { } } } + + diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp index d4eae84bc..09bebd0cf 100644 --- a/src/llvm_backend_proc.cpp +++ b/src/llvm_backend_proc.cpp @@ -329,6 +329,18 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i } } + if (p->body && entity->Procedure.has_instrumentation) { + Entity *instrumentation_enter = m->info->instrumentation_enter_entity; + Entity *instrumentation_exit = m->info->instrumentation_exit_entity; + if (instrumentation_enter && instrumentation_exit) { + String enter = lb_get_entity_name(m, instrumentation_enter); + String exit = lb_get_entity_name(m, instrumentation_exit); + + lb_add_attribute_to_proc_with_string(m, p->value, make_string_c("instrument-function-entry"), enter); + lb_add_attribute_to_proc_with_string(m, p->value, make_string_c("instrument-function-exit"), exit); + } + } + lbValue proc_value = {p->value, p->type}; lb_add_entity(m, entity, proc_value); lb_add_member(m, p->name, proc_value); From 873b7f8588a4a9c50faa60ebbf98b9019042b17e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20H=C3=B6ltermann?= Date: Mon, 8 Jan 2024 17:11:06 +0100 Subject: [PATCH 10/57] Fixed type of temporary slice in sort_by_indices_overwrite --- core/slice/sort.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/slice/sort.odin b/core/slice/sort.odin index 515eddcc3..3b4119afa 100644 --- a/core/slice/sort.odin +++ b/core/slice/sort.odin @@ -62,7 +62,7 @@ _sort_by_indices :: proc(data, sorted: $T/[]$E, indices: []int) { sort_by_indices_overwrite :: proc(data: $T/[]$E, indices: []int) { assert(len(data) == len(indices)) - temp := make([]int, len(data), context.allocator) + temp := make([]E, len(data), context.allocator) defer delete(temp) for v, i in indices { temp[i] = data[v] From c6c710465a087473c5856f1f298ebea12d4d516a Mon Sep 17 00:00:00 2001 From: xb-bx Date: Mon, 8 Jan 2024 19:54:39 +0200 Subject: [PATCH 11/57] fix --- core/mem/virtual/virtual_darwin.odin | 2 +- core/mem/virtual/virtual_linux.odin | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mem/virtual/virtual_darwin.odin b/core/mem/virtual/virtual_darwin.odin index 5505149b0..bd1336cba 100644 --- a/core/mem/virtual/virtual_darwin.odin +++ b/core/mem/virtual/virtual_darwin.odin @@ -136,7 +136,7 @@ _protect :: proc "contextless" (data: rawptr, size: uint, flags: Protect_Flags) if .Write in flags { pflags |= PROT_WRITE } if .Execute in flags { pflags |= PROT_EXEC } err := _mprotect(data, size, pflags) - return err != 0 + return err == 0 } diff --git a/core/mem/virtual/virtual_linux.odin b/core/mem/virtual/virtual_linux.odin index 7ffc7643e..b927f2877 100644 --- a/core/mem/virtual/virtual_linux.odin +++ b/core/mem/virtual/virtual_linux.odin @@ -40,7 +40,7 @@ _protect :: proc "contextless" (data: rawptr, size: uint, flags: Protect_Flags) if .Write in flags { pflags |= {.WRITE} } if .Execute in flags { pflags |= {.EXEC} } errno := linux.mprotect(data, size, pflags) - return errno != .NONE + return errno == .NONE } _platform_memory_init :: proc() { From ce8801c37ff07ff628c6fc239da38d78e89a23bc Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Mon, 8 Jan 2024 19:11:49 +0100 Subject: [PATCH 12/57] c/libc: add `to_stream` proc Adds the `to_stream` procedure to `core:c/libc` to improve usability of the core collection when you have to use libc. --- core/c/libc/stdio.odin | 101 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/core/c/libc/stdio.odin b/core/c/libc/stdio.odin index 94007595c..39969e4a8 100644 --- a/core/c/libc/stdio.odin +++ b/core/c/libc/stdio.odin @@ -1,5 +1,7 @@ package libc +import "core:io" + when ODIN_OS == .Windows { foreign import libc { "system:libucrt.lib", @@ -218,3 +220,102 @@ foreign libc { ferror :: proc(stream: ^FILE) -> int --- perror :: proc(s: cstring) --- } + +to_stream :: proc(file: ^FILE) -> io.Stream { + stream_proc :: proc(stream_data: rawptr, mode: io.Stream_Mode, p: []byte, offset: i64, whence: io.Seek_From) -> (n: i64, err: io.Error) { + unknown_or_eof :: proc(f: ^FILE) -> io.Error { + switch { + case ferror(f) != 0: + return .Unknown + case feof(f) != 0: + return .EOF + case: + return nil + } + } + + file := (^FILE)(stream_data) + switch mode { + case .Close: + if fclose(file) != 0 { + return 0, unknown_or_eof(file) + } + + case .Flush: + if fflush(file) != 0 { + return 0, unknown_or_eof(file) + } + + case .Read: + n = i64(fread(raw_data(p), size_of(byte), len(p), file)) + if n == 0 { err = unknown_or_eof(file) } + + case .Read_At: + curr := ftell(file) + if curr == -1 { + return 0, unknown_or_eof(file) + } + + if fseek(file, long(offset), SEEK_SET) != 0 { + return 0, unknown_or_eof(file) + } + + defer fseek(file, long(curr), SEEK_SET) + + n = i64(fread(raw_data(p), size_of(byte), len(p), file)) + if n == 0 { err = unknown_or_eof(file) } + + case .Write: + n = i64(fwrite(raw_data(p), size_of(byte), len(p), file)) + if n == 0 { err = unknown_or_eof(file) } + + case .Write_At: + curr := ftell(file) + if curr == -1 { + return 0, unknown_or_eof(file) + } + + if fseek(file, long(offset), SEEK_SET) != 0 { + return 0, unknown_or_eof(file) + } + + defer fseek(file, long(curr), SEEK_SET) + + n = i64(fwrite(raw_data(p), size_of(byte), len(p), file)) + if n == 0 { err = unknown_or_eof(file) } + + case .Seek: + if fseek(file, long(offset), int(whence)) != 0 { + return 0, unknown_or_eof(file) + } + + case .Size: + curr := ftell(file) + if curr == -1 { + return 0, unknown_or_eof(file) + } + defer fseek(file, curr, SEEK_SET) + + if fseek(file, 0, SEEK_END) != 0 { + return 0, unknown_or_eof(file) + } + + n = i64(ftell(file)) + if n == -1 { + return 0, unknown_or_eof(file) + } + + case .Destroy: + return 0, .Empty + + case .Query: + return io.query_utility({ .Close, .Flush, .Read, .Read_At, .Write, .Write_At, .Seek, .Size }) + } + return + } + + return { + data = file, + procedure = stream_proc, + } +} From 656e62d7242f9b58d152afecacc10de66b700e7f Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Mon, 8 Jan 2024 19:33:30 +0100 Subject: [PATCH 13/57] Add `peek` to priority queue. --- core/container/priority_queue/priority_queue.odin | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/core/container/priority_queue/priority_queue.odin b/core/container/priority_queue/priority_queue.odin index 0c5c4931d..0c43816e1 100644 --- a/core/container/priority_queue/priority_queue.odin +++ b/core/container/priority_queue/priority_queue.odin @@ -140,3 +140,18 @@ remove :: proc(pq: ^$Q/Priority_Queue($T), i: int) -> (value: T, ok: bool) { return } +peek_safe :: proc(pq: $Q/Priority_Queue($T), loc := #caller_location) -> (res: T, ok: bool) { + if builtin.len(pq.queue) > 0 { + return pq.queue[0], true + } + return +} + +peek :: proc(pq: $Q/Priority_Queue($T), loc := #caller_location) -> (res: T) { + assert(condition=builtin.len(pq.queue)>0, loc=loc) + + if builtin.len(pq.queue) > 0 { + return pq.queue[0] + } + return +} \ No newline at end of file From 67d5b97ff962055a6caae6be7b04f3354980ecd0 Mon Sep 17 00:00:00 2001 From: Lucas Perlind Date: Tue, 9 Jan 2024 10:21:48 +1100 Subject: [PATCH 14/57] Fix linalg shadowing error --- core/math/linalg/general.odin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/math/linalg/general.odin b/core/math/linalg/general.odin index a61fe9189..60185d64d 100644 --- a/core/math/linalg/general.odin +++ b/core/math/linalg/general.odin @@ -217,7 +217,7 @@ quaternion64_mul_vector3 :: proc "contextless" (q: $Q/quaternion64, v: $V/[3]$F/ Raw_Quaternion :: struct {xyz: [3]f16, r: f16} q := transmute(Raw_Quaternion)q - v := transmute([3]f16)v + v := v t := cross(2*q.xyz, v) return V(v + q.r*t + cross(q.xyz, t)) @@ -227,7 +227,7 @@ quaternion128_mul_vector3 :: proc "contextless" (q: $Q/quaternion128, v: $V/[3]$ Raw_Quaternion :: struct {xyz: [3]f32, r: f32} q := transmute(Raw_Quaternion)q - v := transmute([3]f32)v + v := v t := cross(2*q.xyz, v) return V(v + q.r*t + cross(q.xyz, t)) @@ -237,7 +237,7 @@ quaternion256_mul_vector3 :: proc "contextless" (q: $Q/quaternion256, v: $V/[3]$ Raw_Quaternion :: struct {xyz: [3]f64, r: f64} q := transmute(Raw_Quaternion)q - v := transmute([3]f64)v + v := v t := cross(2*q.xyz, v) return V(v + q.r*t + cross(q.xyz, t)) From 7f6f97128492092b82af6298e1c3d863dea07518 Mon Sep 17 00:00:00 2001 From: Ed Yu Date: Mon, 8 Jan 2024 15:08:09 -0800 Subject: [PATCH 15/57] Fix math/fixed floor/ceil/round --- core/math/fixed/fixed.odin | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/math/fixed/fixed.odin b/core/math/fixed/fixed.odin index 5d63bf7be..d347e9c11 100644 --- a/core/math/fixed/fixed.odin +++ b/core/math/fixed/fixed.odin @@ -88,17 +88,19 @@ div_sat :: proc(x, y: $T/Fixed($Backing, $Fraction_Width)) -> (z: T) { @(require_results) floor :: proc(x: $T/Fixed($Backing, $Fraction_Width)) -> Backing { - return x.i >> Fraction_Width + if x.i >= 0 { + return x.i >> Fraction_Width + } else { + return (x.i - (1 << (Fraction_Width - 1)) + (1 << (Fraction_Width - 2))) >> Fraction_Width + } } @(require_results) ceil :: proc(x: $T/Fixed($Backing, $Fraction_Width)) -> Backing { - Integer :: 8*size_of(Backing) - Fraction_Width - return (x.i + (1 << Integer-1)) >> Fraction_Width + return (x.i + (1 << Fraction_Width - 1)) >> Fraction_Width } @(require_results) round :: proc(x: $T/Fixed($Backing, $Fraction_Width)) -> Backing { - Integer :: 8*size_of(Backing) - Fraction_Width - return (x.i + (1 << (Integer - 1))) >> Fraction_Width + return (x.i + (1 << (Fraction_Width - 1))) >> Fraction_Width } From 67dcd916e8f7b1badef5c6beee621557b069db3c Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 9 Jan 2024 11:01:18 +0000 Subject: [PATCH 16/57] Update instrumentation signature to support `runtime.Source_Code_Location` as last parameter. --- src/check_decl.cpp | 15 ++++++++++----- src/llvm_backend.hpp | 2 ++ src/llvm_backend_opt.cpp | 10 ++++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/check_decl.cpp b/src/check_decl.cpp index a530945f9..ed3a109c2 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -933,20 +933,23 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { if (type == nullptr || type->kind != Type_Proc) { return false; } - if (type->Proc.calling_convention != ProcCC_CDecl) { + if (type->Proc.calling_convention != ProcCC_Contextless) { return false; } if (type->Proc.result_count != 0) { return false; } - if (type->Proc.param_count != 2) { + if (type->Proc.param_count != 3) { return false; } Type *p0 = type->Proc.params->Tuple.variables[0]->type; Type *p1 = type->Proc.params->Tuple.variables[1]->type; - return is_type_rawptr(p0) && is_type_rawptr(p1); + Type *p3 = type->Proc.params->Tuple.variables[2]->type; + return is_type_rawptr(p0) && is_type_rawptr(p1) && are_types_identical(p3, t_source_code_location); }; + static char const *instrumentation_proc_type_str = "proc \"contextless\" (proc_address: rawptr, call_site_return_address: rawptr, loc: runtime.Source_Code_Location)"; + if (ac.instrumentation_enter && ac.instrumentation_exit) { error(e->token, "A procedure cannot be marked with both @(instrumentation_enter) and @(instrumentation_exit)"); @@ -954,8 +957,9 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { e->flags |= EntityFlag_Require; } else if (ac.instrumentation_enter) { if (!is_valid_instrumentation_call(e->type)) { + init_core_source_code_location(ctx->checker); gbString s = type_to_string(e->type); - error(e->token, "@(instrumentation_enter) procedures must have the type 'proc \"c\" (rawptr, rawptr)', got %s", s); + error(e->token, "@(instrumentation_enter) procedures must have the type '%s', got %s", instrumentation_proc_type_str, s); gb_string_free(s); } MUTEX_GUARD(&ctx->info->instrumentation_mutex); @@ -968,9 +972,10 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { has_instrumentation = false; e->flags |= EntityFlag_Require; } else if (ac.instrumentation_exit) { + init_core_source_code_location(ctx->checker); if (!is_valid_instrumentation_call(e->type)) { gbString s = type_to_string(e->type); - error(e->token, "@(instrumentation_exit) procedures must have the type 'proc \"c\" (rawptr, rawptr)', got %s", s); + error(e->token, "@(instrumentation_exit) procedures must have the type '%s', got %s", instrumentation_proc_type_str, s); gb_string_free(s); } MUTEX_GUARD(&ctx->info->instrumentation_mutex); diff --git a/src/llvm_backend.hpp b/src/llvm_backend.hpp index b645d66d6..fe2c2deba 100644 --- a/src/llvm_backend.hpp +++ b/src/llvm_backend.hpp @@ -565,6 +565,8 @@ gb_internal String lb_filepath_ll_for_module(lbModule *m); gb_internal LLVMTypeRef lb_type_internal_for_procedures_raw(lbModule *m, Type *type); +gb_internal lbValue lb_emit_source_code_location_as_global_ptr(lbProcedure *p, String const &procedure, TokenPos const &pos); + gb_internal LLVMTypeRef llvm_array_type(LLVMTypeRef ElementType, uint64_t ElementCount) { #if LB_USE_NEW_PASS_SYSTEM return LLVMArrayType2(ElementType, ElementCount); diff --git a/src/llvm_backend_opt.cpp b/src/llvm_backend_opt.cpp index d5487d259..b57e74799 100644 --- a/src/llvm_backend_opt.cpp +++ b/src/llvm_backend_opt.cpp @@ -385,7 +385,7 @@ gb_internal LLVMValueRef lb_run_instrumentation_pass_insert_call(lbProcedure *p, lbValue cc = lb_find_procedure_value_from_entity(m, entity); - LLVMValueRef args[2] = {}; + LLVMValueRef args[3] = {}; args[0] = p->value; LLVMValueRef returnaddress_args[1] = {}; @@ -399,8 +399,14 @@ gb_internal LLVMValueRef lb_run_instrumentation_pass_insert_call(lbProcedure *p, LLVMTypeRef call_type = LLVMIntrinsicGetType(m->ctx, id, nullptr, 0); args[1] = LLVMBuildCall2(dummy_builder, call_type, ip, returnaddress_args, gb_count_of(returnaddress_args), ""); + Token name = {}; + if (p->entity) { + name = p->entity->token; + } + args[2] = lb_emit_source_code_location_as_global_ptr(p, name.string, name.pos).value; + LLVMTypeRef fnp = lb_type_internal_for_procedures_raw(p->module, entity->type); - return LLVMBuildCall2(dummy_builder, fnp, cc.value, args, 2, ""); + return LLVMBuildCall2(dummy_builder, fnp, cc.value, args, gb_count_of(args), ""); } From 120ef168bff75a2e4060823ae018ec8a186609f1 Mon Sep 17 00:00:00 2001 From: Platin21 Date: Wed, 10 Jan 2024 16:42:25 +0100 Subject: [PATCH 17/57] Added macOS versions for a lot of revisions --- core/sys/info/platform_darwin.odin | 50 ++++++++++++++++++++++++++++++ src/bug_report.cpp | 47 ++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/core/sys/info/platform_darwin.odin b/core/sys/info/platform_darwin.odin index 7a56f1e23..12ff7a485 100644 --- a/core/sys/info/platform_darwin.odin +++ b/core/sys/info/platform_darwin.odin @@ -455,6 +455,17 @@ macos_release_map: map[string]Darwin_To_Release = { "20G624" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 6}}}, "20G630" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 7}}}, "20G730" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 8}}}, + "20G817" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 0}}}, + "20G918" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 1}}}, + "20G1020" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 2}}}, + "20G1116" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 3}}}, + "20G1120" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 4}}}, + "20G1225" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 5}}}, + "20G1231" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 6}}}, + "20G1345" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 7}}}, + "20G1351" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 8}}}, + "20G1426" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 9}}}, + "20G1427" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 10}}}, // MacOS Monterey "21A344" = {{21, 0, 1}, "macOS", {"Monterey", {12, 0, 0}}}, @@ -470,6 +481,45 @@ macos_release_map: map[string]Darwin_To_Release = { "21G72" = {{21, 6, 0}, "macOS", {"Monterey", {12, 5, 0}}}, "21G83" = {{21, 6, 0}, "macOS", {"Monterey", {12, 5, 1}}}, "21G115" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 0}}}, + "21G217" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 1}}}, + "21G320" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 2}}}, + "21G419" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 3}}}, + "21G526" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 4}}}, + "21G531" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 5}}}, + "21G646" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 6}}}, + "21G651" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 7}}}, + "21G725" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 8}}}, + "21G726" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 9}}}, + "21G816" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 0}}}, + "21G920" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 1}}}, + "21G1974" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 2}}}, + + // MacOS Ventura + "22A380" = {{13, 0, 0}, "macOS", {"Ventura", {22, 1, 0}}}, + "22A400" = {{13, 0, 1}, "macOS", {"Ventura", {22, 1, 0}}}, + "22C65" = {{13, 1, 0}, "macOS", {"Ventura", {22, 2, 0}}}, + "22D49" = {{13, 2, 0}, "macOS", {"Ventura", {22, 3, 0}}}, + "22D68" = {{13, 2, 1}, "macOS", {"Ventura", {22, 3, 0}}}, + "22E252" = {{13, 3, 0}, "macOS", {"Ventura", {22, 4, 0}}}, + "22E261" = {{13, 3, 1}, "macOS", {"Ventura", {22, 4, 0}}}, + "22F66" = {{13, 4, 0}, "macOS", {"Ventura", {22, 5, 0}}}, + "22F82" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + "22E772610a" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + "22F770820d" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + "22G74" = {{13, 5, 0}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G90" = {{13, 5, 1}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G91" = {{13, 5, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G120" = {{13, 6, 0}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G313" = {{13, 6, 1}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G320" = {{13, 6, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + + // MacOS Sonoma + "23A344" = {{23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}}, + "23B74" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 0}}}, + "23B81" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 1}}}, + "23B92" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 2}}}, + "23C64" = {{23, 2, 0}, "macOS", {"Sonoma", {14, 2, 0}}}, + "23C71" = {{23, 2, 0}, "macOS", {"Sonoma", {14, 2, 1}}}, } @(private) diff --git a/src/bug_report.cpp b/src/bug_report.cpp index fbf616efb..8e190b7d0 100644 --- a/src/bug_report.cpp +++ b/src/bug_report.cpp @@ -824,6 +824,17 @@ gb_internal void report_os_info() { {"20G624", {20, 6, 0}, "macOS", {"Big Sur", {11, 6, 6}}}, {"20G630", {20, 6, 0}, "macOS", {"Big Sur", {11, 6, 7}}}, {"20G730", {20, 6, 0}, "macOS", {"Big Sur", {11, 6, 8}}}, + {"20G817", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 0}}}, + {"20G918", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 1}}}, + {"20G1020", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 2}}}, + {"20G1116", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 3}}}, + {"20G1120", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 4}}}, + {"20G1225", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 5}}}, + {"20G1231", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 6}}}, + {"20G1345", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 7}}}, + {"20G1351", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 8}}}, + {"20G1426", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 9}}}, + {"20G1427", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 10}}}, {"21A344", {21, 0, 1}, "macOS", {"Monterey", {12, 0, 0}}}, {"21A559", {21, 1, 0}, "macOS", {"Monterey", {12, 0, 1}}}, {"21C52", {21, 2, 0}, "macOS", {"Monterey", {12, 1, 0}}}, @@ -836,6 +847,42 @@ gb_internal void report_os_info() { {"21F2092", {21, 5, 0}, "macOS", {"Monterey", {12, 4, 0}}}, {"21G72", {21, 6, 0}, "macOS", {"Monterey", {12, 5, 0}}}, {"21G83", {21, 6, 0}, "macOS", {"Monterey", {12, 5, 1}}}, + {"21G115", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 0}}}, + {"21G217", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 1}}}, + {"21G320", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 2}}}, + {"21G419", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 3}}}, + {"21G526", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 4}}}, + {"21G531", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 5}}}, + {"21G646", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 6}}}, + {"21G651", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 7}}}, + {"21G725", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 8}}}, + {"21G726", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 9}}}, + {"21G816", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 0}}}, + {"21G920", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 1}}}, + {"21G1974", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 2}}}, + {"22A380", {13, 0, 0}, "macOS", {"Ventura", {22, 1, 0}}}, + {"22A400", {13, 0, 1}, "macOS", {"Ventura", {22, 1, 0}}}, + {"22C65", {13, 1, 0}, "macOS", {"Ventura", {22, 2, 0}}}, + {"22D49", {13, 2, 0}, "macOS", {"Ventura", {22, 3, 0}}}, + {"22D68", {13, 2, 1}, "macOS", {"Ventura", {22, 3, 0}}}, + {"22E252", {13, 3, 0}, "macOS", {"Ventura", {22, 4, 0}}}, + {"22E261", {13, 3, 1}, "macOS", {"Ventura", {22, 4, 0}}}, + {"22F66", {13, 4, 0}, "macOS", {"Ventura", {22, 5, 0}}}, + {"22F82", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + {"22E772610a", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + {"22F770820d", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + {"22G74", {13, 5, 0}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G90", {13, 5, 1}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G91", {13, 5, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G120", {13, 6, 0}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G313", {13, 6, 1}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G320", {13, 6, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + {"23A344", {23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}}, + {"23B74", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 0}}}, + {"23B81", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 1}}}, + {"23B92", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 2}}}, + {"23C64", {23, 2, 0}, "macOS", {"Sonoma", {14, 2, 0}}}, + {"23C71", {23, 2, 0}, "macOS", {"Sonoma", {14, 2, 1}}}, }; From 7b53dbeb8afe110f90347c171cd28c317ac762d0 Mon Sep 17 00:00:00 2001 From: Stan Irvin-Wilmot Date: Wed, 10 Jan 2024 15:53:00 +0000 Subject: [PATCH 18/57] fix loop condition on compare_exhange_strong result in semaphore_wait - it was backwards so would loop on success and bail on fail --- src/threading.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/threading.cpp b/src/threading.cpp index 74aa3eb7e..c283da425 100644 --- a/src/threading.cpp +++ b/src/threading.cpp @@ -210,7 +210,7 @@ gb_internal void semaphore_wait(Semaphore *s) { original_count = s->count().load(std::memory_order_relaxed); } - if (!s->count().compare_exchange_strong(original_count, original_count-1, std::memory_order_acquire, std::memory_order_acquire)) { + if (s->count().compare_exchange_strong(original_count, original_count-1, std::memory_order_acquire, std::memory_order_acquire)) { return; } } From bb94f4d129905e1a32f198f0d1caea105dd7795e Mon Sep 17 00:00:00 2001 From: Platin21 Date: Wed, 10 Jan 2024 17:24:53 +0100 Subject: [PATCH 19/57] Fixed version matching --- src/bug_report.cpp | 125 ++++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 59 deletions(-) diff --git a/src/bug_report.cpp b/src/bug_report.cpp index 8e190b7d0..ac3805919 100644 --- a/src/bug_report.cpp +++ b/src/bug_report.cpp @@ -824,17 +824,17 @@ gb_internal void report_os_info() { {"20G624", {20, 6, 0}, "macOS", {"Big Sur", {11, 6, 6}}}, {"20G630", {20, 6, 0}, "macOS", {"Big Sur", {11, 6, 7}}}, {"20G730", {20, 6, 0}, "macOS", {"Big Sur", {11, 6, 8}}}, - {"20G817", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 0}}}, - {"20G918", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 1}}}, - {"20G1020", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 2}}}, - {"20G1116", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 3}}}, - {"20G1120", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 4}}}, - {"20G1225", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 5}}}, - {"20G1231", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 6}}}, - {"20G1345", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 7}}}, - {"20G1351", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 8}}}, - {"20G1426", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 9}}}, - {"20G1427", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 10}}}, + {"20G817", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 0}}}, + {"20G918", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 1}}}, + {"20G1020", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 2}}}, + {"20G1116", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 3}}}, + {"20G1120", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 4}}}, + {"20G1225", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 5}}}, + {"20G1231", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 6}}}, + {"20G1345", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 7}}}, + {"20G1351", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 8}}}, + {"20G1426", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 9}}}, + {"20G1427", {20, 6, 0}, "macOS", {"Big Sur", {11, 7, 10}}}, {"21A344", {21, 0, 1}, "macOS", {"Monterey", {12, 0, 0}}}, {"21A559", {21, 1, 0}, "macOS", {"Monterey", {12, 0, 1}}}, {"21C52", {21, 2, 0}, "macOS", {"Monterey", {12, 1, 0}}}, @@ -847,42 +847,42 @@ gb_internal void report_os_info() { {"21F2092", {21, 5, 0}, "macOS", {"Monterey", {12, 4, 0}}}, {"21G72", {21, 6, 0}, "macOS", {"Monterey", {12, 5, 0}}}, {"21G83", {21, 6, 0}, "macOS", {"Monterey", {12, 5, 1}}}, - {"21G115", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 0}}}, - {"21G217", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 1}}}, - {"21G320", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 2}}}, - {"21G419", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 3}}}, - {"21G526", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 4}}}, - {"21G531", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 5}}}, - {"21G646", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 6}}}, - {"21G651", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 7}}}, - {"21G725", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 8}}}, - {"21G726", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 9}}}, - {"21G816", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 0}}}, - {"21G920", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 1}}}, - {"21G1974", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 2}}}, - {"22A380", {13, 0, 0}, "macOS", {"Ventura", {22, 1, 0}}}, - {"22A400", {13, 0, 1}, "macOS", {"Ventura", {22, 1, 0}}}, - {"22C65", {13, 1, 0}, "macOS", {"Ventura", {22, 2, 0}}}, - {"22D49", {13, 2, 0}, "macOS", {"Ventura", {22, 3, 0}}}, - {"22D68", {13, 2, 1}, "macOS", {"Ventura", {22, 3, 0}}}, - {"22E252", {13, 3, 0}, "macOS", {"Ventura", {22, 4, 0}}}, - {"22E261", {13, 3, 1}, "macOS", {"Ventura", {22, 4, 0}}}, - {"22F66", {13, 4, 0}, "macOS", {"Ventura", {22, 5, 0}}}, - {"22F82", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - {"22E772610a", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - {"22F770820d", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - {"22G74", {13, 5, 0}, "macOS", {"Ventura", {22, 6, 0}}}, - {"22G90", {13, 5, 1}, "macOS", {"Ventura", {22, 6, 0}}}, - {"22G91", {13, 5, 2}, "macOS", {"Ventura", {22, 6, 0}}}, - {"22G120", {13, 6, 0}, "macOS", {"Ventura", {22, 6, 0}}}, - {"22G313", {13, 6, 1}, "macOS", {"Ventura", {22, 6, 0}}}, - {"22G320", {13, 6, 2}, "macOS", {"Ventura", {22, 6, 0}}}, - {"23A344", {23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}}, - {"23B74", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 0}}}, - {"23B81", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 1}}}, - {"23B92", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 2}}}, - {"23C64", {23, 2, 0}, "macOS", {"Sonoma", {14, 2, 0}}}, - {"23C71", {23, 2, 0}, "macOS", {"Sonoma", {14, 2, 1}}}, + {"21G115", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 0}}}, + {"21G217", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 1}}}, + {"21G320", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 2}}}, + {"21G419", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 3}}}, + {"21G526", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 4}}}, + {"21G531", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 5}}}, + {"21G646", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 6}}}, + {"21G651", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 7}}}, + {"21G725", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 8}}}, + {"21G726", {21, 6, 0}, "macOS", {"Monterey", {12, 6, 9}}}, + {"21G816", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 0}}}, + {"21G920", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 1}}}, + {"21G1974", {21, 6, 0}, "macOS", {"Monterey", {12, 7, 2}}}, + {"22A380", {13, 0, 0}, "macOS", {"Ventura", {22, 1, 0}}}, + {"22A400", {13, 0, 1}, "macOS", {"Ventura", {22, 1, 0}}}, + {"22C65", {13, 1, 0}, "macOS", {"Ventura", {22, 2, 0}}}, + {"22D49", {13, 2, 0}, "macOS", {"Ventura", {22, 3, 0}}}, + {"22D68", {13, 2, 1}, "macOS", {"Ventura", {22, 3, 0}}}, + {"22E252", {13, 3, 0}, "macOS", {"Ventura", {22, 4, 0}}}, + {"22E261", {13, 3, 1}, "macOS", {"Ventura", {22, 4, 0}}}, + {"22F66", {13, 4, 0}, "macOS", {"Ventura", {22, 5, 0}}}, + {"22F82", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + {"22E772610a", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + {"22F770820d", {13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + {"22G74", {13, 5, 0}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G90", {13, 5, 1}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G91", {13, 5, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G120", {13, 6, 0}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G313", {13, 6, 1}, "macOS", {"Ventura", {22, 6, 0}}}, + {"22G320", {13, 6, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + {"23A344", {23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}}, + {"23B74", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 0}}}, + {"23B81", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 1}}}, + {"23B92", {23, 1, 0}, "macOS", {"Sonoma", {14, 1, 2}}}, + {"23C64", {23, 2, 0}, "macOS", {"Sonoma", {14, 2, 0}}}, + {"23C71", {23, 2, 0}, "macOS", {"Sonoma", {14, 2, 1}}}, }; @@ -914,37 +914,44 @@ gb_internal void report_os_info() { // Scan table for match on BUILD int macos_release_count = sizeof(macos_release_map) / sizeof(macos_release_map[0]); - Darwin_To_Release match = {}; - + Darwin_To_Release build_match = {}; + Darwin_To_Release kernel_match = {}; + for (int build = 0; build < macos_release_count; build++) { Darwin_To_Release rel = macos_release_map[build]; - + // Do we have an exact match on the BUILD? if (gb_strcmp(rel.build, (const char *)build_buffer) == 0) { - match = rel; + build_match = rel; break; } - + // Do we have an exact Darwin match? if (rel.darwin[0] == major && rel.darwin[1] == minor && rel.darwin[2] == patch) { - match = rel; - break; + kernel_match = rel; } - + // Major kernel version needs to match exactly, if (rel.darwin[0] == major) { // No major version match yet. - if (!match.os_name) { - match = rel; + if (!kernel_match.os_name) { + kernel_match = rel; } if (minor >= rel.darwin[1]) { - match = rel; + kernel_match = rel; if (patch >= rel.darwin[2]) { - match = rel; + kernel_match = rel; } } } } + + Darwin_To_Release match = {}; + if(!build_match.build) { + match = kernel_match; + } else { + match = build_match; + } if (match.os_name) { gb_printf("%s %s %d", match.os_name, match.release.name, match.release.version[0]); From 62c30795e6e65633b42490a6f1510830126a0bc7 Mon Sep 17 00:00:00 2001 From: Platin21 Date: Wed, 10 Jan 2024 17:27:31 +0100 Subject: [PATCH 20/57] Fixed indentation --- core/sys/info/platform_darwin.odin | 54 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/core/sys/info/platform_darwin.odin b/core/sys/info/platform_darwin.odin index 12ff7a485..82271ff88 100644 --- a/core/sys/info/platform_darwin.odin +++ b/core/sys/info/platform_darwin.odin @@ -455,17 +455,17 @@ macos_release_map: map[string]Darwin_To_Release = { "20G624" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 6}}}, "20G630" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 7}}}, "20G730" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 8}}}, - "20G817" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 0}}}, - "20G918" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 1}}}, - "20G1020" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 2}}}, - "20G1116" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 3}}}, - "20G1120" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 4}}}, - "20G1225" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 5}}}, - "20G1231" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 6}}}, - "20G1345" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 7}}}, - "20G1351" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 8}}}, - "20G1426" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 9}}}, - "20G1427" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 10}}}, + "20G817" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 0}}}, + "20G918" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 1}}}, + "20G1020" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 2}}}, + "20G1116" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 3}}}, + "20G1120" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 4}}}, + "20G1225" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 5}}}, + "20G1231" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 6}}}, + "20G1345" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 7}}}, + "20G1351" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 8}}}, + "20G1426" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 9}}}, + "20G1427" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 10}}}, // MacOS Monterey "21A344" = {{21, 0, 1}, "macOS", {"Monterey", {12, 0, 0}}}, @@ -496,22 +496,22 @@ macos_release_map: map[string]Darwin_To_Release = { // MacOS Ventura "22A380" = {{13, 0, 0}, "macOS", {"Ventura", {22, 1, 0}}}, - "22A400" = {{13, 0, 1}, "macOS", {"Ventura", {22, 1, 0}}}, - "22C65" = {{13, 1, 0}, "macOS", {"Ventura", {22, 2, 0}}}, - "22D49" = {{13, 2, 0}, "macOS", {"Ventura", {22, 3, 0}}}, - "22D68" = {{13, 2, 1}, "macOS", {"Ventura", {22, 3, 0}}}, - "22E252" = {{13, 3, 0}, "macOS", {"Ventura", {22, 4, 0}}}, - "22E261" = {{13, 3, 1}, "macOS", {"Ventura", {22, 4, 0}}}, - "22F66" = {{13, 4, 0}, "macOS", {"Ventura", {22, 5, 0}}}, - "22F82" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - "22E772610a" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - "22F770820d" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - "22G74" = {{13, 5, 0}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G90" = {{13, 5, 1}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G91" = {{13, 5, 2}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G120" = {{13, 6, 0}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G313" = {{13, 6, 1}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G320" = {{13, 6, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + "22A400" = {{13, 0, 1}, "macOS", {"Ventura", {22, 1, 0}}}, + "22C65" = {{13, 1, 0}, "macOS", {"Ventura", {22, 2, 0}}}, + "22D49" = {{13, 2, 0}, "macOS", {"Ventura", {22, 3, 0}}}, + "22D68" = {{13, 2, 1}, "macOS", {"Ventura", {22, 3, 0}}}, + "22E252" = {{13, 3, 0}, "macOS", {"Ventura", {22, 4, 0}}}, + "22E261" = {{13, 3, 1}, "macOS", {"Ventura", {22, 4, 0}}}, + "22F66" = {{13, 4, 0}, "macOS", {"Ventura", {22, 5, 0}}}, + "22F82" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + "22E772610a" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + "22F770820d" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, + "22G74" = {{13, 5, 0}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G90" = {{13, 5, 1}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G91" = {{13, 5, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G120" = {{13, 6, 0}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G313" = {{13, 6, 1}, "macOS", {"Ventura", {22, 6, 0}}}, + "22G320" = {{13, 6, 2}, "macOS", {"Ventura", {22, 6, 0}}}, // MacOS Sonoma "23A344" = {{23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}}, From 2990747cf8416e1b9aa65e59dd3e76f13ee8612f Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Wed, 10 Jan 2024 18:26:14 +0100 Subject: [PATCH 21/57] Reindent and align and f ix Ventura kernel+version swap. --- core/sys/info/platform_darwin.odin | 704 ++++++++++++++--------------- 1 file changed, 352 insertions(+), 352 deletions(-) diff --git a/core/sys/info/platform_darwin.odin b/core/sys/info/platform_darwin.odin index 82271ff88..4ca542b7a 100644 --- a/core/sys/info/platform_darwin.odin +++ b/core/sys/info/platform_darwin.odin @@ -138,388 +138,388 @@ Darwin_To_Release :: struct { @(private) macos_release_map: map[string]Darwin_To_Release = { // MacOS Tiger - "8A428" = {{8, 0, 0}, "macOS", {"Tiger", {10, 4, 0}}}, - "8A432" = {{8, 0, 0}, "macOS", {"Tiger", {10, 4, 0}}}, - "8B15" = {{8, 1, 0}, "macOS", {"Tiger", {10, 4, 1}}}, - "8B17" = {{8, 1, 0}, "macOS", {"Tiger", {10, 4, 1}}}, - "8C46" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, - "8C47" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, - "8E102" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, - "8E45" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, - "8E90" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, - "8F46" = {{8, 3, 0}, "macOS", {"Tiger", {10, 4, 3}}}, - "8G32" = {{8, 4, 0}, "macOS", {"Tiger", {10, 4, 4}}}, - "8G1165" = {{8, 4, 0}, "macOS", {"Tiger", {10, 4, 4}}}, - "8H14" = {{8, 5, 0}, "macOS", {"Tiger", {10, 4, 5}}}, - "8G1454" = {{8, 5, 0}, "macOS", {"Tiger", {10, 4, 5}}}, - "8I127" = {{8, 6, 0}, "macOS", {"Tiger", {10, 4, 6}}}, - "8I1119" = {{8, 6, 0}, "macOS", {"Tiger", {10, 4, 6}}}, - "8J135" = {{8, 7, 0}, "macOS", {"Tiger", {10, 4, 7}}}, - "8J2135a" = {{8, 7, 0}, "macOS", {"Tiger", {10, 4, 7}}}, - "8K1079" = {{8, 7, 0}, "macOS", {"Tiger", {10, 4, 7}}}, - "8N5107" = {{8, 7, 0}, "macOS", {"Tiger", {10, 4, 7}}}, - "8L127" = {{8, 8, 0}, "macOS", {"Tiger", {10, 4, 8}}}, - "8L2127" = {{8, 8, 0}, "macOS", {"Tiger", {10, 4, 8}}}, - "8P135" = {{8, 9, 0}, "macOS", {"Tiger", {10, 4, 9}}}, - "8P2137" = {{8, 9, 0}, "macOS", {"Tiger", {10, 4, 9}}}, - "8R218" = {{8, 10, 0}, "macOS", {"Tiger", {10, 4, 10}}}, - "8R2218" = {{8, 10, 0}, "macOS", {"Tiger", {10, 4, 10}}}, - "8R2232" = {{8, 10, 0}, "macOS", {"Tiger", {10, 4, 10}}}, - "8S165" = {{8, 11, 0}, "macOS", {"Tiger", {10, 4, 11}}}, - "8S2167" = {{8, 11, 0}, "macOS", {"Tiger", {10, 4, 11}}}, + "8A428" = {{8, 0, 0}, "macOS", {"Tiger", {10, 4, 0}}}, + "8A432" = {{8, 0, 0}, "macOS", {"Tiger", {10, 4, 0}}}, + "8B15" = {{8, 1, 0}, "macOS", {"Tiger", {10, 4, 1}}}, + "8B17" = {{8, 1, 0}, "macOS", {"Tiger", {10, 4, 1}}}, + "8C46" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, + "8C47" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, + "8E102" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, + "8E45" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, + "8E90" = {{8, 2, 0}, "macOS", {"Tiger", {10, 4, 2}}}, + "8F46" = {{8, 3, 0}, "macOS", {"Tiger", {10, 4, 3}}}, + "8G32" = {{8, 4, 0}, "macOS", {"Tiger", {10, 4, 4}}}, + "8G1165" = {{8, 4, 0}, "macOS", {"Tiger", {10, 4, 4}}}, + "8H14" = {{8, 5, 0}, "macOS", {"Tiger", {10, 4, 5}}}, + "8G1454" = {{8, 5, 0}, "macOS", {"Tiger", {10, 4, 5}}}, + "8I127" = {{8, 6, 0}, "macOS", {"Tiger", {10, 4, 6}}}, + "8I1119" = {{8, 6, 0}, "macOS", {"Tiger", {10, 4, 6}}}, + "8J135" = {{8, 7, 0}, "macOS", {"Tiger", {10, 4, 7}}}, + "8J2135a" = {{8, 7, 0}, "macOS", {"Tiger", {10, 4, 7}}}, + "8K1079" = {{8, 7, 0}, "macOS", {"Tiger", {10, 4, 7}}}, + "8N5107" = {{8, 7, 0}, "macOS", {"Tiger", {10, 4, 7}}}, + "8L127" = {{8, 8, 0}, "macOS", {"Tiger", {10, 4, 8}}}, + "8L2127" = {{8, 8, 0}, "macOS", {"Tiger", {10, 4, 8}}}, + "8P135" = {{8, 9, 0}, "macOS", {"Tiger", {10, 4, 9}}}, + "8P2137" = {{8, 9, 0}, "macOS", {"Tiger", {10, 4, 9}}}, + "8R218" = {{8, 10, 0}, "macOS", {"Tiger", {10, 4, 10}}}, + "8R2218" = {{8, 10, 0}, "macOS", {"Tiger", {10, 4, 10}}}, + "8R2232" = {{8, 10, 0}, "macOS", {"Tiger", {10, 4, 10}}}, + "8S165" = {{8, 11, 0}, "macOS", {"Tiger", {10, 4, 11}}}, + "8S2167" = {{8, 11, 0}, "macOS", {"Tiger", {10, 4, 11}}}, // MacOS Leopard - "9A581" = {{9, 0, 0}, "macOS", {"Leopard", {10, 5, 0}}}, - "9B18" = {{9, 1, 0}, "macOS", {"Leopard", {10, 5, 1}}}, - "9B2117" = {{9, 1, 1}, "macOS", {"Leopard", {10, 5, 1}}}, - "9C31" = {{9, 2, 0}, "macOS", {"Leopard", {10, 5, 2}}}, - "9C7010" = {{9, 2, 0}, "macOS", {"Leopard", {10, 5, 2}}}, - "9D34" = {{9, 3, 0}, "macOS", {"Leopard", {10, 5, 3}}}, - "9E17" = {{9, 4, 0}, "macOS", {"Leopard", {10, 5, 4}}}, - "9F33" = {{9, 5, 0}, "macOS", {"Leopard", {10, 5, 5}}}, - "9G55" = {{9, 6, 0}, "macOS", {"Leopard", {10, 5, 6}}}, - "9G66" = {{9, 6, 0}, "macOS", {"Leopard", {10, 5, 6}}}, - "9G71" = {{9, 6, 0}, "macOS", {"Leopard", {10, 5, 6}}}, - "9J61" = {{9, 7, 0}, "macOS", {"Leopard", {10, 5, 7}}}, - "9L30" = {{9, 8, 0}, "macOS", {"Leopard", {10, 5, 8}}}, - "9L34" = {{9, 8, 0}, "macOS", {"Leopard", {10, 5, 8}}}, + "9A581" = {{9, 0, 0}, "macOS", {"Leopard", {10, 5, 0}}}, + "9B18" = {{9, 1, 0}, "macOS", {"Leopard", {10, 5, 1}}}, + "9B2117" = {{9, 1, 1}, "macOS", {"Leopard", {10, 5, 1}}}, + "9C31" = {{9, 2, 0}, "macOS", {"Leopard", {10, 5, 2}}}, + "9C7010" = {{9, 2, 0}, "macOS", {"Leopard", {10, 5, 2}}}, + "9D34" = {{9, 3, 0}, "macOS", {"Leopard", {10, 5, 3}}}, + "9E17" = {{9, 4, 0}, "macOS", {"Leopard", {10, 5, 4}}}, + "9F33" = {{9, 5, 0}, "macOS", {"Leopard", {10, 5, 5}}}, + "9G55" = {{9, 6, 0}, "macOS", {"Leopard", {10, 5, 6}}}, + "9G66" = {{9, 6, 0}, "macOS", {"Leopard", {10, 5, 6}}}, + "9G71" = {{9, 6, 0}, "macOS", {"Leopard", {10, 5, 6}}}, + "9J61" = {{9, 7, 0}, "macOS", {"Leopard", {10, 5, 7}}}, + "9L30" = {{9, 8, 0}, "macOS", {"Leopard", {10, 5, 8}}}, + "9L34" = {{9, 8, 0}, "macOS", {"Leopard", {10, 5, 8}}}, // MacOS Snow Leopard - "10A432" = {{10, 0, 0}, "macOS", {"Snow Leopard", {10, 6, 0}}}, - "10A433" = {{10, 0, 0}, "macOS", {"Snow Leopard", {10, 6, 0}}}, - "10B504" = {{10, 1, 0}, "macOS", {"Snow Leopard", {10, 6, 1}}}, - "10C540" = {{10, 2, 0}, "macOS", {"Snow Leopard", {10, 6, 2}}}, - "10D573" = {{10, 3, 0}, "macOS", {"Snow Leopard", {10, 6, 3}}}, - "10D575" = {{10, 3, 0}, "macOS", {"Snow Leopard", {10, 6, 3}}}, - "10D578" = {{10, 3, 0}, "macOS", {"Snow Leopard", {10, 6, 3}}}, - "10F569" = {{10, 4, 0}, "macOS", {"Snow Leopard", {10, 6, 4}}}, - "10H574" = {{10, 5, 0}, "macOS", {"Snow Leopard", {10, 6, 5}}}, - "10J567" = {{10, 6, 0}, "macOS", {"Snow Leopard", {10, 6, 6}}}, - "10J869" = {{10, 7, 0}, "macOS", {"Snow Leopard", {10, 6, 7}}}, - "10J3250" = {{10, 7, 0}, "macOS", {"Snow Leopard", {10, 6, 7}}}, - "10J4138" = {{10, 7, 0}, "macOS", {"Snow Leopard", {10, 6, 7}}}, - "10K540" = {{10, 8, 0}, "macOS", {"Snow Leopard", {10, 6, 8}}}, - "10K549" = {{10, 8, 0}, "macOS", {"Snow Leopard", {10, 6, 8}}}, + "10A432" = {{10, 0, 0}, "macOS", {"Snow Leopard", {10, 6, 0}}}, + "10A433" = {{10, 0, 0}, "macOS", {"Snow Leopard", {10, 6, 0}}}, + "10B504" = {{10, 1, 0}, "macOS", {"Snow Leopard", {10, 6, 1}}}, + "10C540" = {{10, 2, 0}, "macOS", {"Snow Leopard", {10, 6, 2}}}, + "10D573" = {{10, 3, 0}, "macOS", {"Snow Leopard", {10, 6, 3}}}, + "10D575" = {{10, 3, 0}, "macOS", {"Snow Leopard", {10, 6, 3}}}, + "10D578" = {{10, 3, 0}, "macOS", {"Snow Leopard", {10, 6, 3}}}, + "10F569" = {{10, 4, 0}, "macOS", {"Snow Leopard", {10, 6, 4}}}, + "10H574" = {{10, 5, 0}, "macOS", {"Snow Leopard", {10, 6, 5}}}, + "10J567" = {{10, 6, 0}, "macOS", {"Snow Leopard", {10, 6, 6}}}, + "10J869" = {{10, 7, 0}, "macOS", {"Snow Leopard", {10, 6, 7}}}, + "10J3250" = {{10, 7, 0}, "macOS", {"Snow Leopard", {10, 6, 7}}}, + "10J4138" = {{10, 7, 0}, "macOS", {"Snow Leopard", {10, 6, 7}}}, + "10K540" = {{10, 8, 0}, "macOS", {"Snow Leopard", {10, 6, 8}}}, + "10K549" = {{10, 8, 0}, "macOS", {"Snow Leopard", {10, 6, 8}}}, // MacOS Lion - "11A511" = {{11, 0, 0}, "macOS", {"Lion", {10, 7, 0}}}, - "11A511s" = {{11, 0, 0}, "macOS", {"Lion", {10, 7, 0}}}, - "11A2061" = {{11, 0, 2}, "macOS", {"Lion", {10, 7, 0}}}, - "11A2063" = {{11, 0, 2}, "macOS", {"Lion", {10, 7, 0}}}, - "11B26" = {{11, 1, 0}, "macOS", {"Lion", {10, 7, 1}}}, - "11B2118" = {{11, 1, 0}, "macOS", {"Lion", {10, 7, 1}}}, - "11C74" = {{11, 2, 0}, "macOS", {"Lion", {10, 7, 2}}}, - "11D50" = {{11, 3, 0}, "macOS", {"Lion", {10, 7, 3}}}, - "11E53" = {{11, 4, 0}, "macOS", {"Lion", {10, 7, 4}}}, - "11G56" = {{11, 4, 2}, "macOS", {"Lion", {10, 7, 5}}}, - "11G63" = {{11, 4, 2}, "macOS", {"Lion", {10, 7, 5}}}, + "11A511" = {{11, 0, 0}, "macOS", {"Lion", {10, 7, 0}}}, + "11A511s" = {{11, 0, 0}, "macOS", {"Lion", {10, 7, 0}}}, + "11A2061" = {{11, 0, 2}, "macOS", {"Lion", {10, 7, 0}}}, + "11A2063" = {{11, 0, 2}, "macOS", {"Lion", {10, 7, 0}}}, + "11B26" = {{11, 1, 0}, "macOS", {"Lion", {10, 7, 1}}}, + "11B2118" = {{11, 1, 0}, "macOS", {"Lion", {10, 7, 1}}}, + "11C74" = {{11, 2, 0}, "macOS", {"Lion", {10, 7, 2}}}, + "11D50" = {{11, 3, 0}, "macOS", {"Lion", {10, 7, 3}}}, + "11E53" = {{11, 4, 0}, "macOS", {"Lion", {10, 7, 4}}}, + "11G56" = {{11, 4, 2}, "macOS", {"Lion", {10, 7, 5}}}, + "11G63" = {{11, 4, 2}, "macOS", {"Lion", {10, 7, 5}}}, // MacOS Mountain Lion - "12A269" = {{12, 0, 0}, "macOS", {"Mountain Lion", {10, 8, 0}}}, - "12B19" = {{12, 1, 0}, "macOS", {"Mountain Lion", {10, 8, 1}}}, - "12C54" = {{12, 2, 0}, "macOS", {"Mountain Lion", {10, 8, 2}}}, - "12C60" = {{12, 2, 0}, "macOS", {"Mountain Lion", {10, 8, 2}}}, - "12C2034" = {{12, 2, 0}, "macOS", {"Mountain Lion", {10, 8, 2}}}, - "12C3104" = {{12, 2, 0}, "macOS", {"Mountain Lion", {10, 8, 2}}}, - "12D78" = {{12, 3, 0}, "macOS", {"Mountain Lion", {10, 8, 3}}}, - "12E55" = {{12, 4, 0}, "macOS", {"Mountain Lion", {10, 8, 4}}}, - "12E3067" = {{12, 4, 0}, "macOS", {"Mountain Lion", {10, 8, 4}}}, - "12E4022" = {{12, 4, 0}, "macOS", {"Mountain Lion", {10, 8, 4}}}, - "12F37" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, - "12F45" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, - "12F2501" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, - "12F2518" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, - "12F2542" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, - "12F2560" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, + "12A269" = {{12, 0, 0}, "macOS", {"Mountain Lion", {10, 8, 0}}}, + "12B19" = {{12, 1, 0}, "macOS", {"Mountain Lion", {10, 8, 1}}}, + "12C54" = {{12, 2, 0}, "macOS", {"Mountain Lion", {10, 8, 2}}}, + "12C60" = {{12, 2, 0}, "macOS", {"Mountain Lion", {10, 8, 2}}}, + "12C2034" = {{12, 2, 0}, "macOS", {"Mountain Lion", {10, 8, 2}}}, + "12C3104" = {{12, 2, 0}, "macOS", {"Mountain Lion", {10, 8, 2}}}, + "12D78" = {{12, 3, 0}, "macOS", {"Mountain Lion", {10, 8, 3}}}, + "12E55" = {{12, 4, 0}, "macOS", {"Mountain Lion", {10, 8, 4}}}, + "12E3067" = {{12, 4, 0}, "macOS", {"Mountain Lion", {10, 8, 4}}}, + "12E4022" = {{12, 4, 0}, "macOS", {"Mountain Lion", {10, 8, 4}}}, + "12F37" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, + "12F45" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, + "12F2501" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, + "12F2518" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, + "12F2542" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, + "12F2560" = {{12, 5, 0}, "macOS", {"Mountain Lion", {10, 8, 5}}}, // MacOS Mavericks - "13A603" = {{13, 0, 0}, "macOS", {"Mavericks", {10, 9, 0}}}, - "13B42" = {{13, 0, 0}, "macOS", {"Mavericks", {10, 9, 1}}}, - "13C64" = {{13, 1, 0}, "macOS", {"Mavericks", {10, 9, 2}}}, - "13C1021" = {{13, 1, 0}, "macOS", {"Mavericks", {10, 9, 2}}}, - "13D65" = {{13, 2, 0}, "macOS", {"Mavericks", {10, 9, 3}}}, - "13E28" = {{13, 3, 0}, "macOS", {"Mavericks", {10, 9, 4}}}, - "13F34" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1066" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1077" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1096" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1112" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1134" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1507" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1603" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1712" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1808" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, - "13F1911" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13A603" = {{13, 0, 0}, "macOS", {"Mavericks", {10, 9, 0}}}, + "13B42" = {{13, 0, 0}, "macOS", {"Mavericks", {10, 9, 1}}}, + "13C64" = {{13, 1, 0}, "macOS", {"Mavericks", {10, 9, 2}}}, + "13C1021" = {{13, 1, 0}, "macOS", {"Mavericks", {10, 9, 2}}}, + "13D65" = {{13, 2, 0}, "macOS", {"Mavericks", {10, 9, 3}}}, + "13E28" = {{13, 3, 0}, "macOS", {"Mavericks", {10, 9, 4}}}, + "13F34" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1066" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1077" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1096" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1112" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1134" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1507" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1603" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1712" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1808" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, + "13F1911" = {{13, 4, 0}, "macOS", {"Mavericks", {10, 9, 5}}}, // MacOS Yosemite - "14A389" = {{14, 0, 0}, "macOS", {"Yosemite", {10, 10, 0}}}, - "14B25" = {{14, 0, 0}, "macOS", {"Yosemite", {10, 10, 1}}}, - "14C109" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, - "14C1510" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, - "14C2043" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, - "14C1514" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, - "14C2513" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, - "14D131" = {{14, 3, 0}, "macOS", {"Yosemite", {10, 10, 3}}}, - "14D136" = {{14, 3, 0}, "macOS", {"Yosemite", {10, 10, 3}}}, - "14E46" = {{14, 4, 0}, "macOS", {"Yosemite", {10, 10, 4}}}, - "14F27" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F1021" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F1505" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F1509" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F1605" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F1713" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F1808" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F1909" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F1912" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F2009" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F2109" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F2315" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F2411" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, - "14F2511" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14A389" = {{14, 0, 0}, "macOS", {"Yosemite", {10, 10, 0}}}, + "14B25" = {{14, 0, 0}, "macOS", {"Yosemite", {10, 10, 1}}}, + "14C109" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, + "14C1510" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, + "14C2043" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, + "14C1514" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, + "14C2513" = {{14, 1, 0}, "macOS", {"Yosemite", {10, 10, 2}}}, + "14D131" = {{14, 3, 0}, "macOS", {"Yosemite", {10, 10, 3}}}, + "14D136" = {{14, 3, 0}, "macOS", {"Yosemite", {10, 10, 3}}}, + "14E46" = {{14, 4, 0}, "macOS", {"Yosemite", {10, 10, 4}}}, + "14F27" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F1021" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F1505" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F1509" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F1605" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F1713" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F1808" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F1909" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F1912" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F2009" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F2109" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F2315" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F2411" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, + "14F2511" = {{14, 5, 0}, "macOS", {"Yosemite", {10, 10, 5}}}, // MacOS El Capitan - "15A284" = {{15, 0, 0}, "macOS", {"El Capitan", {10, 11, 0}}}, - "15B42" = {{15, 0, 0}, "macOS", {"El Capitan", {10, 11, 1}}}, - "15C50" = {{15, 2, 0}, "macOS", {"El Capitan", {10, 11, 2}}}, - "15D21" = {{15, 3, 0}, "macOS", {"El Capitan", {10, 11, 3}}}, - "15E65" = {{15, 4, 0}, "macOS", {"El Capitan", {10, 11, 4}}}, - "15F34" = {{15, 5, 0}, "macOS", {"El Capitan", {10, 11, 5}}}, - "15G31" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G1004" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G1011" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G1108" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G1212" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G1217" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G1421" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G1510" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G1611" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G17023" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G18013" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G19009" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G20015" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G21013" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, - "15G22010" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15A284" = {{15, 0, 0}, "macOS", {"El Capitan", {10, 11, 0}}}, + "15B42" = {{15, 0, 0}, "macOS", {"El Capitan", {10, 11, 1}}}, + "15C50" = {{15, 2, 0}, "macOS", {"El Capitan", {10, 11, 2}}}, + "15D21" = {{15, 3, 0}, "macOS", {"El Capitan", {10, 11, 3}}}, + "15E65" = {{15, 4, 0}, "macOS", {"El Capitan", {10, 11, 4}}}, + "15F34" = {{15, 5, 0}, "macOS", {"El Capitan", {10, 11, 5}}}, + "15G31" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G1004" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G1011" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G1108" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G1212" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G1217" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G1421" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G1510" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G1611" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G17023" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G18013" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G19009" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G20015" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G21013" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, + "15G22010" = {{15, 6, 0}, "macOS", {"El Capitan", {10, 11, 6}}}, // MacOS Sierra - "16A323" = {{16, 0, 0}, "macOS", {"Sierra", {10, 12, 0}}}, - "16B2555" = {{16, 1, 0}, "macOS", {"Sierra", {10, 12, 1}}}, - "16B2657" = {{16, 1, 0}, "macOS", {"Sierra", {10, 12, 1}}}, - "16C67" = {{16, 3, 0}, "macOS", {"Sierra", {10, 12, 2}}}, - "16C68" = {{16, 3, 0}, "macOS", {"Sierra", {10, 12, 2}}}, - "16D32" = {{16, 4, 0}, "macOS", {"Sierra", {10, 12, 3}}}, - "16E195" = {{16, 5, 0}, "macOS", {"Sierra", {10, 12, 4}}}, - "16F73" = {{16, 6, 0}, "macOS", {"Sierra", {10, 12, 5}}}, - "16F2073" = {{16, 6, 0}, "macOS", {"Sierra", {10, 12, 5}}}, - "16G29" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1036" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1114" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1212" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1314" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1408" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1510" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1618" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1710" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1815" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1917" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G1918" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G2016" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G2127" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G2128" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, - "16G2136" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16A323" = {{16, 0, 0}, "macOS", {"Sierra", {10, 12, 0}}}, + "16B2555" = {{16, 1, 0}, "macOS", {"Sierra", {10, 12, 1}}}, + "16B2657" = {{16, 1, 0}, "macOS", {"Sierra", {10, 12, 1}}}, + "16C67" = {{16, 3, 0}, "macOS", {"Sierra", {10, 12, 2}}}, + "16C68" = {{16, 3, 0}, "macOS", {"Sierra", {10, 12, 2}}}, + "16D32" = {{16, 4, 0}, "macOS", {"Sierra", {10, 12, 3}}}, + "16E195" = {{16, 5, 0}, "macOS", {"Sierra", {10, 12, 4}}}, + "16F73" = {{16, 6, 0}, "macOS", {"Sierra", {10, 12, 5}}}, + "16F2073" = {{16, 6, 0}, "macOS", {"Sierra", {10, 12, 5}}}, + "16G29" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1036" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1114" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1212" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1314" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1408" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1510" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1618" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1710" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1815" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1917" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G1918" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G2016" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G2127" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G2128" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, + "16G2136" = {{16, 7, 0}, "macOS", {"Sierra", {10, 12, 6}}}, // MacOS High Sierra - "17A365" = {{17, 0, 0}, "macOS", {"High Sierra", {10, 13, 0}}}, - "17A405" = {{17, 0, 0}, "macOS", {"High Sierra", {10, 13, 0}}}, - "17B48" = {{17, 2, 0}, "macOS", {"High Sierra", {10, 13, 1}}}, - "17B1002" = {{17, 2, 0}, "macOS", {"High Sierra", {10, 13, 1}}}, - "17B1003" = {{17, 2, 0}, "macOS", {"High Sierra", {10, 13, 1}}}, - "17C88" = {{17, 3, 0}, "macOS", {"High Sierra", {10, 13, 2}}}, - "17C89" = {{17, 3, 0}, "macOS", {"High Sierra", {10, 13, 2}}}, - "17C205" = {{17, 3, 0}, "macOS", {"High Sierra", {10, 13, 2}}}, - "17C2205" = {{17, 3, 0}, "macOS", {"High Sierra", {10, 13, 2}}}, - "17D47" = {{17, 4, 0}, "macOS", {"High Sierra", {10, 13, 3}}}, - "17D2047" = {{17, 4, 0}, "macOS", {"High Sierra", {10, 13, 3}}}, - "17D102" = {{17, 4, 0}, "macOS", {"High Sierra", {10, 13, 3}}}, - "17D2102" = {{17, 4, 0}, "macOS", {"High Sierra", {10, 13, 3}}}, - "17E199" = {{17, 5, 0}, "macOS", {"High Sierra", {10, 13, 4}}}, - "17E202" = {{17, 5, 0}, "macOS", {"High Sierra", {10, 13, 4}}}, - "17F77" = {{17, 6, 0}, "macOS", {"High Sierra", {10, 13, 5}}}, - "17G65" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G2208" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G2307" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G3025" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G4015" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G5019" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G6029" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G6030" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G7024" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G8029" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G8030" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G8037" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G9016" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G10021" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G11023" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G12034" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G13033" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G13035" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G14019" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G14033" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, - "17G14042" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17A365" = {{17, 0, 0}, "macOS", {"High Sierra", {10, 13, 0}}}, + "17A405" = {{17, 0, 0}, "macOS", {"High Sierra", {10, 13, 0}}}, + "17B48" = {{17, 2, 0}, "macOS", {"High Sierra", {10, 13, 1}}}, + "17B1002" = {{17, 2, 0}, "macOS", {"High Sierra", {10, 13, 1}}}, + "17B1003" = {{17, 2, 0}, "macOS", {"High Sierra", {10, 13, 1}}}, + "17C88" = {{17, 3, 0}, "macOS", {"High Sierra", {10, 13, 2}}}, + "17C89" = {{17, 3, 0}, "macOS", {"High Sierra", {10, 13, 2}}}, + "17C205" = {{17, 3, 0}, "macOS", {"High Sierra", {10, 13, 2}}}, + "17C2205" = {{17, 3, 0}, "macOS", {"High Sierra", {10, 13, 2}}}, + "17D47" = {{17, 4, 0}, "macOS", {"High Sierra", {10, 13, 3}}}, + "17D2047" = {{17, 4, 0}, "macOS", {"High Sierra", {10, 13, 3}}}, + "17D102" = {{17, 4, 0}, "macOS", {"High Sierra", {10, 13, 3}}}, + "17D2102" = {{17, 4, 0}, "macOS", {"High Sierra", {10, 13, 3}}}, + "17E199" = {{17, 5, 0}, "macOS", {"High Sierra", {10, 13, 4}}}, + "17E202" = {{17, 5, 0}, "macOS", {"High Sierra", {10, 13, 4}}}, + "17F77" = {{17, 6, 0}, "macOS", {"High Sierra", {10, 13, 5}}}, + "17G65" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G2208" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G2307" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G3025" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G4015" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G5019" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G6029" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G6030" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G7024" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G8029" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G8030" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G8037" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G9016" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G10021" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G11023" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G12034" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G13033" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G13035" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G14019" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G14033" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, + "17G14042" = {{17, 7, 0}, "macOS", {"High Sierra", {10, 13, 6}}}, // MacOS Mojave - "18A391" = {{18, 0, 0}, "macOS", {"Mojave", {10, 14, 0}}}, - "18B75" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 1}}}, - "18B2107" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 1}}}, - "18B3094" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 1}}}, - "18C54" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 2}}}, - "18D42" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 3}}}, - "18D43" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 3}}}, - "18D109" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 3}}}, - "18E226" = {{18, 5, 0}, "macOS", {"Mojave", {10, 14, 4}}}, - "18E227" = {{18, 5, 0}, "macOS", {"Mojave", {10, 14, 4}}}, - "18F132" = {{18, 6, 0}, "macOS", {"Mojave", {10, 14, 5}}}, - "18G84" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G87" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G95" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G103" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G1012" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G2022" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G3020" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G4032" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G5033" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G6020" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G6032" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G6042" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G7016" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G8012" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G8022" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G9028" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G9216" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, - "18G9323" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18A391" = {{18, 0, 0}, "macOS", {"Mojave", {10, 14, 0}}}, + "18B75" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 1}}}, + "18B2107" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 1}}}, + "18B3094" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 1}}}, + "18C54" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 2}}}, + "18D42" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 3}}}, + "18D43" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 3}}}, + "18D109" = {{18, 2, 0}, "macOS", {"Mojave", {10, 14, 3}}}, + "18E226" = {{18, 5, 0}, "macOS", {"Mojave", {10, 14, 4}}}, + "18E227" = {{18, 5, 0}, "macOS", {"Mojave", {10, 14, 4}}}, + "18F132" = {{18, 6, 0}, "macOS", {"Mojave", {10, 14, 5}}}, + "18G84" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G87" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G95" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G103" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G1012" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G2022" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G3020" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G4032" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G5033" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G6020" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G6032" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G6042" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G7016" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G8012" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G8022" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G9028" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G9216" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, + "18G9323" = {{18, 7, 0}, "macOS", {"Mojave", {10, 14, 6}}}, // MacOS Catalina - "19A583" = {{19, 0, 0}, "macOS", {"Catalina", {10, 15, 0}}}, - "19A602" = {{19, 0, 0}, "macOS", {"Catalina", {10, 15, 0}}}, - "19A603" = {{19, 0, 0}, "macOS", {"Catalina", {10, 15, 0}}}, - "19B88" = {{19, 0, 0}, "macOS", {"Catalina", {10, 15, 1}}}, - "19C57" = {{19, 2, 0}, "macOS", {"Catalina", {10, 15, 2}}}, - "19C58" = {{19, 2, 0}, "macOS", {"Catalina", {10, 15, 2}}}, - "19D76" = {{19, 3, 0}, "macOS", {"Catalina", {10, 15, 3}}}, - "19E266" = {{19, 4, 0}, "macOS", {"Catalina", {10, 15, 4}}}, - "19E287" = {{19, 4, 0}, "macOS", {"Catalina", {10, 15, 4}}}, - "19F96" = {{19, 5, 0}, "macOS", {"Catalina", {10, 15, 5}}}, - "19F101" = {{19, 5, 0}, "macOS", {"Catalina", {10, 15, 5}}}, - "19G73" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 6}}}, - "19G2021" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 6}}}, - "19H2" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H4" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H15" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H114" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H512" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H524" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1030" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1217" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1323" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1417" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1419" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1519" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1615" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1713" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1715" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1824" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H1922" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, - "19H2026" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19A583" = {{19, 0, 0}, "macOS", {"Catalina", {10, 15, 0}}}, + "19A602" = {{19, 0, 0}, "macOS", {"Catalina", {10, 15, 0}}}, + "19A603" = {{19, 0, 0}, "macOS", {"Catalina", {10, 15, 0}}}, + "19B88" = {{19, 0, 0}, "macOS", {"Catalina", {10, 15, 1}}}, + "19C57" = {{19, 2, 0}, "macOS", {"Catalina", {10, 15, 2}}}, + "19C58" = {{19, 2, 0}, "macOS", {"Catalina", {10, 15, 2}}}, + "19D76" = {{19, 3, 0}, "macOS", {"Catalina", {10, 15, 3}}}, + "19E266" = {{19, 4, 0}, "macOS", {"Catalina", {10, 15, 4}}}, + "19E287" = {{19, 4, 0}, "macOS", {"Catalina", {10, 15, 4}}}, + "19F96" = {{19, 5, 0}, "macOS", {"Catalina", {10, 15, 5}}}, + "19F101" = {{19, 5, 0}, "macOS", {"Catalina", {10, 15, 5}}}, + "19G73" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 6}}}, + "19G2021" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 6}}}, + "19H2" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H4" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H15" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H114" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H512" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H524" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1030" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1217" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1323" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1417" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1419" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1519" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1615" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1713" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1715" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1824" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H1922" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, + "19H2026" = {{19, 6, 0}, "macOS", {"Catalina", {10, 15, 7}}}, // MacOS Big Sur - "20A2411" = {{20, 1, 0}, "macOS", {"Big Sur", {11, 0, 0}}}, - "20B29" = {{20, 1, 0}, "macOS", {"Big Sur", {11, 0, 1}}}, - "20B50" = {{20, 1, 0}, "macOS", {"Big Sur", {11, 0, 1}}}, - "20C69" = {{20, 2, 0}, "macOS", {"Big Sur", {11, 1, 0}}}, - "20D64" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 0}}}, - "20D74" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 1}}}, - "20D75" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 1}}}, - "20D80" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 2}}}, - "20D91" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 3}}}, - "20E232" = {{20, 4, 0}, "macOS", {"Big Sur", {11, 3, 0}}}, - "20E241" = {{20, 4, 0}, "macOS", {"Big Sur", {11, 3, 1}}}, - "20F71" = {{20, 5, 0}, "macOS", {"Big Sur", {11, 4, 0}}}, - "20G71" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 5, 0}}}, - "20G80" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 5, 1}}}, - "20G95" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 5, 2}}}, - "20G165" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 0}}}, - "20G224" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 1}}}, - "20G314" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 2}}}, - "20G415" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 3}}}, - "20G417" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 4}}}, - "20G527" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 5}}}, - "20G624" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 6}}}, - "20G630" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 7}}}, - "20G730" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 8}}}, - "20G817" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 0}}}, - "20G918" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 1}}}, - "20G1020" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 2}}}, - "20G1116" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 3}}}, - "20G1120" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 4}}}, - "20G1225" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 5}}}, - "20G1231" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 6}}}, - "20G1345" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 7}}}, - "20G1351" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 8}}}, - "20G1426" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 9}}}, - "20G1427" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 10}}}, + "20A2411" = {{20, 1, 0}, "macOS", {"Big Sur", {11, 0, 0}}}, + "20B29" = {{20, 1, 0}, "macOS", {"Big Sur", {11, 0, 1}}}, + "20B50" = {{20, 1, 0}, "macOS", {"Big Sur", {11, 0, 1}}}, + "20C69" = {{20, 2, 0}, "macOS", {"Big Sur", {11, 1, 0}}}, + "20D64" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 0}}}, + "20D74" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 1}}}, + "20D75" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 1}}}, + "20D80" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 2}}}, + "20D91" = {{20, 3, 0}, "macOS", {"Big Sur", {11, 2, 3}}}, + "20E232" = {{20, 4, 0}, "macOS", {"Big Sur", {11, 3, 0}}}, + "20E241" = {{20, 4, 0}, "macOS", {"Big Sur", {11, 3, 1}}}, + "20F71" = {{20, 5, 0}, "macOS", {"Big Sur", {11, 4, 0}}}, + "20G71" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 5, 0}}}, + "20G80" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 5, 1}}}, + "20G95" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 5, 2}}}, + "20G165" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 0}}}, + "20G224" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 1}}}, + "20G314" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 2}}}, + "20G415" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 3}}}, + "20G417" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 4}}}, + "20G527" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 5}}}, + "20G624" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 6}}}, + "20G630" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 7}}}, + "20G730" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 6, 8}}}, + "20G817" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 0}}}, + "20G918" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 1}}}, + "20G1020" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 2}}}, + "20G1116" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 3}}}, + "20G1120" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 4}}}, + "20G1225" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 5}}}, + "20G1231" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 6}}}, + "20G1345" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 7}}}, + "20G1351" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 8}}}, + "20G1426" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 9}}}, + "20G1427" = {{20, 6, 0}, "macOS", {"Big Sur", {11, 7, 10}}}, // MacOS Monterey - "21A344" = {{21, 0, 1}, "macOS", {"Monterey", {12, 0, 0}}}, - "21A559" = {{21, 1, 0}, "macOS", {"Monterey", {12, 0, 1}}}, - "21C52" = {{21, 2, 0}, "macOS", {"Monterey", {12, 1, 0}}}, - "21D49" = {{21, 3, 0}, "macOS", {"Monterey", {12, 2, 0}}}, - "21D62" = {{21, 3, 0}, "macOS", {"Monterey", {12, 2, 1}}}, - "21E230" = {{21, 4, 0}, "macOS", {"Monterey", {12, 3, 0}}}, - "21E258" = {{21, 4, 0}, "macOS", {"Monterey", {12, 3, 1}}}, - "21F79" = {{21, 5, 0}, "macOS", {"Monterey", {12, 4, 0}}}, - "21F2081" = {{21, 5, 0}, "macOS", {"Monterey", {12, 4, 0}}}, - "21F2092" = {{21, 5, 0}, "macOS", {"Monterey", {12, 4, 0}}}, - "21G72" = {{21, 6, 0}, "macOS", {"Monterey", {12, 5, 0}}}, - "21G83" = {{21, 6, 0}, "macOS", {"Monterey", {12, 5, 1}}}, - "21G115" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 0}}}, - "21G217" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 1}}}, - "21G320" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 2}}}, - "21G419" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 3}}}, - "21G526" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 4}}}, - "21G531" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 5}}}, - "21G646" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 6}}}, - "21G651" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 7}}}, - "21G725" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 8}}}, - "21G726" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 9}}}, - "21G816" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 0}}}, - "21G920" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 1}}}, - "21G1974" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 2}}}, + "21A344" = {{21, 0, 1}, "macOS", {"Monterey", {12, 0, 0}}}, + "21A559" = {{21, 1, 0}, "macOS", {"Monterey", {12, 0, 1}}}, + "21C52" = {{21, 2, 0}, "macOS", {"Monterey", {12, 1, 0}}}, + "21D49" = {{21, 3, 0}, "macOS", {"Monterey", {12, 2, 0}}}, + "21D62" = {{21, 3, 0}, "macOS", {"Monterey", {12, 2, 1}}}, + "21E230" = {{21, 4, 0}, "macOS", {"Monterey", {12, 3, 0}}}, + "21E258" = {{21, 4, 0}, "macOS", {"Monterey", {12, 3, 1}}}, + "21F79" = {{21, 5, 0}, "macOS", {"Monterey", {12, 4, 0}}}, + "21F2081" = {{21, 5, 0}, "macOS", {"Monterey", {12, 4, 0}}}, + "21F2092" = {{21, 5, 0}, "macOS", {"Monterey", {12, 4, 0}}}, + "21G72" = {{21, 6, 0}, "macOS", {"Monterey", {12, 5, 0}}}, + "21G83" = {{21, 6, 0}, "macOS", {"Monterey", {12, 5, 1}}}, + "21G115" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 0}}}, + "21G217" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 1}}}, + "21G320" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 2}}}, + "21G419" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 3}}}, + "21G526" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 4}}}, + "21G531" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 5}}}, + "21G646" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 6}}}, + "21G651" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 7}}}, + "21G725" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 8}}}, + "21G726" = {{21, 6, 0}, "macOS", {"Monterey", {12, 6, 9}}}, + "21G816" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 0}}}, + "21G920" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 1}}}, + "21G1974" = {{21, 6, 0}, "macOS", {"Monterey", {12, 7, 2}}}, // MacOS Ventura - "22A380" = {{13, 0, 0}, "macOS", {"Ventura", {22, 1, 0}}}, - "22A400" = {{13, 0, 1}, "macOS", {"Ventura", {22, 1, 0}}}, - "22C65" = {{13, 1, 0}, "macOS", {"Ventura", {22, 2, 0}}}, - "22D49" = {{13, 2, 0}, "macOS", {"Ventura", {22, 3, 0}}}, - "22D68" = {{13, 2, 1}, "macOS", {"Ventura", {22, 3, 0}}}, - "22E252" = {{13, 3, 0}, "macOS", {"Ventura", {22, 4, 0}}}, - "22E261" = {{13, 3, 1}, "macOS", {"Ventura", {22, 4, 0}}}, - "22F66" = {{13, 4, 0}, "macOS", {"Ventura", {22, 5, 0}}}, - "22F82" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - "22E772610a" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - "22F770820d" = {{13, 4, 1}, "macOS", {"Ventura", {22, 5, 0}}}, - "22G74" = {{13, 5, 0}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G90" = {{13, 5, 1}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G91" = {{13, 5, 2}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G120" = {{13, 6, 0}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G313" = {{13, 6, 1}, "macOS", {"Ventura", {22, 6, 0}}}, - "22G320" = {{13, 6, 2}, "macOS", {"Ventura", {22, 6, 0}}}, + "22A380" = {{22, 1, 0}, "macOS", {"Ventura", {13, 0, 0}}}, + "22A400" = {{22, 1, 0}, "macOS", {"Ventura", {13, 0, 1}}}, + "22C65" = {{22, 2, 0}, "macOS", {"Ventura", {13, 1, 0}}}, + "22D49" = {{22, 3, 0}, "macOS", {"Ventura", {13, 2, 0}}}, + "22D68" = {{22, 3, 0}, "macOS", {"Ventura", {13, 2, 1}}}, + "22E252" = {{22, 4, 0}, "macOS", {"Ventura", {13, 3, 0}}}, + "22E261" = {{22, 4, 0}, "macOS", {"Ventura", {13, 3, 1}}}, + "22F66" = {{22, 5, 0}, "macOS", {"Ventura", {13, 4, 0}}}, + "22F82" = {{22, 5, 0}, "macOS", {"Ventura", {13, 4, 1}}}, + "22E772610a" = {{22, 5, 0}, "macOS", {"Ventura", {13, 4, 1}}}, + "22F770820d" = {{22, 5, 0}, "macOS", {"Ventura", {13, 4, 1}}}, + "22G74" = {{22, 6, 0}, "macOS", {"Ventura", {13, 5, 0}}}, + "22G90" = {{22, 6, 0}, "macOS", {"Ventura", {13, 5, 1}}}, + "22G91" = {{22, 6, 0}, "macOS", {"Ventura", {13, 5, 2}}}, + "22G120" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 0}}}, + "22G313" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 1}}}, + "22G320" = {{22, 6, 0}, "macOS", {"Ventura", {13, 6, 2}}}, // MacOS Sonoma - "23A344" = {{23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}}, - "23B74" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 0}}}, - "23B81" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 1}}}, - "23B92" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 2}}}, - "23C64" = {{23, 2, 0}, "macOS", {"Sonoma", {14, 2, 0}}}, - "23C71" = {{23, 2, 0}, "macOS", {"Sonoma", {14, 2, 1}}}, + "23A344" = {{23, 0, 0}, "macOS", {"Sonoma", {14, 0, 0}}}, + "23B74" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 0}}}, + "23B81" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 1}}}, + "23B92" = {{23, 1, 0}, "macOS", {"Sonoma", {14, 1, 2}}}, + "23C64" = {{23, 2, 0}, "macOS", {"Sonoma", {14, 2, 0}}}, + "23C71" = {{23, 2, 0}, "macOS", {"Sonoma", {14, 2, 1}}}, } @(private) From 46f46e645c4fe100ec3fcbdb64583d43bd0a45a0 Mon Sep 17 00:00:00 2001 From: Karl Zylinski Date: Thu, 11 Jan 2024 11:20:14 +0100 Subject: [PATCH 22/57] Added comment on SetConfigFlags in Raylib bindings that it must be called before window creation --- vendor/raylib/raylib.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin index 6d0ac4544..cf1ac217f 100644 --- a/vendor/raylib/raylib.odin +++ b/vendor/raylib/raylib.odin @@ -1085,7 +1085,7 @@ foreign lib { // Misc. functions TakeScreenshot :: proc(fileName: cstring) --- // Takes a screenshot of current screen (filename extension defines format) - SetConfigFlags :: proc(flags: ConfigFlags) --- // Setup init configuration flags (view FLAGS) + SetConfigFlags :: proc(flags: ConfigFlags) --- // Setup init configuration flags (view FLAGS). NOTE: This function is expected to be called before window creation OpenURL :: proc(url: cstring) --- // Open URL with default system browser (if available) // NOTE: Following functions implemented in module [utils] From 880a18f124e6047126bca378fa88f3858431eac9 Mon Sep 17 00:00:00 2001 From: Jon Lipstate Date: Fri, 12 Jan 2024 22:28:38 -0800 Subject: [PATCH 23/57] fix shift direction --- core/sys/info/cpu_intel.odin | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/sys/info/cpu_intel.odin b/core/sys/info/cpu_intel.odin index 5a11863d4..1344c3d2a 100644 --- a/core/sys/info/cpu_intel.odin +++ b/core/sys/info/cpu_intel.odin @@ -37,11 +37,11 @@ cpu_name: Maybe(string) @(init, private) init_cpu_features :: proc "c" () { - is_set :: #force_inline proc "c" (hwc: u32, value: u32) -> bool { - return hwc&(1 << value) != 0 + is_set :: #force_inline proc "c" (bit: u32, value: u32) -> bool { + return (value>>bit) & 0x1 != 0 } - try_set :: #force_inline proc "c" (set: ^CPU_Features, feature: CPU_Feature, hwc: u32, value: u32) { - if is_set(hwc, value) { + try_set :: #force_inline proc "c" (set: ^CPU_Features, feature: CPU_Feature, bit: u32, value: u32) { + if is_set(bit, value) { set^ += {feature} } } From 5e7b031a1dca19e6fff5dfb05347e6d0524277f4 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Sat, 13 Jan 2024 16:10:32 +0100 Subject: [PATCH 24/57] Add RAD Debugger file to .gitignore. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 91d8328da..83f64f145 100644 --- a/.gitignore +++ b/.gitignore @@ -314,3 +314,6 @@ shared/ examples/bug/ build.sh !core/debug/ + +# RAD debugger project file +*.raddbg \ No newline at end of file From 2411febf838bc24935a1fd5c99c84916e3c45805 Mon Sep 17 00:00:00 2001 From: avanspector Date: Sat, 13 Jan 2024 19:25:13 +0100 Subject: [PATCH 25/57] add shell environment for Nix --- default.nix | 27 --------------------------- shell.nix | 11 +++++++++++ 2 files changed, 11 insertions(+), 27 deletions(-) delete mode 100644 default.nix create mode 100644 shell.nix diff --git a/default.nix b/default.nix deleted file mode 100644 index 64d20f674..000000000 --- a/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs ? import { } }: -let - odin-unwrapped = pkgs.llvmPackages_11.stdenv.mkDerivation (rec { - name = "odin-unwrapped"; - src = ./.; - dontConfigure = true; - nativeBuildInputs = [ pkgs.git ]; - buildPhase = '' - make debug SHELL=${pkgs.llvmPackages_11.stdenv.shell} - ''; - installPhase = '' - mkdir -p $out/bin - cp odin $out/bin/odin - cp -r core $out/bin/core - ''; - }); - path = builtins.map (path: path + "/bin") (with pkgs.llvmPackages_11; [ - bintools - llvm - clang - lld - ]); -in -pkgs.writeScriptBin "odin" '' - #!${pkgs.llvmPackages_11.stdenv.shell} - PATH="${(builtins.concatStringsSep ":" path)}" exec ${odin-unwrapped}/bin/odin $@ -'' diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..21301b9d7 --- /dev/null +++ b/shell.nix @@ -0,0 +1,11 @@ +{ pkgs ? import {} }: +pkgs.mkShell { + name = "odin"; + nativeBuildInputs = with pkgs; [ + git + clang_17 + llvmPackages_17.llvm + llvmPackages_17.bintools + ]; + shellHook="CXX=clang++"; +} From 70c150fc83666281df372b83209c33863bde73e9 Mon Sep 17 00:00:00 2001 From: avanspector Date: Sat, 13 Jan 2024 19:27:42 +0100 Subject: [PATCH 26/57] Fix gcc build Although gcc is not officially supported, this little fix lets it to build Odin --- src/gb/gb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gb/gb.h b/src/gb/gb.h index 5dae7a5c4..93d250f21 100644 --- a/src/gb/gb.h +++ b/src/gb/gb.h @@ -448,7 +448,7 @@ typedef i32 b32; // NOTE(bill): Prefer this!!! #define gb_inline __forceinline #endif #else - #define gb_inline __attribute__ ((__always_inline__)) + #define gb_inline inline __attribute__ ((__always_inline__)) #endif #endif From 5896469f3b324a5a72fedde22baaeb13d1632bea Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Sat, 13 Jan 2024 21:14:02 +0100 Subject: [PATCH 27/57] vendor/miniaudio: fix import for macos Using `system:miniaudio` is suboptimal, we already provide the `Makefile` that builds the `lib/miniaudio.a` and this works on MacOS. This PR makes linking with that library the default. --- vendor/miniaudio/common.odin | 4 +--- vendor/miniaudio/data_conversion.odin | 4 +--- vendor/miniaudio/decoding.odin | 4 +--- vendor/miniaudio/device_io_procs.odin | 4 +--- vendor/miniaudio/effects.odin | 4 +--- vendor/miniaudio/encoding.odin | 4 +--- vendor/miniaudio/engine.odin | 4 +--- vendor/miniaudio/filtering.odin | 4 +--- vendor/miniaudio/generation.odin | 4 +--- vendor/miniaudio/job_queue.odin | 4 +--- vendor/miniaudio/logging.odin | 4 +--- vendor/miniaudio/node_graph.odin | 4 +--- vendor/miniaudio/resource_manager.odin | 4 +--- vendor/miniaudio/synchronization.odin | 4 +--- vendor/miniaudio/utilities.odin | 4 +--- vendor/miniaudio/vfs.odin | 4 +--- 16 files changed, 16 insertions(+), 48 deletions(-) diff --git a/vendor/miniaudio/common.odin b/vendor/miniaudio/common.odin index ee28e38cc..e77d265bd 100644 --- a/vendor/miniaudio/common.odin +++ b/vendor/miniaudio/common.odin @@ -10,10 +10,8 @@ when MINIAUDIO_SHARED { 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" + foreign import lib "lib/miniaudio.a" } handle :: distinct rawptr diff --git a/vendor/miniaudio/data_conversion.odin b/vendor/miniaudio/data_conversion.odin index ffcf2fcb3..d75872665 100644 --- a/vendor/miniaudio/data_conversion.odin +++ b/vendor/miniaudio/data_conversion.odin @@ -4,10 +4,8 @@ import "core:c" 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" + foreign import lib "lib/miniaudio.a" } /************************************************************************************************************************************************************ diff --git a/vendor/miniaudio/decoding.odin b/vendor/miniaudio/decoding.odin index 003f6f950..4433aa5a7 100644 --- a/vendor/miniaudio/decoding.odin +++ b/vendor/miniaudio/decoding.odin @@ -4,10 +4,8 @@ import "core:c" 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" + foreign import lib "lib/miniaudio.a" } /************************************************************************************************************************************************************ diff --git a/vendor/miniaudio/device_io_procs.odin b/vendor/miniaudio/device_io_procs.odin index de60645e4..7f39eb84f 100644 --- a/vendor/miniaudio/device_io_procs.odin +++ b/vendor/miniaudio/device_io_procs.odin @@ -2,10 +2,8 @@ package miniaudio 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" + foreign import lib "lib/miniaudio.a" } import "core:c" diff --git a/vendor/miniaudio/effects.odin b/vendor/miniaudio/effects.odin index e86d670d9..d1bf7e9e8 100644 --- a/vendor/miniaudio/effects.odin +++ b/vendor/miniaudio/effects.odin @@ -4,10 +4,8 @@ import c "core:c/libc" 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" + foreign import lib "lib/miniaudio.a" } /* diff --git a/vendor/miniaudio/encoding.odin b/vendor/miniaudio/encoding.odin index ee396466a..f2318457c 100644 --- a/vendor/miniaudio/encoding.odin +++ b/vendor/miniaudio/encoding.odin @@ -4,10 +4,8 @@ import "core:c" 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" + foreign import lib "lib/miniaudio.a" } /************************************************************************************************************************************************************ diff --git a/vendor/miniaudio/engine.odin b/vendor/miniaudio/engine.odin index 935d54744..0f4ba3353 100644 --- a/vendor/miniaudio/engine.odin +++ b/vendor/miniaudio/engine.odin @@ -4,10 +4,8 @@ import "core:c" 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" + foreign import lib "lib/miniaudio.a" } /************************************************************************************************************************************************************ diff --git a/vendor/miniaudio/filtering.odin b/vendor/miniaudio/filtering.odin index b8175c372..f3bde3371 100644 --- a/vendor/miniaudio/filtering.odin +++ b/vendor/miniaudio/filtering.odin @@ -4,10 +4,8 @@ import c "core:c/libc" 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" + foreign import lib "lib/miniaudio.a" } /************************************************************************************************************************************************************** diff --git a/vendor/miniaudio/generation.odin b/vendor/miniaudio/generation.odin index 305090c7d..f93d3afab 100644 --- a/vendor/miniaudio/generation.odin +++ b/vendor/miniaudio/generation.odin @@ -4,10 +4,8 @@ import "core:c" 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" + foreign import lib "lib/miniaudio.a" } waveform_type :: enum c.int { diff --git a/vendor/miniaudio/job_queue.odin b/vendor/miniaudio/job_queue.odin index 99899fdbd..1b9389af7 100644 --- a/vendor/miniaudio/job_queue.odin +++ b/vendor/miniaudio/job_queue.odin @@ -4,10 +4,8 @@ import c "core:c/libc" 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" + foreign import lib "lib/miniaudio.a" } /* diff --git a/vendor/miniaudio/logging.odin b/vendor/miniaudio/logging.odin index b03778079..6fb94f4b0 100644 --- a/vendor/miniaudio/logging.odin +++ b/vendor/miniaudio/logging.odin @@ -4,10 +4,8 @@ import c "core:c/libc" 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" + foreign import lib "lib/miniaudio.a" } MAX_LOG_CALLBACKS :: 4 diff --git a/vendor/miniaudio/node_graph.odin b/vendor/miniaudio/node_graph.odin index c0df39c0f..531a8e6d8 100644 --- a/vendor/miniaudio/node_graph.odin +++ b/vendor/miniaudio/node_graph.odin @@ -4,10 +4,8 @@ import "core:c" 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" + foreign import lib "lib/miniaudio.a" } /************************************************************************************************************************************************************ diff --git a/vendor/miniaudio/resource_manager.odin b/vendor/miniaudio/resource_manager.odin index e67d4a475..661ece468 100644 --- a/vendor/miniaudio/resource_manager.odin +++ b/vendor/miniaudio/resource_manager.odin @@ -4,10 +4,8 @@ import "core:c" 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" + foreign import lib "lib/miniaudio.a" } /************************************************************************************************************************************************************ diff --git a/vendor/miniaudio/synchronization.odin b/vendor/miniaudio/synchronization.odin index 2f0b41f5d..cd4b0a5f0 100644 --- a/vendor/miniaudio/synchronization.odin +++ b/vendor/miniaudio/synchronization.odin @@ -2,10 +2,8 @@ package miniaudio 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" + foreign import lib "lib/miniaudio.a" } @(default_calling_convention="c", link_prefix="ma_") diff --git a/vendor/miniaudio/utilities.odin b/vendor/miniaudio/utilities.odin index 708cc820e..f4db00380 100644 --- a/vendor/miniaudio/utilities.odin +++ b/vendor/miniaudio/utilities.odin @@ -4,10 +4,8 @@ import c "core:c/libc" 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" + foreign import lib "lib/miniaudio.a" } @(default_calling_convention="c", link_prefix="ma_") diff --git a/vendor/miniaudio/vfs.odin b/vendor/miniaudio/vfs.odin index 9731c713f..475d118fc 100644 --- a/vendor/miniaudio/vfs.odin +++ b/vendor/miniaudio/vfs.odin @@ -4,10 +4,8 @@ import "core:c" 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" + foreign import lib "lib/miniaudio.a" } /************************************************************************************************************************************************************ From 5032839abc172a7e5ac500f0f6b75afda296a3e5 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Sat, 13 Jan 2024 21:38:30 +0100 Subject: [PATCH 28/57] darwin: add library paths for default Homebrew and MacPorts locations --- src/linker.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/linker.cpp b/src/linker.cpp index 4ab4b2cd1..93869633e 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -484,6 +484,17 @@ gb_internal i32 linker_stage(LinkerData *gen) { defer (gb_string_free(platform_lib_str)); if (build_context.metrics.os == TargetOs_darwin) { platform_lib_str = gb_string_appendc(platform_lib_str, "-Wl,-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/usr/local/lib"); + + // Homebrew's default library path, checking if it exists to avoid linking warnings. + if (gb_file_exists("/opt/homebrew/lib")) { + platform_lib_str = gb_string_appendc(platform_lib_str, " -L/opt/homebrew/lib"); + } + + // MacPort's default library path, checking if it exists to avoid linking warnings. + if (gb_file_exists("/opt/local/lib")) { + platform_lib_str = gb_string_appendc(platform_lib_str, " -L/opt/local/lib"); + } + #if defined(GB_SYSTEM_OSX) if(!build_context.no_crt) { platform_lib_str = gb_string_appendc(platform_lib_str, " -lm "); From 3f6f00d8e5d41a91b5f50124c795680505b2d2b6 Mon Sep 17 00:00:00 2001 From: Kostas Tsiligkiris Date: Sun, 14 Jan 2024 13:22:18 +0200 Subject: [PATCH 29/57] [DOC] Fix documentation formatting in site The comments that were added automatically in odin site, contained tabs, so the first line of a two line comment was properly rendered in the site, but the second line of the comment (because it included tabs in the beginning of the line) was rendered as preformattted text. I think that the proposed changes will fix this problem in the documentation site. An example of the problematic rendering of documentation is https://pkg.odin-lang.org/core/compress/#COMPRESS_OUTPUT_ALLOCATE_MAX --- core/compress/common.odin | 74 +++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/core/compress/common.odin b/core/compress/common.odin index e1cfb4cb5..b343ce493 100644 --- a/core/compress/common.odin +++ b/core/compress/common.odin @@ -20,10 +20,9 @@ import "core:runtime" */ -/* - When a decompression routine doesn't stream its output, but writes to a buffer, - we pre-allocate an output buffer to speed up decompression. The default is 1 MiB. -*/ + +// When a decompression routine doesn't stream its output, but writes to a buffer, +// we pre-allocate an output buffer to speed up decompression. The default is 1 MiB. COMPRESS_OUTPUT_ALLOCATE_MIN :: int(#config(COMPRESS_OUTPUT_ALLOCATE_MIN, 1 << 20)) /* @@ -34,16 +33,14 @@ COMPRESS_OUTPUT_ALLOCATE_MIN :: int(#config(COMPRESS_OUTPUT_ALLOCATE_MIN, 1 << 2 */ when size_of(uintptr) == 8 { - /* - For 64-bit platforms, we set the default max buffer size to 4 GiB, - which is GZIP and PKZIP's max payload size. - */ + + // For 64-bit platforms, we set the default max buffer size to 4 GiB, + // which is GZIP and PKZIP's max payload size. COMPRESS_OUTPUT_ALLOCATE_MAX :: int(#config(COMPRESS_OUTPUT_ALLOCATE_MAX, 1 << 32)) } else { - /* - For 32-bit platforms, we set the default max buffer size to 512 MiB. - */ - COMPRESS_OUTPUT_ALLOCATE_MAX :: int(#config(COMPRESS_OUTPUT_ALLOCATE_MAX, 1 << 29)) + + // For 32-bit platforms, we set the default max buffer size to 512 MiB. + COMPRESS_OUTPUT_ALLOCATE_MAX :: int(#config(COMPRESS_OUTPUT_ALLOCATE_MAX, 1 << 29)) } @@ -69,9 +66,8 @@ General_Error :: enum { Incompatible_Options, Unimplemented, - /* - Memory errors - */ + // Memory errors + Allocation_Failed, Resize_Failed, } @@ -86,17 +82,16 @@ GZIP_Error :: enum { Payload_Length_Invalid, Payload_CRC_Invalid, - /* - GZIP's payload can be a maximum of max(u32le), or 4 GiB. - If you tell it you expect it to contain more, that's obviously an error. - */ - Payload_Size_Exceeds_Max_Payload, - /* - For buffered instead of streamed output, the payload size can't exceed - the max set by the `COMPRESS_OUTPUT_ALLOCATE_MAX` switch in compress/common.odin. + // GZIP's payload can be a maximum of max(u32le), or 4 GiB. + // If you tell it you expect it to contain more, that's obviously an error. + + Payload_Size_Exceeds_Max_Payload, + + // For buffered instead of streamed output, the payload size can't exceed + // the max set by the `COMPRESS_OUTPUT_ALLOCATE_MAX` switch in compress/common.odin. + // + // You can tweak this setting using `-define:COMPRESS_OUTPUT_ALLOCATE_MAX=size_in_bytes` - You can tweak this setting using `-define:COMPRESS_OUTPUT_ALLOCATE_MAX=size_in_bytes` - */ Output_Exceeds_COMPRESS_OUTPUT_ALLOCATE_MAX, } @@ -137,9 +132,8 @@ Context_Memory_Input :: struct #packed { code_buffer: u64, num_bits: u64, - /* - If we know the data size, we can optimize the reads and writes. - */ + // If we know the data size, we can optimize the reads and writes. + size_packed: i64, size_unpacked: i64, } @@ -159,18 +153,16 @@ Context_Stream_Input :: struct #packed { code_buffer: u64, num_bits: u64, - /* - If we know the data size, we can optimize the reads and writes. - */ + // If we know the data size, we can optimize the reads and writes. + size_packed: i64, size_unpacked: i64, - /* - Flags: - `input_fully_in_memory` - true = This tells us we read input from `input_data` exclusively. [] = EOF. - false = Try to refill `input_data` from the `input` stream. - */ + // Flags: + // `input_fully_in_memory` + // true = This tells us we read input from `input_data` exclusively. [] = EOF. + // false = Try to refill `input_data` from the `input` stream. + input_fully_in_memory: b8, padding: [1]u8, @@ -214,7 +206,7 @@ read_slice_from_memory :: #force_inline proc(z: ^Context_Memory_Input, size: int @(optimization_mode="speed") read_slice_from_stream :: #force_inline proc(z: ^Context_Stream_Input, size: int) -> (res: []u8, err: io.Error) { // TODO: REMOVE ALL USE OF context.temp_allocator here - // the is literally no need for it + // there is literally no need for it b := make([]u8, size, context.temp_allocator) _ = io.read(z.input, b[:]) or_return return b, nil @@ -248,10 +240,8 @@ read_u8_from_stream :: #force_inline proc(z: ^Context_Stream_Input) -> (res: u8, read_u8 :: proc{read_u8_from_memory, read_u8_from_stream} -/* - You would typically only use this at the end of Inflate, to drain bits from the code buffer - preferentially. -*/ +// You would typically only use this at the end of Inflate, to drain bits from the code buffer +// preferentially. @(optimization_mode="speed") read_u8_prefer_code_buffer_lsb :: #force_inline proc(z: ^$C) -> (res: u8, err: io.Error) { if z.num_bits >= 8 { From 76f52dd6c9d37683e8e1ef85755b77e7e9b71c7b Mon Sep 17 00:00:00 2001 From: codename-irvin Date: Mon, 15 Jan 2024 19:49:34 -0500 Subject: [PATCH 30/57] Add freestanding aarch64 target --- src/build_settings.cpp | 10 +++++++++- src/llvm_backend.cpp | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 9d909fcae..db09eabcf 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -582,7 +582,14 @@ gb_global TargetMetrics target_freestanding_amd64_sysv = { TargetABI_SysV, }; - +gb_global TargetMetrics target_freestanding_arm64_sysv = { + TargetOs_freestanding, + TargetArch_arm64, + 8, 8, 8, 16, + str_lit("aarch64-none-elf"), + str_lit("e-m:o-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"), + TargetABI_SysV, +}; struct NamedTargetMetrics { String name; @@ -617,6 +624,7 @@ gb_global NamedTargetMetrics named_targets[] = { { str_lit("wasi_wasm64p32"), &target_wasi_wasm64p32 }, { str_lit("freestanding_amd64_sysv"), &target_freestanding_amd64_sysv }, + { str_lit("freestanding_arm64_sysv"), &target_freestanding_arm64_sysv }, }; gb_global NamedTargetMetrics *selected_target_metrics; diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 0175d039e..003424e0a 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -2503,7 +2503,7 @@ gb_internal bool lb_generate_code(lbGenerator *gen) { LLVMCodeModel code_mode = LLVMCodeModelDefault; if (is_arch_wasm()) { code_mode = LLVMCodeModelJITDefault; - } else if (build_context.metrics.os == TargetOs_freestanding) { + } else if (is_arch_x86() && build_context.metrics.os == TargetOs_freestanding) { code_mode = LLVMCodeModelKernel; } From 0fcd2f1d88b1b9d21fbc77adb45833fcbdc0d3d4 Mon Sep 17 00:00:00 2001 From: codename-irvin Date: Tue, 16 Jan 2024 10:47:25 -0500 Subject: [PATCH 31/57] Use default calling convention for arm target for now - not 100% sure this is correct --- src/build_settings.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/build_settings.cpp b/src/build_settings.cpp index db09eabcf..1f57b5625 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -582,13 +582,12 @@ gb_global TargetMetrics target_freestanding_amd64_sysv = { TargetABI_SysV, }; -gb_global TargetMetrics target_freestanding_arm64_sysv = { +gb_global TargetMetrics target_freestanding_arm64 = { TargetOs_freestanding, TargetArch_arm64, 8, 8, 8, 16, str_lit("aarch64-none-elf"), str_lit("e-m:o-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"), - TargetABI_SysV, }; struct NamedTargetMetrics { @@ -624,7 +623,7 @@ gb_global NamedTargetMetrics named_targets[] = { { str_lit("wasi_wasm64p32"), &target_wasi_wasm64p32 }, { str_lit("freestanding_amd64_sysv"), &target_freestanding_amd64_sysv }, - { str_lit("freestanding_arm64_sysv"), &target_freestanding_arm64_sysv }, + { str_lit("freestanding_arm64"), &target_freestanding_arm64 }, }; gb_global NamedTargetMetrics *selected_target_metrics; From b25e85a8bb92aa5f639c393f27245d9bd10bc5d4 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Fri, 22 Dec 2023 20:08:41 +0100 Subject: [PATCH 32/57] check if string could be converted from float --- src/exact_value.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/exact_value.cpp b/src/exact_value.cpp index cd499272f..b744d2db0 100644 --- a/src/exact_value.cpp +++ b/src/exact_value.cpp @@ -174,7 +174,7 @@ gb_internal ExactValue exact_value_integer_from_string(String const &string) { -gb_internal f64 float_from_string(String const &string) { +gb_internal f64 float_from_string(String const &string, bool *success = nullptr) { if (string.len < 128) { char buf[128] = {}; isize n = 0; @@ -187,7 +187,13 @@ gb_internal f64 float_from_string(String const &string) { buf[n++] = cast(char)c; } buf[n] = 0; - return atof(buf); + + char *end_ptr; + f64 f = strtod(buf, &end_ptr); + if (success != nullptr) { + *success = *end_ptr == '\0'; + } + return f; } else { TEMPORARY_ALLOCATOR_GUARD(); char *buf = gb_alloc_array(temporary_allocator(), char, string.len+1); @@ -201,7 +207,13 @@ gb_internal f64 float_from_string(String const &string) { buf[n++] = cast(char)c; } buf[n] = 0; - return atof(buf); + + char *end_ptr; + f64 f = strtod(buf, &end_ptr); + if (success != nullptr) { + *success = *end_ptr == '\0'; + } + return f; } /* isize i = 0; @@ -313,7 +325,11 @@ gb_internal ExactValue exact_value_float_from_string(String string) { return exact_value_integer_from_string(string); } - f64 f = float_from_string(string); + bool success; + f64 f = float_from_string(string, &success); + if (!success) { + return {ExactValue_Invalid}; + } return exact_value_float(f); } From 5476d434410882383862d1d17a63d79502565bf4 Mon Sep 17 00:00:00 2001 From: Kostas Tsiligkiris Date: Wed, 17 Jan 2024 07:00:25 +0200 Subject: [PATCH 33/57] Move package xml before copyright Having the same copyright on all files made the documentation script to include it multiple times in the package information. --- core/encoding/xml/debug_print.odin | 6 ++++-- core/encoding/xml/helpers.odin | 6 ++++-- core/encoding/xml/tokenizer.odin | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/core/encoding/xml/debug_print.odin b/core/encoding/xml/debug_print.odin index b97617a8a..2607bec23 100644 --- a/core/encoding/xml/debug_print.odin +++ b/core/encoding/xml/debug_print.odin @@ -1,3 +1,5 @@ +package xml + /* An XML 1.0 / 1.1 parser @@ -9,7 +11,7 @@ List of contributors: Jeroen van Rijn: Initial implementation. */ -package xml + import "core:io" import "core:fmt" @@ -81,4 +83,4 @@ print_element :: proc(writer: io.Writer, doc: ^Document, element_id: Element_ID, } return written, .None -} \ No newline at end of file +} diff --git a/core/encoding/xml/helpers.odin b/core/encoding/xml/helpers.odin index e0b5ecc32..42a5258b3 100644 --- a/core/encoding/xml/helpers.odin +++ b/core/encoding/xml/helpers.odin @@ -1,3 +1,5 @@ +package xml + /* An XML 1.0 / 1.1 parser @@ -6,7 +8,7 @@ This file contains helper functions. */ -package xml + // Find parent's nth child with a given ident. find_child_by_ident :: proc(doc: ^Document, parent_id: Element_ID, ident: string, nth := 0) -> (res: Element_ID, found: bool) { @@ -47,4 +49,4 @@ find_attribute_val_by_key :: proc(doc: ^Document, parent_id: Element_ID, key: st if attr.key == key { return attr.val, true } } return "", false -} \ No newline at end of file +} diff --git a/core/encoding/xml/tokenizer.odin b/core/encoding/xml/tokenizer.odin index cd055475c..a223a75d6 100644 --- a/core/encoding/xml/tokenizer.odin +++ b/core/encoding/xml/tokenizer.odin @@ -1,3 +1,5 @@ +package xml + /* An XML 1.0 / 1.1 parser @@ -9,7 +11,7 @@ List of contributors: Jeroen van Rijn: Initial implementation. */ -package xml + import "core:fmt" import "core:unicode" @@ -433,4 +435,4 @@ scan :: proc(t: ^Tokenizer) -> Token { lit = string(t.src[offset : t.offset]) } return Token{kind, lit, pos} -} \ No newline at end of file +} From 02c2aff41b92fa8b8a19c0b6599f02549178ca1a Mon Sep 17 00:00:00 2001 From: Kostas Tsiligkiris Date: Wed, 17 Jan 2024 07:04:00 +0200 Subject: [PATCH 34/57] Fix formatting of package documentation string --- core/encoding/xml/xml_reader.odin | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/core/encoding/xml/xml_reader.odin b/core/encoding/xml/xml_reader.odin index f4f8a4b05..8538febb5 100644 --- a/core/encoding/xml/xml_reader.odin +++ b/core/encoding/xml/xml_reader.odin @@ -1,28 +1,28 @@ /* - An XML 1.0 / 1.1 parser + XML 1.0 / 1.1 parser - Copyright 2021-2022 Jeroen van Rijn . - Made available under Odin's BSD-3 license. + 2021-2022 Jeroen van Rijn . + available under Odin's BSD-3 license. - A from-scratch XML implementation, loosely modelled on the [spec](https://www.w3.org/TR/2006/REC-xml11-20060816). + from-scratch XML implementation, loosely modelled on the [spec](https://www.w3.org/TR/2006/REC-xml11-20060816). - Features: - - Supports enough of the XML 1.0/1.1 spec to handle the 99.9% of XML documents in common current usage. - - Simple to understand and use. Small. +Features: +- Supports enough of the XML 1.0/1.1 spec to handle the 99.9% of XML documents in common current usage. +- Simple to understand and use. Small. - Caveats: - - We do NOT support HTML in this package, as that may or may not be valid XML. - If it works, great. If it doesn't, that's not considered a bug. +Caveats: +- We do NOT support HTML in this package, as that may or may not be valid XML. + If it works, great. If it doesn't, that's not considered a bug. - - We do NOT support UTF-16. If you have a UTF-16 XML file, please convert it to UTF-8 first. Also, our condolences. - - <[!ELEMENT and <[!ATTLIST are not supported, and will be either ignored or return an error depending on the parser options. +- We do NOT support UTF-16. If you have a UTF-16 XML file, please convert it to UTF-8 first. Also, our condolences. +- <[!ELEMENT and <[!ATTLIST are not supported, and will be either ignored or return an error depending on the parser options. - MAYBE: - - XML writer? - - Serialize/deserialize Odin types? +MAYBE: +- XML writer? +- Serialize/deserialize Odin types? - List of contributors: - Jeroen van Rijn: Initial implementation. +List of contributors: +- Jeroen van Rijn: Initial implementation. */ package xml // An XML 1.0 / 1.1 parser @@ -700,4 +700,4 @@ new_element :: proc(doc: ^Document) -> (id: Element_ID) { cur := doc.element_count doc.element_count += 1 return cur -} \ No newline at end of file +} From 1d621295b12e5eccd56310cfb950eb445452cde8 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 12:26:44 +0000 Subject: [PATCH 35/57] Fix #1934 raylib IsGestureDetected --- vendor/raylib/raylib.odin | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin index cf1ac217f..1cca26cc3 100644 --- a/vendor/raylib/raylib.odin +++ b/vendor/raylib/raylib.odin @@ -1219,7 +1219,8 @@ foreign lib { //------------------------------------------------------------------------------------ SetGesturesEnabled :: proc(flags: Gestures) --- // Enable a set of gestures using flags - IsGestureDetected :: proc(gesture: Gesture) -> bool --- // Check if a gesture have been detected + // IsGestureDetected :: proc(gesture: Gesture) -> bool --- // Check if a gesture have been detected + GetGestureDetected :: proc() -> Gestures --- // Get latest detected gesture GetGestureHoldDuration :: proc() -> f32 --- // Get gesture hold time in milliseconds GetGestureDragVector :: proc() -> Vector2 --- // Get gesture drag vector @@ -1713,13 +1714,23 @@ foreign lib { // Workaround for broken IsMouseButtonUp in Raylib 5.0. when VERSION == "5.0" { - IsMouseButtonUp :: proc(button: MouseButton) -> bool { + IsMouseButtonUp :: proc "c" (button: MouseButton) -> bool { return !IsMouseButtonDown(button) } } else { #panic("Remove this this when block and everything inside it for Raylib > 5.0. It's just here to fix a bug in Raylib 5.0. See IsMouseButtonUp inside 'foreign lib {' block.") } +// Check if a gesture have been detected +IsGestureDetected :: proc "c" (gesture: Gesture) -> bool { + @(default_calling_convention="c") + foreign lib { + IsGestureDetected :: proc "c" (gesture: Gestures) -> bool --- + } + return IsGestureDetected({gesture}) +} + + // Text formatting with variables (sprintf style) TextFormat :: proc(text: cstring, args: ..any) -> cstring { @static buffers: [MAX_TEXTFORMAT_BUFFERS][MAX_TEXT_BUFFER_LENGTH]byte From 7954a7a6f3954e78be71fd183e00ffa408e27316 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 12:27:03 +0000 Subject: [PATCH 36/57] Add darwin libraries back to normal examples/all to fix documentation generation --- examples/all/all_vendor.odin | 15 ++++++++++++++- examples/all/all_vendor_darwin.odin | 9 --------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/examples/all/all_vendor.odin b/examples/all/all_vendor.odin index 372b2dfa8..dd989cc36 100644 --- a/examples/all/all_vendor.odin +++ b/examples/all/all_vendor.odin @@ -80,4 +80,17 @@ _ :: nvg _ :: nvg_gl _ :: fontstash -_ :: xlib \ No newline at end of file +_ :: xlib + + +// NOTE: needed for doc generator + +import NS "vendor:darwin/Foundation" +import MTL "vendor:darwin/Metal" +import MTK "vendor:darwin/MetalKit" +import CA "vendor:darwin/QuartzCore" + +_ :: NS +_ :: MTL +_ :: MTK +_ :: CA diff --git a/examples/all/all_vendor_darwin.odin b/examples/all/all_vendor_darwin.odin index 9aa41396c..3f3d4b8de 100644 --- a/examples/all/all_vendor_darwin.odin +++ b/examples/all/all_vendor_darwin.odin @@ -1,12 +1,3 @@ //+build darwin package all -import NS "vendor:darwin/Foundation" -import MTL "vendor:darwin/Metal" -import MTK "vendor:darwin/MetalKit" -import CA "vendor:darwin/QuartzCore" - -_ :: NS -_ :: MTL -_ :: MTK -_ :: CA From 05e27fa92d08e7cb2643c479db3717e722af01c7 Mon Sep 17 00:00:00 2001 From: FourteenBrush <74827262+FourteenBrush@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:37:06 +0100 Subject: [PATCH 37/57] Fix typo in bytes.scrub --- core/bytes/bytes.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/bytes/bytes.odin b/core/bytes/bytes.odin index d39f01b06..208949fd8 100644 --- a/core/bytes/bytes.odin +++ b/core/bytes/bytes.odin @@ -895,7 +895,7 @@ split_multi_iterator :: proc(s: ^[]byte, substrs: [][]byte, skip_empty := false) -// scrub scruvs invalid utf-8 characters and replaces them with the replacement string +// Scrubs invalid utf-8 characters and replaces them with the replacement string // Adjacent invalid bytes are only replaced once scrub :: proc(s: []byte, replacement: []byte, allocator := context.allocator) -> []byte { str := s From 6642aa94d5e3652806a8808d615a6e4ef5b20ebf Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 15:50:00 +0000 Subject: [PATCH 38/57] Change `examples/all` --- examples/all/all_vendor.odin | 35 ++++++++++++++++++++++++---- examples/all/all_vendor_cmark.odin | 5 ---- examples/all/all_vendor_darwin.odin | 3 --- examples/all/all_vendor_directx.odin | 10 -------- examples/all/all_vendor_stl.odin | 15 ------------ examples/all/all_vendor_zlib.odin | 5 ---- 6 files changed, 31 insertions(+), 42 deletions(-) delete mode 100644 examples/all/all_vendor_cmark.odin delete mode 100644 examples/all/all_vendor_darwin.odin delete mode 100644 examples/all/all_vendor_directx.odin delete mode 100644 examples/all/all_vendor_stl.odin delete mode 100644 examples/all/all_vendor_zlib.odin diff --git a/examples/all/all_vendor.odin b/examples/all/all_vendor.odin index dd989cc36..f3c90874c 100644 --- a/examples/all/all_vendor.odin +++ b/examples/all/all_vendor.odin @@ -85,12 +85,39 @@ _ :: xlib // NOTE: needed for doc generator -import NS "vendor:darwin/Foundation" -import MTL "vendor:darwin/Metal" -import MTK "vendor:darwin/MetalKit" -import CA "vendor:darwin/QuartzCore" +import NS "vendor:darwin/Foundation" +import MTL "vendor:darwin/Metal" +import MTK "vendor:darwin/MetalKit" +import CA "vendor:darwin/QuartzCore" _ :: NS _ :: MTL _ :: MTK _ :: CA + + +import D3D11 "vendor:directx/d3d11" +import D3D12 "vendor:directx/d3d12" +import DXGI "vendor:directx/dxgi" + +_ :: D3D11 +_ :: D3D12 +_ :: DXGI + + +import cm "vendor:commonmark" +_ :: cm + + +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/all/all_vendor_cmark.odin b/examples/all/all_vendor_cmark.odin deleted file mode 100644 index 5faf47efc..000000000 --- a/examples/all/all_vendor_cmark.odin +++ /dev/null @@ -1,5 +0,0 @@ -//+build windows, linux -package all - -import cm "vendor:commonmark" -_ :: cm diff --git a/examples/all/all_vendor_darwin.odin b/examples/all/all_vendor_darwin.odin deleted file mode 100644 index 3f3d4b8de..000000000 --- a/examples/all/all_vendor_darwin.odin +++ /dev/null @@ -1,3 +0,0 @@ -//+build darwin -package all - diff --git a/examples/all/all_vendor_directx.odin b/examples/all/all_vendor_directx.odin deleted file mode 100644 index 2f10d92f8..000000000 --- a/examples/all/all_vendor_directx.odin +++ /dev/null @@ -1,10 +0,0 @@ -//+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 deleted file mode 100644 index 9faf53c63..000000000 --- a/examples/all/all_vendor_stl.odin +++ /dev/null @@ -1,15 +0,0 @@ -//+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/all/all_vendor_zlib.odin b/examples/all/all_vendor_zlib.odin deleted file mode 100644 index 6004bed50..000000000 --- a/examples/all/all_vendor_zlib.odin +++ /dev/null @@ -1,5 +0,0 @@ -//+build windows, linux -package all - -import zlib "vendor:zlib" -_ :: zlib From 766485ccab757101325179eadae46e06ebcdfc85 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 15:51:29 +0000 Subject: [PATCH 39/57] Add README.md --- examples/all/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 examples/all/README.md diff --git a/examples/all/README.md b/examples/all/README.md new file mode 100644 index 000000000..72398540f --- /dev/null +++ b/examples/all/README.md @@ -0,0 +1,3 @@ +# `examples/all` for Documentation + +**NOTE:** This exists purely for the documentation generator located at \ No newline at end of file From 7b89174a267dd3590c8e2929e7ee8e8c182525e0 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 15:57:37 +0000 Subject: [PATCH 40/57] Remove `//+build windows` tag --- core/sys/windows/types.odin | 1 - 1 file changed, 1 deletion(-) diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin index 10b474866..f77b79cf9 100644 --- a/core/sys/windows/types.odin +++ b/core/sys/windows/types.odin @@ -1,4 +1,3 @@ -// +build windows package sys_windows import "core:c" From a2e729c30394684f96e1d22bf2a34bc337ebea5a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 16:06:59 +0000 Subject: [PATCH 41/57] Remove `//+build darwin` --- vendor/darwin/CoreVideo/CVDisplayLink.odin | 1 - vendor/darwin/Foundation/NSApplication.odin | 1 - vendor/darwin/Foundation/NSArray.odin | 1 - vendor/darwin/Foundation/NSAutoreleasePool.odin | 1 - vendor/darwin/Foundation/NSBlock.odin | 1 - vendor/darwin/Foundation/NSBundle.odin | 1 - vendor/darwin/Foundation/NSColor.odin | 1 - vendor/darwin/Foundation/NSData.odin | 1 - vendor/darwin/Foundation/NSDate.odin | 1 - vendor/darwin/Foundation/NSDictionary.odin | 1 - vendor/darwin/Foundation/NSEnumerator.odin | 1 - vendor/darwin/Foundation/NSError.odin | 1 - vendor/darwin/Foundation/NSEvent.odin | 1 - vendor/darwin/Foundation/NSLock.odin | 1 - vendor/darwin/Foundation/NSMenu.odin | 1 - vendor/darwin/Foundation/NSNotification.odin | 1 - vendor/darwin/Foundation/NSNumber.odin | 1 - vendor/darwin/Foundation/NSObject.odin | 1 - vendor/darwin/Foundation/NSOpenPanel.odin | 1 - vendor/darwin/Foundation/NSPanel.odin | 1 - vendor/darwin/Foundation/NSPasteboard.odin | 1 - vendor/darwin/Foundation/NSRange.odin | 1 - vendor/darwin/Foundation/NSSavePanel.odin | 1 - vendor/darwin/Foundation/NSScreen.odin | 1 - vendor/darwin/Foundation/NSSet.odin | 1 - vendor/darwin/Foundation/NSString.odin | 1 - vendor/darwin/Foundation/NSTypes.odin | 1 - vendor/darwin/Foundation/NSURL.odin | 1 - vendor/darwin/Foundation/NSUndoManager.odin | 1 - vendor/darwin/Foundation/NSUserActivity.odin | 1 - vendor/darwin/Foundation/NSUserDefaults.odin | 1 - vendor/darwin/Foundation/NSWindow.odin | 1 - vendor/darwin/Foundation/objc.odin | 1 - vendor/darwin/Metal/MetalClasses.odin | 1 - vendor/darwin/Metal/MetalEnums.odin | 1 - vendor/darwin/Metal/MetalErrors.odin | 1 - vendor/darwin/Metal/MetalProcedures.odin | 1 - vendor/darwin/Metal/MetalTypes.odin | 1 - vendor/darwin/MetalKit/MetalKit.odin | 1 - vendor/darwin/QuartzCore/QuartzCore.odin | 1 - 40 files changed, 40 deletions(-) diff --git a/vendor/darwin/CoreVideo/CVDisplayLink.odin b/vendor/darwin/CoreVideo/CVDisplayLink.odin index 980a44803..fae988e0a 100644 --- a/vendor/darwin/CoreVideo/CVDisplayLink.odin +++ b/vendor/darwin/CoreVideo/CVDisplayLink.odin @@ -1,4 +1,3 @@ -//+build darwin package CoreVideo DisplayLinkRef :: distinct rawptr diff --git a/vendor/darwin/Foundation/NSApplication.odin b/vendor/darwin/Foundation/NSApplication.odin index 7b89d84b0..3fa0d28b6 100644 --- a/vendor/darwin/Foundation/NSApplication.odin +++ b/vendor/darwin/Foundation/NSApplication.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation foreign import "system:Foundation.framework" diff --git a/vendor/darwin/Foundation/NSArray.odin b/vendor/darwin/Foundation/NSArray.odin index ac4aa6181..3e6520c0d 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 d3a6f490f..8eb3657b6 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/NSBlock.odin b/vendor/darwin/Foundation/NSBlock.odin index 29bd210de..ecb31bcfb 100644 --- a/vendor/darwin/Foundation/NSBlock.odin +++ b/vendor/darwin/Foundation/NSBlock.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation import "core:intrinsics" diff --git a/vendor/darwin/Foundation/NSBundle.odin b/vendor/darwin/Foundation/NSBundle.odin index 450a6d951..25fc8df32 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/NSColor.odin b/vendor/darwin/Foundation/NSColor.odin index 4c0325c1a..453b33144 100644 --- a/vendor/darwin/Foundation/NSColor.odin +++ b/vendor/darwin/Foundation/NSColor.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSColorSpace") diff --git a/vendor/darwin/Foundation/NSData.odin b/vendor/darwin/Foundation/NSData.odin index 069a59b64..04c1ce25d 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 e4564e06b..f8096c698 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 f84954656..8af58cf62 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 717e58e4c..555e58141 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 77b556e91..1657befe2 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/NSEvent.odin b/vendor/darwin/Foundation/NSEvent.odin index fa66c7fa6..b9f247230 100644 --- a/vendor/darwin/Foundation/NSEvent.odin +++ b/vendor/darwin/Foundation/NSEvent.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSEvent") diff --git a/vendor/darwin/Foundation/NSLock.odin b/vendor/darwin/Foundation/NSLock.odin index d9662968d..168380669 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/NSMenu.odin b/vendor/darwin/Foundation/NSMenu.odin index 5a4f7b1f5..6ed9b9918 100644 --- a/vendor/darwin/Foundation/NSMenu.odin +++ b/vendor/darwin/Foundation/NSMenu.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation import "core:builtin" diff --git a/vendor/darwin/Foundation/NSNotification.odin b/vendor/darwin/Foundation/NSNotification.odin index d319395a5..f766d0cab 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 a2d3c2d16..b3124885f 100644 --- a/vendor/darwin/Foundation/NSNumber.odin +++ b/vendor/darwin/Foundation/NSNumber.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation import "core:c" diff --git a/vendor/darwin/Foundation/NSObject.odin b/vendor/darwin/Foundation/NSObject.odin index 7c529aa09..fdcf05880 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/NSOpenPanel.odin b/vendor/darwin/Foundation/NSOpenPanel.odin index 6b5dc0b6b..ac5f9674e 100644 --- a/vendor/darwin/Foundation/NSOpenPanel.odin +++ b/vendor/darwin/Foundation/NSOpenPanel.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSOpenPanel") diff --git a/vendor/darwin/Foundation/NSPanel.odin b/vendor/darwin/Foundation/NSPanel.odin index b18ebc81e..4bdf08cdb 100644 --- a/vendor/darwin/Foundation/NSPanel.odin +++ b/vendor/darwin/Foundation/NSPanel.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation ModalResponse :: enum UInteger { diff --git a/vendor/darwin/Foundation/NSPasteboard.odin b/vendor/darwin/Foundation/NSPasteboard.odin index a1e23d977..74cf7d172 100644 --- a/vendor/darwin/Foundation/NSPasteboard.odin +++ b/vendor/darwin/Foundation/NSPasteboard.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSPasteboard") diff --git a/vendor/darwin/Foundation/NSRange.odin b/vendor/darwin/Foundation/NSRange.odin index b23b170ed..dcb100e91 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/NSSavePanel.odin b/vendor/darwin/Foundation/NSSavePanel.odin index b749cde53..8e4d7a07b 100644 --- a/vendor/darwin/Foundation/NSSavePanel.odin +++ b/vendor/darwin/Foundation/NSSavePanel.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSSavePanel") diff --git a/vendor/darwin/Foundation/NSScreen.odin b/vendor/darwin/Foundation/NSScreen.odin index 70270f680..a8fe44aa5 100644 --- a/vendor/darwin/Foundation/NSScreen.odin +++ b/vendor/darwin/Foundation/NSScreen.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSScreen") diff --git a/vendor/darwin/Foundation/NSSet.odin b/vendor/darwin/Foundation/NSSet.odin index 173c11f04..7fb8db6c2 100644 --- a/vendor/darwin/Foundation/NSSet.odin +++ b/vendor/darwin/Foundation/NSSet.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSSet") diff --git a/vendor/darwin/Foundation/NSString.odin b/vendor/darwin/Foundation/NSString.odin index ba8f57129..d3c6c454d 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 78c62e6c1..671832a2d 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 ab8454f56..9e9081219 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/NSUndoManager.odin b/vendor/darwin/Foundation/NSUndoManager.odin index 4a19ac254..16411dcb4 100644 --- a/vendor/darwin/Foundation/NSUndoManager.odin +++ b/vendor/darwin/Foundation/NSUndoManager.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSUndoManager") diff --git a/vendor/darwin/Foundation/NSUserActivity.odin b/vendor/darwin/Foundation/NSUserActivity.odin index 2540d0deb..3b2f956ee 100644 --- a/vendor/darwin/Foundation/NSUserActivity.odin +++ b/vendor/darwin/Foundation/NSUserActivity.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSUserActivity") diff --git a/vendor/darwin/Foundation/NSUserDefaults.odin b/vendor/darwin/Foundation/NSUserDefaults.odin index df7bb487a..a8a6d7545 100644 --- a/vendor/darwin/Foundation/NSUserDefaults.odin +++ b/vendor/darwin/Foundation/NSUserDefaults.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation @(objc_class="NSUserDefaults") diff --git a/vendor/darwin/Foundation/NSWindow.odin b/vendor/darwin/Foundation/NSWindow.odin index 48c972d8e..16dd5afc3 100644 --- a/vendor/darwin/Foundation/NSWindow.odin +++ b/vendor/darwin/Foundation/NSWindow.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation import "core:strings" diff --git a/vendor/darwin/Foundation/objc.odin b/vendor/darwin/Foundation/objc.odin index 3c25e6669..6469b1d1d 100644 --- a/vendor/darwin/Foundation/objc.odin +++ b/vendor/darwin/Foundation/objc.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_Foundation foreign import "system:Foundation.framework" diff --git a/vendor/darwin/Metal/MetalClasses.odin b/vendor/darwin/Metal/MetalClasses.odin index c79bba702..17f22e1d3 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" diff --git a/vendor/darwin/Metal/MetalEnums.odin b/vendor/darwin/Metal/MetalEnums.odin index c5c992006..ab4782da4 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" diff --git a/vendor/darwin/Metal/MetalErrors.odin b/vendor/darwin/Metal/MetalErrors.odin index dd6531a1c..8bc851e33 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 7d64e4028..dd90bd3e9 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 9d37a976e..b14fe2886 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/MetalKit/MetalKit.odin b/vendor/darwin/MetalKit/MetalKit.odin index 218986ddc..eb09410d1 100644 --- a/vendor/darwin/MetalKit/MetalKit.odin +++ b/vendor/darwin/MetalKit/MetalKit.odin @@ -1,4 +1,3 @@ -//+build darwin package objc_MetalKit import NS "vendor:darwin/Foundation" diff --git a/vendor/darwin/QuartzCore/QuartzCore.odin b/vendor/darwin/QuartzCore/QuartzCore.odin index 258395343..93998d95d 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" From 12e53f2336942278a689830e9bed1398f26cee0b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 16:26:18 +0000 Subject: [PATCH 42/57] Fix imports to be case sensitive correct --- core/sys/windows/ole32.odin | 1 - core/sys/windows/types.odin | 11 ++++++----- vendor/glfw/native_darwin.odin | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/sys/windows/ole32.odin b/core/sys/windows/ole32.odin index 4a4b470ea..ce13f2ddf 100644 --- a/core/sys/windows/ole32.odin +++ b/core/sys/windows/ole32.odin @@ -1,4 +1,3 @@ -// +build windows package sys_windows foreign import "system:Ole32.lib" diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin index f77b79cf9..ddb4de67a 100644 --- a/core/sys/windows/types.odin +++ b/core/sys/windows/types.odin @@ -6,9 +6,9 @@ c_char :: c.char c_uchar :: c.uchar c_int :: c.int c_uint :: c.uint -c_long :: c.long +c_long :: i32 c_longlong :: c.longlong -c_ulong :: c.ulong +c_ulong :: u32 c_ulonglong :: c.ulonglong c_short :: c.short c_ushort :: c.ushort @@ -2719,16 +2719,17 @@ SECURITY_MAX_SID_SIZE :: 68 // https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-sid SID :: struct #packed { - Revision: byte, - SubAuthorityCount: byte, + Revision: byte, + SubAuthorityCount: byte, IdentifierAuthority: SID_IDENTIFIER_AUTHORITY, - SubAuthority: [15]DWORD, // Array of DWORDs + SubAuthority: [15]DWORD, // Array of DWORDs } #assert(size_of(SID) == SECURITY_MAX_SID_SIZE) SID_IDENTIFIER_AUTHORITY :: struct #packed { Value: [6]u8, } +#assert(size_of(SID_IDENTIFIER_AUTHORITY) == 6) // For NetAPI32 // https://github.com/tpn/winsdk-10/blob/master/Include/10.0.14393.0/shared/lmerr.h diff --git a/vendor/glfw/native_darwin.odin b/vendor/glfw/native_darwin.odin index e1a23e97d..181a53e24 100644 --- a/vendor/glfw/native_darwin.odin +++ b/vendor/glfw/native_darwin.odin @@ -2,7 +2,7 @@ package glfw -import NS "vendor:darwin/foundation" +import NS "vendor:darwin/Foundation" when GLFW_SHARED { #panic("Dynamic linking for glfw is not supported for darwin yet") From d9fafa7000c5be9bb094438fdf4114c70ac2fc6b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 16:32:26 +0000 Subject: [PATCH 43/57] Have default `foreign import` system paths --- vendor/commonmark/cmark.odin | 2 ++ vendor/stb/image/stb_image.odin | 7 ++++--- vendor/stb/image/stb_image_resize.odin | 8 +++++--- vendor/stb/image/stb_image_write.odin | 7 ++++--- vendor/stb/rect_pack/stb_rect_pack.odin | 7 ++++--- vendor/stb/truetype/stb_truetype.odin | 7 ++++--- vendor/stb/vorbis/stb_vorbis.odin | 7 ++++--- 7 files changed, 27 insertions(+), 18 deletions(-) diff --git a/vendor/commonmark/cmark.odin b/vendor/commonmark/cmark.odin index d6801b53a..e1e983da8 100644 --- a/vendor/commonmark/cmark.odin +++ b/vendor/commonmark/cmark.odin @@ -25,6 +25,8 @@ when ODIN_OS == .Windows { foreign import lib "system:cmark" } else when ODIN_OS == .Darwin { foreign import lib "system:cmark" +} else { + foreign import lib "system:cmark" } Option :: enum c.int { diff --git a/vendor/stb/image/stb_image.odin b/vendor/stb/image/stb_image.odin index c1e31c7b2..c7caf801e 100644 --- a/vendor/stb/image/stb_image.odin +++ b/vendor/stb/image/stb_image.odin @@ -4,9 +4,10 @@ import c "core:c/libc" #assert(size_of(c.int) == size_of(b32)) -when ODIN_OS == .Windows { foreign import stbi "../lib/stb_image.lib" } -when ODIN_OS == .Linux { foreign import stbi "../lib/stb_image.a" } -when ODIN_OS == .Darwin { foreign import stbi "../lib/darwin/stb_image.a" } + when ODIN_OS == .Windows { foreign import stbi "../lib/stb_image.lib" } +else when ODIN_OS == .Linux { foreign import stbi "../lib/stb_image.a" } +else when ODIN_OS == .Darwin { foreign import stbi "../lib/darwin/stb_image.a" } +else { foreign import stbi "system:stb_image" } #assert(size_of(b32) == size_of(c.int)) diff --git a/vendor/stb/image/stb_image_resize.odin b/vendor/stb/image/stb_image_resize.odin index 509f79fb8..4c2a76a92 100644 --- a/vendor/stb/image/stb_image_resize.odin +++ b/vendor/stb/image/stb_image_resize.odin @@ -2,9 +2,11 @@ package stb_image import c "core:c/libc" -when ODIN_OS == .Windows { foreign import lib "../lib/stb_image_resize.lib" } -when ODIN_OS == .Linux { foreign import lib "../lib/stb_image_resize.a" } -when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_image_resize.a" } + when ODIN_OS == .Windows { foreign import lib "../lib/stb_image_resize.lib" } +else when ODIN_OS == .Linux { foreign import lib "../lib/stb_image_resize.a" } +else when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_image_resize.a" } +else { foreign import stbi "system:stb_image_resize" } + ////////////////////////////////////////////////////////////////////////////// // diff --git a/vendor/stb/image/stb_image_write.odin b/vendor/stb/image/stb_image_write.odin index f830050a8..dff820808 100644 --- a/vendor/stb/image/stb_image_write.odin +++ b/vendor/stb/image/stb_image_write.odin @@ -2,9 +2,10 @@ package stb_image import c "core:c/libc" -when ODIN_OS == .Windows { foreign import stbiw "../lib/stb_image_write.lib" } -when ODIN_OS == .Linux { foreign import stbiw "../lib/stb_image_write.a" } -when ODIN_OS == .Darwin { foreign import stbiw "../lib/darwin/stb_image_write.a" } + when ODIN_OS == .Windows { foreign import stbiw "../lib/stb_image_write.lib" } +else when ODIN_OS == .Linux { foreign import stbiw "../lib/stb_image_write.a" } +else when ODIN_OS == .Darwin { foreign import stbiw "../lib/darwin/stb_image_write.a" } +else { foreign import stbi "system:stb_image_write" } write_func :: proc "c" (ctx: rawptr, data: rawptr, size: c.int) diff --git a/vendor/stb/rect_pack/stb_rect_pack.odin b/vendor/stb/rect_pack/stb_rect_pack.odin index 8abb4710a..dd70e6d8f 100644 --- a/vendor/stb/rect_pack/stb_rect_pack.odin +++ b/vendor/stb/rect_pack/stb_rect_pack.odin @@ -4,9 +4,10 @@ import c "core:c/libc" #assert(size_of(b32) == size_of(c.int)) -when ODIN_OS == .Windows { foreign import lib "../lib/stb_rect_pack.lib" } -when ODIN_OS == .Linux { foreign import lib "../lib/stb_rect_pack.a" } -when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_rect_pack.a" } + when ODIN_OS == .Windows { foreign import lib "../lib/stb_rect_pack.lib" } +else when ODIN_OS == .Linux { foreign import lib "../lib/stb_rect_pack.a" } +else when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_rect_pack.a" } +else { foreign import lib "system:stb_rect_pack" } Coord :: distinct c.int _MAXVAL :: max(Coord) diff --git a/vendor/stb/truetype/stb_truetype.odin b/vendor/stb/truetype/stb_truetype.odin index 5b0022da2..1600041de 100644 --- a/vendor/stb/truetype/stb_truetype.odin +++ b/vendor/stb/truetype/stb_truetype.odin @@ -3,9 +3,10 @@ package stb_truetype import c "core:c" import stbrp "vendor:stb/rect_pack" -when ODIN_OS == .Windows { foreign import stbtt "../lib/stb_truetype.lib" } -when ODIN_OS == .Linux { foreign import stbtt "../lib/stb_truetype.a" } -when ODIN_OS == .Darwin { foreign import stbtt "../lib/darwin/stb_truetype.a" } + when ODIN_OS == .Windows { foreign import stbtt "../lib/stb_truetype.lib" } +else when ODIN_OS == .Linux { foreign import stbtt "../lib/stb_truetype.a" } +else when ODIN_OS == .Darwin { foreign import stbtt "../lib/darwin/stb_truetype.a" } +else { foreign import stbtt "system:stb_truetype" } /////////////////////////////////////////////////////////////////////////////// diff --git a/vendor/stb/vorbis/stb_vorbis.odin b/vendor/stb/vorbis/stb_vorbis.odin index 8804dda80..0c887a473 100644 --- a/vendor/stb/vorbis/stb_vorbis.odin +++ b/vendor/stb/vorbis/stb_vorbis.odin @@ -3,9 +3,10 @@ package stb_vorbis import c "core:c/libc" -when ODIN_OS == .Windows { foreign import lib "../lib/stb_vorbis.lib" } -when ODIN_OS == .Linux { foreign import lib "../lib/stb_vorbis.a" } -when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_vorbis.a" } + when ODIN_OS == .Windows { foreign import lib "../lib/stb_vorbis.lib" } +else when ODIN_OS == .Linux { foreign import lib "../lib/stb_vorbis.a" } +else when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_vorbis.a" } +else { foreign import lib "system:stb_vorbis" } From 2f2c086382b24c220be613630d841a59032c24d9 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 16:35:28 +0000 Subject: [PATCH 44/57] Fix foreign import names --- vendor/stb/image/stb_image_resize.odin | 2 +- vendor/stb/image/stb_image_write.odin | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/stb/image/stb_image_resize.odin b/vendor/stb/image/stb_image_resize.odin index 4c2a76a92..c464964df 100644 --- a/vendor/stb/image/stb_image_resize.odin +++ b/vendor/stb/image/stb_image_resize.odin @@ -5,7 +5,7 @@ import c "core:c/libc" when ODIN_OS == .Windows { foreign import lib "../lib/stb_image_resize.lib" } else when ODIN_OS == .Linux { foreign import lib "../lib/stb_image_resize.a" } else when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_image_resize.a" } -else { foreign import stbi "system:stb_image_resize" } +else { foreign import lib "system:stb_image_resize" } ////////////////////////////////////////////////////////////////////////////// diff --git a/vendor/stb/image/stb_image_write.odin b/vendor/stb/image/stb_image_write.odin index dff820808..9ed97eb48 100644 --- a/vendor/stb/image/stb_image_write.odin +++ b/vendor/stb/image/stb_image_write.odin @@ -5,7 +5,7 @@ import c "core:c/libc" when ODIN_OS == .Windows { foreign import stbiw "../lib/stb_image_write.lib" } else when ODIN_OS == .Linux { foreign import stbiw "../lib/stb_image_write.a" } else when ODIN_OS == .Darwin { foreign import stbiw "../lib/darwin/stb_image_write.a" } -else { foreign import stbi "system:stb_image_write" } +else { foreign import stbiw "system:stb_image_write" } write_func :: proc "c" (ctx: rawptr, data: rawptr, size: c.int) From 72d6b9b6834a3fe09e3759bb64b9a8549d6716f7 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 16:43:27 +0000 Subject: [PATCH 45/57] Replace `stdcall` with `system` --- vendor/directx/dxgi/dxgi.odin | 282 ++++++++++++++--------------- vendor/directx/dxgi/dxgidebug.odin | 82 ++++----- 2 files changed, 182 insertions(+), 182 deletions(-) diff --git a/vendor/directx/dxgi/dxgi.odin b/vendor/directx/dxgi/dxgi.odin index e8c111b21..5412747bc 100644 --- a/vendor/directx/dxgi/dxgi.odin +++ b/vendor/directx/dxgi/dxgi.odin @@ -31,12 +31,12 @@ 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, + QueryInterface: proc "system" (this: ^IUnknown, riid: ^IID, ppvObject: ^rawptr) -> HRESULT, + AddRef: proc "system" (this: ^IUnknown) -> ULONG, + Release: proc "system" (this: ^IUnknown) -> ULONG, } -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign dxgi { CreateDXGIFactory :: proc(riid: ^IID, ppFactory: ^rawptr) -> HRESULT --- CreateDXGIFactory1 :: proc(riid: ^IID, ppFactory: ^rawptr) -> HRESULT --- @@ -466,10 +466,10 @@ IObject :: struct #raw_union { } 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, + SetPrivateData: proc "system" (this: ^IObject, Name: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT, + SetPrivateDataInterface: proc "system" (this: ^IObject, Name: ^GUID, pUnknown: ^IUnknown) -> HRESULT, + GetPrivateData: proc "system" (this: ^IObject, Name: ^GUID, pDataSize: ^u32, pData: rawptr) -> HRESULT, + GetParent: proc "system" (this: ^IObject, riid: ^IID, ppParent: ^rawptr) -> HRESULT, } IDeviceSubObject_UUID_STRING :: "3D3E0379-F9DE-4D58-BB6C-18D62992F1A6" @@ -480,7 +480,7 @@ IDeviceSubObject :: struct #raw_union { } IDeviceSubObject_VTable :: struct { using idxgiobject_vtable: IObject_VTable, - GetDevice: proc "stdcall" (this: ^IDeviceSubObject, riid: ^IID, ppDevice: ^rawptr) -> HRESULT, + GetDevice: proc "system" (this: ^IDeviceSubObject, riid: ^IID, ppDevice: ^rawptr) -> HRESULT, } IResource_UUID_STRING :: "035F3AB4-482E-4E50-B41F-8A7F8BD8960B" @@ -491,10 +491,10 @@ IResource :: struct #raw_union { } 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: RESOURCE_PRIORITY) -> HRESULT, - GetEvictionPriority: proc "stdcall" (this: ^IResource, pEvictionPriority: ^RESOURCE_PRIORITY) -> HRESULT, + GetSharedHandle: proc "system" (this: ^IResource, pSharedHandle: ^HANDLE) -> HRESULT, + GetUsage: proc "system" (this: ^IResource, pUsage: ^USAGE) -> HRESULT, + SetEvictionPriority: proc "system" (this: ^IResource, EvictionPriority: RESOURCE_PRIORITY) -> HRESULT, + GetEvictionPriority: proc "system" (this: ^IResource, pEvictionPriority: ^RESOURCE_PRIORITY) -> HRESULT, } IKeyedMutex_UUID_STRING :: "9D8E1289-D7B3-465F-8126-250E349AF85D" @@ -505,8 +505,8 @@ IKeyedMutex :: struct #raw_union { } 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, + AcquireSync: proc "system" (this: ^IKeyedMutex, Key: u64, dwMilliseconds: u32) -> HRESULT, + ReleaseSync: proc "system" (this: ^IKeyedMutex, Key: u64) -> HRESULT, } ISurface_UUID_STRING :: "CAFCB56C-6AC3-4889-BF47-9E23BBD260EC" @@ -517,9 +517,9 @@ ISurface :: struct #raw_union { } 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: MAP) -> HRESULT, - Unmap: proc "stdcall" (this: ^ISurface) -> HRESULT, + GetDesc: proc "system" (this: ^ISurface, pDesc: ^SURFACE_DESC) -> HRESULT, + Map: proc "system" (this: ^ISurface, pLockedRect: ^MAPPED_RECT, MapFlags: MAP) -> HRESULT, + Unmap: proc "system" (this: ^ISurface) -> HRESULT, } ISurface1_UUID_STRING :: "4AE63092-6327-4C1B-80AE-BFE12EA32B86" @@ -530,8 +530,8 @@ ISurface1 :: struct #raw_union { } 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, + GetDC: proc "system" (this: ^ISurface1, Discard: BOOL, phdc: ^HDC) -> HRESULT, + ReleaseDC: proc "system" (this: ^ISurface1, pDirtyRect: ^RECT) -> HRESULT, } IAdapter_UUID_STRING :: "2411E7E1-12AC-4CCF-BD14-9798E8534DC0" @@ -542,9 +542,9 @@ IAdapter :: struct #raw_union { } 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, + EnumOutputs: proc "system" (this: ^IAdapter, Output: u32, ppOutput: ^^IOutput) -> HRESULT, + GetDesc: proc "system" (this: ^IAdapter, pDesc: ^ADAPTER_DESC) -> HRESULT, + CheckInterfaceSupport: proc "system" (this: ^IAdapter, InterfaceName: ^GUID, pUMDVersion: ^LARGE_INTEGER) -> HRESULT, } IOutput_UUID_STRING :: "AE02EEDB-C735-4690-8D52-5A8DC20213AA" @@ -555,18 +555,18 @@ IOutput :: struct #raw_union { } 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: ENUM_MODES, 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, + GetDesc: proc "system" (this: ^IOutput, pDesc: ^OUTPUT_DESC) -> HRESULT, + GetDisplayModeList: proc "system" (this: ^IOutput, EnumFormat: FORMAT, Flags: ENUM_MODES, pNumModes: ^u32, pDesc: ^MODE_DESC) -> HRESULT, + FindClosestMatchingMode: proc "system" (this: ^IOutput, pModeToMatch: ^MODE_DESC, pClosestMatch: ^MODE_DESC, pConcernedDevice: ^IUnknown) -> HRESULT, + WaitForVBlank: proc "system" (this: ^IOutput) -> HRESULT, + TakeOwnership: proc "system" (this: ^IOutput, pDevice: ^IUnknown, Exclusive: BOOL) -> HRESULT, + ReleaseOwnership: proc "system" (this: ^IOutput), + GetGammaControlCapabilities: proc "system" (this: ^IOutput, pGammaCaps: ^GAMMA_CONTROL_CAPABILITIES) -> HRESULT, + SetGammaControl: proc "system" (this: ^IOutput, pArray: ^GAMMA_CONTROL) -> HRESULT, + GetGammaControl: proc "system" (this: ^IOutput, pArray: ^GAMMA_CONTROL) -> HRESULT, + SetDisplaySurface: proc "system" (this: ^IOutput, pScanoutSurface: ^ISurface) -> HRESULT, + GetDisplaySurfaceData: proc "system" (this: ^IOutput, pDestination: ^ISurface) -> HRESULT, + GetFrameStatistics: proc "system" (this: ^IOutput, pStats: ^FRAME_STATISTICS) -> HRESULT, } ISwapChain_UUID_STRING :: "310D36A0-D2E7-4C0A-AA04-6A9D23B8886A" @@ -577,16 +577,16 @@ ISwapChain :: struct #raw_union { } ISwapChain_VTable :: struct { using idxgidevicesubobject_vtable: IDeviceSubObject_VTable, - Present: proc "stdcall" (this: ^ISwapChain, SyncInterval: u32, Flags: PRESENT) -> 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: SWAP_CHAIN) -> 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, + Present: proc "system" (this: ^ISwapChain, SyncInterval: u32, Flags: PRESENT) -> HRESULT, + GetBuffer: proc "system" (this: ^ISwapChain, Buffer: u32, riid: ^IID, ppSurface: ^rawptr) -> HRESULT, + SetFullscreenState: proc "system" (this: ^ISwapChain, Fullscreen: BOOL, pTarget: ^IOutput) -> HRESULT, + GetFullscreenState: proc "system" (this: ^ISwapChain, pFullscreen: ^BOOL, ppTarget: ^^IOutput) -> HRESULT, + GetDesc: proc "system" (this: ^ISwapChain, pDesc: ^SWAP_CHAIN_DESC) -> HRESULT, + ResizeBuffers: proc "system" (this: ^ISwapChain, BufferCount: u32, Width: u32, Height: u32, NewFormat: FORMAT, SwapChainFlags: SWAP_CHAIN) -> HRESULT, + ResizeTarget: proc "system" (this: ^ISwapChain, pNewTargetParameters: ^MODE_DESC) -> HRESULT, + GetContainingOutput: proc "system" (this: ^ISwapChain, ppOutput: ^^IOutput) -> HRESULT, + GetFrameStatistics: proc "system" (this: ^ISwapChain, pStats: ^FRAME_STATISTICS) -> HRESULT, + GetLastPresentCount: proc "system" (this: ^ISwapChain, pLastPresentCount: ^u32) -> HRESULT, } IFactory_UUID_STRING :: "7B7166EC-21C7-44AE-B21A-C9AE321AE369" @@ -597,11 +597,11 @@ IFactory :: struct #raw_union { } 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: MWA) -> 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, + EnumAdapters: proc "system" (this: ^IFactory, Adapter: u32, ppAdapter: ^^IAdapter) -> HRESULT, + MakeWindowAssociation: proc "system" (this: ^IFactory, WindowHandle: HWND, Flags: MWA) -> HRESULT, + GetWindowAssociation: proc "system" (this: ^IFactory, pWindowHandle: ^HWND) -> HRESULT, + CreateSwapChain: proc "system" (this: ^IFactory, pDevice: ^IUnknown, pDesc: ^SWAP_CHAIN_DESC, ppSwapChain: ^^ISwapChain) -> HRESULT, + CreateSoftwareAdapter: proc "system" (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}} @@ -611,11 +611,11 @@ IDevice :: struct #raw_union { } 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, + GetAdapter: proc "system" (this: ^IDevice, pAdapter: ^^IAdapter) -> HRESULT, + CreateSurface: proc "system" (this: ^IDevice, pDesc: ^SURFACE_DESC, NumSurfaces: u32, Usage: USAGE, pSharedResource: ^SHARED_RESOURCE, ppSurface: ^^ISurface) -> HRESULT, + QueryResourceResidency: proc "system" (this: ^IDevice, ppResources: ^^IUnknown, pResidencyStatus: ^RESIDENCY, NumResources: u32) -> HRESULT, + SetGPUThreadPriority: proc "system" (this: ^IDevice, Priority: i32) -> HRESULT, + GetGPUThreadPriority: proc "system" (this: ^IDevice, pPriority: ^i32) -> HRESULT, } ADAPTER_FLAG :: enum u32 { // TODO: convert to bit_set NONE = 0x0, @@ -651,8 +651,8 @@ IFactory1 :: struct #raw_union { } IFactory1_VTable :: struct { using idxgifactory_vtable: IFactory_VTable, - EnumAdapters1: proc "stdcall" (this: ^IFactory1, Adapter: u32, ppAdapter: ^^IAdapter1) -> HRESULT, - IsCurrent: proc "stdcall" (this: ^IFactory1) -> BOOL, + EnumAdapters1: proc "system" (this: ^IFactory1, Adapter: u32, ppAdapter: ^^IAdapter1) -> HRESULT, + IsCurrent: proc "system" (this: ^IFactory1) -> BOOL, } IAdapter1_UUID_STRING :: "29038F61-3839-4626-91FD-086879011A05" @@ -663,7 +663,7 @@ IAdapter1 :: struct #raw_union { } IAdapter1_VTable :: struct { using idxgiadapter_vtable: IAdapter_VTable, - GetDesc1: proc "stdcall" (this: ^IAdapter1, pDesc: ^ADAPTER_DESC1) -> HRESULT, + GetDesc1: proc "system" (this: ^IAdapter1, pDesc: ^ADAPTER_DESC1) -> HRESULT, } IDevice1_UUID_STRING :: "77DB970F-6276-48BA-BA28-070143B4392C" @@ -674,8 +674,8 @@ IDevice1 :: struct #raw_union { } IDevice1_VTable :: struct { using idxgidevice_vtable: IDevice_VTable, - SetMaximumFrameLatency: proc "stdcall" (this: ^IDevice1, MaxLatency: u32) -> HRESULT, - GetMaximumFrameLatency: proc "stdcall" (this: ^IDevice1, pMaxLatency: ^u32) -> HRESULT, + SetMaximumFrameLatency: proc "system" (this: ^IDevice1, MaxLatency: u32) -> HRESULT, + GetMaximumFrameLatency: proc "system" (this: ^IDevice1, pMaxLatency: ^u32) -> HRESULT, } IDisplayControl_UUID_STRING :: "EA9DBF1A-C88E-4486-854A-98AA0138F30C" @@ -686,8 +686,8 @@ IDisplayControl :: struct #raw_union { } IDisplayControl_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - IsStereoEnabled: proc "stdcall" (this: ^IDisplayControl) -> BOOL, - SetStereoEnabled: proc "stdcall" (this: ^IDisplayControl, enabled: BOOL), + IsStereoEnabled: proc "system" (this: ^IDisplayControl) -> BOOL, + SetStereoEnabled: proc "system" (this: ^IDisplayControl, enabled: BOOL), } OUTDUPL_MOVE_RECT :: struct { SourcePoint: POINT, @@ -739,14 +739,14 @@ IOutputDuplication :: struct #raw_union { } 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, + GetDesc: proc "system" (this: ^IOutputDuplication, pDesc: ^OUTDUPL_DESC), + AcquireNextFrame: proc "system" (this: ^IOutputDuplication, TimeoutInMilliseconds: u32, pFrameInfo: ^OUTDUPL_FRAME_INFO, ppDesktopResource: ^^IResource) -> HRESULT, + GetFrameDirtyRects: proc "system" (this: ^IOutputDuplication, DirtyRectsBufferSize: u32, pDirtyRectsBuffer: ^RECT, pDirtyRectsBufferSizeRequired: ^u32) -> HRESULT, + GetFrameMoveRects: proc "system" (this: ^IOutputDuplication, MoveRectsBufferSize: u32, pMoveRectBuffer: ^OUTDUPL_MOVE_RECT, pMoveRectsBufferSizeRequired: ^u32) -> HRESULT, + GetFramePointerShape: proc "system" (this: ^IOutputDuplication, PointerShapeBufferSize: u32, pPointerShapeBuffer: rawptr, pPointerShapeBufferSizeRequired: ^u32, pPointerShapeInfo: ^OUTDUPL_POINTER_SHAPE_INFO) -> HRESULT, + MapDesktopSurface: proc "system" (this: ^IOutputDuplication, pLockedRect: ^MAPPED_RECT) -> HRESULT, + UnMapDesktopSurface: proc "system" (this: ^IOutputDuplication) -> HRESULT, + ReleaseFrame: proc "system" (this: ^IOutputDuplication) -> HRESULT, } ALPHA_MODE :: enum i32 { UNSPECIFIED = 0, @@ -765,7 +765,7 @@ ISurface2 :: struct #raw_union { } ISurface2_VTable :: struct { using idxgisurface1_vtable: ISurface1_VTable, - GetResource: proc "stdcall" (this: ^ISurface2, riid: ^IID, ppParentResource: ^rawptr, pSubresourceIndex: ^u32) -> HRESULT, + GetResource: proc "system" (this: ^ISurface2, riid: ^IID, ppParentResource: ^rawptr, pSubresourceIndex: ^u32) -> HRESULT, } IResource1_UUID_STRING :: "30961379-4609-4A41-998E-54FE567EE0C1" @@ -776,8 +776,8 @@ IResource1 :: struct #raw_union { } 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: SHARED_RESOURCE_RW, lpName: ^i16, pHandle: ^HANDLE) -> HRESULT, + CreateSubresourceSurface: proc "system" (this: ^IResource1, index: u32, ppSurface: ^^ISurface2) -> HRESULT, + CreateSharedHandle: proc "system" (this: ^IResource1, pAttributes: ^win32.SECURITY_ATTRIBUTES, dwAccess: SHARED_RESOURCE_RW, lpName: ^i16, pHandle: ^HANDLE) -> HRESULT, } OFFER_RESOURCE_PRIORITY :: enum i32 { LOW = 1, @@ -794,9 +794,9 @@ IDevice2 :: struct #raw_union { } 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, + OfferResources: proc "system" (this: ^IDevice2, NumResources: u32, ppResources: ^^IResource, Priority: OFFER_RESOURCE_PRIORITY) -> HRESULT, + ReclaimResources: proc "system" (this: ^IDevice2, NumResources: u32, ppResources: ^^IResource, pDiscarded: ^BOOL) -> HRESULT, + EnqueueSetEvent: proc "system" (this: ^IDevice2, hEvent: HANDLE) -> HRESULT, } MODE_DESC1 :: struct { Width: u32, @@ -852,17 +852,17 @@ ISwapChain1 :: struct #raw_union { } 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: PRESENT, 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, + GetDesc1: proc "system" (this: ^ISwapChain1, pDesc: ^SWAP_CHAIN_DESC1) -> HRESULT, + GetFullscreenDesc: proc "system" (this: ^ISwapChain1, pDesc: ^SWAP_CHAIN_FULLSCREEN_DESC) -> HRESULT, + GetHwnd: proc "system" (this: ^ISwapChain1, pHwnd: ^HWND) -> HRESULT, + GetCoreWindow: proc "system" (this: ^ISwapChain1, refiid: ^IID, ppUnk: ^rawptr) -> HRESULT, + Present1: proc "system" (this: ^ISwapChain1, SyncInterval: u32, PresentFlags: PRESENT, pPresentParameters: ^PRESENT_PARAMETERS) -> HRESULT, + IsTemporaryMonoSupported: proc "system" (this: ^ISwapChain1) -> BOOL, + GetRestrictToOutput: proc "system" (this: ^ISwapChain1, ppRestrictToOutput: ^^IOutput) -> HRESULT, + SetBackgroundColor: proc "system" (this: ^ISwapChain1, pColor: ^RGBA) -> HRESULT, + GetBackgroundColor: proc "system" (this: ^ISwapChain1, pColor: ^RGBA) -> HRESULT, + SetRotation: proc "system" (this: ^ISwapChain1, Rotation: MODE_ROTATION) -> HRESULT, + GetRotation: proc "system" (this: ^ISwapChain1, pRotation: ^MODE_ROTATION) -> HRESULT, } IFactory2_UUID_STRING :: "50C83A1C-E072-4C48-87B0-3630FA36A6D0" @@ -873,17 +873,17 @@ IFactory2 :: struct #raw_union { } 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, + IsWindowedStereoEnabled: proc "system" (this: ^IFactory2) -> BOOL, + CreateSwapChainForHwnd: proc "system" (this: ^IFactory2, pDevice: ^IUnknown, hWnd: HWND, pDesc: ^SWAP_CHAIN_DESC1, pFullscreenDesc: ^SWAP_CHAIN_FULLSCREEN_DESC, pRestrictToOutput: ^IOutput, ppSwapChain: ^^ISwapChain1) -> HRESULT, + CreateSwapChainForCoreWindow: proc "system" (this: ^IFactory2, pDevice: ^IUnknown, pWindow: ^IUnknown, pDesc: ^SWAP_CHAIN_DESC1, pRestrictToOutput: ^IOutput, ppSwapChain: ^^ISwapChain1) -> HRESULT, + GetSharedResourceAdapterLuid: proc "system" (this: ^IFactory2, hResource: HANDLE, pLuid: ^LUID) -> HRESULT, + RegisterStereoStatusWindow: proc "system" (this: ^IFactory2, WindowHandle: HWND, wMsg: u32, pdwCookie: ^u32) -> HRESULT, + RegisterStereoStatusEvent: proc "system" (this: ^IFactory2, hEvent: HANDLE, pdwCookie: ^u32) -> HRESULT, + UnregisterStereoStatus: proc "system" (this: ^IFactory2, dwCookie: u32), + RegisterOcclusionStatusWindow: proc "system" (this: ^IFactory2, WindowHandle: HWND, wMsg: u32, pdwCookie: ^u32) -> HRESULT, + RegisterOcclusionStatusEvent: proc "system" (this: ^IFactory2, hEvent: HANDLE, pdwCookie: ^u32) -> HRESULT, + UnregisterOcclusionStatus: proc "system" (this: ^IFactory2, dwCookie: u32), + CreateSwapChainForComposition: proc "system" (this: ^IFactory2, pDevice: ^IUnknown, pDesc: ^SWAP_CHAIN_DESC1, pRestrictToOutput: ^IOutput, ppSwapChain: ^^ISwapChain1) -> HRESULT, } GRAPHICS_PREEMPTION_GRANULARITY :: enum i32 { DMA_BUFFER_BOUNDARY = 0, @@ -925,7 +925,7 @@ IAdapter2 :: struct #raw_union { } IAdapter2_VTable :: struct { using idxgiadapter1_vtable: IAdapter1_VTable, - GetDesc2: proc "stdcall" (this: ^IAdapter2, pDesc: ^ADAPTER_DESC2) -> HRESULT, + GetDesc2: proc "system" (this: ^IAdapter2, pDesc: ^ADAPTER_DESC2) -> HRESULT, } IOutput1_UUID_STRING :: "00CDDEA8-939B-4B83-A340-A685226666CC" @@ -936,10 +936,10 @@ IOutput1 :: struct #raw_union { } IOutput1_VTable :: struct { using idxgioutput_vtable: IOutput_VTable, - GetDisplayModeList1: proc "stdcall" (this: ^IOutput1, EnumFormat: FORMAT, Flags: ENUM_MODES, 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, + GetDisplayModeList1: proc "system" (this: ^IOutput1, EnumFormat: FORMAT, Flags: ENUM_MODES, pNumModes: ^u32, pDesc: ^MODE_DESC1) -> HRESULT, + FindClosestMatchingMode1: proc "system" (this: ^IOutput1, pModeToMatch: ^MODE_DESC1, pClosestMatch: ^MODE_DESC1, pConcernedDevice: ^IUnknown) -> HRESULT, + GetDisplaySurfaceData1: proc "system" (this: ^IOutput1, pDestination: ^IResource) -> HRESULT, + DuplicateOutput: proc "system" (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}} @@ -949,7 +949,7 @@ IDevice3 :: struct #raw_union { } IDevice3_VTable :: struct { using idxgidevice2_vtable: IDevice2_VTable, - Trim: proc "stdcall" (this: ^IDevice3), + Trim: proc "system" (this: ^IDevice3), } MATRIX_3X2_F :: struct { _11: f32, @@ -969,13 +969,13 @@ ISwapChain2 :: struct #raw_union { } 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, + SetSourceSize: proc "system" (this: ^ISwapChain2, Width: u32, Height: u32) -> HRESULT, + GetSourceSize: proc "system" (this: ^ISwapChain2, pWidth: ^u32, pHeight: ^u32) -> HRESULT, + SetMaximumFrameLatency: proc "system" (this: ^ISwapChain2, MaxLatency: u32) -> HRESULT, + GetMaximumFrameLatency: proc "system" (this: ^ISwapChain2, pMaxLatency: ^u32) -> HRESULT, + GetFrameLatencyWaitableObject: proc "system" (this: ^ISwapChain2) -> HANDLE, + SetMatrixTransform: proc "system" (this: ^ISwapChain2, pMatrix: ^MATRIX_3X2_F) -> HRESULT, + GetMatrixTransform: proc "system" (this: ^ISwapChain2, pMatrix: ^MATRIX_3X2_F) -> HRESULT, } IOutput2_UUID_STRING :: "595E39D1-2724-4663-99B1-DA969DE28364" @@ -986,7 +986,7 @@ IOutput2 :: struct #raw_union { } IOutput2_VTable :: struct { using idxgioutput1_vtable: IOutput1_VTable, - SupportsOverlays: proc "stdcall" (this: ^IOutput2) -> BOOL, + SupportsOverlays: proc "system" (this: ^IOutput2) -> BOOL, } IFactory3_UUID_STRING :: "25483823-CD46-4C7D-86CA-47AA95B837BD" @@ -997,7 +997,7 @@ IFactory3 :: struct #raw_union { } IFactory3_VTable :: struct { using idxgifactory2_vtable: IFactory2_VTable, - GetCreationFlags: proc "stdcall" (this: ^IFactory3) -> CREATE_FACTORY, + GetCreationFlags: proc "system" (this: ^IFactory3) -> CREATE_FACTORY, } DECODE_SWAP_CHAIN_DESC :: struct { Flags: SWAP_CHAIN, @@ -1019,15 +1019,15 @@ IDecodeSwapChain :: struct #raw_union { } IDecodeSwapChain_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - PresentBuffer: proc "stdcall" (this: ^IDecodeSwapChain, BufferToPresent: u32, SyncInterval: u32, Flags: PRESENT) -> 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) -> HRESULT, - GetColorSpace: proc "stdcall" (this: ^IDecodeSwapChain) -> MULTIPLANE_OVERLAY_YCbCr, + PresentBuffer: proc "system" (this: ^IDecodeSwapChain, BufferToPresent: u32, SyncInterval: u32, Flags: PRESENT) -> HRESULT, + SetSourceRect: proc "system" (this: ^IDecodeSwapChain, pRect: ^RECT) -> HRESULT, + SetTargetRect: proc "system" (this: ^IDecodeSwapChain, pRect: ^RECT) -> HRESULT, + SetDestSize: proc "system" (this: ^IDecodeSwapChain, Width: u32, Height: u32) -> HRESULT, + GetSourceRect: proc "system" (this: ^IDecodeSwapChain, pRect: ^RECT) -> HRESULT, + GetTargetRect: proc "system" (this: ^IDecodeSwapChain, pRect: ^RECT) -> HRESULT, + GetDestSize: proc "system" (this: ^IDecodeSwapChain, pWidth: ^u32, pHeight: ^u32) -> HRESULT, + SetColorSpace: proc "system" (this: ^IDecodeSwapChain, ColorSpace: MULTIPLANE_OVERLAY_YCbCr) -> HRESULT, + GetColorSpace: proc "system" (this: ^IDecodeSwapChain) -> MULTIPLANE_OVERLAY_YCbCr, } IFactoryMedia_UUID_STRING :: "41E7D1F2-A591-4F7B-A2E5-FA9C843E1C12" @@ -1038,8 +1038,8 @@ IFactoryMedia :: struct #raw_union { } 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, + CreateSwapChainForCompositionSurfaceHandle: proc "system" (this: ^IFactoryMedia, pDevice: ^IUnknown, hSurface: HANDLE, pDesc: ^SWAP_CHAIN_DESC1, pRestrictToOutput: ^IOutput, ppSwapChain: ^^ISwapChain1) -> HRESULT, + CreateDecodeSwapChainForCompositionSurfaceHandle: proc "system" (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, @@ -1067,9 +1067,9 @@ ISwapChainMedia :: struct #raw_union { } 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, + GetFrameStatisticsMedia: proc "system" (this: ^ISwapChainMedia, pStats: ^FRAME_STATISTICS_MEDIA) -> HRESULT, + SetPresentDuration: proc "system" (this: ^ISwapChainMedia, Duration: u32) -> HRESULT, + CheckPresentDurationSupport: proc "system" (this: ^ISwapChainMedia, DesiredPresentDuration: u32, pClosestSmallerPresentDuration: ^u32, pClosestLargerPresentDuration: ^u32) -> HRESULT, } OVERLAY_SUPPORT :: distinct bit_set[OVERLAY_SUPPORT_FLAG; u32] OVERLAY_SUPPORT_FLAG :: enum u32 { @@ -1086,7 +1086,7 @@ IOutput3 :: struct #raw_union { } IOutput3_VTable :: struct { using idxgioutput2_vtable: IOutput2_VTable, - CheckOverlaySupport: proc "stdcall" (this: ^IOutput3, EnumFormat: FORMAT, pConcernedDevice: ^IUnknown, pFlags: ^OVERLAY_SUPPORT) -> HRESULT, + CheckOverlaySupport: proc "system" (this: ^IOutput3, EnumFormat: FORMAT, pConcernedDevice: ^IUnknown, pFlags: ^OVERLAY_SUPPORT) -> HRESULT, } SWAP_CHAIN_COLOR_SPACE_SUPPORT :: distinct bit_set[SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG; u32] SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG :: enum u32 { @@ -1103,10 +1103,10 @@ ISwapChain3 :: struct #raw_union { } ISwapChain3_VTable :: struct { using idxgiswapchain2_vtable: ISwapChain2_VTable, - GetCurrentBackBufferIndex: proc "stdcall" (this: ^ISwapChain3) -> u32, - CheckColorSpaceSupport: proc "stdcall" (this: ^ISwapChain3, ColorSpace: COLOR_SPACE_TYPE, pColorSpaceSupport: ^SWAP_CHAIN_COLOR_SPACE_SUPPORT) -> 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: SWAP_CHAIN, pCreationNodeMask: ^u32, ppPresentQueue: ^^IUnknown) -> HRESULT, + GetCurrentBackBufferIndex: proc "system" (this: ^ISwapChain3) -> u32, + CheckColorSpaceSupport: proc "system" (this: ^ISwapChain3, ColorSpace: COLOR_SPACE_TYPE, pColorSpaceSupport: ^SWAP_CHAIN_COLOR_SPACE_SUPPORT) -> HRESULT, + SetColorSpace1: proc "system" (this: ^ISwapChain3, ColorSpace: COLOR_SPACE_TYPE) -> HRESULT, + ResizeBuffers1: proc "system" (this: ^ISwapChain3, BufferCount: u32, Width: u32, Height: u32, Format: FORMAT, SwapChainFlags: SWAP_CHAIN, pCreationNodeMask: ^u32, ppPresentQueue: ^^IUnknown) -> HRESULT, } OVERLAY_COLOR_SPACE_SUPPORT :: distinct bit_set[OVERLAY_COLOR_SPACE_SUPPORT_FLAG; u32] OVERLAY_COLOR_SPACE_SUPPORT_FLAG :: enum u32 { @@ -1122,7 +1122,7 @@ IOutput4 :: struct #raw_union { } IOutput4_VTable :: struct { using idxgioutput3_vtable: IOutput3_VTable, - CheckOverlayColorSpaceSupport: proc "stdcall" (this: ^IOutput4, Format: FORMAT, ColorSpace: COLOR_SPACE_TYPE, pConcernedDevice: ^IUnknown, pFlags: ^OVERLAY_COLOR_SPACE_SUPPORT) -> HRESULT, + CheckOverlayColorSpaceSupport: proc "system" (this: ^IOutput4, Format: FORMAT, ColorSpace: COLOR_SPACE_TYPE, pConcernedDevice: ^IUnknown, pFlags: ^OVERLAY_COLOR_SPACE_SUPPORT) -> HRESULT, } IFactory4_UUID_STRING :: "1BC6EA02-EF36-464F-BF0C-21CA39E5168A" @@ -1133,8 +1133,8 @@ IFactory4 :: struct #raw_union { } 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, + EnumAdapterByLuid: proc "system" (this: ^IFactory4, AdapterLuid: LUID, riid: ^IID, ppvAdapter: ^rawptr) -> HRESULT, + EnumWarpAdapter: proc "system" (this: ^IFactory4, riid: ^IID, ppvAdapter: ^rawptr) -> HRESULT, } MEMORY_SEGMENT_GROUP :: enum i32 { LOCAL = 0, @@ -1157,12 +1157,12 @@ IAdapter3 :: struct #raw_union { } 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), + RegisterHardwareContentProtectionTeardownStatusEvent: proc "system" (this: ^IAdapter3, hEvent: HANDLE, pdwCookie: ^u32) -> HRESULT, + UnregisterHardwareContentProtectionTeardownStatus: proc "system" (this: ^IAdapter3, dwCookie: u32), + QueryVideoMemoryInfo: proc "system" (this: ^IAdapter3, NodeIndex: u32, MemorySegmentGroup: MEMORY_SEGMENT_GROUP, pVideoMemoryInfo: ^QUERY_VIDEO_MEMORY_INFO) -> HRESULT, + SetVideoMemoryReservation: proc "system" (this: ^IAdapter3, NodeIndex: u32, MemorySegmentGroup: MEMORY_SEGMENT_GROUP, Reservation: u64) -> HRESULT, + RegisterVideoMemoryBudgetChangeNotificationEvent: proc "system" (this: ^IAdapter3, hEvent: HANDLE, pdwCookie: ^u32) -> HRESULT, + UnregisterVideoMemoryBudgetChangeNotification: proc "system" (this: ^IAdapter3, dwCookie: u32), } ERROR_ACCESS_DENIED :: HRESULT(-2005270485) //0x887A002B diff --git a/vendor/directx/dxgi/dxgidebug.odin b/vendor/directx/dxgi/dxgidebug.odin index 1dea396a7..f5d4904eb 100644 --- a/vendor/directx/dxgi/dxgidebug.odin +++ b/vendor/directx/dxgi/dxgidebug.odin @@ -77,43 +77,43 @@ IInfoQueue :: struct #raw_union { } IInfoQueue_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - SetMessageCountLimit: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, MessageCountLimit: UINT64) -> HRESULT, - ClearStoredMessages: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID), - GetMessage: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, MessageIndex: UINT64, pMessage: ^INFO_QUEUE_MESSAGE, pMessageByteLength: ^SIZE_T) -> HRESULT, - GetNumStoredMessagesAllowedByRetrievalFilters: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, - GetNumStoredMessages: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, - GetNumMessagesDiscardedByMessageCountLimit: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, - GetMessageCountLimit: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, - GetNumMessagesAllowedByStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, - GetNumMessagesDeniedByStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, - AddStorageFilterEntries: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: INFO_QUEUE_FILTER) -> HRESULT, - GetStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, - ClearStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID), - PushEmptyStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, - PushDenyAllStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, - PushCopyOfStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, - PushStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, - PopStorageFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID), - GetStorageFilterStackSize: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT, - AddRetrievalFilterEntries: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, - GetRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, - ClearRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID), - PushEmptyRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, - PushDenyAllRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, - PushCopyOfRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, - PushRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, - PopRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID), - GetRetrievalFilterStackSize: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT, - AddMessage: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, Category: INFO_QUEUE_MESSAGE_CATEGORY, Severity: INFO_QUEUE_MESSAGE_SEVERITY, ID: INFO_QUEUE_MESSAGE_ID, pDescription: LPCSTR) -> HRESULT, - AddApplicationMessage: proc "stdcall" (this: ^IInfoQueue, Severity: INFO_QUEUE_MESSAGE_SEVERITY, pDescription: LPCSTR) -> HRESULT, - SetBreakOnCategory: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, Category: INFO_QUEUE_MESSAGE_CATEGORY, bEnable: BOOL) -> HRESULT, - SetBreakOnSeverity: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, Severity: INFO_QUEUE_MESSAGE_SEVERITY, bEnable: BOOL) -> HRESULT, - SetBreakOnID: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, ID: INFO_QUEUE_MESSAGE_ID, bEnable: BOOL) -> HRESULT, - GetBreakOnCategory: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, Category: INFO_QUEUE_MESSAGE_CATEGORY) -> BOOL, - GetBreakOnSeverity: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, Severity: INFO_QUEUE_MESSAGE_SEVERITY) -> BOOL, - GetBreakOnID: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, ID: INFO_QUEUE_MESSAGE_ID) -> BOOL, - SetMuteDebugOutput: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID, bMute: BOOL), - GetMuteDebugOutput: proc "stdcall" (this: ^IInfoQueue, Producer: DEBUG_ID) -> BOOL, + SetMessageCountLimit: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, MessageCountLimit: UINT64) -> HRESULT, + ClearStoredMessages: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID), + GetMessage: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, MessageIndex: UINT64, pMessage: ^INFO_QUEUE_MESSAGE, pMessageByteLength: ^SIZE_T) -> HRESULT, + GetNumStoredMessagesAllowedByRetrievalFilters: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, + GetNumStoredMessages: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, + GetNumMessagesDiscardedByMessageCountLimit: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, + GetMessageCountLimit: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, + GetNumMessagesAllowedByStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, + GetNumMessagesDeniedByStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT64, + AddStorageFilterEntries: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: INFO_QUEUE_FILTER) -> HRESULT, + GetStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, + ClearStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID), + PushEmptyStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, + PushDenyAllStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, + PushCopyOfStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, + PushStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + PopStorageFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID), + GetStorageFilterStackSize: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT, + AddRetrievalFilterEntries: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + GetRetrievalFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, + ClearRetrievalFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID), + PushEmptyRetrievalFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, + PushDenyAllRetrievalFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, + PushCopyOfRetrievalFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> HRESULT, + PushRetrievalFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + PopRetrievalFilter: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID), + GetRetrievalFilterStackSize: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> UINT, + AddMessage: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, Category: INFO_QUEUE_MESSAGE_CATEGORY, Severity: INFO_QUEUE_MESSAGE_SEVERITY, ID: INFO_QUEUE_MESSAGE_ID, pDescription: LPCSTR) -> HRESULT, + AddApplicationMessage: proc "system" (this: ^IInfoQueue, Severity: INFO_QUEUE_MESSAGE_SEVERITY, pDescription: LPCSTR) -> HRESULT, + SetBreakOnCategory: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, Category: INFO_QUEUE_MESSAGE_CATEGORY, bEnable: BOOL) -> HRESULT, + SetBreakOnSeverity: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, Severity: INFO_QUEUE_MESSAGE_SEVERITY, bEnable: BOOL) -> HRESULT, + SetBreakOnID: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, ID: INFO_QUEUE_MESSAGE_ID, bEnable: BOOL) -> HRESULT, + GetBreakOnCategory: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, Category: INFO_QUEUE_MESSAGE_CATEGORY) -> BOOL, + GetBreakOnSeverity: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, Severity: INFO_QUEUE_MESSAGE_SEVERITY) -> BOOL, + GetBreakOnID: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, ID: INFO_QUEUE_MESSAGE_ID) -> BOOL, + SetMuteDebugOutput: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID, bMute: BOOL), + GetMuteDebugOutput: proc "system" (this: ^IInfoQueue, Producer: DEBUG_ID) -> BOOL, } IDebug_UUID_STRING :: "119E7452-DE9E-40fe-8806-88F90C12B441" @@ -124,7 +124,7 @@ IDebug :: struct #raw_union { } IDebug_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - ReportLiveObjects: proc "stdcall" (this: ^IDebug, apiid: GUID, flags: DEBUG_RLO_FLAGS), + ReportLiveObjects: proc "system" (this: ^IDebug, apiid: GUID, flags: DEBUG_RLO_FLAGS), } IDebug1_UUID_STRING :: "c5a05f0c-16f2-4adf-9f4d-a8c4d58ac550" @@ -135,7 +135,7 @@ IDebug1 :: struct #raw_union { } IDebug1_VTable :: struct { using idxgidebug_vtable: IDebug_VTable, - EnableLeakTrackingForThread: proc "stdcall" (this: ^IDebug1), - DisableLeakTrackingForThread: proc "stdcall" (this: ^IDebug1), - IsLeakTrackingEnabledForThread: proc "stdcall" (this: ^IDebug1) -> BOOL, + EnableLeakTrackingForThread: proc "system" (this: ^IDebug1), + DisableLeakTrackingForThread: proc "system" (this: ^IDebug1), + IsLeakTrackingEnabledForThread: proc "system" (this: ^IDebug1) -> BOOL, } From 8c2eb5df78cb1960bfd0b7464c82978ef91550b7 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 16:54:50 +0000 Subject: [PATCH 46/57] stdcall -> system --- vendor/directx/d3d11/d3d11.odin | 748 +++++++++--------- vendor/directx/d3d12/d3d12.odin | 648 +++++++-------- vendor/directx/d3d_compiler/d3d_compiler.odin | 38 +- 3 files changed, 717 insertions(+), 717 deletions(-) diff --git a/vendor/directx/d3d11/d3d11.odin b/vendor/directx/d3d11/d3d11.odin index d94c05d06..53d45c47c 100644 --- a/vendor/directx/d3d11/d3d11.odin +++ b/vendor/directx/d3d11/d3d11.odin @@ -24,7 +24,7 @@ IModuleInstance :: d3d_compiler.ID3D11ModuleInstance IBlob :: d3d_compiler.ID3DBlob IModule :: d3d_compiler.ID3D11Module -@(default_calling_convention="stdcall", link_prefix="D3D11") +@(default_calling_convention="system", link_prefix="D3D11") foreign d3d11 { CreateDevice :: proc( pAdapter: ^dxgi.IAdapter, @@ -707,8 +707,8 @@ ID3DDestructionNotifier :: struct #raw_union { } 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, + RegisterDestructionCallback: proc "system" (this: ^ID3DDestructionNotifier, callbackFn: PFN_DESTRUCTION_CALLBACK, pData: rawptr, pCallbackID: ^u32) -> HRESULT, + UnregisterDestructionCallback: proc "system" (this: ^ID3DDestructionNotifier, callbackID: u32) -> HRESULT, } @@ -1139,10 +1139,10 @@ IDeviceChild :: struct #raw_union { } 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, + GetDevice: proc "system" (this: ^IDeviceChild, ppDevice: ^^IDevice), + GetPrivateData: proc "system" (this: ^IDeviceChild, guid: ^GUID, pDataSize: ^u32, pData: rawptr) -> HRESULT, + SetPrivateData: proc "system" (this: ^IDeviceChild, guid: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT, + SetPrivateDataInterface: proc "system" (this: ^IDeviceChild, guid: ^GUID, pData: ^IUnknown) -> HRESULT, } @@ -1204,7 +1204,7 @@ IDepthStencilState :: struct #raw_union { } IDepthStencilState_VTable :: struct { using id3d11devicechild_vtable: IDeviceChild_VTable, - GetDesc: proc "stdcall" (this: ^IDepthStencilState, pDesc: ^DEPTH_STENCIL_DESC), + GetDesc: proc "system" (this: ^IDepthStencilState, pDesc: ^DEPTH_STENCIL_DESC), } @@ -1281,7 +1281,7 @@ IBlendState :: struct #raw_union { } IBlendState_VTable :: struct { using id3d11devicechild_vtable: IDeviceChild_VTable, - GetDesc: proc "stdcall" (this: ^IBlendState, pDesc: ^BLEND_DESC), + GetDesc: proc "system" (this: ^IBlendState, pDesc: ^BLEND_DESC), } @@ -1311,7 +1311,7 @@ IRasterizerState :: struct #raw_union { } IRasterizerState_VTable :: struct { using id3d11devicechild_vtable: IDeviceChild_VTable, - GetDesc: proc "stdcall" (this: ^IRasterizerState, pDesc: ^RASTERIZER_DESC), + GetDesc: proc "system" (this: ^IRasterizerState, pDesc: ^RASTERIZER_DESC), } @@ -1336,9 +1336,9 @@ IResource :: struct #raw_union { } 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, + GetType: proc "system" (this: ^IResource, pResourceDimension: ^RESOURCE_DIMENSION), + SetEvictionPriority: proc "system" (this: ^IResource, EvictionPriority: u32), + GetEvictionPriority: proc "system" (this: ^IResource) -> u32, } @@ -1364,7 +1364,7 @@ IBuffer :: struct #raw_union { } IBuffer_VTable :: struct { using id3d11resource_vtable: IResource_VTable, - GetDesc: proc "stdcall" (this: ^IBuffer, pDesc: ^BUFFER_DESC), + GetDesc: proc "system" (this: ^IBuffer, pDesc: ^BUFFER_DESC), } @@ -1392,7 +1392,7 @@ ITexture1D :: struct #raw_union { } ITexture1D_VTable :: struct { using id3d11resource_vtable: IResource_VTable, - GetDesc: proc "stdcall" (this: ^ITexture1D, pDesc: ^TEXTURE1D_DESC), + GetDesc: proc "system" (this: ^ITexture1D, pDesc: ^TEXTURE1D_DESC), } @@ -1422,7 +1422,7 @@ ITexture2D :: struct #raw_union { } ITexture2D_VTable :: struct { using id3d11resource_vtable: IResource_VTable, - GetDesc: proc "stdcall" (this: ^ITexture2D, pDesc: ^TEXTURE2D_DESC), + GetDesc: proc "system" (this: ^ITexture2D, pDesc: ^TEXTURE2D_DESC), } @@ -1451,7 +1451,7 @@ ITexture3D :: struct #raw_union { } ITexture3D_VTable :: struct { using id3d11resource_vtable: IResource_VTable, - GetDesc: proc "stdcall" (this: ^ITexture3D, pDesc: ^TEXTURE3D_DESC), + GetDesc: proc "system" (this: ^ITexture3D, pDesc: ^TEXTURE3D_DESC), } @@ -1473,7 +1473,7 @@ IView :: struct #raw_union { } IView_VTable :: struct { using id3d11devicechild_vtable: IDeviceChild_VTable, - GetResource: proc "stdcall" (this: ^IView, ppResource: ^^IResource), + GetResource: proc "system" (this: ^IView, ppResource: ^^IResource), } @@ -1580,7 +1580,7 @@ IShaderResourceView :: struct #raw_union { } IShaderResourceView_VTable :: struct { using id3d11view_vtable: IView_VTable, - GetDesc: proc "stdcall" (this: ^IShaderResourceView, pDesc: ^SHADER_RESOURCE_VIEW_DESC), + GetDesc: proc "system" (this: ^IShaderResourceView, pDesc: ^SHADER_RESOURCE_VIEW_DESC), } @@ -1658,7 +1658,7 @@ IRenderTargetView :: struct #raw_union { } IRenderTargetView_VTable :: struct { using id3d11view_vtable: IView_VTable, - GetDesc: proc "stdcall" (this: ^IRenderTargetView, pDesc: ^RENDER_TARGET_VIEW_DESC), + GetDesc: proc "system" (this: ^IRenderTargetView, pDesc: ^RENDER_TARGET_VIEW_DESC), } @@ -1728,7 +1728,7 @@ IDepthStencilView :: struct #raw_union { } IDepthStencilView_VTable :: struct { using id3d11view_vtable: IView_VTable, - GetDesc: proc "stdcall" (this: ^IDepthStencilView, pDesc: ^DEPTH_STENCIL_VIEW_DESC), + GetDesc: proc "system" (this: ^IDepthStencilView, pDesc: ^DEPTH_STENCIL_VIEW_DESC), } @@ -1797,7 +1797,7 @@ IUnorderedAccessView :: struct #raw_union { } IUnorderedAccessView_VTable :: struct { using id3d11view_vtable: IView_VTable, - GetDesc: proc "stdcall" (this: ^IUnorderedAccessView, pDesc: ^UNORDERED_ACCESS_VIEW_DESC), + GetDesc: proc "system" (this: ^IUnorderedAccessView, pDesc: ^UNORDERED_ACCESS_VIEW_DESC), } @@ -1935,7 +1935,7 @@ ISamplerState :: struct #raw_union { } ISamplerState_VTable :: struct { using id3d11devicechild_vtable: IDeviceChild_VTable, - GetDesc: proc "stdcall" (this: ^ISamplerState, pDesc: ^SAMPLER_DESC), + GetDesc: proc "system" (this: ^ISamplerState, pDesc: ^SAMPLER_DESC), } @@ -1997,7 +1997,7 @@ IAsynchronous :: struct #raw_union { } IAsynchronous_VTable :: struct { using id3d11devicechild_vtable: IDeviceChild_VTable, - GetDataSize: proc "stdcall" (this: ^IAsynchronous) -> u32, + GetDataSize: proc "system" (this: ^IAsynchronous) -> u32, } @@ -2048,7 +2048,7 @@ IQuery :: struct #raw_union { } IQuery_VTable :: struct { using id3d11asynchronous_vtable: IAsynchronous_VTable, - GetDesc: proc "stdcall" (this: ^IQuery, pDesc: ^QUERY_DESC), + GetDesc: proc "system" (this: ^IQuery, pDesc: ^QUERY_DESC), } @@ -2118,7 +2118,7 @@ ICounter :: struct #raw_union { } ICounter_VTable :: struct { using id3d11asynchronous_vtable: IAsynchronous_VTable, - GetDesc: proc "stdcall" (this: ^ICounter, pDesc: ^COUNTER_DESC), + GetDesc: proc "system" (this: ^ICounter, pDesc: ^COUNTER_DESC), } @@ -2152,10 +2152,10 @@ IClassInstance :: struct #raw_union { } 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), + GetClassLinkage: proc "system" (this: ^IClassInstance, ppLinkage: ^^IClassLinkage), + GetDesc: proc "system" (this: ^IClassInstance, pDesc: ^CLASS_INSTANCE_DESC), + GetInstanceName: proc "system" (this: ^IClassInstance, pInstanceName: cstring, pBufferLength: ^SIZE_T), + GetTypeName: proc "system" (this: ^IClassInstance, pTypeName: cstring, pBufferLength: ^SIZE_T), } @@ -2168,8 +2168,8 @@ IClassLinkage :: struct #raw_union { } 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, + GetClassInstance: proc "system" (this: ^IClassLinkage, pClassInstanceName: cstring, InstanceIndex: u32, ppInstance: ^^IClassInstance) -> HRESULT, + CreateClassInstance: proc "system" (this: ^IClassLinkage, pClassTypeName: cstring, ConstantBufferOffset: u32, ConstantVectorOffset: u32, TextureOffset: u32, SamplerOffset: u32, ppInstance: ^^IClassInstance) -> HRESULT, } @@ -2182,7 +2182,7 @@ ICommandList :: struct #raw_union { } ICommandList_VTable :: struct { using id3d11devicechild_vtable: IDeviceChild_VTable, - GetContextFlags: proc "stdcall" (this: ^ICommandList) -> u32, + GetContextFlags: proc "system" (this: ^ICommandList) -> u32, } @@ -2357,114 +2357,114 @@ IDeviceContext :: struct #raw_union { } 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: MAP_FLAGS, 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_FLAGS, 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: ^COLOR_WRITE_ENABLE_MASK), - 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, + VSSetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + PSSetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + PSSetShader: proc "system" (this: ^IDeviceContext, pPixelShader: ^IPixelShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32), + PSSetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + VSSetShader: proc "system" (this: ^IDeviceContext, pVertexShader: ^IVertexShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32), + DrawIndexed: proc "system" (this: ^IDeviceContext, IndexCount: u32, StartIndexLocation: u32, BaseVertexLocation: i32), + Draw: proc "system" (this: ^IDeviceContext, VertexCount: u32, StartVertexLocation: u32), + Map: proc "system" (this: ^IDeviceContext, pResource: ^IResource, Subresource: u32, MapType: MAP, MapFlags: MAP_FLAGS, pMappedResource: ^MAPPED_SUBRESOURCE) -> HRESULT, + Unmap: proc "system" (this: ^IDeviceContext, pResource: ^IResource, Subresource: u32), + PSSetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + IASetInputLayout: proc "system" (this: ^IDeviceContext, pInputLayout: ^IInputLayout), + IASetVertexBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppVertexBuffers: ^^IBuffer, pStrides: ^u32, pOffsets: ^u32), + IASetIndexBuffer: proc "system" (this: ^IDeviceContext, pIndexBuffer: ^IBuffer, Format: dxgi.FORMAT, Offset: u32), + DrawIndexedInstanced: proc "system" (this: ^IDeviceContext, IndexCountPerInstance: u32, InstanceCount: u32, StartIndexLocation: u32, BaseVertexLocation: i32, StartInstanceLocation: u32), + DrawInstanced: proc "system" (this: ^IDeviceContext, VertexCountPerInstance: u32, InstanceCount: u32, StartVertexLocation: u32, StartInstanceLocation: u32), + GSSetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + GSSetShader: proc "system" (this: ^IDeviceContext, pShader: ^IGeometryShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32), + IASetPrimitiveTopology: proc "system" (this: ^IDeviceContext, Topology: PRIMITIVE_TOPOLOGY), + VSSetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + VSSetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + Begin: proc "system" (this: ^IDeviceContext, pAsync: ^IAsynchronous), + End: proc "system" (this: ^IDeviceContext, pAsync: ^IAsynchronous), + GetData: proc "system" (this: ^IDeviceContext, pAsync: ^IAsynchronous, pData: rawptr, DataSize: u32, GetDataFlags: u32) -> HRESULT, + SetPredication: proc "system" (this: ^IDeviceContext, pPredicate: ^IPredicate, PredicateValue: BOOL), + GSSetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + GSSetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + OMSetRenderTargets: proc "system" (this: ^IDeviceContext, NumViews: u32, ppRenderTargetViews: ^^IRenderTargetView, pDepthStencilView: ^IDepthStencilView), + OMSetRenderTargetsAndUnorderedAccessViews: proc "system" (this: ^IDeviceContext, NumRTVs: u32, ppRenderTargetViews: ^^IRenderTargetView, pDepthStencilView: ^IDepthStencilView, UAVStartSlot: u32, NumUAVs: u32, ppUnorderedAccessViews: ^^IUnorderedAccessView, pUAVInitialCounts: ^u32), + OMSetBlendState: proc "system" (this: ^IDeviceContext, pBlendState: ^IBlendState, BlendFactor: ^[4]f32, SampleMask: u32), + OMSetDepthStencilState: proc "system" (this: ^IDeviceContext, pDepthStencilState: ^IDepthStencilState, StencilRef: u32), + SOSetTargets: proc "system" (this: ^IDeviceContext, NumBuffers: u32, ppSOTargets: ^^IBuffer, pOffsets: ^u32), + DrawAuto: proc "system" (this: ^IDeviceContext), + DrawIndexedInstancedIndirect: proc "system" (this: ^IDeviceContext, pBufferForArgs: ^IBuffer, AlignedByteOffsetForArgs: u32), + DrawInstancedIndirect: proc "system" (this: ^IDeviceContext, pBufferForArgs: ^IBuffer, AlignedByteOffsetForArgs: u32), + Dispatch: proc "system" (this: ^IDeviceContext, ThreadGroupCountX: u32, ThreadGroupCountY: u32, ThreadGroupCountZ: u32), + DispatchIndirect: proc "system" (this: ^IDeviceContext, pBufferForArgs: ^IBuffer, AlignedByteOffsetForArgs: u32), + RSSetState: proc "system" (this: ^IDeviceContext, pRasterizerState: ^IRasterizerState), + RSSetViewports: proc "system" (this: ^IDeviceContext, NumViewports: u32, pViewports: ^VIEWPORT), + RSSetScissorRects: proc "system" (this: ^IDeviceContext, NumRects: u32, pRects: ^RECT), + CopySubresourceRegion: proc "system" (this: ^IDeviceContext, pDstResource: ^IResource, DstSubresource: u32, DstX: u32, DstY: u32, DstZ: u32, pSrcResource: ^IResource, SrcSubresource: u32, pSrcBox: ^BOX), + CopyResource: proc "system" (this: ^IDeviceContext, pDstResource: ^IResource, pSrcResource: ^IResource), + UpdateSubresource: proc "system" (this: ^IDeviceContext, pDstResource: ^IResource, DstSubresource: u32, pDstBox: ^BOX, pSrcData: rawptr, SrcRowPitch: u32, SrcDepthPitch: u32), + CopyStructureCount: proc "system" (this: ^IDeviceContext, pDstBuffer: ^IBuffer, DstAlignedByteOffset: u32, pSrcView: ^IUnorderedAccessView), + ClearRenderTargetView: proc "system" (this: ^IDeviceContext, pRenderTargetView: ^IRenderTargetView, ColorRGBA: ^[4]f32), + ClearUnorderedAccessViewUint: proc "system" (this: ^IDeviceContext, pUnorderedAccessView: ^IUnorderedAccessView, Values: ^[4]u32), + ClearUnorderedAccessViewFloat: proc "system" (this: ^IDeviceContext, pUnorderedAccessView: ^IUnorderedAccessView, Values: ^[4]f32), + ClearDepthStencilView: proc "system" (this: ^IDeviceContext, pDepthStencilView: ^IDepthStencilView, ClearFlags: CLEAR_FLAGS, Depth: f32, Stencil: u8), + GenerateMips: proc "system" (this: ^IDeviceContext, pShaderResourceView: ^IShaderResourceView), + SetResourceMinLOD: proc "system" (this: ^IDeviceContext, pResource: ^IResource, MinLOD: f32), + GetResourceMinLOD: proc "system" (this: ^IDeviceContext, pResource: ^IResource) -> f32, + ResolveSubresource: proc "system" (this: ^IDeviceContext, pDstResource: ^IResource, DstSubresource: u32, pSrcResource: ^IResource, SrcSubresource: u32, Format: dxgi.FORMAT), + ExecuteCommandList: proc "system" (this: ^IDeviceContext, pCommandList: ^ICommandList, RestoreContextState: BOOL), + HSSetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + HSSetShader: proc "system" (this: ^IDeviceContext, pHullShader: ^IHullShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32), + HSSetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + HSSetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + DSSetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + DSSetShader: proc "system" (this: ^IDeviceContext, pDomainShader: ^IDomainShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32), + DSSetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + DSSetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + CSSetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + CSSetUnorderedAccessViews: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumUAVs: u32, ppUnorderedAccessViews: ^^IUnorderedAccessView, pUAVInitialCounts: ^u32), + CSSetShader: proc "system" (this: ^IDeviceContext, pComputeShader: ^IComputeShader, ppClassInstances: ^^IClassInstance, NumClassInstances: u32), + CSSetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + CSSetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + VSGetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + PSGetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + PSGetShader: proc "system" (this: ^IDeviceContext, ppPixelShader: ^^IPixelShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32), + PSGetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + VSGetShader: proc "system" (this: ^IDeviceContext, ppVertexShader: ^^IVertexShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32), + PSGetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + IAGetInputLayout: proc "system" (this: ^IDeviceContext, ppInputLayout: ^^IInputLayout), + IAGetVertexBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppVertexBuffers: ^^IBuffer, pStrides: ^u32, pOffsets: ^u32), + IAGetIndexBuffer: proc "system" (this: ^IDeviceContext, pIndexBuffer: ^^IBuffer, Format: ^dxgi.FORMAT, Offset: ^u32), + GSGetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + GSGetShader: proc "system" (this: ^IDeviceContext, ppGeometryShader: ^^IGeometryShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32), + IAGetPrimitiveTopology: proc "system" (this: ^IDeviceContext, pTopology: ^PRIMITIVE_TOPOLOGY), + VSGetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + VSGetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + GetPredication: proc "system" (this: ^IDeviceContext, ppPredicate: ^^IPredicate, pPredicateValue: ^BOOL), + GSGetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + GSGetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + OMGetRenderTargets: proc "system" (this: ^IDeviceContext, NumViews: u32, ppRenderTargetViews: ^^IRenderTargetView, ppDepthStencilView: ^^IDepthStencilView), + OMGetRenderTargetsAndUnorderedAccessViews: proc "system" (this: ^IDeviceContext, NumRTVs: u32, ppRenderTargetViews: ^^IRenderTargetView, ppDepthStencilView: ^^IDepthStencilView, UAVStartSlot: u32, NumUAVs: u32, ppUnorderedAccessViews: ^^IUnorderedAccessView), + OMGetBlendState: proc "system" (this: ^IDeviceContext, ppBlendState: ^^IBlendState, BlendFactor: ^[4]f32, pSampleMask: ^COLOR_WRITE_ENABLE_MASK), + OMGetDepthStencilState: proc "system" (this: ^IDeviceContext, ppDepthStencilState: ^^IDepthStencilState, pStencilRef: ^u32), + SOGetTargets: proc "system" (this: ^IDeviceContext, NumBuffers: u32, ppSOTargets: ^^IBuffer), + RSGetState: proc "system" (this: ^IDeviceContext, ppRasterizerState: ^^IRasterizerState), + RSGetViewports: proc "system" (this: ^IDeviceContext, pNumViewports: ^u32, pViewports: ^VIEWPORT), + RSGetScissorRects: proc "system" (this: ^IDeviceContext, pNumRects: ^u32, pRects: ^RECT), + HSGetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + HSGetShader: proc "system" (this: ^IDeviceContext, ppHullShader: ^^IHullShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32), + HSGetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + HSGetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + DSGetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + DSGetShader: proc "system" (this: ^IDeviceContext, ppDomainShader: ^^IDomainShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32), + DSGetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + DSGetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + CSGetShaderResources: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumViews: u32, ppShaderResourceViews: ^^IShaderResourceView), + CSGetUnorderedAccessViews: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumUAVs: u32, ppUnorderedAccessViews: ^^IUnorderedAccessView), + CSGetShader: proc "system" (this: ^IDeviceContext, ppComputeShader: ^^IComputeShader, ppClassInstances: ^^IClassInstance, pNumClassInstances: ^u32), + CSGetSamplers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumSamplers: u32, ppSamplers: ^^ISamplerState), + CSGetConstantBuffers: proc "system" (this: ^IDeviceContext, StartSlot: u32, NumBuffers: u32, ppConstantBuffers: ^^IBuffer), + ClearState: proc "system" (this: ^IDeviceContext), + Flush: proc "system" (this: ^IDeviceContext), + GetType: proc "system" (this: ^IDeviceContext) -> DEVICE_CONTEXT_TYPE, + GetContextFlags: proc "system" (this: ^IDeviceContext) -> u32, + FinishCommandList: proc "system" (this: ^IDeviceContext, RestoreDeferredContextState: BOOL, ppCommandList: ^^ICommandList) -> HRESULT, } @@ -2565,8 +2565,8 @@ IVideoDecoder :: struct #raw_union { } 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, + GetCreationParameters: proc "system" (this: ^IVideoDecoder, pVideoDesc: ^VIDEO_DECODER_DESC, pConfig: ^VIDEO_DECODER_CONFIG) -> HRESULT, + GetDriverHandle: proc "system" (this: ^IVideoDecoder, pDriverHandle: ^HANDLE) -> HRESULT, } @@ -2761,12 +2761,12 @@ IVideoProcessorEnumerator :: struct #raw_union { } 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, + GetVideoProcessorContentDesc: proc "system" (this: ^IVideoProcessorEnumerator, pContentDesc: ^VIDEO_PROCESSOR_CONTENT_DESC) -> HRESULT, + CheckVideoProcessorFormat: proc "system" (this: ^IVideoProcessorEnumerator, Format: dxgi.FORMAT, pFlags: ^u32) -> HRESULT, + GetVideoProcessorCaps: proc "system" (this: ^IVideoProcessorEnumerator, pCaps: ^VIDEO_PROCESSOR_CAPS) -> HRESULT, + GetVideoProcessorRateConversionCaps: proc "system" (this: ^IVideoProcessorEnumerator, TypeIndex: u32, pCaps: ^VIDEO_PROCESSOR_RATE_CONVERSION_CAPS) -> HRESULT, + GetVideoProcessorCustomRate: proc "system" (this: ^IVideoProcessorEnumerator, TypeIndex: u32, CustomRateIndex: u32, pRate: ^VIDEO_PROCESSOR_CUSTOM_RATE) -> HRESULT, + GetVideoProcessorFilterRange: proc "system" (this: ^IVideoProcessorEnumerator, Filter: VIDEO_PROCESSOR_FILTER, pRange: ^VIDEO_PROCESSOR_FILTER_RANGE) -> HRESULT, } @@ -2872,8 +2872,8 @@ IVideoProcessor :: struct #raw_union { } 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), + GetContentDesc: proc "system" (this: ^IVideoProcessor, pDesc: ^VIDEO_PROCESSOR_CONTENT_DESC), + GetRateConversionCaps: proc "system" (this: ^IVideoProcessor, pCaps: ^VIDEO_PROCESSOR_RATE_CONVERSION_CAPS), } @@ -2896,9 +2896,9 @@ IAuthenticatedChannel :: struct #raw_union { } 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), + GetCertificateSize: proc "system" (this: ^IAuthenticatedChannel, pCertificateSize: ^u32) -> HRESULT, + GetCertificate: proc "system" (this: ^IAuthenticatedChannel, CertificateSize: u32, pCertificate: cstring) -> HRESULT, + GetChannelHandle: proc "system" (this: ^IAuthenticatedChannel, pChannelHandle: ^HANDLE), } @@ -3105,11 +3105,11 @@ ICryptoSession :: struct #raw_union { } 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), + GetCryptoType: proc "system" (this: ^ICryptoSession, pCryptoType: ^GUID), + GetDecoderProfile: proc "system" (this: ^ICryptoSession, pDecoderProfile: ^GUID), + GetCertificateSize: proc "system" (this: ^ICryptoSession, pCertificateSize: ^u32) -> HRESULT, + GetCertificate: proc "system" (this: ^ICryptoSession, CertificateSize: u32, pCertificate: cstring) -> HRESULT, + GetCryptoSessionHandle: proc "system" (this: ^ICryptoSession, pCryptoSessionHandle: ^HANDLE), } @@ -3139,7 +3139,7 @@ IVideoDecoderOutputView :: struct #raw_union { } IVideoDecoderOutputView_VTable :: struct { using id3d11view_vtable: IView_VTable, - GetDesc: proc "stdcall" (this: ^IVideoDecoderOutputView, pDesc: ^VIDEO_DECODER_OUTPUT_VIEW_DESC), + GetDesc: proc "system" (this: ^IVideoDecoderOutputView, pDesc: ^VIDEO_DECODER_OUTPUT_VIEW_DESC), } @@ -3170,7 +3170,7 @@ IVideoProcessorInputView :: struct #raw_union { } IVideoProcessorInputView_VTable :: struct { using id3d11view_vtable: IView_VTable, - GetDesc: proc "stdcall" (this: ^IVideoProcessorInputView, pDesc: ^VIDEO_PROCESSOR_INPUT_VIEW_DESC), + GetDesc: proc "system" (this: ^IVideoProcessorInputView, pDesc: ^VIDEO_PROCESSOR_INPUT_VIEW_DESC), } @@ -3207,7 +3207,7 @@ IVideoProcessorOutputView :: struct #raw_union { } IVideoProcessorOutputView_VTable :: struct { using id3d11view_vtable: IView_VTable, - GetDesc: proc "stdcall" (this: ^IVideoProcessorOutputView, pDesc: ^VIDEO_PROCESSOR_OUTPUT_VIEW_DESC), + GetDesc: proc "system" (this: ^IVideoProcessorOutputView, pDesc: ^VIDEO_PROCESSOR_OUTPUT_VIEW_DESC), } @@ -3220,64 +3220,64 @@ IVideoContext :: struct #raw_union { } 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), + GetDecoderBuffer: proc "system" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, Type: VIDEO_DECODER_BUFFER_TYPE, pBufferSize: ^u32, ppBuffer: ^rawptr) -> HRESULT, + ReleaseDecoderBuffer: proc "system" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, Type: VIDEO_DECODER_BUFFER_TYPE) -> HRESULT, + DecoderBeginFrame: proc "system" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, pView: ^IVideoDecoderOutputView, ContentKeySize: u32, pContentKey: rawptr) -> HRESULT, + DecoderEndFrame: proc "system" (this: ^IVideoContext, pDecoder: ^IVideoDecoder) -> HRESULT, + SubmitDecoderBuffers: proc "system" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, NumBuffers: u32, pBufferDesc: ^VIDEO_DECODER_BUFFER_DESC) -> HRESULT, + DecoderExtension: proc "system" (this: ^IVideoContext, pDecoder: ^IVideoDecoder, pExtensionData: ^VIDEO_DECODER_EXTENSION) -> APP_DEPRECATED_HRESULT, + VideoProcessorSetOutputTargetRect: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, Enable: BOOL, pRect: ^RECT), + VideoProcessorSetOutputBackgroundColor: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, YCbCr: BOOL, pColor: ^VIDEO_COLOR), + VideoProcessorSetOutputColorSpace: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pColorSpace: ^VIDEO_PROCESSOR_COLOR_SPACE), + VideoProcessorSetOutputAlphaFillMode: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, AlphaFillMode: VIDEO_PROCESSOR_ALPHA_FILL_MODE, StreamIndex: u32), + VideoProcessorSetOutputConstriction: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, Enable: BOOL, Size: SIZE), + VideoProcessorSetOutputStereoMode: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, Enable: BOOL), + VideoProcessorSetOutputExtension: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pExtensionGuid: ^GUID, DataSize: u32, pData: rawptr) -> APP_DEPRECATED_HRESULT, + VideoProcessorGetOutputTargetRect: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, Enabled: ^BOOL, pRect: ^RECT), + VideoProcessorGetOutputBackgroundColor: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pYCbCr: ^BOOL, pColor: ^VIDEO_COLOR), + VideoProcessorGetOutputColorSpace: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pColorSpace: ^VIDEO_PROCESSOR_COLOR_SPACE), + VideoProcessorGetOutputAlphaFillMode: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pAlphaFillMode: ^VIDEO_PROCESSOR_ALPHA_FILL_MODE, pStreamIndex: ^u32), + VideoProcessorGetOutputConstriction: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pEnabled: ^BOOL, pSize: ^SIZE), + VideoProcessorGetOutputStereoMode: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pEnabled: ^BOOL), + VideoProcessorGetOutputExtension: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pExtensionGuid: ^GUID, DataSize: u32, pData: rawptr) -> APP_DEPRECATED_HRESULT, + VideoProcessorSetStreamFrameFormat: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, FrameFormat: VIDEO_FRAME_FORMAT), + VideoProcessorSetStreamColorSpace: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pColorSpace: ^VIDEO_PROCESSOR_COLOR_SPACE), + VideoProcessorSetStreamOutputRate: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, OutputRate: VIDEO_PROCESSOR_OUTPUT_RATE, RepeatFrame: BOOL, pCustomRate: ^dxgi.RATIONAL), + VideoProcessorSetStreamSourceRect: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, pRect: ^RECT), + VideoProcessorSetStreamDestRect: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, pRect: ^RECT), + VideoProcessorSetStreamAlpha: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, Alpha: f32), + VideoProcessorSetStreamPalette: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Count: u32, pEntries: ^u32), + VideoProcessorSetStreamPixelAspectRatio: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, pSourceAspectRatio: ^dxgi.RATIONAL, pDestinationAspectRatio: ^dxgi.RATIONAL), + VideoProcessorSetStreamLumaKey: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, Lower: f32, Upper: f32), + VideoProcessorSetStreamStereoFormat: proc "system" (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 "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL), + VideoProcessorSetStreamFilter: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Filter: VIDEO_PROCESSOR_FILTER, Enable: BOOL, Level: i32), + VideoProcessorSetStreamExtension: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pExtensionGuid: ^GUID, DataSize: u32, pData: rawptr) -> APP_DEPRECATED_HRESULT, + VideoProcessorGetStreamFrameFormat: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pFrameFormat: ^VIDEO_FRAME_FORMAT), + VideoProcessorGetStreamColorSpace: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pColorSpace: ^VIDEO_PROCESSOR_COLOR_SPACE), + VideoProcessorGetStreamOutputRate: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pOutputRate: ^VIDEO_PROCESSOR_OUTPUT_RATE, pRepeatFrame: ^BOOL, pCustomRate: ^dxgi.RATIONAL), + VideoProcessorGetStreamSourceRect: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pRect: ^RECT), + VideoProcessorGetStreamDestRect: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pRect: ^RECT), + VideoProcessorGetStreamAlpha: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pAlpha: ^f32), + VideoProcessorGetStreamPalette: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Count: u32, pEntries: ^u32), + VideoProcessorGetStreamPixelAspectRatio: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pSourceAspectRatio: ^dxgi.RATIONAL, pDestinationAspectRatio: ^dxgi.RATIONAL), + VideoProcessorGetStreamLumaKey: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL, pLower: ^f32, pUpper: ^f32), + VideoProcessorGetStreamStereoFormat: proc "system" (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 "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnabled: ^BOOL), + VideoProcessorGetStreamFilter: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Filter: VIDEO_PROCESSOR_FILTER, pEnabled: ^BOOL, pLevel: ^i32), + VideoProcessorGetStreamExtension: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pExtensionGuid: ^GUID, DataSize: u32, pData: rawptr) -> APP_DEPRECATED_HRESULT, + VideoProcessorBlt: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, pView: ^IVideoProcessorOutputView, OutputFrame: u32, StreamCount: u32, pStreams: ^VIDEO_PROCESSOR_STREAM) -> HRESULT, + NegotiateCryptoSessionKeyExchange: proc "system" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, DataSize: u32, pData: rawptr) -> HRESULT, + EncryptionBlt: proc "system" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, pSrcSurface: ^ITexture2D, pDstSurface: ^ITexture2D, IVSize: u32, pIV: rawptr), + DecryptionBlt: proc "system" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, pSrcSurface: ^ITexture2D, pDstSurface: ^ITexture2D, pEncryptedBlockInfo: ^ENCRYPTED_BLOCK_INFO, ContentKeySize: u32, pContentKey: rawptr, IVSize: u32, pIV: rawptr), + StartSessionKeyRefresh: proc "system" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, RandomNumberSize: u32, pRandomNumber: rawptr), + FinishSessionKeyRefresh: proc "system" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession), + GetEncryptionBltKey: proc "system" (this: ^IVideoContext, pCryptoSession: ^ICryptoSession, KeySize: u32, pReadbackKey: rawptr) -> HRESULT, + NegotiateAuthenticatedChannelKeyExchange: proc "system" (this: ^IVideoContext, pChannel: ^IAuthenticatedChannel, DataSize: u32, pData: rawptr) -> HRESULT, + QueryAuthenticatedChannel: proc "system" (this: ^IVideoContext, pChannel: ^IAuthenticatedChannel, InputSize: u32, pInput: rawptr, OutputSize: u32, pOutput: rawptr) -> HRESULT, + ConfigureAuthenticatedChannel: proc "system" (this: ^IVideoContext, pChannel: ^IAuthenticatedChannel, InputSize: u32, pInput: rawptr, pOutput: ^AUTHENTICATED_CONFIGURE_OUTPUT) -> HRESULT, + VideoProcessorSetStreamRotation: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, Enable: BOOL, Rotation: VIDEO_PROCESSOR_ROTATION), + VideoProcessorGetStreamRotation: proc "system" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnable: ^BOOL, pRotation: ^VIDEO_PROCESSOR_ROTATION), } @@ -3290,23 +3290,23 @@ IVideoDevice :: struct #raw_union { } 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, + CreateVideoDecoder: proc "system" (this: ^IVideoDevice, pVideoDesc: ^VIDEO_DECODER_DESC, pConfig: ^VIDEO_DECODER_CONFIG, ppDecoder: ^^IVideoDecoder) -> HRESULT, + CreateVideoProcessor: proc "system" (this: ^IVideoDevice, pEnum: ^IVideoProcessorEnumerator, RateConversionIndex: u32, ppVideoProcessor: ^^IVideoProcessor) -> HRESULT, + CreateAuthenticatedChannel: proc "system" (this: ^IVideoDevice, ChannelType: AUTHENTICATED_CHANNEL_TYPE, ppAuthenticatedChannel: ^^IAuthenticatedChannel) -> HRESULT, + CreateCryptoSession: proc "system" (this: ^IVideoDevice, pCryptoType: ^GUID, pDecoderProfile: ^GUID, pKeyExchangeType: ^GUID, ppCryptoSession: ^^ICryptoSession) -> HRESULT, + CreateVideoDecoderOutputView: proc "system" (this: ^IVideoDevice, pResource: ^IResource, pDesc: ^VIDEO_DECODER_OUTPUT_VIEW_DESC, ppVDOVView: ^^IVideoDecoderOutputView) -> HRESULT, + CreateVideoProcessorInputView: proc "system" (this: ^IVideoDevice, pResource: ^IResource, pEnum: ^IVideoProcessorEnumerator, pDesc: ^VIDEO_PROCESSOR_INPUT_VIEW_DESC, ppVPIView: ^^IVideoProcessorInputView) -> HRESULT, + CreateVideoProcessorOutputView: proc "system" (this: ^IVideoDevice, pResource: ^IResource, pEnum: ^IVideoProcessorEnumerator, pDesc: ^VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, ppVPOView: ^^IVideoProcessorOutputView) -> HRESULT, + CreateVideoProcessorEnumerator: proc "system" (this: ^IVideoDevice, pDesc: ^VIDEO_PROCESSOR_CONTENT_DESC, ppEnum: ^^IVideoProcessorEnumerator) -> HRESULT, + GetVideoDecoderProfileCount: proc "system" (this: ^IVideoDevice) -> u32, + GetVideoDecoderProfile: proc "system" (this: ^IVideoDevice, Index: u32, pDecoderProfile: ^GUID) -> HRESULT, + CheckVideoDecoderFormat: proc "system" (this: ^IVideoDevice, pDecoderProfile: ^GUID, Format: dxgi.FORMAT, pSupported: ^BOOL) -> HRESULT, + GetVideoDecoderConfigCount: proc "system" (this: ^IVideoDevice, pDesc: ^VIDEO_DECODER_DESC, pCount: ^u32) -> HRESULT, + GetVideoDecoderConfig: proc "system" (this: ^IVideoDevice, pDesc: ^VIDEO_DECODER_DESC, Index: u32, pConfig: ^VIDEO_DECODER_CONFIG) -> HRESULT, + GetContentProtectionCaps: proc "system" (this: ^IVideoDevice, pCryptoType: ^GUID, pDecoderProfile: ^GUID, pCaps: ^VIDEO_CONTENT_PROTECTION_CAPS) -> HRESULT, + CheckCryptoKeyExchange: proc "system" (this: ^IVideoDevice, pCryptoType: ^GUID, pDecoderProfile: ^GUID, Index: u32, pKeyExchangeType: ^GUID) -> HRESULT, + SetPrivateData: proc "system" (this: ^IVideoDevice, guid: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT, + SetPrivateDataInterface: proc "system" (this: ^IVideoDevice, guid: ^GUID, pData: ^IUnknown) -> HRESULT, } @@ -3319,46 +3319,46 @@ IDevice :: struct #raw_union { } 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: RAISE_FLAGS) -> HRESULT, - GetExceptionMode: proc "stdcall" (this: ^IDevice) -> u32, + CreateBuffer: proc "system" (this: ^IDevice, pDesc: ^BUFFER_DESC, pInitialData: ^SUBRESOURCE_DATA, ppBuffer: ^^IBuffer) -> HRESULT, + CreateTexture1D: proc "system" (this: ^IDevice, pDesc: ^TEXTURE1D_DESC, pInitialData: ^SUBRESOURCE_DATA, ppTexture1D: ^^ITexture1D) -> HRESULT, + CreateTexture2D: proc "system" (this: ^IDevice, pDesc: ^TEXTURE2D_DESC, pInitialData: ^SUBRESOURCE_DATA, ppTexture2D: ^^ITexture2D) -> HRESULT, + CreateTexture3D: proc "system" (this: ^IDevice, pDesc: ^TEXTURE3D_DESC, pInitialData: ^SUBRESOURCE_DATA, ppTexture3D: ^^ITexture3D) -> HRESULT, + CreateShaderResourceView: proc "system" (this: ^IDevice, pResource: ^IResource, pDesc: ^SHADER_RESOURCE_VIEW_DESC, ppSRView: ^^IShaderResourceView) -> HRESULT, + CreateUnorderedAccessView: proc "system" (this: ^IDevice, pResource: ^IResource, pDesc: ^UNORDERED_ACCESS_VIEW_DESC, ppUAView: ^^IUnorderedAccessView) -> HRESULT, + CreateRenderTargetView: proc "system" (this: ^IDevice, pResource: ^IResource, pDesc: ^RENDER_TARGET_VIEW_DESC, ppRTView: ^^IRenderTargetView) -> HRESULT, + CreateDepthStencilView: proc "system" (this: ^IDevice, pResource: ^IResource, pDesc: ^DEPTH_STENCIL_VIEW_DESC, ppDepthStencilView: ^^IDepthStencilView) -> HRESULT, + CreateInputLayout: proc "system" (this: ^IDevice, pInputElementDescs: ^INPUT_ELEMENT_DESC, NumElements: u32, pShaderBytecodeWithInputSignature: rawptr, BytecodeLength: SIZE_T, ppInputLayout: ^^IInputLayout) -> HRESULT, + CreateVertexShader: proc "system" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppVertexShader: ^^IVertexShader) -> HRESULT, + CreateGeometryShader: proc "system" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppGeometryShader: ^^IGeometryShader) -> HRESULT, + CreateGeometryShaderWithStreamOutput: proc "system" (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 "system" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppPixelShader: ^^IPixelShader) -> HRESULT, + CreateHullShader: proc "system" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppHullShader: ^^IHullShader) -> HRESULT, + CreateDomainShader: proc "system" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppDomainShader: ^^IDomainShader) -> HRESULT, + CreateComputeShader: proc "system" (this: ^IDevice, pShaderBytecode: rawptr, BytecodeLength: SIZE_T, pClassLinkage: ^IClassLinkage, ppComputeShader: ^^IComputeShader) -> HRESULT, + CreateClassLinkage: proc "system" (this: ^IDevice, ppLinkage: ^^IClassLinkage) -> HRESULT, + CreateBlendState: proc "system" (this: ^IDevice, pBlendStateDesc: ^BLEND_DESC, ppBlendState: ^^IBlendState) -> HRESULT, + CreateDepthStencilState: proc "system" (this: ^IDevice, pDepthStencilDesc: ^DEPTH_STENCIL_DESC, ppDepthStencilState: ^^IDepthStencilState) -> HRESULT, + CreateRasterizerState: proc "system" (this: ^IDevice, pRasterizerDesc: ^RASTERIZER_DESC, ppRasterizerState: ^^IRasterizerState) -> HRESULT, + CreateSamplerState: proc "system" (this: ^IDevice, pSamplerDesc: ^SAMPLER_DESC, ppSamplerState: ^^ISamplerState) -> HRESULT, + CreateQuery: proc "system" (this: ^IDevice, pQueryDesc: ^QUERY_DESC, ppQuery: ^^IQuery) -> HRESULT, + CreatePredicate: proc "system" (this: ^IDevice, pPredicateDesc: ^QUERY_DESC, ppPredicate: ^^IPredicate) -> HRESULT, + CreateCounter: proc "system" (this: ^IDevice, pCounterDesc: ^COUNTER_DESC, ppCounter: ^^ICounter) -> HRESULT, + CreateDeferredContext: proc "system" (this: ^IDevice, ContextFlags: u32, ppDeferredContext: ^^IDeviceContext) -> HRESULT, + OpenSharedResource: proc "system" (this: ^IDevice, hResource: HANDLE, ReturnedInterface: ^IID, ppResource: ^rawptr) -> HRESULT, + CheckFormatSupport: proc "system" (this: ^IDevice, Format: dxgi.FORMAT, pFormatSupport: ^u32) -> HRESULT, + CheckMultisampleQualityLevels: proc "system" (this: ^IDevice, Format: dxgi.FORMAT, SampleCount: u32, pNumQualityLevels: ^u32) -> HRESULT, + CheckCounterInfo: proc "system" (this: ^IDevice, pCounterInfo: ^COUNTER_INFO), + CheckCounter: proc "system" (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 "system" (this: ^IDevice, Feature: FEATURE, pFeatureSupportData: rawptr, FeatureSupportDataSize: u32) -> HRESULT, + GetPrivateData: proc "system" (this: ^IDevice, guid: ^GUID, pDataSize: ^u32, pData: rawptr) -> HRESULT, + SetPrivateData: proc "system" (this: ^IDevice, guid: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT, + SetPrivateDataInterface: proc "system" (this: ^IDevice, guid: ^GUID, pData: ^IUnknown) -> HRESULT, + GetFeatureLevel: proc "system" (this: ^IDevice) -> FEATURE_LEVEL, + GetCreationFlags: proc "system" (this: ^IDevice) -> u32, + GetDeviceRemovedReason: proc "system" (this: ^IDevice) -> HRESULT, + GetImmediateContext: proc "system" (this: ^IDevice, ppImmediateContext: ^^IDeviceContext), + SetExceptionMode: proc "system" (this: ^IDevice, RaiseFlags: RAISE_FLAGS) -> HRESULT, + GetExceptionMode: proc "system" (this: ^IDevice) -> u32, } @@ -3558,17 +3558,17 @@ 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, + GetDesc: proc "system" (this: ^IShaderReflectionType, pDesc: ^SHADER_TYPE_DESC) -> HRESULT, + GetMemberTypeByIndex: proc "system" (this: ^IShaderReflectionType, Index: u32) -> ^IShaderReflectionType, + GetMemberTypeByName: proc "system" (this: ^IShaderReflectionType, Name: cstring) -> ^IShaderReflectionType, + GetMemberTypeName: proc "system" (this: ^IShaderReflectionType, Index: u32) -> cstring, + IsEqual: proc "system" (this: ^IShaderReflectionType, pType: ^IShaderReflectionType) -> HRESULT, + GetSubType: proc "system" (this: ^IShaderReflectionType) -> ^IShaderReflectionType, + GetBaseClass: proc "system" (this: ^IShaderReflectionType) -> ^IShaderReflectionType, + GetNumInterfaces: proc "system" (this: ^IShaderReflectionType) -> u32, + GetInterfaceByIndex: proc "system" (this: ^IShaderReflectionType, uIndex: u32) -> ^IShaderReflectionType, + IsOfType: proc "system" (this: ^IShaderReflectionType, pType: ^IShaderReflectionType) -> HRESULT, + ImplementsInterface: proc "system" (this: ^IShaderReflectionType, pBase: ^IShaderReflectionType) -> HRESULT, } ID3D11ShaderReflectionVariable_UUID_STRING :: "51F23923-F3E5-4BD1-91CB-606177D8DB4C" @@ -3577,10 +3577,10 @@ 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, + GetDesc: proc "system" (this: ^IShaderReflectionVariable, pDesc: ^SHADER_VARIABLE_DESC) -> HRESULT, + GetType: proc "system" (this: ^IShaderReflectionVariable) -> ^IShaderReflectionType, + GetBuffer: proc "system" (this: ^IShaderReflectionVariable) -> ^IShaderReflectionConstantBuffer, + GetInterfaceSlot: proc "system" (this: ^IShaderReflectionVariable, uArrayIndex: u32) -> u32, } ID3D11ShaderReflectionConstantBuffer_UUID_STRING :: "EB62D63D-93DD-4318-8AE8-C6F83AD371B8" @@ -3589,9 +3589,9 @@ 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, + GetDesc: proc "system" (this: ^IShaderReflectionConstantBuffer, pDesc: ^SHADER_BUFFER_DESC) -> HRESULT, + GetVariableByIndex: proc "system" (this: ^IShaderReflectionConstantBuffer, Index: u32) -> ^IShaderReflectionVariable, + GetVariableByName: proc "system" (this: ^IShaderReflectionConstantBuffer, Name: cstring) -> ^IShaderReflectionVariable, } @@ -3603,25 +3603,25 @@ IShaderReflection :: struct #raw_union { } 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) -> SHADER_REQUIRES_FLAGS, + GetDesc: proc "system" (this: ^IShaderReflection, pDesc: ^SHADER_DESC) -> HRESULT, + GetConstantBufferByIndex: proc "system" (this: ^IShaderReflection, Index: u32) -> ^IShaderReflectionConstantBuffer, + GetConstantBufferByName: proc "system" (this: ^IShaderReflection, Name: cstring) -> ^IShaderReflectionConstantBuffer, + GetResourceBindingDesc: proc "system" (this: ^IShaderReflection, ResourceIndex: u32, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT, + GetInputParameterDesc: proc "system" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT, + GetOutputParameterDesc: proc "system" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT, + GetPatchConstantParameterDesc: proc "system" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT, + GetVariableByName: proc "system" (this: ^IShaderReflection, Name: cstring) -> ^IShaderReflectionVariable, + GetResourceBindingDescByName: proc "system" (this: ^IShaderReflection, Name: cstring, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT, + GetMovInstructionCount: proc "system" (this: ^IShaderReflection) -> u32, + GetMovcInstructionCount: proc "system" (this: ^IShaderReflection) -> u32, + GetConversionInstructionCount: proc "system" (this: ^IShaderReflection) -> u32, + GetBitwiseInstructionCount: proc "system" (this: ^IShaderReflection) -> u32, + GetGSInputPrimitive: proc "system" (this: ^IShaderReflection) -> PRIMITIVE, + IsSampleFrequencyShader: proc "system" (this: ^IShaderReflection) -> BOOL, + GetNumInterfaceSlots: proc "system" (this: ^IShaderReflection) -> u32, + GetMinFeatureLevel: proc "system" (this: ^IShaderReflection, pLevel: ^FEATURE_LEVEL) -> HRESULT, + GetThreadGroupSize: proc "system" (this: ^IShaderReflection, pSizeX: ^u32, pSizeY: ^u32, pSizeZ: ^u32) -> u32, + GetRequiresFlags: proc "system" (this: ^IShaderReflection) -> SHADER_REQUIRES_FLAGS, } @@ -3633,8 +3633,8 @@ ILibraryReflection :: struct #raw_union { } 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, + GetDesc: proc "system" (this: ^ILibraryReflection, pDesc: ^LIBRARY_DESC) -> HRESULT, + GetFunctionByIndex: proc "system" (this: ^ILibraryReflection, FunctionIndex: i32) -> ^IFunctionReflection, } ID3D11FunctionReflection_UUID_STRING :: "207BCECB-D683-4A06-A8A3-9B149B9F73A4" @@ -3643,13 +3643,13 @@ 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, + GetDesc: proc "system" (this: ^IFunctionReflection, pDesc: ^FUNCTION_DESC) -> HRESULT, + GetConstantBufferByIndex: proc "system" (this: ^IFunctionReflection, BufferIndex: u32) -> ^IShaderReflectionConstantBuffer, + GetConstantBufferByName: proc "system" (this: ^IFunctionReflection, Name: cstring) -> ^IShaderReflectionConstantBuffer, + GetResourceBindingDesc: proc "system" (this: ^IFunctionReflection, ResourceIndex: u32, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT, + GetVariableByName: proc "system" (this: ^IFunctionReflection, Name: cstring) -> ^IShaderReflectionVariable, + GetResourceBindingDescByName: proc "system" (this: ^IFunctionReflection, Name: cstring, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT, + GetFunctionParameter: proc "system" (this: ^IFunctionReflection, ParameterIndex: i32) -> ^IFunctionParameterReflection, } ID3D11FunctionParameterReflection_UUID_STRING :: "42757488-334F-47FE-982E-1A65D08CC462" @@ -3658,7 +3658,7 @@ IFunctionParameterReflection :: struct { using vtable: ^IFunctionParameterReflection_VTable, } IFunctionParameterReflection_VTable :: struct { - GetDesc: proc "stdcall" (this: ^IFunctionParameterReflection, pDesc: ^PARAMETER_DESC) -> HRESULT, + GetDesc: proc "system" (this: ^IFunctionParameterReflection, pDesc: ^PARAMETER_DESC) -> HRESULT, } @@ -3672,14 +3672,14 @@ IFunctionLinkingGraph :: struct #raw_union { } 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, + CreateModuleInstance: proc "system" (this: ^IFunctionLinkingGraph, ppModuleInstance: ^^IModuleInstance, ppErrorBuffer: ^^IBlob) -> HRESULT, + SetInputSignature: proc "system" (this: ^IFunctionLinkingGraph, pInputParameters: ^PARAMETER_DESC, cInputParameters: u32, ppInputNode: ^^ILinkingNode) -> HRESULT, + SetOutputSignature: proc "system" (this: ^IFunctionLinkingGraph, pOutputParameters: ^PARAMETER_DESC, cOutputParameters: u32, ppOutputNode: ^^ILinkingNode) -> HRESULT, + CallFunction: proc "system" (this: ^IFunctionLinkingGraph, pModuleInstanceNamespace: cstring, pModuleWithFunctionPrototype: ^IModule, pFunctionName: cstring, ppCallNode: ^^ILinkingNode) -> HRESULT, + PassValue: proc "system" (this: ^IFunctionLinkingGraph, pSrcNode: ^ILinkingNode, SrcParameterIndex: i32, pDstNode: ^ILinkingNode, DstParameterIndex: i32) -> HRESULT, + PassValueWithSwizzle: proc "system" (this: ^IFunctionLinkingGraph, pSrcNode: ^ILinkingNode, SrcParameterIndex: i32, pSrcSwizzle: ^u8, pDstNode: ^ILinkingNode, DstParameterIndex: i32, pDstSwizzle: ^u8) -> HRESULT, + GetLastError: proc "system" (this: ^IFunctionLinkingGraph, ppErrorBuffer: ^^IBlob) -> HRESULT, + GenerateHlsl: proc "system" (this: ^IFunctionLinkingGraph, uFlags: u32, ppBuffer: ^^IBlob) -> HRESULT, } IDebug_UUID_STRING :: "79CF2233-7536-4948-9D36-1E4692DC5760" @@ -3706,15 +3706,15 @@ DEBUG_FEATURE :: enum u32 { IDebug_VTable :: struct { using iunkown_vtable: IUnknown_VTable, - SetFeatureMask: proc "stdcall" (this: ^IDebug, mask: DEBUG_FEATURES) -> HRESULT, - GetFeatureMask: proc "stdcall" (this: ^IDebug) -> DEBUG_FEATURES, - SetPresentPerRenderOpDelay: proc "stdcall" (this: ^IDebug, Milliseconds: u32) -> HRESULT, - GetPresentPerRenderOpDelay: proc "stdcall" (this: ^IDebug) -> u32, - SetSwapChain: proc "stdcall" (this: ^IDebug, pSwapChain: ^dxgi.ISwapChain) -> HRESULT, - GetSwapChain: proc "stdcall" (this: ^IDebug, ppSwapChain: ^^dxgi.ISwapChain) -> HRESULT, - ValidateContext: proc "stdcall" (this: ^IDebug, pContext: ^IDeviceContext) -> HRESULT, - ReportLiveDeviceObjects: proc "stdcall" (this: ^IDebug, Flags: RLDO_FLAGS) -> HRESULT, - ValidateContextForDispatch: proc "stdcall" (this: ^IDebug, pContext: ^IDeviceContext) -> HRESULT, + SetFeatureMask: proc "system" (this: ^IDebug, mask: DEBUG_FEATURES) -> HRESULT, + GetFeatureMask: proc "system" (this: ^IDebug) -> DEBUG_FEATURES, + SetPresentPerRenderOpDelay: proc "system" (this: ^IDebug, Milliseconds: u32) -> HRESULT, + GetPresentPerRenderOpDelay: proc "system" (this: ^IDebug) -> u32, + SetSwapChain: proc "system" (this: ^IDebug, pSwapChain: ^dxgi.ISwapChain) -> HRESULT, + GetSwapChain: proc "system" (this: ^IDebug, ppSwapChain: ^^dxgi.ISwapChain) -> HRESULT, + ValidateContext: proc "system" (this: ^IDebug, pContext: ^IDeviceContext) -> HRESULT, + ReportLiveDeviceObjects: proc "system" (this: ^IDebug, Flags: RLDO_FLAGS) -> HRESULT, + ValidateContextForDispatch: proc "system" (this: ^IDebug, pContext: ^IDeviceContext) -> HRESULT, } IInfoQueue_UUID_STRING :: "6543DBB6-1B48-42F5-AB82-E97EC74326F6" @@ -3773,39 +3773,39 @@ MESSAGE :: struct { IInfoQueue_VTable :: struct { using iunkown_vtable: IUnknown_VTable, - AddApplicationMessage: proc "stdcall" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY, pDescription: cstring) -> HRESULT, - AddMessage: proc "stdcall" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY, Severity: MESSAGE_SEVERITY, ID: MESSAGE_ID, pDescription: cstring) -> HRESULT, - AddRetrievalFilterEntries: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, - AddStorageFilterEntries: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, - ClearRetrievalFilter: proc "stdcall" (this: ^IInfoQueue), - ClearStorageFilter: proc "stdcall" (this: ^IInfoQueue), - ClearStoredMessages: proc "stdcall" (this: ^IInfoQueue), - GetBreakOnCategory: proc "stdcall" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY) -> BOOL, - GetBreakOnID: proc "stdcall" (this: ^IInfoQueue, ID: MESSAGE_ID) -> BOOL, - GetBreakOnSeverity: proc "stdcall" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY) -> BOOL, - GetMessage: proc "stdcall" (this: ^IInfoQueue, MessageIndex: u64, pMessage: ^MESSAGE, pMessageByteLength: ^SIZE_T) -> HRESULT, - GetMessageCountLimit: proc "stdcall" (this: ^IInfoQueue) -> u64, - GetMuteDebugOutput: proc "stdcall" (this: ^IInfoQueue) -> BOOL, - GetNumMessagesAllowedByStorageFilter: proc "stdcall" (this: ^IInfoQueue) -> u64, - GetNumMessagesDeniedByStorageFilter: proc "stdcall" (this: ^IInfoQueue) -> u64, - GetNumMessagesDiscardedByMessageCountLimit: proc "stdcall" (this: ^IInfoQueue) -> u64, - GetNumStoredMessages: proc "stdcall" (this: ^IInfoQueue) -> u64, - GetNumStoredMessagesAllowedByRetrievalFilter: proc "stdcall" (this: ^IInfoQueue) -> u64, - GetRetrievalFilter: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, - GetRetrievalFilterStackSize: proc "stdcall" (this: ^IInfoQueue) -> u64, - GetStorageFilter: proc "stdcall" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, - GetStorageFilterStackSize: proc "stdcall" (this: ^IInfoQueue) -> u64, - PopRetrievalFilter: proc "stdcall" (this: ^IInfoQueue), - PopStorageFilter: proc "stdcall" (this: ^IInfoQueue), - PushCopyOfRetrievalFilter: proc "stdcall" (this: ^IInfoQueue) -> HRESULT, - PushCopyOfStorageFilter: proc "stdcall" (this: ^IInfoQueue) -> HRESULT, - PushEmptyRetrievalFilter: proc "stdcall" (this: ^IInfoQueue) -> HRESULT, - PushEmptyStorageFilter: proc "stdcall" (this: ^IInfoQueue) -> HRESULT, - SetBreakOnCategory: proc "stdcall" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY, bEnable: BOOL) -> HRESULT, - SetBreakOnID: proc "stdcall" (this: ^IInfoQueue, ID: MESSAGE_ID, bEnable: BOOL) -> HRESULT, - SetBreakOnSeverity: proc "stdcall" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY, bEnable: BOOL) -> HRESULT, - SetMessageCountLimit: proc "stdcall" (this: ^IInfoQueue, MessageCountLimit: u64) -> HRESULT, - SetMuteDebugOutput: proc "stdcall" (this: ^IInfoQueue, bMute: BOOL), + AddApplicationMessage: proc "system" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY, pDescription: cstring) -> HRESULT, + AddMessage: proc "system" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY, Severity: MESSAGE_SEVERITY, ID: MESSAGE_ID, pDescription: cstring) -> HRESULT, + AddRetrievalFilterEntries: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + AddStorageFilterEntries: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + ClearRetrievalFilter: proc "system" (this: ^IInfoQueue), + ClearStorageFilter: proc "system" (this: ^IInfoQueue), + ClearStoredMessages: proc "system" (this: ^IInfoQueue), + GetBreakOnCategory: proc "system" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY) -> BOOL, + GetBreakOnID: proc "system" (this: ^IInfoQueue, ID: MESSAGE_ID) -> BOOL, + GetBreakOnSeverity: proc "system" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY) -> BOOL, + GetMessage: proc "system" (this: ^IInfoQueue, MessageIndex: u64, pMessage: ^MESSAGE, pMessageByteLength: ^SIZE_T) -> HRESULT, + GetMessageCountLimit: proc "system" (this: ^IInfoQueue) -> u64, + GetMuteDebugOutput: proc "system" (this: ^IInfoQueue) -> BOOL, + GetNumMessagesAllowedByStorageFilter: proc "system" (this: ^IInfoQueue) -> u64, + GetNumMessagesDeniedByStorageFilter: proc "system" (this: ^IInfoQueue) -> u64, + GetNumMessagesDiscardedByMessageCountLimit: proc "system" (this: ^IInfoQueue) -> u64, + GetNumStoredMessages: proc "system" (this: ^IInfoQueue) -> u64, + GetNumStoredMessagesAllowedByRetrievalFilter: proc "system" (this: ^IInfoQueue) -> u64, + GetRetrievalFilter: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, + GetRetrievalFilterStackSize: proc "system" (this: ^IInfoQueue) -> u64, + GetStorageFilter: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, + GetStorageFilterStackSize: proc "system" (this: ^IInfoQueue) -> u64, + PopRetrievalFilter: proc "system" (this: ^IInfoQueue), + PopStorageFilter: proc "system" (this: ^IInfoQueue), + PushCopyOfRetrievalFilter: proc "system" (this: ^IInfoQueue) -> HRESULT, + PushCopyOfStorageFilter: proc "system" (this: ^IInfoQueue) -> HRESULT, + PushEmptyRetrievalFilter: proc "system" (this: ^IInfoQueue) -> HRESULT, + PushEmptyStorageFilter: proc "system" (this: ^IInfoQueue) -> HRESULT, + SetBreakOnCategory: proc "system" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY, bEnable: BOOL) -> HRESULT, + SetBreakOnID: proc "system" (this: ^IInfoQueue, ID: MESSAGE_ID, bEnable: BOOL) -> HRESULT, + SetBreakOnSeverity: proc "system" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY, bEnable: BOOL) -> HRESULT, + SetMessageCountLimit: proc "system" (this: ^IInfoQueue, MessageCountLimit: u64) -> HRESULT, + SetMuteDebugOutput: proc "system" (this: ^IInfoQueue, bMute: BOOL), } MESSAGE_ID :: enum u32 { diff --git a/vendor/directx/d3d12/d3d12.odin b/vendor/directx/d3d12/d3d12.odin index 30b543e43..c39c2c9c9 100644 --- a/vendor/directx/d3d12/d3d12.odin +++ b/vendor/directx/d3d12/d3d12.odin @@ -26,7 +26,7 @@ IModuleInstance :: d3d_compiler.ID3D11ModuleInstance IBlob :: d3d_compiler.ID3DBlob IModule :: d3d_compiler.ID3D11Module -@(default_calling_convention="stdcall", link_prefix="D3D12") +@(default_calling_convention="system", 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 --- @@ -197,8 +197,8 @@ ID3DDestructionNotifier :: struct #raw_union { } 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, + RegisterDestructionCallback: proc "system" (this: ^ID3DDestructionNotifier, callbackFn: PFN_DESTRUCTION_CALLBACK, pData: rawptr, pCallbackID: ^u32) -> HRESULT, + UnregisterDestructionCallback: proc "system" (this: ^ID3DDestructionNotifier, callbackID: u32) -> HRESULT, } SHADER_VARIABLE_CLASS :: enum i32 { @@ -676,10 +676,10 @@ IObject :: struct #raw_union { } 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, + GetPrivateData: proc "system" (this: ^IObject, guid: ^GUID, pDataSize: ^u32, pData: rawptr) -> HRESULT, + SetPrivateData: proc "system" (this: ^IObject, guid: ^GUID, DataSize: u32, pData: rawptr) -> HRESULT, + SetPrivateDataInterface: proc "system" (this: ^IObject, guid: ^GUID, pData: ^IUnknown) -> HRESULT, + SetName: proc "system" (this: ^IObject, Name: [^]u16) -> HRESULT, } @@ -691,7 +691,7 @@ IDeviceChild :: struct #raw_union { } IDeviceChild_VTable :: struct { using id3d12object_vtable: IObject_VTable, - GetDevice: proc "stdcall" (this: ^IDeviceChild, riid: ^IID, ppvDevice: ^rawptr) -> HRESULT, + GetDevice: proc "system" (this: ^IDeviceChild, riid: ^IID, ppvDevice: ^rawptr) -> HRESULT, } @@ -2096,7 +2096,7 @@ IRootSignatureDeserializer :: struct #raw_union { } IRootSignatureDeserializer_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - GetRootSignatureDesc: proc "stdcall" (this: ^IRootSignatureDeserializer) -> ^ROOT_SIGNATURE_DESC, + GetRootSignatureDesc: proc "system" (this: ^IRootSignatureDeserializer) -> ^ROOT_SIGNATURE_DESC, } @@ -2108,8 +2108,8 @@ IVersionedRootSignatureDeserializer :: struct #raw_union { } 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, + GetRootSignatureDescAtVersion: proc "system" (this: ^IVersionedRootSignatureDeserializer, convertToVersion: ROOT_SIGNATURE_VERSION, ppDesc: ^^VERSIONED_ROOT_SIGNATURE_DESC) -> HRESULT, + GetUnconvertedRootSignatureDesc: proc "system" (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 @@ -2283,7 +2283,7 @@ IHeap :: struct #raw_union { } IHeap_VTable :: struct { using id3d12devicechild_vtable: IDeviceChild_VTable, - GetDesc: proc "stdcall" (this: ^IHeap) -> HEAP_DESC, + GetDesc: proc "system" (this: ^IHeap) -> HEAP_DESC, } @@ -2295,13 +2295,13 @@ IResource :: struct #raw_union { } 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, + Map: proc "system" (this: ^IResource, Subresource: u32, pReadRange: ^RANGE, ppData: ^rawptr) -> HRESULT, + Unmap: proc "system" (this: ^IResource, Subresource: u32, pWrittenRange: ^RANGE), + GetDesc: proc "system" (this: ^IResource) -> RESOURCE_DESC, + GetGPUVirtualAddress: proc "system" (this: ^IResource) -> GPU_VIRTUAL_ADDRESS, + WriteToSubresource: proc "system" (this: ^IResource, DstSubresource: u32, pDstBox: ^BOX, pSrcData: rawptr, SrcRowPitch: u32, SrcDepthPitch: u32) -> HRESULT, + ReadFromSubresource: proc "system" (this: ^IResource, pDstData: rawptr, DstRowPitch: u32, DstDepthPitch: u32, SrcSubresource: u32, pSrcBox: ^BOX) -> HRESULT, + GetHeapProperties: proc "system" (this: ^IResource, pHeapProperties: ^HEAP_PROPERTIES, pHeapFlags: ^HEAP_FLAGS) -> HRESULT, } @@ -2313,7 +2313,7 @@ ICommandAllocator :: struct #raw_union { } ICommandAllocator_VTable :: struct { using id3d12devicechild_vtable: IDeviceChild_VTable, - Reset: proc "stdcall" (this: ^ICommandAllocator) -> HRESULT, + Reset: proc "system" (this: ^ICommandAllocator) -> HRESULT, } @@ -2325,9 +2325,9 @@ IFence :: struct #raw_union { } 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, + GetCompletedValue: proc "system" (this: ^IFence) -> u64, + SetEventOnCompletion: proc "system" (this: ^IFence, Value: u64, hEvent: HANDLE) -> HRESULT, + Signal: proc "system" (this: ^IFence, Value: u64) -> HRESULT, } @@ -2339,7 +2339,7 @@ IFence1 :: struct #raw_union { } IFence1_VTable :: struct { #subtype id3d12fence_vtable: IFence_VTable, - GetCreationFlags: proc "stdcall" (this: ^IFence1) -> FENCE_FLAGS, + GetCreationFlags: proc "system" (this: ^IFence1) -> FENCE_FLAGS, } @@ -2351,7 +2351,7 @@ IPipelineState :: struct #raw_union { } IPipelineState_VTable :: struct { using id3d12devicechild_vtable: IDeviceChild_VTable, - GetCachedBlob: proc "stdcall" (this: ^IPipelineState, ppBlob: ^^IBlob) -> HRESULT, + GetCachedBlob: proc "system" (this: ^IPipelineState, ppBlob: ^^IBlob) -> HRESULT, } @@ -2363,9 +2363,9 @@ IDescriptorHeap :: struct #raw_union { } IDescriptorHeap_VTable :: struct { using id3d12devicechild_vtable: IDeviceChild_VTable, - GetDesc: proc "stdcall" (this: ^IDescriptorHeap, desc: ^DESCRIPTOR_HEAP_DESC), - GetCPUDescriptorHandleForHeapStart: proc "stdcall" (this: ^IDescriptorHeap, handle: ^CPU_DESCRIPTOR_HANDLE), - GetGPUDescriptorHandleForHeapStart: proc "stdcall" (this: ^IDescriptorHeap, handle: ^GPU_DESCRIPTOR_HANDLE), + GetDesc: proc "system" (this: ^IDescriptorHeap, desc: ^DESCRIPTOR_HEAP_DESC), + GetCPUDescriptorHandleForHeapStart: proc "system" (this: ^IDescriptorHeap, handle: ^CPU_DESCRIPTOR_HANDLE), + GetGPUDescriptorHandleForHeapStart: proc "system" (this: ^IDescriptorHeap, handle: ^GPU_DESCRIPTOR_HANDLE), } IQueryHeap_UUID_STRING :: "0d9658ae-ed45-469e-a61d-970ec583cab4" @@ -2390,7 +2390,7 @@ ICommandList :: struct #raw_union { } ICommandList_VTable :: struct { using id3d12devicechild_vtable: IDeviceChild_VTable, - GetType: proc "stdcall" (this: ^ICommandList) -> COMMAND_LIST_TYPE, + GetType: proc "system" (this: ^ICommandList) -> COMMAND_LIST_TYPE, } @@ -2402,57 +2402,57 @@ IGraphicsCommandList :: struct #raw_union { } 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), + Close: proc "system" (this: ^IGraphicsCommandList) -> HRESULT, + Reset: proc "system" (this: ^IGraphicsCommandList, pAllocator: ^ICommandAllocator, pInitialState: ^IPipelineState) -> HRESULT, + ClearState: proc "system" (this: ^IGraphicsCommandList, pPipelineState: ^IPipelineState), + DrawInstanced: proc "system" (this: ^IGraphicsCommandList, VertexCountPerInstance: u32, InstanceCount: u32, StartVertexLocation: u32, StartInstanceLocation: u32), + DrawIndexedInstanced: proc "system" (this: ^IGraphicsCommandList, IndexCountPerInstance: u32, InstanceCount: u32, StartIndexLocation: u32, BaseVertexLocation: i32, StartInstanceLocation: u32), + Dispatch: proc "system" (this: ^IGraphicsCommandList, ThreadGroupCountX: u32, ThreadGroupCountY: u32, ThreadGroupCountZ: u32), + CopyBufferRegion: proc "system" (this: ^IGraphicsCommandList, pDstBuffer: ^IResource, DstOffset: u64, pSrcBuffer: ^IResource, SrcOffset: u64, NumBytes: u64), + CopyTextureRegion: proc "system" (this: ^IGraphicsCommandList, pDst: ^TEXTURE_COPY_LOCATION, DstX: u32, DstY: u32, DstZ: u32, pSrc: ^TEXTURE_COPY_LOCATION, pSrcBox: ^BOX), + CopyResource: proc "system" (this: ^IGraphicsCommandList, pDstResource: ^IResource, pSrcResource: ^IResource), + CopyTiles: proc "system" (this: ^IGraphicsCommandList, pTiledResource: ^IResource, pTileRegionStartCoordinate: ^TILED_RESOURCE_COORDINATE, pTileRegionSize: ^TILE_REGION_SIZE, pBuffer: ^IResource, BufferStartOffsetInBytes: u64, Flags: TILE_COPY_FLAGS), + ResolveSubresource: proc "system" (this: ^IGraphicsCommandList, pDstResource: ^IResource, DstSubresource: u32, pSrcResource: ^IResource, SrcSubresource: u32, Format: dxgi.FORMAT), + IASetPrimitiveTopology: proc "system" (this: ^IGraphicsCommandList, PrimitiveTopology: PRIMITIVE_TOPOLOGY), + RSSetViewports: proc "system" (this: ^IGraphicsCommandList, NumViewports: u32, pViewports: ^VIEWPORT), + RSSetScissorRects: proc "system" (this: ^IGraphicsCommandList, NumRects: u32, pRects: ^RECT), + OMSetBlendFactor: proc "system" (this: ^IGraphicsCommandList, BlendFactor: ^[4]f32), + OMSetStencilRef: proc "system" (this: ^IGraphicsCommandList, StencilRef: u32), + SetPipelineState: proc "system" (this: ^IGraphicsCommandList, pPipelineState: ^IPipelineState), + ResourceBarrier: proc "system" (this: ^IGraphicsCommandList, NumBarriers: u32, pBarriers: ^RESOURCE_BARRIER), + ExecuteBundle: proc "system" (this: ^IGraphicsCommandList, pCommandList: ^IGraphicsCommandList), + SetDescriptorHeaps: proc "system" (this: ^IGraphicsCommandList, NumDescriptorHeaps: u32, ppDescriptorHeaps: ^^IDescriptorHeap), + SetComputeRootSignature: proc "system" (this: ^IGraphicsCommandList, pRootSignature: ^IRootSignature), + SetGraphicsRootSignature: proc "system" (this: ^IGraphicsCommandList, pRootSignature: ^IRootSignature), + SetComputeRootDescriptorTable: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BaseDescriptor: GPU_DESCRIPTOR_HANDLE), + SetGraphicsRootDescriptorTable: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BaseDescriptor: GPU_DESCRIPTOR_HANDLE), + SetComputeRoot32BitConstant: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, SrcData: u32, DestOffsetIn32BitValues: u32), + SetGraphicsRoot32BitConstant: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, SrcData: u32, DestOffsetIn32BitValues: u32), + SetComputeRoot32BitConstants: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, Num32BitValuesToSet: u32, pSrcData: rawptr, DestOffsetIn32BitValues: u32), + SetGraphicsRoot32BitConstants: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, Num32BitValuesToSet: u32, pSrcData: rawptr, DestOffsetIn32BitValues: u32), + SetComputeRootConstantBufferView: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS), + SetGraphicsRootConstantBufferView: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS), + SetComputeRootShaderResourceView: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS), + SetGraphicsRootShaderResourceView: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS), + SetComputeRootUnorderedAccessView: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS), + SetGraphicsRootUnorderedAccessView: proc "system" (this: ^IGraphicsCommandList, RootParameterIndex: u32, BufferLocation: GPU_VIRTUAL_ADDRESS), + IASetIndexBuffer: proc "system" (this: ^IGraphicsCommandList, pView: ^INDEX_BUFFER_VIEW), + IASetVertexBuffers: proc "system" (this: ^IGraphicsCommandList, StartSlot: u32, NumViews: u32, pViews: ^VERTEX_BUFFER_VIEW), + SOSetTargets: proc "system" (this: ^IGraphicsCommandList, StartSlot: u32, NumViews: u32, pViews: ^STREAM_OUTPUT_BUFFER_VIEW), + OMSetRenderTargets: proc "system" (this: ^IGraphicsCommandList, NumRenderTargetDescriptors: u32, pRenderTargetDescriptors: ^CPU_DESCRIPTOR_HANDLE, RTsSingleHandleToDescriptorRange: BOOL, pDepthStencilDescriptor: ^CPU_DESCRIPTOR_HANDLE), + ClearDepthStencilView: proc "system" (this: ^IGraphicsCommandList, DepthStencilView: CPU_DESCRIPTOR_HANDLE, ClearFlags: CLEAR_FLAGS, Depth: f32, Stencil: u8, NumRects: u32, pRects: ^RECT), + ClearRenderTargetView: proc "system" (this: ^IGraphicsCommandList, RenderTargetView: CPU_DESCRIPTOR_HANDLE, ColorRGBA: ^[4]f32, NumRects: u32, pRects: ^RECT), + ClearUnorderedAccessViewUint: proc "system" (this: ^IGraphicsCommandList, ViewGPUHandleInCurrentHeap: GPU_DESCRIPTOR_HANDLE, ViewCPUHandle: CPU_DESCRIPTOR_HANDLE, pResource: ^IResource, Values: ^[4]u32, NumRects: u32, pRects: ^RECT), + ClearUnorderedAccessViewFloat: proc "system" (this: ^IGraphicsCommandList, ViewGPUHandleInCurrentHeap: GPU_DESCRIPTOR_HANDLE, ViewCPUHandle: CPU_DESCRIPTOR_HANDLE, pResource: ^IResource, Values: ^[4]f32, NumRects: u32, pRects: ^RECT), + DiscardResource: proc "system" (this: ^IGraphicsCommandList, pResource: ^IResource, pRegion: ^DISCARD_REGION), + BeginQuery: proc "system" (this: ^IGraphicsCommandList, pQueryHeap: ^IQueryHeap, Type: QUERY_TYPE, Index: u32), + EndQuery: proc "system" (this: ^IGraphicsCommandList, pQueryHeap: ^IQueryHeap, Type: QUERY_TYPE, Index: u32), + ResolveQueryData: proc "system" (this: ^IGraphicsCommandList, pQueryHeap: ^IQueryHeap, Type: QUERY_TYPE, StartIndex: u32, NumQueries: u32, pDestinationBuffer: ^IResource, AlignedDestinationBufferOffset: u64), + SetPredication: proc "system" (this: ^IGraphicsCommandList, pBuffer: ^IResource, AlignedBufferOffset: u64, Operation: PREDICATION_OP), + SetMarker: proc "system" (this: ^IGraphicsCommandList, Metadata: u32, pData: rawptr, Size: u32), + BeginEvent: proc "system" (this: ^IGraphicsCommandList, Metadata: u32, pData: rawptr, Size: u32), + EndEvent: proc "system" (this: ^IGraphicsCommandList), + ExecuteIndirect: proc "system" (this: ^IGraphicsCommandList, pCommandSignature: ^ICommandSignature, MaxCommandCount: u32, pArgumentBuffer: ^IResource, ArgumentBufferOffset: u64, pCountBuffer: ^IResource, CountBufferOffset: u64), } @@ -2464,12 +2464,12 @@ IGraphicsCommandList1 :: struct #raw_union { } 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), + AtomicCopyBufferUINT: proc "system" (this: ^IGraphicsCommandList1, pDstBuffer: ^IResource, DstOffset: u64, pSrcBuffer: ^IResource, SrcOffset: u64, Dependencies: u32, ppDependentResources: ^^IResource, pDependentSubresourceRanges: ^SUBRESOURCE_RANGE_UINT64), + AtomicCopyBufferUINT64: proc "system" (this: ^IGraphicsCommandList1, pDstBuffer: ^IResource, DstOffset: u64, pSrcBuffer: ^IResource, SrcOffset: u64, Dependencies: u32, ppDependentResources: ^^IResource, pDependentSubresourceRanges: ^SUBRESOURCE_RANGE_UINT64), + OMSetDepthBounds: proc "system" (this: ^IGraphicsCommandList1, Min: f32, Max: f32), + SetSamplePositions: proc "system" (this: ^IGraphicsCommandList1, NumSamplesPerPixel: u32, NumPixels: u32, pSamplePositions: ^SAMPLE_POSITION), + ResolveSubresourceRegion: proc "system" (this: ^IGraphicsCommandList1, pDstResource: ^IResource, DstSubresource: u32, DstX: u32, DstY: u32, pSrcResource: ^IResource, SrcSubresource: u32, pSrcRect: ^RECT, Format: dxgi.FORMAT, ResolveMode: RESOLVE_MODE), + SetViewInstanceMask: proc "system" (this: ^IGraphicsCommandList1, Mask: u32), } WRITEBUFFERIMMEDIATE_PARAMETER :: struct { @@ -2492,7 +2492,7 @@ IGraphicsCommandList2 :: struct #raw_union { } IGraphicsCommandList2_VTable :: struct { using id3d12graphicscommandlist1_vtable: IGraphicsCommandList1_VTable, - WriteBufferImmediate: proc "stdcall" (this: ^IGraphicsCommandList2, Count: u32, pParams: ^WRITEBUFFERIMMEDIATE_PARAMETER, pModes: ^WRITEBUFFERIMMEDIATE_MODE), + WriteBufferImmediate: proc "system" (this: ^IGraphicsCommandList2, Count: u32, pParams: ^WRITEBUFFERIMMEDIATE_PARAMETER, pModes: ^WRITEBUFFERIMMEDIATE_MODE), } @@ -2504,17 +2504,17 @@ ICommandQueue :: struct #raw_union { } 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, + UpdateTileMappings: proc "system" (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 "system" (this: ^ICommandQueue, pDstResource: ^IResource, pDstRegionStartCoordinate: ^TILED_RESOURCE_COORDINATE, pSrcResource: ^IResource, pSrcRegionStartCoordinate: ^TILED_RESOURCE_COORDINATE, pRegionSize: ^TILE_REGION_SIZE, Flags: TILE_MAPPING_FLAGS), + ExecuteCommandLists: proc "system" (this: ^ICommandQueue, NumCommandLists: u32, ppCommandLists: ^^ICommandList), + SetMarker: proc "system" (this: ^ICommandQueue, Metadata: u32, pData: rawptr, Size: u32), + BeginEvent: proc "system" (this: ^ICommandQueue, Metadata: u32, pData: rawptr, Size: u32), + EndEvent: proc "system" (this: ^ICommandQueue), + Signal: proc "system" (this: ^ICommandQueue, pFence: ^IFence, Value: u64) -> HRESULT, + Wait: proc "system" (this: ^ICommandQueue, pFence: ^IFence, Value: u64) -> HRESULT, + GetTimestampFrequency: proc "system" (this: ^ICommandQueue, pFrequency: ^u64) -> HRESULT, + GetClockCalibration: proc "system" (this: ^ICommandQueue, pGpuTimestamp: ^u64, pCpuTimestamp: ^u64) -> HRESULT, + GetDesc: proc "system" (this: ^ICommandQueue) -> COMMAND_QUEUE_DESC, } @@ -2526,43 +2526,43 @@ IDevice :: struct #raw_union { } 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, RetVal: ^RESOURCE_ALLOCATION_INFO, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC), - 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, + GetNodeCount: proc "system" (this: ^IDevice) -> u32, + CreateCommandQueue: proc "system" (this: ^IDevice, pDesc: ^COMMAND_QUEUE_DESC, riid: ^IID, ppCommandQueue: ^rawptr) -> HRESULT, + CreateCommandAllocator: proc "system" (this: ^IDevice, type: COMMAND_LIST_TYPE, riid: ^IID, ppCommandAllocator: ^rawptr) -> HRESULT, + CreateGraphicsPipelineState: proc "system" (this: ^IDevice, pDesc: ^GRAPHICS_PIPELINE_STATE_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT, + CreateComputePipelineState: proc "system" (this: ^IDevice, pDesc: ^COMPUTE_PIPELINE_STATE_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT, + CreateCommandList: proc "system" (this: ^IDevice, nodeMask: u32, type: COMMAND_LIST_TYPE, pCommandAllocator: ^ICommandAllocator, pInitialState: ^IPipelineState, riid: ^IID, ppCommandList: ^rawptr) -> HRESULT, + CheckFeatureSupport: proc "system" (this: ^IDevice, Feature: FEATURE, pFeatureSupportData: rawptr, FeatureSupportDataSize: u32) -> HRESULT, + CreateDescriptorHeap: proc "system" (this: ^IDevice, pDescriptorHeapDesc: ^DESCRIPTOR_HEAP_DESC, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT, + GetDescriptorHandleIncrementSize: proc "system" (this: ^IDevice, DescriptorHeapType: DESCRIPTOR_HEAP_TYPE) -> u32, + CreateRootSignature: proc "system" (this: ^IDevice, nodeMask: u32, pBlobWithRootSignature: rawptr, blobLengthInBytes: SIZE_T, riid: ^IID, ppvRootSignature: ^rawptr) -> HRESULT, + CreateConstantBufferView: proc "system" (this: ^IDevice, pDesc: ^CONSTANT_BUFFER_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE), + CreateShaderResourceView: proc "system" (this: ^IDevice, pResource: ^IResource, pDesc: ^SHADER_RESOURCE_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE), + CreateUnorderedAccessView: proc "system" (this: ^IDevice, pResource: ^IResource, pCounterResource: ^IResource, pDesc: ^UNORDERED_ACCESS_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE), + CreateRenderTargetView: proc "system" (this: ^IDevice, pResource: ^IResource, pDesc: ^RENDER_TARGET_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE), + CreateDepthStencilView: proc "system" (this: ^IDevice, pResource: ^IResource, pDesc: ^DEPTH_STENCIL_VIEW_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE), + CreateSampler: proc "system" (this: ^IDevice, pDesc: ^SAMPLER_DESC, DestDescriptor: CPU_DESCRIPTOR_HANDLE), + CopyDescriptors: proc "system" (this: ^IDevice, NumDestDescriptorRanges: u32, pDestDescriptorRangeStarts: ^CPU_DESCRIPTOR_HANDLE, pDestDescriptorRangeSizes: ^u32, NumSrcDescriptorRanges: u32, pSrcDescriptorRangeStarts: ^CPU_DESCRIPTOR_HANDLE, pSrcDescriptorRangeSizes: ^u32, DescriptorHeapsType: DESCRIPTOR_HEAP_TYPE), + CopyDescriptorsSimple: proc "system" (this: ^IDevice, NumDescriptors: u32, DestDescriptorRangeStart: CPU_DESCRIPTOR_HANDLE, SrcDescriptorRangeStart: CPU_DESCRIPTOR_HANDLE, DescriptorHeapsType: DESCRIPTOR_HEAP_TYPE), + GetResourceAllocationInfo: proc "system" (this: ^IDevice, RetVal: ^RESOURCE_ALLOCATION_INFO, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC), + GetCustomHeapProperties: proc "system" (this: ^IDevice, nodeMask: u32, heapType: HEAP_TYPE) -> HEAP_PROPERTIES, + CreateCommittedResource: proc "system" (this: ^IDevice, pHeapProperties: ^HEAP_PROPERTIES, HeapFlags: HEAP_FLAGS, pDesc: ^RESOURCE_DESC, InitialResourceState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, riidResource: ^IID, ppvResource: ^rawptr) -> HRESULT, + CreateHeap: proc "system" (this: ^IDevice, pDesc: ^HEAP_DESC, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT, + CreatePlacedResource: proc "system" (this: ^IDevice, pHeap: ^IHeap, HeapOffset: u64, pDesc: ^RESOURCE_DESC, InitialState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, riid: ^IID, ppvResource: ^rawptr) -> HRESULT, + CreateReservedResource: proc "system" (this: ^IDevice, pDesc: ^RESOURCE_DESC, InitialState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, riid: ^IID, ppvResource: ^rawptr) -> HRESULT, + CreateSharedHandle: proc "system" (this: ^IDevice, pObject: ^IDeviceChild, pAttributes: ^win32.SECURITY_ATTRIBUTES, Access: u32, Name: [^]u16, pHandle: ^HANDLE) -> HRESULT, + OpenSharedHandle: proc "system" (this: ^IDevice, NTHandle: HANDLE, riid: ^IID, ppvObj: ^rawptr) -> HRESULT, + OpenSharedHandleByName: proc "system" (this: ^IDevice, Name: [^]u16, Access: u32, pNTHandle: ^HANDLE) -> HRESULT, + MakeResident: proc "system" (this: ^IDevice, NumObjects: u32, ppObjects: ^^IPageable) -> HRESULT, + Evict: proc "system" (this: ^IDevice, NumObjects: u32, ppObjects: ^^IPageable) -> HRESULT, + CreateFence: proc "system" (this: ^IDevice, InitialValue: u64, Flags: FENCE_FLAGS, riid: ^IID, ppFence: ^rawptr) -> HRESULT, + GetDeviceRemovedReason: proc "system" (this: ^IDevice) -> HRESULT, + GetCopyableFootprints: proc "system" (this: ^IDevice, pResourceDesc: ^RESOURCE_DESC, FirstSubresource: u32, NumSubresources: u32, BaseOffset: u64, pLayouts: ^PLACED_SUBRESOURCE_FOOTPRINT, pNumRows: ^u32, pRowSizeInBytes: ^u64, pTotalBytes: ^u64), + CreateQueryHeap: proc "system" (this: ^IDevice, pDesc: ^QUERY_HEAP_DESC, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT, + SetStablePowerState: proc "system" (this: ^IDevice, Enable: BOOL) -> HRESULT, + CreateCommandSignature: proc "system" (this: ^IDevice, pDesc: ^COMMAND_SIGNATURE_DESC, pRootSignature: ^IRootSignature, riid: ^IID, ppvCommandSignature: ^rawptr) -> HRESULT, + GetResourceTiling: proc "system" (this: ^IDevice, pTiledResource: ^IResource, pNumTilesForEntireResource: ^u32, pPackedMipDesc: ^PACKED_MIP_INFO, pStandardTileShapeForNonPackedMips: ^TILE_SHAPE, pNumSubresourceTilings: ^u32, FirstSubresourceTilingToGet: u32, pSubresourceTilingsForNonPackedMips: ^SUBRESOURCE_TILING), + GetAdapterLuid: proc "system" (this: ^IDevice) -> LUID, } @@ -2574,11 +2574,11 @@ IPipelineLibrary :: struct #raw_union { } 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, + StorePipeline: proc "system" (this: ^IPipelineLibrary, pName: [^]u16, pPipeline: ^IPipelineState) -> HRESULT, + LoadGraphicsPipeline: proc "system" (this: ^IPipelineLibrary, pName: [^]u16, pDesc: ^GRAPHICS_PIPELINE_STATE_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT, + LoadComputePipeline: proc "system" (this: ^IPipelineLibrary, pName: [^]u16, pDesc: ^COMPUTE_PIPELINE_STATE_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT, + GetSerializedSize: proc "system" (this: ^IPipelineLibrary) -> SIZE_T, + Serialize: proc "system" (this: ^IPipelineLibrary, pData: rawptr, DataSizeInBytes: SIZE_T) -> HRESULT, } @@ -2590,7 +2590,7 @@ IPipelineLibrary1 :: struct #raw_union { } 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, + LoadPipeline: proc "system" (this: ^IPipelineLibrary1, pName: [^]u16, pDesc: ^PIPELINE_STATE_STREAM_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT, } MULTIPLE_FENCE_WAIT_FLAGS :: distinct bit_set[MULTIPLE_FENCE_WAIT_FLAG; u32] @@ -2618,9 +2618,9 @@ IDevice1 :: struct #raw_union { } 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, + CreatePipelineLibrary: proc "system" (this: ^IDevice1, pLibraryBlob: rawptr, BlobLength: SIZE_T, riid: ^IID, ppPipelineLibrary: ^rawptr) -> HRESULT, + SetEventOnMultipleFenceCompletion: proc "system" (this: ^IDevice1, ppFences: ^^IFence, pFenceValues: ^u64, NumFences: u32, Flags: MULTIPLE_FENCE_WAIT_FLAGS, hEvent: HANDLE) -> HRESULT, + SetResidencyPriority: proc "system" (this: ^IDevice1, NumObjects: u32, ppObjects: ^^IPageable, pPriorities: ^RESIDENCY_PRIORITY) -> HRESULT, } @@ -2632,7 +2632,7 @@ IDevice2 :: struct #raw_union { } IDevice2_VTable :: struct { using id3d12device1_vtable: IDevice1_VTable, - CreatePipelineState: proc "stdcall" (this: ^IDevice2, pDesc: ^PIPELINE_STATE_STREAM_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT, + CreatePipelineState: proc "system" (this: ^IDevice2, pDesc: ^PIPELINE_STATE_STREAM_DESC, riid: ^IID, ppPipelineState: ^rawptr) -> HRESULT, } RESIDENCY_FLAGS :: distinct bit_set[RESIDENCY_FLAG; u32] @@ -2649,9 +2649,9 @@ IDevice3 :: struct #raw_union { } 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, + OpenExistingHeapFromAddress: proc "system" (this: ^IDevice3, pAddress: rawptr, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT, + OpenExistingHeapFromFileMapping: proc "system" (this: ^IDevice3, hFileMapping: HANDLE, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT, + EnqueueMakeResident: proc "system" (this: ^IDevice3, Flags: RESIDENCY_FLAGS, NumObjects: u32, ppObjects: ^^IPageable, pFenceToSignal: ^IFence, FenceValueToSignal: u64) -> HRESULT, } COMMAND_LIST_FLAGS :: distinct bit_set[COMMAND_LIST_FLAG; u32] @@ -2680,8 +2680,8 @@ IProtectedSession :: struct #raw_union { } 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, + GetStatusFence: proc "system" (this: ^IProtectedSession, riid: ^IID, ppFence: ^rawptr) -> HRESULT, + GetSessionStatus: proc "system" (this: ^IProtectedSession) -> PROTECTED_SESSION_STATUS, } PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS :: distinct bit_set[PROTECTED_RESOURCE_SESSION_SUPPORT_FLAG; u32] @@ -2712,7 +2712,7 @@ IProtectedResourceSession :: struct #raw_union { } IProtectedResourceSession_VTable :: struct { using id3d12protectedsession_vtable: IProtectedSession_VTable, - GetDesc: proc "stdcall" (this: ^IProtectedResourceSession) -> PROTECTED_RESOURCE_SESSION_DESC, + GetDesc: proc "system" (this: ^IProtectedResourceSession) -> PROTECTED_RESOURCE_SESSION_DESC, } @@ -2724,12 +2724,12 @@ IDevice4 :: struct #raw_union { } 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, RetVal: ^RESOURCE_ALLOCATION_INFO, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC, pResourceAllocationInfo1: ^RESOURCE_ALLOCATION_INFO1), + CreateCommandList1: proc "system" (this: ^IDevice4, nodeMask: u32, type: COMMAND_LIST_TYPE, flags: COMMAND_LIST_FLAGS, riid: ^IID, ppCommandList: ^rawptr) -> HRESULT, + CreateProtectedResourceSession: proc "system" (this: ^IDevice4, pDesc: ^PROTECTED_RESOURCE_SESSION_DESC, riid: ^IID, ppSession: ^rawptr) -> HRESULT, + CreateCommittedResource1: proc "system" (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 "system" (this: ^IDevice4, pDesc: ^HEAP_DESC, pProtectedSession: ^IProtectedResourceSession, riid: ^IID, ppvHeap: ^rawptr) -> HRESULT, + CreateReservedResource1: proc "system" (this: ^IDevice4, pDesc: ^RESOURCE_DESC, InitialState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, pProtectedSession: ^IProtectedResourceSession, riid: ^IID, ppvResource: ^rawptr) -> HRESULT, + GetResourceAllocationInfo1: proc "system" (this: ^IDevice4, RetVal: ^RESOURCE_ALLOCATION_INFO, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC, pResourceAllocationInfo1: ^RESOURCE_ALLOCATION_INFO1), } LIFETIME_STATE :: enum i32 { @@ -2746,7 +2746,7 @@ ILifetimeOwner :: struct #raw_union { } ILifetimeOwner_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - LifetimeStateUpdated: proc "stdcall" (this: ^ILifetimeOwner, NewState: LIFETIME_STATE), + LifetimeStateUpdated: proc "system" (this: ^ILifetimeOwner, NewState: LIFETIME_STATE), } @@ -2758,10 +2758,10 @@ ISwapChainAssistant :: struct #raw_union { } 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, + GetLUID: proc "system" (this: ^ISwapChainAssistant) -> LUID, + GetSwapChainObject: proc "system" (this: ^ISwapChainAssistant, riid: ^IID, ppv: ^rawptr) -> HRESULT, + GetCurrentResourceAndCommandQueue: proc "system" (this: ^ISwapChainAssistant, riidResource: ^IID, ppvResource: ^rawptr, riidQueue: ^IID, ppvQueue: ^rawptr) -> HRESULT, + InsertImplicitSync: proc "system" (this: ^ISwapChainAssistant) -> HRESULT, } @@ -2773,7 +2773,7 @@ ILifetimeTracker :: struct #raw_union { } ILifetimeTracker_VTable :: struct { using id3d12devicechild_vtable: IDeviceChild_VTable, - DestroyOwnedObject: proc "stdcall" (this: ^ILifetimeTracker, pObject: ^IDeviceChild) -> HRESULT, + DestroyOwnedObject: proc "system" (this: ^ILifetimeTracker, pObject: ^IDeviceChild) -> HRESULT, } META_COMMAND_PARAMETER_TYPE :: enum i32 { @@ -2848,10 +2848,10 @@ IStateObjectProperties :: struct #raw_union { } 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), + GetShaderIdentifier: proc "system" (this: ^IStateObjectProperties, pExportName: [^]u16) -> rawptr, + GetShaderStackSize: proc "system" (this: ^IStateObjectProperties, pExportName: [^]u16) -> u64, + GetPipelineStackSize: proc "system" (this: ^IStateObjectProperties) -> u64, + SetPipelineStackSize: proc "system" (this: ^IStateObjectProperties, PipelineStackSizeInBytes: u64), } STATE_SUBOBJECT_TYPE :: enum i32 { @@ -3190,14 +3190,14 @@ IDevice5 :: struct #raw_union { } 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, + CreateLifetimeTracker: proc "system" (this: ^IDevice5, pOwner: ^ILifetimeOwner, riid: ^IID, ppvTracker: ^rawptr) -> HRESULT, + RemoveDevice: proc "system" (this: ^IDevice5), + EnumerateMetaCommands: proc "system" (this: ^IDevice5, pNumMetaCommands: ^u32, pDescs: ^META_COMMAND_DESC) -> HRESULT, + EnumerateMetaCommandParameters: proc "system" (this: ^IDevice5, CommandId: ^GUID, Stage: META_COMMAND_PARAMETER_STAGE, pTotalStructureSizeInBytes: ^u32, pParameterCount: ^u32, pParameterDescs: ^META_COMMAND_PARAMETER_DESC) -> HRESULT, + CreateMetaCommand: proc "system" (this: ^IDevice5, CommandId: ^GUID, NodeMask: u32, pCreationParametersData: rawptr, CreationParametersDataSizeInBytes: SIZE_T, riid: ^IID, ppMetaCommand: ^rawptr) -> HRESULT, + CreateStateObject: proc "system" (this: ^IDevice5, pDesc: ^STATE_OBJECT_DESC, riid: ^IID, ppStateObject: ^rawptr) -> HRESULT, + GetRaytracingAccelerationStructurePrebuildInfo: proc "system" (this: ^IDevice5, pDesc: ^BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS, pInfo: ^RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO), + CheckDriverMatchingIdentifier: proc "system" (this: ^IDevice5, SerializedDataType: SERIALIZED_DATA_TYPE, pIdentifierToCheck: ^SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER) -> DRIVER_MATCHING_IDENTIFIER_STATUS, } AUTO_BREADCRUMB_OP :: enum i32 { @@ -3397,9 +3397,9 @@ IDeviceRemovedExtendedDataSettings :: struct #raw_union { } 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), + SetAutoBreadcrumbsEnablement: proc "system" (this: ^IDeviceRemovedExtendedDataSettings, Enablement: DRED_ENABLEMENT), + SetPageFaultEnablement: proc "system" (this: ^IDeviceRemovedExtendedDataSettings, Enablement: DRED_ENABLEMENT), + SetWatsonDumpEnablement: proc "system" (this: ^IDeviceRemovedExtendedDataSettings, Enablement: DRED_ENABLEMENT), } @@ -3411,7 +3411,7 @@ IDeviceRemovedExtendedDataSettings1 :: struct #raw_union { } IDeviceRemovedExtendedDataSettings1_VTable :: struct { using id3d12deviceremovedextendeddatasettings_vtable: IDeviceRemovedExtendedDataSettings_VTable, - SetBreadcrumbContextEnablement: proc "stdcall" (this: ^IDeviceRemovedExtendedDataSettings1, Enablement: DRED_ENABLEMENT), + SetBreadcrumbContextEnablement: proc "system" (this: ^IDeviceRemovedExtendedDataSettings1, Enablement: DRED_ENABLEMENT), } @@ -3423,8 +3423,8 @@ IDeviceRemovedExtendedData :: struct #raw_union { } 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, + GetAutoBreadcrumbsOutput: proc "system" (this: ^IDeviceRemovedExtendedData, pOutput: ^DRED_AUTO_BREADCRUMBS_OUTPUT) -> HRESULT, + GetPageFaultAllocationOutput: proc "system" (this: ^IDeviceRemovedExtendedData, pOutput: ^DRED_PAGE_FAULT_OUTPUT) -> HRESULT, } @@ -3436,8 +3436,8 @@ IDeviceRemovedExtendedData1 :: struct #raw_union { } 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, + GetAutoBreadcrumbsOutput1: proc "system" (this: ^IDeviceRemovedExtendedData1, pOutput: ^DRED_AUTO_BREADCRUMBS_OUTPUT1) -> HRESULT, + GetPageFaultAllocationOutput1: proc "system" (this: ^IDeviceRemovedExtendedData1, pOutput: ^DRED_PAGE_FAULT_OUTPUT1) -> HRESULT, } BACKGROUND_PROCESSING_MODE :: enum i32 { @@ -3463,7 +3463,7 @@ IDevice6 :: struct #raw_union { } 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, + SetBackgroundProcessingMode: proc "system" (this: ^IDevice6, Mode: BACKGROUND_PROCESSING_MODE, MeasurementsAction: MEASUREMENTS_ACTION, hEventToSignalUponCompletion: HANDLE, pbFurtherMeasurementsDesired: ^BOOL) -> HRESULT, } FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPE_COUNT :: struct { @@ -3492,7 +3492,7 @@ IProtectedResourceSession1 :: struct #raw_union { } IProtectedResourceSession1_VTable :: struct { using id3d12protectedresourcesession_vtable: IProtectedResourceSession_VTable, - GetDesc1: proc "stdcall" (this: ^IProtectedResourceSession1) -> PROTECTED_RESOURCE_SESSION_DESC1, + GetDesc1: proc "system" (this: ^IProtectedResourceSession1) -> PROTECTED_RESOURCE_SESSION_DESC1, } @@ -3504,8 +3504,8 @@ IDevice7 :: struct #raw_union { } 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, + AddToStateObject: proc "system" (this: ^IDevice7, pAddition: ^STATE_OBJECT_DESC, pStateObjectToGrowFrom: ^IStateObject, riid: ^IID, ppNewStateObject: ^rawptr) -> HRESULT, + CreateProtectedResourceSession1: proc "system" (this: ^IDevice7, pDesc: ^PROTECTED_RESOURCE_SESSION_DESC1, riid: ^IID, ppSession: ^rawptr) -> HRESULT, } @@ -3517,11 +3517,11 @@ IDevice8 :: struct #raw_union { } IDevice8_VTable :: struct { using id3d12device7_vtable: IDevice7_VTable, - GetResourceAllocationInfo2: proc "stdcall" (this: ^IDevice8, RetVal: ^RESOURCE_ALLOCATION_INFO, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC1, pResourceAllocationInfo1: ^RESOURCE_ALLOCATION_INFO1), - 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), + GetResourceAllocationInfo2: proc "system" (this: ^IDevice8, RetVal: ^RESOURCE_ALLOCATION_INFO, visibleMask: u32, numResourceDescs: u32, pResourceDescs: ^RESOURCE_DESC1, pResourceAllocationInfo1: ^RESOURCE_ALLOCATION_INFO1), + CreateCommittedResource2: proc "system" (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 "system" (this: ^IDevice8, pHeap: ^IHeap, HeapOffset: u64, pDesc: ^RESOURCE_DESC1, InitialState: RESOURCE_STATES, pOptimizedClearValue: ^CLEAR_VALUE, riid: ^IID, ppvResource: ^rawptr) -> HRESULT, + CreateSamplerFeedbackUnorderedAccessView: proc "system" (this: ^IDevice8, pTargetedResource: ^IResource, pFeedbackResource: ^IResource, DestDescriptor: CPU_DESCRIPTOR_HANDLE), + GetCopyableFootprints1: proc "system" (this: ^IDevice8, pResourceDesc: ^RESOURCE_DESC1, FirstSubresource: u32, NumSubresources: u32, BaseOffset: u64, pLayouts: ^PLACED_SUBRESOURCE_FOOTPRINT, pNumRows: ^u32, pRowSizeInBytes: ^u64, pTotalBytes: ^u64), } @@ -3533,7 +3533,7 @@ IResource1 :: struct #raw_union { } IResource1_VTable :: struct { using id3d12resource_vtable: IResource_VTable, - GetProtectedResourceSession: proc "stdcall" (this: ^IResource1, riid: ^IID, ppProtectedSession: ^rawptr) -> HRESULT, + GetProtectedResourceSession: proc "system" (this: ^IResource1, riid: ^IID, ppProtectedSession: ^rawptr) -> HRESULT, } @@ -3545,7 +3545,7 @@ IResource2 :: struct #raw_union { } IResource2_VTable :: struct { using id3d12resource1_vtable: IResource1_VTable, - GetDesc1: proc "stdcall" (this: ^IResource2) -> RESOURCE_DESC1, + GetDesc1: proc "system" (this: ^IResource2) -> RESOURCE_DESC1, } @@ -3557,7 +3557,7 @@ IHeap1 :: struct #raw_union { } IHeap1_VTable :: struct { using id3d12heap_vtable: IHeap_VTable, - GetProtectedResourceSession: proc "stdcall" (this: ^IHeap1, riid: ^IID, ppProtectedSession: ^rawptr) -> HRESULT, + GetProtectedResourceSession: proc "system" (this: ^IHeap1, riid: ^IID, ppProtectedSession: ^rawptr) -> HRESULT, } @@ -3569,7 +3569,7 @@ IGraphicsCommandList3 :: struct #raw_union { } IGraphicsCommandList3_VTable :: struct { using id3d12graphicscommandlist2_vtable: IGraphicsCommandList2_VTable, - SetProtectedResourceSession: proc "stdcall" (this: ^IGraphicsCommandList3, pProtectedResourceSession: ^IProtectedResourceSession), + SetProtectedResourceSession: proc "system" (this: ^IGraphicsCommandList3, pProtectedResourceSession: ^IProtectedResourceSession), } RENDER_PASS_BEGINNING_ACCESS_TYPE :: enum i32 { @@ -3652,7 +3652,7 @@ IMetaCommand :: struct #raw_union { } IMetaCommand_VTable :: struct { using id3d12devicechild_vtable: IDeviceChild_VTable, - GetRequiredParameterResourceSize: proc "stdcall" (this: ^IMetaCommand, Stage: META_COMMAND_PARAMETER_STAGE, ParameterIndex: u32) -> u64, + GetRequiredParameterResourceSize: proc "system" (this: ^IMetaCommand, Stage: META_COMMAND_PARAMETER_STAGE, ParameterIndex: u32) -> u64, } DISPATCH_RAYS_DESC :: struct { @@ -3674,15 +3674,15 @@ IGraphicsCommandList4 :: struct #raw_union { } 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), + BeginRenderPass: proc "system" (this: ^IGraphicsCommandList4, NumRenderTargets: u32, pRenderTargets: ^RENDER_PASS_RENDER_TARGET_DESC, pDepthStencil: ^RENDER_PASS_DEPTH_STENCIL_DESC, Flags: RENDER_PASS_FLAGS), + EndRenderPass: proc "system" (this: ^IGraphicsCommandList4), + InitializeMetaCommand: proc "system" (this: ^IGraphicsCommandList4, pMetaCommand: ^IMetaCommand, pInitializationParametersData: rawptr, InitializationParametersDataSizeInBytes: SIZE_T), + ExecuteMetaCommand: proc "system" (this: ^IGraphicsCommandList4, pMetaCommand: ^IMetaCommand, pExecutionParametersData: rawptr, ExecutionParametersDataSizeInBytes: SIZE_T), + BuildRaytracingAccelerationStructure: proc "system" (this: ^IGraphicsCommandList4, pDesc: ^BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, NumPostbuildInfoDescs: u32, pPostbuildInfoDescs: ^RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC), + EmitRaytracingAccelerationStructurePostbuildInfo: proc "system" (this: ^IGraphicsCommandList4, pDesc: ^RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, NumSourceAccelerationStructures: u32, pSourceAccelerationStructureData: ^GPU_VIRTUAL_ADDRESS), + CopyRaytracingAccelerationStructure: proc "system" (this: ^IGraphicsCommandList4, DestAccelerationStructureData: GPU_VIRTUAL_ADDRESS, SourceAccelerationStructureData: GPU_VIRTUAL_ADDRESS, Mode: RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE), + SetPipelineState1: proc "system" (this: ^IGraphicsCommandList4, pStateObject: ^IStateObject), + DispatchRays: proc "system" (this: ^IGraphicsCommandList4, pDesc: ^DISPATCH_RAYS_DESC), } @@ -3694,8 +3694,8 @@ ITools :: struct #raw_union { } ITools_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - EnableShaderInstrumentation: proc "stdcall" (this: ^ITools, bEnable: BOOL), - ShaderInstrumentationEnabled: proc "stdcall" (this: ^ITools) -> BOOL, + EnableShaderInstrumentation: proc "system" (this: ^ITools, bEnable: BOOL), + ShaderInstrumentationEnabled: proc "system" (this: ^ITools) -> BOOL, } SUBRESOURCE_DATA :: struct { @@ -3719,7 +3719,7 @@ IDebug :: struct #raw_union { } IDebug_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - EnableDebugLayer: proc "stdcall" (this: ^IDebug), + EnableDebugLayer: proc "system" (this: ^IDebug), } GPU_BASED_VALIDATION_FLAGS :: distinct bit_set[GPU_BASED_VALIDATION_FLAG; u32] @@ -3736,9 +3736,9 @@ IDebug1 :: struct #raw_union { } 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), + EnableDebugLayer: proc "system" (this: ^IDebug1), + SetEnableGPUBasedValidation: proc "system" (this: ^IDebug1, Enable: BOOL), + SetEnableSynchronizedCommandQueueValidation: proc "system" (this: ^IDebug1, Enable: BOOL), } @@ -3749,7 +3749,7 @@ IDebug2 :: struct #raw_union { } IDebug2_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - SetGPUBasedValidationFlags: proc "stdcall" (this: ^IDebug2, Flags: GPU_BASED_VALIDATION_FLAGS), + SetGPUBasedValidationFlags: proc "system" (this: ^IDebug2, Flags: GPU_BASED_VALIDATION_FLAGS), } @@ -3761,9 +3761,9 @@ IDebug3 :: struct #raw_union { } 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), + SetEnableGPUBasedValidation: proc "system" (this: ^IDebug3, Enable: BOOL), + SetEnableSynchronizedCommandQueueValidation: proc "system" (this: ^IDebug3, Enable: BOOL), + SetGPUBasedValidationFlags: proc "system" (this: ^IDebug3, Flags: GPU_BASED_VALIDATION_FLAGS), } RLDO_FLAGS :: distinct bit_set[RLDO_FLAG; u32] @@ -3826,9 +3826,9 @@ IDebugDevice1 :: struct #raw_union { } 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, + SetDebugParameter: proc "system" (this: ^IDebugDevice1, Type: DEBUG_DEVICE_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT, + GetDebugParameter: proc "system" (this: ^IDebugDevice1, Type: DEBUG_DEVICE_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT, + ReportLiveDeviceObjects: proc "system" (this: ^IDebugDevice1, Flags: RLDO_FLAGS) -> HRESULT, } @@ -3840,9 +3840,9 @@ IDebugDevice :: struct #raw_union { } 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, + SetFeatureMask: proc "system" (this: ^IDebugDevice, Mask: DEBUG_FEATURE) -> HRESULT, + GetFeatureMask: proc "system" (this: ^IDebugDevice) -> DEBUG_FEATURE, + ReportLiveDeviceObjects: proc "system" (this: ^IDebugDevice, Flags: RLDO_FLAGS) -> HRESULT, } @@ -3854,8 +3854,8 @@ IDebugDevice2 :: struct #raw_union { } 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, + SetDebugParameter: proc "system" (this: ^IDebugDevice2, Type: DEBUG_DEVICE_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT, + GetDebugParameter: proc "system" (this: ^IDebugDevice2, Type: DEBUG_DEVICE_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT, } @@ -3867,7 +3867,7 @@ IDebugCommandQueue :: struct #raw_union { } IDebugCommandQueue_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - AssertResourceState: proc "stdcall" (this: ^IDebugCommandQueue, pResource: ^IResource, Subresource: u32, State: u32) -> BOOL, + AssertResourceState: proc "system" (this: ^IDebugCommandQueue, pResource: ^IResource, Subresource: u32, State: u32) -> BOOL, } DEBUG_COMMAND_LIST_PARAMETER_TYPE :: enum i32 { @@ -3887,9 +3887,9 @@ IDebugCommandList1 :: struct #raw_union { } 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, + AssertResourceState: proc "system" (this: ^IDebugCommandList1, pResource: ^IResource, Subresource: u32, State: u32) -> BOOL, + SetDebugParameter: proc "system" (this: ^IDebugCommandList1, Type: DEBUG_COMMAND_LIST_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT, + GetDebugParameter: proc "system" (this: ^IDebugCommandList1, Type: DEBUG_COMMAND_LIST_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT, } @@ -3901,9 +3901,9 @@ IDebugCommandList :: struct #raw_union { } 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, + AssertResourceState: proc "system" (this: ^IDebugCommandList, pResource: ^IResource, Subresource: u32, State: u32) -> BOOL, + SetFeatureMask: proc "system" (this: ^IDebugCommandList, Mask: DEBUG_FEATURE) -> HRESULT, + GetFeatureMask: proc "system" (this: ^IDebugCommandList) -> DEBUG_FEATURE, } @@ -3915,8 +3915,8 @@ IDebugCommandList2 :: struct #raw_union { } 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, + SetDebugParameter: proc "system" (this: ^IDebugCommandList2, Type: DEBUG_COMMAND_LIST_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT, + GetDebugParameter: proc "system" (this: ^IDebugCommandList2, Type: DEBUG_COMMAND_LIST_PARAMETER_TYPE, pData: rawptr, DataSize: u32) -> HRESULT, } @@ -3928,10 +3928,10 @@ ISharingContract :: struct #raw_union { } 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), + Present: proc "system" (this: ^ISharingContract, pResource: ^IResource, Subresource: u32, window: HWND), + SharedFenceSignal: proc "system" (this: ^ISharingContract, pFence: ^IFence, FenceValue: u64), + BeginCapturableWork: proc "system" (this: ^ISharingContract, guid: ^GUID), + EndCapturableWork: proc "system" (this: ^ISharingContract, guid: ^GUID), } MESSAGE_CATEGORY :: enum i32 { @@ -4834,41 +4834,41 @@ IInfoQueue :: struct #raw_union { } 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, + SetMessageCountLimit: proc "system" (this: ^IInfoQueue, MessageCountLimit: u64) -> HRESULT, + ClearStoredMessages: proc "system" (this: ^IInfoQueue), + GetMessageA: proc "system" (this: ^IInfoQueue, MessageIndex: u64, pMessage: ^MESSAGE, pMessageByteLength: ^SIZE_T) -> HRESULT, + GetNumMessagesAllowedByStorageFilter: proc "system" (this: ^IInfoQueue) -> u64, + GetNumMessagesDeniedByStorageFilter: proc "system" (this: ^IInfoQueue) -> u64, + GetNumStoredMessages: proc "system" (this: ^IInfoQueue) -> u64, + GetNumStoredMessagesAllowedByRetrievalFilter: proc "system" (this: ^IInfoQueue) -> u64, + GetNumMessagesDiscardedByMessageCountLimit: proc "system" (this: ^IInfoQueue) -> u64, + GetMessageCountLimit: proc "system" (this: ^IInfoQueue) -> u64, + AddStorageFilterEntries: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + GetStorageFilter: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, + ClearStorageFilter: proc "system" (this: ^IInfoQueue), + PushEmptyStorageFilter: proc "system" (this: ^IInfoQueue) -> HRESULT, + PushCopyOfStorageFilter: proc "system" (this: ^IInfoQueue) -> HRESULT, + PushStorageFilter: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + PopStorageFilter: proc "system" (this: ^IInfoQueue), + GetStorageFilterStackSize: proc "system" (this: ^IInfoQueue) -> u32, + AddRetrievalFilterEntries: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + GetRetrievalFilter: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER, pFilterByteLength: ^SIZE_T) -> HRESULT, + ClearRetrievalFilter: proc "system" (this: ^IInfoQueue), + PushEmptyRetrievalFilter: proc "system" (this: ^IInfoQueue) -> HRESULT, + PushCopyOfRetrievalFilter: proc "system" (this: ^IInfoQueue) -> HRESULT, + PushRetrievalFilter: proc "system" (this: ^IInfoQueue, pFilter: ^INFO_QUEUE_FILTER) -> HRESULT, + PopRetrievalFilter: proc "system" (this: ^IInfoQueue), + GetRetrievalFilterStackSize: proc "system" (this: ^IInfoQueue) -> u32, + AddMessage: proc "system" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY, Severity: MESSAGE_SEVERITY, ID: MESSAGE_ID, pDescription: cstring) -> HRESULT, + AddApplicationMessage: proc "system" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY, pDescription: cstring) -> HRESULT, + SetBreakOnCategory: proc "system" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY, bEnable: BOOL) -> HRESULT, + SetBreakOnSeverity: proc "system" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY, bEnable: BOOL) -> HRESULT, + SetBreakOnID: proc "system" (this: ^IInfoQueue, ID: MESSAGE_ID, bEnable: BOOL) -> HRESULT, + GetBreakOnCategory: proc "system" (this: ^IInfoQueue, Category: MESSAGE_CATEGORY) -> BOOL, + GetBreakOnSeverity: proc "system" (this: ^IInfoQueue, Severity: MESSAGE_SEVERITY) -> BOOL, + GetBreakOnID: proc "system" (this: ^IInfoQueue, ID: MESSAGE_ID) -> BOOL, + SetMuteDebugOutput: proc "system" (this: ^IInfoQueue, bMute: BOOL), + GetMuteDebugOutput: proc "system" (this: ^IInfoQueue) -> BOOL, } MESSAGE_CALLBACK_FLAGS :: distinct bit_set[MESSAGE_CALLBACK_FLAG; u32] @@ -4886,8 +4886,8 @@ IInfoQueue1 :: struct #raw_union { } IInfoQueue1_VTable :: struct { using idxgiinfoqueue_vtable: IInfoQueue_VTable, - RegisterMessageCallback: proc "stdcall" (this: ^IInfoQueue1, CallbackFunc: PFN_MESSAGE_CALLBACK, CallbackFilterFlags: MESSAGE_CALLBACK_FLAGS, pContext: rawptr, pCallbackCookie: ^u32) -> HRESULT, - UnregisterMessageCallback: proc "stdcall" (this: ^IInfoQueue1, pCallbackCookie: u32) -> HRESULT, + RegisterMessageCallback: proc "system" (this: ^IInfoQueue1, CallbackFunc: PFN_MESSAGE_CALLBACK, CallbackFilterFlags: MESSAGE_CALLBACK_FLAGS, pContext: rawptr, pCallbackCookie: ^u32) -> HRESULT, + UnregisterMessageCallback: proc "system" (this: ^IInfoQueue1, pCallbackCookie: u32) -> HRESULT, } PFN_CREATE_DEVICE :: #type proc "c" (a0: ^IUnknown, a1: FEATURE_LEVEL, a2: ^IID, a3: ^rawptr) -> HRESULT @@ -4926,8 +4926,8 @@ IGraphicsCommandList5 :: struct #raw_union { } 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), + RSSetShadingRate: proc "system" (this: ^IGraphicsCommandList5, baseShadingRate: SHADING_RATE, combiners: ^SHADING_RATE_COMBINER), + RSSetShadingRateImage: proc "system" (this: ^IGraphicsCommandList5, shadingRateImage: ^IResource), } DISPATCH_MESH_ARGUMENTS :: struct { @@ -4945,7 +4945,7 @@ IGraphicsCommandList6 :: struct #raw_union { } IGraphicsCommandList6_VTable :: struct { using id3d12graphicscommandlist5_vtable: IGraphicsCommandList5_VTable, - DispatchMesh: proc "stdcall" (this: ^IGraphicsCommandList6, ThreadGroupCountX: u32, ThreadGroupCountY: u32, ThreadGroupCountZ: u32), + DispatchMesh: proc "system" (this: ^IGraphicsCommandList6, ThreadGroupCountX: u32, ThreadGroupCountY: u32, ThreadGroupCountZ: u32), } SHADER_VERSION_TYPE :: enum u32 { @@ -5187,17 +5187,17 @@ IShaderReflectionType :: struct { using id3d12shaderreflectiontype_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, + GetDesc: proc "system" (this: ^IShaderReflectionType, pDesc: ^SHADER_TYPE_DESC) -> HRESULT, + GetMemberTypeByIndex: proc "system" (this: ^IShaderReflectionType, Index: u32) -> ^IShaderReflectionType, + GetMemberTypeByName: proc "system" (this: ^IShaderReflectionType, Name: cstring) -> ^IShaderReflectionType, + GetMemberTypeName: proc "system" (this: ^IShaderReflectionType, Index: u32) -> cstring, + IsEqual: proc "system" (this: ^IShaderReflectionType, pType: ^IShaderReflectionType) -> HRESULT, + GetSubType: proc "system" (this: ^IShaderReflectionType) -> ^IShaderReflectionType, + GetBaseClass: proc "system" (this: ^IShaderReflectionType) -> ^IShaderReflectionType, + GetNumInterfaces: proc "system" (this: ^IShaderReflectionType) -> u32, + GetInterfaceByIndex: proc "system" (this: ^IShaderReflectionType, uIndex: u32) -> ^IShaderReflectionType, + IsOfType: proc "system" (this: ^IShaderReflectionType, pType: ^IShaderReflectionType) -> HRESULT, + ImplementsInterface: proc "system" (this: ^IShaderReflectionType, pBase: ^IShaderReflectionType) -> HRESULT, } IShaderReflectionVariable_UUID_STRING :: "8337A8A6-A216-444A-B2F4-314733A73AEA" @@ -5206,10 +5206,10 @@ IShaderReflectionVariable :: struct { using id3d12shaderreflectionvariable_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, + GetDesc: proc "system" (this: ^IShaderReflectionVariable, pDesc: ^SHADER_VARIABLE_DESC) -> HRESULT, + GetType: proc "system" (this: ^IShaderReflectionVariable) -> ^IShaderReflectionType, + GetBuffer: proc "system" (this: ^IShaderReflectionVariable) -> ^IShaderReflectionConstantBuffer, + GetInterfaceSlot: proc "system" (this: ^IShaderReflectionVariable, uArrayIndex: u32) -> u32, } IShaderReflectionConstantBuffer_UUID_STRING :: "C59598B4-48B3-4869-B9B1-B1618B14A8B7" @@ -5218,9 +5218,9 @@ IShaderReflectionConstantBuffer :: struct { using id3d12shaderreflectionconstantbuffer_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, + GetDesc: proc "system" (this: ^IShaderReflectionConstantBuffer, pDesc: ^SHADER_BUFFER_DESC) -> HRESULT, + GetVariableByIndex: proc "system" (this: ^IShaderReflectionConstantBuffer, Index: u32) -> ^IShaderReflectionVariable, + GetVariableByName: proc "system" (this: ^IShaderReflectionConstantBuffer, Name: cstring) -> ^IShaderReflectionVariable, } IShaderReflection_UUID_STRING :: "5A58797D-A72C-478D-8BA2-EFC6B0EFE88E" @@ -5231,25 +5231,25 @@ IShaderReflection :: struct #raw_union { } 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) -> SHADER_REQUIRES_FLAGS, + GetDesc: proc "system" (this: ^IShaderReflection, pDesc: ^SHADER_DESC) -> HRESULT, + GetConstantBufferByIndex: proc "system" (this: ^IShaderReflection, Index: u32) -> ^IShaderReflectionConstantBuffer, + GetConstantBufferByName: proc "system" (this: ^IShaderReflection, Name: cstring) -> ^IShaderReflectionConstantBuffer, + GetResourceBindingDesc: proc "system" (this: ^IShaderReflection, ResourceIndex: u32, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT, + GetInputParameterDesc: proc "system" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT, + GetOutputParameterDesc: proc "system" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT, + GetPatchConstantParameterDesc: proc "system" (this: ^IShaderReflection, ParameterIndex: u32, pDesc: ^SIGNATURE_PARAMETER_DESC) -> HRESULT, + GetVariableByName: proc "system" (this: ^IShaderReflection, Name: cstring) -> ^IShaderReflectionVariable, + GetResourceBindingDescByName: proc "system" (this: ^IShaderReflection, Name: cstring, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT, + GetMovInstructionCount: proc "system" (this: ^IShaderReflection) -> u32, + GetMovcInstructionCount: proc "system" (this: ^IShaderReflection) -> u32, + GetConversionInstructionCount: proc "system" (this: ^IShaderReflection) -> u32, + GetBitwiseInstructionCount: proc "system" (this: ^IShaderReflection) -> u32, + GetGSInputPrimitive: proc "system" (this: ^IShaderReflection) -> PRIMITIVE, + IsSampleFrequencyShader: proc "system" (this: ^IShaderReflection) -> BOOL, + GetNumInterfaceSlots: proc "system" (this: ^IShaderReflection) -> u32, + GetMinFeatureLevel: proc "system" (this: ^IShaderReflection, pLevel: ^FEATURE_LEVEL) -> HRESULT, + GetThreadGroupSize: proc "system" (this: ^IShaderReflection, pSizeX: ^u32, pSizeY: ^u32, pSizeZ: ^u32) -> u32, + GetRequiresFlags: proc "system" (this: ^IShaderReflection) -> SHADER_REQUIRES_FLAGS, } ILibraryReflection_UUID_STRING :: "8E349D19-54DB-4A56-9DC9-119D87BDB804" @@ -5260,8 +5260,8 @@ ILibraryReflection :: struct #raw_union { } 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, + GetDesc: proc "system" (this: ^ILibraryReflection, pDesc: ^LIBRARY_DESC) -> HRESULT, + GetFunctionByIndex: proc "system" (this: ^ILibraryReflection, FunctionIndex: i32) -> ^IFunctionReflection, } IFunctionReflection_UUID_STRING :: "1108795C-2772-4BA9-B2A8-D464DC7E2799" @@ -5270,13 +5270,13 @@ IFunctionReflection :: struct { using id3d12functionreflection_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, + GetDesc: proc "system" (this: ^IFunctionReflection, pDesc: ^FUNCTION_DESC) -> HRESULT, + GetConstantBufferByIndex: proc "system" (this: ^IFunctionReflection, BufferIndex: u32) -> ^IShaderReflectionConstantBuffer, + GetConstantBufferByName: proc "system" (this: ^IFunctionReflection, Name: cstring) -> ^IShaderReflectionConstantBuffer, + GetResourceBindingDesc: proc "system" (this: ^IFunctionReflection, ResourceIndex: u32, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT, + GetVariableByName: proc "system" (this: ^IFunctionReflection, Name: cstring) -> ^IShaderReflectionVariable, + GetResourceBindingDescByName: proc "system" (this: ^IFunctionReflection, Name: cstring, pDesc: ^SHADER_INPUT_BIND_DESC) -> HRESULT, + GetFunctionParameter: proc "system" (this: ^IFunctionReflection, ParameterIndex: i32) -> ^IFunctionParameterReflection, } IFunctionParameterReflection_UUID_STRING :: "EC25F42D-7006-4F2B-B33E-02CC3375733F" @@ -5285,5 +5285,5 @@ IFunctionParameterReflection :: struct { using id3d12functionparameterreflection_vtable: ^IFunctionParameterReflection_VTable, } IFunctionParameterReflection_VTable :: struct { - GetDesc: proc "stdcall" (this: ^IFunctionParameterReflection, pDesc: ^PARAMETER_DESC) -> HRESULT, + GetDesc: proc "system" (this: ^IFunctionParameterReflection, pDesc: ^PARAMETER_DESC) -> HRESULT, } diff --git a/vendor/directx/d3d_compiler/d3d_compiler.odin b/vendor/directx/d3d_compiler/d3d_compiler.odin index 90af520c2..f54ba3555 100644 --- a/vendor/directx/d3d_compiler/d3d_compiler.odin +++ b/vendor/directx/d3d_compiler/d3d_compiler.odin @@ -15,7 +15,7 @@ HRESULT :: dxgi.HRESULT IUnknown :: dxgi.IUnknown IUnknown_VTable :: dxgi.IUnknown_VTable -@(default_calling_convention="stdcall", link_prefix="D3D") +@(default_calling_convention="system", link_prefix="D3D") foreign d3dcompiler { ReadFileToBlob :: proc(pFileName: [^]u16, ppContents: ^^ID3DBlob) -> HRESULT --- WriteBlobToFile :: proc(pBlob: ^ID3DBlob, pFileName: [^]u16, bOverwrite: BOOL) -> HRESULT --- @@ -124,8 +124,8 @@ ID3D10Blob :: struct #raw_union { } ID3D10Blob_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - GetBufferPointer: proc "stdcall" (this: ^ID3D10Blob) -> rawptr, - GetBufferSize: proc "stdcall" (this: ^ID3D10Blob) -> SIZE_T, + GetBufferPointer: proc "system" (this: ^ID3D10Blob) -> rawptr, + GetBufferSize: proc "system" (this: ^ID3D10Blob) -> SIZE_T, } @@ -145,8 +145,8 @@ 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, + Open: proc "system" (this: ^ID3DInclude, IncludeType: INCLUDE_TYPE, pFileName: cstring, pParentData: rawptr, ppData: ^rawptr, pBytes: ^u32) -> HRESULT, + Close: proc "system" (this: ^ID3DInclude, pData: rawptr) -> HRESULT, } // Default file includer @@ -159,7 +159,7 @@ ID3D11Module :: struct #raw_union { } ID3D11Module_VTable :: struct { using iunknown_vtable: IUnknown_VTable, - CreateInstance: proc "stdcall" (this: ^ID3D11Module, pNamespace: cstring, ppModuleInstance: ^^ID3D11ModuleInstance) -> HRESULT, + CreateInstance: proc "system" (this: ^ID3D11Module, pNamespace: cstring, ppModuleInstance: ^^ID3D11ModuleInstance) -> HRESULT, } @@ -169,16 +169,16 @@ ID3D11ModuleInstance :: struct #raw_union { } 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, + BindConstantBuffer: proc "system" (this: ^ID3D11ModuleInstance, uSrcSlot: u32, uDstSlot: u32, cbDstOffset: u32) -> HRESULT, + BindConstantBufferByName: proc "system" (this: ^ID3D11ModuleInstance, pName: cstring, uDstSlot: u32, cbDstOffset: u32) -> HRESULT, + BindResource: proc "system" (this: ^ID3D11ModuleInstance, uSrcSlot: u32, uDstSlot: u32, uCount: u32) -> HRESULT, + BindResourceByName: proc "system" (this: ^ID3D11ModuleInstance, pName: cstring, uDstSlot: u32, uCount: u32) -> HRESULT, + BindSampler: proc "system" (this: ^ID3D11ModuleInstance, uSrcSlot: u32, uDstSlot: u32, uCount: u32) -> HRESULT, + BindSamplerByName: proc "system" (this: ^ID3D11ModuleInstance, pName: cstring, uDstSlot: u32, uCount: u32) -> HRESULT, + BindUnorderedAccessView: proc "system" (this: ^ID3D11ModuleInstance, uSrcSlot: u32, uDstSlot: u32, uCount: u32) -> HRESULT, + BindUnorderedAccessViewByName: proc "system" (this: ^ID3D11ModuleInstance, pName: cstring, uDstSlot: u32, uCount: u32) -> HRESULT, + BindResourceAsUnorderedAccessView: proc "system" (this: ^ID3D11ModuleInstance, uSrcSrvSlot: u32, uDstUavSlot: u32, uCount: u32) -> HRESULT, + BindResourceAsUnorderedAccessViewByName: proc "system" (this: ^ID3D11ModuleInstance, pSrvName: cstring, uDstUavSlot: u32, uCount: u32) -> HRESULT, } @@ -188,9 +188,9 @@ ID3D11Linker :: struct #raw_union { } 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, + Link: proc "system" (this: ^ID3D11Linker, pEntry: ^ID3D11ModuleInstance, pEntryName: cstring, pTargetName: cstring, uFlags: u32, ppShaderBlob: ^^ID3DBlob, ppErrorBuffer: ^^ID3DBlob) -> HRESULT, + UseLibrary: proc "system" (this: ^ID3D11Linker, pLibraryMI: ^ID3D11ModuleInstance) -> HRESULT, + AddClipPlaneFromCBuffer: proc "system" (this: ^ID3D11Linker, uCBufferSlot: u32, uCBufferEntry: u32) -> HRESULT, } From 75c659fa418b963f66c2e863992d1e7bb257d654 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 17:04:54 +0000 Subject: [PATCH 47/57] Change `stdcall` -> `system` --- core/sys/windows/advapi32.odin | 4 +- core/sys/windows/bcrypt.odin | 2 +- core/sys/windows/bluetooth.odin | 2 +- core/sys/windows/comctl32.odin | 2 +- core/sys/windows/comdlg32.odin | 4 +- core/sys/windows/dbghelp.odin | 4 +- core/sys/windows/dwmapi.odin | 2 +- core/sys/windows/gdi32.odin | 2 +- core/sys/windows/hidpi.odin | 2 +- core/sys/windows/kernel32.odin | 40 ++-- core/sys/windows/netapi32.odin | 2 +- core/sys/windows/ntdll.odin | 2 +- core/sys/windows/ole32.odin | 8 +- core/sys/windows/shell32.odin | 2 +- core/sys/windows/shlwapi.odin | 2 +- core/sys/windows/synchronization.odin | 2 +- core/sys/windows/types.odin | 322 +++++++++++++------------- core/sys/windows/user32.odin | 10 +- core/sys/windows/userenv.odin | 2 +- core/sys/windows/ux_theme.odin | 2 +- core/sys/windows/wgl.odin | 2 +- core/sys/windows/winmm.odin | 2 +- core/sys/windows/ws2_32.odin | 2 +- 23 files changed, 212 insertions(+), 212 deletions(-) diff --git a/core/sys/windows/advapi32.odin b/core/sys/windows/advapi32.odin index 86e173211..163bf2a5e 100644 --- a/core/sys/windows/advapi32.odin +++ b/core/sys/windows/advapi32.odin @@ -5,7 +5,7 @@ foreign import advapi32 "system:Advapi32.lib" HCRYPTPROV :: distinct HANDLE -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign advapi32 { @(link_name = "SystemFunction036") RtlGenRandom :: proc(RandomBuffer: ^u8, RandomBufferLength: ULONG) -> BOOLEAN --- @@ -24,7 +24,7 @@ foreign advapi32 { } // Necessary to create a token to impersonate a user with for CreateProcessAsUser -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign advapi32 { LogonUserW :: proc( lpszUsername: LPCWSTR, diff --git a/core/sys/windows/bcrypt.odin b/core/sys/windows/bcrypt.odin index 52eb4b1b6..d891aa92b 100644 --- a/core/sys/windows/bcrypt.odin +++ b/core/sys/windows/bcrypt.odin @@ -5,7 +5,7 @@ foreign import bcrypt "system:Bcrypt.lib" BCRYPT_USE_SYSTEM_PREFERRED_RNG: DWORD : 0x00000002 -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign bcrypt { BCryptGenRandom :: proc(hAlgorithm: LPVOID, pBuffer: [^]u8, cbBuffer: ULONG, dwFlags: ULONG) -> LONG --- } diff --git a/core/sys/windows/bluetooth.odin b/core/sys/windows/bluetooth.odin index c2534896b..7bfb7ea96 100644 --- a/core/sys/windows/bluetooth.odin +++ b/core/sys/windows/bluetooth.odin @@ -51,7 +51,7 @@ BLUETOOTH_DEVICE_INFO :: struct { name: [BLUETOOTH_MAX_NAME_SIZE]u16, // Name of the device } -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign bthprops { /* Version diff --git a/core/sys/windows/comctl32.odin b/core/sys/windows/comctl32.odin index 983c45d36..9c4404a9d 100644 --- a/core/sys/windows/comctl32.odin +++ b/core/sys/windows/comctl32.odin @@ -3,7 +3,7 @@ package sys_windows foreign import "system:Comctl32.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign Comctl32 { LoadIconWithScaleDown :: proc(hinst: HINSTANCE, pszName: PCWSTR, cx: c_int, cy: c_int, phico: ^HICON) -> HRESULT --- } diff --git a/core/sys/windows/comdlg32.odin b/core/sys/windows/comdlg32.odin index 8284050f1..30d9b169c 100644 --- a/core/sys/windows/comdlg32.odin +++ b/core/sys/windows/comdlg32.odin @@ -3,7 +3,7 @@ package sys_windows foreign import "system:Comdlg32.lib" -LPOFNHOOKPROC :: #type proc "stdcall" (hdlg: HWND, msg: u32, wparam: WPARAM, lparam: LPARAM) -> UINT_PTR +LPOFNHOOKPROC :: #type proc "system" (hdlg: HWND, msg: u32, wparam: WPARAM, lparam: LPARAM) -> UINT_PTR OPENFILENAMEW :: struct { lStructSize: DWORD, @@ -31,7 +31,7 @@ OPENFILENAMEW :: struct { FlagsEx: DWORD, } -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign Comdlg32 { GetOpenFileNameW :: proc(arg1: ^OPENFILENAMEW) -> BOOL --- GetSaveFileNameW :: proc(arg1: ^OPENFILENAMEW) -> BOOL --- diff --git a/core/sys/windows/dbghelp.odin b/core/sys/windows/dbghelp.odin index 7c63b845b..c2e506748 100644 --- a/core/sys/windows/dbghelp.odin +++ b/core/sys/windows/dbghelp.odin @@ -44,7 +44,7 @@ MINIDUMP_USER_STREAM_INFORMATION :: struct { UserStreamArray: ^MINIDUMP_USER_STREAM, } -MINIDUMP_CALLBACK_ROUTINE :: #type proc "stdcall" ( +MINIDUMP_CALLBACK_ROUTINE :: #type proc "system" ( CallbackParam: PVOID, CallbackInput: ^MINIDUMP_CALLBACK_INPUT, CallbackOutpu: ^MINIDUMP_CALLBACK_OUTPUT, @@ -228,7 +228,7 @@ MINIDUMP_TYPE :: enum u32 { ValidTypeFlags = 0x01ffffff, } -@(default_calling_convention = "stdcall") +@(default_calling_convention = "system") foreign Dbghelp { MiniDumpWriteDump :: proc( hProcess: HANDLE, diff --git a/core/sys/windows/dwmapi.odin b/core/sys/windows/dwmapi.odin index 34616fb98..91911baae 100644 --- a/core/sys/windows/dwmapi.odin +++ b/core/sys/windows/dwmapi.odin @@ -38,7 +38,7 @@ DWMNCRENDERINGPOLICY :: enum { DWMNCRP_LAST, } -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign dwmapi { DwmFlush :: proc() -> HRESULT --- DwmIsCompositionEnabled :: proc(pfEnabled: ^BOOL) -> HRESULT --- diff --git a/core/sys/windows/gdi32.odin b/core/sys/windows/gdi32.odin index 801e483e7..1d2be6dab 100644 --- a/core/sys/windows/gdi32.odin +++ b/core/sys/windows/gdi32.odin @@ -3,7 +3,7 @@ package sys_windows foreign import gdi32 "system:Gdi32.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign gdi32 { GetStockObject :: proc(i: c_int) -> HGDIOBJ --- SelectObject :: proc(hdc: HDC, h: HGDIOBJ) -> HGDIOBJ --- diff --git a/core/sys/windows/hidpi.odin b/core/sys/windows/hidpi.odin index 8f1a75247..f862971f4 100644 --- a/core/sys/windows/hidpi.odin +++ b/core/sys/windows/hidpi.odin @@ -124,7 +124,7 @@ HIDP_REPORT_TYPE :: enum c.int { HIDP_STATUS_SUCCESS : NTSTATUS : 0x110000 foreign import hid "system:hid.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign hid { HidP_GetCaps :: proc(PreparsedData: PHIDP_PREPARSED_DATA, Capabilities: PHIDP_CAPS) -> NTSTATUS --- HidP_GetButtonCaps :: proc(ReportType: HIDP_REPORT_TYPE, ButtonCaps: PHIDP_BUTTON_CAPS, ButtonCapsLength: PUSHORT, PreparsedData: PHIDP_PREPARSED_DATA) -> NTSTATUS --- diff --git a/core/sys/windows/kernel32.odin b/core/sys/windows/kernel32.odin index 6108f4738..390af3ab8 100644 --- a/core/sys/windows/kernel32.odin +++ b/core/sys/windows/kernel32.odin @@ -21,7 +21,7 @@ COMMON_LVB_REVERSE_VIDEO :: WORD(0x4000) COMMON_LVB_UNDERSCORE :: WORD(0x8000) COMMON_LVB_SBCSDBCS :: WORD(0x0300) -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { OutputDebugStringA :: proc(lpOutputString: LPCSTR) --- // The only A thing that is allowed OutputDebugStringW :: proc(lpOutputString: LPCWSTR) --- @@ -112,7 +112,7 @@ foreign kernel32 { CreateThread :: proc( lpThreadAttributes: LPSECURITY_ATTRIBUTES, dwStackSize: SIZE_T, - lpStartAddress: proc "stdcall" (rawptr) -> DWORD, + lpStartAddress: proc "system" (rawptr) -> DWORD, lpParameter: LPVOID, dwCreationFlags: DWORD, lpThreadId: LPDWORD, @@ -121,7 +121,7 @@ foreign kernel32 { hProcess: HANDLE, lpThreadAttributes: LPSECURITY_ATTRIBUTES, dwStackSize: SIZE_T, - lpStartAddress: proc "stdcall" (rawptr) -> DWORD, + lpStartAddress: proc "system" (rawptr) -> DWORD, lpParameter: LPVOID, dwCreationFlags: DWORD, lpThreadId: LPDWORD, @@ -581,7 +581,7 @@ MEM_TOP_DOWN :: 0x100000 MEM_LARGE_PAGES :: 0x20000000 MEM_4MB_PAGES :: 0x80000000 -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { VirtualAlloc :: proc( lpAddress: LPVOID, @@ -724,7 +724,7 @@ LowMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.LowMemoryRes HighMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.HighMemoryResourceNotification -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { CreateMemoryResourceNotification :: proc( NotificationType: MEMORY_RESOURCE_NOTIFICATION_TYPE, @@ -740,7 +740,7 @@ FILE_CACHE_MAX_HARD_DISABLE :: DWORD(0x00000002) FILE_CACHE_MIN_HARD_ENABLE :: DWORD(0x00000004) FILE_CACHE_MIN_HARD_DISABLE :: DWORD(0x00000008) -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { GetSystemFileCacheSize :: proc( lpMinimumFileCacheSize: PSIZE_T, @@ -770,7 +770,7 @@ WIN32_MEMORY_RANGE_ENTRY :: struct { PWIN32_MEMORY_RANGE_ENTRY :: ^WIN32_MEMORY_RANGE_ENTRY -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { PrefetchVirtualMemory :: proc( hProcess: HANDLE, @@ -828,23 +828,23 @@ foreign kernel32 { MEHC_PATROL_SCRUBBER_PRESENT :: ULONG(0x1) -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { GetMemoryErrorHandlingCapabilities :: proc( Capabilities: PULONG, ) -> BOOL --- } -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { GlobalMemoryStatusEx :: proc( lpBuffer: ^MEMORYSTATUSEX, ) -> BOOL --- } -PBAD_MEMORY_CALLBACK_ROUTINE :: #type proc "stdcall" () +PBAD_MEMORY_CALLBACK_ROUTINE :: #type proc "system" () -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { RegisterBadMemoryNotification :: proc( Callback: PBAD_MEMORY_CALLBACK_ROUTINE, @@ -865,7 +865,7 @@ VmOfferPriorityLow :: OFFER_PRIORITY.VmOfferPriorityLow VmOfferPriorityBelowNormal :: OFFER_PRIORITY.VmOfferPriorityBelowNormal VmOfferPriorityNormal :: OFFER_PRIORITY.VmOfferPriorityNormal -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { OfferVirtualMemory :: proc( VirtualAddress: PVOID, @@ -930,7 +930,7 @@ WIN32_MEMORY_REGION_INFORMATION_u_s_Bitfield :: distinct ULONG Reserved : 32-6, }*/ -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign one_core { QueryVirtualMemoryInformation :: proc( Process: HANDLE, @@ -955,7 +955,7 @@ foreign one_core { NUMA_NO_PREFERRED_NODE :: 0xffffffff -MapViewOfFile2 :: #force_inline proc "stdcall" ( +MapViewOfFile2 :: #force_inline proc "system" ( FileMappingHandle: HANDLE, ProcessHandle: HANDLE, Offset: ULONG64, @@ -976,7 +976,7 @@ MapViewOfFile2 :: #force_inline proc "stdcall" ( ) } -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { UnmapViewOfFile2 :: proc( ProcessHandle: HANDLE, @@ -985,7 +985,7 @@ foreign kernel32 { ) -> BOOL --- } -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { GetProductInfo :: proc( OSMajorVersion: DWORD, @@ -996,7 +996,7 @@ foreign kernel32 { ) -> BOOL --- } -HandlerRoutine :: proc "stdcall" (dwCtrlType: DWORD) -> BOOL +HandlerRoutine :: proc "system" (dwCtrlType: DWORD) -> BOOL PHANDLER_ROUTINE :: HandlerRoutine @@ -1137,16 +1137,16 @@ DCB :: struct { wReserved1: WORD, } -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { GetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL --- SetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL --- } -LPFIBER_START_ROUTINE :: #type proc "stdcall" (lpFiberParameter: LPVOID) +LPFIBER_START_ROUTINE :: #type proc "system" (lpFiberParameter: LPVOID) -@(default_calling_convention = "stdcall") +@(default_calling_convention = "system") foreign kernel32 { CreateFiber :: proc(dwStackSize: SIZE_T, lpStartAddress: LPFIBER_START_ROUTINE, lpParameter: LPVOID) -> LPVOID --- DeleteFiber :: proc(lpFiber: LPVOID) --- diff --git a/core/sys/windows/netapi32.odin b/core/sys/windows/netapi32.odin index 0df277181..d9f75c623 100644 --- a/core/sys/windows/netapi32.odin +++ b/core/sys/windows/netapi32.odin @@ -3,7 +3,7 @@ package sys_windows foreign import netapi32 "system:Netapi32.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign netapi32 { NetUserAdd :: proc( servername: wstring, diff --git a/core/sys/windows/ntdll.odin b/core/sys/windows/ntdll.odin index dda5b9711..56c24f1a2 100644 --- a/core/sys/windows/ntdll.odin +++ b/core/sys/windows/ntdll.odin @@ -3,7 +3,7 @@ package sys_windows foreign import ntdll_lib "system:ntdll.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign ntdll_lib { RtlGetVersion :: proc(lpVersionInformation: ^OSVERSIONINFOEXW) -> NTSTATUS --- } \ No newline at end of file diff --git a/core/sys/windows/ole32.odin b/core/sys/windows/ole32.odin index ce13f2ddf..6fa398d46 100644 --- a/core/sys/windows/ole32.odin +++ b/core/sys/windows/ole32.odin @@ -14,14 +14,14 @@ IUnknown :: struct { using Vtbl: ^IUnknownVtbl, } IUnknownVtbl :: struct { - QueryInterface: proc "stdcall" (This: ^IUnknown, riid: REFIID, ppvObject: ^rawptr) -> HRESULT, - AddRef: proc "stdcall" (This: ^IUnknown) -> ULONG, - Release: proc "stdcall" (This: ^IUnknown) -> ULONG, + QueryInterface: proc "system" (This: ^IUnknown, riid: REFIID, ppvObject: ^rawptr) -> HRESULT, + AddRef: proc "system" (This: ^IUnknown) -> ULONG, + Release: proc "system" (This: ^IUnknown) -> ULONG, } LPUNKNOWN :: ^IUnknown -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign Ole32 { CoInitializeEx :: proc(reserved: rawptr, co_init: COINIT) -> HRESULT --- CoUninitialize :: proc() --- diff --git a/core/sys/windows/shell32.odin b/core/sys/windows/shell32.odin index 2d2b257df..358b8482f 100644 --- a/core/sys/windows/shell32.odin +++ b/core/sys/windows/shell32.odin @@ -3,7 +3,7 @@ package sys_windows foreign import shell32 "system:Shell32.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign shell32 { CommandLineToArgvW :: proc(cmd_list: wstring, num_args: ^c_int) -> ^wstring --- ShellExecuteW :: proc( diff --git a/core/sys/windows/shlwapi.odin b/core/sys/windows/shlwapi.odin index 241ade8f6..bf9d2d1e8 100644 --- a/core/sys/windows/shlwapi.odin +++ b/core/sys/windows/shlwapi.odin @@ -3,7 +3,7 @@ package sys_windows foreign import shlwapi "system:shlwapi.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign shlwapi { PathFileExistsW :: proc(pszPath: wstring) -> BOOL --- PathFindExtensionW :: proc(pszPath: wstring) -> wstring --- diff --git a/core/sys/windows/synchronization.odin b/core/sys/windows/synchronization.odin index c98730aa0..79efaab34 100644 --- a/core/sys/windows/synchronization.odin +++ b/core/sys/windows/synchronization.odin @@ -3,7 +3,7 @@ package sys_windows foreign import Synchronization "system:Synchronization.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign Synchronization { WaitOnAddress :: proc(Address: PVOID, CompareAddress: PVOID, AddressSize: SIZE_T, dwMilliseconds: DWORD) -> BOOL --- WakeByAddressSingle :: proc(Address: PVOID) --- diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin index ddb4de67a..6dbf6d523 100644 --- a/core/sys/windows/types.odin +++ b/core/sys/windows/types.odin @@ -691,13 +691,13 @@ FW_DEMIBOLD :: FW_SEMIBOLD FW_ULTRABOLD :: FW_EXTRABOLD FW_BLACK :: FW_HEAVY -PTIMERAPCROUTINE :: #type proc "stdcall" (lpArgToCompletionRoutine: LPVOID, dwTimerLowValue, dwTimerHighValue: DWORD) +PTIMERAPCROUTINE :: #type proc "system" (lpArgToCompletionRoutine: LPVOID, dwTimerLowValue, dwTimerHighValue: DWORD) -TIMERPROC :: #type proc "stdcall" (HWND, UINT, UINT_PTR, DWORD) +TIMERPROC :: #type proc "system" (HWND, UINT, UINT_PTR, DWORD) -WNDPROC :: #type proc "stdcall" (HWND, UINT, WPARAM, LPARAM) -> LRESULT +WNDPROC :: #type proc "system" (HWND, UINT, WPARAM, LPARAM) -> LRESULT -HOOKPROC :: #type proc "stdcall" (code: c_int, wParam: WPARAM, lParam: LPARAM) -> LRESULT +HOOKPROC :: #type proc "system" (code: c_int, wParam: WPARAM, lParam: LPARAM) -> LRESULT CWPRETSTRUCT :: struct { lResult: LRESULT, @@ -2324,7 +2324,7 @@ MOUNT_POINT_REPARSE_BUFFER :: struct { PathBuffer: WCHAR, } -LPPROGRESS_ROUTINE :: #type proc "stdcall" ( +LPPROGRESS_ROUTINE :: #type proc "system" ( TotalFileSize: LARGE_INTEGER, TotalBytesTransferred: LARGE_INTEGER, StreamSize: LARGE_INTEGER, @@ -2494,7 +2494,7 @@ OVERLAPPED_ENTRY :: struct { dwNumberOfBytesTransferred: DWORD, } -LPOVERLAPPED_COMPLETION_ROUTINE :: #type proc "stdcall" ( +LPOVERLAPPED_COMPLETION_ROUTINE :: #type proc "system" ( dwErrorCode: DWORD, dwNumberOfBytesTransfered: DWORD, lpOverlapped: LPOVERLAPPED, @@ -2558,7 +2558,7 @@ EXCEPTION_POINTERS :: struct { ContextRecord: ^CONTEXT, } -PVECTORED_EXCEPTION_HANDLER :: #type proc "stdcall" (ExceptionInfo: ^EXCEPTION_POINTERS) -> LONG +PVECTORED_EXCEPTION_HANDLER :: #type proc "system" (ExceptionInfo: ^EXCEPTION_POINTERS) -> LONG CONSOLE_READCONSOLE_CONTROL :: struct { nLength: ULONG, @@ -2613,7 +2613,7 @@ ADDRINFOEXW :: struct { ai_next: ^ADDRINFOEXW, } -LPLOOKUPSERVICE_COMPLETION_ROUTINE :: #type proc "stdcall" ( +LPLOOKUPSERVICE_COMPLETION_ROUTINE :: #type proc "system" ( dwErrorCode: DWORD, dwNumberOfBytesTransfered: DWORD, lpOverlapped: LPOVERLAPPED, @@ -3427,7 +3427,7 @@ IModalWindow :: struct #raw_union { } IModalWindowVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - Show: proc "stdcall" (this: ^IModalWindow, hwndOwner: HWND) -> HRESULT, + Show: proc "system" (this: ^IModalWindow, hwndOwner: HWND) -> HRESULT, } ISequentialStream :: struct #raw_union { @@ -3436,8 +3436,8 @@ ISequentialStream :: struct #raw_union { } ISequentialStreamVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - Read: proc "stdcall" (this: ^ISequentialStream, pv: rawptr, cb: ULONG, pcbRead: ^ULONG) -> HRESULT, - Write: proc "stdcall" (this: ^ISequentialStream, pv: rawptr, cb: ULONG, pcbWritten: ^ULONG) -> HRESULT, + Read: proc "system" (this: ^ISequentialStream, pv: rawptr, cb: ULONG, pcbRead: ^ULONG) -> HRESULT, + Write: proc "system" (this: ^ISequentialStream, pv: rawptr, cb: ULONG, pcbWritten: ^ULONG) -> HRESULT, } IStream :: struct #raw_union { @@ -3446,15 +3446,15 @@ IStream :: struct #raw_union { } IStreamVtbl :: struct { using ISequentialStreamVtbl: ISequentialStreamVtbl, - Seek: proc "stdcall" (this: ^IStream, dlibMove: LARGE_INTEGER, dwOrigin: DWORD, plibNewPosition: ^ULARGE_INTEGER) -> HRESULT, - SetSize: proc "stdcall" (this: ^IStream, libNewSize: ULARGE_INTEGER) -> HRESULT, - CopyTo: proc "stdcall" (this: ^IStream, pstm: ^IStream, cb: ULARGE_INTEGER, pcbRead: ^ULARGE_INTEGER, pcbWritten: ^ULARGE_INTEGER) -> HRESULT, - Commit: proc "stdcall" (this: ^IStream, grfCommitFlags: DWORD) -> HRESULT, - Revert: proc "stdcall" (this: ^IStream) -> HRESULT, - LockRegion: proc "stdcall" (this: ^IStream, libOffset: ULARGE_INTEGER, cb: ULARGE_INTEGER, dwLockType: DWORD) -> HRESULT, - UnlockRegion: proc "stdcall" (this: ^IStream, libOffset: ULARGE_INTEGER, cb: ULARGE_INTEGER, dwLockType: DWORD) -> HRESULT, - Stat: proc "stdcall" (this: ^IStream, pstatstg: ^STATSTG, grfStatFlag: DWORD) -> HRESULT, - Clone: proc "stdcall" (this: ^IStream, ppstm: ^^IStream) -> HRESULT, + Seek: proc "system" (this: ^IStream, dlibMove: LARGE_INTEGER, dwOrigin: DWORD, plibNewPosition: ^ULARGE_INTEGER) -> HRESULT, + SetSize: proc "system" (this: ^IStream, libNewSize: ULARGE_INTEGER) -> HRESULT, + CopyTo: proc "system" (this: ^IStream, pstm: ^IStream, cb: ULARGE_INTEGER, pcbRead: ^ULARGE_INTEGER, pcbWritten: ^ULARGE_INTEGER) -> HRESULT, + Commit: proc "system" (this: ^IStream, grfCommitFlags: DWORD) -> HRESULT, + Revert: proc "system" (this: ^IStream) -> HRESULT, + LockRegion: proc "system" (this: ^IStream, libOffset: ULARGE_INTEGER, cb: ULARGE_INTEGER, dwLockType: DWORD) -> HRESULT, + UnlockRegion: proc "system" (this: ^IStream, libOffset: ULARGE_INTEGER, cb: ULARGE_INTEGER, dwLockType: DWORD) -> HRESULT, + Stat: proc "system" (this: ^IStream, pstatstg: ^STATSTG, grfStatFlag: DWORD) -> HRESULT, + Clone: proc "system" (this: ^IStream, ppstm: ^^IStream) -> HRESULT, } IPersist :: struct #raw_union { @@ -3463,7 +3463,7 @@ IPersist :: struct #raw_union { } IPersistVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - GetClassID: proc "stdcall" (this: ^IPersist, pClassID: ^CLSID) -> HRESULT, + GetClassID: proc "system" (this: ^IPersist, pClassID: ^CLSID) -> HRESULT, } IPersistStream :: struct #raw_union { @@ -3472,10 +3472,10 @@ IPersistStream :: struct #raw_union { } IPersistStreamVtbl :: struct { using IPersistVtbl: IPersistVtbl, - IsDirty: proc "stdcall" (this: ^IPersistStream) -> HRESULT, - Load: proc "stdcall" (this: ^IPersistStream, pStm: ^IStream) -> HRESULT, - Save: proc "stdcall" (this: ^IPersistStream, pStm: ^IStream, fClearDirty: BOOL) -> HRESULT, - GetSizeMax: proc "stdcall" (this: ^IPersistStream, pcbSize: ^ULARGE_INTEGER) -> HRESULT, + IsDirty: proc "system" (this: ^IPersistStream) -> HRESULT, + Load: proc "system" (this: ^IPersistStream, pStm: ^IStream) -> HRESULT, + Save: proc "system" (this: ^IPersistStream, pStm: ^IStream, fClearDirty: BOOL) -> HRESULT, + GetSizeMax: proc "system" (this: ^IPersistStream, pcbSize: ^ULARGE_INTEGER) -> HRESULT, } IMoniker :: struct #raw_union { @@ -3484,21 +3484,21 @@ IMoniker :: struct #raw_union { } IMonikerVtbl :: struct { using IPersistStreamVtbl: IPersistStreamVtbl, - BindToObject: proc "stdcall" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, riidResult: REFIID, ppvResult: ^rawptr) -> HRESULT, - BindToStorage: proc "stdcall" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, riid: REFIID, ppvObj: ^rawptr) -> HRESULT, - Reduce: proc "stdcall" (this: ^IMoniker, pbc: ^IBindCtx, dwReduceHowFar: DWORD, ppmkToLeft: ^^IMoniker, ppmkReduced: ^^IMoniker) -> HRESULT, - ComposeWith: proc "stdcall" (this: ^IMoniker, pmkRight: ^IMoniker, fOnlyIfNotGeneric: BOOL, ppmkComposite: ^^IMoniker) -> HRESULT, - Enum: proc "stdcall" (this: ^IMoniker, fForward: BOOL, ppenumMoniker: ^^IEnumMoniker) -> HRESULT, - IsEqual: proc "stdcall" (this: ^IMoniker, pmkOtherMoniker: ^IMoniker) -> HRESULT, - Hash: proc "stdcall" (this: ^IMoniker, pdwHash: ^DWORD) -> HRESULT, - IsRunning: proc "stdcall" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, pmkNewlyRunning: ^IMoniker) -> HRESULT, - GetTimeOfLastChange: proc "stdcall" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, pFileTime: ^FILETIME) -> HRESULT, - Inverse: proc "stdcall" (this: ^IMoniker, ppmk: ^^IMoniker) -> HRESULT, - CommonPrefixWith: proc "stdcall" (this: ^IMoniker, pmkOther: ^IMoniker, ppmkPrefix: ^^IMoniker) -> HRESULT, - RelativePathTo: proc "stdcall" (this: ^IMoniker, pmkOther: ^IMoniker, ppmkRelPath: ^^IMoniker) -> HRESULT, - GetDisplayName: proc "stdcall" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, ppszDisplayName: ^LPOLESTR) -> HRESULT, - ParseDisplayName: proc "stdcall" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, pszDisplayName: LPOLESTR, pchEaten: ^ULONG, ppmkOut: ^^IMoniker) -> HRESULT, - IsSystemMoniker: proc "stdcall" (this: ^IMoniker, pdwMksys: ^DWORD) -> HRESULT, + BindToObject: proc "system" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, riidResult: REFIID, ppvResult: ^rawptr) -> HRESULT, + BindToStorage: proc "system" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, riid: REFIID, ppvObj: ^rawptr) -> HRESULT, + Reduce: proc "system" (this: ^IMoniker, pbc: ^IBindCtx, dwReduceHowFar: DWORD, ppmkToLeft: ^^IMoniker, ppmkReduced: ^^IMoniker) -> HRESULT, + ComposeWith: proc "system" (this: ^IMoniker, pmkRight: ^IMoniker, fOnlyIfNotGeneric: BOOL, ppmkComposite: ^^IMoniker) -> HRESULT, + Enum: proc "system" (this: ^IMoniker, fForward: BOOL, ppenumMoniker: ^^IEnumMoniker) -> HRESULT, + IsEqual: proc "system" (this: ^IMoniker, pmkOtherMoniker: ^IMoniker) -> HRESULT, + Hash: proc "system" (this: ^IMoniker, pdwHash: ^DWORD) -> HRESULT, + IsRunning: proc "system" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, pmkNewlyRunning: ^IMoniker) -> HRESULT, + GetTimeOfLastChange: proc "system" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, pFileTime: ^FILETIME) -> HRESULT, + Inverse: proc "system" (this: ^IMoniker, ppmk: ^^IMoniker) -> HRESULT, + CommonPrefixWith: proc "system" (this: ^IMoniker, pmkOther: ^IMoniker, ppmkPrefix: ^^IMoniker) -> HRESULT, + RelativePathTo: proc "system" (this: ^IMoniker, pmkOther: ^IMoniker, ppmkRelPath: ^^IMoniker) -> HRESULT, + GetDisplayName: proc "system" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, ppszDisplayName: ^LPOLESTR) -> HRESULT, + ParseDisplayName: proc "system" (this: ^IMoniker, pbc: ^IBindCtx, pmkToLeft: ^IMoniker, pszDisplayName: LPOLESTR, pchEaten: ^ULONG, ppmkOut: ^^IMoniker) -> HRESULT, + IsSystemMoniker: proc "system" (this: ^IMoniker, pdwMksys: ^DWORD) -> HRESULT, } IEnumMoniker :: struct #raw_union { @@ -3507,10 +3507,10 @@ IEnumMoniker :: struct #raw_union { } IEnumMonikerVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - Next: proc "stdcall" (this: ^IEnumMoniker, celt: ULONG, rgelt: ^^IMoniker, pceltFetched: ^ULONG) -> HRESULT, - Skip: proc "stdcall" (this: ^IEnumMoniker, celt: ULONG) -> HRESULT, - Reset: proc "stdcall" (this: ^IEnumMoniker) -> HRESULT, - Clone: proc "stdcall" (this: ^IEnumMoniker, ppenum: ^^IEnumMoniker) -> HRESULT, + Next: proc "system" (this: ^IEnumMoniker, celt: ULONG, rgelt: ^^IMoniker, pceltFetched: ^ULONG) -> HRESULT, + Skip: proc "system" (this: ^IEnumMoniker, celt: ULONG) -> HRESULT, + Reset: proc "system" (this: ^IEnumMoniker) -> HRESULT, + Clone: proc "system" (this: ^IEnumMoniker, ppenum: ^^IEnumMoniker) -> HRESULT, } IRunningObjectTable :: struct #raw_union { @@ -3519,13 +3519,13 @@ IRunningObjectTable :: struct #raw_union { } IRunningObjectTableVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - Register: proc "stdcall" (this: ^IRunningObjectTable, grfFlags: DWORD, punkObject: ^IUnknown, pmkObjectName: ^IMoniker, pdwRegister: ^DWORD) -> HRESULT, - Revoke: proc "stdcall" (this: ^IRunningObjectTable, dwRegister: DWORD) -> HRESULT, - IsRunning: proc "stdcall" (this: ^IRunningObjectTable, pmkObjectName: ^IMoniker) -> HRESULT, - GetObject: proc "stdcall" (this: ^IRunningObjectTable, pmkObjectName: ^IMoniker, ppunkObject: ^^IUnknown) -> HRESULT, - NoteChangeTime: proc "stdcall" (this: ^IRunningObjectTable, dwRegister: DWORD, pfiletime: ^FILETIME) -> HRESULT, - GetTimeOfLastChange: proc "stdcall" (this: ^IRunningObjectTable, pmkObjectName: ^IMoniker, pfiletime: ^FILETIME) -> HRESULT, - EnumRunning: proc "stdcall" (this: ^IRunningObjectTable, ppenumMoniker: ^^IEnumMoniker) -> HRESULT, + Register: proc "system" (this: ^IRunningObjectTable, grfFlags: DWORD, punkObject: ^IUnknown, pmkObjectName: ^IMoniker, pdwRegister: ^DWORD) -> HRESULT, + Revoke: proc "system" (this: ^IRunningObjectTable, dwRegister: DWORD) -> HRESULT, + IsRunning: proc "system" (this: ^IRunningObjectTable, pmkObjectName: ^IMoniker) -> HRESULT, + GetObject: proc "system" (this: ^IRunningObjectTable, pmkObjectName: ^IMoniker, ppunkObject: ^^IUnknown) -> HRESULT, + NoteChangeTime: proc "system" (this: ^IRunningObjectTable, dwRegister: DWORD, pfiletime: ^FILETIME) -> HRESULT, + GetTimeOfLastChange: proc "system" (this: ^IRunningObjectTable, pmkObjectName: ^IMoniker, pfiletime: ^FILETIME) -> HRESULT, + EnumRunning: proc "system" (this: ^IRunningObjectTable, ppenumMoniker: ^^IEnumMoniker) -> HRESULT, } IEnumString :: struct #raw_union { @@ -3534,10 +3534,10 @@ IEnumString :: struct #raw_union { } IEnumStringVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - Next: proc "stdcall" (this: ^IEnumString, celt: ULONG, rgelt: ^LPOLESTR, pceltFetched: ^ULONG) -> HRESULT, - Skip: proc "stdcall" (this: ^IEnumString, celt: ULONG) -> HRESULT, - Reset: proc "stdcall" (this: ^IEnumString) -> HRESULT, - Clone: proc "stdcall" (this: ^IEnumString, ppenum: ^^IEnumString) -> HRESULT, + Next: proc "system" (this: ^IEnumString, celt: ULONG, rgelt: ^LPOLESTR, pceltFetched: ^ULONG) -> HRESULT, + Skip: proc "system" (this: ^IEnumString, celt: ULONG) -> HRESULT, + Reset: proc "system" (this: ^IEnumString) -> HRESULT, + Clone: proc "system" (this: ^IEnumString, ppenum: ^^IEnumString) -> HRESULT, } IBindCtx :: struct #raw_union { @@ -3546,16 +3546,16 @@ IBindCtx :: struct #raw_union { } IBindCtxVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - RegisterObjectBound: proc "stdcall" (this: ^IBindCtx, punk: ^IUnknown) -> HRESULT, - RevokeObjectBound: proc "stdcall" (this: ^IBindCtx, punk: ^IUnknown) -> HRESULT, - ReleaseBoundObjects: proc "stdcall" (this: ^IBindCtx) -> HRESULT, - SetBindOptions: proc "stdcall" (this: ^IBindCtx, pbindopts: ^BIND_OPTS) -> HRESULT, - GetBindOptions: proc "stdcall" (this: ^IBindCtx, pbindopts: ^BIND_OPTS) -> HRESULT, - GetRunningObjectTable: proc "stdcall" (this: ^IBindCtx, pprot: ^^IRunningObjectTable) -> HRESULT, - RegisterObjectParam: proc "stdcall" (this: ^IBindCtx, pszKey: LPOLESTR, punk: ^IUnknown) -> HRESULT, - GetObjectParam: proc "stdcall" (this: ^IBindCtx, pszKey: LPOLESTR, ppunk: ^^IUnknown) -> HRESULT, - EnumObjectParam: proc "stdcall" (this: ^IBindCtx, ppenum: ^^IEnumString) -> HRESULT, - RevokeObjectParam: proc "stdcall" (this: ^IBindCtx, pszKey: LPOLESTR) -> HRESULT, + RegisterObjectBound: proc "system" (this: ^IBindCtx, punk: ^IUnknown) -> HRESULT, + RevokeObjectBound: proc "system" (this: ^IBindCtx, punk: ^IUnknown) -> HRESULT, + ReleaseBoundObjects: proc "system" (this: ^IBindCtx) -> HRESULT, + SetBindOptions: proc "system" (this: ^IBindCtx, pbindopts: ^BIND_OPTS) -> HRESULT, + GetBindOptions: proc "system" (this: ^IBindCtx, pbindopts: ^BIND_OPTS) -> HRESULT, + GetRunningObjectTable: proc "system" (this: ^IBindCtx, pprot: ^^IRunningObjectTable) -> HRESULT, + RegisterObjectParam: proc "system" (this: ^IBindCtx, pszKey: LPOLESTR, punk: ^IUnknown) -> HRESULT, + GetObjectParam: proc "system" (this: ^IBindCtx, pszKey: LPOLESTR, ppunk: ^^IUnknown) -> HRESULT, + EnumObjectParam: proc "system" (this: ^IBindCtx, ppenum: ^^IEnumString) -> HRESULT, + RevokeObjectParam: proc "system" (this: ^IBindCtx, pszKey: LPOLESTR) -> HRESULT, } IEnumShellItems :: struct #raw_union { @@ -3564,10 +3564,10 @@ IEnumShellItems :: struct #raw_union { } IEnumShellItemsVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - Next: proc "stdcall" (this: ^IEnumShellItems, celt: ULONG, rgelt: ^^IShellItem, pceltFetched: ^ULONG) -> HRESULT, - Skip: proc "stdcall" (this: ^IEnumShellItems, celt: ULONG) -> HRESULT, - Reset: proc "stdcall" (this: ^IEnumShellItems) -> HRESULT, - Clone: proc "stdcall" (this: ^IEnumShellItems, ppenum: ^^IEnumShellItems) -> HRESULT, + Next: proc "system" (this: ^IEnumShellItems, celt: ULONG, rgelt: ^^IShellItem, pceltFetched: ^ULONG) -> HRESULT, + Skip: proc "system" (this: ^IEnumShellItems, celt: ULONG) -> HRESULT, + Reset: proc "system" (this: ^IEnumShellItems) -> HRESULT, + Clone: proc "system" (this: ^IEnumShellItems, ppenum: ^^IEnumShellItems) -> HRESULT, } IShellItem :: struct #raw_union { @@ -3576,11 +3576,11 @@ IShellItem :: struct #raw_union { } IShellItemVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - BindToHandler: proc "stdcall" (this: ^IShellItem, pbc: ^IBindCtx, bhid: REFGUID, riid: REFIID, ppv: ^rawptr) -> HRESULT, - GetParent: proc "stdcall" (this: ^IShellItem, ppsiFolder: ^^IShellItem) -> HRESULT, - GetDisplayName: proc "stdcall" (this: ^IShellItem, sigdnName: SIGDN, ppszName: ^LPWSTR) -> HRESULT, - GetAttributes: proc "stdcall" (this: ^IShellItem, sfgaoMask: SFGAOF, psfgaoAttribs: ^SFGAOF) -> HRESULT, - Compare: proc "stdcall" (this: ^IShellItem, psi: ^IShellItem, hint: SICHINTF, piOrder: ^c_int) -> HRESULT, + BindToHandler: proc "system" (this: ^IShellItem, pbc: ^IBindCtx, bhid: REFGUID, riid: REFIID, ppv: ^rawptr) -> HRESULT, + GetParent: proc "system" (this: ^IShellItem, ppsiFolder: ^^IShellItem) -> HRESULT, + GetDisplayName: proc "system" (this: ^IShellItem, sigdnName: SIGDN, ppszName: ^LPWSTR) -> HRESULT, + GetAttributes: proc "system" (this: ^IShellItem, sfgaoMask: SFGAOF, psfgaoAttribs: ^SFGAOF) -> HRESULT, + Compare: proc "system" (this: ^IShellItem, psi: ^IShellItem, hint: SICHINTF, piOrder: ^c_int) -> HRESULT, } IShellItemArray :: struct #raw_union { @@ -3589,13 +3589,13 @@ IShellItemArray :: struct #raw_union { } IShellItemArrayVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - BindToHandler: proc "stdcall" (this: ^IShellItemArray, pbc: ^IBindCtx, bhid: REFGUID, riid: REFIID, ppvOut: ^rawptr) -> HRESULT, - GetPropertyStore: proc "stdcall" (this: ^IShellItemArray, flags: GETPROPERTYSTOREFLAGS, riid: REFIID, ppv: ^rawptr) -> HRESULT, - GetPropertyDescriptionList: proc "stdcall" (this: ^IShellItemArray, keyType: REFPROPERTYKEY, riid: REFIID, ppv: ^rawptr) -> HRESULT, - GetAttributes: proc "stdcall" (this: ^IShellItemArray, AttribFlags: SIATTRIBFLAGS, sfgaoMask: SFGAOF, psfgaoAttribs: ^SFGAOF) -> HRESULT, - GetCount: proc "stdcall" (this: ^IShellItemArray, pdwNumItems: ^DWORD) -> HRESULT, - GetItemAt: proc "stdcall" (this: ^IShellItemArray, dwIndex: DWORD, ppsi: ^^IShellItem) -> HRESULT, - EnumItems: proc "stdcall" (this: ^IShellItemArray, ppenumShellItems: ^^IEnumShellItems) -> HRESULT, + BindToHandler: proc "system" (this: ^IShellItemArray, pbc: ^IBindCtx, bhid: REFGUID, riid: REFIID, ppvOut: ^rawptr) -> HRESULT, + GetPropertyStore: proc "system" (this: ^IShellItemArray, flags: GETPROPERTYSTOREFLAGS, riid: REFIID, ppv: ^rawptr) -> HRESULT, + GetPropertyDescriptionList: proc "system" (this: ^IShellItemArray, keyType: REFPROPERTYKEY, riid: REFIID, ppv: ^rawptr) -> HRESULT, + GetAttributes: proc "system" (this: ^IShellItemArray, AttribFlags: SIATTRIBFLAGS, sfgaoMask: SFGAOF, psfgaoAttribs: ^SFGAOF) -> HRESULT, + GetCount: proc "system" (this: ^IShellItemArray, pdwNumItems: ^DWORD) -> HRESULT, + GetItemAt: proc "system" (this: ^IShellItemArray, dwIndex: DWORD, ppsi: ^^IShellItem) -> HRESULT, + EnumItems: proc "system" (this: ^IShellItemArray, ppenumShellItems: ^^IEnumShellItems) -> HRESULT, } IFileDialogEvents :: struct #raw_union { @@ -3604,13 +3604,13 @@ IFileDialogEvents :: struct #raw_union { } IFileDialogEventsVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - OnFileOk: proc "stdcall" (this: ^IFileDialogEvents, pfd: ^IFileDialog) -> HRESULT, - OnFolderChanging: proc "stdcall" (this: ^IFileDialogEvents, pfd: ^IFileDialog, psiFolder: ^IShellItem) -> HRESULT, - OnFolderChange: proc "stdcall" (this: ^IFileDialogEvents, pfd: ^IFileDialog) -> HRESULT, - OnSelectionChange: proc "stdcall" (this: ^IFileDialogEvents, pfd: ^IFileDialog) -> HRESULT, - OnShareViolation: proc "stdcall" (this: ^IFileDialogEvents, pfd: ^IFileDialog, psi: ^IShellItem, pResponse: ^FDE_SHAREVIOLATION_RESPONSE) -> HRESULT, - OnTypeChange: proc "stdcall" (this: ^IFileDialogEvents, pfd: ^IFileDialog) -> HRESULT, - OnOverwrite: proc "stdcall" (this: ^IFileDialogEvents, pfd: ^IFileDialog, psi: ^IShellItem, pResponse: ^FDE_SHAREVIOLATION_RESPONSE) -> HRESULT, + OnFileOk: proc "system" (this: ^IFileDialogEvents, pfd: ^IFileDialog) -> HRESULT, + OnFolderChanging: proc "system" (this: ^IFileDialogEvents, pfd: ^IFileDialog, psiFolder: ^IShellItem) -> HRESULT, + OnFolderChange: proc "system" (this: ^IFileDialogEvents, pfd: ^IFileDialog) -> HRESULT, + OnSelectionChange: proc "system" (this: ^IFileDialogEvents, pfd: ^IFileDialog) -> HRESULT, + OnShareViolation: proc "system" (this: ^IFileDialogEvents, pfd: ^IFileDialog, psi: ^IShellItem, pResponse: ^FDE_SHAREVIOLATION_RESPONSE) -> HRESULT, + OnTypeChange: proc "system" (this: ^IFileDialogEvents, pfd: ^IFileDialog) -> HRESULT, + OnOverwrite: proc "system" (this: ^IFileDialogEvents, pfd: ^IFileDialog, psi: ^IShellItem, pResponse: ^FDE_SHAREVIOLATION_RESPONSE) -> HRESULT, } IShellItemFilter :: struct #raw_union { @@ -3619,8 +3619,8 @@ IShellItemFilter :: struct #raw_union { } IShellItemFilterVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - IncludeItem: proc "stdcall" (this: ^IShellItemFilter, psi: ^IShellItem) -> HRESULT, - GetEnumFlagsForItem: proc "stdcall" (this: ^IShellItemFilter, psi: ^IShellItem, pgrfFlags: ^SHCONTF) -> HRESULT, + IncludeItem: proc "system" (this: ^IShellItemFilter, psi: ^IShellItem) -> HRESULT, + GetEnumFlagsForItem: proc "system" (this: ^IShellItemFilter, psi: ^IShellItem, pgrfFlags: ^SHCONTF) -> HRESULT, } IFileDialog :: struct #raw_union { @@ -3629,29 +3629,29 @@ IFileDialog :: struct #raw_union { } IFileDialogVtbl :: struct { using IModalWindowVtbl: IModalWindowVtbl, - SetFileTypes: proc "stdcall" (this: ^IFileDialog, cFileTypes: UINT, rgFilterSpec: ^COMDLG_FILTERSPEC) -> HRESULT, - SetFileTypeIndex: proc "stdcall" (this: ^IFileDialog, iFileType: UINT) -> HRESULT, - GetFileTypeIndex: proc "stdcall" (this: ^IFileDialog, piFileType: ^UINT) -> HRESULT, - Advise: proc "stdcall" (this: ^IFileDialog, pfde: ^IFileDialogEvents, pdwCookie: ^DWORD) -> HRESULT, - Unadvise: proc "stdcall" (this: ^IFileDialog, dwCookie: DWORD) -> HRESULT, - SetOptions: proc "stdcall" (this: ^IFileDialog, fos: FILEOPENDIALOGOPTIONS) -> HRESULT, - GetOptions: proc "stdcall" (this: ^IFileDialog, pfos: ^FILEOPENDIALOGOPTIONS) -> HRESULT, - SetDefaultFolder: proc "stdcall" (this: ^IFileDialog, psi: ^IShellItem) -> HRESULT, - SetFolder: proc "stdcall" (this: ^IFileDialog, psi: ^IShellItem) -> HRESULT, - GetFolder: proc "stdcall" (this: ^IFileDialog, ppsi: ^^IShellItem) -> HRESULT, - GetCurrentSelection: proc "stdcall" (this: ^IFileDialog, ppsi: ^^IShellItem) -> HRESULT, - SetFileName: proc "stdcall" (this: ^IFileDialog, pszName: LPCWSTR) -> HRESULT, - GetFileName: proc "stdcall" (this: ^IFileDialog, pszName: ^LPCWSTR) -> HRESULT, - SetTitle: proc "stdcall" (this: ^IFileDialog, pszTitle: LPCWSTR) -> HRESULT, - SetOkButtonLabel: proc "stdcall" (this: ^IFileDialog, pszText: LPCWSTR) -> HRESULT, - SetFileNameLabel: proc "stdcall" (this: ^IFileDialog, pszLabel: LPCWSTR) -> HRESULT, - GetResult: proc "stdcall" (this: ^IFileDialog, ppsi: ^^IShellItem) -> HRESULT, - AddPlace: proc "stdcall" (this: ^IFileDialog, psi: ^IShellItem, fdap: FDAP) -> HRESULT, - SetDefaultExtension: proc "stdcall" (this: ^IFileDialog, pszDefaultExtension: LPCWSTR) -> HRESULT, - Close: proc "stdcall" (this: ^IFileDialog, hr: HRESULT) -> HRESULT, - SetClientGuid: proc "stdcall" (this: ^IFileDialog, guid: REFGUID) -> HRESULT, - ClearClientData: proc "stdcall" (this: ^IFileDialog) -> HRESULT, - SetFilter: proc "stdcall" (this: ^IFileDialog, pFilter: ^IShellItemFilter) -> HRESULT, + SetFileTypes: proc "system" (this: ^IFileDialog, cFileTypes: UINT, rgFilterSpec: ^COMDLG_FILTERSPEC) -> HRESULT, + SetFileTypeIndex: proc "system" (this: ^IFileDialog, iFileType: UINT) -> HRESULT, + GetFileTypeIndex: proc "system" (this: ^IFileDialog, piFileType: ^UINT) -> HRESULT, + Advise: proc "system" (this: ^IFileDialog, pfde: ^IFileDialogEvents, pdwCookie: ^DWORD) -> HRESULT, + Unadvise: proc "system" (this: ^IFileDialog, dwCookie: DWORD) -> HRESULT, + SetOptions: proc "system" (this: ^IFileDialog, fos: FILEOPENDIALOGOPTIONS) -> HRESULT, + GetOptions: proc "system" (this: ^IFileDialog, pfos: ^FILEOPENDIALOGOPTIONS) -> HRESULT, + SetDefaultFolder: proc "system" (this: ^IFileDialog, psi: ^IShellItem) -> HRESULT, + SetFolder: proc "system" (this: ^IFileDialog, psi: ^IShellItem) -> HRESULT, + GetFolder: proc "system" (this: ^IFileDialog, ppsi: ^^IShellItem) -> HRESULT, + GetCurrentSelection: proc "system" (this: ^IFileDialog, ppsi: ^^IShellItem) -> HRESULT, + SetFileName: proc "system" (this: ^IFileDialog, pszName: LPCWSTR) -> HRESULT, + GetFileName: proc "system" (this: ^IFileDialog, pszName: ^LPCWSTR) -> HRESULT, + SetTitle: proc "system" (this: ^IFileDialog, pszTitle: LPCWSTR) -> HRESULT, + SetOkButtonLabel: proc "system" (this: ^IFileDialog, pszText: LPCWSTR) -> HRESULT, + SetFileNameLabel: proc "system" (this: ^IFileDialog, pszLabel: LPCWSTR) -> HRESULT, + GetResult: proc "system" (this: ^IFileDialog, ppsi: ^^IShellItem) -> HRESULT, + AddPlace: proc "system" (this: ^IFileDialog, psi: ^IShellItem, fdap: FDAP) -> HRESULT, + SetDefaultExtension: proc "system" (this: ^IFileDialog, pszDefaultExtension: LPCWSTR) -> HRESULT, + Close: proc "system" (this: ^IFileDialog, hr: HRESULT) -> HRESULT, + SetClientGuid: proc "system" (this: ^IFileDialog, guid: REFGUID) -> HRESULT, + ClearClientData: proc "system" (this: ^IFileDialog) -> HRESULT, + SetFilter: proc "system" (this: ^IFileDialog, pFilter: ^IShellItemFilter) -> HRESULT, } IFileOpenDialog :: struct #raw_union { @@ -3660,8 +3660,8 @@ IFileOpenDialog :: struct #raw_union { } IFileOpenDialogVtbl :: struct { using IFileDialogVtbl: IFileDialogVtbl, - GetResults: proc "stdcall" (this: ^IFileOpenDialog, ppenum: ^^IShellItemArray) -> HRESULT, - GetSelectedItems: proc "stdcall" (this: ^IFileOpenDialog, ppsai: ^^IShellItemArray) -> HRESULT, + GetResults: proc "system" (this: ^IFileOpenDialog, ppenum: ^^IShellItemArray) -> HRESULT, + GetSelectedItems: proc "system" (this: ^IFileOpenDialog, ppsai: ^^IShellItemArray) -> HRESULT, } IPropertyStore :: struct #raw_union { @@ -3670,11 +3670,11 @@ IPropertyStore :: struct #raw_union { } IPropertyStoreVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - GetCount: proc "stdcall" (this: ^IPropertyStore, cProps: ^DWORD) -> HRESULT, - GetAt: proc "stdcall" (this: ^IPropertyStore, iProp: DWORD, pkey: ^PROPERTYKEY) -> HRESULT, - GetValue: proc "stdcall" (this: ^IPropertyStore, key: REFPROPERTYKEY, pv: ^PROPVARIANT) -> HRESULT, - SetValue: proc "stdcall" (this: ^IPropertyStore, key: REFPROPERTYKEY, propvar: REFPROPVARIANT) -> HRESULT, - Commit: proc "stdcall" (this: ^IPropertyStore) -> HRESULT, + GetCount: proc "system" (this: ^IPropertyStore, cProps: ^DWORD) -> HRESULT, + GetAt: proc "system" (this: ^IPropertyStore, iProp: DWORD, pkey: ^PROPERTYKEY) -> HRESULT, + GetValue: proc "system" (this: ^IPropertyStore, key: REFPROPERTYKEY, pv: ^PROPVARIANT) -> HRESULT, + SetValue: proc "system" (this: ^IPropertyStore, key: REFPROPERTYKEY, propvar: REFPROPVARIANT) -> HRESULT, + Commit: proc "system" (this: ^IPropertyStore) -> HRESULT, } IPropertyDescriptionList :: struct #raw_union { @@ -3683,8 +3683,8 @@ IPropertyDescriptionList :: struct #raw_union { } IPropertyDescriptionListVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - GetCount: proc "stdcall" (this: ^IPropertyDescriptionList, pcElem: ^UINT) -> HRESULT, - GetAt: proc "stdcall" (this: ^IPropertyDescriptionList, iElem: UINT, riid: REFIID, ppv: ^rawptr) -> HRESULT, + GetCount: proc "system" (this: ^IPropertyDescriptionList, pcElem: ^UINT) -> HRESULT, + GetAt: proc "system" (this: ^IPropertyDescriptionList, iElem: UINT, riid: REFIID, ppv: ^rawptr) -> HRESULT, } IFileOperationProgressSink :: struct #raw_union { @@ -3693,22 +3693,22 @@ IFileOperationProgressSink :: struct #raw_union { } IFileOperationProgressSinkVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - StartOperations: proc "stdcall" (this: ^IFileOperationProgressSink) -> HRESULT, - FinishOperations: proc "stdcall" (this: ^IFileOperationProgressSink, hrResult: HRESULT) -> HRESULT, - PreRenameItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, pszNewName: LPCWSTR) -> HRESULT, - PostRenameItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, pszNewName: LPCWSTR, hrRename: HRESULT, psiNewlyCreated: ^IShellItem) -> HRESULT, - PreMoveItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR) -> HRESULT, - PostMoveItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR, hrMove: HRESULT, psiNewlyCreated: ^IShellItem) -> HRESULT, - PreCopyItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR) -> HRESULT, - PostCopyItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR, hrMove: HRESULT, psiNewlyCreated: ^IShellItem) -> HRESULT, - PreDeleteItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem) -> HRESULT, - PostDeleteItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, hrDelete: HRESULT, psiNewlyCreated: ^IShellItem) -> HRESULT, - PreNewItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR) -> HRESULT, - PostNewItem: proc "stdcall" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR, pszTemplateName: LPCWSTR, dwFileAttributes: DWORD, hrNew: HRESULT, psiNewItem: ^IShellItem) -> HRESULT, - UpdateProgress: proc "stdcall" (this: ^IFileOperationProgressSink, iWorkTotal: UINT, iWorkSoFar: UINT) -> HRESULT, - ResetTimer: proc "stdcall" (this: ^IFileOperationProgressSink) -> HRESULT, - PauseTimer: proc "stdcall" (this: ^IFileOperationProgressSink) -> HRESULT, - ResumeTimer: proc "stdcall" (this: ^IFileOperationProgressSink) -> HRESULT, + StartOperations: proc "system" (this: ^IFileOperationProgressSink) -> HRESULT, + FinishOperations: proc "system" (this: ^IFileOperationProgressSink, hrResult: HRESULT) -> HRESULT, + PreRenameItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, pszNewName: LPCWSTR) -> HRESULT, + PostRenameItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, pszNewName: LPCWSTR, hrRename: HRESULT, psiNewlyCreated: ^IShellItem) -> HRESULT, + PreMoveItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR) -> HRESULT, + PostMoveItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR, hrMove: HRESULT, psiNewlyCreated: ^IShellItem) -> HRESULT, + PreCopyItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR) -> HRESULT, + PostCopyItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR, hrMove: HRESULT, psiNewlyCreated: ^IShellItem) -> HRESULT, + PreDeleteItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem) -> HRESULT, + PostDeleteItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiItem: ^IShellItem, hrDelete: HRESULT, psiNewlyCreated: ^IShellItem) -> HRESULT, + PreNewItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR) -> HRESULT, + PostNewItem: proc "system" (this: ^IFileOperationProgressSink, dwFlags: DWORD, psiDestinationFolder: ^IShellItem, pszNewName: LPCWSTR, pszTemplateName: LPCWSTR, dwFileAttributes: DWORD, hrNew: HRESULT, psiNewItem: ^IShellItem) -> HRESULT, + UpdateProgress: proc "system" (this: ^IFileOperationProgressSink, iWorkTotal: UINT, iWorkSoFar: UINT) -> HRESULT, + ResetTimer: proc "system" (this: ^IFileOperationProgressSink) -> HRESULT, + PauseTimer: proc "system" (this: ^IFileOperationProgressSink) -> HRESULT, + ResumeTimer: proc "system" (this: ^IFileOperationProgressSink) -> HRESULT, } IFileSaveDialog :: struct #raw_union { @@ -3717,11 +3717,11 @@ IFileSaveDialog :: struct #raw_union { } IFileSaveDialogVtbl :: struct { using IFileDialogVtbl: IFileDialogVtbl, - SetSaveAsItem: proc "stdcall" (this: ^IFileSaveDialog, psi: ^IShellItem) -> HRESULT, - SetProperties: proc "stdcall" (this: ^IFileSaveDialog, pStore: ^IPropertyStore) -> HRESULT, - SetCollectedProperties: proc "stdcall" (this: ^IFileSaveDialog, pList: ^IPropertyDescriptionList, fAppendDefault: BOOL) -> HRESULT, - GetProperties: proc "stdcall" (this: ^IFileSaveDialog, ppStore: ^^IPropertyStore) -> HRESULT, - ApplyProperties: proc "stdcall" (this: ^IFileSaveDialog, psi: ^IShellItem, pStore: ^IPropertyStore, hwnd: HWND, pSink: ^IFileOperationProgressSink) -> HRESULT, + SetSaveAsItem: proc "system" (this: ^IFileSaveDialog, psi: ^IShellItem) -> HRESULT, + SetProperties: proc "system" (this: ^IFileSaveDialog, pStore: ^IPropertyStore) -> HRESULT, + SetCollectedProperties: proc "system" (this: ^IFileSaveDialog, pList: ^IPropertyDescriptionList, fAppendDefault: BOOL) -> HRESULT, + GetProperties: proc "system" (this: ^IFileSaveDialog, ppStore: ^^IPropertyStore) -> HRESULT, + ApplyProperties: proc "system" (this: ^IFileSaveDialog, psi: ^IShellItem, pStore: ^IPropertyStore, hwnd: HWND, pSink: ^IFileOperationProgressSink) -> HRESULT, } ITaskbarList :: struct #raw_union { @@ -3730,11 +3730,11 @@ ITaskbarList :: struct #raw_union { } ITaskbarListVtbl :: struct { using IUnknownVtbl: IUnknownVtbl, - HrInit: proc "stdcall" (this: ^ITaskbarList) -> HRESULT, - AddTab: proc "stdcall" (this: ^ITaskbarList, hwnd: HWND) -> HRESULT, - DeleteTab: proc "stdcall" (this: ^ITaskbarList, hwnd: HWND) -> HRESULT, - ActivateTab: proc "stdcall" (this: ^ITaskbarList, hwnd: HWND) -> HRESULT, - SetActiveAlt: proc "stdcall" (this: ^ITaskbarList, hwnd: HWND) -> HRESULT, + HrInit: proc "system" (this: ^ITaskbarList) -> HRESULT, + AddTab: proc "system" (this: ^ITaskbarList, hwnd: HWND) -> HRESULT, + DeleteTab: proc "system" (this: ^ITaskbarList, hwnd: HWND) -> HRESULT, + ActivateTab: proc "system" (this: ^ITaskbarList, hwnd: HWND) -> HRESULT, + SetActiveAlt: proc "system" (this: ^ITaskbarList, hwnd: HWND) -> HRESULT, } ITaskbarList2 :: struct #raw_union { @@ -3743,7 +3743,7 @@ ITaskbarList2 :: struct #raw_union { } ITaskbarList2Vtbl :: struct { using ITaskbarListVtbl: ITaskbarListVtbl, - MarkFullscreenWindow: proc "stdcall" (this: ^ITaskbarList2, hwnd: HWND, fFullscreen: BOOL) -> HRESULT, + MarkFullscreenWindow: proc "system" (this: ^ITaskbarList2, hwnd: HWND, fFullscreen: BOOL) -> HRESULT, } TBPFLAG :: enum c_int { @@ -3788,18 +3788,18 @@ ITaskbarList3 :: struct #raw_union { } ITaskbarList3Vtbl :: struct { using ITaskbarList2Vtbl: ITaskbarList2Vtbl, - SetProgressValue: proc "stdcall" (this: ^ITaskbarList3, hwnd: HWND, ullCompleted: ULONGLONG, ullTotal: ULONGLONG) -> HRESULT, - SetProgressState: proc "stdcall" (this: ^ITaskbarList3, hwnd: HWND, tbpFlags: TBPFLAG) -> HRESULT, - RegisterTab: proc "stdcall" (this: ^ITaskbarList3, hwndTab: HWND, hwndMDI: HWND) -> HRESULT, - UnregisterTab: proc "stdcall" (this: ^ITaskbarList3, hwndTab: HWND) -> HRESULT, - SetTabOrder: proc "stdcall" (this: ^ITaskbarList3, hwndTab: HWND, hwndInsertBefore: HWND) -> HRESULT, - SetTabActive: proc "stdcall" (this: ^ITaskbarList3, hwndTab: HWND, hwndMDI: HWND, dwReserved: DWORD) -> HRESULT, - ThumbBarAddButtons: proc "stdcall" (this: ^ITaskbarList3, hwnd: HWND, cButtons: UINT, pButton: LPTHUMBBUTTON) -> HRESULT, - ThumbBarUpdateButtons: proc "stdcall" (this: ^ITaskbarList3, hwnd: HWND, cButtons: UINT, pButton: LPTHUMBBUTTON) -> HRESULT, - ThumbBarSetImageList: proc "stdcall" (this: ^ITaskbarList3, hwnd: HWND, himl: HIMAGELIST) -> HRESULT, - SetOverlayIcon: proc "stdcall" (this: ^ITaskbarList3, hwnd: HWND, hIcon: HICON, pszDescription: LPCWSTR) -> HRESULT, - SetThumbnailTooltip: proc "stdcall" (this: ^ITaskbarList3, hwnd: HWND, pszTip: LPCWSTR) -> HRESULT, - SetThumbnailClip: proc "stdcall" (this: ^ITaskbarList3, hwnd: HWND, prcClip: ^RECT) -> HRESULT, + SetProgressValue: proc "system" (this: ^ITaskbarList3, hwnd: HWND, ullCompleted: ULONGLONG, ullTotal: ULONGLONG) -> HRESULT, + SetProgressState: proc "system" (this: ^ITaskbarList3, hwnd: HWND, tbpFlags: TBPFLAG) -> HRESULT, + RegisterTab: proc "system" (this: ^ITaskbarList3, hwndTab: HWND, hwndMDI: HWND) -> HRESULT, + UnregisterTab: proc "system" (this: ^ITaskbarList3, hwndTab: HWND) -> HRESULT, + SetTabOrder: proc "system" (this: ^ITaskbarList3, hwndTab: HWND, hwndInsertBefore: HWND) -> HRESULT, + SetTabActive: proc "system" (this: ^ITaskbarList3, hwndTab: HWND, hwndMDI: HWND, dwReserved: DWORD) -> HRESULT, + ThumbBarAddButtons: proc "system" (this: ^ITaskbarList3, hwnd: HWND, cButtons: UINT, pButton: LPTHUMBBUTTON) -> HRESULT, + ThumbBarUpdateButtons: proc "system" (this: ^ITaskbarList3, hwnd: HWND, cButtons: UINT, pButton: LPTHUMBBUTTON) -> HRESULT, + ThumbBarSetImageList: proc "system" (this: ^ITaskbarList3, hwnd: HWND, himl: HIMAGELIST) -> HRESULT, + SetOverlayIcon: proc "system" (this: ^ITaskbarList3, hwnd: HWND, hIcon: HICON, pszDescription: LPCWSTR) -> HRESULT, + SetThumbnailTooltip: proc "system" (this: ^ITaskbarList3, hwnd: HWND, pszTip: LPCWSTR) -> HRESULT, + SetThumbnailClip: proc "system" (this: ^ITaskbarList3, hwnd: HWND, prcClip: ^RECT) -> HRESULT, } MEMORYSTATUSEX :: struct { diff --git a/core/sys/windows/user32.odin b/core/sys/windows/user32.odin index 81884f3da..0c92adca4 100644 --- a/core/sys/windows/user32.odin +++ b/core/sys/windows/user32.odin @@ -3,7 +3,7 @@ package sys_windows foreign import user32 "system:User32.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign user32 { GetClassInfoW :: proc(hInstance: HINSTANCE, lpClassNAme: LPCWSTR, lpWndClass: ^WNDCLASSW) -> BOOL --- GetClassInfoExW :: proc(hInsatnce: HINSTANCE, lpszClass: LPCWSTR, lpwcx: ^WNDCLASSEXW) -> BOOL --- @@ -236,7 +236,7 @@ foreign user32 { EnableMenuItem :: proc(hMenu: HMENU, uIDEnableItem: UINT, uEnable: UINT) -> BOOL --- } -CreateWindowW :: #force_inline proc "stdcall" ( +CreateWindowW :: #force_inline proc "system" ( lpClassName: LPCTSTR, lpWindowName: LPCTSTR, dwStyle: DWORD, @@ -266,7 +266,7 @@ CreateWindowW :: #force_inline proc "stdcall" ( } when ODIN_ARCH == .amd64 { - @(default_calling_convention="stdcall") + @(default_calling_convention="system") foreign user32 { GetClassLongPtrW :: proc(hWnd: HWND, nIndex: c_int) -> ULONG_PTR --- SetClassLongPtrW :: proc(hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR) -> ULONG_PTR --- @@ -312,8 +312,8 @@ Monitor_From_Flags :: enum DWORD { MONITOR_DEFAULTTONEAREST = 0x00000002, // Returns a handle to the display monitor that is nearest to the window } -Monitor_Enum_Proc :: #type proc "stdcall" (HMONITOR, HDC, LPRECT, LPARAM) -> BOOL -Window_Enum_Proc :: #type proc "stdcall" (HWND, LPARAM) -> BOOL +Monitor_Enum_Proc :: #type proc "system" (HMONITOR, HDC, LPRECT, LPARAM) -> BOOL +Window_Enum_Proc :: #type proc "system" (HWND, LPARAM) -> BOOL USER_DEFAULT_SCREEN_DPI :: 96 DPI_AWARENESS_CONTEXT :: distinct HANDLE diff --git a/core/sys/windows/userenv.odin b/core/sys/windows/userenv.odin index 92bc09a7e..a31e363e1 100644 --- a/core/sys/windows/userenv.odin +++ b/core/sys/windows/userenv.odin @@ -3,7 +3,7 @@ package sys_windows foreign import userenv "system:Userenv.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign userenv { GetUserProfileDirectoryW :: proc(hToken: HANDLE, lpProfileDir: LPWSTR, diff --git a/core/sys/windows/ux_theme.odin b/core/sys/windows/ux_theme.odin index 39b489bc0..7af399361 100644 --- a/core/sys/windows/ux_theme.odin +++ b/core/sys/windows/ux_theme.odin @@ -6,7 +6,7 @@ foreign import uxtheme "system:UxTheme.lib" MARGINS :: distinct [4]int PMARGINS :: ^MARGINS -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign uxtheme { IsThemeActive :: proc() -> BOOL --- } diff --git a/core/sys/windows/wgl.odin b/core/sys/windows/wgl.odin index 77cff2fa9..d0d96d90b 100644 --- a/core/sys/windows/wgl.odin +++ b/core/sys/windows/wgl.odin @@ -66,7 +66,7 @@ GetExtensionsStringARBType :: #type proc "c" (HDC) -> cstring wglGetExtensionsStringARB: GetExtensionsStringARBType -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign Opengl32 { wglCreateContext :: proc(hdc: HDC) -> HGLRC --- wglMakeCurrent :: proc(hdc: HDC, HGLRC: HGLRC) -> BOOL --- diff --git a/core/sys/windows/winmm.odin b/core/sys/windows/winmm.odin index 445470f6e..0807df8de 100644 --- a/core/sys/windows/winmm.odin +++ b/core/sys/windows/winmm.odin @@ -5,7 +5,7 @@ foreign import winmm "system:Winmm.lib" MMRESULT :: UINT -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign winmm { timeGetDevCaps :: proc(ptc: LPTIMECAPS, cbtc: UINT) -> MMRESULT --- timeBeginPeriod :: proc(uPeriod: UINT) -> MMRESULT --- diff --git a/core/sys/windows/ws2_32.odin b/core/sys/windows/ws2_32.odin index 1b79be584..c60a21a36 100644 --- a/core/sys/windows/ws2_32.odin +++ b/core/sys/windows/ws2_32.odin @@ -56,7 +56,7 @@ Example Load: */ foreign import ws2_32 "system:Ws2_32.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign ws2_32 { // [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsastartup) WSAStartup :: proc(wVersionRequested: WORD, lpWSAData: LPWSADATA) -> c_int --- From 90ac400ec5a60a99fe16f2669edd22e4be14cf83 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 17:25:23 +0000 Subject: [PATCH 48/57] stdcall -> system --- core/mem/virtual/virtual_windows.odin | 2 +- core/runtime/entry_windows.odin | 4 ++-- core/runtime/os_specific_windows.odin | 2 +- core/runtime/procs.odin | 2 +- core/runtime/procs_windows_amd64.odin | 2 +- core/runtime/procs_windows_i386.odin | 2 +- core/sync/futex_windows.odin | 6 +++--- core/sys/windows/dnsapi.odin | 2 +- core/sys/windows/ip_helper.odin | 2 +- core/testing/runner_windows.odin | 4 ++-- core/thread/thread_windows.odin | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/core/mem/virtual/virtual_windows.odin b/core/mem/virtual/virtual_windows.odin index bbd74a925..5e97296af 100644 --- a/core/mem/virtual/virtual_windows.odin +++ b/core/mem/virtual/virtual_windows.odin @@ -53,7 +53,7 @@ PAGE_TARGETS_NO_UPDATE :: 0x40000000 ERROR_INVALID_ADDRESS :: 487 ERROR_COMMITMENT_LIMIT :: 1455 -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign Kernel32 { GetSystemInfo :: proc(lpSystemInfo: LPSYSTEM_INFO) --- VirtualAlloc :: proc(lpAddress: rawptr, dwSize: uint, flAllocationType: u32, flProtect: u32) -> rawptr --- diff --git a/core/runtime/entry_windows.odin b/core/runtime/entry_windows.odin index 277daecca..b6fbe1dcc 100644 --- a/core/runtime/entry_windows.odin +++ b/core/runtime/entry_windows.odin @@ -7,7 +7,7 @@ import "core:intrinsics" when ODIN_BUILD_MODE == .Dynamic { @(link_name="DllMain", linkage="strong", require) - DllMain :: proc "stdcall" (hinstDLL: rawptr, fdwReason: u32, lpReserved: rawptr) -> b32 { + DllMain :: proc "system" (hinstDLL: rawptr, fdwReason: u32, lpReserved: rawptr) -> b32 { context = default_context() // Populate Windows DLL-specific global @@ -29,7 +29,7 @@ when ODIN_BUILD_MODE == .Dynamic { } else when !ODIN_TEST && !ODIN_NO_ENTRY_POINT { when ODIN_ARCH == .i386 || ODIN_NO_CRT { @(link_name="mainCRTStartup", linkage="strong", require) - mainCRTStartup :: proc "stdcall" () -> i32 { + mainCRTStartup :: proc "system" () -> i32 { context = default_context() #force_no_inline _startup_runtime() intrinsics.__entry_point() diff --git a/core/runtime/os_specific_windows.odin b/core/runtime/os_specific_windows.odin index 9f001fa5a..4a5907466 100644 --- a/core/runtime/os_specific_windows.odin +++ b/core/runtime/os_specific_windows.odin @@ -4,7 +4,7 @@ package runtime foreign import kernel32 "system:Kernel32.lib" @(private="file") -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign kernel32 { // NOTE(bill): The types are not using the standard names (e.g. DWORD and LPVOID) to just minimizing the dependency diff --git a/core/runtime/procs.odin b/core/runtime/procs.odin index 1b8a54c6d..454574c35 100644 --- a/core/runtime/procs.odin +++ b/core/runtime/procs.odin @@ -4,7 +4,7 @@ when ODIN_NO_CRT && ODIN_OS == .Windows { foreign import lib "system:NtDll.lib" @(private="file") - @(default_calling_convention="stdcall") + @(default_calling_convention="system") foreign lib { RtlMoveMemory :: proc(dst, s: rawptr, length: int) --- RtlFillMemory :: proc(dst: rawptr, length: int, fill: i32) --- diff --git a/core/runtime/procs_windows_amd64.odin b/core/runtime/procs_windows_amd64.odin index a30985d5c..ea495f5fa 100644 --- a/core/runtime/procs_windows_amd64.odin +++ b/core/runtime/procs_windows_amd64.odin @@ -6,7 +6,7 @@ foreign import kernel32 "system:Kernel32.lib" @(private) foreign kernel32 { - RaiseException :: proc "stdcall" (dwExceptionCode, dwExceptionFlags, nNumberOfArguments: u32, lpArguments: ^uint) -> ! --- + RaiseException :: proc "system" (dwExceptionCode, dwExceptionFlags, nNumberOfArguments: u32, lpArguments: ^uint) -> ! --- } windows_trap_array_bounds :: proc "contextless" () -> ! { diff --git a/core/runtime/procs_windows_i386.odin b/core/runtime/procs_windows_i386.odin index 4f606da8f..10422cf07 100644 --- a/core/runtime/procs_windows_i386.odin +++ b/core/runtime/procs_windows_i386.odin @@ -13,7 +13,7 @@ windows_trap_array_bounds :: proc "contextless" () -> ! { EXCEPTION_ARRAY_BOUNDS_EXCEEDED :: 0xC000008C foreign kernel32 { - RaiseException :: proc "stdcall" (dwExceptionCode, dwExceptionFlags, nNumberOfArguments: DWORD, lpArguments: ^ULONG_PTR) -> ! --- + RaiseException :: proc "system" (dwExceptionCode, dwExceptionFlags, nNumberOfArguments: DWORD, lpArguments: ^ULONG_PTR) -> ! --- } RaiseException(EXCEPTION_ARRAY_BOUNDS_EXCEEDED, 0, 0, nil) diff --git a/core/sync/futex_windows.odin b/core/sync/futex_windows.odin index 8ddbef3ed..6a26baf5b 100644 --- a/core/sync/futex_windows.odin +++ b/core/sync/futex_windows.odin @@ -5,14 +5,14 @@ package sync import "core:time" foreign import Synchronization "system:Synchronization.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign Synchronization { WakeByAddressSingle :: proc(Address: rawptr) --- WakeByAddressAll :: proc(Address: rawptr) --- } foreign import Ntdll "system:Ntdll.lib" -@(default_calling_convention="stdcall") +@(default_calling_convention="system") foreign Ntdll { RtlWaitOnAddress :: proc(Address: rawptr, CompareAddress: rawptr, AddressSize: uint, Timeout: ^i64) -> i32 --- RtlNtStatusToDosError :: proc(status: i32) -> u32 --- @@ -30,7 +30,7 @@ foreign Ntdll { GODDAMN MICROSOFT! */ -CustomWaitOnAddress :: proc "stdcall" (Address: rawptr, CompareAddress: rawptr, AddressSize: uint, Timeout: ^i64) -> bool { +CustomWaitOnAddress :: proc "system" (Address: rawptr, CompareAddress: rawptr, AddressSize: uint, Timeout: ^i64) -> bool { status := RtlWaitOnAddress(Address, CompareAddress, AddressSize, Timeout) if status != 0 { SetLastError(RtlNtStatusToDosError(status)) diff --git a/core/sys/windows/dnsapi.odin b/core/sys/windows/dnsapi.odin index 623fa2889..dd2d1acee 100644 --- a/core/sys/windows/dnsapi.odin +++ b/core/sys/windows/dnsapi.odin @@ -3,7 +3,7 @@ package sys_windows foreign import "system:Dnsapi.lib" -@(default_calling_convention="std") +@(default_calling_convention="system") foreign Dnsapi { DnsQuery_UTF8 :: proc(name: cstring, type: u16, options: DWORD, extra: PVOID, results: ^^DNS_RECORD, reserved: PVOID) -> DNS_STATUS --- DnsRecordListFree :: proc(list: ^DNS_RECORD, options: DWORD) --- diff --git a/core/sys/windows/ip_helper.odin b/core/sys/windows/ip_helper.odin index d8f93f533..4c2534c10 100644 --- a/core/sys/windows/ip_helper.odin +++ b/core/sys/windows/ip_helper.odin @@ -217,7 +217,7 @@ NL_DAD_STATE :: enum i32 { IpDadStatePreferred = 4, } -@(default_calling_convention = "std") +@(default_calling_convention = "system") foreign iphlpapi { /* The GetAdaptersAddresses function retrieves the addresses associated with the adapters on the local computer. diff --git a/core/testing/runner_windows.odin b/core/testing/runner_windows.odin index 17bcfce26..dbb9ed1c0 100644 --- a/core/testing/runner_windows.odin +++ b/core/testing/runner_windows.odin @@ -90,7 +90,7 @@ Thread_Os_Specific :: struct { } thread_create :: proc(procedure: Thread_Proc) -> ^Thread { - __windows_thread_entry_proc :: proc "stdcall" (t_: rawptr) -> win32.DWORD { + __windows_thread_entry_proc :: proc "system" (t_: rawptr) -> win32.DWORD { t := (^Thread)(t_) context = t.init_context.? or_else runtime.default_context() @@ -172,7 +172,7 @@ global_current_t: ^T run_internal_test :: proc(t: ^T, it: Internal_Test) { thread := thread_create(proc(thread: ^Thread) { - exception_handler_proc :: proc "stdcall" (ExceptionInfo: ^win32.EXCEPTION_POINTERS) -> win32.LONG { + exception_handler_proc :: proc "system" (ExceptionInfo: ^win32.EXCEPTION_POINTERS) -> win32.LONG { switch ExceptionInfo.ExceptionRecord.ExceptionCode { case win32.EXCEPTION_DATATYPE_MISALIGNMENT, diff --git a/core/thread/thread_windows.odin b/core/thread/thread_windows.odin index 2d6cad1ad..28b2294d1 100644 --- a/core/thread/thread_windows.odin +++ b/core/thread/thread_windows.odin @@ -21,7 +21,7 @@ _thread_priority_map := [Thread_Priority]i32{ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread { win32_thread_id: win32.DWORD - __windows_thread_entry_proc :: proc "stdcall" (t_: rawptr) -> win32.DWORD { + __windows_thread_entry_proc :: proc "system" (t_: rawptr) -> win32.DWORD { t := (^Thread)(t_) t.id = sync.current_thread_id() From a86cfa6e979f7b8d672561d3c177086f85ea2478 Mon Sep 17 00:00:00 2001 From: Kostas Tsiligkiris Date: Wed, 17 Jan 2024 21:38:33 +0200 Subject: [PATCH 49/57] Fix filename in example --- core/encoding/xml/example/xml_example.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/encoding/xml/example/xml_example.odin b/core/encoding/xml/example/xml_example.odin index aebb8d0ea..9648143db 100644 --- a/core/encoding/xml/example/xml_example.odin +++ b/core/encoding/xml/example/xml_example.odin @@ -20,7 +20,7 @@ example :: proc() { xml.destroy(docs[round]) } - DOC :: #load("../../../../tests/core/assets/XML/unicode.xml") + DOC :: #load("../../../../tests/core/assets/XML/utf8.xml") input := DOC for round in 0.. Date: Wed, 17 Jan 2024 21:58:38 +0200 Subject: [PATCH 50/57] Fix comments in xml_reader.odin for better rendering in documentation --- core/encoding/xml/xml_reader.odin | 183 +++++++++--------------------- 1 file changed, 53 insertions(+), 130 deletions(-) diff --git a/core/encoding/xml/xml_reader.odin b/core/encoding/xml/xml_reader.odin index 8538febb5..562d519d5 100644 --- a/core/encoding/xml/xml_reader.odin +++ b/core/encoding/xml/xml_reader.odin @@ -43,48 +43,32 @@ DEFAULT_OPTIONS :: Options{ } Option_Flag :: enum { - /* - If the caller says that input may be modified, we can perform in-situ parsing. - If this flag isn't provided, the XML parser first duplicates the input so that it can. - */ + // If the caller says that input may be modified, we can perform in-situ parsing. + // If this flag isn't provided, the XML parser first duplicates the input so that it can. Input_May_Be_Modified, - /* - Document MUST start with ` (doc: ^Document, err: Error) { data := data context.allocator = allocator opts := validate_options(options) or_return - /* - If `.Input_May_Be_Modified` is not specified, we duplicate the input so that we can modify it in-place. - */ + // If `.Input_May_Be_Modified` is not specified, we duplicate the input so that we can modify it in-place. if .Input_May_Be_Modified not_in opts.flags { data = bytes.clone(data) } @@ -252,10 +209,8 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha element, parent: Element_ID open: Token - /* - If a DOCTYPE is present, the root tag has to match. - If an expected DOCTYPE is given in options (i.e. it's non-empty), the DOCTYPE (if present) and root tag have to match. - */ + // If a DOCTYPE is present, the root tag has to match. + // If an expected DOCTYPE is given in options (i.e. it's non-empty), the DOCTYPE (if present) and root tag have to match. expected_doctype := options.expected_doctype loop: for { @@ -263,17 +218,13 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha // NOTE(Jeroen): This is faster as a switch. switch t.ch { case '<': - /* - Consume peeked `<` - */ + // Consume peeked `<` advance_rune(t) open = scan(t) // NOTE(Jeroen): We're not using a switch because this if-else chain ordered by likelihood is 2.5% faster at -o:size and -o:speed. if likely(open.kind, Token_Kind.Ident) == .Ident { - /* - e.g. 0 && expected_doctype != open.text { error(t, t.offset, "Root Tag doesn't match DOCTYPE. Expected: %v, got: %v\n", expected_doctype, open.text) @@ -298,23 +247,17 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha } } - /* - One of these should follow: - - `>`, which means we've just opened this tag and expect a later element to close it. - - `/>`, which means this is an 'empty' or self-closing tag. - */ + // One of these should follow: + // - `>`, which means we've just opened this tag and expect a later element to close it. + // - `/>`, which means this is an 'empty' or self-closing tag. end_token := scan(t) #partial switch end_token.kind { case .Gt: - /* - We're now the new parent. - */ + // We're now the new parent. parent = element case .Slash: - /* - Empty tag. Close it. - */ + // Empty tag. Close it. expect(t, .Gt) or_return parent = doc.elements[element].parent element = parent @@ -325,9 +268,7 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha } } else if open.kind == .Slash { - /* - Close tag. - */ + // Close tag. ident := expect(t, .Ident) or_return _ = expect(t, .Gt) or_return @@ -339,9 +280,7 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha element = parent } else if open.kind == .Exclaim { - /* - . - The grammar does not allow a comment to end in ---> - */ + // Comment: . + // The grammar does not allow a comment to end in ---> expect(t, .Dash) comment := scan_comment(t) or_return @@ -395,23 +332,17 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha } } else if open.kind == .Question { - /* - 0 { - /* - We've already seen a prologue. - */ + // We've already seen a prologue. return doc, .Too_Many_Prologs } else { - /* - Could be ` (err: Error) { doc.encoding = .LATIN_1 case: - /* - Unrecognized encoding, assume UTF-8. - */ + // Unrecognized encoding, assume UTF-8. error(t, offset, "[parse_prologue] Warning: Unrecognized encoding: %v\n", attr.val) } @@ -658,11 +583,11 @@ skip_element :: proc(t: ^Tokenizer) -> (err: Error) { parse_doctype :: proc(doc: ^Document) -> (err: Error) { /* - + - - ]> + + ]> */ assert(doc != nil) context.allocator = doc.allocator @@ -675,9 +600,7 @@ parse_doctype :: proc(doc: ^Document) -> (err: Error) { offset := t.offset skip_element(t) or_return - /* - -1 because the current offset is that of the closing tag, so the rest of the DOCTYPE tag ends just before it. - */ + // -1 because the current offset is that of the closing tag, so the rest of the DOCTYPE tag ends just before it. doc.doctype.rest = string(t.src[offset : t.offset - 1]) return .None } From 991c1d4446ab121eb25c32c710f89398d02d6471 Mon Sep 17 00:00:00 2001 From: Colin Davidson Date: Wed, 17 Jan 2024 13:27:19 -0800 Subject: [PATCH 51/57] add resize_non_zeroed to query features --- core/mem/alloc.odin | 24 ++++++++++++++++++++++-- core/mem/allocators.odin | 9 ++++++--- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/core/mem/alloc.odin b/core/mem/alloc.odin index 507b13d6f..af652a575 100644 --- a/core/mem/alloc.odin +++ b/core/mem/alloc.odin @@ -245,12 +245,26 @@ default_resize_align :: proc(old_memory: rawptr, old_size, new_size, alignment: res = raw_data(data) return } + +@(require_results) +default_resize_bytes_align_non_zeroed :: proc(old_data: []byte, new_size, alignment: int, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) { + return _default_resize_bytes_align(old_data, new_size, alignment, false, allocator, loc) +} @(require_results) default_resize_bytes_align :: proc(old_data: []byte, new_size, alignment: int, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) { + return _default_resize_bytes_align(old_data, new_size, alignment, true, allocator, loc) +} + +@(require_results) +_default_resize_bytes_align :: #force_inline proc(old_data: []byte, new_size, alignment: int, should_zero: bool, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) { old_memory := raw_data(old_data) old_size := len(old_data) if old_memory == nil { - return alloc_bytes(new_size, alignment, allocator, loc) + if should_zero { + return alloc_bytes(new_size, alignment, allocator, loc) + } else { + return alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) + } } if new_size == 0 { @@ -262,7 +276,13 @@ default_resize_bytes_align :: proc(old_data: []byte, new_size, alignment: int, a return old_data, .None } - new_memory, err := alloc_bytes(new_size, alignment, allocator, loc) + new_memory : []byte + err : Allocator_Error + if should_zero { + new_memory, err = alloc_bytes(new_size, alignment, allocator, loc) + } else { + new_memory, err = alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) + } if new_memory == nil || err != nil { return nil, err } diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin index 362b897b4..76f87a450 100644 --- a/core/mem/allocators.odin +++ b/core/mem/allocators.odin @@ -85,13 +85,16 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, case .Free_All: arena.offset = 0 - case .Resize, .Resize_Non_Zeroed: - return default_resize_bytes_align(byte_slice(old_memory, old_size), size, alignment, arena_allocator(arena)) + case .Resize: + return default_resize_bytes_align(byte_slice(old_memory, old_size), size, alignment, arena_allocator(arena)) + + case .Resize_Non_Zeroed: + return default_resize_bytes_align_non_zeroed(byte_slice(old_memory, old_size), size, alignment, arena_allocator(arena)) case .Query_Features: set := (^Allocator_Mode_Set)(old_memory) if set != nil { - set^ = {.Alloc, .Alloc_Non_Zeroed, .Free_All, .Resize, .Query_Features} + set^ = {.Alloc, .Alloc_Non_Zeroed, .Free_All, .Resize, .Resize_Non_Zeroed, .Query_Features} } return nil, nil From b6838731f5073ce9f1311d64dfba8b01e7636a6a Mon Sep 17 00:00:00 2001 From: Colin Davidson Date: Wed, 17 Jan 2024 13:30:03 -0800 Subject: [PATCH 52/57] oops, indentation --- core/mem/alloc.odin | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/core/mem/alloc.odin b/core/mem/alloc.odin index af652a575..4cea20f30 100644 --- a/core/mem/alloc.odin +++ b/core/mem/alloc.odin @@ -248,11 +248,11 @@ default_resize_align :: proc(old_memory: rawptr, old_size, new_size, alignment: @(require_results) default_resize_bytes_align_non_zeroed :: proc(old_data: []byte, new_size, alignment: int, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) { - return _default_resize_bytes_align(old_data, new_size, alignment, false, allocator, loc) + return _default_resize_bytes_align(old_data, new_size, alignment, false, allocator, loc) } @(require_results) default_resize_bytes_align :: proc(old_data: []byte, new_size, alignment: int, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) { - return _default_resize_bytes_align(old_data, new_size, alignment, true, allocator, loc) + return _default_resize_bytes_align(old_data, new_size, alignment, true, allocator, loc) } @(require_results) @@ -260,11 +260,11 @@ _default_resize_bytes_align :: #force_inline proc(old_data: []byte, new_size, al old_memory := raw_data(old_data) old_size := len(old_data) if old_memory == nil { - if should_zero { - return alloc_bytes(new_size, alignment, allocator, loc) - } else { - return alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) - } + if should_zero { + return alloc_bytes(new_size, alignment, allocator, loc) + } else { + return alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) + } } if new_size == 0 { @@ -276,13 +276,13 @@ _default_resize_bytes_align :: #force_inline proc(old_data: []byte, new_size, al return old_data, .None } - new_memory : []byte - err : Allocator_Error - if should_zero { - new_memory, err = alloc_bytes(new_size, alignment, allocator, loc) - } else { - new_memory, err = alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) - } + new_memory : []byte + err : Allocator_Error + if should_zero { + new_memory, err = alloc_bytes(new_size, alignment, allocator, loc) + } else { + new_memory, err = alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) + } if new_memory == nil || err != nil { return nil, err } From 248a0bfa5f21ed09311887e3a8d9c79b6ec94fe4 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 22:41:22 +0000 Subject: [PATCH 53/57] Add `virtual.map_file` --- core/mem/virtual/file.odin | 47 ++++++++++++++++++++++ core/mem/virtual/virtual_bsd.odin | 4 ++ core/mem/virtual/virtual_darwin.odin | 17 ++++++++ core/mem/virtual/virtual_linux.odin | 18 +++++++++ core/mem/virtual/virtual_windows.odin | 56 ++++++++++++++++++++++++++- 5 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 core/mem/virtual/file.odin diff --git a/core/mem/virtual/file.odin b/core/mem/virtual/file.odin new file mode 100644 index 000000000..c76b02626 --- /dev/null +++ b/core/mem/virtual/file.odin @@ -0,0 +1,47 @@ +package mem_virtual + +import "core:os" + +Mapped_File_Error :: enum { + None, + Open_Failure, + Stat_Failure, + Negative_Size, + Too_Large_Size, + Map_Failure, +} + +Mapped_File_Flag :: enum u32 { + Read, + Write, +} +Mapped_File_Flags :: distinct bit_set[Mapped_File_Flag; u32] + +map_file :: proc{ + map_file_from_path, + map_file_from_file_descriptor, +} + +map_file_from_path :: proc(filename: string, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { + fd, err := os.open(filename, os.O_RDWR) + if err != 0 { + return nil, .Open_Failure + } + defer os.close(fd) + + return map_file_from_file_descriptor(uintptr(fd), flags) +} + +map_file_from_file_descriptor :: proc(fd: uintptr, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { + size, os_err := os.file_size(os.Handle(fd)) + if os_err != 0 { + return nil, .Stat_Failure + } + if size < 0 { + return nil, .Negative_Size + } + if size != i64(int(size)) { + return nil, .Too_Large_Size + } + return _map_file(fd, size, flags) +} diff --git a/core/mem/virtual/virtual_bsd.odin b/core/mem/virtual/virtual_bsd.odin index 103e48074..b10c46c64 100644 --- a/core/mem/virtual/virtual_bsd.odin +++ b/core/mem/virtual/virtual_bsd.odin @@ -22,3 +22,7 @@ _protect :: proc "contextless" (data: rawptr, size: uint, flags: Protect_Flags) _platform_memory_init :: proc() { } + +_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { + return nil, .Map_Failure +} diff --git a/core/mem/virtual/virtual_darwin.odin b/core/mem/virtual/virtual_darwin.odin index bd1336cba..831b73d73 100644 --- a/core/mem/virtual/virtual_darwin.odin +++ b/core/mem/virtual/virtual_darwin.odin @@ -146,3 +146,20 @@ _platform_memory_init :: proc() { // is power of two assert(DEFAULT_PAGE_SIZE != 0 && (DEFAULT_PAGE_SIZE & (DEFAULT_PAGE_SIZE-1)) == 0) } + + +_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { + prot, mflags: c.int + if .Read in flags { + prot |= PROT_READ + } + if .Write in flags { + prot |= PROT_WRITE + } + mflags |= MAP_SHARED + addr := _mmap(nil, c.size_t(size), prot, mflags, i32(fd), 0) + if addr == nil { + return nil, .Map_Failure + } + return ([^]byte)(addr)[:size], nil +} diff --git a/core/mem/virtual/virtual_linux.odin b/core/mem/virtual/virtual_linux.odin index b927f2877..cbe3e544f 100644 --- a/core/mem/virtual/virtual_linux.odin +++ b/core/mem/virtual/virtual_linux.odin @@ -48,3 +48,21 @@ _platform_memory_init :: proc() { // is power of two assert(DEFAULT_PAGE_SIZE != 0 && (DEFAULT_PAGE_SIZE & (DEFAULT_PAGE_SIZE-1)) == 0) } + + +_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { + prot: linux.Mem_Protection + if .Read in flags { + prot += {.READ} + } + if .Write in flags { + prot += {.WRITE} + } + + flags := linux.Map_Flags{.SHARED} + addr, errno := linux.mmap(0, uint(size), prot, flags, linux.Fd(fd), offset=0) + if addr == nil || error != nil { + return nil, .Map_Failure + } + return ([^]byte)(addr)[:size], nil +} diff --git a/core/mem/virtual/virtual_windows.odin b/core/mem/virtual/virtual_windows.odin index 5e97296af..7c25951c4 100644 --- a/core/mem/virtual/virtual_windows.odin +++ b/core/mem/virtual/virtual_windows.odin @@ -2,6 +2,8 @@ //+private package mem_virtual +import "core:os" + foreign import Kernel32 "system:Kernel32.lib" LPSYSTEM_INFO :: ^SYSTEM_INFO @@ -50,6 +52,11 @@ PAGE_WRITECOPY :: 0x08 PAGE_TARGETS_INVALID :: 0x40000000 PAGE_TARGETS_NO_UPDATE :: 0x40000000 +SECTION_MAP_WRITE :: 0x0002 +SECTION_MAP_READ :: 0x0004 +FILE_MAP_WRITE :: SECTION_MAP_WRITE +FILE_MAP_READ :: SECTION_MAP_READ + ERROR_INVALID_ADDRESS :: 487 ERROR_COMMITMENT_LIMIT :: 1455 @@ -60,9 +67,24 @@ foreign Kernel32 { VirtualFree :: proc(lpAddress: rawptr, dwSize: uint, dwFreeType: u32) -> b32 --- VirtualProtect :: proc(lpAddress: rawptr, dwSize: uint, flNewProtect: u32, lpflOldProtect: ^u32) -> b32 --- GetLastError :: proc() -> u32 --- + + CreateFileMappingW :: proc( + hFile: rawptr, + lpFileMappingAttributes: rawptr, + flProtect: u32, + dwMaximumSizeHigh: u32, + dwMaximumSizeLow: u32, + lpName: [^]u16, + ) -> rawptr --- + + MapViewOfFile :: proc( + hFileMappingObject: rawptr, + dwDesiredAccess: u32, + dwFileOffsetHigh: u32, + dwFileOffsetLow: u32, + dwNumberOfBytesToMap: uint, + ) -> rawptr --- } - - _reserve :: proc "contextless" (size: uint) -> (data: []byte, err: Allocator_Error) { result := VirtualAlloc(nil, size, MEM_RESERVE, PAGE_READWRITE) if result == nil { @@ -125,3 +147,33 @@ _platform_memory_init :: proc() { // is power of two assert(DEFAULT_PAGE_SIZE != 0 && (DEFAULT_PAGE_SIZE & (DEFAULT_PAGE_SIZE-1)) == 0) } + + +_map_file :: proc "contextless" (fd: os.Handle, size: i64, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { + page_flags: u32 + if flags == {.Read} { + page_flags = PAGE_READONLY + } else if flags == {.Write} { + page_flags = PAGE_READWRITE + } else if flags == {.Read, .Write} { + page_flags = PAGE_READWRITE + } else { + page_flags = PAGE_NOACCESS + } + maximum_size := transmute([2]u32)size + handle := CreateFileMappingW(rawptr(fd), nil, page_flags, maximum_size[1], maximum_size[0], nil) + if handle == nil { + return nil, .Map_Failure + } + + desired_access: u32 + if .Read in flags { + desired_access |= FILE_MAP_READ + } + if .Write in flags { + desired_access |= FILE_MAP_WRITE + } + + file_data := MapViewOfFile(handle, desired_access, 0, 0, uint(size)) + return ([^]byte)(file_data)[:size], nil +} From a8021f03a6149685f68de23accca0364acf98fba Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 22:43:35 +0000 Subject: [PATCH 54/57] Rename to `Map_File_*` --- core/mem/virtual/file.odin | 10 +++++----- core/mem/virtual/virtual_bsd.odin | 2 +- core/mem/virtual/virtual_darwin.odin | 2 +- core/mem/virtual/virtual_linux.odin | 2 +- core/mem/virtual/virtual_windows.odin | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/mem/virtual/file.odin b/core/mem/virtual/file.odin index c76b02626..5d7180588 100644 --- a/core/mem/virtual/file.odin +++ b/core/mem/virtual/file.odin @@ -2,7 +2,7 @@ package mem_virtual import "core:os" -Mapped_File_Error :: enum { +Map_File_Error :: enum { None, Open_Failure, Stat_Failure, @@ -11,18 +11,18 @@ Mapped_File_Error :: enum { Map_Failure, } -Mapped_File_Flag :: enum u32 { +Map_File_Flag :: enum u32 { Read, Write, } -Mapped_File_Flags :: distinct bit_set[Mapped_File_Flag; u32] +Map_File_Flags :: distinct bit_set[Map_File_Flag; u32] map_file :: proc{ map_file_from_path, map_file_from_file_descriptor, } -map_file_from_path :: proc(filename: string, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { +map_file_from_path :: proc(filename: string, flags: Map_File_Flags) -> (data: []byte, error: Map_File_Error) { fd, err := os.open(filename, os.O_RDWR) if err != 0 { return nil, .Open_Failure @@ -32,7 +32,7 @@ map_file_from_path :: proc(filename: string, flags: Mapped_File_Flags) -> (data: return map_file_from_file_descriptor(uintptr(fd), flags) } -map_file_from_file_descriptor :: proc(fd: uintptr, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { +map_file_from_file_descriptor :: proc(fd: uintptr, flags: Map_File_Flags) -> (data: []byte, error: Map_File_Error) { size, os_err := os.file_size(os.Handle(fd)) if os_err != 0 { return nil, .Stat_Failure diff --git a/core/mem/virtual/virtual_bsd.odin b/core/mem/virtual/virtual_bsd.odin index b10c46c64..7568084c0 100644 --- a/core/mem/virtual/virtual_bsd.odin +++ b/core/mem/virtual/virtual_bsd.odin @@ -23,6 +23,6 @@ _platform_memory_init :: proc() { } -_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { +_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Map_File_Flags) -> (data: []byte, error: Map_File_Error) { return nil, .Map_Failure } diff --git a/core/mem/virtual/virtual_darwin.odin b/core/mem/virtual/virtual_darwin.odin index 831b73d73..5be17c0f9 100644 --- a/core/mem/virtual/virtual_darwin.odin +++ b/core/mem/virtual/virtual_darwin.odin @@ -148,7 +148,7 @@ _platform_memory_init :: proc() { } -_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { +_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Map_File_Flags) -> (data: []byte, error: Map_File_Error) { prot, mflags: c.int if .Read in flags { prot |= PROT_READ diff --git a/core/mem/virtual/virtual_linux.odin b/core/mem/virtual/virtual_linux.odin index cbe3e544f..43f4c52f5 100644 --- a/core/mem/virtual/virtual_linux.odin +++ b/core/mem/virtual/virtual_linux.odin @@ -50,7 +50,7 @@ _platform_memory_init :: proc() { } -_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { +_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Map_File_Flags) -> (data: []byte, error: Map_File_Error) { prot: linux.Mem_Protection if .Read in flags { prot += {.READ} diff --git a/core/mem/virtual/virtual_windows.odin b/core/mem/virtual/virtual_windows.odin index 7c25951c4..a600dbe01 100644 --- a/core/mem/virtual/virtual_windows.odin +++ b/core/mem/virtual/virtual_windows.odin @@ -149,7 +149,7 @@ _platform_memory_init :: proc() { } -_map_file :: proc "contextless" (fd: os.Handle, size: i64, flags: Mapped_File_Flags) -> (data: []byte, error: Mapped_File_Error) { +_map_file :: proc "contextless" (fd: os.Handle, size: i64, flags: Map_File_Flags) -> (data: []byte, error: Map_File_Error) { page_flags: u32 if flags == {.Read} { page_flags = PAGE_READONLY From 276284cbec2978570627e5c57d2abd9f6c7e9c81 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 22:44:28 +0000 Subject: [PATCH 55/57] Fix typo --- core/mem/virtual/virtual_windows.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mem/virtual/virtual_windows.odin b/core/mem/virtual/virtual_windows.odin index a600dbe01..69c400e88 100644 --- a/core/mem/virtual/virtual_windows.odin +++ b/core/mem/virtual/virtual_windows.odin @@ -149,7 +149,7 @@ _platform_memory_init :: proc() { } -_map_file :: proc "contextless" (fd: os.Handle, size: i64, flags: Map_File_Flags) -> (data: []byte, error: Map_File_Error) { +_map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Map_File_Flags) -> (data: []byte, error: Map_File_Error) { page_flags: u32 if flags == {.Read} { page_flags = PAGE_READONLY From bd51b213866a5e8e7f17ee24ff693d81be025701 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 22:47:23 +0000 Subject: [PATCH 56/57] Fix typo --- core/mem/virtual/virtual_linux.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mem/virtual/virtual_linux.odin b/core/mem/virtual/virtual_linux.odin index 43f4c52f5..816a8bb84 100644 --- a/core/mem/virtual/virtual_linux.odin +++ b/core/mem/virtual/virtual_linux.odin @@ -61,7 +61,7 @@ _map_file :: proc "contextless" (fd: uintptr, size: i64, flags: Map_File_Flags) flags := linux.Map_Flags{.SHARED} addr, errno := linux.mmap(0, uint(size), prot, flags, linux.Fd(fd), offset=0) - if addr == nil || error != nil { + if addr == nil || errno != nil { return nil, .Map_Failure } return ([^]byte)(addr)[:size], nil From 799f4379d8d3f9354291f69e599516e3a804f44b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jan 2024 22:51:49 +0000 Subject: [PATCH 57/57] Keep vet happy --- core/mem/virtual/virtual_windows.odin | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/mem/virtual/virtual_windows.odin b/core/mem/virtual/virtual_windows.odin index 69c400e88..ee47a01a8 100644 --- a/core/mem/virtual/virtual_windows.odin +++ b/core/mem/virtual/virtual_windows.odin @@ -2,8 +2,6 @@ //+private package mem_virtual -import "core:os" - foreign import Kernel32 "system:Kernel32.lib" LPSYSTEM_INFO :: ^SYSTEM_INFO