diff --git a/src/base/base_wave.h b/src/base/base_wave.h index 5957fadb..ca516d2b 100644 --- a/src/base/base_wave.h +++ b/src/base/base_wave.h @@ -6,6 +6,7 @@ AlignedStruct(WaveCtx, CachelineSize) { i32 lanes_count; + void *udata; /* Sync barrier */ Atomic32Padded sync_count; @@ -26,7 +27,7 @@ AlignedStruct(WaveLaneCtx, CachelineSize) i64 seen_broadcast_gen; }; -typedef void WaveLaneEntryFunc(WaveLaneCtx *lane, void *udata); +typedef void WaveLaneEntryFunc(WaveLaneCtx *lane); //////////////////////////////////////////////////////////// //~ Wave sync ops diff --git a/src/base/base_win32/base_win32_wave.c b/src/base/base_win32/base_win32_wave.c index ff168415..7db076bd 100644 --- a/src/base/base_win32/base_win32_wave.c +++ b/src/base/base_win32/base_win32_wave.c @@ -27,7 +27,7 @@ DWORD WINAPI W32_ThreadProc(LPVOID thread_args_vp) W32_ThreadArgs *thread_args = (W32_ThreadArgs *)thread_args_vp; W32_InitCurrentThread(thread_args->name); LogInfoF("New thread \"%F\" created with ID %F", FmtString(thread_args->name), FmtUint(ThreadId())); - thread_args->entry(thread_args->lane, thread_args->udata); + thread_args->entry(thread_args->lane); return 0; } @@ -40,6 +40,7 @@ void DispatchWave(String name, u32 num_lanes, WaveLaneEntryFunc *entry, void *ud WaveCtx *wave_ctx = PushStruct(perm, WaveCtx); wave_ctx->lanes_count = num_lanes; + wave_ctx->udata = udata; for (u32 lane_idx = 0; lane_idx < num_lanes; ++lane_idx) { diff --git a/src/meta/meta.c b/src/meta/meta.c index a648be67..186a2bc0 100644 --- a/src/meta/meta.c +++ b/src/meta/meta.c @@ -1,65 +1,7 @@ -/* TODO: Move decls to meta.h */ - -#define MetaRebuildCode 1317212284 - -//////////////////////////////////////////////////////////// -//~ Default base layer compiler definitions - -#ifndef IsConsoleApp -# define IsConsoleApp 1 -#endif - -#ifndef IsRtcEnabled -# define IsRtcEnabled 1 -#endif - -#ifndef IsUnoptimized -# define IsUnoptimized 1 -#endif - -#ifndef IsAsanEnabled -# define IsAsanEnabled 0 -#endif - -#ifndef IsCrtlibEnabled -# define IsCrtlibEnabled 1 -#endif - -#ifndef IsDebinfoEnabled -# define IsDebinfoEnabled 1 -#endif - -#ifndef IsDeveloperModeEnabled -# define IsDeveloperModeEnabled 1 -#endif - -#ifndef IsUnoptimized -# define IsUnoptimized 1 -#endif - -#ifndef IsTestingEnabled -# define IsTestingEnabled 0 -#endif - -#ifndef IsHotSwappingEnabled -# define IsHotSwappingEnabled 0 -#endif - -//////////////////////////////////////////////////////////// -//~ Includes - -//- Header files -#include "../base/base_inc.h" -#include "meta_os/meta_os_inc.h" -#include "meta_file/meta_file_inc.h" -#include "meta_lay.h" #include "meta.h" -//- Source files -#include "meta_lay.c" - //////////////////////////////////////////////////////////// -//~ Util +//~ Helpers void EchoLine(String msg) { @@ -80,12 +22,6 @@ void EchoLineOrNothing(String msg) } } -Struct(LineCol) -{ - i64 line; - i64 col; -}; - LineCol LineColFromPos(String data, i64 pos) { TempArena scratch = BeginScratchNoConflict(); @@ -147,9 +83,9 @@ String StringFromMetaErrors(Arena *arena, M_ErrorList errors) } //////////////////////////////////////////////////////////// -//~ Startup +//~ Build -void BuildEntryPoint(WaveLaneCtx *lane, void *udata) +void BuildEntryPoint(WaveLaneCtx *lane) { Arena *perm = PermArena(); @@ -230,26 +166,7 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) ////////////////////////////// //- Generate compiler params - Struct(CompilerParams) - { - StringList defs; - - StringList warnings_msvc; - StringList warnings_clang; - StringList warnings_dxc; - - StringList flags_msvc; - StringList flags_clang; - StringList flags_dxc; - - StringList compiler_only_flags_msvc; - StringList compiler_only_flags_clang; - - StringList linker_only_flags_msvc; - StringList linker_only_flags_clang; - }; CompilerParams cp = ZI; - { //- Common { @@ -345,41 +262,6 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) String c_out_file = F_GetFull(perm, StringF(perm, "%F_gen_c.c", FmtString(cmdline.leaf_layer_name))); String gpu_out_file = F_GetFull(perm, StringF(perm, "%F_gen_gpu.hlsl", FmtString(cmdline.leaf_layer_name))); - Enum(ShaderEntryKind) - { - ShaderEntryKind_VS, - ShaderEntryKind_PS, - ShaderEntryKind_CS, - }; - - Struct(ShaderEntry) - { - ShaderEntry *next; - ShaderEntryKind kind; - String name; - }; - - Struct(ArcInfoEntry) - { - ArcInfoEntry *next; - String dir_path; - String store_name; - String out_path; - }; - - Struct(GpuComp) - { - String output; - i32 return_code; - }; - - Struct(ResComp) - { - String obj_file; - String output; - i32 return_code; - }; - /* * ## Phase 1 * @@ -409,57 +291,6 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) /* TODO: Dispatch OS Cmds asynchronously rather than synchronously waiting on each lane */ - Struct(BuildData) - { - M_Layer flattened; - - struct - { - M_ErrorList errors; - } cgen; - - struct - { - M_ErrorList errors; - ShaderEntry *first_shader_entry; - ShaderEntry *last_shader_entry; - u64 shader_entries_count; - } gpugen; - - struct - { - String obj_file; - String output; - i32 return_code; - } ccomp; - - struct - { - GpuComp *array; - u32 count; - } gpucomps; - - struct - { - M_ErrorList errors; - ArcInfoEntry *first_arc_entry; - ArcInfoEntry *last_arc_entry; - u64 arc_entries_count; - } arcinfogen; - - struct - { - ResComp *array; - u32 count; - } rescomps; - - struct - { - String output; - i32 return_code; - } link; - }; - BuildData *build = 0; if (lane->idx == 0) { @@ -470,41 +301,27 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) i32 ret = 0; ////////////////////////////// - //- Parse meta layers + //- Parse layers, generate final C file, generate final HLSL file, and gather resource archive info if (lane->idx == 0 && !ret) { - //- Lex layers - M_TokenFileList lexed = ZI; + //- Parse layers { + /* Lex */ StringList src_dirs = ZI; PushStringToList(perm, &src_dirs, Lit("../src")); - lexed = M_TokensFromSrcDirs(perm, src_dirs); - } + M_TokenFileList lexed = M_TokensFromSrcDirs(perm, src_dirs); - //- Parse layers - M_LayerList parsed = ZI; - { - parsed = M_LayersFromTokenFiles(perm, lexed); - } + /* Parse */ + M_LayerList parsed = M_LayersFromTokenFiles(perm, lexed);; - //- Flatten layers - { + /* Flatten */ StringList starting_layer_names = ZI; PushStringToList(perm, &starting_layer_names, cmdline.leaf_layer_name); build->flattened = M_GetFlattenedEntries(perm, parsed, starting_layer_names); } - } - WaveSync(lane); - if (!ret) ret = build->flattened.errors.count > 0; - - ////////////////////////////// - //- Generate C & HLSL files - - if (lane->idx == 0 && !ret) - { - /* Generate C file */ + //- Generate C file { String c_out_file = F_GetFull(perm, StringF(perm, "%F_gen_c.c", FmtString(cmdline.leaf_layer_name))); StringList c_store_lines = ZI; @@ -667,7 +484,7 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) } } - /* Generate HLSL file */ + //- Generate HLSL file { /* Clear shader store */ OS_Mkdir(shader_store_name); @@ -780,72 +597,134 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) F_ClearWrite(gpu_out_file, c_out); } } + + build->gpucomps.count = build->gpugen.shader_entries_count; + build->gpucomps.array = PushStructs(perm, GpuComp, build->gpucomps.count); } - build->gpucomps.count = build->gpugen.shader_entries_count; - build->gpucomps.array = PushStructs(perm, GpuComp, build->gpucomps.count); + //- Generate archive info + { + /* Gather archives from embedded dirs */ + for (M_Entry *entry = build->flattened.first; entry->valid; entry = entry->next) + { + M_EntryKind kind = entry->kind; + M_Token *entry_tok = entry->name_token; + M_Token *arg0_tok = entry->arg_tokens[0]; + M_Token *arg1_tok = entry->arg_tokens[1]; + switch (kind) + { + default: break; + case M_EntryKind_EmbedDir: + { + if (arg0_tok->valid && arg1_tok->valid) + { + String store_name = arg0_tok->s; + String token_file = arg1_tok->file->name; + String token_parent_dir = F_GetParentDir(token_file); + String arg_dir = arg1_tok->s; + String full = F_GetFullCrossPlatform(perm, StringF(perm, "%F/%F", FmtString(token_parent_dir), FmtString(arg_dir))); + if (F_IsDir(full)) + { + ArcInfoEntry *arc = PushStruct(perm, ArcInfoEntry); + arc->store_name = store_name; + arc->dir_path = full; + arc->out_path = StringF(perm, "%F.arc", FmtString(store_name)); + SllQueuePush(build->arcinfogen.first_arc_entry, build->arcinfogen.last_arc_entry, arc); + ++build->arcinfogen.arc_entries_count; + } + else + { + String err = StringF(perm, "Directory '%F' not found", FmtString(full)); + M_PushError(perm, &build->arcinfogen.errors, arg1_tok, err); + } + } + else + { + M_PushError(perm, &build->arcinfogen.errors, entry_tok, Lit("Expected resource store & directory name")); + } + } break; + } + } + /* Gather shader archive */ + { + ArcInfoEntry *arc = PushStruct(perm, ArcInfoEntry); + arc->store_name = shader_store_name; + arc->dir_path = F_GetFullCrossPlatform(perm, shader_store_name); + arc->out_path = StringF(perm, "%F.arc", FmtString(shader_store_name)); + SllQueuePush(build->arcinfogen.first_arc_entry, build->arcinfogen.last_arc_entry, arc); + ++build->arcinfogen.arc_entries_count; + } + + build->rescomps.count = build->arcinfogen.arc_entries_count; + build->rescomps.array = PushStructs(perm, ResComp, build->rescomps.count); + } } WaveSync(lane); if (!ret) ret = build->cgen.errors.count > 0; if (!ret) ret = build->gpugen.errors.count > 0; + if (!ret) ret = build->arcinfogen.errors.count > 0; + if (!ret) ret = build->flattened.errors.count > 0; ////////////////////////////// //- Compile C & Shaders if (!ret) { - /* Compile C */ - u64 ccomp_task_idx = 0; - if (lane->idx == WaveLaneIdxFromTaskIdx(lane, ccomp_task_idx)) + u64 task_idx = 0; + + //- Compile C { - build->ccomp.obj_file = StringF(perm, "%F_gen_c.obj", FmtString(cmdline.leaf_layer_name)); - String cmd = StringF(perm, - "cl.exe /c %F -Fo:%F %F %F %F %F", - FmtString(c_out_file), - FmtString(build->ccomp.obj_file), - FmtString(StringFromList(perm, cp.flags_msvc, Lit(" "))), - FmtString(StringFromList(perm, cp.compiler_only_flags_msvc, Lit(" "))), - FmtString(StringFromList(perm, cp.warnings_msvc, Lit(" "))), - FmtString(StringFromList(perm, cp.defs, Lit(" ")))); - OS_CommandResult cmd_result = OS_RunCommand(perm, cmd); - String cmd_output = TrimWhitespace(cmd_result.output); - build->ccomp.output = cmd_output; - build->ccomp.return_code = cmd_result.code; + if (lane->idx == WaveLaneIdxFromTaskIdx(lane, task_idx++)) + { + build->ccomp.obj_file = StringF(perm, "%F_gen_c.obj", FmtString(cmdline.leaf_layer_name)); + String cmd = StringF(perm, + "cl.exe /c %F -Fo:%F %F %F %F %F", + FmtString(c_out_file), + FmtString(build->ccomp.obj_file), + FmtString(StringFromList(perm, cp.flags_msvc, Lit(" "))), + FmtString(StringFromList(perm, cp.compiler_only_flags_msvc, Lit(" "))), + FmtString(StringFromList(perm, cp.warnings_msvc, Lit(" "))), + FmtString(StringFromList(perm, cp.defs, Lit(" ")))); + OS_CommandResult cmd_result = OS_RunCommand(perm, cmd); + String cmd_output = TrimWhitespace(cmd_result.output); + build->ccomp.output = cmd_output; + build->ccomp.return_code = cmd_result.code; + } } - /* Compile shaders */ - u32 gpucomp_idx = 0; - for (ShaderEntry *e = build->gpugen.first_shader_entry; e; e = e->next) + //- Compile shaders { - /* NOTE: Using gpucomp_idx + 1 as task index for parralelism w/ C compilation */ - u64 gpucomp_task_idx = gpucomp_idx + 1; - if (lane->idx == WaveLaneIdxFromTaskIdx(lane, gpucomp_task_idx)) + u32 gpucomp_idx = 0; + for (ShaderEntry *e = build->gpugen.first_shader_entry; e; e = e->next) { - GpuComp *gpucomp = &build->gpucomps.array[gpucomp_idx]; - String out_file = StringF(perm, "%F/%F", FmtString(shader_store_name), FmtString(e->name)); - String target = e->kind == ShaderEntryKind_VS ? Lit("vs_6_6") - : e->kind == ShaderEntryKind_PS ? Lit("ps_6_6") - : e->kind == ShaderEntryKind_CS ? Lit("cs_6_6") - : Lit("vs_6_6"); - String compile_cmd = StringF(perm, - "dxc.exe -T %F -E %F -Fo %F %F %F %F", - FmtString(target), - FmtString(e->name), - FmtString(out_file), - FmtString(gpu_out_file), - FmtString(StringFromList(perm, cp.defs, Lit(" "))), - FmtString(StringFromList(perm, cp.flags_dxc, Lit(" ")))); - - OS_CommandResult cmd_result = OS_RunCommand(perm, compile_cmd); - - if (cmd_result.code == 0) + if (lane->idx == WaveLaneIdxFromTaskIdx(lane, task_idx++)) { - gpucomp->output = cmd_result.output; - gpucomp->return_code = cmd_result.code; + GpuComp *gpucomp = &build->gpucomps.array[gpucomp_idx]; + String out_file = StringF(perm, "%F/%F", FmtString(shader_store_name), FmtString(e->name)); + String target = e->kind == ShaderEntryKind_VS ? Lit("vs_6_6") + : e->kind == ShaderEntryKind_PS ? Lit("ps_6_6") + : e->kind == ShaderEntryKind_CS ? Lit("cs_6_6") + : Lit("vs_6_6"); + String compile_cmd = StringF(perm, + "dxc.exe -T %F -E %F -Fo %F %F %F %F", + FmtString(target), + FmtString(e->name), + FmtString(out_file), + FmtString(gpu_out_file), + FmtString(StringFromList(perm, cp.defs, Lit(" "))), + FmtString(StringFromList(perm, cp.flags_dxc, Lit(" ")))); + + OS_CommandResult cmd_result = OS_RunCommand(perm, compile_cmd); + + if (cmd_result.code == 0) + { + gpucomp->output = cmd_result.output; + gpucomp->return_code = cmd_result.code; + } } + ++gpucomp_idx; } - ++gpucomp_idx; } } @@ -856,69 +735,6 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) if (!ret) ret = build->gpucomps.array[i].return_code; } - ////////////////////////////// - //- Gather resource archive info - - if (lane->idx == 0 && !ret) - { - /* Gather archives from embedded dirs */ - for (M_Entry *entry = build->flattened.first; entry->valid; entry = entry->next) - { - M_EntryKind kind = entry->kind; - M_Token *entry_tok = entry->name_token; - M_Token *arg0_tok = entry->arg_tokens[0]; - M_Token *arg1_tok = entry->arg_tokens[1]; - switch (kind) - { - default: break; - case M_EntryKind_EmbedDir: - { - if (arg0_tok->valid && arg1_tok->valid) - { - String store_name = arg0_tok->s; - String token_file = arg1_tok->file->name; - String token_parent_dir = F_GetParentDir(token_file); - String arg_dir = arg1_tok->s; - String full = F_GetFullCrossPlatform(perm, StringF(perm, "%F/%F", FmtString(token_parent_dir), FmtString(arg_dir))); - if (F_IsDir(full)) - { - ArcInfoEntry *arc = PushStruct(perm, ArcInfoEntry); - arc->store_name = store_name; - arc->dir_path = full; - arc->out_path = StringF(perm, "%F.arc", FmtString(store_name)); - SllQueuePush(build->arcinfogen.first_arc_entry, build->arcinfogen.last_arc_entry, arc); - ++build->arcinfogen.arc_entries_count; - } - else - { - String err = StringF(perm, "Directory '%F' not found", FmtString(full)); - M_PushError(perm, &build->arcinfogen.errors, arg1_tok, err); - } - } - else - { - M_PushError(perm, &build->arcinfogen.errors, entry_tok, Lit("Expected resource store & directory name")); - } - } break; - } - } - /* Gather shader archive */ - { - ArcInfoEntry *arc = PushStruct(perm, ArcInfoEntry); - arc->store_name = shader_store_name; - arc->dir_path = F_GetFullCrossPlatform(perm, shader_store_name); - arc->out_path = StringF(perm, "%F.arc", FmtString(shader_store_name)); - SllQueuePush(build->arcinfogen.first_arc_entry, build->arcinfogen.last_arc_entry, arc); - ++build->arcinfogen.arc_entries_count; - } - - build->rescomps.count = build->arcinfogen.arc_entries_count; - build->rescomps.array = PushStructs(perm, ResComp, build->rescomps.count); - } - - WaveSync(lane); - if (!ret) ret = build->arcinfogen.errors.count > 0; - ////////////////////////////// //- Generate resource archives @@ -927,7 +743,7 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) u32 task_idx = 0; for (ArcInfoEntry *entry = build->arcinfogen.first_arc_entry; entry; entry = entry->next) { - if (lane->idx == WaveLaneIdxFromTaskIdx(lane, task_idx)) + if (lane->idx == WaveLaneIdxFromTaskIdx(lane, task_idx++)) { String dir_path = entry->dir_path; String store_name = entry->store_name; @@ -1031,7 +847,6 @@ void BuildEntryPoint(WaveLaneCtx *lane, void *udata) F_ClearWrite(arc_path, arc_contents); } } - ++task_idx; } WaveSync(lane); diff --git a/src/meta/meta.h b/src/meta/meta.h index e69de29b..c687f7c1 100644 --- a/src/meta/meta.h +++ b/src/meta/meta.h @@ -0,0 +1,186 @@ +#define MetaRebuildCode 1317212284 + +//////////////////////////////////////////////////////////// +//~ Base layer definitions + +#ifndef IsConsoleApp +# define IsConsoleApp 1 +#endif + +#ifndef IsRtcEnabled +# define IsRtcEnabled 1 +#endif + +#ifndef IsUnoptimized +# define IsUnoptimized 1 +#endif + +#ifndef IsAsanEnabled +# define IsAsanEnabled 0 +#endif + +#ifndef IsCrtlibEnabled +# define IsCrtlibEnabled 1 +#endif + +#ifndef IsDebinfoEnabled +# define IsDebinfoEnabled 1 +#endif + +#ifndef IsDeveloperModeEnabled +# define IsDeveloperModeEnabled 1 +#endif + +#ifndef IsUnoptimized +# define IsUnoptimized 1 +#endif + +#ifndef IsTestingEnabled +# define IsTestingEnabled 0 +#endif + +#ifndef IsHotSwappingEnabled +# define IsHotSwappingEnabled 0 +#endif + +//////////////////////////////////////////////////////////// +//~ Includes + +//- Header files +#include "../base/base_inc.h" +#include "meta_os/meta_os_inc.h" +#include "meta_file/meta_file_inc.h" +#include "meta_lay.h" + +//- Source files +#include "meta_lay.c" + +//////////////////////////////////////////////////////////// +//~ Build types + +Struct(CompilerParams) +{ + StringList defs; + + StringList warnings_msvc; + StringList warnings_clang; + StringList warnings_dxc; + + StringList flags_msvc; + StringList flags_clang; + StringList flags_dxc; + + StringList compiler_only_flags_msvc; + StringList compiler_only_flags_clang; + + StringList linker_only_flags_msvc; + StringList linker_only_flags_clang; +}; + +Enum(ShaderEntryKind) +{ + ShaderEntryKind_VS, + ShaderEntryKind_PS, + ShaderEntryKind_CS, +}; + +Struct(ShaderEntry) +{ + ShaderEntry *next; + ShaderEntryKind kind; + String name; +}; + +Struct(ArcInfoEntry) +{ + ArcInfoEntry *next; + String dir_path; + String store_name; + String out_path; +}; + +Struct(GpuComp) +{ + String output; + i32 return_code; +}; + +Struct(ResComp) +{ + String obj_file; + String output; + i32 return_code; +}; + +Struct(BuildData) +{ + M_Layer flattened; + + struct + { + M_ErrorList errors; + } cgen; + + struct + { + M_ErrorList errors; + ShaderEntry *first_shader_entry; + ShaderEntry *last_shader_entry; + u64 shader_entries_count; + } gpugen; + + struct + { + String obj_file; + String output; + i32 return_code; + } ccomp; + + struct + { + GpuComp *array; + u32 count; + } gpucomps; + + struct + { + M_ErrorList errors; + ArcInfoEntry *first_arc_entry; + ArcInfoEntry *last_arc_entry; + u64 arc_entries_count; + } arcinfogen; + + struct + { + ResComp *array; + u32 count; + } rescomps; + + struct + { + String output; + i32 return_code; + } link; +}; + +//////////////////////////////////////////////////////////// +//~ Helper types + +Struct(LineCol) +{ + i64 line; + i64 col; +}; + +//////////////////////////////////////////////////////////// +//~ Helpers + +void EchoLine(String msg); +void EchoLineOrNothing(String msg); +LineCol LineColFromPos(String data, i64 pos); +String StringFromMetaErrors(Arena *arena, M_ErrorList errors); + +//////////////////////////////////////////////////////////// +//~ Build + +void BuildEntryPoint(WaveLaneCtx *lane); diff --git a/src/platform/platform_win32/platform_win32.c b/src/platform/platform_win32/platform_win32.c index 473c7289..06e117a1 100644 --- a/src/platform/platform_win32/platform_win32.c +++ b/src/platform/platform_win32/platform_win32.c @@ -157,7 +157,7 @@ P_Address P_W32_PlatformAddressFromWin32Address(P_W32_Address ws_addr) //////////////////////////////////////////////////////////// //~ Timer job -void P_W32_SyncTimerForever(WaveLaneCtx *lane, void *udata) +void P_W32_SyncTimerForever(WaveLaneCtx *lane) { P_W32_SharedState *g = &P_W32_shared_state; SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); diff --git a/src/platform/platform_win32/platform_win32.h b/src/platform/platform_win32/platform_win32.h index 180677a1..5517d0b4 100644 --- a/src/platform/platform_win32/platform_win32.h +++ b/src/platform/platform_win32/platform_win32.h @@ -103,4 +103,4 @@ P_Address P_W32_PlatformAddressFromWin32Address(P_W32_Address ws_addr); //////////////////////////////////////////////////////////// //~ Timer job -void P_W32_SyncTimerForever(WaveLaneCtx *lane, void *udata); +void P_W32_SyncTimerForever(WaveLaneCtx *lane); diff --git a/src/proto/proto.c b/src/proto/proto.c index 7ce1dc96..9e329fcd 100644 --- a/src/proto/proto.c +++ b/src/proto/proto.c @@ -1,4 +1,4 @@ -void PT_RunForever(WaveLaneCtx *lane, void *udata) +void PT_RunForever(WaveLaneCtx *lane) { GPU_ArenaHandle gpu_frame_arena = GPU_AcquireArena(); diff --git a/src/window/window_win32/window_win32.c b/src/window/window_win32/window_win32.c index 4abc2c9f..ad15dda0 100644 --- a/src/window/window_win32/window_win32.c +++ b/src/window/window_win32/window_win32.c @@ -101,7 +101,7 @@ WND_W32_Window *WND_W32_WindowFromHandle(WND_Handle handle) //~ Initialization /* Win32 limitation: Window must be initialized on same thread that processes events */ -void WND_W32_ProcessMessagesForever(WaveLaneCtx *lane, void *udata) +void WND_W32_ProcessMessagesForever(WaveLaneCtx *lane) { WND_W32_SharedState *g = &WND_W32_shared_state; WND_W32_Window *window = &g->window; diff --git a/src/window/window_win32/window_win32.h b/src/window/window_win32/window_win32.h index 37016e6c..14d10402 100644 --- a/src/window/window_win32/window_win32.h +++ b/src/window/window_win32/window_win32.h @@ -77,7 +77,7 @@ WND_W32_Window *WND_W32_WindowFromHandle(WND_Handle handle); //////////////////////////////////////////////////////////// //~ Initialization -void WND_W32_ProcessMessagesForever(WaveLaneCtx *lane, void *udata); +void WND_W32_ProcessMessagesForever(WaveLaneCtx *lane); //////////////////////////////////////////////////////////// //~ Message processing