unused -> lax
This commit is contained in:
parent
e9a031eea7
commit
d2ef6273c9
2
build.c
2
build.c
@ -546,7 +546,7 @@ void OnBuild(StringList cli_args)
|
|||||||
"-Wno-switch-enum -Wno-assign-enum -Wno-switch-default "
|
"-Wno-switch-enum -Wno-assign-enum -Wno-switch-default "
|
||||||
"-Wno-reserved-identifier -Wno-reserved-macro-identifier "
|
"-Wno-reserved-identifier -Wno-reserved-macro-identifier "
|
||||||
"-Wno-missing-designated-field-initializers "
|
"-Wno-missing-designated-field-initializers "
|
||||||
"-Wno-unsafe-buffer-usage -Wno-visibility "
|
"-Wno-unsafe-buffer-usage "
|
||||||
"-Wno-c11-extensions -Wno-gnu-anonymous-struct -Wno-nested-anon-types ");
|
"-Wno-c11-extensions -Wno-gnu-anonymous-struct -Wno-nested-anon-types ");
|
||||||
|
|
||||||
/* -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter */
|
/* -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter */
|
||||||
|
|||||||
@ -150,11 +150,11 @@ void P_AppStartup(String args_str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(MaybeUnused)args;
|
LAX args;
|
||||||
(MaybeUnused)logfile_name;
|
LAX logfile_name;
|
||||||
(MaybeUnused)settings_file_name;
|
LAX settings_file_name;
|
||||||
(MaybeUnused)connect_address;
|
LAX connect_address;
|
||||||
(MaybeUnused)GetDefaultAppWindowSettings;
|
LAX GetDefaultAppWindowSettings;
|
||||||
|
|
||||||
#if !RtcIsEnabled
|
#if !RtcIsEnabled
|
||||||
/* Verify test modes aren't left on by accident in release mode */
|
/* Verify test modes aren't left on by accident in release mode */
|
||||||
@ -249,8 +249,8 @@ void P_AppStartup(String args_str)
|
|||||||
PB_StartupReceipt playback_sr = PB_Startup(&mixer_sr);
|
PB_StartupReceipt playback_sr = PB_Startup(&mixer_sr);
|
||||||
UserStartupReceipt user_sr = StartupUser(&font_sr, &sprite_sr, &draw_sr, &asset_cache_sr, &sound_sr, &mixer_sr, &sim_sr, connect_address);
|
UserStartupReceipt user_sr = StartupUser(&font_sr, &sprite_sr, &draw_sr, &asset_cache_sr, &sound_sr, &mixer_sr, &sim_sr, connect_address);
|
||||||
|
|
||||||
(MaybeUnused)user_sr;
|
LAX user_sr;
|
||||||
(MaybeUnused)playback_sr;
|
LAX playback_sr;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Write window settings to file */
|
/* Write window settings to file */
|
||||||
|
|||||||
@ -238,8 +238,8 @@ void ASE_Inflate(u8 *dst, u8 *encoded)
|
|||||||
|
|
||||||
u8 cmf = (u8)(cm | (cinfo << 4));
|
u8 cmf = (u8)(cm | (cinfo << 4));
|
||||||
u8 flg = fcheck | (fdict << 5) | (flevl << 6);
|
u8 flg = fcheck | (fdict << 5) | (flevl << 6);
|
||||||
(MaybeUnused)cmf;
|
LAX cmf;
|
||||||
(MaybeUnused)flg;
|
LAX flg;
|
||||||
Assert(((cmf * 256) + flg) % 31 == 0);
|
Assert(((cmf * 256) + flg) % 31 == 0);
|
||||||
|
|
||||||
u8 bfinal = 0;
|
u8 bfinal = 0;
|
||||||
@ -255,7 +255,7 @@ void ASE_Inflate(u8 *dst, u8 *encoded)
|
|||||||
i16 len = ASE_ConsumeBits(&bb, 16);
|
i16 len = ASE_ConsumeBits(&bb, 16);
|
||||||
i16 nlen = ASE_ConsumeBits(&bb, 16);
|
i16 nlen = ASE_ConsumeBits(&bb, 16);
|
||||||
Assert(len == ~nlen); /* Validation */
|
Assert(len == ~nlen); /* Validation */
|
||||||
(MaybeUnused)nlen;
|
LAX nlen;
|
||||||
while (len-- > 0)
|
while (len-- > 0)
|
||||||
{
|
{
|
||||||
*dst++ = ASE_ConsumeBits(&bb, 8);
|
*dst++ = ASE_ConsumeBits(&bb, 8);
|
||||||
|
|||||||
@ -50,7 +50,7 @@ AC_Asset *AC_GetAssetCacheSlotLocked(P_Lock *lock, String key, u64 hash)
|
|||||||
{
|
{
|
||||||
AC_SharedState *g = &AC_shared_state;
|
AC_SharedState *g = &AC_shared_state;
|
||||||
P_AssertLockedES(lock, &g->lookup_mutex);
|
P_AssertLockedES(lock, &g->lookup_mutex);
|
||||||
(MaybeUnused)lock;
|
LAX lock;
|
||||||
|
|
||||||
u64 index = hash % countof(g->lookup);
|
u64 index = hash % countof(g->lookup);
|
||||||
for (;;)
|
for (;;)
|
||||||
|
|||||||
@ -134,7 +134,7 @@ void ShrinkArena(Arena *arena)
|
|||||||
{
|
{
|
||||||
/* Not implemented */
|
/* Not implemented */
|
||||||
Assert(0);
|
Assert(0);
|
||||||
(MaybeUnused)arena;
|
LAX arena;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetArenaReadonly(Arena *arena)
|
void SetArenaReadonly(Arena *arena)
|
||||||
|
|||||||
@ -205,7 +205,7 @@ Inline TempArena _BeginScratch(Arena *potential_conflict)
|
|||||||
_BeginScratchNoConflict(); \
|
_BeginScratchNoConflict(); \
|
||||||
do { \
|
do { \
|
||||||
u8 arena = 0; \
|
u8 arena = 0; \
|
||||||
(MaybeUnused)arena; \
|
LAX arena; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
Inline TempArena _BeginScratchNoConflict(void)
|
Inline TempArena _BeginScratchNoConflict(void)
|
||||||
|
|||||||
@ -161,7 +161,7 @@ BuddyBlock *GetUnusedBuddyBlock(BuddyCtx *ctx, BuddyLevel *level)
|
|||||||
left->parent = parent_block;
|
left->parent = parent_block;
|
||||||
left->memory = parent_block->memory;
|
left->memory = parent_block->memory;
|
||||||
|
|
||||||
/* Create right (MaybeUnused) block from parent block */
|
/* Create right LAX block from parent block */
|
||||||
BuddyBlock *right = PushBuddyBlock(ctx);
|
BuddyBlock *right = PushBuddyBlock(ctx);
|
||||||
right->is_used = 0;
|
right->is_used = 0;
|
||||||
right->level = level;
|
right->level = level;
|
||||||
@ -196,7 +196,7 @@ BuddyBlock *GetUnusedBuddyBlock(BuddyCtx *ctx, BuddyLevel *level)
|
|||||||
left->level = level;
|
left->level = level;
|
||||||
left->memory = ArenaBase(arena);
|
left->memory = ArenaBase(arena);
|
||||||
|
|
||||||
/* Create right (MaybeUnused) block from new arena memory */
|
/* Create right LAX block from new arena memory */
|
||||||
BuddyBlock *right = PushBuddyBlock(ctx);
|
BuddyBlock *right = PushBuddyBlock(ctx);
|
||||||
right->is_used = 0;
|
right->is_used = 0;
|
||||||
right->level = level;
|
right->level = level;
|
||||||
|
|||||||
@ -133,7 +133,7 @@ extern "C" {
|
|||||||
# define Assert(cond) ((cond) ? 1 : (__builtin_trap(), 0))
|
# define Assert(cond) ((cond) ? 1 : (__builtin_trap(), 0))
|
||||||
# define DEBUGBREAK __builtin_debugtrap()
|
# define DEBUGBREAK __builtin_debugtrap()
|
||||||
# endif
|
# endif
|
||||||
# define DEBUGBREAKABLE { volatile i32 __DEBUGBREAKABLE_VAR = 0; (MaybeUnused) __DEBUGBREAKABLE_VAR; } (void)0
|
# define DEBUGBREAKABLE { volatile i32 __DEBUGBREAKABLE_VAR = 0; LAX __DEBUGBREAKABLE_VAR; } (void)0
|
||||||
#else
|
#else
|
||||||
# define Assert(cond) (void)(0)
|
# define Assert(cond) (void)(0)
|
||||||
#endif
|
#endif
|
||||||
@ -237,15 +237,18 @@ void __asan_unpoison_memory_region(void const volatile *add, size_t);
|
|||||||
# error Memory barriers not implemented
|
# error Memory barriers not implemented
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//- Markup
|
//- Unused markup
|
||||||
#define MaybeUnused void
|
/* Strict unused markup */
|
||||||
|
|
||||||
#if CompilerIsClang
|
#if CompilerIsClang
|
||||||
# define UNUSED __attribute((unused))
|
# define UNUSED __attribute((unused))
|
||||||
#else
|
#else
|
||||||
# define UNUSED
|
# define UNUSED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Relaxed unused markup */
|
||||||
|
#define LAX (void)
|
||||||
|
|
||||||
|
//- Fallthrough
|
||||||
#if CompilerIsMsvc
|
#if CompilerIsMsvc
|
||||||
# if LanguageIsCpp
|
# if LanguageIsCpp
|
||||||
# define FALLTHROUGH [[fallthrough]]
|
# define FALLTHROUGH [[fallthrough]]
|
||||||
|
|||||||
@ -649,7 +649,7 @@ b32 AdvanceCodepointIter(CodepointIter *iter)
|
|||||||
void EndCodepointIter(CodepointIter *iter)
|
void EndCodepointIter(CodepointIter *iter)
|
||||||
{
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
(MaybeUnused)iter;
|
LAX iter;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- String decode
|
//- String decode
|
||||||
|
|||||||
@ -7,7 +7,7 @@ D_StartupReceipt D_Startup(F_StartupReceipt *font_sr)
|
|||||||
{
|
{
|
||||||
__prof;
|
__prof;
|
||||||
D_SharedState *g = &D_shared_state;
|
D_SharedState *g = &D_shared_state;
|
||||||
(MaybeUnused)font_sr;
|
LAX font_sr;
|
||||||
u32 pixel_white = 0xFFFFFFFF;
|
u32 pixel_white = 0xFFFFFFFF;
|
||||||
g->solid_white_texture = GPU_AllocTexture(GP_TEXTURE_FORMAT_R8G8B8A8_UNORM, 0, VEC2I32(1, 1), &pixel_white);
|
g->solid_white_texture = GPU_AllocTexture(GP_TEXTURE_FORMAT_R8G8B8A8_UNORM, 0, VEC2I32(1, 1), &pixel_white);
|
||||||
return (D_StartupReceipt) { 0 };
|
return (D_StartupReceipt) { 0 };
|
||||||
@ -116,7 +116,7 @@ void D_DrawLineGradient(GPU_RenderSig *sig, Vec2 start, Vec2 end, f32 thickness,
|
|||||||
D_DrawMaterial(sig, D_MATERIALPARAMS(.texture = g->solid_white_texture, .tint0 = start_color, .tint1 = end_color, .quad = quad));
|
D_DrawMaterial(sig, D_MATERIALPARAMS(.texture = g->solid_white_texture, .tint0 = start_color, .tint1 = end_color, .quad = quad));
|
||||||
#else
|
#else
|
||||||
/* Placeholder */
|
/* Placeholder */
|
||||||
(MaybeUnused)end_color;
|
LAX end_color;
|
||||||
Quad quad = QuadFromLine(start, end, thickness);
|
Quad quad = QuadFromLine(start, end, thickness);
|
||||||
D_DrawQuad(sig, quad, start_color);
|
D_DrawQuad(sig, quad, start_color);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
DXC_Result DXC_Compile(Arena *arena, String shader_source, i32 num_args, String *args)
|
DXC_Result DXC_Compile(Arena *arena, String shader_source, i32 num_args, String *args)
|
||||||
{
|
{
|
||||||
(MaybeUnused)arena;
|
LAX arena;
|
||||||
(MaybeUnused)shader_source;
|
LAX shader_source;
|
||||||
(MaybeUnused)num_args;
|
LAX num_args;
|
||||||
(MaybeUnused)args;
|
LAX args;
|
||||||
DXC_Result result = ZI;
|
DXC_Result result = ZI;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,8 +7,8 @@ F_StartupReceipt F_Startup(AC_StartupReceipt *asset_cache_sr, TTF_StartupReceipt
|
|||||||
{
|
{
|
||||||
__prof;
|
__prof;
|
||||||
F_SharedState *g = &F_shared_state;
|
F_SharedState *g = &F_shared_state;
|
||||||
(MaybeUnused)asset_cache_sr;
|
LAX asset_cache_sr;
|
||||||
(MaybeUnused)ttf_sr;
|
LAX ttf_sr;
|
||||||
g->params.arena = AllocArena(Gibi(64));
|
g->params.arena = AllocArena(Gibi(64));
|
||||||
return (F_StartupReceipt) { 0 };
|
return (F_StartupReceipt) { 0 };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,7 +88,7 @@ P_ExitFuncDef(GPU_D12_Shutdown)
|
|||||||
}
|
}
|
||||||
ID3D12Device_Release(g->device);
|
ID3D12Device_Release(g->device);
|
||||||
#else
|
#else
|
||||||
(MaybeUnused)GPU_D12_ReleaseCommandQueue;
|
LAX GPU_D12_ReleaseCommandQueue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -339,7 +339,7 @@ void GPU_D12_InitObjects(void)
|
|||||||
GPU_D12_CommandQueue *cq = g->command_queues[i];
|
GPU_D12_CommandQueue *cq = g->command_queues[i];
|
||||||
String dbg_name = params[i].dbg_name;
|
String dbg_name = params[i].dbg_name;
|
||||||
__prof_dx12_ctx_alloc(cq->prof, g->device, cq->cq, dbg_name.text, dbg_name.len);
|
__prof_dx12_ctx_alloc(cq->prof, g->device, cq->cq, dbg_name.text, dbg_name.len);
|
||||||
(MaybeUnused)dbg_name;
|
LAX dbg_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1321,7 +1321,7 @@ GPU_D12_CpuDescriptorHeap *GPU_D12_AllocCpuDescriptorHeap(enum D3D12_DESCRIPTOR_
|
|||||||
void cpu_descriptor_heap_release(GPU_D12_CpuDescriptorHeap *dh)
|
void cpu_descriptor_heap_release(GPU_D12_CpuDescriptorHeap *dh)
|
||||||
{
|
{
|
||||||
/* TODO */
|
/* TODO */
|
||||||
(MaybeUnused)dh;
|
LAX dh;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1556,7 +1556,7 @@ void GPU_D12_ReleaseCommandQueue(GPU_D12_CommandQueue *cq)
|
|||||||
{
|
{
|
||||||
__prof;
|
__prof;
|
||||||
/* TODO */
|
/* TODO */
|
||||||
(MaybeUnused)cq;
|
LAX cq;
|
||||||
//ID3D12CommandQueue_Release(cq->cq);
|
//ID3D12CommandQueue_Release(cq->cq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3090,7 +3090,7 @@ GPU_Swapchain *GPU_AllocSwapchain(P_Window *window, Vec2I32 resolution)
|
|||||||
void GPU_ReleaseSwapchain(GPU_Swapchain *gp_swapchain)
|
void GPU_ReleaseSwapchain(GPU_Swapchain *gp_swapchain)
|
||||||
{
|
{
|
||||||
/* TODO */
|
/* TODO */
|
||||||
(MaybeUnused)gp_swapchain;
|
LAX gp_swapchain;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU_WaitOnSwapchain(GPU_Swapchain *gp_swapchain)
|
void GPU_WaitOnSwapchain(GPU_Swapchain *gp_swapchain)
|
||||||
@ -3102,7 +3102,7 @@ void GPU_WaitOnSwapchain(GPU_Swapchain *gp_swapchain)
|
|||||||
WaitForSingleObjectEx(swapchain->waitable, 1000, 1);
|
WaitForSingleObjectEx(swapchain->waitable, 1000, 1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
(MaybeUnused)gp_swapchain;
|
LAX gp_swapchain;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ MIX_Track *MIX_AllocTrackLocked(P_Lock *lock, SND_Sound *sound)
|
|||||||
{
|
{
|
||||||
MIX_SharedState *g = &M_shared_state;
|
MIX_SharedState *g = &M_shared_state;
|
||||||
P_AssertLockedE(lock, &g->mutex);
|
P_AssertLockedE(lock, &g->mutex);
|
||||||
(MaybeUnused)lock;
|
LAX lock;
|
||||||
|
|
||||||
MIX_Track *track = 0;
|
MIX_Track *track = 0;
|
||||||
if (g->track_first_free)
|
if (g->track_first_free)
|
||||||
@ -104,7 +104,7 @@ void MIX_ReleaseTrackLocked(P_Lock *lock, MIX_Track *track)
|
|||||||
{
|
{
|
||||||
MIX_SharedState *g = &M_shared_state;
|
MIX_SharedState *g = &M_shared_state;
|
||||||
P_AssertLockedE(lock, &g->mutex);
|
P_AssertLockedE(lock, &g->mutex);
|
||||||
(MaybeUnused)lock;
|
LAX lock;
|
||||||
|
|
||||||
/* Remove from playing list */
|
/* Remove from playing list */
|
||||||
MIX_Track *prev = track->prev;
|
MIX_Track *prev = track->prev;
|
||||||
|
|||||||
@ -65,8 +65,8 @@ void P_Unlock(P_Lock *lock);
|
|||||||
# define P_AssertLockedE(l, m) Assert((l)->mutex == (m) && (l)->exclusive == 1)
|
# define P_AssertLockedE(l, m) Assert((l)->mutex == (m) && (l)->exclusive == 1)
|
||||||
# define P_AssertLockedES(l, m) Assert((l)->mutex == (m))
|
# define P_AssertLockedES(l, m) Assert((l)->mutex == (m))
|
||||||
#else
|
#else
|
||||||
# define P_AssertLockedE(l, m) (MaybeUnused)l
|
# define P_AssertLockedE(l, m) LAX l
|
||||||
# define P_AssertLockedES(l, m) (MaybeUnused)l
|
# define P_AssertLockedES(l, m) LAX l
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|||||||
@ -187,7 +187,7 @@ void P_W32_WaitReleaseThread(P_W32_Thread *thread)
|
|||||||
__prof;
|
__prof;
|
||||||
b32 success = P_W32_TryReleaseThread(thread, F32Infinity);
|
b32 success = P_W32_TryReleaseThread(thread, F32Infinity);
|
||||||
Assert(success);
|
Assert(success);
|
||||||
(MaybeUnused)success;
|
LAX success;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
@ -671,7 +671,7 @@ ForceNoInline void P_W32_FiberResume(P_W32_Fiber *fiber)
|
|||||||
|
|
||||||
void P_W32_YieldFiber(P_W32_Fiber *fiber, P_W32_Fiber *parent_fiber)
|
void P_W32_YieldFiber(P_W32_Fiber *fiber, P_W32_Fiber *parent_fiber)
|
||||||
{
|
{
|
||||||
(MaybeUnused)fiber;
|
LAX fiber;
|
||||||
Assert(fiber->id == FiberId());
|
Assert(fiber->id == FiberId());
|
||||||
Assert(parent_fiber->id == fiber->parent_id);
|
Assert(parent_fiber->id == fiber->parent_id);
|
||||||
Assert(parent_fiber->id > 0);
|
Assert(parent_fiber->id > 0);
|
||||||
@ -727,7 +727,7 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
|||||||
P_W32_WorkerCtx *ctx = worker_ctx_arg;
|
P_W32_WorkerCtx *ctx = worker_ctx_arg;
|
||||||
P_Pool pool_kind = ctx->pool_kind;
|
P_Pool pool_kind = ctx->pool_kind;
|
||||||
P_W32_JobPool *pool = &g->job_pools[pool_kind];
|
P_W32_JobPool *pool = &g->job_pools[pool_kind];
|
||||||
(MaybeUnused)ctx;
|
LAX ctx;
|
||||||
|
|
||||||
{
|
{
|
||||||
/* TODO: Heuristic pinning */
|
/* TODO: Heuristic pinning */
|
||||||
@ -739,7 +739,7 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
|||||||
__profn("Set priority");
|
__profn("Set priority");
|
||||||
b32 success = SetThreadPriority(thread_handle, pool->thread_priority) != 0;
|
b32 success = SetThreadPriority(thread_handle, pool->thread_priority) != 0;
|
||||||
Assert(success);
|
Assert(success);
|
||||||
(MaybeUnused)success;
|
LAX success;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -761,7 +761,7 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
Assert(success);
|
Assert(success);
|
||||||
(MaybeUnused)success;
|
LAX success;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -772,7 +772,7 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
|||||||
DWORD task = 0;
|
DWORD task = 0;
|
||||||
HANDLE mmc_handle = AvSetMmThreadCharacteristics(L"Pro Audio", &task);
|
HANDLE mmc_handle = AvSetMmThreadCharacteristics(L"Pro Audio", &task);
|
||||||
Assert(mmc_handle);
|
Assert(mmc_handle);
|
||||||
(MaybeUnused)mmc_handle;
|
LAX mmc_handle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1100,14 +1100,14 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ Win32 job scheduler
|
//~ Win32 job scheduler
|
||||||
|
|
||||||
P_W32_ThreadDef(P_W32_JobSchedulerEntryFunc, _)
|
P_W32_ThreadDef(P_W32_JobSchedulerEntryFunc, UNUSED arg)
|
||||||
{
|
{
|
||||||
struct P_W32_SharedCtx *g = &P_W32_shared_ctx;
|
struct P_W32_SharedCtx *g = &P_W32_shared_ctx;
|
||||||
|
|
||||||
{
|
{
|
||||||
i32 priority = THREAD_PRIORITY_TIME_CRITICAL;
|
i32 priority = THREAD_PRIORITY_TIME_CRITICAL;
|
||||||
b32 success = SetThreadPriority(GetCurrentThread(), priority);
|
b32 success = SetThreadPriority(GetCurrentThread(), priority);
|
||||||
(MaybeUnused)success;
|
LAX success;
|
||||||
Assert(success);
|
Assert(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2281,7 +2281,7 @@ String P_ReadFile(Arena *arena, P_File file)
|
|||||||
/* TODO: error checking */
|
/* TODO: error checking */
|
||||||
AlignArena(arena, 16);
|
AlignArena(arena, 16);
|
||||||
s.text = PushStructsNoZero(arena, u8, size);
|
s.text = PushStructsNoZero(arena, u8, size);
|
||||||
(MaybeUnused)ReadFile(
|
LAX ReadFile(
|
||||||
(HANDLE)file.handle,
|
(HANDLE)file.handle,
|
||||||
s.text,
|
s.text,
|
||||||
(DWORD)s.len,
|
(DWORD)s.len,
|
||||||
@ -2308,7 +2308,7 @@ void P_WriteFile(P_File file, String data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* WriteFile returns TRUE on success */
|
/* WriteFile returns TRUE on success */
|
||||||
(MaybeUnused)WriteFile(
|
LAX WriteFile(
|
||||||
(HANDLE)file.handle,
|
(HANDLE)file.handle,
|
||||||
data.text,
|
data.text,
|
||||||
(DWORD)data.len,
|
(DWORD)data.len,
|
||||||
@ -2513,7 +2513,7 @@ P_WatchInfoList P_ReadWatchWait(Arena *arena, P_Watch *dw)
|
|||||||
0,
|
0,
|
||||||
&ov,
|
&ov,
|
||||||
0);
|
0);
|
||||||
(MaybeUnused)success;
|
LAX success;
|
||||||
Assert(success);
|
Assert(success);
|
||||||
|
|
||||||
HANDLE handles[] = {
|
HANDLE handles[] = {
|
||||||
@ -3070,7 +3070,7 @@ void P_WriteSock(P_Sock *sock, P_Address address, String data)
|
|||||||
if (size != (i32)data.len)
|
if (size != (i32)data.len)
|
||||||
{
|
{
|
||||||
i32 err = WSAGetLastError();
|
i32 err = WSAGetLastError();
|
||||||
(MaybeUnused)err;
|
LAX err;
|
||||||
Assert(0);
|
Assert(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -3346,7 +3346,7 @@ void P_W32_InitBtnTable(void)
|
|||||||
g->vk_btn_table[VK_OEM_1] = P_Btn_Semicolon;
|
g->vk_btn_table[VK_OEM_1] = P_Btn_Semicolon;
|
||||||
}
|
}
|
||||||
|
|
||||||
P_JobDef(P_W32_AppStartupJob, _)
|
P_JobDef(P_W32_AppStartupJob, UNUSED job)
|
||||||
{
|
{
|
||||||
P_W32_SharedCtx *g = &P_W32_shared_ctx;
|
P_W32_SharedCtx *g = &P_W32_shared_ctx;
|
||||||
TempArena scratch = BeginScratchNoConflict();
|
TempArena scratch = BeginScratchNoConflict();
|
||||||
@ -3373,10 +3373,10 @@ P_JobDef(P_W32_AppShutdownJob, _)
|
|||||||
|
|
||||||
int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance, _In_ LPWSTR cmdline_wstr, _In_ int show_code)
|
int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance, _In_ LPWSTR cmdline_wstr, _In_ int show_code)
|
||||||
{
|
{
|
||||||
(MaybeUnused)instance;
|
LAX instance;
|
||||||
(MaybeUnused)prev_instance;
|
LAX prev_instance;
|
||||||
(MaybeUnused)cmdline_wstr;
|
LAX cmdline_wstr;
|
||||||
(MaybeUnused)show_code;
|
LAX show_code;
|
||||||
|
|
||||||
__profthread("Main thread", PROF_THREAD_GROUP_MAIN);
|
__profthread("Main thread", PROF_THREAD_GROUP_MAIN);
|
||||||
P_W32_SharedCtx *g = &P_W32_shared_ctx;
|
P_W32_SharedCtx *g = &P_W32_shared_ctx;
|
||||||
@ -3441,7 +3441,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert(success);
|
Assert(success);
|
||||||
(MaybeUnused)success;
|
LAX success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CloseHandle(thread);
|
CloseHandle(thread);
|
||||||
@ -3543,7 +3543,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
|
|||||||
|
|
||||||
b32 success = RegisterRawInputDevices(&rid, 1, sizeof(rid));
|
b32 success = RegisterRawInputDevices(&rid, 1, sizeof(rid));
|
||||||
Assert(success);
|
Assert(success);
|
||||||
(MaybeUnused)success;
|
LAX success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Init threads pool */
|
/* Init threads pool */
|
||||||
|
|||||||
@ -13,7 +13,7 @@ PB_StartupReceipt PB_Startup(MIX_StartupReceipt *mixer_sr)
|
|||||||
{
|
{
|
||||||
__prof;
|
__prof;
|
||||||
PB_WSP_SharedState *g = &PB_WSP_shared_state;
|
PB_WSP_SharedState *g = &PB_WSP_shared_state;
|
||||||
(MaybeUnused)mixer_sr;
|
LAX mixer_sr;
|
||||||
PB_WSP_InitializeWasapi();
|
PB_WSP_InitializeWasapi();
|
||||||
/* Start playback job */
|
/* Start playback job */
|
||||||
P_Run(1, PB_WSP_PlaybackJob, 0, P_Pool_Audio, P_Priority_High, &g->PB_WSP_PlaybackJob_counter);
|
P_Run(1, PB_WSP_PlaybackJob, 0, P_Pool_Audio, P_Priority_High, &g->PB_WSP_PlaybackJob_counter);
|
||||||
|
|||||||
@ -13,13 +13,13 @@ UserStartupReceipt StartupUser(F_StartupReceipt *font_sr,
|
|||||||
String connect_address_str)
|
String connect_address_str)
|
||||||
{
|
{
|
||||||
__prof;
|
__prof;
|
||||||
(MaybeUnused)font_sr;
|
LAX font_sr;
|
||||||
(MaybeUnused)sprite_sr;
|
LAX sprite_sr;
|
||||||
(MaybeUnused)draw_sr;
|
LAX draw_sr;
|
||||||
(MaybeUnused)asset_cache_sr;
|
LAX asset_cache_sr;
|
||||||
(MaybeUnused)sound_sr;
|
LAX sound_sr;
|
||||||
(MaybeUnused)mixer_sr;
|
LAX mixer_sr;
|
||||||
(MaybeUnused)sim_sr;
|
LAX sim_sr;
|
||||||
SharedUserState *g = &shared_user_state;
|
SharedUserState *g = &shared_user_state;
|
||||||
|
|
||||||
SetGstat(GSTAT_DEBUG_STEPS, U64Max);
|
SetGstat(GSTAT_DEBUG_STEPS, U64Max);
|
||||||
@ -1358,8 +1358,8 @@ void UpdateUser(P_Window *window)
|
|||||||
ContactConstraint *data = &ent->contact_constraint_data;
|
ContactConstraint *data = &ent->contact_constraint_data;
|
||||||
Entity *e0 = sim_ent_from_id(g->ss_blended, data->e0);
|
Entity *e0 = sim_ent_from_id(g->ss_blended, data->e0);
|
||||||
Entity *e1 = sim_ent_from_id(g->ss_blended, data->e1);
|
Entity *e1 = sim_ent_from_id(g->ss_blended, data->e1);
|
||||||
(MaybeUnused)e0;
|
LAX e0;
|
||||||
(MaybeUnused)e1;
|
LAX e1;
|
||||||
|
|
||||||
#if DeveloperIsEnabled
|
#if DeveloperIsEnabled
|
||||||
/* Draw contact points */
|
/* Draw contact points */
|
||||||
@ -1433,8 +1433,8 @@ void UpdateUser(P_Window *window)
|
|||||||
Entity *e1 = sim_ent_from_id(g->ss_blended, data->e1);
|
Entity *e1 = sim_ent_from_id(g->ss_blended, data->e1);
|
||||||
CLD_Shape e0_collider = e0->local_collider;
|
CLD_Shape e0_collider = e0->local_collider;
|
||||||
CLD_Shape e1_collider = e1->local_collider;
|
CLD_Shape e1_collider = e1->local_collider;
|
||||||
(MaybeUnused)e0_collider;
|
LAX e0_collider;
|
||||||
(MaybeUnused)e1_collider;
|
LAX e1_collider;
|
||||||
|
|
||||||
/* Draw closest points */
|
/* Draw closest points */
|
||||||
#if 0
|
#if 0
|
||||||
@ -1538,7 +1538,7 @@ void UpdateUser(P_Window *window)
|
|||||||
u32 color = collision_reuslt.solved ? Rgba32F(0, 0, 0.25, 1) : Rgba32F(0, 0.25, 0.25, 1);
|
u32 color = collision_reuslt.solved ? Rgba32F(0, 0, 0.25, 1) : Rgba32F(0, 0.25, 0.25, 1);
|
||||||
f32 thickness = 2;
|
f32 thickness = 2;
|
||||||
u32 detail = 512;
|
u32 detail = 512;
|
||||||
(MaybeUnused)thickness;
|
LAX thickness;
|
||||||
|
|
||||||
Vec2Array m = CLD_Menkowski(temp.arena, &e0_collider, &e1_collider, e0_xf, e1_xf, detail);
|
Vec2Array m = CLD_Menkowski(temp.arena, &e0_collider, &e1_collider, e0_xf, e1_xf, detail);
|
||||||
|
|
||||||
|
|||||||
@ -1013,7 +1013,7 @@ void phys_warm_start_weld_joints(PhysStepCtx *ctx)
|
|||||||
sim_ent_set_angular_velocity(e1, e1->angular_velocity + joint->angular_impulse1 * inv_i);
|
sim_ent_set_angular_velocity(e1, e1->angular_velocity + joint->angular_impulse1 * inv_i);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
(MaybeUnused)joint;
|
LAX joint;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1260,7 +1260,7 @@ void phys_step(PhysStepCtx *ctx, f32 timestep)
|
|||||||
f32 earliest_toi = MaxF32(phys_determine_earliest_toi(ctx, step_dt, tolerance, max_iterations), min_toi);
|
f32 earliest_toi = MaxF32(phys_determine_earliest_toi(ctx, step_dt, tolerance, max_iterations), min_toi);
|
||||||
step_dt = remaining_dt * earliest_toi;
|
step_dt = remaining_dt * earliest_toi;
|
||||||
#else
|
#else
|
||||||
(MaybeUnused)phys_determine_earliest_toi;
|
LAX phys_determine_earliest_toi;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
remaining_dt -= step_dt;
|
remaining_dt -= step_dt;
|
||||||
|
|||||||
@ -170,9 +170,9 @@ internal Entity *test_spawn_employee(Entity *parent)
|
|||||||
|
|
||||||
/* Player weapon */
|
/* Player weapon */
|
||||||
if (employee->valid) {
|
if (employee->valid) {
|
||||||
(MaybeUnused)test_spawn_smg;
|
LAX test_spawn_smg;
|
||||||
(MaybeUnused)test_spawn_launcher;
|
LAX test_spawn_launcher;
|
||||||
(MaybeUnused)test_spawn_chucker;
|
LAX test_spawn_chucker;
|
||||||
|
|
||||||
Entity *e = test_spawn_chucker(employee);
|
Entity *e = test_spawn_chucker(employee);
|
||||||
employee->equipped = e->id;
|
employee->equipped = e->id;
|
||||||
@ -229,7 +229,7 @@ internal void test_teleport(Entity *ent, Vec2 pos)
|
|||||||
|
|
||||||
internal void test_spawn_entities1(Entity *parent, Vec2 pos)
|
internal void test_spawn_entities1(Entity *parent, Vec2 pos)
|
||||||
{
|
{
|
||||||
(MaybeUnused)pos;
|
LAX pos;
|
||||||
|
|
||||||
/* Enemy */
|
/* Enemy */
|
||||||
{
|
{
|
||||||
@ -242,7 +242,7 @@ internal void test_spawn_entities1(Entity *parent, Vec2 pos)
|
|||||||
|
|
||||||
internal void test_spawn_entities2(Entity *parent, Vec2 pos)
|
internal void test_spawn_entities2(Entity *parent, Vec2 pos)
|
||||||
{
|
{
|
||||||
(MaybeUnused)pos;
|
LAX pos;
|
||||||
|
|
||||||
/* Small Box */
|
/* Small Box */
|
||||||
#if 1
|
#if 1
|
||||||
@ -313,7 +313,7 @@ internal void test_spawn_entities2(Entity *parent, Vec2 pos)
|
|||||||
|
|
||||||
internal void test_spawn_entities3(Entity *parent, Vec2 pos)
|
internal void test_spawn_entities3(Entity *parent, Vec2 pos)
|
||||||
{
|
{
|
||||||
(MaybeUnused)pos;
|
LAX pos;
|
||||||
|
|
||||||
/* Heavy box */
|
/* Heavy box */
|
||||||
{
|
{
|
||||||
@ -338,7 +338,7 @@ internal void test_spawn_entities3(Entity *parent, Vec2 pos)
|
|||||||
|
|
||||||
internal void test_spawn_entities4(Entity *parent, Vec2 pos)
|
internal void test_spawn_entities4(Entity *parent, Vec2 pos)
|
||||||
{
|
{
|
||||||
(MaybeUnused)pos;
|
LAX pos;
|
||||||
|
|
||||||
/* Light box */
|
/* Light box */
|
||||||
Entity *e = sim_ent_alloc_sync_src(parent);
|
Entity *e = sim_ent_alloc_sync_src(parent);
|
||||||
|
|||||||
@ -42,7 +42,7 @@ RES_StartupReceipt RES_Startup(void);
|
|||||||
RES_Resource RES_OpenResource(String name);
|
RES_Resource RES_OpenResource(String name);
|
||||||
|
|
||||||
#if RESOURCES_EMBEDDED
|
#if RESOURCES_EMBEDDED
|
||||||
# define RES_CloseResource(res_ptr) (MaybeUnused)res_ptr
|
# define RES_CloseResource(res_ptr) LAX res_ptr
|
||||||
#else
|
#else
|
||||||
void RES_CloseResource(RES_Resource *res_ptr);
|
void RES_CloseResource(RES_Resource *res_ptr);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -7,7 +7,7 @@ SND_StartupReceipt SND_Startup(AC_StartupReceipt *asset_cache_sr)
|
|||||||
{
|
{
|
||||||
__prof;
|
__prof;
|
||||||
SND_SharedState *g = &SND_shared_state;
|
SND_SharedState *g = &SND_shared_state;
|
||||||
(MaybeUnused)asset_cache_sr;
|
LAX asset_cache_sr;
|
||||||
g->params.arena = AllocArena(Gibi(64));
|
g->params.arena = AllocArena(Gibi(64));
|
||||||
return (SND_StartupReceipt) { 0 };
|
return (SND_StartupReceipt) { 0 };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,7 @@ TTF_Result TTF_Decode(Arena *arena, String encoded, f32 point_size, u32 *cache_c
|
|||||||
|
|
||||||
/* TODO: handle errors */
|
/* TODO: handle errors */
|
||||||
HRESULT error = 0;
|
HRESULT error = 0;
|
||||||
(MaybeUnused)error;
|
LAX error;
|
||||||
|
|
||||||
/* File */
|
/* File */
|
||||||
IDWriteFontFile *font_file = 0;
|
IDWriteFontFile *font_file = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user