From 5e528f8e97eb9767f1fb87f09d1aca9063228bd5 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 28 Oct 2025 13:21:35 +0000 Subject: [PATCH 1/3] Remove `core:encoding/ini` dependency in `user_posix.odin` --- core/os/os2/user_posix.odin | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/os/os2/user_posix.odin b/core/os/os2/user_posix.odin index 691745b7a..09134d847 100644 --- a/core/os/os2/user_posix.odin +++ b/core/os/os2/user_posix.odin @@ -2,7 +2,6 @@ package os2 import "base:runtime" -import "core:encoding/ini" import "core:strings" _user_cache_dir :: proc(allocator: runtime.Allocator) -> (dir: string, err: Error) { @@ -157,18 +156,19 @@ _xdg_user_dirs_lookup :: proc(xdg_key: string, allocator: runtime.Allocator) -> user_dirs_path := concatenate({config_dir, "/user-dirs.dirs"}, temp_allocator) or_return content := read_entire_file(user_dirs_path, temp_allocator) or_return - it := ini.Iterator{ - section = "", - _src = string(content), - options = ini.Options{ - comment = "#", - key_lower_case = false, - }, - } + xdg_dirs := string(content) + for line in strings.split_lines_iterator(&xdg_dirs) { + if len(line) > 0 && line[0] == '#' { + continue + } - for k, v in ini.iterate(&it) { - if k == xdg_key { - return replace_environment_placeholders(v, allocator), nil + equals := strings.index(line, "=") + if equals > -1 { + if line[:equals] == xdg_key { + // Unquote to return a bare path string as we do on Windows + val := strings.trim(line[equals+1:], "\"") + return replace_environment_placeholders(val, allocator), nil + } } } return From d390ae2f97fbfe7fd582574e6db923d6992e9c6a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 28 Oct 2025 13:26:56 +0000 Subject: [PATCH 2/3] Minor change to misc/shell.bat --- misc/shell.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/shell.bat b/misc/shell.bat index 73232da61..bfd3780e9 100644 --- a/misc/shell.bat +++ b/misc/shell.bat @@ -5,7 +5,7 @@ rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" rem call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 1> NUL rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 1> NUL rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL -call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL +call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 1> NUL set _NO_DEBUG_HEAP=1 set ODIN_IGNORE_MSVC_CHECK=1 From 2508b82878de0790b1508ea8539d40681fa293f6 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 28 Oct 2025 14:50:13 +0000 Subject: [PATCH 3/3] Change `^i16` to `cstring16` where appropriate --- vendor/directx/d3d12/d3d12.odin | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/vendor/directx/d3d12/d3d12.odin b/vendor/directx/d3d12/d3d12.odin index 75e94c833..8f72aedb4 100644 --- a/vendor/directx/d3d12/d3d12.odin +++ b/vendor/directx/d3d12/d3d12.odin @@ -719,7 +719,7 @@ STREAM_OUTPUT_DESC :: struct { } INPUT_LAYOUT_DESC :: struct { - pInputElementDescs: [^]INPUT_ELEMENT_DESC, + pInputElementDescs: [^]INPUT_ELEMENT_DESC `fmt:"v,NumElements"`, NumElements: u32, } @@ -1649,7 +1649,7 @@ VIEW_INSTANCING_FLAG :: enum u32 { VIEW_INSTANCING_DESC :: struct { ViewInstanceCount: u32, - pViewInstanceLocations: [^]VIEW_INSTANCE_LOCATION, + pViewInstanceLocations: [^]VIEW_INSTANCE_LOCATION `fmt:"v,ViewInstanceCount"`, Flags: VIEW_INSTANCING_FLAGS, } @@ -3090,13 +3090,13 @@ EXISTING_COLLECTION_DESC :: struct { SUBOBJECT_TO_EXPORTS_ASSOCIATION :: struct { pSubobjectToAssociate: ^STATE_SUBOBJECT, NumExports: u32, - pExports: [^]^i16, + pExports: [^]cstring16 `fmt:"v,NumExports"`, } DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION :: struct { - SubobjectToAssociate: ^i16, + SubobjectToAssociate: cstring16, NumExports: u32, - pExports: [^]^i16, + pExports: [^]cstring16 `fmt:"v,NumExports"`, } HIT_GROUP_TYPE :: enum i32 { @@ -3105,11 +3105,11 @@ HIT_GROUP_TYPE :: enum i32 { } HIT_GROUP_DESC :: struct { - HitGroupExport: ^i16, + HitGroupExport: cstring16, Type: HIT_GROUP_TYPE, - AnyHitShaderImport: ^i16, - ClosestHitShaderImport: ^i16, - IntersectionShaderImport: ^i16, + AnyHitShaderImport: cstring16, + ClosestHitShaderImport: cstring16, + IntersectionShaderImport: cstring16, } RAYTRACING_SHADER_CONFIG :: struct { @@ -3506,14 +3506,14 @@ DRED_ALLOCATION_TYPE :: enum i32 { DRED_ALLOCATION_NODE :: struct { ObjectNameA: cstring, - ObjectNameW: ^i16, + ObjectNameW: cstring16, AllocationType: DRED_ALLOCATION_TYPE, pNext: ^DRED_ALLOCATION_NODE, } DRED_ALLOCATION_NODE1 :: struct { ObjectNameA: cstring, - ObjectNameW: ^i16, + ObjectNameW: cstring16, AllocationType: DRED_ALLOCATION_TYPE, pNext: ^DRED_ALLOCATION_NODE1, pObject: ^IUnknown, @@ -3539,7 +3539,7 @@ DRED_PAGE_FAULT_OUTPUT1 :: struct { pHeadRecentFreedAllocationNode: ^DRED_ALLOCATION_NODE1, } -DRED_PAGE_FAULT_FLAGS :: bit_set[DRED_PAGE_FAULT_FLAG;u32] +DRED_PAGE_FAULT_FLAGS :: distinct bit_set[DRED_PAGE_FAULT_FLAG; u32] DRED_PAGE_FAULT_FLAG :: enum u32 { } @@ -3819,7 +3819,7 @@ RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS :: struct { pSrcResource: ^IResource, pDstResource: ^IResource, SubresourceCount: u32, - pSubresourceParameters: [^]RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS, + pSubresourceParameters: [^]RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS `fmt:"v,SubresourceCount"`, Format: dxgi.FORMAT, ResolveMode: RESOLVE_MODE, PreserveResolveSource: BOOL, @@ -3901,7 +3901,7 @@ SHADER_CACHE_MODE :: enum i32 { DISK = 1, } -SHADER_CACHE_FLAGS :: bit_set[SHADER_CACHE_FLAG;u32] +SHADER_CACHE_FLAGS :: distinct bit_set[SHADER_CACHE_FLAG; u32] SHADER_CACHE_FLAG :: enum u32 { DRIVER_VERSIONED = 0, USE_WORKING_DIR = 1, @@ -3932,7 +3932,7 @@ IShaderCacheSession_VTable :: struct { } -SHADER_CACHE_KIND_FLAGS :: bit_set[SHADER_CACHE_KIND_FLAG;u32] +SHADER_CACHE_KIND_FLAGS :: distinct bit_set[SHADER_CACHE_KIND_FLAG; u32] SHADER_CACHE_KIND_FLAG :: enum u32 { IMPLICIT_D3D_CACHE_FOR_DRIVER = 0, IMPLICIT_D3D_CONVERSIONS = 1, @@ -3940,7 +3940,7 @@ SHADER_CACHE_KIND_FLAG :: enum u32 { APPLICATION_MANAGED = 3, } -SHADER_CACHE_CONTROL_FLAGS :: bit_set[SHADER_CACHE_CONTROL_FLAG;u32] +SHADER_CACHE_CONTROL_FLAGS :: distinct bit_set[SHADER_CACHE_CONTROL_FLAG; u32] SHADER_CACHE_CONTROL_FLAG :: enum u32 { DISABLE = 0, ENABLE = 1,