formatting
This commit is contained in:
parent
11aec42474
commit
5bee781ede
@ -18,20 +18,16 @@ Enum(JobPool)
|
||||
* etc). */
|
||||
JobPool_Hyper = 0,
|
||||
|
||||
/* Contains un-affinitized worker threads.
|
||||
* Meant to take on blocking work so that affinitized workers can continue doing actual work. */
|
||||
JobPool_Blocking = 1,
|
||||
|
||||
/* Contains worker threads affinitized to cores that don't interfere with workers in specialized pools.
|
||||
* Meant to consume asynchronous work from higher priority pools. */
|
||||
JobPool_Background = 2,
|
||||
JobPool_Background = 1,
|
||||
|
||||
/* Contains worker threads affinitized to cores that don't interfere with workers in other specialized pools.
|
||||
* These pools are meant to only have work pushed onto them from jobs within the same pool (e.g. 100 jobs pushed onto the
|
||||
* User pool will not interfere with cores running the Sim pool). */
|
||||
JobPool_Audio = 3,
|
||||
JobPool_User = 4,
|
||||
JobPool_Sim = 5,
|
||||
JobPool_Audio = 2,
|
||||
JobPool_User = 3,
|
||||
JobPool_Sim = 4,
|
||||
|
||||
JobPool_Count
|
||||
};
|
||||
|
||||
@ -62,13 +62,6 @@ void InitJobSystem(void)
|
||||
pool->thread_priority = THREAD_PRIORITY_NORMAL;
|
||||
} break;
|
||||
|
||||
case JobPool_Blocking:
|
||||
{
|
||||
name_fmt = Lit("Blocking worker #%F");
|
||||
pool->num_worker_threads = 8;
|
||||
pool->thread_priority = THREAD_PRIORITY_NORMAL;
|
||||
} break;
|
||||
|
||||
case JobPool_Hyper:
|
||||
{
|
||||
name_fmt = Lit("Hyper worker #%F");
|
||||
@ -421,12 +414,14 @@ W32_ThreadDef(W32_JobWorkerEntryPoint, worker_ctx_arg)
|
||||
/* TODO: Pin non-worker threads to other cores */
|
||||
HANDLE thread_handle = GetCurrentThread();
|
||||
|
||||
#if 0
|
||||
if (pool->thread_priority != 0)
|
||||
{
|
||||
__profn("Set priority");
|
||||
b32 ok = SetThreadPriority(thread_handle, pool->thread_priority) != 0;
|
||||
Assert(ok);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if (pool->thread_affinity_mask)
|
||||
|
||||
@ -94,6 +94,6 @@
|
||||
|
||||
/* TODO: Move these to user-configurable settings */
|
||||
|
||||
#define VSYNC !RtcIsEnabled
|
||||
#define VSYNC 0
|
||||
#define AUDIO_ENABLED 0
|
||||
#define FPS_LIMIT 300
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
//~ Tweakable defines
|
||||
|
||||
#define GPU_D12_TearingIsAllowed 1
|
||||
#define GPU_D12_FrameLatency 1
|
||||
#define GPU_D12_SwapchainBufferCount 4
|
||||
#define GPU_D12_FrameLatency 2
|
||||
#define GPU_D12_SwapchainBufferCount 3
|
||||
#define GPU_D12_SwapchainFlags (((GPU_D12_TearingIsAllowed != 0) * DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) \
|
||||
| ((GPU_D12_FrameLatency != 0) * DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT))
|
||||
|
||||
|
||||
@ -923,6 +923,7 @@ JobDef(Build, _, __)
|
||||
PushStringToList(arena, &cp.warnings_msvc, Lit("-wd4189")); /* local variable is initialized but not referenced */
|
||||
PushStringToList(arena, &cp.warnings_msvc, Lit("-wd4200")); /* nonstandard extension used: zero-sized array in struct/union */
|
||||
PushStringToList(arena, &cp.warnings_msvc, Lit("-wd4702")); /* unreachable code */
|
||||
PushStringToList(arena, &cp.warnings_msvc, Lit("-wd4127")); /* conditional expression is constant */
|
||||
}
|
||||
|
||||
//- Clang
|
||||
|
||||
@ -62,7 +62,7 @@ void P_Startup(void)
|
||||
wc->lpszClassName = P_W32_WindowClassName;
|
||||
wc->hCursor = LoadCursor(0, IDC_ARROW);
|
||||
wc->style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
||||
//wc->hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
// wc->hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
wc->lpfnWndProc = P_W32_Win32WindowProc;
|
||||
wc->hInstance = instance;
|
||||
|
||||
|
||||
@ -2542,7 +2542,7 @@ void UpdateUser(P_Window *window)
|
||||
|
||||
Vec2 backbuffer_dst_f = MulXformV2(g->ui_to_screen_xf, VEC2(0, 0));
|
||||
Vec2I32 backbuffer_dst = VEC2I32(RoundF32ToI32(backbuffer_dst_f.x), RoundF32ToI32(backbuffer_dst_f.y));
|
||||
g->gpu_render_fence_target = GPU_PresentSwapchain(g->swapchain, g->ui_target, g->screen_size, backbuffer_dst, 0);
|
||||
g->gpu_render_fence_target = GPU_PresentSwapchain(g->swapchain, g->ui_target, g->screen_size, backbuffer_dst, VSYNC);
|
||||
}
|
||||
|
||||
EndScratch(scratch);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user