move part of file evaluations onto new async file reads

This commit is contained in:
Ryan Fleury
2025-09-24 11:50:53 -07:00
parent e7368af35c
commit 5f883860e0
4 changed files with 20 additions and 13 deletions
+8 -3
View File
@@ -190,15 +190,19 @@ async_thread_entry_point(void *params)
for(;;) for(;;)
{ {
// rjf: wait for signal if we need, otherwise reset loop signal & continue // rjf: wait for signal if we need, otherwise reset loop signal & continue
if(lane_idx() == 0)
{
if(!ins_atomic_u32_eval(&async_loop_again)) if(!ins_atomic_u32_eval(&async_loop_again))
{ {
MutexScope(async_tick_start_mutex) cond_var_wait(async_tick_start_cond_var, async_tick_start_mutex, os_now_microseconds()+100000); MutexScope(async_tick_start_mutex) cond_var_wait(async_tick_start_cond_var, async_tick_start_mutex, os_now_microseconds()+100000);
} }
else if(lane_idx() == 0) ins_atomic_u32_eval_assign(&async_loop_again, 0);
{
async_loop_again = 0;
} }
lane_sync();
// rjf: do all ticks for all layers
ProfScope("async tick")
{
#if defined(ARTIFACT_CACHE_H) #if defined(ARTIFACT_CACHE_H)
ac_async_tick(); ac_async_tick();
#endif #endif
@@ -211,6 +215,7 @@ async_thread_entry_point(void *params)
#if defined(TEXTURE_CACHE_H) #if defined(TEXTURE_CACHE_H)
tex_async_tick(); tex_async_tick();
#endif #endif
}
// rjf: take exit signal; break if set // rjf: take exit signal; break if set
lane_sync(); lane_sync();
+1 -1
View File
@@ -289,8 +289,8 @@ dasm_artifact_create(String8 key, B32 *retry_out)
if(params.dbgi_key.path.size != 0) if(params.dbgi_key.path.size != 0)
{ {
rdi = di_rdi_from_key(di_scope, &params.dbgi_key, 1, 0); rdi = di_rdi_from_key(di_scope, &params.dbgi_key, 1, 0);
}
stale = (stale || (rdi == &rdi_parsed_nil)); stale = (stale || (rdi == &rdi_parsed_nil));
}
//- rjf: data * arch * addr * dbg -> decode artifacts //- rjf: data * arch * addr * dbg -> decode artifacts
DASM_LineChunkList line_list = {0}; DASM_LineChunkList line_list = {0};
+2
View File
@@ -71,6 +71,7 @@ fs_change_gen(void)
internal AC_Artifact internal AC_Artifact
fs_artifact_create(String8 key, B32 *retry_out) fs_artifact_create(String8 key, B32 *retry_out)
{ {
ProfBeginFunction();
Temp scratch = scratch_begin(0, 0); Temp scratch = scratch_begin(0, 0);
//- rjf: unpack key //- rjf: unpack key
@@ -187,6 +188,7 @@ fs_artifact_create(String8 key, B32 *retry_out)
MemoryCopyStruct(&artifact, &content_key); MemoryCopyStruct(&artifact, &content_key);
scratch_end(scratch); scratch_end(scratch);
ProfEnd();
return artifact; return artifact;
} }
+1 -1
View File
@@ -2153,7 +2153,7 @@ rd_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated)
{ {
U64 file_path_string_id = space.u64_0; U64 file_path_string_id = space.u64_0;
String8 file_path = e_string_from_id(file_path_string_id); String8 file_path = e_string_from_id(file_path_string_id);
result = fs_key_from_path_range(file_path, range, 0); result = fs_key_from_path_range_new(file_path, range, 0);
}break; }break;
case RD_EvalSpaceKind_CtrlEntity: case RD_EvalSpaceKind_CtrlEntity:
{ {