begin render test

This commit is contained in:
jacob 2025-08-08 12:29:30 -05:00
parent a39c649dc3
commit fdecaacebd
14 changed files with 100 additions and 8 deletions

View File

@ -215,7 +215,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
/* Run app start job */ /* Run app start job */
if (!Atomic32Fetch(&g->panicking)) if (!Atomic32Fetch(&g->panicking))
{ {
RunJob(1, W32_AppStartupJob, 0, JobPool_Floating, JobPriority_High, 0); RunJob(1, W32_AppStartupJob, JobPool_Floating, JobPriority_High, 0, 0);
} }
/* Wait for startup end or panic */ /* Wait for startup end or panic */
@ -243,7 +243,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
/* Run exit callbacks job */ /* Run exit callbacks job */
if (!Atomic32Fetch(&g->panicking)) if (!Atomic32Fetch(&g->panicking))
{ {
RunJob(1, W32_AppShutdownJob, 0, JobPool_Floating, JobPriority_High, 0); RunJob(1, W32_AppShutdownJob, JobPool_Floating, JobPriority_High, 0, 0);
} }
/* Wait for exit end or panic */ /* Wait for exit end or panic */

View File

@ -0,0 +1,6 @@
////////////////////////////////
//~ Startup
void GT_StartupCore(void)
{
}

View File

13
src/gtest/gtest.c Normal file
View File

@ -0,0 +1,13 @@
#include "gtest.h"
#if PlatformIsWindows
# include "dx12/gtest_dx12.c"
#else
# error Gpu backend not implemented
#endif
void GT_Main(void)
{
RunOnce();
GT_StartupDeps();
GT_StartupCore();
}

22
src/gtest/gtest.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef GTEST_H
#define GTEST_H
////////////////////////////////
//~ Layer dependencies
#include "../base/base.h"
inline void GT_StartupDeps(void)
{
BaseMain();
}
////////////////////////////////
//~ Layer headers
#include "gtest_core.h"
#if PlatformIsWindows
# include "dx12/gtest_dx12.h"
#endif
void GT_Main(void);
#endif

4
src/gtest/gtest_core.h Normal file
View File

@ -0,0 +1,4 @@
////////////////////////////////
//~ Startup
void GT_StartupCore(void);

View File

@ -15,7 +15,7 @@ void PB_StartupCore(void)
PB_WSP_SharedState *g = &PB_WSP_shared_state; PB_WSP_SharedState *g = &PB_WSP_shared_state;
PB_WSP_InitializeWasapi(); PB_WSP_InitializeWasapi();
/* Start playback job */ /* Start playback job */
RunJob(1, PB_WSP_PlaybackJob, 0, JobPool_Audio, JobPriority_High, &g->PB_WSP_PlaybackJob_counter); RunJob(1, PB_WSP_PlaybackJob, JobPool_Audio, JobPriority_High, &g->PB_WSP_PlaybackJob_counter, 0);
OnExit(&PB_WSP_Shutdown); OnExit(&PB_WSP_Shutdown);
} }

View File

@ -5,7 +5,7 @@
//~ Layer dependencies //~ Layer dependencies
#include "../base/base.h" #include "../base/base.h"
#include "../gpu/gpu.h" #include "../gtest/gtest.h"
#include "../sprite/sprite.h" #include "../sprite/sprite.h"
#include "../font/font.h" #include "../font/font.h"
#include "../collider/collider.h" #include "../collider/collider.h"
@ -13,10 +13,11 @@
#include "../net/net.h" #include "../net/net.h"
#include "../mixer/mixer.h" #include "../mixer/mixer.h"
#include "../bitbuff/bitbuff.h" #include "../bitbuff/bitbuff.h"
#include "../rendertest/rendertest.h"
inline void StartupPpDeps(void) inline void StartupPpDeps(void)
{ {
BaseMain(); BaseMain();
GPU_Main(); GT_Main();
S_Main(); S_Main();
F_Main(); F_Main();
CLD_Main(); CLD_Main();
@ -24,6 +25,7 @@ inline void StartupPpDeps(void)
N_Main(); N_Main();
MIX_Main(); MIX_Main();
BB_Main(); BB_Main();
RT_Main();
} }
//////////////////////////////// ////////////////////////////////

View File

@ -44,8 +44,8 @@ void StartupUser(void)
P_ShowWindow(g->window); P_ShowWindow(g->window);
/* Start jobs */ /* Start jobs */
RunJob(1, UpdateUserJob, 0, JobPool_User, JobPriority_High, &g->shutdown_job_counters); RunJob(1, UpdateUserJob, JobPool_User, JobPriority_High, &g->shutdown_job_counters, 0);
RunJob(1, SimJob, 0, JobPool_Sim, JobPriority_High, &g->shutdown_job_counters); RunJob(1, SimJob, JobPool_Sim, JobPriority_High, &g->shutdown_job_counters, 0);
OnExit(&ShutdownUser); OnExit(&ShutdownUser);
} }

View File

@ -2064,7 +2064,6 @@ void StepSim(SimStepCtx *ctx)
ReleaseAllWithProp(world, Prop_Release); ReleaseAllWithProp(world, Prop_Release);
//- Sync to publish client //- Sync to publish client
if (publish_client->valid && world->tick > publish_client->last_tick) if (publish_client->valid && world->tick > publish_client->last_tick)

View File

@ -0,0 +1,9 @@
#include "rendertest.h"
#include "rendertest_core.c"
void RT_Main(void)
{
RunOnce();
RT_StartupDeps();
RT_StartupCore();
}

View File

@ -0,0 +1,27 @@
#ifndef RENDERTEST_H
#define RENDERTEST_H
////////////////////////////////
//~ Layer dependencies
#include "../base/base.h"
#include "../gpu/gpu.h"
#include "../sprite/sprite.h"
#include "../font/font.h"
#include "../collider/collider.h"
inline void RT_StartupDeps(void)
{
BaseMain();
GPU_Main();
S_Main();
F_Main();
CLD_Main();
}
////////////////////////////////
//~ Layer headers
#include "rendertest_core.h"
void RT_Main(void);
#endif

View File

@ -0,0 +1,6 @@
////////////////////////////////
//~ Startup
void RT_StartupCore(void)
{
}

View File

@ -0,0 +1,4 @@
////////////////////////////////
//~ Startup
void RT_StartupCore(void);